Repository navigation
Description
The workflow
A private GitHub repository holds agent plugins for several agent tools. I want to add a bb marketplace to it and keep all bb files in one bb/ folder, apart from the other tools' files and CI:
bb/
marketplace.json
plugins/
notes/
status/
Catalog entries already point into that folder with source.git.subdir: "bb/plugins/notes". The catalog file is the one bb file that has to sit at the repository root.
What happens today
bb reads marketplace.json from the root of the checkout. materializeGit clones the repository and passes the checkout root to materializeLocal, which reads <root>/marketplace.json:
bb/apps/server/src/services/plugin-catalog/marketplace-source.ts
Lines 321 to 357 in 4b12265
async function materializeGit( source: Extract<MarketplaceSource, { kind: "git" }>, stagingDir: string, warn: ((message: string) => void) | undefined, ): Promise<MaterializedMarketplace> { await mkdir(stagingDir, { recursive: true }); const checkout = join(stagingDir, randomUUID()); const dispose = () => rm(checkout, { recursive: true, force: true }); try { await runInstallCommand("git", [ ...GIT_CLONE_ARGS, "clone", "--quiet", "--no-checkout", source.url, checkout, ]); await runInstallCommand("git", [ ...GIT_CLONE_ARGS, "-C", checkout, "checkout", "--quiet", "--detach", source.ref, ]); const commit = await runInstallCommand("git", [ "-C", checkout, "rev-parse", "HEAD", ]); await rm(join(checkout, ".git"), { recursive: true, force: true }); return await materializeLocal(checkout, commit, dispose, warn); } catch (error) { await dispose(); throw error; bb/apps/server/src/services/plugin-catalog/marketplace-source.ts
Lines 277 to 292 in 4b12265
async function materializeLocal( root: string, commit: string | null, dispose: () => Promise<void>, warn: ((message: string) => void) | undefined, ): Promise<MaterializedMarketplace> { try { const isDirectory = await stat(root) .then((entry) => entry.isDirectory()) .catch(() => false); if (!isDirectory) { throw new Error(`marketplace directory does not exist: ${root}`); } const manifestPath = await realPathInside( root, join(root, MARKETPLACE_MANIFEST_FILENAME),
The other source forms do not cover a private repository. bb fetches an https:// manifest without credentials, so raw.githubusercontent.com answers 404 for a private file. A path: source needs a local clone on each machine that someone keeps current by hand.
What you would expect
bb marketplace add git:https://github.com/acme/agent-plugins.git@main --subdirectory bbbb reads <checkout>/bb/marketplace.json and:
- stores the subdirectory with the marketplace, reuses it on each refresh, and shows it in
bb marketplace listand Settings → Plugin marketplaces - resolves relative icon and screenshot URLs against the subdirectory, next to the manifest
- keeps
source.git.subdirin entries relative to the repository root, as today - applies the path rules of
bb plugin install --subdirectory: a relative path, no.., no symlink out of the checkout
The flag name matches bb plugin install --subdirectory from #1097. If you prefer one string for the single Settings field, a suffix such as git:<url>@main#bb would work too.
Context and alternatives
-
Workaround: keep the catalog on a separate branch, where a root file does no harm.
-
Without a catalog, each user can run
bb plugin install git:<url> --subdirectory bb/plugins/<id>. Updates keep working, but users lose the Browse listing and the overviews. -
Related: Support multi-plugin repositories with a collection manifest #1097 (multi-plugin repositories, closed) and Install a plugin by name —
bb plugin install git:github.com/acme/bb-plugins/plugins/notify#1774 (install a plugin by its path, open). -
Size of the change, as I read the code: a nullable subdirectory column next to
sourceGitRef, the option in the add route, CLI and Settings, andmaterializeLocal(join(checkout, subdirectory))behindrealPathInside. I can open a PR after sign-off. -
I searched open and closed issues for the same request.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 12, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied missing classifications:
plugins,cliTrusted main-branch code supports a git URL and ref but no catalog subdirectory. This adds functionality rather than fixes unexpected behavior. Final Type verified as Feature; bug reporting and automated fixes skipped. No pull request opened because this is a feature request requiring a stored-data change.
Read a git marketplace's marketplace.json from a subdirectory (get-bb…