Skip to content

Load local marketplace plugins from their source, as Claude Code does - #465

Merged
ilovepixelart merged 1 commit into
mainfrom
fix-local-marketplace-source
Nov 16, 2026
Merged

ilovepixelart merged 1 commit into
mainfrom
fix-local-marketplace-source

Conversation

@ilovepixelart

Copy link
Copy Markdown
Owner

Plugin discovery (`extensions/internal/plugins.ts`) now loads a plugin from a local marketplace from the marketplace itself instead of the copy cached at install time, matching Claude Code.

  • Source edits apply after `/reload`. For a marketplace added with `claude plugin marketplace add ` or `/marketplace.json`, a plugin whose entry is a relative `./` path loaded from `plugins/cache///`. After the source moved from 0.1.0 to 0.2.0 and gained a skill, `claude plugin list` reported 0.2.0 read from the source while pi-code kept loading 0.1.0 without the new skill until `claude plugin update`. The entry now resolves against the marketplace's `installLocation` from `known_marketplaces.json`, which Claude records as the marketplace root for both source types.
  • Behavior change: no fallback to the cached copy. When the marketplace directory is gone, the plugin does not load; Claude Code reports it as failed to load (`cache-miss`) in the same case.
  • Entries that leave the marketplace directory are refused, whether by a climbing path (`./../outside`) or through a link, as Claude Code refuses to install them.
  • Remote entries (`github`, `npm`, ...) of a local marketplace keep loading from the cache, which is where Claude copies them.

Discovery now reads `known_marketplaces.json` on each revalidation, and the cache fingerprint covers the local roots and the resolved manifest, so an edit to a source manifest is seen on the next call.

Closes #457

  • `npm run check` passes (Biome, strict tsc, Vitest)
  • Tests cover the change

A plugin installed from a marketplace added as a local directory or
marketplace.json file loaded from the copy cached at install time, so
source edits stayed invisible until claude plugin update. Claude Code
reads such a plugin's ./ entry from the marketplace itself. Discovery
now resolves it against the marketplace's installLocation; the plugin
does not load when the marketplace is gone or the entry leaves its
directory, and remote entries keep the cached copy.
@sonarqubecloud

Copy link
Copy Markdown

@ilovepixelart
ilovepixelart merged commit 298c625 into main Nov 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support loading directory-marketplace plugins from their local source

1 participant