refactor(plugins): extract the provider plugins into a private package

Merged
TH
15h ago
+172-66

Summary

Extract src/plugins (manifest, store, host, load, connection) into the private @agent-device/plugins package. 30 files, +172/−66.

  • ProviderPluginHost is owned by the package; agent-device/plugins re-exports it unchanged.
  • RemoteConfigProfile is declared once in contracts/remote-config-fields and re-exported by src/remote/remote-config-schema.ts.
  • The loader reads CloudWebDriverProviderOptions from provider-webdriver/plugin; dynamic imports and cleanup are unchanged.
  • The plugins layering zone stays rank 4. No allowlist or baseline change.
  • The reserved-provider assertion moved to the root provider-device-runtimes test, which owns that composition.

Remote overlap: #3711 (unmerged) edits src/remote. This PR touches only remote-config-schema.ts and plugins/connection.ts type imports; reconcile on whichever lands second.

Validation

Head 03f44c4f11 on b7c93e3a37. Pinned pnpm 11.17.0, under the shared extraction lock.

  • AGENT_DEVICE_VITEST_MAX_WORKERS=1 pnpm check:affected --run: exit 0 (1852 files, 15581 tests passed, 1 skipped).
  • Also green: pnpm typecheck, pnpm depgraph, pnpm check:layering, pnpm check:production-exports, pnpm check:fallow, focused plugin tests.
  • Earlier runs with default workers failed platform-android/fill-verification.test.ts:144. That file is untouched by this PR, and the same failure reproduces on main at 6e0844ff. It did not recur at one worker; I did not fix it here.
  • Not run: CI Integration and Coverage jobs.