refactor(host): read host settings from HostEnvironment in root src and remaining packages
Summary
Part of #3751 (umbrella #3747). Configuration reads in root src/**, packages/remote and provider-webdriver take the host explicitly instead of reading process.env/process.cwd(): CLI command handlers (new host param, set once per run in cli.ts), option/binding/auth resolvers, the connection profile chain, remote artifact preparation and materialization (threaded through the daemon-client transport), and the platform runtime gateway, inventory gateways, diagnostics, toolchain and deployment hosts. Released entries keep their process default in a wrapper: resolveRemoteConfigProfile, createLocalArtifactAdapter.
Behavior note: a relative --provider-app path on a request with no cwd now fails with provider_app_cwd_missing; the base fills the lease cwd from the host.
Remaining, handed to owners
- #3772:
session-journalcap,device-selectionenv,replay-port/maestro/ad-scriptreplay env and cwd. - #3750 / #3777: adb port environment (
platform-runtime-android-adb-host.ts), app-log output and process env, platform-* packages. - Plugin v2 stack:
provider-device-runtimes.ts,provider-credential-fingerprint.ts,cli/connection/provider-policy.ts,plugins/*. - #3763:
update-check.ts, replay-test reporters and progress,color.ts,diff.ts,commands/replay/index.ts,doctorCliOutput,plugins.ts,cli-config.ts(the MCP caller must pass env first).
Validation
check:affected --run green at 8eff3d9ad6, rebased on 916db0b9a4. Root src keeps 5 commandHostEnvironment() reads (4 command execution, 1 doctor output colour); 23 branch-wide against 56 on the base. Live run at an earlier head: real daemon, macOS open/snapshot/close, plugins list, Android doctor.