feat(platform-apple): record on watchOS simulators

Merged
TH
7d ago
+86-17

Summary

record was closed on an Apple Watch simulator: the watchOS admission set lists every operation with a watch meaning, and no recording operation was in it. Apple simulator recording is host-side — recording/runtime.ts starts simctl recordVideo for kind: 'simulator' and never uses the runner's recorder, which stays a watchOS stub — so admitting the three recording operations is the whole fix. The finalizer's export target now comes from the simulator's Apple OS instead of a hard-coded iOS recording.

7 files. No Swift runner change, no new backend, no option refusals: every record option works on a watch.

agent-device record start watch.mp4 --session watch   # recordingBackend: simctl recordVideo
agent-device record stop --session watch              # mp4 + gesture telemetry

Validation

Head 9204ec49ca. Local: vitest --project unit-core for packages/platform-apple, packages/command-surface/src/recording, test/repo-guards; check:mcp-metadata; check:command-docs; format; tsc --noEmit. CI owns the full gate.

Device evidence at 9204ec49ca, own simulator AD Watch Recording Verify (Apple Watch Series 11 46mm, watchOS 27.0), branch CLI after pnpm build, pnpm build:xcuitest:watchos, pnpm clean:daemon, isolated --state-dir. Session and simulator deleted after the run. All exits 0:

  • open com.apple.NanoSettings --platform ios --udid <watch> --session adwatch → Opened
  • record start /tmp/ad-watch-recording.mp4 --session adwatch → recordingBackend: simctl recordVideo
  • snapshot -i, scroll down, press 'label="General"' --settle, press 160 200 → Settings tree, Scrolled down, settle diff, Tapped (160, 200)
  • record stop --session adwatch → recorder: confirmed, nativePathDisposition: retired, telemetry sidecar
  • ffprobe /tmp/ad-watch-recording.mp4 → 1.2 MB, h264 416x496, duration=26.2

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.