refactor(platform-apple): collapse the runner client chain and merge the command trait table

Merged
TH
2mo ago
+167-291

Summary

Closes #2793. An internal refactor of the runner client in packages/platform-apple (12 files, +167/āˆ’291). Runtime behavior is unchanged.

  • core/runner-client.ts binds the host and re-exports the operations from their owning modules. runner/client.ts, whose factory and never-read runnerLeaseCleanupAdapter only forwarded calls, is deleted. Plain re-exports don't trigger TS2883, so the AppleRunnerClient annotations are gone.
  • Removed the unused provider parameter of resolveAppleRunnerProvider.
  • RUNNER_COMMAND_TRAITS is now one Record<command, traits>. alert stays a function, and the Swift table is left alone.
  • The stale fallow entry is removed in chore(gates).

Where the issue differs from current code:

  • The manifest file had already moved into runner-command-traits.ts, but it still had two tables, which this PR merges.
  • No test covered the dead parameter.
  • ADR 0023's trace is pinned to 27a97ee619, so I left it unchanged.

Validation

Tested SHA 06ec3c651d:

  • pnpm build, check:layering, check:production-exports, check:fallow, and check:affected --run all pass (vitest 3003/3003).
  • Diffing the runner subpaths' dist-types before and after shows identical resolved exports. Only a doc comment changed.
  • Planted mutations in the trait table and in the reader fail the group test.
  • No device run: nothing on the device path changed.
  • Adversarial review: fixed 3 findings (test independence, evaluation-order doc, error hint). Rejected 5 (hypothetical sideEffects, the ADR is pinned to a commit, trait objects were already shared, the composition root is not a barrel, and the guard is needed).

šŸ¤– Generated with Claude Code