Commit e42a4ef
Provider plugins: one API for Codex, Claude Code, pi, and ACP agents (#2325)
## What was wrong
Providers (Codex, Claude Code, pi, and every ACP agent) were wired into
core with per-provider carve-outs: a provider table and
provider-specific skill/command scanning in the daemon,
provider-specific recovery regexes and session branches in the runtime,
provider-id branches in the server and clients, and a narrower ACP-only
path for third-party agents. Adding or changing a provider meant
touching core in many places.
## What changed
Providers are plugins behind one API with zero first-party privilege:
the built-in providers use the same `bb.providers.register` declaration,
bridge protocol, and SDK a third party uses.
- Bridge protocol v3: items carry a declarative `presentation` (label,
glyph, tint, detail); web renders from it, plugins may add React
renderers for their own kinds, mobile renders the declarative base.
- `bb.providers.register` declares strings, icon, models, reasoning
levels, service tiers, permission modes, native skill/command roots,
maintenance, and AI services; one `ProviderInfo` shape everywhere.
- Interactions: closed approvals with `toolUse`, open plugin-defined
requests, one lifecycle event; the server stays the policy owner.
- Runtime and daemon: typed recovery hints replace regexes; one bridge
process per provider artifact with per-thread lanes; the daemon scans
declared roots only and resolves host-only roots through
`resolveNativeRoots`; the ACP tier is deleted and the ACP plugin owns
its agents through a published ACP bridge kit.
- pi moves from a built-in runtime to a plugin over `pi --mode rpc` with
an install gate.
- Plugin icons: `bb.branding.experimental_icons` (name → SVG),
namespaced glyphs, strict SVG validation, `nosniff` + CSP; `bb plugin
build` checks logos for script vectors.
- Stabilization: `experimental_` dropped where audited; provider-literal
ratchet 209 → 18 allowlisted references; cross-plugin duplicates folded
into `experimental_` SDK helpers; eleven published `provider-bridge`
exports kept under "Scheduled removals".
- Wire: `HOST_DAEMON_PROTOCOL_VERSION` 153 → 164; `@get-bb/plugin-sdk`
0.4.16; `bb plugin build` inlines SDK subpaths so packaged installs load
provider plugins.
- Older mobile builds are not supported (the app ships with the server):
the timeline wire serves grammar v3 only — no capability header, no
`activityIntents` on tool rows, no `ProviderInfo` maintenance aliases.
- Docs: `docs/provider-plugin-api.md`, `docs/api_to_audit.md`, the
plugin-authoring skill, the bb guide, CLI surfaces.
Built as reviewed layers and squashed into one commit, then
adversarially reviewed (51 findings; every confirmed one fixed with a
failing-first test and an independent re-check — the commit message
lists them).
## How you verified
- Typecheck 76/76; full test sweep; CI build + lint; `smoke:tarball`;
SDK version guards.
- Parity harness: 39 recorded bridge cells replayed through the
pre-migration main and this branch, zero diffs outside the named
allowlist.
- Provider corpus: 340 real threads / 94,365 rows, every changed row in
a named class, 0 unclassified.
- Permission matrix 134 cells identical; native-roots goldens 22/22;
every bridge's conformance kit green; real-provider integration suite
(Codex, Claude Code, pi, ACP agents) 64 tests.
- Live QA: Codex, Claude Code, Cursor and grok (ACP), the echo example
plugin, and pi each ran a tool turn.
> AGENT GENERATED: by Claude Opus 5
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5205d98 commit e42a4ef
884 files changed
Lines changed: 77701 additions & 30181 deletions
File tree
- apps
- app
- .ladle
- src
- components
- code
- dialogs
- icons
- pickers
- plugin
- management
- promptbox
- settings
- sidebar
- thread
- embedded-chat
- pending-interactions
- timeline
- rows
- tools
- ui
- hooks
- mutations
- queries
- thread-creation-options
- lib
- test
- fixtures
- views
- thread-detail
- cli/src
- __tests__
- command-output
- helpers
- commands
- thread
- demo-server/src
- fixtures
- desktop/test
- host-daemon
- scripts
- src
- command-handlers
- test/command
- mobile
- e2e/flows
- src
- data
- compose
- interactions
- plugins
- settings
- test
- screens
- dev
- pickers
- plugins
- thread
- interactions
- timeline
- host
- renderers
- work
- types
- server
- src
- internal
- routes
- threads
- services
- ai
- hosts
- interactions
- plugins
- providers
- skills
- builtin-skills
- bb-cli
- bb-plugin-authoring
- system
- threads
- test
- ai
- helpers
- internal
- provider-corpus
- allowlists
- providers
- public
- services
- plugins
- providers
- threads
- system
- threads
- docs
- examples/plugins
- echo-provider
- icons
- recordings/echo-agent/turn-tools
- src
- replacement-lab-alpha
- replacement-lab-beta
- thread-chat-demo
- packages
- agent-runtime
- src
- pi/bridge
- __tests__
- test
- bb-app
- scripts
- fixtures
- src
- client-core/src/timeline
- config
- src
- test
- core-ui
- src
- test
- db
- drizzle
- meta
- src
- data
- test
- domain
- src
- test
- host-daemon-contract
- src
- test
- plugin-build/src
- plugin-registry/r
- plugin-sdk
- scripts
- src
- __tests__
- internal
- testing
- __tests__
- provider-bridge-acp
- src
- bridge
- provider-bridge-protocol
- recordings
- acp-cursor
- approval-allow
- approval-deny
- fork
- steer
- stop-interrupt
- subagent
- turn-tools
- user-question
- web-search
- claude-code/auth-failure
- codex
- archived-resume
- auth-failure
- pi
- compaction
- fork
- model-list
- resume
- steer
- stop-interrupt
- subagent
- turn-tools
- user-question
- web-search
- src
- bridge-kit
- conformance
- contract-tests
- testing
- test
- provider-parity/src
- scripts/test
- sdk
- src
- areas
- test
- server-contract/src
- api
- templates/src/templates
- thread-view
- src
- test
- plans/bb-mobile-research
- plugins
- ask-user-question/src
- connect
- docs
- github
- components
- pdf-preview
- provider-acp
- icons
- src
- bridge
- native-roots
- provider-claude-code
- src
- bridge
- __tests__
- provider-codex
- src
- ai
- bridge
- provider-pi
- src
- __fixtures__/pi
- bridge
- provider-retry
- tasks
- api
- shell
- views
- activity
- detail
- workflows/src
- scripts
- provider-corpus
- tests
- integration
- fake/smoke
- helpers
- native-roots-golden
- goldens
- scripted-echo-provider
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 4 | + | |
10 | 5 | | |
11 | 6 | | |
12 | 7 | | |
13 | | - | |
14 | 8 | | |
15 | 9 | | |
16 | 10 | | |
| |||
28 | 22 | | |
29 | 23 | | |
30 | 24 | | |
| 25 | + | |
31 | 26 | | |
32 | 27 | | |
33 | 28 | | |
| |||
129 | 124 | | |
130 | 125 | | |
131 | 126 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 127 | + | |
145 | 128 | | |
146 | 129 | | |
147 | 130 | | |
148 | 131 | | |
149 | | - | |
| 132 | + | |
150 | 133 | | |
151 | 134 | | |
152 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
206 | | - | |
| 208 | + | |
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| |||
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments