refactor(linux): close the Linux plugin review follow-ups
Summary
Part of #4878.
The composition is the only producer of PlatformHost, and it always provides the managed process
service and the detached launcher. Both were optional, so Linux refused open with
host-launch-unavailable and HarmonyOS refused to stream hilog on a facet no request can produce.
Both are required now; both refusals are gone.
The detached-exit shape was declared three times and had drifted on signal. One declaration in
@agent-device/contracts/platform-runtime-host now serves the plugin contract, the Linux provider
contract and the host's exec module.
Every Linux provider part a plain request reads is mandatory, so the family stops dereferencing
optional parts with !. which answers through the host's PATH probe and the shipped AT-SPI helper
through a new isFilePresent. The runtime resolves the request's provider once per binding. Linux no
longer claims React Native helpers are unavailable. Left open: the request-scoped provider has no
producer, which needs its own decision.
Value
| Measure | base | head |
|---|---|---|
| exit declarations / refusals | 3 / 2 | 1 / 0 |
optional parts / ! uses | 3 / 5 | 0 / 0 |
reads off PlatformHost | 1 | 0 |
command-runner.ts lines | 116 | 83 |
Validation
Tested at e8a0af4272 on base 64f963ab45: typecheck, lint, format, test:unit (22151 tests),
provider scenarios (318, Linux desktop included), and the layering, DI-seam, fallow, package, docs and
capability-matrix checks pass. No device lane applies — nothing drives a live device — and the packaged
Linux smoke proves the helper resolves.
Risk: apiVersion stays 3 while PlatformHost gained a required member, so a third-party plugin that
built its own host stops compiling; 0.22 has no shim.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.