Repository navigation
refactor(plugins): move the plugin contract to version 3 - #4784
Conversation
…ions
AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with
provider, replay-backend and replay-execution kinds. The registry validates the whole
declaration, expands it into per-claim records, and reserves claim spaces in candidate
order. All nine maintained plugins wrap their factories in contributes. No shim: a
version 2 result gets the typed incompatible-plugin-api outcome.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…port
The store reads package.json agent-device { apiVersion, provider?, replayBackend?,
replayExecution? }: a version other than 3 fails pre-import with the typed
incompatible-plugin-api reason, engines.node establishes the Node floor
(node-below-floor), and reserved or malformed claim ids fail before any code runs.
After the factory runs with its options, the returned claim keys must equal the
declared ones unordered, or the package is invalid. All nine maintained packages
declare their claims and the Node floor.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
… suites Update the existing suites to the contributes shape and add: a version 2 factory and a version 2 metadata package both get incompatible-plugin-api; a metadata / factory claim mismatch invalidates the package; cross-package duplicates keep the first claim and fail the loser; a multi-kind package activates its replay claim when its provider setup fails; the replay-only scope sets up no provider claim; close runs activated claims in reverse activation order with per-step outcomes. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
The plugins guide now documents contributes with per-kind contributions, the agent-device package.json field with static claim keys, the engines Node floor, the replay-execution ad kind, and the incompatible-plugin-api outcome for version 2 packages. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
AgentDevicePlugin gains a defaulted contribution generic so provider packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their packed .d.mts then inline only the provider branch and stay assignable to the host's AgentDevicePlugin despite the replay branches' unique-symbol brands. Update the aws smoke fixture to the v3 contributes shape. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Repair the dead-code, complexity, and duplication findings the 0.22 plugin contract v3 change introduced, without suppressions or baselines. - make module-private helpers non-exported (`incompatiblePluginApi`, `nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the `Contribution` type re-export) - extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim` from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`, `resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and `assertStoreSelectionCurrent` from the registration and replay paths - share the hosted App Automate connection resolution and validation in `@agent-device/provider-webdriver/plugin` as lazy loaders, so the BrowserStack and TestMu entries call one owner without importing the WebDriver runtime at plugin load time
Contract v3 made `Contribution` name the host, format-backend and native-execution declarations, so those declarations started splitting across two published chunks. TypeScript then saw two unrelated types with the same name, and a consumer could not pass a plugin from one public entry into another entry's function. - pin the plugin contract and the contract declarations it names into the shared `sdk-replay-backend.d` declaration chunk - type `startAgentDevice` `plugins` through the contract package with the WebDriver options the host composes, so the SDK index no longer pulls the `./plugins` entry into a shared chunk whose exports get mangled - declare the Replay plugin's published types against `agent-device/plugins`, as the Maestro entry already does - write the integration fixtures' plugin objects in contract v3, including the typed `incompatible-plugin-api` reason the host now reports
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 73f893c. The verdict and the full list are in the summary comment.
|
Thanks for the contract move. At 73f893c there are two problems that need fixing before merge, and the failing device Smoke Tests are most likely caused by the first one. The link to the first problem comes from the diff and the workflow routes. The non-source install writes a package.json with only name, version, type and exports (scripts/install-workspace-replay-plugins.ts:57). CI runs this mode ( packages/replay/README.md:11 still says the plugin uses API version 2 and that the managed API version 2 check applies. The change reroutes how native Not blocking, and you can take or leave these: (1) a slot that fails to load reserves claims from Could one The open inline thread on registry cleanup now awaiting serially and the one on |
Addresses the review on #4784. - install: copy the `agent-device` claim block and `engines` into non-source package.json, with a non-source install test - claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims, and one metadata spelling exists per claim - reuse compareVersions from @agent-device/host-kit/version - Limrun exports its connection; webdriver no longer carries the shared HostedConnection loader shim - docs: plugins guide, replay README, ADR 0012, ADR 0034 and the incompatible-plugin-api hint match the contract
An embedder plugin carries no package metadata, so nothing names its claims before the factory runs. When its validation failed, resolution found no claim and reported the engine as absent. A selected package keeps its own load, compatibility or setup reason: a store package answers for the name the caller selected, and a candidate the embedding host supplied answers because no name can exclude it.
A candidate that fails before its contributions are readable still has to say what it was meant to provide: the inventory names it, and the selection that asked for that claim resolves to its reason. The id is read through the same CLAIM_KINDS table the validated readers use, so no second reader exists, and a slot whose package metadata already declared its claims is left as it was.
|
All findings addressed at 1. Non-source install dropped the claim block (blocker) — 2. 3. One claim record, no parallel arrays — export type PluggedClaim = Readonly<{ kind: ClaimKind; id: string }>;The registry keeps one Your (6), the two spellings: 4. 5. Limrun's connection — 6. Serial reverse-order close — kept on purpose, now with the reason where you looked. 7. Docs — 8. webdriver Fallow helpers — not accepted as new duplication; your instinct was right and the config accept wasn't needed either. The 53-line Two behaviour regressions the first attempt at (3) introduced, both caught by gates and fixed in the two follow-up commits, since they're in the same code you're reading:
Gate receipt at this head: |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 38fe333. The verdict and the full list are in the summary comment.
Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError.
This comment has been minimized.
This comment has been minimized.
|
Thanks for the update. At c0c5820, the concurrent teardown and the lazy Limrun connection are fixed, and the replay setup claim in plugins.md is only half fixed. Three items remain; the earlier review is at #4784 (comment). The restored test in replay-backend.test.ts:61 does not pin the concurrency guarantee. In validate.ts:182, The migration step at plugins.md:183 says to move host-command and environment work into the lazy Not blocking, and you can take or leave these: On the open threads: #4784 (comment) (concurrent teardown) still applies until the test above pins it, and #4784 (comment) (create(host) docs) still applies until the docs fix. These two can be resolved now: #4784 (comment) (the All 17 checks at c0c5820 are green except Mutants, which is skipped, and that includes the Android, iOS, macOS and Linux smoke tests that run the store-installed v3 replay and Maestro claims. The active v3 claims are inferred from those smoke runs and the unit test's |
A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves.
|
Pushed
Exact affected validation passed (42 passed, 28 skipped). The three non-blocking items ( |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 770eb01. The three items from the earlier review are fixed:
All checks pass, including the four device smoke lanes. |
* refactor(plugins): declare contract version 3 with per-kind contributions
AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with
provider, replay-backend and replay-execution kinds. The registry validates the whole
declaration, expands it into per-claim records, and reserves claim spaces in candidate
order. All nine maintained plugins wrap their factories in contributes. No shim: a
version 2 result gets the typed incompatible-plugin-api outcome.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): read static claims from package metadata before import
The store reads package.json agent-device { apiVersion, provider?, replayBackend?,
replayExecution? }: a version other than 3 fails pre-import with the typed
incompatible-plugin-api reason, engines.node establishes the Node floor
(node-below-floor), and reserved or malformed claim ids fail before any code runs.
After the factory runs with its options, the returned claim keys must equal the
declared ones unordered, or the package is invalid. All nine maintained packages
declare their claims and the Node floor.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* test(plugins): cover the version 3 contract in the registry and store suites
Update the existing suites to the contributes shape and add: a version 2 factory
and a version 2 metadata package both get incompatible-plugin-api; a metadata /
factory claim mismatch invalidates the package; cross-package duplicates keep the
first claim and fail the loser; a multi-kind package activates its replay claim
when its provider setup fails; the replay-only scope sets up no provider claim;
close runs activated claims in reverse activation order with per-step outcomes.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* docs(plugins): show the version 3 authoring shape
The plugins guide now documents contributes with per-kind contributions, the
agent-device package.json field with static claim keys, the engines Node floor,
the replay-execution ad kind, and the incompatible-plugin-api outcome for
version 2 packages.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): apply oxfmt to the version 3 contract files
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* fix(plugins): keep provider plugin declarations in the provider branch
AgentDevicePlugin gains a defaulted contribution generic so provider
packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their
packed .d.mts then inline only the provider branch and stay assignable to
the host's AgentDevicePlugin despite the replay branches' unique-symbol
brands. Update the aws smoke fixture to the v3 contributes shape.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): merge duplicate plugin type imports in provider tests
* chore(gates): resolve Fallow findings for plugin contract v3
Repair the dead-code, complexity, and duplication findings the 0.22
plugin contract v3 change introduced, without suppressions or baselines.
- make module-private helpers non-exported (`incompatiblePluginApi`,
`nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the
`Contribution` type re-export)
- extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim`
from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`,
`resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and
`assertStoreSelectionCurrent` from the registration and replay paths
- share the hosted App Automate connection resolution and validation in
`@agent-device/provider-webdriver/plugin` as lazy loaders, so the
BrowserStack and TestMu entries call one owner without importing the
WebDriver runtime at plugin load time
* fix(plugins): keep the published contract types single-sourced
Contract v3 made `Contribution` name the host, format-backend and
native-execution declarations, so those declarations started splitting
across two published chunks. TypeScript then saw two unrelated types with
the same name, and a consumer could not pass a plugin from one public
entry into another entry's function.
- pin the plugin contract and the contract declarations it names into the
shared `sdk-replay-backend.d` declaration chunk
- type `startAgentDevice` `plugins` through the contract package with the
WebDriver options the host composes, so the SDK index no longer pulls
the `./plugins` entry into a shared chunk whose exports get mangled
- declare the Replay plugin's published types against
`agent-device/plugins`, as the Maestro entry already does
- write the integration fixtures' plugin objects in contract v3, including
the typed `incompatible-plugin-api` reason the host now reports
* refactor(plugins): one typed claim record and honest declared claims
Addresses the review on #4784.
- install: copy the `agent-device` claim block and `engines` into non-source
package.json, with a non-source install test
- claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry
keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims,
and one metadata spelling exists per claim
- reuse compareVersions from @agent-device/host-kit/version
- Limrun exports its connection; webdriver no longer carries the shared
HostedConnection loader shim
- docs: plugins guide, replay README, ADR 0012, ADR 0034 and the
incompatible-plugin-api hint match the contract
* fix(plugins): a failed candidate keeps answering the replay selection
An embedder plugin carries no package metadata, so nothing names its claims
before the factory runs. When its validation failed, resolution found no claim
and reported the engine as absent. A selected package keeps its own load,
compatibility or setup reason: a store package answers for the name the caller
selected, and a candidate the embedding host supplied answers because no name
can exclude it.
* fix(plugins): name a failed load's claims through the claim table
A candidate that fails before its contributions are readable still has to say
what it was meant to provide: the inventory names it, and the selection that
asked for that claim resolves to its reason. The id is read through the same
CLAIM_KINDS table the validated readers use, so no second reader exists, and a
slot whose package metadata already declared its claims is left as it was.
* fix(plugins): tear down claims concurrently and keep duplicate reasons
Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError.
* fix(plugins): name version 2 replay claims and pin concurrent teardown
A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves.
---------
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): declare contract version 3 with per-kind contributions
AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with
provider, replay-backend and replay-execution kinds. The registry validates the whole
declaration, expands it into per-claim records, and reserves claim spaces in candidate
order. All nine maintained plugins wrap their factories in contributes. No shim: a
version 2 result gets the typed incompatible-plugin-api outcome.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): read static claims from package metadata before import
The store reads package.json agent-device { apiVersion, provider?, replayBackend?,
replayExecution? }: a version other than 3 fails pre-import with the typed
incompatible-plugin-api reason, engines.node establishes the Node floor
(node-below-floor), and reserved or malformed claim ids fail before any code runs.
After the factory runs with its options, the returned claim keys must equal the
declared ones unordered, or the package is invalid. All nine maintained packages
declare their claims and the Node floor.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* test(plugins): cover the version 3 contract in the registry and store suites
Update the existing suites to the contributes shape and add: a version 2 factory
and a version 2 metadata package both get incompatible-plugin-api; a metadata /
factory claim mismatch invalidates the package; cross-package duplicates keep the
first claim and fail the loser; a multi-kind package activates its replay claim
when its provider setup fails; the replay-only scope sets up no provider claim;
close runs activated claims in reverse activation order with per-step outcomes.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* docs(plugins): show the version 3 authoring shape
The plugins guide now documents contributes with per-kind contributions, the
agent-device package.json field with static claim keys, the engines Node floor,
the replay-execution ad kind, and the incompatible-plugin-api outcome for
version 2 packages.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): apply oxfmt to the version 3 contract files
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* fix(plugins): keep provider plugin declarations in the provider branch
AgentDevicePlugin gains a defaulted contribution generic so provider
packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their
packed .d.mts then inline only the provider branch and stay assignable to
the host's AgentDevicePlugin despite the replay branches' unique-symbol
brands. Update the aws smoke fixture to the v3 contributes shape.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): merge duplicate plugin type imports in provider tests
* chore(gates): resolve Fallow findings for plugin contract v3
Repair the dead-code, complexity, and duplication findings the 0.22
plugin contract v3 change introduced, without suppressions or baselines.
- make module-private helpers non-exported (`incompatiblePluginApi`,
`nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the
`Contribution` type re-export)
- extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim`
from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`,
`resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and
`assertStoreSelectionCurrent` from the registration and replay paths
- share the hosted App Automate connection resolution and validation in
`@agent-device/provider-webdriver/plugin` as lazy loaders, so the
BrowserStack and TestMu entries call one owner without importing the
WebDriver runtime at plugin load time
* fix(plugins): keep the published contract types single-sourced
Contract v3 made `Contribution` name the host, format-backend and
native-execution declarations, so those declarations started splitting
across two published chunks. TypeScript then saw two unrelated types with
the same name, and a consumer could not pass a plugin from one public
entry into another entry's function.
- pin the plugin contract and the contract declarations it names into the
shared `sdk-replay-backend.d` declaration chunk
- type `startAgentDevice` `plugins` through the contract package with the
WebDriver options the host composes, so the SDK index no longer pulls
the `./plugins` entry into a shared chunk whose exports get mangled
- declare the Replay plugin's published types against
`agent-device/plugins`, as the Maestro entry already does
- write the integration fixtures' plugin objects in contract v3, including
the typed `incompatible-plugin-api` reason the host now reports
* refactor(plugins): one typed claim record and honest declared claims
Addresses the review on #4784.
- install: copy the `agent-device` claim block and `engines` into non-source
package.json, with a non-source install test
- claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry
keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims,
and one metadata spelling exists per claim
- reuse compareVersions from @agent-device/host-kit/version
- Limrun exports its connection; webdriver no longer carries the shared
HostedConnection loader shim
- docs: plugins guide, replay README, ADR 0012, ADR 0034 and the
incompatible-plugin-api hint match the contract
* fix(plugins): a failed candidate keeps answering the replay selection
An embedder plugin carries no package metadata, so nothing names its claims
before the factory runs. When its validation failed, resolution found no claim
and reported the engine as absent. A selected package keeps its own load,
compatibility or setup reason: a store package answers for the name the caller
selected, and a candidate the embedding host supplied answers because no name
can exclude it.
* fix(plugins): name a failed load's claims through the claim table
A candidate that fails before its contributions are readable still has to say
what it was meant to provide: the inventory names it, and the selection that
asked for that claim resolves to its reason. The id is read through the same
CLAIM_KINDS table the validated readers use, so no second reader exists, and a
slot whose package metadata already declared its claims is left as it was.
* fix(plugins): tear down claims concurrently and keep duplicate reasons
Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError.
* fix(plugins): name version 2 replay claims and pin concurrent teardown
A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves.
---------
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): declare contract version 3 with per-kind contributions
AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with
provider, replay-backend and replay-execution kinds. The registry validates the whole
declaration, expands it into per-claim records, and reserves claim spaces in candidate
order. All nine maintained plugins wrap their factories in contributes. No shim: a
version 2 result gets the typed incompatible-plugin-api outcome.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): read static claims from package metadata before import
The store reads package.json agent-device { apiVersion, provider?, replayBackend?,
replayExecution? }: a version other than 3 fails pre-import with the typed
incompatible-plugin-api reason, engines.node establishes the Node floor
(node-below-floor), and reserved or malformed claim ids fail before any code runs.
After the factory runs with its options, the returned claim keys must equal the
declared ones unordered, or the package is invalid. All nine maintained packages
declare their claims and the Node floor.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* test(plugins): cover the version 3 contract in the registry and store suites
Update the existing suites to the contributes shape and add: a version 2 factory
and a version 2 metadata package both get incompatible-plugin-api; a metadata /
factory claim mismatch invalidates the package; cross-package duplicates keep the
first claim and fail the loser; a multi-kind package activates its replay claim
when its provider setup fails; the replay-only scope sets up no provider claim;
close runs activated claims in reverse activation order with per-step outcomes.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* docs(plugins): show the version 3 authoring shape
The plugins guide now documents contributes with per-kind contributions, the
agent-device package.json field with static claim keys, the engines Node floor,
the replay-execution ad kind, and the incompatible-plugin-api outcome for
version 2 packages.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): apply oxfmt to the version 3 contract files
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* fix(plugins): keep provider plugin declarations in the provider branch
AgentDevicePlugin gains a defaulted contribution generic so provider
packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their
packed .d.mts then inline only the provider branch and stay assignable to
the host's AgentDevicePlugin despite the replay branches' unique-symbol
brands. Update the aws smoke fixture to the v3 contributes shape.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): merge duplicate plugin type imports in provider tests
* chore(gates): resolve Fallow findings for plugin contract v3
Repair the dead-code, complexity, and duplication findings the 0.22
plugin contract v3 change introduced, without suppressions or baselines.
- make module-private helpers non-exported (`incompatiblePluginApi`,
`nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the
`Contribution` type re-export)
- extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim`
from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`,
`resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and
`assertStoreSelectionCurrent` from the registration and replay paths
- share the hosted App Automate connection resolution and validation in
`@agent-device/provider-webdriver/plugin` as lazy loaders, so the
BrowserStack and TestMu entries call one owner without importing the
WebDriver runtime at plugin load time
* fix(plugins): keep the published contract types single-sourced
Contract v3 made `Contribution` name the host, format-backend and
native-execution declarations, so those declarations started splitting
across two published chunks. TypeScript then saw two unrelated types with
the same name, and a consumer could not pass a plugin from one public
entry into another entry's function.
- pin the plugin contract and the contract declarations it names into the
shared `sdk-replay-backend.d` declaration chunk
- type `startAgentDevice` `plugins` through the contract package with the
WebDriver options the host composes, so the SDK index no longer pulls
the `./plugins` entry into a shared chunk whose exports get mangled
- declare the Replay plugin's published types against
`agent-device/plugins`, as the Maestro entry already does
- write the integration fixtures' plugin objects in contract v3, including
the typed `incompatible-plugin-api` reason the host now reports
* refactor(plugins): one typed claim record and honest declared claims
Addresses the review on #4784.
- install: copy the `agent-device` claim block and `engines` into non-source
package.json, with a non-source install test
- claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry
keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims,
and one metadata spelling exists per claim
- reuse compareVersions from @agent-device/host-kit/version
- Limrun exports its connection; webdriver no longer carries the shared
HostedConnection loader shim
- docs: plugins guide, replay README, ADR 0012, ADR 0034 and the
incompatible-plugin-api hint match the contract
* fix(plugins): a failed candidate keeps answering the replay selection
An embedder plugin carries no package metadata, so nothing names its claims
before the factory runs. When its validation failed, resolution found no claim
and reported the engine as absent. A selected package keeps its own load,
compatibility or setup reason: a store package answers for the name the caller
selected, and a candidate the embedding host supplied answers because no name
can exclude it.
* fix(plugins): name a failed load's claims through the claim table
A candidate that fails before its contributions are readable still has to say
what it was meant to provide: the inventory names it, and the selection that
asked for that claim resolves to its reason. The id is read through the same
CLAIM_KINDS table the validated readers use, so no second reader exists, and a
slot whose package metadata already declared its claims is left as it was.
* fix(plugins): tear down claims concurrently and keep duplicate reasons
Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError.
* fix(plugins): name version 2 replay claims and pin concurrent teardown
A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves.
---------
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): declare contract version 3 with per-kind contributions
AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with
provider, replay-backend and replay-execution kinds. The registry validates the whole
declaration, expands it into per-claim records, and reserves claim spaces in candidate
order. All nine maintained plugins wrap their factories in contributes. No shim: a
version 2 result gets the typed incompatible-plugin-api outcome.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): read static claims from package metadata before import
The store reads package.json agent-device { apiVersion, provider?, replayBackend?,
replayExecution? }: a version other than 3 fails pre-import with the typed
incompatible-plugin-api reason, engines.node establishes the Node floor
(node-below-floor), and reserved or malformed claim ids fail before any code runs.
After the factory runs with its options, the returned claim keys must equal the
declared ones unordered, or the package is invalid. All nine maintained packages
declare their claims and the Node floor.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* test(plugins): cover the version 3 contract in the registry and store suites
Update the existing suites to the contributes shape and add: a version 2 factory
and a version 2 metadata package both get incompatible-plugin-api; a metadata /
factory claim mismatch invalidates the package; cross-package duplicates keep the
first claim and fail the loser; a multi-kind package activates its replay claim
when its provider setup fails; the replay-only scope sets up no provider claim;
close runs activated claims in reverse activation order with per-step outcomes.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* docs(plugins): show the version 3 authoring shape
The plugins guide now documents contributes with per-kind contributions, the
agent-device package.json field with static claim keys, the engines Node floor,
the replay-execution ad kind, and the incompatible-plugin-api outcome for
version 2 packages.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): apply oxfmt to the version 3 contract files
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* fix(plugins): keep provider plugin declarations in the provider branch
AgentDevicePlugin gains a defaulted contribution generic so provider
packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their
packed .d.mts then inline only the provider branch and stay assignable to
the host's AgentDevicePlugin despite the replay branches' unique-symbol
brands. Update the aws smoke fixture to the v3 contributes shape.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): merge duplicate plugin type imports in provider tests
* chore(gates): resolve Fallow findings for plugin contract v3
Repair the dead-code, complexity, and duplication findings the 0.22
plugin contract v3 change introduced, without suppressions or baselines.
- make module-private helpers non-exported (`incompatiblePluginApi`,
`nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the
`Contribution` type re-export)
- extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim`
from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`,
`resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and
`assertStoreSelectionCurrent` from the registration and replay paths
- share the hosted App Automate connection resolution and validation in
`@agent-device/provider-webdriver/plugin` as lazy loaders, so the
BrowserStack and TestMu entries call one owner without importing the
WebDriver runtime at plugin load time
* fix(plugins): keep the published contract types single-sourced
Contract v3 made `Contribution` name the host, format-backend and
native-execution declarations, so those declarations started splitting
across two published chunks. TypeScript then saw two unrelated types with
the same name, and a consumer could not pass a plugin from one public
entry into another entry's function.
- pin the plugin contract and the contract declarations it names into the
shared `sdk-replay-backend.d` declaration chunk
- type `startAgentDevice` `plugins` through the contract package with the
WebDriver options the host composes, so the SDK index no longer pulls
the `./plugins` entry into a shared chunk whose exports get mangled
- declare the Replay plugin's published types against
`agent-device/plugins`, as the Maestro entry already does
- write the integration fixtures' plugin objects in contract v3, including
the typed `incompatible-plugin-api` reason the host now reports
* refactor(plugins): one typed claim record and honest declared claims
Addresses the review on #4784.
- install: copy the `agent-device` claim block and `engines` into non-source
package.json, with a non-source install test
- claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry
keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims,
and one metadata spelling exists per claim
- reuse compareVersions from @agent-device/host-kit/version
- Limrun exports its connection; webdriver no longer carries the shared
HostedConnection loader shim
- docs: plugins guide, replay README, ADR 0012, ADR 0034 and the
incompatible-plugin-api hint match the contract
* fix(plugins): a failed candidate keeps answering the replay selection
An embedder plugin carries no package metadata, so nothing names its claims
before the factory runs. When its validation failed, resolution found no claim
and reported the engine as absent. A selected package keeps its own load,
compatibility or setup reason: a store package answers for the name the caller
selected, and a candidate the embedding host supplied answers because no name
can exclude it.
* fix(plugins): name a failed load's claims through the claim table
A candidate that fails before its contributions are readable still has to say
what it was meant to provide: the inventory names it, and the selection that
asked for that claim resolves to its reason. The id is read through the same
CLAIM_KINDS table the validated readers use, so no second reader exists, and a
slot whose package metadata already declared its claims is left as it was.
* fix(plugins): tear down claims concurrently and keep duplicate reasons
Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError.
* fix(plugins): name version 2 replay claims and pin concurrent teardown
A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves.
---------
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): declare contract version 3 with per-kind contributions
AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with
provider, replay-backend and replay-execution kinds. The registry validates the whole
declaration, expands it into per-claim records, and reserves claim spaces in candidate
order. All nine maintained plugins wrap their factories in contributes. No shim: a
version 2 result gets the typed incompatible-plugin-api outcome.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): read static claims from package metadata before import
The store reads package.json agent-device { apiVersion, provider?, replayBackend?,
replayExecution? }: a version other than 3 fails pre-import with the typed
incompatible-plugin-api reason, engines.node establishes the Node floor
(node-below-floor), and reserved or malformed claim ids fail before any code runs.
After the factory runs with its options, the returned claim keys must equal the
declared ones unordered, or the package is invalid. All nine maintained packages
declare their claims and the Node floor.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* test(plugins): cover the version 3 contract in the registry and store suites
Update the existing suites to the contributes shape and add: a version 2 factory
and a version 2 metadata package both get incompatible-plugin-api; a metadata /
factory claim mismatch invalidates the package; cross-package duplicates keep the
first claim and fail the loser; a multi-kind package activates its replay claim
when its provider setup fails; the replay-only scope sets up no provider claim;
close runs activated claims in reverse activation order with per-step outcomes.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* docs(plugins): show the version 3 authoring shape
The plugins guide now documents contributes with per-kind contributions, the
agent-device package.json field with static claim keys, the engines Node floor,
the replay-execution ad kind, and the incompatible-plugin-api outcome for
version 2 packages.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): apply oxfmt to the version 3 contract files
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* fix(plugins): keep provider plugin declarations in the provider branch
AgentDevicePlugin gains a defaulted contribution generic so provider
packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their
packed .d.mts then inline only the provider branch and stay assignable to
the host's AgentDevicePlugin despite the replay branches' unique-symbol
brands. Update the aws smoke fixture to the v3 contributes shape.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): merge duplicate plugin type imports in provider tests
* chore(gates): resolve Fallow findings for plugin contract v3
Repair the dead-code, complexity, and duplication findings the 0.22
plugin contract v3 change introduced, without suppressions or baselines.
- make module-private helpers non-exported (`incompatiblePluginApi`,
`nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the
`Contribution` type re-export)
- extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim`
from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`,
`resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and
`assertStoreSelectionCurrent` from the registration and replay paths
- share the hosted App Automate connection resolution and validation in
`@agent-device/provider-webdriver/plugin` as lazy loaders, so the
BrowserStack and TestMu entries call one owner without importing the
WebDriver runtime at plugin load time
* fix(plugins): keep the published contract types single-sourced
Contract v3 made `Contribution` name the host, format-backend and
native-execution declarations, so those declarations started splitting
across two published chunks. TypeScript then saw two unrelated types with
the same name, and a consumer could not pass a plugin from one public
entry into another entry's function.
- pin the plugin contract and the contract declarations it names into the
shared `sdk-replay-backend.d` declaration chunk
- type `startAgentDevice` `plugins` through the contract package with the
WebDriver options the host composes, so the SDK index no longer pulls
the `./plugins` entry into a shared chunk whose exports get mangled
- declare the Replay plugin's published types against
`agent-device/plugins`, as the Maestro entry already does
- write the integration fixtures' plugin objects in contract v3, including
the typed `incompatible-plugin-api` reason the host now reports
* refactor(plugins): one typed claim record and honest declared claims
Addresses the review on #4784.
- install: copy the `agent-device` claim block and `engines` into non-source
package.json, with a non-source install test
- claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry
keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims,
and one metadata spelling exists per claim
- reuse compareVersions from @agent-device/host-kit/version
- Limrun exports its connection; webdriver no longer carries the shared
HostedConnection loader shim
- docs: plugins guide, replay README, ADR 0012, ADR 0034 and the
incompatible-plugin-api hint match the contract
* fix(plugins): a failed candidate keeps answering the replay selection
An embedder plugin carries no package metadata, so nothing names its claims
before the factory runs. When its validation failed, resolution found no claim
and reported the engine as absent. A selected package keeps its own load,
compatibility or setup reason: a store package answers for the name the caller
selected, and a candidate the embedding host supplied answers because no name
can exclude it.
* fix(plugins): name a failed load's claims through the claim table
A candidate that fails before its contributions are readable still has to say
what it was meant to provide: the inventory names it, and the selection that
asked for that claim resolves to its reason. The id is read through the same
CLAIM_KINDS table the validated readers use, so no second reader exists, and a
slot whose package metadata already declared its claims is left as it was.
* fix(plugins): tear down claims concurrently and keep duplicate reasons
Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError.
* fix(plugins): name version 2 replay claims and pin concurrent teardown
A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves.
---------
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
) * refactor(plugins): declare contract version 3 with per-kind contributions AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with provider, replay-backend and replay-execution kinds. The registry validates the whole declaration, expands it into per-claim records, and reserves claim spaces in candidate order. All nine maintained plugins wrap their factories in contributes. No shim: a version 2 result gets the typed incompatible-plugin-api outcome. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * refactor(plugins): read static claims from package metadata before import The store reads package.json agent-device { apiVersion, provider?, replayBackend?, replayExecution? }: a version other than 3 fails pre-import with the typed incompatible-plugin-api reason, engines.node establishes the Node floor (node-below-floor), and reserved or malformed claim ids fail before any code runs. After the factory runs with its options, the returned claim keys must equal the declared ones unordered, or the package is invalid. All nine maintained packages declare their claims and the Node floor. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * test(plugins): cover the version 3 contract in the registry and store suites Update the existing suites to the contributes shape and add: a version 2 factory and a version 2 metadata package both get incompatible-plugin-api; a metadata / factory claim mismatch invalidates the package; cross-package duplicates keep the first claim and fail the loser; a multi-kind package activates its replay claim when its provider setup fails; the replay-only scope sets up no provider claim; close runs activated claims in reverse activation order with per-step outcomes. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * docs(plugins): show the version 3 authoring shape The plugins guide now documents contributes with per-kind contributions, the agent-device package.json field with static claim keys, the engines Node floor, the replay-execution ad kind, and the incompatible-plugin-api outcome for version 2 packages. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * style(plugins): apply oxfmt to the version 3 contract files Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * fix(plugins): keep provider plugin declarations in the provider branch AgentDevicePlugin gains a defaulted contribution generic so provider packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their packed .d.mts then inline only the provider branch and stay assignable to the host's AgentDevicePlugin despite the replay branches' unique-symbol brands. Update the aws smoke fixture to the v3 contributes shape. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * style(plugins): merge duplicate plugin type imports in provider tests * chore(gates): resolve Fallow findings for plugin contract v3 Repair the dead-code, complexity, and duplication findings the 0.22 plugin contract v3 change introduced, without suppressions or baselines. - make module-private helpers non-exported (`incompatiblePluginApi`, `nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the `Contribution` type re-export) - extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim` from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`, `resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and `assertStoreSelectionCurrent` from the registration and replay paths - share the hosted App Automate connection resolution and validation in `@agent-device/provider-webdriver/plugin` as lazy loaders, so the BrowserStack and TestMu entries call one owner without importing the WebDriver runtime at plugin load time * fix(plugins): keep the published contract types single-sourced Contract v3 made `Contribution` name the host, format-backend and native-execution declarations, so those declarations started splitting across two published chunks. TypeScript then saw two unrelated types with the same name, and a consumer could not pass a plugin from one public entry into another entry's function. - pin the plugin contract and the contract declarations it names into the shared `sdk-replay-backend.d` declaration chunk - type `startAgentDevice` `plugins` through the contract package with the WebDriver options the host composes, so the SDK index no longer pulls the `./plugins` entry into a shared chunk whose exports get mangled - declare the Replay plugin's published types against `agent-device/plugins`, as the Maestro entry already does - write the integration fixtures' plugin objects in contract v3, including the typed `incompatible-plugin-api` reason the host now reports * refactor(plugins): one typed claim record and honest declared claims Addresses the review on callstack#4784. - install: copy the `agent-device` claim block and `engines` into non-source package.json, with a non-source install test - claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims, and one metadata spelling exists per claim - reuse compareVersions from @agent-device/host-kit/version - Limrun exports its connection; webdriver no longer carries the shared HostedConnection loader shim - docs: plugins guide, replay README, ADR 0012, ADR 0034 and the incompatible-plugin-api hint match the contract * fix(plugins): a failed candidate keeps answering the replay selection An embedder plugin carries no package metadata, so nothing names its claims before the factory runs. When its validation failed, resolution found no claim and reported the engine as absent. A selected package keeps its own load, compatibility or setup reason: a store package answers for the name the caller selected, and a candidate the embedding host supplied answers because no name can exclude it. * fix(plugins): name a failed load's claims through the claim table A candidate that fails before its contributions are readable still has to say what it was meant to provide: the inventory names it, and the selection that asked for that claim resolves to its reason. The id is read through the same CLAIM_KINDS table the validated readers use, so no second reader exists, and a slot whose package metadata already declared its claims is left as it was. * fix(plugins): tear down claims concurrently and keep duplicate reasons Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError. * fix(plugins): name version 2 replay claims and pin concurrent teardown A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves. --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): declare contract version 3 with per-kind contributions
AgentDevicePlugin is now { apiVersion: 3, contributes: [Contribution, ...] } with
provider, replay-backend and replay-execution kinds. The registry validates the whole
declaration, expands it into per-claim records, and reserves claim spaces in candidate
order. All nine maintained plugins wrap their factories in contributes. No shim: a
version 2 result gets the typed incompatible-plugin-api outcome.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* refactor(plugins): read static claims from package metadata before import
The store reads package.json agent-device { apiVersion, provider?, replayBackend?,
replayExecution? }: a version other than 3 fails pre-import with the typed
incompatible-plugin-api reason, engines.node establishes the Node floor
(node-below-floor), and reserved or malformed claim ids fail before any code runs.
After the factory runs with its options, the returned claim keys must equal the
declared ones unordered, or the package is invalid. All nine maintained packages
declare their claims and the Node floor.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* test(plugins): cover the version 3 contract in the registry and store suites
Update the existing suites to the contributes shape and add: a version 2 factory
and a version 2 metadata package both get incompatible-plugin-api; a metadata /
factory claim mismatch invalidates the package; cross-package duplicates keep the
first claim and fail the loser; a multi-kind package activates its replay claim
when its provider setup fails; the replay-only scope sets up no provider claim;
close runs activated claims in reverse activation order with per-step outcomes.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* docs(plugins): show the version 3 authoring shape
The plugins guide now documents contributes with per-kind contributions, the
agent-device package.json field with static claim keys, the engines Node floor,
the replay-execution ad kind, and the incompatible-plugin-api outcome for
version 2 packages.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): apply oxfmt to the version 3 contract files
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* fix(plugins): keep provider plugin declarations in the provider branch
AgentDevicePlugin gains a defaulted contribution generic so provider
packages can declare ProviderOnlyPlugin/ProviderAgentDevicePlugin; their
packed .d.mts then inline only the provider branch and stay assignable to
the host's AgentDevicePlugin despite the replay branches' unique-symbol
brands. Update the aws smoke fixture to the v3 contributes shape.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* style(plugins): merge duplicate plugin type imports in provider tests
* chore(gates): resolve Fallow findings for plugin contract v3
Repair the dead-code, complexity, and duplication findings the 0.22
plugin contract v3 change introduced, without suppressions or baselines.
- make module-private helpers non-exported (`incompatiblePluginApi`,
`nodeRangeFloor`), and drop unused exported helpers (`claimKeysOf`, the
`Contribution` type re-export)
- extract `providerClaim`, `replayBackendClaim`, and `replayExecutionClaim`
from `readAgentDeviceClaims`, and `setUpClaims`, `setUpClaim`,
`resolveRegisteredReplayExecution`, `failedLoadClaimFor`, and
`assertStoreSelectionCurrent` from the registration and replay paths
- share the hosted App Automate connection resolution and validation in
`@agent-device/provider-webdriver/plugin` as lazy loaders, so the
BrowserStack and TestMu entries call one owner without importing the
WebDriver runtime at plugin load time
* fix(plugins): keep the published contract types single-sourced
Contract v3 made `Contribution` name the host, format-backend and
native-execution declarations, so those declarations started splitting
across two published chunks. TypeScript then saw two unrelated types with
the same name, and a consumer could not pass a plugin from one public
entry into another entry's function.
- pin the plugin contract and the contract declarations it names into the
shared `sdk-replay-backend.d` declaration chunk
- type `startAgentDevice` `plugins` through the contract package with the
WebDriver options the host composes, so the SDK index no longer pulls
the `./plugins` entry into a shared chunk whose exports get mangled
- declare the Replay plugin's published types against
`agent-device/plugins`, as the Maestro entry already does
- write the integration fixtures' plugin objects in contract v3, including
the typed `incompatible-plugin-api` reason the host now reports
* refactor(plugins): one typed claim record and honest declared claims
Addresses the review on #4784.
- install: copy the `agent-device` claim block and `engines` into non-source
package.json, with a non-source install test
- claims: one CLAIM_KINDS record returns typed { kind, id } claims; the registry
keeps one Map<kind, Set<id>>; a failed slot reserves exactly declaredClaims,
and one metadata spelling exists per claim
- reuse compareVersions from @agent-device/host-kit/version
- Limrun exports its connection; webdriver no longer carries the shared
HostedConnection loader shim
- docs: plugins guide, replay README, ADR 0012, ADR 0034 and the
incompatible-plugin-api hint match the contract
* fix(plugins): a failed candidate keeps answering the replay selection
An embedder plugin carries no package metadata, so nothing names its claims
before the factory runs. When its validation failed, resolution found no claim
and reported the engine as absent. A selected package keeps its own load,
compatibility or setup reason: a store package answers for the name the caller
selected, and a candidate the embedding host supplied answers because no name
can exclude it.
* fix(plugins): name a failed load's claims through the claim table
A candidate that fails before its contributions are readable still has to say
what it was meant to provide: the inventory names it, and the selection that
asked for that claim resolves to its reason. The id is read through the same
CLAIM_KINDS table the validated readers use, so no second reader exists, and a
slot whose package metadata already declared its claims is left as it was.
* fix(plugins): tear down claims concurrently and keep duplicate reasons
Close starts teardowns in reverse activation order and runs them concurrently, so one hanging disposer no longer stalls the rest; each runtime still shuts down before its disposer. A claim that failed its reservation keeps that reason when its factory also fails. The migration guide says replay setup now receives only clientVersion and createError.
* fix(plugins): name version 2 replay claims and pin concurrent teardown
A refused version 2 replay or Maestro value ({ kind: 'replay-backend', backend }) names its claim again, so its selection answers incompatible-plugin-api instead of plugin-not-installed. The teardown test hangs the claim that closes first, so it fails against a serial loop. The migration guide says where replay host-command work moves.
---------
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
Summary
The 0.22 plugin contract changes once to version 3 (ADR 0034, #3311, #4591). A plugin factory now returns
apiVersion: 3plus acontributeslist of independently activated claims —provider,replay-backend,replay-execution. Each claim key is declared statically in the package'sagent-devicemetadata, validated before import, and matched against the factory result after it runs; the registry keeps one record, setup outcome and cleanup entry per claim. Nine plugin packages migrated. Version 2 packages, including the external@nomac/agent-device, get a typedincompatible-plugin-apioutcome with no compatibility shim. Aplatformkind lands with #4597, not here.92 files, +2489/−1202 gross. No scope expansion beyond the contract, the nine plugins, their tests and docs, plus two packaging fixes the widened contract exposed: the contract declarations now share one published chunk with the replay contracts, and
@agent-device/replaytypes its published declarations againstagent-device/pluginsas Maestro already does.Validation
Head
38fe33365a, base6534ef3869.pnpm check:affected --run --base origin/0.22 --head 38fe33365a— passed,exactCommit: true; 42 checks passed, 28 skipped as GitHub-authoritative; 22,123 tests passed, 0 failed. Selection stayed full.pnpm exec fallow audit --base origin/0.22— no issues in the changed files, no suppressions or baseline edits.pnpm run check:package— Maestro and replay package-smoke pass, including the embedded-runtime failure-isolation cases and the managedplugins addroute.pnpm exec vitest run scripts/__tests__/eager-closure-budgets.test.ts— no plugin entry gains an eager module.CI owns full coverage, native builds, device lanes and provider integration. No device run beyond what CI does.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.