-
Notifications
You must be signed in to change notification settings - Fork 25
feat(doctor): ask agy which model it runs; validate permissions.allow #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
a68773b
9b5a394
7b79376
da29cef
f9451bc
7932b5c
e35f739
8d39412
1574bc7
6fdb0a6
d7b159d
984b41d
1831e03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -253,7 +253,7 @@ if [ "$YOLO" -eq 0 ] && [ "$PRINT_CMD" -ne 1 ]; then | |
| shopt -s nocasematch | ||
| case "$PROMPT" in | ||
| *implement*|*scaffold*|*migrate*|*refactor*|*"write the file"*|*"create the file"*|*"edit the file"*) | ||
| echo "agy-delegate: note: this looks like a write task and --yolo is not set. Headless agy will NOT touch your workspace without a write grant (it describes / scratch-diverts / soft-denies depending on version, while the run still 'succeeds'; issue #10). Two grants work: a permissions.allow rule matching the target — write_file(<dir>), a recursive prefix, in ~/.gemini/antigravity-cli/settings.json — which is the narrower one and needs no flag; or --yolo, which auto-approves ALL tools. If a rule already covers your target, ignore this. Otherwise add one, or pass --yolo on a dedicated branch, and verify with git status." >&2 ;; | ||
| echo "agy-delegate: note: this looks like a write task and --yolo is not set. Headless agy will NOT touch your workspace without a write grant (it describes / scratch-diverts / soft-denies depending on version, while the run still 'succeeds'; issue #10). Two grants work: a permissions.allow rule matching the target — write_file(<dir>), a recursive prefix, in ~/.gemini/antigravity-cli/settings.json — which is the narrower one and needs no flag; or --yolo, which auto-approves ALL tools. If a rule already covers your target, ignore this — but <dir> is a placeholder, and agy-doctor will tell you whether yours actually parses. Otherwise add one, or pass --yolo on a dedicated branch, and verify with git status." >&2 ;; | ||
| esac | ||
| shopt -u nocasematch | ||
| fi | ||
|
|
@@ -494,7 +494,7 @@ if [ -z "${OUT//[$' \t\n\r']/}" ]; then | |
| *"auto-denied"*|*"permissions.allow"*|*"permission that headless"*|*"dangerously-skip-permissions"*) | ||
| shopt -u nocasematch | ||
| [ -s "$ERR" ] && cat "$ERR" >&2 | ||
| echo "agy-delegate: agy soft-denied a tool that needs permission (headless can't prompt) — no work was done. For a FILE WRITE, the narrower fix is a permissions.allow rule covering the target in ~/.gemini/antigravity-cli/settings.json — write_file(<dir>) matches recursively beneath <dir> — which needs no flag; --yolo also works but auto-approves ALL tools. Other tools (web / Vertex AI Search / terminal) need --yolo unless a rule covers them. agy's own message above names the specific permission it wanted. (agy >= 1.1.3)" >&2 | ||
| echo "agy-delegate: agy soft-denied a tool that needs permission (headless can't prompt) — no work was done. For a FILE WRITE, the narrower fix is a permissions.allow rule covering the target in ~/.gemini/antigravity-cli/settings.json — write_file(<dir>) matches recursively beneath <dir> — which needs no flag; --yolo also works but auto-approves ALL tools. Other tools (web / Vertex AI Search / terminal) need --yolo unless a rule covers them. agy's own message above names the specific permission it wanted. If a rule is ALREADY in that file and you are still reading this, suspect the rule: run agy-doctor, because an entry agy cannot parse grants nothing (and before agy 1.1.11 granted everything). (agy >= 1.1.3)" >&2 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good addition here, but it lands in only one of the two write-grant messages in this file. The proactive nudge at line 256 ( The CHANGELOG entry for this release explicitly scopes the "suspect the rule" caveat to three places (this exit-15 message, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This exit-15 message still says an unparseable Per No test pins this exact string, so scoping the parenthetical to the |
||
| signal PERMISSION_DENIED "agy soft-denied a permissioned tool in headless — add a permissions.allow rule or pass --yolo"; exit 15 ;; | ||
| esac | ||
| shopt -u nocasematch | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same over-generalization as
agents/antigravity-delegate.md:92: "an entry agy cannot parse … before agy 1.1.11 granted everything" applies the match-everything history to any unparseable entry, butdoctor.sh'sbad_allow_rulesonly attributes it to thezerowordsclass (acommand(...)rule naming no command). A mistypedwrite_file(<dir>)— the placeholder this very message tells the user to use — is a different matcher and, per the doctor.sh comment, "never had it." This is the exact scoping bug the commit history says both reviewers already caught and fixed indoctor.sh's own output; it just didn't get propagated to this string, which is what a user actually sees at the point of an exit-15 failure.