feat(ios): record a USB-connected iPhone through its CoreMediaIO screen-capture source

AR
14m ago
+2033-406

Summary

Closes #5199. A physical iPhone records stitched runner screenshots, measured at 7.5 fps. A cabled iPhone or iPad now records its CoreMediaIO screen-capture source at native size and 55–59 fps, chosen automatically.

USB capture is selected when IORegistry shows the device on this Mac's USB cable and the recording transports are local. Otherwise the runner records, unchanged. One typed recorder state allows a fallback to the runner only before the first frame (no source, no frames, no camera access, start lock busy, shared device name), reported as recorderFallbackReason. Every helper holds one host-wide start lock until its first frame; without it, 4 of 6 simultaneous two-phone starts recorded the wrong phone.

Scope expansion: one shared open-envelope builder in capture-kit, which Fallow required (first commit).

Before / after

iPhone 15 Pro (iOS 18.5), iPhone 13 Pro (iOS 18.6.2), macOS 27.2.1, ffprobe -count_frames.

base (runner)      15 Pro  1178x2556    54 frames / 7.20 s   7.5 fps
head (usb-capture) 15 Pro  1180x2556   281 frames / 5.12 s  54.9 fps
head (usb-capture) 13 Pro  1170x2532   404 frames / 7.10 s  56.9 fps

Base, runner, 15 Pro:

https://github.com/user-attachments/assets/53a24dee-9fe6-49cb-8441-1cd05f6d31c9

Head, 15 Pro and 13 Pro:

https://github.com/user-attachments/assets/3119be9a-635c-4577-b29c-ea820a892069

https://github.com/user-attachments/assets/66a51452-7538-4106-a0a3-6bd73a4d22bc

Without the lock: asked for the 15 Pro, recorded the 13 Pro:

https://github.com/user-attachments/assets/ca9927b9-9c72-41f5-b1c3-a82f6c1b83fc

With the lock, both at once:

https://github.com/user-attachments/assets/8bfcc5f5-4e4c-4225-80c0-824baa640124

https://github.com/user-attachments/assets/46dfb596-6a4e-4294-876d-bdd852488beb

Validation

Typecheck, lint, check:fallow, layering, check:capabilities-matrix and repo guards pass. Live, no setting: 6 of 6 back-to-back starts recorded through USB capture. Start latency is in the PR comments.

Risks: no audio; rotation drops frames; camera access is never requested.

šŸ¤– Generated with Claude Code