Skip to content

Make the ACP providers plugin forkable - #4200

Merged
SawyerHood merged 1 commit into
bb/forkable-17-automationsfrom
bb/forkable-18-provider-acp
Sep 23, 2026
Merged

SawyerHood merged 1 commit into
bb/forkable-17-automationsfrom
bb/forkable-18-provider-acp

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

First of four agent-provider PRs at the top of the forkable built-ins stack; it builds on #4199. plugins/provider-acp imports only the public SDK, but a copy of its directory failed its tests:

  • its vitest config used vitest.shared.ts;
  • the SDK test harness's optional peers (better-sqlite3, cron-parser, hono) weren't declared, and the fork installs without peer resolution.

What changed

  • Config: defineConfig, declared test peers, a lint script, and a turbo test entry that depends on the SDK build. The tsconfig covers server.test.ts.
  • Removed test: public-sdk-only.test.ts is gone. The lint rule and the fork check enforce the same boundary, and its dev-dependency assertion fails in a copy. The README now points at those checks.

How you verified

  • pnpm exec turbo run typecheck test lint --filter=bb-plugin-provider-acp. Its omp native-roots test needs a TMPDIR with no .agents directory above it, as on main.
  • pnpm check:plugin-forks plugins/provider-acp passes in a copy.
  • @bb/provider-parity (the parity replays of the acp-cursor recordings) and the native-roots golden tests.

🤖 Generated with Claude Code

AGENT GENERATED

@SawyerHood
SawyerHood added this pull request to stack #4182 September 23, 2026 17:51
@SawyerHood
SawyerHood force-pushed the bb/forkable-18-provider-acp branch from 8032177 to e2c8fef Compare September 23, 2026 17:53
@SawyerHood
SawyerHood force-pushed the bb/forkable-18-provider-acp branch from e2c8fef to c136231 Compare September 23, 2026 20:40
@SawyerHood
SawyerHood marked this pull request as ready for review September 23, 2026 21:07
@SawyerHood
SawyerHood force-pushed the bb/forkable-18-provider-acp branch from c136231 to bfef38f Compare September 23, 2026 21:31
@SawyerHood
SawyerHood removed this pull request from stack #4182 September 23, 2026 21:40
@SawyerHood
SawyerHood added this pull request to stack #4220 September 23, 2026 21:41
provider-acp imports only the public SDK, but a copy of its directory
still failed its tests: its vitest config imported the repository's
vitest.shared.ts, and its tests load the SDK test harness, whose
optional peers (better-sqlite3, cron-parser, hono) a fork installs
without peer resolution. The config now uses defineConfig directly and
the plugin declares what its tests load.

The public-sdk-only test is gone: the lint rule and the fork check
enforce the same boundary, and its check that @bb/plugin-build is a dev
dependency fails in a copy, which drops it. tsconfig now covers
server.test.ts. The plugin gets a lint script, and its turbo tasks
depend on the SDK build.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@SawyerHood
SawyerHood force-pushed the bb/forkable-18-provider-acp branch from bfef38f to aacca1f Compare September 23, 2026 22:10
@SawyerHood
SawyerHood merged commit 8553497 into main Sep 23, 2026
23 of 34 checks passed
@SawyerHood
SawyerHood deleted the bb/forkable-18-provider-acp branch September 23, 2026 22:13
SawyerHood added a commit that referenced this pull request Sep 23, 2026
## Human comments

## What was wrong

Second agent-provider PR in the forkable built-ins stack; it builds on
#4200. `plugins/provider-pi` couldn't be copied out:

- **App imports:** it imported `Button`, `cn`, and the question form
host from `@bb/shared-ui`.
- **Workspace test imports:** the delta translation test imported the
assembler and `ThreadEvent` from workspace packages.
- **Recordings:** the recorded-conformance test replays recordings
committed under `packages/provider-bridge-protocol`.
- **Lint:** 51 code comments.

## What changed

- **App imports:** they go through the registry alias. The question form
host comes from the registry flavor over
`experimental_useQuestionFormHost` (#4181), so `engines.bbPluginSdk`
rises to `>=0.5.22`. The SDK path entries are gone from the tsconfig.
- **Test imports:** tests use `experimental_createDeltaAssembler` and
`ThreadEvent` from `@get-bb/plugin-sdk/provider-bridge/testing`.
- **Recorded conformance:** the test moves to `@bb/provider-parity`, and
`docs/provider-bridge-protocol.md` says pi's replay lives there.
`@bb/provider-parity#test` now takes `packages/plugin-sdk/src/**` and
`packages/plugin-sdk/package.json` as inputs, because the replayed
bridges load SDK sources.
- **Config and lint:** `defineConfig`, declared peers, and turbo
entries; the 51 comments are removed, and the README keeps what the fake
pi's header and the Bun test explained.
- **App test:** the test that checks pi's answer shortcuts loads the
plugin by path under the app's own plugin runtime, because the SDK test
runtime backs the question form host with an empty host.
- **CI:** the Plugin Fork Check job installs Bun, as the packages test
shard does, because a copy runs pi's Bun runtime regression, which
requires Bun in CI.

## How you verified

- `pnpm exec turbo run typecheck test lint
--filter=bb-plugin-provider-pi`; a Bun-only case is skipped without Bun.
- `pnpm check:plugin-forks plugins/provider-pi` passes in a copy.
- `@bb/provider-parity`, including the moved recorded conformance and
the pi parity replays; `apps/app/src/components/plugin` tests; and the
server's first-party provider plugin tests.
- **Turbo input:** without the new inputs, `turbo --dry=json` reported
the same `@bb/provider-parity#test` hash after a change to an SDK
source; with them, the hash changes.
- **Bundle identity:** `app.css` is byte-identical. An unminified
`app.js` differs only in the question-form-host source (the runtime shim
became the SDK facade's hook, the same host context) and formatting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> AGENT GENERATED

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.

1 participant