Repository navigation
Make the Claude Code provider plugin forkable - #4202
Merged
SawyerHood merged 1 commit intoSep 23, 2026
Merged
Conversation
SawyerHood
force-pushed
the
bb/forkable-20-provider-claude-code
branch
from
September 23, 2026 17:53
9cfacbd to
706bb72
Compare
SawyerHood
force-pushed
the
bb/forkable-20-provider-claude-code
branch
2 times, most recently
from
September 23, 2026 20:40
5ed08a1 to
625f459
Compare
SawyerHood
marked this pull request as ready for review
September 23, 2026 21:07
SawyerHood
force-pushed
the
bb/forkable-20-provider-claude-code
branch
from
September 23, 2026 21:31
625f459 to
7b34db3
Compare
The plugin's source already used only the public SDK, but a copy failed to typecheck and test: - Tests imported @bb/domain and @bb/provider-bridge-protocol for vocabulary the SDK publishes: ThreadEvent and its item types from /provider-bridge/testing; PromptInput, JsonValue, RuntimePermissionPolicy, the interaction types and BRIDGE_INBOUND_REQUEST_METHODS from /provider-bridge. The threadScope and turnScope helpers move into the delta test harness. - The recorded-conformance test replays the recordings committed under packages/provider-bridge-protocol through that package's worker entry, neither of which a copy has. It moves to @bb/provider-parity, whose test task already takes the provider plugins' sources as inputs. - The vitest config imported the repository's vitest.shared.ts. It now uses defineConfig directly, and the test task depends on the SDK build. - The fork installs without npm's peer resolution, so the plugin declares what its tests and types load: better-sqlite3, cron-parser, and hono for the fake plugin host, and @anthropic-ai/sdk, the Agent SDK's type-only peer. docs/provider-bridge-protocol.md says where the recorded-conformance tests live now. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SawyerHood
force-pushed
the
bb/forkable-20-provider-claude-code
branch
from
September 23, 2026 22:10
7b34db3 to
3a5d62c
Compare
SawyerHood
added a commit
that referenced
this pull request
Sep 23, 2026
## Human comments ## What was wrong Last of four agent-provider PRs in the forkable built-ins stack; it builds on #4202. `plugins/provider-codex`'s source already used only the public SDK. A copy still failed: - Tests imported `@bb/domain` and `@bb/provider-bridge-protocol`. Most of that vocabulary the SDK publishes; three helpers it doesn't, nor the protocol's `interactionRequestParamsSchema`, which the calibration test parsed every approval request with. - The recorded-conformance test needs the repository's recordings. - The vitest config used `vitest.shared.ts`. - The fake app server had 34 code comments. ## What changed - **Imports:** tests use the public SDK. The scope helpers and the standalone `/compact` prompt become test-local. - **Calibration test:** it still parses every approval request with the full interaction-request schema, now built from the payload schemas `@get-bb/plugin-sdk/provider-bridge` publishes. - **Recorded conformance:** the test moves to `@bb/provider-parity`, beside Claude Code's, and `docs/provider-bridge-protocol.md` says Codex's replay lives there too. - **Config:** `defineConfig`, declared test peers, a lint script, and turbo entries. The fake app server's comments are removed. ## How you verified - `pnpm exec turbo run typecheck test lint --filter=bb-plugin-provider-codex`. - `pnpm check:plugin-forks plugins/provider-codex` passes in a copy. - `@bb/provider-parity`, `@bb/scripts`, and `bb-plugin-plugin-api-docs` tests; `@bb/app` typecheck. - **Calibration schema:** its JSON Schema is deep-equal to the protocol's `interactionRequestParamsSchema`. Deleting `providerThreadId` from the bridge's interaction-request send fails the test with a ZodError; a version that parsed only the one command approval it checks passed with that mutation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Third of four agent-provider PRs in the forkable built-ins stack; it builds on #4201.
plugins/provider-claude-code's source already used only the public SDK, but a copy failed to typecheck and test:@bb/domainand@bb/provider-bridge-protocolfor vocabulary the SDK already publishes.packages/provider-bridge-protocolthrough that package's worker entry, neither of which a copy has.vitest.shared.ts.@anthropic-ai/sdkis a type-only peer of the Agent SDK, and the fork installs without peers.What changed
@get-bb/plugin-sdk/provider-bridgeand/provider-bridge/testing, includingBRIDGE_JSON_RPC_ERRORS, which a bridge test added on main imported from@bb/provider-bridge-protocol.threadScopeandturnScopemove into the delta test harness.@bb/provider-parity, whose test task already takes the provider plugins' sources as inputs.docs/provider-bridge-protocol.mdsays Claude Code's replay lives there too.defineConfig, a test entry that depends on the SDK build, declared test peers plus@anthropic-ai/sdk, and a lint script. The workspace dev dependencies are gone.How you verified
pnpm exec turbo run typecheck test lint --filter=bb-plugin-provider-claude-code.pnpm check:plugin-forks plugins/provider-claude-codepasses in a copy.@bb/provider-paritytests, including the moved conformance cases;@bb/scripts,bb-plugin-plugin-api-docs, and@bb/apptypecheck.🤖 Generated with Claude Code