Skip to content

fix(acp): new-file kinds, steered-away commands, retired plugin leftovers - #5817

Merged
SawyerHood merged 1 commit into
acp-fu-5-opencode-permissionsfrom
acp-fu-6-small-fixes
Oct 20, 2026
Merged

SawyerHood merged 1 commit into
acp-fu-5-opencode-permissionsfrom
acp-fu-6-small-fixes

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Three issues found while live-testing #5775 with Cursor and OpenCode.

  • New files showed as edits.
    • Cursor marks a created file with oldText: "-- /dev/null" and a ++ b/<path> header line in newText; bb took both as file content.
    • OpenCode's write tool sends no diff at all, and sends its tool events only after the write.
  • A command cancelled by a steer was recorded as completed. Cursor never closes a tool call on cancel, so the bridge closed it as completed when the turn later finished.
  • Retiring bb--provider-acp-next (Make the rebuilt ACP adapter the only ACP adapter #5775) left two things behind. Its registry cache stayed in plugin storage, and links to /settings/plugins/bb--provider-acp-next pointed nowhere.

What changed

  • File change kinds:
    • tool-classification.ts reads the /dev/null diff form as a new file and drops the header.
    • For an edit with no diff, the translator asks the bridge whether each named path was created this turn: the file's creation time (birthtimeMs) after the turn started, and not touched earlier in the turn. If so, it reports add. Where the filesystem has no creation time, the result is unknown and stays update.
  • Steered-away commands:
    • When a cancelled prompt hands over to a queued steer, the bridge emits acp/prompt/interrupted, and the translator closes that prompt's still-open tool calls as interrupted.
    • The acp-cursor/steer parity lane is rerecorded. Its only change is that one command now closes interrupted when the steer happens, instead of completed at turn end.
  • Retired plugin leftovers:
    • The retired → successor map moves to @bb/domain (RETIRED_PLUGIN_SUCCESSORS), shared by server and app.
    • The handover now also deletes the retired plugin's key-value storage (deleteAllPluginKvValues).
    • useRedirectRetiredPluginPaths (mounted in AppLayout) rewrites any path segment naming a retired plugin to its successor.

How you verified

  • New tests:
    • translation: the Cursor /dev/null form, an update diff, a diff-less write with created true/false/unknown, and a file written twice in a turn (add then update);
    • bridge: a command left open by a steered-away prompt closes interrupted (it was completed before the change);
    • server: the handover deletes retired storage;
    • domain: path rewriting;
    • app: the redirect hook, in jsdom.
  • Turbo runs:
    • @bb/provider-bridge-acp: 531 passed, 4 skipped;
    • @bb/provider-parity: 59 passed;
    • @bb/domain: 256 passed;
    • @bb/db: 632 passed;
    • typecheck and lint for @bb/server and @bb/app;
    • server plugin tests: 516 passed.
  • Live, on an isolated build with real agents:
    • Cursor's new file is add with diff --- /dev/null / +++ b/… / +hello cursor;
    • OpenCode's new file is add and a later edit of it in the same turn is update;
    • steering Cursor off sleep 40 records the command as interrupted.

AGENT GENERATED

…vers

Three small issues found while driving Cursor and OpenCode through the
rebuilt ACP adapter.

- New files showed as edits. Cursor marks a created file with the diff
  `oldText: "-- /dev/null"` and a `++ b/<path>` header line in `newText`;
  bb took both as content. OpenCode's write tool sends no diff, and sends
  its tool events only after the write, so existence cannot be read from
  them. The bridge now reads the /dev/null form as a new file and drops the
  header; for an edit with no diff it reports `add` when the file's creation
  time is after the turn started and the turn has not touched it before
  (unknown where the filesystem has no creation time, which keeps `update`).
- A command running when a steer cancelled the prompt was closed as
  `completed` when the turn later finished, because Cursor never closes a
  tool call on cancel. The bridge now emits `acp/prompt/interrupted` when a
  cancelled prompt hands over to a queued steer, and the translator closes
  that prompt's open tool calls as `interrupted`. The acp-cursor/steer
  parity lane is rerecorded; its only change is that close.
- Retiring bb--provider-acp-next left its registry cache in plugin storage
  and links to /settings/plugins/bb--provider-acp-next pointing nowhere. The
  handover now deletes a retired plugin's storage, and the app redirects any
  path segment naming a retired plugin to its successor. The retired list
  lives in @bb/domain (RETIRED_PLUGIN_SUCCESSORS) so server and app share it.
@SawyerHood
SawyerHood added this pull request to stack #5818 October 20, 2026 00:50
@SawyerHood
SawyerHood merged commit 9e5c8a9 into main Oct 20, 2026
47 checks passed
@SawyerHood
SawyerHood deleted the acp-fu-6-small-fixes branch October 20, 2026 15:37
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

#5817 changed `dist/provider-bridge-acp.js` and
`dist/provider-bridge-acp-next.js` in `@get-bb/plugin-sdk` but did not
bump the SDK version. Main has failed the "Check plugin SDK npm version
guard" step since `9e5c8a945d`, and every PR opened since inherits that
failure: `0.6.59` is already published, and the package would now differ
from it.

## What changed

Ran `node scripts/bump-plugin-sdk.mjs --patch`, which moves
`packages/plugin-sdk/package.json` and
`packages/domain/src/plugin-sdk-version.ts` to `0.6.60` together.

## How you verified

`node packages/plugin-sdk/scripts/check-npm-version-guard.mjs` now
prints `PASS — @get-bb/[email protected] is not on npm yet`. Before the
bump it failed with the two differing files listed above.

> AGENT GENERATED

Co-authored-by: Claude Opus 5.5 <[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