Repository navigation
Open
Description
Summary
0.22 extracts providers and some platforms into plugins (#3309, #3310, #3311). The core must stay lean.
Native sources, and platform logic that only one platform uses, must live with the owning platform package.
The first PR moves the recording Swift helpers out of capture-kit into a new host-tool package, packages/host-swift.
This issue tracks the remaining items. Each needs a port design or a policy decision, not a mechanical move.
Findings
- The recording Swift helpers (touch overlay, frame decoder, video validator) are macOS host tools, not Apple-platform code. Android, HarmonyOS, Apple and provider recordings all use them on a macOS host. They do not belong in
platform-apple, and they do not block its extraction. - No other Swift, Objective-C, Java or Kotlin source sits in a non-platform package. Native trees stay under
apple/andandroid/.
Remaining items
Can move; the dependency direction allows it
-
contracts/src/apple-runner-request.ts(18 lines, type only). Only consumer:apple-runner. Proposed owner:apple-runner. -
capture-kit/src/snapshot/ios-snapshot-runtime.ts(188 lines). Only consumer:daemon. Proposed owner:platform-apple. R72 (ios-snapshot-engine-policy.ts) andprovider-snapshot-presentation-policy.tspin the path. -
contracts/src/ios-target-activation.ts(42 lines). Consumers:daemon,platform-apple. Proposed owner:platform-apple. -
contracts/src/android-clipboard-support.ts(13 lines). Consumer:platform-android, plus one contracts-internal import. Proposed owner:platform-android.
Blocked: a shared package consumes the item (needs a port or a hook)
-
capture-kit/src/ios-snapshot-engine/(about 4,200 lines) and the./ios-snapshot-treeexport. Blocked bymaestroandselectors. Proposed owner:platform-apple, behind a presentation port.conformance-harness.ts(runsswift buildonapple/snapshot-presentation) moves with the engine. -
capture-kitios-node-interpretation,ios-snapshot-acquisition,ios-ax-tree. Blocked byprovider-webdriverandprovider-revyl. Proposed owner:platform-apple, as a port that providers receive. -
capture-kit/src/ios-snapshot-planning.ts. Blocked bycapture-kitsnapshot-stateandsnapshot-router. -
capture-kit/src/snapshot/snapshot-presentation/android/*(505 lines). Blocked bycommand-output. Proposed owner:platform-android. -
capture-kitandroid-replacement-surface-occlusion,snapshot-freshness/android,network-traffic-android,screenshot-overlay-android. Each needs an injected hook in its shared caller. Proposed owner:platform-android. -
contractsandroid-input-ownership,android-snapshot-quality,android-system-chrome,android-system-surface-disclosure,ios-snapshot,ios-system-surface. Consumed bycapture-kit,command-runtime,replay-port,provider-webdriver. Decide per item: shared data stays in contracts; platform behavior moves behind a registry hook. -
kernel/src/device-shell.ts. Serves Android and HarmonyOS. Stays shared unless a second split is worth it.
Correct by current policy; moving them is a policy change
- Root
src/platform-runtime-*android*and*apple*host bindings (adb, emulator, simctl, xcrun, devicectl).root-module-zones.ts, R13 andplatform-composition-policy.tskeep host binding in the root. Moving them needs an ADR 0019 amendment. - Root
src/core/interactors/limrun-ios-*(8 files, about 1,290 lines). Proposed owner:provider-limrun, with an Apple runner port fromplatform-apple. Ties into refactor(provider-limrun): ship Limrun as the@agent-device/limrunplugin #3311. -
daemonsingle-platform modules:execution/android-system-dialog.ts,execution/android-snapshot-timeout-evidence.ts,execution/android-foreground-surface.ts,core/stopped-local-android-device.ts,interaction-ios-tap-outcome.ts,interaction-touch-direct-ios.ts,core/direct-ios-selector.ts,core/ios-app-session-hint.ts,resources/macos-app-lease.ts,session-appstate-apple-session.ts. Each imports daemon internals and needs a daemon port first.
Follow-ups to the host-swift move
- Move the video validator from an inline TS string (
host-swift/src/video-validator-source.ts) to a.swiftfile under the generator. Decision needed: a file adds a trailing newline, so the validator's compile cache key changes once (one recompile after upgrade). - Optional: move the recording drivers (
overlay.ts,contact-sheet-frames.ts, the playability half ofvideo.ts) into a host-media package abovecapture-kit. Needs avideo.tssplit and an injected frame-extractor port inbuildRecordingContactSheet. Not required for 0.22.
Completion
Each item above is moved, or closed with a Decision: comment. No non-platform package holds native source or single-platform logic without a recorded reason.
Blocked by: nothing. Related: #3309, #3310, #3311, ADR 0019, ADR 0034.
Metadata
Metadata
Assignees
Labels
No labels
Activity
apex-sentinel-staging commentedon Nov 19, 2026
Apex Sentinel · Issue review
Suggested label:
featureThe issue describes desired code organization work for the 0.22 plugin extraction, listing remaining platform-specific items to move or close with policy decisions rather than reporting broken behavior. It is actionable because it provides concrete files, proposed owners, blockers, and completion criteria, while some items still need design decisions.
thymikee commentedon Nov 19, 2026
Current state: #4742 merged (recording Swift helpers -> packages/host-swift). #4751 open: apple-runner-request contract -> apple-runner. Next: the remaining 'Can move' items, then port designs for the blocked items.