Repository navigation
feat(permissions)!: add automatic tool review - #61
Open
minixalpha wants to merge 9 commits into
Open
minixalpha wants to merge 9 commits into
minixalpha wants to merge 9 commits into
Conversation
BREAKING CHANGE: tool calls default to auto review. Set permission_mode to full in user settings before startup to skip model review.
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.
Tool calls previously executed without an authorization gate. This change defaults interactive and headless runs to
auto: each valid call receives an independent review before execution, and a denied call returns its reason to the main model without running the tool body.The top-level
permission_modesetting acceptsautoorfulland is fixed at startup. Auto uses the current endpoint/model with the pending tool's schema, arguments, and conversation context. Only technical review failures fall back to one-call manual approval in interactive mode; headless failures remain unexecuted. Both modes apply a limited deterministic guard for literal root deletion and raw disk destruction; this is not a sandbox or a general shell safety analyzer.Review requests retain usage, cost, and tool linkage in the journal and ATIF. They count against wall-clock budgets but not the main model's turn limit. The English runtime prompt matches the generated English development notes verbatim, with a regression test. The branch also includes the permission-mode and review-prompt research, the workflow diagram, and synchronized English/Chinese user documentation and README changes.
Valid review explanations are trimmed and capped at 200 Unicode characters for display without changing the decision or triggering manual fallback solely for verbosity. The raw reviewer response remains intact in the journal. Invalid JSON, decision values, fields, and blank or non-string explanations still fail review.
Validation:
uv run --frozen pytest -q: 422 passed, 4 skipped (unavailable alternate transport).uv run --with anthropic==1.5.0 python -m pytest -q: 426 passed.git diff --checkand local documentation-link checks pass.BREAKING CHANGE: Tool calls now default to model review and incur additional requests. Set
"permission_mode": "full"in the user settings file before startup to skip model review.