Repository navigation
Label omp and opencode models with their route provider - #6186
Merged
ymichael merged 1 commit intoOct 23, 2026
Merged
Conversation
omp and opencode namespace model IDs by the service that runs them, so the same model can appear twice under one name, such as omp's openai/gpt-5.6-terra (API key) and openai-codex/gpt-5.6-terra (ChatGPT subscription). The omp and opencode dialects now set routeProviderId from the ID's first segment and drop a duplicated prefix from the name, so the picker labels each row with its source the way it already does for Pi. Third-party dialects get the same presentModel hook. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/check-thread-relevance-for-openmp-thr_buf3h84pek
branch
October 23, 2026 22:16
This was referenced Oct 23, 2026
ymichael
added a commit
that referenced
this pull request
Oct 23, 2026
…6190) ## Human comments ## What was wrong Storage & retention only knew about worktrees that BB environments created. Worktrees that agents created themselves with `git worktree add` (outside BB) never showed up in the report or in cleanup. They piled up unnoticed: on one machine, 72 untracked worktrees were holding about 250 GiB. Separately, the BB development storage section could only remove one entry at a time, and it would let you delete the dev instance the running BB was using. ## What changed - **Finding outside worktrees.** A new host RPC, `listGitWorktrees` (`plugins/storage-retention/src/git-worktrees.ts`), runs `git worktree list --porcelain -z` for each project repo. For each linked worktree it reports uncommitted changes, commits that are on no branch, tag or remote, the lock state, and the last git activity. Last git activity is the newest mtime of the worktree's `HEAD`, `index` and `logs/HEAD`. The scan sets `GIT_OPTIONAL_LOCKS=0` so it never rewrites any index. - **Report.** The server (`storage.ts`) filters out paths BB owns (live environments and project sources), measures the rest, and adds them to the report as `externalWorktrees`. It also adds `externalCount`/`externalBytes` to each project's worktree row. - **Removing.** A new `removeGitWorktrees` RPC and a `removeExternalWorktrees` plugin RPC remove worktrees with `git worktree remove`. Without force, they skip anything that is locked, has uncommitted changes, or has unsaved detached commits, and report the reasons. With force, they run `--force` (twice for a locked worktree). Bulk cleanup (`startCleanup` kind `externalWorktrees`) is always the safe version. Force works only on explicitly named paths. - **UI.** - "Worktrees created outside BB" is grouped by repo, with warnings on each row and a link to the thread that used the worktree, if any. - A row that safe removal skips offers "Remove anyway". - The "Worktrees by project" table gains an "Other worktrees" column and better column alignment. - **BB development storage.** - Entries can be selected per row or per group, filtered to "Archived threads only", and removed together. - The instance this BB is running from is marked, can't be selected, and the server refuses to remove it. - **CLI and docs.** - New command `bb storage-retention remove-external-worktrees` with `--machine`, `--path`, `--force` and `--yes`. - `cleanup --kind externalWorktrees`. - README and skill updated. - **Plugin SDK bump.** Bumped `@get-bb/plugin-sdk` to 0.6.76. `main` already fails the npm version guard after #6186 changed the ACP provider bridge, and this PR can't go green without the bump. - **Protocol.** No change to the server/daemon protocol. The new host RPCs belong to the plugin's own host contract. ## How you verified - New `storage.test.ts` case against real git repos: - Finds worktrees created outside BB and leaves BB-owned ones out. - Bulk removal deletes only the safe ones. - Locked, dirty and detached-with-commits worktrees are skipped with the right reasons. - Force removes them. - The dev-instance test now checks the current-instance flag and that removing it is refused. - Windows CI showed that git reports worktree paths with forward slashes. The host now normalizes them to native paths. - `pnpm exec turbo run typecheck lint test --filter='...[origin/main]'`: 9/9 passed. - Manual QA on a `start:worktree` instance with fixture repos: - Grouping, warnings, "Remove anyway", per-row and bulk removal. - Multi-select removal of dev storage, and the current instance being protected. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Oct 23, 2026
## Human comments ## What was wrong The "Checks" job on main fails at the plugin SDK npm version guard. `@get-bb/[email protected]` was published from c8d5860 at 21:45 UTC. At 22:16, #6186 merged changes to `packages/provider-bridge-acp`, which is bundled into the SDK's `dist/provider-bridge-acp*.js` and `bundled-types/`. The SDK version was not bumped. #6186's own CI passed because 0.6.75 was not on npm when it ran, and the guard only compares against published versions. Main now builds different content under a published version, so every later main and PR run fails the guard. ## What changed `node scripts/bump-plugin-sdk.mjs --patch`: `packages/plugin-sdk/package.json` and `packages/domain/src/plugin-sdk-version.ts` move from 0.6.75 to 0.6.76. ## How you verified - `node packages/plugin-sdk/scripts/check-npm-version-guard.mjs` after `turbo run build --filter=@get-bb/plugin-sdk`: PASS (0.6.76 is not on npm yet). - `node .github/workflows/check-plugin-sdk-version.mjs` against origin/main: "Plugin SDK surface unchanged." > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
Merged
ymichael
added a commit
that referenced
this pull request
Oct 24, 2026
## Human comments ## What was wrong `main` has 14 commits since 0.47.0, including #6195, which fixes the timeline staying detached at the bottom (a regression from #5951 that shipped in 0.47.0). `bb-app` and `@bb/desktop` were still at 0.47.0, so the publish and desktop workflows can't ship them. ## What changed - `packages/bb-app/package.json`, `apps/desktop/package.json`: 0.47.0 → 0.47.1 (`node scripts/bump-version.mjs --patch`). - No `CHANGELOG.md` or `RELEASE_META` entry: like earlier fix-only patches, these changes go into the 0.48.0 notes. The release commit sits directly on `b17bfc8fdd` (#6217). Everything below was tested on `22d41249ee`, and the sidebar was tested again on `b17bfc8fdd`. This release includes the daemon protocol bump from #6185 (251 → 252), so enrolled machines will update their daemon. ## How you verified - `node .github/workflows/check-version-lockstep.mjs`: `bb-app=0.47.1 @bb/desktop=0.47.1`. - Typecheck, tests and the `bb-app` tarball smoke run in CI on this PR, instead of locally. - `git diff --check`, and `oxfmt --check` on the changed files: clean. - Manual QA of `22d41249ee` with `pnpm start:worktree` (production bundle) and headless Chrome, on a fresh data dir: - **Timeline (#6195):** a long unread reply stops at NEW, detached. A short unread reply opens at the end with no jump arrow. Scrolling up 150 px and growing the viewport 900 → 1200 attaches. Scrolling up 400 px and growing it stays detached. Sending after scrolling up 1,800 px jumps to the end and follows the streamed Claude Code reply. The view is still at the end after a reload. - **Docs (#6146):** typing in a note while `bb docs pull`/`push` appended a paragraph kept both edits on disk and in the editor. A stale push after a UI edit was refused as a conflict. A new note was renamed from its first line and kept its Markdown after a reload. - **Skills (#6185):** `bb project commands` lists project skills from the documented roots for Claude Code and Codex, with no duplicate names. A Codex `/skill` turn ran the skill. - **Storage & retention (#6190, #6205):** two outside worktrees were listed. Bulk removal removed the clean one, kept its branch, and kept the dirty one. The table fits a 390 px viewport. - **Sidebar multi-select (#6191, #6217), on `b17bfc8fdd`:** with the experiment on, Cmd+Shift-click selected a second thread without navigating ("Actions for 2 threads"). Pressing it again on the same thread deselected it. Shift-click selected a range of 4. Escape cleared the selection. Cmd-click cleared the selection and opened a split. Bulk Pin applied to the two selected threads (checked with `bb thread list`). With the experiment off, Cmd-click opens a split. - **omp (#6186):** the picker labels GPT-5.6 Terra rows `openai` and `openai-codex`. Not exercised: the Ultrafast icon (#6198), because no Codex model on the test account offers Ultrafast. Also not exercised: the Android touch-drag attach, the desktop app, the SDK realtime reconnect (#6183) and retryable host RPCs (#6184). Those last two are covered by unit tests only. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
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
omp and opencode namespace each model ID by the service that runs it, so one model can appear several times under the same name. For example, omp lists
openai/gpt-5.6-terra(OpenAI API key) andopenai-codex/gpt-5.6-terra(ChatGPT subscription) as "GPT-5.6 Terra" and "GPT-5.6-Terra". The picker already shows a grey source label fromAvailableModel.routeProviderId, but nothing in the ACP path set that field, so these rows were indistinguishable. Picking the wrong one fails (for example, an API key with no credits left returnscredit_balance_exhausted). #2062 reported this and was closed by #5266, but the follow-up comment confirms that the duplicate rows remained.What changed
AcpDialectgains an optionalpresentModel(model)hook. The bridge applies it to every model inmodel/listresults (packages/provider-bridge-acp/src/bridge/bridge.ts).routeProviderIdto the ID's first segment (openrouter/anthropic/claude-sonnet-5.5→openrouter) and strip that prefix from the name when the agent repeats it (opencode'sopenai/GPT-4.1→GPT-4.1). IDs without a/are unchanged. Other ACP agents are untouched.routeProviderIdis an existing optional field, so there is no wire change and noHOST_DAEMON_PROTOCOL_VERSIONbump.AcpDialectis part of the plugin SDK (experimental_registerAcpDialect), so third-party dialects can use the same hook. The SDK version on main (0.6.75) is already ahead of the published 0.6.73, so no bump is needed.This takes over the problem from #6115 by @lemonleks, who reported it and proposed labelling rows by ID namespace. That PR inferred the label inside the picker. This change has the omp and opencode adapters supply it instead, which avoids doubling opencode's name prefix and lets plugin dialects opt in.
How you verified
bridge.test.tscase: the omp and opencode dialects labelanthropic/…,openrouter/anthropic/…andopenai/…models and strip opencode's duplicated prefix. The genericacpdialect is left unchanged.pnpm exec turbo run typecheck lint test --filter=@bb/provider-bridge-acp: all checks pass (538 tests).pnpm exec turbo run build:types typecheck --filter=@get-bb/plugin-sdk: passes, and the bundledAcpDialecttype includespresentModel.openai/gpt-5.6-terragets the labelopenai, andopenai-codex/gpt-5.6-terragetsopenai-codex.Fixes #2062
🤖 Generated with Claude Code