refactor: extract Apple runner workspace package

Merged
TH
1d ago
+2819-1555

Summary

Extract the Apple runner engine into private @agent-device/apple-runner, with one package entry and explicit named exports. Platform Apple binds the host port once; the engine has no dependency back to platform Apple or root. Released CLI, Node, and MCP contracts remain unchanged.

Scope: 270 files, mainly engine/test moves and import updates. Shared types and the XML visitor move to their existing lower owners. Package tests construct local host defaults; composed physical-device readiness coverage stays with platform Apple. Review fixes: stronger entry, close-release, and request-guard tests; destination validation on every platform; corrected ADR 0019/0023/0033 and R77 wording; docs/agents back under 40,000 bytes. Related: #3276.

Validation

Tested head: bcab58dca88f00eb6204b6a24ac6005daab7e4d0.

  • pnpm check:affected --run --head bcab58dca8 passed at the exact, unchanged head (run-Xkt3Rq, fail-open full selection, exactCommit: true).
  • Two earlier runs of this review round failed and were fixed: a stale path regex in the R77 layering test, and unhandled JSON.parse errors from the scripted daemon test fixture on stray requests. The fixture fix has a regression test that fails without it.
  • Earlier live proof at 8df3af2546: checkout-built iOS runner and daemon completed open, snapshot, press, and close. Later changes affect tests, docs, and exported types, not the exercised runtime route. No new live run at this head.
  • CI owns remote integration, coverage, and device lanes.