Repository navigation
Read a git marketplace's marketplace.json from a subdirectory - #5405
Merged
Merged
Conversation
`bb marketplace add git:<url>[@<ref>] --subdirectory <path>` reads marketplace.json and relative icons from that directory of the checkout instead of the repository root, so a repository that holds plugins for several tools can keep its bb files in one folder. The subdirectory is stored in a new nullable plugin_marketplaces.source_git_subdirectory column and reused on every refresh. It follows the path rules of `bb plugin install --subdirectory` and is refused for https and path: sources. The add route, the SDK, the CLI, and Settings accept it; `bb marketplace list` and Settings show it. The contract change alters the plugin SDK's bundled types, so the SDK version moves to 0.6.41. Fixes #5372 Co-Authored-By: Claude Code <[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
A git marketplace could only keep
marketplace.jsonat the repository root.materializeGitcloned the repository and read<checkout>/marketplace.json, with no way to name another directory. A repository that holds plugins for several agent tools could not keep its bb files together in one folder (#5372).What changed
bb marketplace add git:<url>[@<ref>] --subdirectory <path>readsmarketplace.jsonand relative icons from that directory of the checkout.plugin_marketplacesgains a nullablesource_git_subdirectorycolumn (migration 0142). The add route accepts an optionalsubdirectory, and every refresh reuses the stored value. The path follows the rules ofbb plugin install --subdirectory: relative, no.., no.git, and no symlink out of the checkout. A subdirectory on an https orpath:source is refused.PluginMarketplacegainssubdirectory: string | null, andplugins.marketplaces.addacceptssubdirectory. The contract change alters the plugin SDK's bundled types, so the SDK version moves to 0.6.41.bb marketplace add --subdirectory <path>.bb marketplace listshows a Subdirectory column when a marketplace has one.git:, and each marketplace row shows its subdirectory.docs/configuration.md.Deviations from the issue's proposal:
marketplace.jsonand icons must resolve inside the subdirectory, not only inside the checkout.sourcestaysgit:<url>@<ref>and the subdirectory is a separate field, matchingbb plugin install --subdirectory, instead of a#<path>suffix.source.git.subdirin catalog entries stays relative to the repository root. NoHOST_DAEMON_PROTOCOL_VERSIONchange: nothing crosses the server/daemon wire.How you verified
path:sources. Each failure leaves no staged checkout behind.pnpm exec turbo run typecheck lint --continue --filter='...[origin/main]'pnpm exec turbo run testfor@bb/server(plugin-catalog suites),@bb/db,@bb/sdk,@bb/server-contract,@bb/templates,@bb/domain,@bb/cli(marketplace output), and@bb/app(settings).node packages/plugin-sdk/scripts/check-npm-version-guard.mjspasses with the version bump; it failed before the bump.bb/:bb marketplace add git:<repo>@main --subdirectory bb,bb marketplace list,bb marketplace refreshafter a new commit, the icon served frombb/icons/, and an add through Settings → Plugin marketplaces.Fixes #5372
🤖 Generated with Claude Code