@timmyjl12/pi-agy-bridge 0.1.4 → 0.2.0

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.
@@ -0,0 +1,259 @@
1
+ {
2
+ "schema": 1,
3
+ "agyVersion": "1.5.12",
4
+ "collectedAt": "2026-11-19T14:27:32.780Z",
5
+ "helpFlags": [
6
+ "--add-dir",
7
+ "--agent",
8
+ "--continue",
9
+ "--conversation",
10
+ "--dangerously-skip-permissions",
11
+ "--disable-slash-commands",
12
+ "--effort",
13
+ "--input-format",
14
+ "--json-schema",
15
+ "--log-file",
16
+ "--mode",
17
+ "--model",
18
+ "--new-project",
19
+ "--output-format",
20
+ "--print",
21
+ "--print-timeout",
22
+ "--project",
23
+ "--prompt",
24
+ "--prompt-interactive",
25
+ "--remote-agent",
26
+ "--remote-control",
27
+ "--sandbox",
28
+ "--settings",
29
+ "-c",
30
+ "-i",
31
+ "-p"
32
+ ],
33
+ "acpHelpFlags": [
34
+ "--add-dir",
35
+ "--agent",
36
+ "--app-data-dir",
37
+ "--app_data_dir",
38
+ "--cli_dir_name",
39
+ "--cli_log_file",
40
+ "--cloud_code_endpoint",
41
+ "--dangerously-skip-permissions",
42
+ "--disable-telemetry",
43
+ "--disable_telemetry",
44
+ "--gemini-dir",
45
+ "--gemini_dir",
46
+ "--help",
47
+ "--ide-mcp-port",
48
+ "--ide_mcp_port",
49
+ "--include-default-customizations",
50
+ "--is_google3_workspace",
51
+ "--is_google_internal",
52
+ "--log-file",
53
+ "--login",
54
+ "--override_user_agent_name",
55
+ "--process-per-session",
56
+ "--sandbox",
57
+ "--stdio",
58
+ "--use_stubby_auth",
59
+ "--worker",
60
+ "-h"
61
+ ],
62
+ "models": [
63
+ {
64
+ "id": "claude-opus-5-5-high",
65
+ "label": "Claude Opus 5.5 (High)"
66
+ },
67
+ {
68
+ "id": "claude-opus-5-5-low",
69
+ "label": "Claude Opus 5.5 (Low)"
70
+ },
71
+ {
72
+ "id": "claude-opus-5-5-medium",
73
+ "label": "Claude Opus 5.5 (Medium)"
74
+ },
75
+ {
76
+ "id": "claude-sonnet-5-5-high",
77
+ "label": "Claude Sonnet 5.5 (High)"
78
+ },
79
+ {
80
+ "id": "claude-sonnet-5-5-low",
81
+ "label": "Claude Sonnet 5.5 (Low)"
82
+ },
83
+ {
84
+ "id": "claude-sonnet-5-5-medium",
85
+ "label": "Claude Sonnet 5.5 (Medium)"
86
+ },
87
+ {
88
+ "id": "gemini-3.8-flash-high",
89
+ "label": "Gemini 3.8 Flash (High)"
90
+ },
91
+ {
92
+ "id": "gemini-3.8-flash-low",
93
+ "label": "Gemini 3.8 Flash (Low)"
94
+ },
95
+ {
96
+ "id": "gemini-3.8-flash-medium",
97
+ "label": "Gemini 3.8 Flash (Medium)"
98
+ },
99
+ {
100
+ "id": "gemini-4-argon-high",
101
+ "label": "Gemini 4 Argon (High)"
102
+ },
103
+ {
104
+ "id": "gemini-4-argon-low",
105
+ "label": "Gemini 4 Argon (Low)"
106
+ },
107
+ {
108
+ "id": "gemini-4-argon-medium",
109
+ "label": "Gemini 4 Argon (Medium)"
110
+ },
111
+ {
112
+ "id": "gemini-4-hydrogen-high",
113
+ "label": "Gemini 4 Hydrogen (High)"
114
+ },
115
+ {
116
+ "id": "gemini-4-hydrogen-low",
117
+ "label": "Gemini 4 Hydrogen (Low)"
118
+ },
119
+ {
120
+ "id": "gemini-4-hydrogen-medium",
121
+ "label": "Gemini 4 Hydrogen (Medium)"
122
+ },
123
+ {
124
+ "id": "gemini-4-hydrogen-xhigh",
125
+ "label": "Gemini 4 Hydrogen (XHigh)"
126
+ },
127
+ {
128
+ "id": "gemini-4-neon-high",
129
+ "label": "Gemini 4 Neon (High)"
130
+ },
131
+ {
132
+ "id": "gemini-4-neon-low",
133
+ "label": "Gemini 4 Neon (Low)"
134
+ },
135
+ {
136
+ "id": "gemini-4-neon-medium",
137
+ "label": "Gemini 4 Neon (Medium)"
138
+ },
139
+ {
140
+ "id": "gemini-4-neon-xhigh",
141
+ "label": "Gemini 4 Neon (XHigh)"
142
+ },
143
+ {
144
+ "id": "gemini-pro-orchestrator-g1-pro",
145
+ "label": "Orchestrator (Argon)"
146
+ },
147
+ {
148
+ "id": "gemini-pro-orchestrator-neon",
149
+ "label": "Orchestrator (Neon)"
150
+ },
151
+ {
152
+ "id": "gpt-oss-120b-medium",
153
+ "label": "GPT-OSS 120B (Medium)"
154
+ }
155
+ ],
156
+ "initialize": {
157
+ "protocolVersion": 1,
158
+ "agentName": "Antigravity ACP Server",
159
+ "agentVersion": "1.5.12",
160
+ "capabilities": {
161
+ "_meta.antigravity.systemPrompt.append": true,
162
+ "auth.logout": true,
163
+ "loadSession": true,
164
+ "load_session": true,
165
+ "promptCapabilities.audio": false,
166
+ "promptCapabilities.embeddedContext": true,
167
+ "promptCapabilities.image": true,
168
+ "sessionCapabilities.additionalDirectories": true,
169
+ "sessionCapabilities.close": true,
170
+ "sessionCapabilities.list": true,
171
+ "sessionCapabilities.load": true,
172
+ "sessionCapabilities.resume": true,
173
+ "session_capabilities.additionalDirectories": true,
174
+ "session_capabilities.close": true,
175
+ "session_capabilities.list": true,
176
+ "session_capabilities.load": true,
177
+ "session_capabilities.resume": true
178
+ },
179
+ "authMethodIds": [
180
+ "agent-platform",
181
+ "gemini-api-key",
182
+ "oauth-business",
183
+ "oauth-personal"
184
+ ]
185
+ },
186
+ "session": {
187
+ "configOptions": [
188
+ {
189
+ "id": "mode",
190
+ "type": "select",
191
+ "values": [
192
+ "accept-edits",
193
+ "auto",
194
+ "default",
195
+ "plan"
196
+ ]
197
+ },
198
+ {
199
+ "id": "model",
200
+ "type": "select",
201
+ "values": [
202
+ "claude-opus-5-5",
203
+ "claude-sonnet-5-5",
204
+ "gemini-3.8-flash",
205
+ "gemini-4-argon",
206
+ "gemini-4-hydrogen",
207
+ "gemini-4-neon",
208
+ "gemini-pro-orchestrator-g1-pro",
209
+ "gemini-pro-orchestrator-neon",
210
+ "gpt-oss-120b-medium"
211
+ ]
212
+ },
213
+ {
214
+ "id": "thought_level",
215
+ "type": "select",
216
+ "values": [
217
+ "high",
218
+ "low",
219
+ "medium",
220
+ "xhigh"
221
+ ]
222
+ }
223
+ ],
224
+ "modeIds": [
225
+ "accept-edits",
226
+ "auto",
227
+ "default",
228
+ "plan"
229
+ ],
230
+ "modelIds": [
231
+ "claude-opus-5-5-high",
232
+ "claude-opus-5-5-low",
233
+ "claude-opus-5-5-medium",
234
+ "claude-sonnet-5-5-high",
235
+ "claude-sonnet-5-5-low",
236
+ "claude-sonnet-5-5-medium",
237
+ "gemini-3.8-flash-high",
238
+ "gemini-3.8-flash-low",
239
+ "gemini-3.8-flash-medium",
240
+ "gemini-4-argon-high",
241
+ "gemini-4-argon-low",
242
+ "gemini-4-argon-medium",
243
+ "gemini-4-hydrogen-high",
244
+ "gemini-4-hydrogen-low",
245
+ "gemini-4-hydrogen-medium",
246
+ "gemini-4-hydrogen-xhigh",
247
+ "gemini-4-neon-high",
248
+ "gemini-4-neon-low",
249
+ "gemini-4-neon-medium",
250
+ "gemini-4-neon-xhigh",
251
+ "gemini-pro-orchestrator-g1-pro",
252
+ "gemini-pro-orchestrator-neon",
253
+ "gpt-oss-120b-medium"
254
+ ],
255
+ "metaKeys": [
256
+ "antigravity"
257
+ ]
258
+ }
259
+ }
@@ -0,0 +1,260 @@
1
+ {
2
+ "schema": 1,
3
+ "agyVersion": "1.5.14",
4
+ "collectedAt": "2026-11-22T15:18:08.727Z",
5
+ "helpFlags": [
6
+ "--add-dir",
7
+ "--agent",
8
+ "--continue",
9
+ "--conversation",
10
+ "--dangerously-skip-permissions",
11
+ "--disable-slash-commands",
12
+ "--effort",
13
+ "--input-format",
14
+ "--json-schema",
15
+ "--log-file",
16
+ "--mode",
17
+ "--model",
18
+ "--new-project",
19
+ "--output-format",
20
+ "--print",
21
+ "--print-timeout",
22
+ "--project",
23
+ "--prompt",
24
+ "--prompt-interactive",
25
+ "--remote-agent",
26
+ "--remote-control",
27
+ "--sandbox",
28
+ "--settings",
29
+ "-c",
30
+ "-i",
31
+ "-p"
32
+ ],
33
+ "acpHelpFlags": [
34
+ "--add-dir",
35
+ "--agent",
36
+ "--app-data-dir",
37
+ "--app_data_dir",
38
+ "--cli_dir_name",
39
+ "--cli_log_file",
40
+ "--cloud_code_endpoint",
41
+ "--dangerously-skip-permissions",
42
+ "--disable-telemetry",
43
+ "--disable_telemetry",
44
+ "--gemini-dir",
45
+ "--gemini_dir",
46
+ "--help",
47
+ "--ide-mcp-port",
48
+ "--ide_mcp_port",
49
+ "--include-default-customizations",
50
+ "--is_google3_workspace",
51
+ "--is_google_internal",
52
+ "--log-file",
53
+ "--login",
54
+ "--override_user_agent_name",
55
+ "--process-per-session",
56
+ "--sandbox",
57
+ "--stdio",
58
+ "--use_stubby_auth",
59
+ "--worker",
60
+ "-h"
61
+ ],
62
+ "models": [
63
+ {
64
+ "id": "claude-opus-5-5-high",
65
+ "label": "Claude Opus 5.5 (High)"
66
+ },
67
+ {
68
+ "id": "claude-opus-5-5-low",
69
+ "label": "Claude Opus 5.5 (Low)"
70
+ },
71
+ {
72
+ "id": "claude-opus-5-5-medium",
73
+ "label": "Claude Opus 5.5 (Medium)"
74
+ },
75
+ {
76
+ "id": "claude-sonnet-5-5-high",
77
+ "label": "Claude Sonnet 5.5 (High)"
78
+ },
79
+ {
80
+ "id": "claude-sonnet-5-5-low",
81
+ "label": "Claude Sonnet 5.5 (Low)"
82
+ },
83
+ {
84
+ "id": "claude-sonnet-5-5-medium",
85
+ "label": "Claude Sonnet 5.5 (Medium)"
86
+ },
87
+ {
88
+ "id": "gemini-3.8-flash-high",
89
+ "label": "Gemini 3.8 Flash (High)"
90
+ },
91
+ {
92
+ "id": "gemini-3.8-flash-low",
93
+ "label": "Gemini 3.8 Flash (Low)"
94
+ },
95
+ {
96
+ "id": "gemini-3.8-flash-medium",
97
+ "label": "Gemini 3.8 Flash (Medium)"
98
+ },
99
+ {
100
+ "id": "gemini-4-argon-high",
101
+ "label": "Gemini 4 Argon (High)"
102
+ },
103
+ {
104
+ "id": "gemini-4-argon-low",
105
+ "label": "Gemini 4 Argon (Low)"
106
+ },
107
+ {
108
+ "id": "gemini-4-argon-medium",
109
+ "label": "Gemini 4 Argon (Medium)"
110
+ },
111
+ {
112
+ "id": "gemini-4-hydrogen-high",
113
+ "label": "Gemini 4 Hydrogen (High)"
114
+ },
115
+ {
116
+ "id": "gemini-4-hydrogen-low",
117
+ "label": "Gemini 4 Hydrogen (Low)"
118
+ },
119
+ {
120
+ "id": "gemini-4-hydrogen-medium",
121
+ "label": "Gemini 4 Hydrogen (Medium)"
122
+ },
123
+ {
124
+ "id": "gemini-4-hydrogen-xhigh",
125
+ "label": "Gemini 4 Hydrogen (XHigh)"
126
+ },
127
+ {
128
+ "id": "gemini-4-neon-high",
129
+ "label": "Gemini 4 Neon (High)"
130
+ },
131
+ {
132
+ "id": "gemini-4-neon-low",
133
+ "label": "Gemini 4 Neon (Low)"
134
+ },
135
+ {
136
+ "id": "gemini-4-neon-medium",
137
+ "label": "Gemini 4 Neon (Medium)"
138
+ },
139
+ {
140
+ "id": "gemini-4-neon-xhigh",
141
+ "label": "Gemini 4 Neon (XHigh)"
142
+ },
143
+ {
144
+ "id": "gemini-pro-orchestrator-g1-pro",
145
+ "label": "Orchestrator (Argon)"
146
+ },
147
+ {
148
+ "id": "gemini-pro-orchestrator-neon",
149
+ "label": "Orchestrator (Neon)"
150
+ },
151
+ {
152
+ "id": "gpt-oss-120b-medium",
153
+ "label": "GPT-OSS 120B (Medium)"
154
+ }
155
+ ],
156
+ "initialize": {
157
+ "protocolVersion": 1,
158
+ "agentName": "Antigravity ACP Server",
159
+ "agentVersion": "1.5.14",
160
+ "capabilities": {
161
+ "_meta.antigravity.systemPrompt.append": true,
162
+ "auth.logout": true,
163
+ "loadSession": true,
164
+ "load_session": true,
165
+ "promptCapabilities.audio": false,
166
+ "promptCapabilities.embeddedContext": true,
167
+ "promptCapabilities.image": true,
168
+ "sessionCapabilities.additionalDirectories": true,
169
+ "sessionCapabilities.close": true,
170
+ "sessionCapabilities.list": true,
171
+ "sessionCapabilities.load": true,
172
+ "sessionCapabilities.resume": true,
173
+ "session_capabilities.additionalDirectories": true,
174
+ "session_capabilities.close": true,
175
+ "session_capabilities.list": true,
176
+ "session_capabilities.load": true,
177
+ "session_capabilities.resume": true
178
+ },
179
+ "authMethodIds": [
180
+ "agent-platform",
181
+ "gemini-api-key",
182
+ "oauth-business",
183
+ "oauth-personal"
184
+ ]
185
+ },
186
+ "session": {
187
+ "configOptions": [
188
+ {
189
+ "id": "mode",
190
+ "type": "select",
191
+ "values": [
192
+ "accept-edits",
193
+ "auto",
194
+ "default",
195
+ "plan"
196
+ ]
197
+ },
198
+ {
199
+ "id": "model",
200
+ "type": "select",
201
+ "values": [
202
+ "claude-opus-5-5",
203
+ "claude-sonnet-5-5",
204
+ "gemini-3.8-flash",
205
+ "gemini-4-argon",
206
+ "gemini-4-hydrogen",
207
+ "gemini-4-neon",
208
+ "gemini-pro-orchestrator-g1-pro",
209
+ "gemini-pro-orchestrator-neon",
210
+ "gpt-oss-120b-medium"
211
+ ]
212
+ },
213
+ {
214
+ "id": "thought_level",
215
+ "type": "select",
216
+ "values": [
217
+ "high",
218
+ "low",
219
+ "medium",
220
+ "xhigh"
221
+ ]
222
+ }
223
+ ],
224
+ "modeIds": [
225
+ "accept-edits",
226
+ "auto",
227
+ "default",
228
+ "plan"
229
+ ],
230
+ "modelIds": [
231
+ "claude-opus-5-5-high",
232
+ "claude-opus-5-5-low",
233
+ "claude-opus-5-5-medium",
234
+ "claude-sonnet-5-5-high",
235
+ "claude-sonnet-5-5-low",
236
+ "claude-sonnet-5-5-medium",
237
+ "gemini-3.8-flash-high",
238
+ "gemini-3.8-flash-low",
239
+ "gemini-3.8-flash-medium",
240
+ "gemini-4-argon-high",
241
+ "gemini-4-argon-low",
242
+ "gemini-4-argon-medium",
243
+ "gemini-4-hydrogen-high",
244
+ "gemini-4-hydrogen-low",
245
+ "gemini-4-hydrogen-medium",
246
+ "gemini-4-hydrogen-xhigh",
247
+ "gemini-4-neon-high",
248
+ "gemini-4-neon-low",
249
+ "gemini-4-neon-medium",
250
+ "gemini-4-neon-xhigh",
251
+ "gemini-pro-orchestrator-g1-pro",
252
+ "gemini-pro-orchestrator-neon",
253
+ "gpt-oss-120b-medium"
254
+ ],
255
+ "metaKeys": [
256
+ "antigravity"
257
+ ]
258
+ },
259
+ "fileTokenStorageTrigger": "SSH_CONNECTION"
260
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "agy": {
4
- "tested": ["1.5.3", "1.5.8", "1.5.9"],
4
+ "tested": ["1.5.3", "1.5.8", "1.5.9", "1.5.12", "1.5.14"],
5
5
  "minimum": "1.5.1",
6
6
  "knownBad": []
7
7
  },
package/compat/probe.ts CHANGED
@@ -40,7 +40,7 @@ export const PROBE_PROTOCOL_VERSION = 1;
40
40
  export const PROBE_CLIENT_INFO = {
41
41
  name: "pi-agy-bridge-compat-probe",
42
42
  title: "pi-agy-bridge zero-cost compat probe",
43
- version: "0.1.4",
43
+ version: "0.2.0",
44
44
  } as const;
45
45
 
46
46
  /** One failed probe step. `step` names the command or exchange. */
@@ -70,6 +70,9 @@ export interface AcpHandshake {
70
70
  export interface ProbeRunner {
71
71
  runCommand(args: string[]): Promise<CommandResult>;
72
72
  acpHandshake(): Promise<AcpHandshake>;
73
+ /** Does agy switch to its per-folder token file when SSH_CONNECTION is set (what extra accounts rely on)? Returns
74
+ * the trigger that worked, or undefined. Optional: recorded fixtures and older runners do not have it. */
75
+ fileStorageTrigger?(): Promise<string | undefined>;
73
76
  }
74
77
 
75
78
  export interface ProbeModel {
@@ -108,6 +111,9 @@ export interface ProbeSnapshot {
108
111
  models: ProbeModel[];
109
112
  initialize: ProbeInitialize;
110
113
  session: ProbeSession;
114
+ /** `SSH_CONNECTION` when agy used per-folder token storage under that variable (multi-account support); absent when
115
+ * not measured. A baseline that has it and a current snapshot that lost it is breaking drift. */
116
+ fileTokenStorageTrigger?: string;
111
117
  }
112
118
 
113
119
  export interface ProbeDiff {
@@ -308,6 +314,15 @@ export async function collectSnapshot(runner: ProbeRunner, options: CollectOptio
308
314
  if (err instanceof ProbeError) throw err;
309
315
  throw new ProbeError("agy acp handshake", errorMessage(err));
310
316
  }
317
+ let trigger: string | undefined;
318
+ if (runner.fileStorageTrigger) {
319
+ try {
320
+ trigger = await runner.fileStorageTrigger();
321
+ } catch (err) {
322
+ if (err instanceof ProbeError) throw err;
323
+ throw new ProbeError("agy acp file-storage check", errorMessage(err));
324
+ }
325
+ }
311
326
 
312
327
  return {
313
328
  schema: PROBE_SCHEMA,
@@ -318,6 +333,7 @@ export async function collectSnapshot(runner: ProbeRunner, options: CollectOptio
318
333
  models: parseModels(outputOf(models)),
319
334
  initialize: initializeSnapshot(handshake.initialize),
320
335
  session: sessionSnapshot(handshake.sessionNew),
336
+ ...(trigger ? { fileTokenStorageTrigger: trigger } : {}),
321
337
  };
322
338
  }
323
339
 
@@ -373,6 +389,13 @@ export function diffSnapshots(baseline: ProbeSnapshot, current: ProbeSnapshot):
373
389
  );
374
390
  }
375
391
 
392
+ if (baseline.fileTokenStorageTrigger && current.fileTokenStorageTrigger !== baseline.fileTokenStorageTrigger) {
393
+ breaking.push(
394
+ `per-account token storage trigger lost: ${baseline.fileTokenStorageTrigger} -> ${current.fileTokenStorageTrigger ?? "none"} (extra accounts would stop; see UPGRADING.md)`,
395
+ );
396
+ } else if (!baseline.fileTokenStorageTrigger && current.fileTokenStorageTrigger) {
397
+ additive.push(`per-account token storage trigger recorded: ${current.fileTokenStorageTrigger}`);
398
+ }
376
399
  compareSets("agy flag", baseline.helpFlags, current.helpFlags);
377
400
  compareSets("agy acp flag", baseline.acpHelpFlags, current.acpHelpFlags);
378
401
  compareSets("auth method", baseline.initialize.authMethodIds, current.initialize.authMethodIds);
@@ -523,6 +546,7 @@ export function serializeSnapshot(snapshot: ProbeSnapshot): string {
523
546
  modelIds: [...snapshot.session.modelIds].sort(),
524
547
  metaKeys: [...snapshot.session.metaKeys].sort(),
525
548
  },
549
+ ...(snapshot.fileTokenStorageTrigger ? { fileTokenStorageTrigger: snapshot.fileTokenStorageTrigger } : {}),
526
550
  };
527
551
  return `${JSON.stringify(ordered, null, "\t")}\n`;
528
552
  }
@@ -633,6 +657,7 @@ function parseBaselineSnapshot(raw: unknown, path: string): ProbeSnapshot {
633
657
  modelIds: session.modelIds as string[],
634
658
  metaKeys: session.metaKeys as string[],
635
659
  },
660
+ ...(typeof root.fileTokenStorageTrigger === "string" ? { fileTokenStorageTrigger: root.fileTokenStorageTrigger } : {}),
636
661
  };
637
662
  }
638
663
 
@@ -821,5 +846,49 @@ export function createAgyRunner(options: AgyRunnerOptions = {}): AgyProbeRunner
821
846
  }
822
847
  };
823
848
 
824
- return { agyBin, runCommand, acpHandshake, dispose };
849
+ /** Start `agy acp` with SSH_CONNECTION on an empty private gemini dir and read agy's own log for the storage line.
850
+ * agy resolves its token store lazily (measured on 1.5.14: the line appears while `session/new` runs), so one
851
+ * `session/new` is sent; with no login in the empty dir it fails with "Authentication required", which is expected.
852
+ * No prompt is sent and no existing login is touched. */
853
+ const fileStorageTrigger = async (): Promise<string | undefined> => {
854
+ const cwd = await ensureWorkspace();
855
+ const geminiDir = await mkdtemp(join(tempRoot, "pi-agy-probe-storage-"));
856
+ const logFile = join(geminiDir, "acp.log");
857
+ const child = trackSpawnedIdentity(
858
+ spawn(agyBin, ["acp", "--gemini-dir", geminiDir, "--log-file", logFile], {
859
+ cwd,
860
+ windowsHide: true,
861
+ env: { ...env, SSH_CONNECTION: "pi-agy-probe 0 pi-agy-probe 0" },
862
+ }),
863
+ agyBin,
864
+ );
865
+ const session = new JsonRpcSession({
866
+ send: (frame: string) => {
867
+ child.stdin?.write(`${frame}\n`);
868
+ },
869
+ defaultTimeoutMs: handshakeTimeoutMs,
870
+ });
871
+ child.stdout?.setEncoding("utf8");
872
+ child.stdout?.on("data", (chunk: string) => session.feed(chunk));
873
+ child.on("error", (err) => session.abortAll(`could not start ${agyBin}: ${errorMessage(err)}`));
874
+ child.on("close", (code) => session.abortAll(`agy acp exited with code ${code ?? "?"} during the file-storage check`));
875
+ try {
876
+ await session.request("initialize", INITIALIZE_PARAMS, handshakeTimeoutMs);
877
+ await session.request("session/new", { cwd, mcpServers: [] }, handshakeTimeoutMs).catch(() => undefined);
878
+ const deadline = Date.now() + 10_000;
879
+ while (Date.now() < deadline) {
880
+ const text = await readFile(logFile, "utf8").catch(() => "");
881
+ if (/Using file-based token storage/.test(text)) return "SSH_CONNECTION";
882
+ if (/authenticated successfully as|Silent sign-in failed/.test(text)) return undefined;
883
+ await new Promise((resolveDelay) => setTimeout(resolveDelay, 100));
884
+ }
885
+ return undefined;
886
+ } finally {
887
+ session.abortAll("probe finished");
888
+ await terminateProcessTree(child);
889
+ await rm(geminiDir, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 }).catch(() => undefined);
890
+ }
891
+ };
892
+
893
+ return { agyBin, runCommand, acpHandshake, fileStorageTrigger, dispose };
825
894
  }
@@ -40,6 +40,12 @@ FINGERPRINT = SCRIPT_DIR / "fingerprint_proto.py"
40
40
  PYPI_JSON = "https://pypi.org/pypi/google-antigravity/json"
41
41
  EPHEMERAL_PYTHON = "3.13"
42
42
 
43
+ # The re-record command, printed verbatim in every hint. Do NOT swap this for
44
+ # `npm run compat:sdk -- --record`: PowerShell consumes the first `--`, so that
45
+ # form silently runs a plain check and records nothing (UPGRADING.md §1). The
46
+ # direct `uv run` form works in every shell.
47
+ RECORD_HINT = "uv run --project compat/sdk-canary python compat/sdk-canary/canary.py --record"
48
+
43
49
  sys.path.insert(0, str(SCRIPT_DIR))
44
50
  from diff_fingerprint import diff as diff_contracts # noqa: E402
45
51
 
@@ -175,7 +181,7 @@ def print_verdict(old: dict, new: dict, breaking: list[str], additive: list[str]
175
181
  if breaking:
176
182
  print("verdict: BREAKING - read the SDK release notes, adjust the adapter/canary, re-record after review.")
177
183
  return 2
178
- print("verdict: additive only - review, then re-record the baseline (npm run compat:sdk -- --record).")
184
+ print(f"verdict: additive only - review, then re-record the baseline ({RECORD_HINT}).")
179
185
  return 1
180
186
 
181
187
 
@@ -190,7 +196,7 @@ def check_installed() -> int:
190
196
  path, exact = find_baseline(summary["version"])
191
197
  if path is None:
192
198
  print(f"no baseline for google-antigravity {summary['version']}.")
193
- print(" record it once: npm run compat:sdk -- --record")
199
+ print(f" record it once: {RECORD_HINT}")
194
200
  return 1
195
201
  old = json.loads(path.read_text(encoding="utf-8"))
196
202
  breaking, additive = diff_contracts(old, fresh)
@@ -209,7 +215,7 @@ def check_latest() -> int:
209
215
  print("verdict: identical - no SDK contract drift to check.")
210
216
  return 0
211
217
  if newest_baseline is None:
212
- print("no baseline recorded yet; run npm run compat:sdk -- --record first (pinned version).")
218
+ print(f"no baseline recorded yet; run {RECORD_HINT} first (pinned version).")
213
219
  return 1
214
220
  print(f"fingerprinting {newest} in an ephemeral uv env (uv run --no-project --python {EPHEMERAL_PYTHON} --with google-antigravity=={newest}) ...")
215
221
  with tempfile.TemporaryDirectory(prefix="pi-agy-sdk-canary-") as tmp: