Skip to content

plugin-sdk: let ACP provider plugins register custom dialects instead of vendoring provider-bridge-acp #3418

Description

@rawizhere

I maintain a marketplace provider plugin (bb-plugin-prime-agent-acp) and ended up vendoring provider-bridge-acp.js into it, because there is no way to register a new ACP dialect from the plugin side. I want to check if there's appetite for a small API change that would make that vendoring unnecessary.

Context

Prime Agent publishes concepts ACP v1 has no update kind for — subagent delegation, goals, compaction, harness refinement, agent-to-agent messages — as a namespaced _meta block on session_info_update, plus rich ipython output metadata on tool_call updates. No shipped dialect (generic/cursor/grok/omp/opencode) reads that meta, so without a custom dialect bb shows none of it: no delegation cards, no goal state, no compaction notice.

Why vendoring was the only option

experimental_bridgeOptions.acpDialect takes an id from a fixed list, so registering a dialect means editing two places in a vendored copy of the bridge: the DIALECTS_BY_ID / DIALECT_IDS_BY_COMMAND maps, and the session_info_update switch — which in turn needs translator internals (closeThoughtStream, closeAssistantStream, delegationPresentation, noTurnFallbackFor).

My plugin currently ships a ~10.3k-line snapshot of the bridge plus a script (scripts/apply-dialect.py in the repo, if you want to see the shape of it) that re-applies the dialect patch after every SDK bump and fails loudly when the anchors move. It works, but it's a snapshot, not a dependency: bridge fixes in new SDK releases don't reach plugin users until someone remembers to re-vendor, and every release risks breaking the patch anchors.

Proposal

Let acpDialect accept a dialect object (same shape as the built-ins) in addition to an id. Two things would make this actually usable instead of a trap:

  1. The sessionInfo hook needs a sanctioned way to produce the deltas the built-in path produces: item.open/item.close (including delegation items), extension.state, context.compacted, with the thought/assistant streams closed around it. Either export the translator helpers, or — probably cleaner — have the hook return plain-data actions and let the bridge do the delta translation. The latter is how my vendored version already works, so the action protocol is proven in a shipping plugin.
  2. The sessionNew (session/new response _meta), toolIdentity (pre-merge tool_call_update._meta), and commandResult (command item post-processing) hooks need to be reachable on a plugin-provided dialect too.

For scale reference: the vendored diff against the SDK copy is ~100 lines of bridge change plus a 470-line dialect file. That's the full surface a plugin-side dialect API would need to cover.

To be explicit about what I'm not asking: shipping the prime-agent dialect itself in the SDK. It's plugin-specific and would couple SDK releases to prime-agent changes. The ask is only the registration mechanism.

Happy to send a PR if the direction sounds reasonable.

Activity

  1. added
    plugins
    provider-acp
    providers
    on Sep 10, 2026
  2. bb-slop-cop commented on Sep 10, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied and verified: Type: Feature · Priority: Medium · Effort: High. Labels: plugins, providers, provider-acp. No existing classification values needed preservation.

    This requests a new public plugin extension contract. A workaround exists, but the API and translator behavior require design. No reproduction report or PR: this is a feature request, so the bug-only steps were skipped.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginsprovider-acpproviders

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions