@estebanforge/pi-ask-antigravity 1.2.7 → 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 CHANGED
@@ -2,6 +2,12 @@
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
+
5
11
  ## [1.2.7] - 2026-09-25
6
12
 
7
13
  ### Fixed
@@ -762,6 +762,9 @@ interface AgyDetails {
762
762
  exitCode: number;
763
763
  aborted: boolean;
764
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;
765
768
  durationMs: number;
766
769
  stderr: string;
767
770
  }
@@ -1027,7 +1030,8 @@ export default async function (pi: ExtensionAPI) {
1027
1030
  }
1028
1031
 
1029
1032
  const body = result.content[0]?.type === "text" ? result.content[0].text : "";
1030
- const errored = d?.exitCode !== 0 || !!d?.aborted || !!d?.timedOut;
1033
+ const errored =
1034
+ d?.exitCode !== 0 || !!d?.aborted || !!d?.timedOut || !!d?.empty;
1031
1035
 
1032
1036
  let text = errored
1033
1037
  ? theme.fg("error", "✗ AskAntigravity error")
@@ -1439,6 +1443,27 @@ export default async function (pi: ExtensionAPI) {
1439
1443
  };
1440
1444
  }
1441
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
+
1442
1467
  // Success. Clear the last partial status line (claude-bridge
1443
1468
  // idiom) so the running-tail preview doesn't linger under the final
1444
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.7",
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",