fix(coding-agent): hint marketplace-qualified spec when bare plugin install fails - #3880
Merged
Yeachan-Heo merged 2 commits intoAug 6, 2026
Conversation
…nstall fails `gjc plugin discover` prints bare plugin names, but a bare spec is always classified as npm, so installing a name straight out of that listing died with an unqualified `install_failed` and no path forward. Lore-id: 7c2a91d5 Constraint: install failures must not echo the raw spec or cause -- only a bare name (no scope, version, or path separator) is safe to print Rejected: resolve bare names against marketplaces | silently shadows same-named npm packages Confidence: high Scope-risk: narrow Reversibility: easy Tested: bare name offered by a registered marketplace prints the qualified spec; unknown name and scoped spec print no hint Not-tested: multi-marketplace hint ordering against live catalogs (unit-covered with stub catalogs)
yazzang-homelab
force-pushed
the
fix/plugin-install-bare-name-hint
branch
from
August 5, 2026 23:24
ac7a532 to
39a6687
Compare
Contributor
Author
|
Rebased onto current Re-verified on the new base: |
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.
What
gjc plugin install <bare-name>now prints the marketplace-qualified spec that would work when the npm fallback fails.A bare spec (no
@marketplace) is classified as npm by design (classifyInstallTargetrule 3). That rule is unchanged — only the failure path gained a hint, plus a new zero-depsrc/cli/marketplace-hint.tsholding the two pure helpers.Why
gjc plugin discoverlists bare plugin names. Copying one intogjc plugin installresolves against npm, fails, and prints onlyinstall_failed, which names neither the cause nor the working spec.Observed on a clean isolated
HOMEagainst the official Anthropic marketplace:After the change the first form ends with
Try: gjc plugin install claude-md-management@claude-plugins-official.Only marketplace names are echoed, and only for a bare spec (no
@scope, version, or path separator), so the install-failure path keeps its rule of never printing a spec or cause that can carry credentials or a home path.Testing
bun test packages/coding-agent/test/marketplace/cli.test.ts— 14 pass (4 new cases: bare-name shape gate, multi-marketplace hit ordering, absent name, unreadable catalog skipped).HOMEwith the official marketplace registered: bare name prints the qualified hint;definitely-not-a-plugin-xyzand@scope/nopeprint no hint.bunx biome checkclean on the touched files.bun run check:typesNOT completed:tsc(typescript-go) aborts withfatal error: runtime: name offset out of rangeon this machine atdevbaseline too, i.e. before this change. Needs CI to cover the typecheck.GJC verdict
devbun checkpasses — biome clean; tsgo typecheck crashes at baseline on this host, left to CI