Repository navigation
Load a local marketplace plugin only while it is installed and listed - #466
Merged
Merged
Conversation
A local marketplace's ./ entry was resolved from the source before the cache was consulted, so a plugin removed with claude plugin uninstall (empty install record, cached copy marked orphaned) kept loading from its source, hooks and MCP servers included. The source now applies only to a plugin with a live cached version. A plugin the marketplace no longer lists does not load either, as Claude Code reports it not found.
|
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.



Plugin discovery (`extensions/internal/plugins.ts`) resolved a local marketplace's `./` entry from its source before consulting the cache.
An uninstalled local plugin no longer loads. `claude plugin uninstall kit@localmp` empties `installed_plugins.json` and marks `cache/localmp/kit/1.0.0` with `.orphaned_at`, but leaves the marketplace source in place. Discovery still returned `kit` rooted at the source, enabled by default with no `enabledPlugins` entry, so its commands, hooks and MCP servers kept running. The source now applies only to a plugin that has a live cached version, the same install signal the cache path uses.
A plugin the marketplace no longer lists does not load. With `kit` removed from `marketplace.json` but still installed, discovery fell back to the copy cached at install time. Claude Code logs `Plugin kit not found in marketplace localmp` and loads no component; discovery now loads nothing as well.
`npm run check` passes (Biome, strict tsc, Vitest)
Tests cover the change