feat(plugin): smart scope resolution for plugin uninstall#64
Merged
Conversation
When no --scope flag is given, uninstall now checks both project and user scopes and removes the plugin from all scopes where it exists. This eliminates the confusing error when a plugin is installed in user scope but the user doesn't specify --scope user. - Add hasPlugin() and hasUserPlugin() helpers for non-destructive lookup - Auto-uninstall from both scopes when no --scope specified - Always show scope label in install/uninstall success messages - Clear "Plugin not found" error when plugin doesn't exist in any scope Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Deploying allagents with
|
| Latest commit: |
369f8bd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0817a563.allagents.pages.dev |
| Branch Preview URL: | https://feat-plugin-uninstall-smart.allagents.pages.dev |
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.
Summary
--scopeflag is given,plugin uninstallnow checks both project and user scopes and removes the plugin from all scopes where it existshasPlugin()andhasUserPlugin()helpers for non-destructive scope lookup(project scope),(user scope),(project + user scope))Plugin not founderror when plugin doesn't exist in any scopeBefore:
allagents plugin uninstall foowould fail iffoowas only in user scope, requiring the user to guess--scope user.After:
allagents plugin uninstall foofinds and removesfoofrom whichever scope(s) it exists in.Test plan
tests/cli/plugin-uninstall-scope.test.ts(11 tests)plugin uninstall <name>without--scopeflag🤖 Generated with Claude Code