refactor(web,vega): run each plugin's commands on its setup host
Summary
The managed web and Vega plugins run every spawn, process-table read, install lock and diagnostic through the PlatformHost handed to setup(), as HarmonyOS does, so neither packed bundle carries its own host-kit exec or diagnostics scope. PlatformHost gains isExecutableOnPath and a processes facet (table, identities, executable paths, owned-record reap, withLock), answered only by the core. The layering rule now derives from the host-kit module graph which exports reach exec or diagnostics, so a new exec-backed export is refused without editing a list. Fixes #4862. Stacked on #4857.
Value
| metric | base | head |
|---|---|---|
runtime host-kit/command|diagnostics imports in managed plugins | 11 files | 0 |
| exec-backed host-kit reads reachable from a managed plugin | 5 sites | 0 |
| hand-kept host-kit debt/export list entries | 11 | 0 |
Validation
Head bde31446a0, rebased onto 0.22 at 9a12ab0ebb (HarmonyOS and Linux merged); the Linux plugin now also reads the host OS from PlatformHost and paces input without host-kit. Local: build, typecheck, lint, layering, command-docs, daemon-wire-compat, full vitest --project unit-core, check:package with packed web and Vega gates (argv, child env, one exec record per call; web asserts the ps lock and table reads). Packed web setup --debug traces the install-lock ps reads under the request with no bundled spawn. Live Vega Virtual Device run in docs/evidence/vega-managed-platform-2026-11-21.md; web used a fixture backend. CI: hosted checks at this head.
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.