fix(mcp): gate --prune behind per-entry opt-in (prune: true) - #199
Open
gmoigneu wants to merge 1 commit into
Open
fix(mcp): gate --prune behind per-entry opt-in (prune: true)#199gmoigneu wants to merge 1 commit into
gmoigneu wants to merge 1 commit into
Conversation
Manager.Prune used to remove every orphan entry on every managed target, including agent config files (claude-code's ~/.claude.json, codex's ~/.codex/config.toml) that hold MCP entries the user added by hand outside of gaal. A single `gaal sync --prune` could wipe those. Adds `prune: bool` to ConfigMcp (default false). A target is now eligible for orphan removal only when at least one ConfigMcp entry pointing at it sets `prune: true`. Without it, the target is logged at debug and skipped — the rest of --prune behaviour is unchanged. The CLI --prune flag itself stays as the high-level gate; this PR adds the per-target safety net inside it. Closes #142.
Contributor
|
No, use Claude system to detect if need to keep or remove |
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.
Closes #142. Adds
prune: boolto ConfigMcp (default false).Manager.Prunenow requires at least one entry per target to setprune: truebefore removing orphans on that target. Defends against accidentally wiping MCP entries users added by hand to shared agent config files.