-
Notifications
You must be signed in to change notification settings - Fork 24
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 7 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 |
|---|---|---|
|
|
@@ -87,7 +87,9 @@ Options: `--tier flash|flash-lo|pro` · `--dir <repo-root>` (so agy reads | |
| write needs a grant. Pass `--yolo` unless the user has a `permissions.allow` | ||
| `write_file(<dir>)` rule covering the target in `~/.gemini/antigravity-cli/settings.json` | ||
| — that grants the write recursively beneath `<dir>` with no flag, and is narrower than | ||
| `--yolo`, which approves every tool. You cannot see that file, so `--yolo` stays the | ||
| `--yolo`, which approves every tool. If they say a rule is in place and the write is | ||
| still soft-denied, have them run `agy-doctor` before anything else: an entry agy cannot | ||
| parse grants nothing, and before agy 1.1.11 it granted everything. You cannot see that file, so `--yolo` stays the | ||
|
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 restates the pre-1.1.11 "granted everything" consequence for any unparseable
Same issue at |
||
| default; if a run comes back exit `15`, the allow-rule is the smaller fix. Either way tell | ||
| the caller to run on a dedicated branch/worktree and review the diff before merging. | ||
| - **Read-only** (analysis, first-pass review, search): no `--yolo` needed unless | ||
|
|
||
| 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. Same over-generalization as 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.
This paragraph is about the
write_file(<dir>)placeholder specifically, but the "before 1.1.11 ... matched every command" consequence it describes is scoped tocommand(...)-shaped rules with zero words — perscripts/doctor.sh's ownbad_allow_rules()(and the PR's second commit message: "A mistypedwrite_file(<dir>)never had it. Telling someone holding one that their config auto-approves everything is a security claim about a situation they are not in.").bad_allow_rules()classifies an unsubstituted<dir>placeholder as"unparseable", not"zerowords"— only"zerowords"(thecommand(time)/comment-only/()examples) carries the match-everything history, anddoctor.shprints that sentence only when a zerowords entry is present. As written, this bullet tells a reader whosewrite_file(<dir>)was never substituted that pre-1.1.11 it "matched every command and silently auto-approved anything the agent ran" — which, per the code's own distinction, isn't true for that matcher.Same overclaim is copy-pasted into
docs/TROUBLESHOOTING.md:113-118,docs/POC-PLAYBOOK.md:106-111,skills/antigravity/SKILL.md:220-225, and (shorter form)agents/antigravity-delegate.md:89-92.commands/delegate.mdavoids it and reads correctly.