refactor(platform): colocate the HarmonyOS, Linux and web interactors behind lazy factory facades

Merged
TH
5h ago
+161-21

Summary

  • Move the HarmonyOS, Linux and web interactors (and web's unsupported-interactor) with their tests into platform-harmonyos, platform-linux and platform-web; no root implementation remains. Android, Apple and Vega are untouched.
  • Each package's ./interactor export is a lazy factory facade (src/interactor-facade.ts): type-only imports plus a function-scoped await 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.ts keeps its dynamic imports, now of the package subpaths. The layering policy admits those subpaths only from that file and only dynamically. Web uses the canonical selectors/interaction-positionals stripAtPrefix.
  • Review fix: the R13 summary printed by check:layering now 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 --run on 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).