@estebanforge/pi-ask-antigravity 1.2.6 → 1.2.8
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 +14 -0
- package/README.md +4 -6
- package/extensions/index.ts +41 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.2.8] - 2026-09-25
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Exit 0 with no output is a failure, not a silent success.** Same bug as the bridge fix: a headless `agy -p` run auto-denies a permission-gated tool call (the command gate in plan mode bites hardest since plan runs never receive the skip flag), prints the reason only to stderr, exits 0, and the execute path fell through to success, returning just the conversation footer. An empty answer now returns a loud failure note carrying the stderr plus the remedy (allow-list the command under `permissions.allow`, or rerun outside plan mode), and a new `details.empty` marker flips the TUI result row to its error glyph instead of a green checkmark. Three new tests pin both stderr shapes and the glyph flip through the fake-binary stub; HOME is pointed at an empty tmpdir during them so the bridge-deferral scan finds nothing and the factory registers.
|
|
10
|
+
|
|
11
|
+
## [1.2.7] - 2026-09-25
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **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.
|
|
16
|
+
|
|
17
|
+
Version 1.2.6 was a fleet-wide version stamp with no package changes.
|
|
18
|
+
|
|
5
19
|
## [1.2.5] - 2026-09-18
|
|
6
20
|
|
|
7
21
|
### 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
|
|
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-
|
|
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. |
|
package/extensions/index.ts
CHANGED
|
@@ -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
|
|
|
@@ -760,6 +762,9 @@ interface AgyDetails {
|
|
|
760
762
|
exitCode: number;
|
|
761
763
|
aborted: boolean;
|
|
762
764
|
timedOut: boolean;
|
|
765
|
+
// Exit 0 with no answer on stdout (the empty-output failure branch).
|
|
766
|
+
// renderResult flips to the error glyph on it.
|
|
767
|
+
empty?: boolean;
|
|
763
768
|
durationMs: number;
|
|
764
769
|
stderr: string;
|
|
765
770
|
}
|
|
@@ -949,7 +954,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
949
954
|
],
|
|
950
955
|
{
|
|
951
956
|
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.",
|
|
957
|
+
"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
958
|
default: "accept-edits",
|
|
954
959
|
},
|
|
955
960
|
),
|
|
@@ -1025,7 +1030,8 @@ export default async function (pi: ExtensionAPI) {
|
|
|
1025
1030
|
}
|
|
1026
1031
|
|
|
1027
1032
|
const body = result.content[0]?.type === "text" ? result.content[0].text : "";
|
|
1028
|
-
const errored =
|
|
1033
|
+
const errored =
|
|
1034
|
+
d?.exitCode !== 0 || !!d?.aborted || !!d?.timedOut || !!d?.empty;
|
|
1029
1035
|
|
|
1030
1036
|
let text = errored
|
|
1031
1037
|
? theme.fg("error", "✗ AskAntigravity error")
|
|
@@ -1199,7 +1205,16 @@ export default async function (pi: ExtensionAPI) {
|
|
|
1199
1205
|
// accept-edits auto-approves file edits but NOT shell commands, so a
|
|
1200
1206
|
// run_command would hang on an unanswerable y/n prompt in non-interactive
|
|
1201
1207
|
// -p mode. Honor the shared permissions setting (same knob as the bridge).
|
|
1202
|
-
|
|
1208
|
+
// Plan mode never gets the flag even when the knob is on: the flag
|
|
1209
|
+
// auto-approves ALL permission requests including plan mode's own
|
|
1210
|
+
// approval gate, which would silently turn "review-only" into full
|
|
1211
|
+
// write access inside --add-dir (probed 2026-09-25: with the flag a
|
|
1212
|
+
// plan run wrote files; without it, file and command attempts end
|
|
1213
|
+
// exit 0 in ~20-30s with a "confirm plan" message - fail-visible,
|
|
1214
|
+
// never a hang). Same fix as the bridge's ask-tool and driver.
|
|
1215
|
+
if (mode !== "plan" && config.skipPermissions) {
|
|
1216
|
+
args.push("--dangerously-skip-permissions");
|
|
1217
|
+
}
|
|
1203
1218
|
if (isContinuation) args.push("--conversation", rawConvId as string);
|
|
1204
1219
|
args.push("--print-timeout", `${timeoutMin}m`);
|
|
1205
1220
|
if (contextFile) args.push("--add-dir", askContextDir());
|
|
@@ -1428,6 +1443,27 @@ export default async function (pi: ExtensionAPI) {
|
|
|
1428
1443
|
};
|
|
1429
1444
|
}
|
|
1430
1445
|
|
|
1446
|
+
// Exit 0 with nothing on stdout is still a failure for the
|
|
1447
|
+
// caller: headless agy auto-denies a permission-gated tool call
|
|
1448
|
+
// (e.g. the command gate in plan mode), prints the reason only to
|
|
1449
|
+
// stderr, and ends cleanly. Falling through to the success path
|
|
1450
|
+
// here returned just the conversation footer, which read as an
|
|
1451
|
+
// empty success (silent-failure bug found 2026-09-25).
|
|
1452
|
+
if (!text) {
|
|
1453
|
+
details.empty = true;
|
|
1454
|
+
const note = [
|
|
1455
|
+
"agy exited cleanly but produced no output.",
|
|
1456
|
+
details.stderr.trim() ? `stderr: ${details.stderr.trim()}` : null,
|
|
1457
|
+
"Common cause: a tool call needed a permission that headless mode cannot prompt for (typically the command gate in plan mode), so it was auto-denied. Allow-list it under permissions.allow in ~/.gemini/antigravity-cli/settings.json, or rerun outside plan mode with skipPermissions.",
|
|
1458
|
+
]
|
|
1459
|
+
.filter(Boolean)
|
|
1460
|
+
.join(" ");
|
|
1461
|
+
return {
|
|
1462
|
+
content: [{ type: "text", text: note }],
|
|
1463
|
+
details,
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1431
1467
|
// Success. Clear the last partial status line (claude-bridge
|
|
1432
1468
|
// idiom) so the running-tail preview doesn't linger under the final
|
|
1433
1469
|
// answer, then append a conversation footer so the orchestrating model
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@estebanforge/pi-ask-antigravity",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
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",
|