refactor(move): move the recording Swift helpers into packages/host-swift

Merged
TH
9d ago
+198-87

Summary

Behavior unchanged. Moves the recording Swift helpers out of capture-kit and the iOS runner tree into a new private host-tool package, packages/host-swift. Reason: 0.22 extracts providers and some platforms into plugins, so the core must stay lean, and shared packages must not carry native sources.

The touch overlay, the frame decoder and the video validator are macOS host tools. Android, HarmonyOS, Apple and provider recordings all compile them on the daemon host. So they do not belong in platform-apple. host-swift owns the .swift files, the generated embedding, the validator source and the Swift compile cache. capture-kit keeps its cross-platform drivers and depends on host-swift. The Swift bytes, the cache keys and the lazy import do not change.

  • 40 files changed. Most are renames (git diff -M90%: +198/−87).
  • Gate coverage follows the files: the layering model, R11, project references, the trailing-comma scan, the bridge-proof trigger, the darwin proof, the native clone scan, and device-lane ownership.
  • Inventory and remaining items: #4740.

Validation

  • Head 8ed876a18c: pnpm check:affected --run --head 8ed876a18c passed with exactCommit=true. 42 checks passed. The full set ran (fail-open on manifest changes). 25 checks were skipped as CI-only or device lanes, including swift-runner, coverage and replay.
  • pnpm check:native-dupes and pnpm check:native-dupes:test passed.
  • I ran the focused vitest suites for packages/host-swift, capture-kit/src/recording and the repo guard on darwin. They passed.
  • CI still has to run: the macOS smoke darwin proof (swift-cache-recording-scripts), coverage, and the device lanes.
  • One independent review found a gap in the clone scan. It is fixed.

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