You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4d75aa4
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(plugins): remove the version 1 provider plugin contract (#3759) (#4504)
* refactor(plugins): remove the version 1 provider plugin contract (#3759)
Drop the v1 loader adapter, the manifest-driven discovery and store branches, the
manifest credential and connection fallbacks, and the install-time provider
collision checks. A store package is discovered through its exports only, and
everything it declares comes from the object its factory returns. The registry
settles a duplicate provider id by first claim.
Remove the v1 entries and manifest declarations from TestMu AI and Revyl, and
document the migration to an AgentDevicePluginFactory in ./agent-device.
* refactor(plugins): keep entry resolution module-private after the v1 removal
discoverPluginEntry is the only caller of resolvePluginEntry, and the store's
version-selector check lost its second caller with the manifest branches, so
both become module-local. Drop the deleted v1 entries from the Fallow entry
list. Removes the dead-export findings the fallow audit raised at head.
* refactor(plugins): answer the review findings on the v1 removal
Point the traversal fixture at the file that exists outside the package, say the
entry contract as it is (root export, which is main without exports), move the
v1 manifest's connection to connection.capabilities in the migration note and
separate the incompatible_plugin and invalid_plugin cases, claim the built-in id
with a non-routing provider in the store test, and state what install checks.
Remove the version 1 provider plugin contract. A store package is now discovered only through its exports: `./agent-device`, or the package root when that subpath is absent. The host no longer reads an `agentDevicePlugin` manifest to choose an entry or to declare a provider, connection capabilities, or credential variables, and `agent-device plugins add` no longer refuses a package for a provider another manifest claims — the registry settles a duplicate provider id when the daemon next composes its plugins, as the first claim wins.
8
+
9
+
Migrate a plugin by exporting its factory from `./agent-device` and returning the manifest's values from the factory: `provider`, `credentials: { variables: [...] }`, an optional `connection`, and `setup(host)` that returns `{ runtime, platformModule }` or `{ webDriver }`, with `apiVersion: 2`. See [Provider plugins](/docs/plugins) for the full migration. A plugin object with an `apiVersion` other than 2 is listed as `failed` with `incompatible_plugin`, and a default export that is not a plugin factory with `invalid_plugin`; the daemon starts without either.
// A published provider package's default export is its plugin contract; packages/plugins/src/load.ts imports the package by name at runtime and reads `default`.
153
+
// A published provider package's default export is its plugin contract; the plugin loader imports the installed package's resolved entry at runtime and reads `default`.
156
154
"file": "packages/provider-*/src/index.ts",
157
155
"exports": ["default"]
158
156
},
159
-
{
160
-
// The version 1 entry a provider package's `agentDevicePlugin.entry` names; hosts without the version 2 contract import the built file and read `default`.
161
-
"file": "packages/provider-*/src/plugin.ts",
162
-
"exports": ["default"]
163
-
},
164
157
{
165
158
// packages/platform-apple/src/lifecycle.ts loads this module on demand and reads the member off the memoized import() promise, which Fallow cannot follow.
0 commit comments