@estebanforge/pi-ask-antigravity 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.2.7] - 2026-09-25
6
+
7
+ ### Fixed
8
+
9
+ - **Plan mode never receives `--dangerously-skip-permissions`.** agy's plan-mode no-write gate IS a permission request ("File creation requires plan approval"), and the skip flag auto-approves every permission request — so a `mode: "plan"` delegation could edit the workspace inside the `--add-dir` grant despite the review-only contract. The default `skipPermissions` knob made this the out-of-the-box behavior. Probe evidence transfers directly (same binary, same `-p` path): with the flag a plan run wrote files; without it, file-write and run_command attempts end exit 0 in ~20-30 s with a "confirm plan" message — fail-visible, never the upstream #318 prompt-hang. Plan runs now never receive the flag, and the tool description and README state the enforcement instead of the aspirational claim.
10
+
11
+ Version 1.2.6 was a fleet-wide version stamp with no package changes.
12
+
5
13
  ## [1.2.5] - 2026-09-18
6
14
 
7
15
  ### Added
package/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # @estebanforge/pi-ask-antigravity
2
2
 
3
- A [Pi](https://github.com/earendil-works/pi-coding-agent) extension that exposes the **`AskAntigravity`** tool: delegate a self-contained sub-task to Google Antigravity's `agy` CLI and stream its response back into the Pi session.
3
+ A [Pi](https://github.com/earendil-works/pi) extension that exposes the **`AskAntigravity`** tool: delegate a self-contained sub-task to Google Antigravity's `agy` CLI and stream its response back into the Pi session.
4
4
 
5
- It is the `AskClaude`-style delegation pattern (from pi-claude-bride extension), pointed at Gemini via `agy`. The tool answers to three names the CLI is known by — **gemini**, **antigravity**, and **agy** — surfaced in its description so the model maps any of them to this single tool.
6
-
7
- <img width="1512" height="845" alt="image" src="https://github.com/user-attachments/assets/3e1a8f19-64d2-43ab-a30f-47f39daa151d" />
5
+ It is the `AskClaude`-style delegation pattern (from pi-claude-bridge extension), pointed at Gemini via `agy`. The tool answers to three names the CLI is known by — **gemini**, **antigravity**, and **agy** — surfaced in its description so the model maps any of them to this single tool.
8
6
 
9
7
  ## Install
10
8
 
@@ -65,7 +63,7 @@ Verbose `agy models` strings (`Gemini 3.5 Flash (Medium)`) are hostile to natura
65
63
 
66
64
  | Mode | Flag | Use when |
67
65
  | --- | --- | --- |
68
- | `plan` | `--mode plan` | agy reviews and plans without writing. Use for cross-review and read-only tasks. |
66
+ | `plan` | `--mode plan` | agy reviews and plans without writing. Use for cross-review and read-only tasks. Enforced: the skip-permissions flag is never passed in plan mode, so write and command attempts fail visibly at plan approval instead of executing. |
69
67
  | `accept-edits` (default) | `--mode accept-edits` | agy applies edits directly inside the workspace. |
70
68
 
71
69
  For agy's orthogonal `--sandbox` shell-containment flag, set `AGY_EXTRA_ARGS=--sandbox` in your environment. The extension does not expose it as a `mode` value because `--sandbox` controls command containment, not edit persistence.
@@ -113,7 +111,7 @@ Interactive picker for the default model and default thinking. If the project co
113
111
  | `prompt` | yes | Self-contained task. agy cannot see the Pi conversation. |
114
112
  | `cwd` | no | Workspace agy runs in. Defaults to the project root. |
115
113
  | `model` | no | Alias or exact id. Omit for the configured default. |
116
- | `mode` | no | `plan` (review-only) or `accept-edits` (agy applies edits, default). |
114
+ | `mode` | no | `plan` (review-only; enforced via plan approval) or `accept-edits` (agy applies edits, default). |
117
115
  | `digest` | no | Prefix the prompt with `(Use compact digests, not full file contents.)`. Defaults on for `plan`, off for `accept-edits`. |
118
116
  | `conversationId` | no | Omit for a one-shot (agy starts fresh). Pass the id from a prior call's result (`details.conversationId`) to resume that agy conversation with full context. See [Two modes](#two-modes-one-shot-vs-continued-conversation). |
119
117
  | `timeoutMinutes` | no | Hard cap on the run. Default 10. |
@@ -96,7 +96,9 @@ function levelToTier(level: string): ThinkingTier {
96
96
  }
97
97
 
98
98
  // Mode = which agy tool-loop policy to apply. Distinct from the alias layer.
99
- // "plan" → --mode plan (no edits; review-only)
99
+ // "plan" → --mode plan (no edits; review-only — the skip-
100
+ // permissions flag is withheld in plan
101
+ // mode so the plan-approval gate holds)
100
102
  // "accept-edits" → --mode accept-edits (agy applies edits)
101
103
  //
102
104
  // Note: agy's --sandbox flag is an orthogonal shell-containment setting
@@ -154,7 +156,7 @@ TWO MODES (you choose):
154
156
  - **Continued conversation**: pass the conversationId returned in the PREVIOUS call's details (details.conversationId). agy resumes that conversation with full context intact — use for follow-ups, multi-turn refinement, or when the user says "ask agy to follow up / continue / now do X based on what you just did". Thread the id from each result into the next call.
155
157
 
156
158
  EXECUTION MODES (param: mode):
157
- - **plan**: agy reviews and plans without writing. Use for cross-review and read-only tasks.
159
+ - **plan**: agy reviews and plans without writing. Use for cross-review and read-only tasks. Enforced: plan runs never receive the skip-permissions flag, so a write or command attempt ends the run quickly with a "confirm plan" message instead of executing.
158
160
  - **accept-edits** (default): agy applies edits directly inside the workspace.
159
161
  - For agy's orthogonal \`--sandbox\` shell-containment flag, set the \`AGY_EXTRA_ARGS=--sandbox\` env var.
160
162
 
@@ -949,7 +951,7 @@ export default async function (pi: ExtensionAPI) {
949
951
  ],
950
952
  {
951
953
  description:
952
- "agy execution mode. 'plan' = review-only, no edits (--mode plan). 'accept-edits' = agy applies edits directly (--mode accept-edits, default). For agy's orthogonal --sandbox shell-containment flag, set the AGY_EXTRA_ARGS env var.",
954
+ "agy execution mode. 'plan' = review-only, no edits (--mode plan; the skip-permissions flag is never passed, so write and command attempts fail visibly at plan approval). 'accept-edits' = agy applies edits directly (--mode accept-edits, default). For agy's orthogonal --sandbox shell-containment flag, set the AGY_EXTRA_ARGS env var.",
953
955
  default: "accept-edits",
954
956
  },
955
957
  ),
@@ -1199,7 +1201,16 @@ export default async function (pi: ExtensionAPI) {
1199
1201
  // accept-edits auto-approves file edits but NOT shell commands, so a
1200
1202
  // run_command would hang on an unanswerable y/n prompt in non-interactive
1201
1203
  // -p mode. Honor the shared permissions setting (same knob as the bridge).
1202
- if (config.skipPermissions) args.push("--dangerously-skip-permissions");
1204
+ // Plan mode never gets the flag even when the knob is on: the flag
1205
+ // auto-approves ALL permission requests including plan mode's own
1206
+ // approval gate, which would silently turn "review-only" into full
1207
+ // write access inside --add-dir (probed 2026-09-25: with the flag a
1208
+ // plan run wrote files; without it, file and command attempts end
1209
+ // exit 0 in ~20-30s with a "confirm plan" message - fail-visible,
1210
+ // never a hang). Same fix as the bridge's ask-tool and driver.
1211
+ if (mode !== "plan" && config.skipPermissions) {
1212
+ args.push("--dangerously-skip-permissions");
1213
+ }
1203
1214
  if (isContinuation) args.push("--conversation", rawConvId as string);
1204
1215
  args.push("--print-timeout", `${timeoutMin}m`);
1205
1216
  if (contextFile) args.push("--add-dir", askContextDir());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@estebanforge/pi-ask-antigravity",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Pi tool that delegates a self-contained sub-task to Google Antigravity's agy CLI (the CLI for Gemini). Friendly model aliases (flash/pro/gemini), configurable default model + thinking, and the AskAntigravity delegation tool.",
5
5
  "keywords": [
6
6
  "pi-package",