refactor(platform): colocate the HarmonyOS, Linux and web interactors behind lazy factory facades
Merged
TH
4h ago+161+161+012345678901234567890123456789-21-21-01234567890123456789
Summary
- Move the HarmonyOS, Linux and web interactors (and web's
unsupported-interactor) with their tests intoplatform-harmonyos,platform-linuxandplatform-web; no root implementation remains. Android, Apple and Vega are untouched. - Each package's
./interactorexport is a lazy factory facade (src/interactor-facade.ts): type-only imports plus a function-scopedawait import('./interactor.ts'). The implementation stays private, so the facade's eager closure is one module and platform mechanics load only when the factory is called. register-builtins.tskeeps its dynamic imports, now of the package subpaths. The layering policy admits those subpaths only from that file and only dynamically. Web uses the canonicalselectors/interaction-positionalsstripAtPrefix.- Review fix: the R13 summary printed by
check:layeringnow names the dynamic-only interactor subpath exception (78b06026b1). - No behavior change claimed; no native or device validation.
Validation
Head 78b06026b1, merge-base b7c93e3a37 (origin/main is now 87fe3ea83e; no rebase needed):
pnpm check:affected --runon this exact head (pnpm 11.17.0,AGENT_DEVICE_VITEST_MAX_WORKERS=1, under the shared gate lock): all runnable checks passed, exit 0. Vitest-related: 1852 files, 15577 tests passed. GitHub-authoritative lanes (coverage, native, smoke) are CI-only.- Earlier round (
0776567d70) ran the same full gate green; the only change since is the one-line summary string. - Cold design review of this head: clean; no notes taken (pre-existing helper duplication and test-scope ideas are out of scope).