Skip to content

feat(plugins): plugin contract v2 and one provider registry - #3767

Open
thymikee wants to merge 1 commit into
mainfrom
feat/plugin-registry-v2
Open

thymikee wants to merge 1 commit into
mainfrom
feat/plugin-registry-v2

Conversation

@thymikee

@thymikee thymikee commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Part 1 of 4 of #3755 (umbrella #3747). Blocked by #3748: do not merge before it.

One plugin contract and one provider registry. Built-in providers, store plugins and (later) embedder plugins register through the same shape, in that order.

  • agent-device/plugins exports the type-only v2 contract: AgentDevicePluginFactory, { apiVersion: 2, provider, credentials, connection?, setup(host) }. { webDriver } stays a data descriptor.
  • A package's ./agent-device export is resolved with import conditions. The root export is used only when that subpath is absent. A throwing subpath never falls back.
  • v1 packages load through an adapter, dispatched by manifest before any factory runs.
  • A plugin that fails to load, validate or set up is recorded and skipped. The first registration of a provider id claims it; later ones fail with duplicate_provider. cloud and proxy stay reserved.
  • The inventory (active/failed, typed error.reason, credentials with byBackend) is published in daemon.json. The client fingerprint reads variable names from it and falls back to v1 manifests.
  • Retires RESERVED_PLUGIN_PROVIDERS and DEFAULT_PROVIDER_RUNTIME_REQUIRED_IDS; their consumers (provider policy, fingerprint, connect capabilities, daemon composition) move in this PR.
  • A v2 plugin declares connect capabilities in code, so the client loads the store (factories only, no setup) before reading them.

Also: a Limrun fingerprint now hashes untrimmed values, like the other providers. 59 files; ~3k gross lines, mostly the replaced loader and its tests.

Stack: this → feat/plugin-registry-v2-status (daemon status) → docs/ADR 0034 → @agent-device/testmu.

Validation

pnpm check:affected --run --head f8555c9010 (the stack top, which contains this layer): passed (exactCommit). Packed-types consumer type-check added to the installed-package test. CI owns integration, coverage and device lanes.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.32 MB 5.35 MB +26.2 kB
Package (unpacked) 5.32 MB 5.35 MB +26.2 kB
Package (download) 1.60 MB 1.61 MB +8.3 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.2 ms 27.2 ms +0.0 ms
CLI --help 79.8 ms 79.5 ms -0.3 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 59 files

You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread test/integration/provider-scenarios/harness.ts
Comment thread src/__tests__/provider-device-runtimes.test.ts Outdated
Comment thread packages/plugins/src/manifest.ts
Comment thread packages/plugins/src/store.ts
Comment thread packages/plugins/src/validate.ts Outdated
Comment thread packages/plugins/src/load.test.ts Outdated
Comment thread packages/plugins/src/legacy.ts Outdated
Comment thread src/__tests__/test-utils/builtin-plugin-inventory.ts
Comment thread src/provider-credential-fingerprint.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 16 files (changes from recent commits).

You’re at about 93% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/plugins/src/registry.ts Outdated
Comment thread packages/plugins/src/load.ts
@thymikee
thymikee force-pushed the feat/plugin-registry-v2 branch from 2f64746 to deae993 Compare October 16, 2026 22:35
Comment thread packages/plugins/src/load.test.ts Fixed

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files (changes from recent commits).

You’re at about 93% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/plugins/src/store.ts Outdated
@thymikee
thymikee force-pushed the feat/plugin-registry-v2 branch from deae993 to 447eb9e Compare October 16, 2026 23:02
Comment thread packages/plugins/src/load.test.ts Fixed

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 13 reviewed files. 1 file intentionally excluded from review.

You’re at about 94% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/provider-plugin-policy.ts Outdated
Built-in providers, the plugin store and an embedder now register through
one registry in one shape. A plugin that fails to load, validate or set up
is recorded in a daemon inventory and no longer stops the daemon.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-3767/

Built to branch gh-pages at 2026-10-16 23:19 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants