Repository navigation
Reserve bb-- plugin ids and move provider-usage to bb--provider-usage - #4576
Conversation
The bundled provider-usage plugin took the id of a community marketplace plugin, so that plugin could never be installed. New bundled plugins now use a bb-- id, BB refuses non-bundled installs of bb-- ids, and the bundled provider usage plugin moves to bb--provider-usage. Migration 0135 carries the existing install row and the sidebar footer preferences over to the new id. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 697652d53c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| name: "provider-usage", | ||
| pluginId: "provider-usage", | ||
| pluginId: "bb--provider-usage", |
There was a problem hiding this comment.
Update usage RPC calls for the renamed plugin ID
After the builtin is registered as bb--provider-usage, every sidebar load and background refresh still posts to /api/v1/plugins/provider-usage/rpc/getUsage in plugins/provider-usage/app.tsx:128. The RPC handler is now mounted under the new plugin ID, so these requests return 404 and the default provider-usage footer remains unavailable; derive the endpoint from the active plugin ID or update this stale route and its tests.
AGENTS.md reference: AGENTS.md:L12-L12
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid, thanks. Fixed in 46ac19c: the usage card and its background refresh now build the RPC URL from their plugin id, and the footer test mounts the plugin as bb--provider-usage (it fails against the old hard-coded URL).
AGENT GENERATED
The /settings/usage redirect now lands on bb--provider-usage. The pane focus migration test rewound only 0134, so Drizzle skipped it once 0135 existed; it now rewinds every migration from 0134 on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The usage card posted to a hard-coded /api/v1/plugins/provider-usage route, which 404s now that the plugin is bb--provider-usage. The content script and the footer card pass their plugin id into the request instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bundled plugins added after #4576 must use a bb-- id. Rename the package to bb-plugin-bb--storage-retention so the plugin id is bb--storage-retention; the directory and builtin:storage-retention source stay. The plugin has not shipped, so no migration is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bundled plugins added after #4576 must use a bb-- id. Rename the package to bb-plugin-bb--storage-retention so the plugin id is bb--storage-retention; the directory and builtin:storage-retention source stay. The plugin has not shipped, so no migration is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bundled plugins added after #4576 must use a bb-- id. Rename the package to bb-plugin-bb--storage-retention so the plugin id is bb--storage-retention; the directory and builtin:storage-retention source stay. The plugin has not shipped, so no migration is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Human comments ## What was wrong getbb.app/marketplace only listed community plugins. The plugins that ship with bb (Memory, Tasks, Docs, Automations, Plugin Guide and others) had no public page, so links like `/marketplace/memory` returned 404 and search engines could not find them. This carries #4608 forward on current `main` with a smaller diff and three fixes. ## What changed Every user-facing built-in plugin now has a marketplace page, and a "BB Official" shelf leads `/marketplace`. ### Pages and shelf - The "BB Official" shelf comes first, above New & notable. "View all" expands it in place. - Cards use the bb mark as the author avatar. - Badges follow the shared install rule: - Plugins installed with bb by default say "Built in" on cards and "Included with bb" on detail pages. - Opt-in official plugins (Tasks, GitHub, Docs, Memory and others) show their install counts. - Detail pages show the right setup step: - `bb plugin install <name>` for official plugins installed on request - `bb plugin enable <id>` for built-ins that are off by default - no command for built-ins that are always on - "View source" links to `get-bb/bb/tree/main/plugins/<name>`. - Internal and adapter plugins stay unlisted: account-pool, agent-annotations, the environment-\* checkouts, plugin-api-tester and the provider-\* adapters. - Built-ins join the sitemap and get share cards. ### Ids and URLs - A built-in's page URL is its plugin id, the same id install counts and the app use. - Built-in ids cannot clash with community ids: #4576 moved the one clash to `bb--provider-usage`, and the marketplace registry rejects reserved ids. - `/marketplace/provider-usage` is the community Provider Usage plugin (unchanged). - `/marketplace/bb--provider-usage` is the built-in. - If a clash ever appears, the community page stays and the built-in is left off the site. ### Data and build - `apps/web` imports the bundled catalog that `@bb/server#generate:bb-official-marketplace` already generates and merges it into the community manifest after parsing. - Only the bundled catalog may use a `{ bundled: { plugin } }` source. A fetched community manifest with one is rejected, so a community entry cannot present itself as built in. - Local SVG icons are served as Vite asset URLs, including when Vite inlines them as `data:` URLs. - `@bb/web#build` depends on the catalog generator through `topo`. `deploy-web.yml` also triggers on every generator input and on plugin icons. ### Differences from #4608 - Removed the compact-slug rename (`/marketplace/providerusage`). It no longer ran, because the ids no longer clash. - bb account, bb cloud AI and bb connect rendered the generic puzzle icon; they now have icons. - The enable command uses the plugin id instead of the source name. - The bundled-source check runs after the shared parse instead of through a second copy of the manifest schema. - Formatting-only hunks are reverted. ### Things to know - Adding a bundled plugin that is opt-in or off by default fails `bundled-marketplace.test.ts` until it is added to the lists in `bundled-marketplace.ts`. The failure names the plugin. - A listed built-in whose icon name has no entry in `marketplace-icons.ts` fails the same test file. - The deploy job uses a shallow clone, so built-ins have no publish dates on getbb.app. They sort last under "New" and never show the "New" badge. - Provider usage and Modal Sandbox have no overview text yet, so their Overview section is empty. ## How you verified - `pnpm exec turbo run build typecheck test lint --filter=@bb/web` passes on this branch (25 files, 170 tests). - `bundled-marketplace.test.ts` covers the clash rule, the unlisted filter, shelf order, category merging, icon fallback, a drift check against the server's plugin registry, and a check that every listed built-in has a web icon. Removing two icon entries made that last test fail and name both plugins. - `marketplace-v2.test.ts`: the community catalog rejects bundled sources; the bundled catalog accepts them. - `public-marketplace.test.tsx`: only default-installed bundled plugins render "Built in"; an opt-in one renders its count. - Browser checks in headless Chrome at 1280×900, against a local build with a local R2 bucket holding a full 327-plugin community catalog and the live install counts. These ran on a local branch that also carried #4671; its `apps/web` differs from this PR by one shelf subtitle string. - `/marketplace`: BB Official shelf first with 30 plugins; "View all" expands to all 30 and the link disappears. - bb account, bb cloud AI and bb connect show their own icons. - `/marketplace/bb--provider-usage` shows the built-in with "Included with bb" and no command; `/marketplace/provider-usage` still shows the community plugin with its install command; `/marketplace/providerusage` is 404. - `/marketplace/simple-notes` shows `bb plugin install docs`; `/marketplace/workflows` shows `bb plugin enable workflows`; `/marketplace/bb-guide` shows no command. - Production build under `vite preview`: Plugin Guide and Modal Sandbox render their SVG icons on the page and on the share card (`/marketplace/og/<id>`); the sitemap lists the built-in pages; no console errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: brsbl <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Bundled plugins added after #4576 must use a bb-- id. Rename the package to bb-plugin-bb--storage-retention so the plugin id is bb--storage-retention; the directory and builtin:storage-retention source stay. The plugin has not shipped, so no migration is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bundled plugins added after #4576 must use a bb-- id. Rename the package to bb-plugin-bb--storage-retention so the plugin id is bb--storage-retention; the directory and builtin:storage-retention source stay. The plugin has not shipped, so no migration is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bundled plugins added after #4576 must use a bb-- id. Rename the package to bb-plugin-bb--storage-retention so the plugin id is bb--storage-retention; the directory and builtin:storage-retention source stay. The plugin has not shipped, so no migration is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bundled plugins added after #4576 must use a bb-- id. Rename the package to bb-plugin-bb--storage-retention so the plugin id is bb--storage-retention; the directory and builtin:storage-retention source stay. The plugin has not shipped, so no migration is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Human comments
What was wrong
The bundled Provider usage plugin used the id
provider-usage, which is also the id of Braedon Saunders' community marketplace plugin. BB refuses any install that would shadow a bundled plugin id, so the community plugin could never be installed. Nothing stopped the next bundled plugin from colliding the same way.What changed
bb--ids. Every bundled plugin added from now on must use abb--id.builtin-registry.test.tsfreezes the 39 existing unprefixed ids and fails if another unprefixed one appears. BB refuses non-bundled installs ofbb--ids from every source (npm, git, path, catalog) with a message asking the author to rename the package. The check runs only at install time, so already-installed plugins keep loading.provider-usagebecomesbb--provider-usage. The package is renamed tobb-plugin-bb--provider-usage. The directory and the install source stayplugins/provider-usageandbuiltin:provider-usage.0135_rename_provider_usage_plugin_idmoves the bundled install row to the new id, keeping its enabled and removed state, and rewrites theplugin:provider-usage/…keys insidebar.footerOrderandsidebar.hiddenFooterItems. A user-installedprovider-usageis left alone. The plugin never stored settings, KV, schedules or other server data, so nothing else needs to move./api/v1/plugins/<id>/rpc/getUsagefrom their plugin id instead of hard-codingprovider-usage./settings/usageredirect, turbo task names, the lockfile, the first-party plugin table, and the docs examples.submit-a-pluginreference describe the reservation.bb--ids and the frozen bundled ids in submissions.Known effects:
provider-usage, so the community plugin stays uninstallable for them until they update. They get the existing "reserved by the bundled plugin" error.provider-usageuntil they update.How you verified
turbo run test --filter=@bb/db -- test/migrate.test.ts: 59 pass, including two new cases (the bundled row and footer preferences move; a user-installedprovider-usagestays).turbo run test --filter=@bb/serveron the plugin, catalog and submit-a-plugin suites: 257 pass. That includes the newbb--refusal tests for path and npm installs, the frozen-id registry test, and the realbb--provider-usagebuilt-in starting on a fresh database.turbo run typecheck test lint --filter=bb-plugin-bb--provider-usage: 20 pass. The footer test mounts the plugin asbb--provider-usageand fails against the old hard-coded URL.turbo run typecheck testforbb-plugin-bb--provider-usage,@bb/scripts,@bb/templatesandbb-plugin-plugin-api-docs;turbo run typecheckfor@bb/server,@bb/appand@bb/db.turbo run build --filter=@bb/bundled-plugins: the bundled official catalog listsbb--provider-usage.bb.db, or a dev-app session.🤖 Generated with Claude Code