fix: auto-allow Very Good CLI MCP tools in all run modes#120
Merged
Conversation
check-vgv-cli.sh now returns a PreToolUse "allow" decision on success, so Very Good CLI MCP tools are approved before the permission-mode check and never dead-end when they aren't on permissions.allow — including under skipAutoPermissionPrompt, where a non-allowlisted MCP tool otherwise fails closed and silently (#109). Also broaden the PreToolUse matcher to `mcp__.*very-good-cli__.*` so the guard fires for the plugin-namespaced tool name (`mcp__plugin_<plugin>_very-good-cli__*`) used on marketplace installs; the old `mcp__very-good-cli__.*` never matched that form. - Add allow() helper to vgv-cli-common.sh (mirrors deny()). - Keep deny-with-install-message when the CLI is missing or < 1.3.0. - Update README and CLAUDE.md hook docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
tested with plugin dir with claude -p "Create a flutter app named demo_app using the very-good-cli create MCP tool" and this branch succesfully goes with MCP without any stop |
omartinma
approved these changes
Jul 1, 2026
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.
Description
Fixes the silent dead-end from #109. When the
block-cli-workaroundshook redirects the agent fromvery_good create(shell) to thevery-good-cliMCPcreatetool, that tool has to be onpermissions.allow. UnderskipAutoPermissionPrompta non-allowlisted MCP tool fails closed and silently — no dialog, no error — so scaffolding dead-ends with no visible reason. Plugins can't shippermissions.allowentries (no manifest field; pluginsettings.jsononly supportsagent/subagentStatusLine), so the fix uses the one runtime lever a plugin has: a PreToolUse hook decision.check-vgv-cli.shnow returns a PreToolUseallowdecision on success. PreToolUse hooks fire before the permission-mode check, so the call is approved in every run mode (interactive, headless,skipAutoPermissionPrompt,bypassPermissions) without the user editingpermissions.allow. Only explicit deny/ask rules override anallow— none exist for these tools — so behavior is safe and predictable.While here, this also fixes a latent matcher bug: the old matcher
mcp__very-good-cli__.*never matched the plugin-namespaced tool name used on marketplace installs (mcp__plugin_vgv-ai-flutter-plugin_very-good-cli__*), so the guard was effectively dead for plugin users (related to #53). The matcher is broadened tomcp__.*very-good-cli__.*, which matches both the bare and plugin-namespaced forms.Changes
hooks/scripts/vgv-cli-common.sh— addallow()helper (mirrorsdeny()).hooks/scripts/check-vgv-cli.sh— on success,allowthe call instead of a silentexit 0.hooks/hooks.json— broaden PreToolUse matchermcp__very-good-cli__.*→mcp__.*very-good-cli__.*.README.md+CLAUDE.md— update hook docs.Missing/outdated CLI still denies with an install/upgrade message (a tool-usability guard, not a run-mode gate).
Verification
allowemitted on healthy CLI (1.3.0);denyon stubbed 1.2.0 and on not-installed.mcp__very-good-cli__createandmcp__plugin_vgv-ai-flutter-plugin_very-good-cli__create, skipsmcp__dart__*.bash -nclean;hooks.jsonvalid JSON.Closes #109.
Type of Change
feat)fix)refactor)docs)ci)chore)