@estebanforge/pi-ask-antigravity 1.3.0 → 1.3.3
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 +15 -2
- package/extensions/index.ts +18 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [1.3.3] - 2026-11-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- The tool result expand hint now comes from the render context pi injects (`context.keyHint`) instead of the package import. pi 1.5 blinds an imported `keyHint` to the host keybindings (app.* ids format as ""), so the hint rendered as "to expand" with no key. Peer floor moves to `^1.5.0` accordingly.
|
|
9
|
+
|
|
10
|
+
## [1.3.2] - 2026-10-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **`/agy-stop` no longer discards an answer that already finished computing.** Between the agy process closing and the run settling (conversation discovery + classification, up to ~500ms), a stop settled the run failed and silently dropped the computed answer. The stop handler now consults a finishing guard (the new opt-in `guard` option on pi-ask-shared's `createStopHandler`, dependency floor raised to ^0.1.3) and refuses with "already finished; its result is being delivered" while that window is open; the wake then delivers normally.
|
|
15
|
+
|
|
16
|
+
## [1.3.1] - 2026-10-21
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- The generated reviewer agent.md frontmatter is now pinned by a test that parses it with a real YAML parser. The plan-review tool shares the failure mode fixed in pi-antigravity-bridge 1.8.3 (agy silently drops an agent whose frontmatter does not parse); the guard keeps a future wording edit from reintroducing it here.
|
|
6
20
|
|
|
7
21
|
## [1.3.0] - 2026-10-12
|
|
8
22
|
|
|
@@ -36,7 +50,6 @@ All notable changes to this project will be documented in this file.
|
|
|
36
50
|
|
|
37
51
|
- **Background runs (`background`, opt-in, default blocking).** Detached runs with the shared wake contract: `runId` at once, the answer arrives later as a conversation message with the resume handle (when agy reports one; discovery misses say so) under an UNTRUSTED banner. `/agy-stop [runId]` kills a run. One run per conversation at a time across blocking and background (per-handle lock). Refused in print/json mode; session replacement kills in-flight runs and loses their results; the staged context file and plan-mode reviewer dir are cleaned on every exit path including session shutdown.
|
|
38
52
|
|
|
39
|
-
|
|
40
53
|
### Fixed
|
|
41
54
|
|
|
42
55
|
- **Plan runs are no longer auto-approved and no longer claim enforcement.** The CLI does not gate writes under plan mode ([#1181](https://github.com/google-antigravity/antigravity-cli/issues/1181)): the previously documented "write attempts fail at plan approval" behavior never held, and plan runs carrying the skip-permissions flag (whenever the restricted agent staged) were write-capable. Plan runs now never receive the flag (including via `AGY_EXTRA_ARGS`, filtered by prefix), the restricted agent is documented as a damper, and the tool description, param description, and README no longer call plan review-only or enforced.
|
package/extensions/index.ts
CHANGED
|
@@ -37,7 +37,6 @@ import {
|
|
|
37
37
|
type AgentToolResult,
|
|
38
38
|
buildSessionContext,
|
|
39
39
|
getAgentDir,
|
|
40
|
-
keyHint,
|
|
41
40
|
type ExtensionAPI,
|
|
42
41
|
} from "@earendil-works/pi-coding-agent";
|
|
43
42
|
|
|
@@ -513,6 +512,8 @@ interface ProcessRunOptions {
|
|
|
513
512
|
/** Background only: hands over the tree-kill switch plus the live child
|
|
514
513
|
* handle (pid for the FD-disambiguation poll) as soon as the child exists. */
|
|
515
514
|
onSpawn?: (kill: () => void, proc: ChildProcess) => void;
|
|
515
|
+
/** Background only: the child closed; discovery/classification still running. Arms the stop handler's finishing guard. */
|
|
516
|
+
onClose?: () => void;
|
|
516
517
|
}
|
|
517
518
|
|
|
518
519
|
interface ProcessRunOutcome {
|
|
@@ -535,7 +536,7 @@ interface AskToolResult {
|
|
|
535
536
|
* resolves when the process tree closes.
|
|
536
537
|
*/
|
|
537
538
|
async function runAgyProcess(opts: ProcessRunOptions): Promise<ProcessRunOutcome> {
|
|
538
|
-
const { binary, args, workdir, timeoutMin, startAt, details, isContinuation, snapshot, signal, onPartial, onSpawn } = opts;
|
|
539
|
+
const { binary, args, workdir, timeoutMin, startAt, details, isContinuation, snapshot, signal, onPartial, onSpawn, onClose } = opts;
|
|
539
540
|
let out = "";
|
|
540
541
|
|
|
541
542
|
const statusInterval = onPartial
|
|
@@ -596,6 +597,9 @@ async function runAgyProcess(opts: ProcessRunOptions): Promise<ProcessRunOutcome
|
|
|
596
597
|
});
|
|
597
598
|
|
|
598
599
|
if (statusInterval) clearInterval(statusInterval);
|
|
600
|
+
// runProcess resolves only on stream close: the child is gone, output
|
|
601
|
+
// drained; discovery/classification still runs below.
|
|
602
|
+
onClose?.();
|
|
599
603
|
|
|
600
604
|
// Let the during-run bind poll finish (it bails immediately once agy
|
|
601
605
|
// has exited, so this rarely blocks).
|
|
@@ -723,6 +727,10 @@ export default async function (pi: ExtensionAPI) {
|
|
|
723
727
|
// One background run per conversationId at a time: two runs resuming the
|
|
724
728
|
// same conversation interleave their turns inside agy's SQLite state.
|
|
725
729
|
const busyHandles = new Set<string>();
|
|
730
|
+
// The child closed but the answer is not settled yet (discovery +
|
|
731
|
+
// classification): a stop in this window must refuse instead of settling
|
|
732
|
+
// failed and discarding a computed answer.
|
|
733
|
+
const finishing = new Set<string>();
|
|
726
734
|
const sendWake = createWakeSender(pi, {
|
|
727
735
|
customType: "ask-antigravity-result",
|
|
728
736
|
isDisposed: () => registry.isDisposed(),
|
|
@@ -737,6 +745,10 @@ export default async function (pi: ExtensionAPI) {
|
|
|
737
745
|
elapsedS: Math.round((Date.now() - run.startedAt) / 1000),
|
|
738
746
|
error: "stopped via /agy-stop",
|
|
739
747
|
}),
|
|
748
|
+
// The guard keeps /agy-stop from discarding an answer that already
|
|
749
|
+
// finished computing and is riding discovery to its wake.
|
|
750
|
+
guard: (run) =>
|
|
751
|
+
finishing.has(run.runId) ? `Run ${run.runId} already finished; its result is being delivered.` : null,
|
|
740
752
|
});
|
|
741
753
|
pi.on("session_shutdown", () => {
|
|
742
754
|
// Latch first so close-handler wakes stay silent, then kill children,
|
|
@@ -993,7 +1005,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
993
1005
|
}
|
|
994
1006
|
return new Text(text, 0, 0);
|
|
995
1007
|
},
|
|
996
|
-
renderResult(result, { expanded, isPartial }, theme) {
|
|
1008
|
+
renderResult(result, { expanded, isPartial }, theme, context) {
|
|
997
1009
|
const d = result.details as AgyDetails | undefined;
|
|
998
1010
|
if (isPartial) {
|
|
999
1011
|
const status = result.content[0]?.type === "text" ? result.content[0].text : "working...";
|
|
@@ -1023,7 +1035,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
1023
1035
|
const lines = truncated.split("\n").slice(0, PREVIEW_MAX_LINES);
|
|
1024
1036
|
if (lines.length) text += `\n${theme.fg("toolOutput", lines.join("\n"))}`;
|
|
1025
1037
|
if (body.length > PREVIEW_MAX_CHARS || body.split("\n").length > PREVIEW_MAX_LINES) {
|
|
1026
|
-
text += `\n${theme.fg("dim", `… (${keyHint("app.tools.expand", "to expand")})`)}`;
|
|
1038
|
+
text += `\n${theme.fg("dim", `… (${context.keyHint("app.tools.expand", "to expand")})`)}`;
|
|
1027
1039
|
}
|
|
1028
1040
|
}
|
|
1029
1041
|
return new Text(text, 0, 0);
|
|
@@ -1457,6 +1469,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
1457
1469
|
onSpawn: (kill) => {
|
|
1458
1470
|
kills.set(runId, kill);
|
|
1459
1471
|
},
|
|
1472
|
+
onClose: () => finishing.add(runId),
|
|
1460
1473
|
})
|
|
1461
1474
|
.then((outcome) => {
|
|
1462
1475
|
kills.delete(runId);
|
|
@@ -1501,6 +1514,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
1501
1514
|
})
|
|
1502
1515
|
.finally(() => {
|
|
1503
1516
|
cleanups.delete(runId);
|
|
1517
|
+
finishing.delete(runId);
|
|
1504
1518
|
cleanupStaging();
|
|
1505
1519
|
if (o.conversationId) busyHandles.delete(o.conversationId);
|
|
1506
1520
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@estebanforge/pi-ask-antigravity",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"type": "module",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@estebanforge/pi-ask-shared": "^0.1.
|
|
31
|
+
"@estebanforge/pi-ask-shared": "^0.1.3",
|
|
32
32
|
"@estebanforge/pi-tui-dialogs": "^0.1.1"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@earendil-works/pi-coding-agent": "^1.
|
|
46
|
+
"@earendil-works/pi-coding-agent": "^1.5.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"@earendil-works/pi-coding-agent": {
|