feat(amp): emit amp.permissions for allow/ask/argument-specific deny#2043
Merged
Conversation
Closes #2000 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Emit every reject before every ask before every allow as the primary sort key, so a catch-all allow on a glob tool name (e.g. mcp__*) cannot shadow a more specific reject (e.g. mcp__github) under first-match-wins. Add a regression test.
Owner
Author
|
@dyoshikawa Thank you! |
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.
Background
Follow-up to #2000. The Amp permissions adapter mapped only whole deny rules onto amp.tools.disable, so allow/ask rules were silently dropped and argument-specific deny patterns collapsed to a whole-tool disable.
Per the maintainer decision (option c), this emits amp.permissions only for the lossy cases while keeping amp.tools.disable for whole-tool deny.
What changed
Closes #2000
Generated with Claude Code