Improve error messages for nouns owned by uninstalled plugins - #108
Open
sawka-harness wants to merge 1 commit into
Open
Improve error messages for nouns owned by uninstalled plugins#108sawka-harness wants to merge 1 commit into
sawka-harness wants to merge 1 commit into
Conversation
When a noun belongs to a plugin (e.g. har) that isn't installed, the noun is never registered, so cobra previously fell through to a generic "unknown command" error regardless of whether the user typed <noun> <verb> or <verb> <noun>. The registry now tracks plugin-owned nouns (and their aliases) via RecordPluginOwnedNouns, populated from embedded plugin specs during spec loading, and both unknownNounError and SuggestRootCommand check this map first to surface a clear "is provided by the X plugin, which isn't installed" message with an install hint. specloader no longer skips embedded module_type: plugin specs entirely — it now records their noun ownership before bailing out of builtin registration, since a plugin's spec never reaches the registry unless it's actually installed in the home spec dir. AI-Session-Id: c83166db-7854-4800-8983-47a0fb3e7525 AI-Tool: claude-code AI-Model: unknown
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.
When a noun belongs to a plugin (e.g. har) that isn't installed, the noun is never registered, so cobra previously fell through to a generic "unknown command" error regardless of whether the user typed or . The registry now tracks plugin-owned nouns (and their aliases) via RecordPluginOwnedNouns, populated from embedded plugin specs during spec loading, and both unknownNounError and SuggestRootCommand check this map first to surface a clear "is provided by the X plugin, which isn't installed" message with an install hint.
specloader no longer skips embedded module_type: plugin specs entirely — it now records their noun ownership before bailing out of builtin registration, since a plugin's spec never reaches the registry unless it's actually installed in the home spec dir.
AI-Tool: claude-code
AI-Model: Claude Sonnet 5