refactor(platforms): read host settings from HostEnvironment in platform and capture packages

TH
5m ago
+1390-596

Summary

Platform and capture packages read the host's environment and working directory from a HostEnvironment instead of process. No behavior change. Closes #3750 (part of #3747; stacked on #3763).

  • react-native, provision-kit, maestro and platform-android take the host or environment explicitly (Android reads its adb host port). Released agent-device/metro binds the process host at its boundary; the client passes its own.
  • platform-apple runner reads through its host port (hostEnvironment, R77 intact). The import-time container bundle ids are now resolveRunnerContainerBundleIds(env). Detached runner and bridge children get an explicit env and cwd.
  • capture-kit: the PNG worker starts with an empty env and reports unavailability through diagnostics only.
  • The app-log marker takes the request host's env from the daemon.
  • 80+ files, mostly tests binding a host.

Validation

pnpm check:affected --run --head f547d8895e: passed, exactCommit: true.

Device (earlier head): Android emulator and iOS 27.0 simulator passed runner snapshot, screenshot, PNG-worker diff, recording overlay, and app log. Not rerun after the explicit-host conversion; not run: runner detach/adopt across a daemon restart.

Remaining ambient commandHostEnvironment() reads are listed in the comment below.

🤖 Generated with Claude Code