@eddyskywalker/dsh-chatgpt-subscription 0.75.0 → 0.75.2

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +14 -9
  3. package/lib/client.js +36 -23
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +641 -124
  6. package/lib/tool-result-pruner.js +1 -1
  7. package/lib/types/client/antigravity-acp/AntigravityAcpSection.d.ts.map +1 -1
  8. package/lib/types/client/antigravity-acp/locales.d.ts +6 -12
  9. package/lib/types/client/antigravity-acp/locales.d.ts.map +1 -1
  10. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
  11. package/lib/types/client/locales-ru/antigravity-acp.d.ts.map +1 -1
  12. package/lib/types/compat.d.ts +1 -1
  13. package/lib/types/entry-progress-updates.d.ts +1 -1
  14. package/lib/types/entry-tool-result-pruner.d.ts +1 -1
  15. package/lib/types/host/antigravity-acp/adapter.d.ts +17 -0
  16. package/lib/types/host/antigravity-acp/adapter.d.ts.map +1 -1
  17. package/lib/types/host/antigravity-acp/auth-cache.d.ts +11 -2
  18. package/lib/types/host/antigravity-acp/auth-cache.d.ts.map +1 -1
  19. package/lib/types/host/antigravity-acp/binary.d.ts +68 -0
  20. package/lib/types/host/antigravity-acp/binary.d.ts.map +1 -1
  21. package/lib/types/host/antigravity-acp/catalog.d.ts.map +1 -1
  22. package/lib/types/host/antigravity-acp/errors.d.ts +10 -0
  23. package/lib/types/host/antigravity-acp/errors.d.ts.map +1 -1
  24. package/lib/types/host/antigravity-acp/history.d.ts +26 -0
  25. package/lib/types/host/antigravity-acp/history.d.ts.map +1 -1
  26. package/lib/types/host/antigravity-acp/login.d.ts +22 -6
  27. package/lib/types/host/antigravity-acp/login.d.ts.map +1 -1
  28. package/lib/types/host/antigravity-acp/mcp-bridge.d.ts +9 -2
  29. package/lib/types/host/antigravity-acp/mcp-bridge.d.ts.map +1 -1
  30. package/lib/types/host/antigravity-acp/routes.d.ts +23 -4
  31. package/lib/types/host/antigravity-acp/routes.d.ts.map +1 -1
  32. package/lib/types/host/antigravity-acp/subagent.d.ts +32 -0
  33. package/lib/types/host/antigravity-acp/subagent.d.ts.map +1 -1
  34. package/lib/types/host/antigravity-acp/types.d.ts +15 -0
  35. package/lib/types/host/antigravity-acp/types.d.ts.map +1 -1
  36. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  37. package/lib/types/host/kimi-code/mapper.d.ts +13 -0
  38. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
  39. package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
  40. package/lib/types/host/kimi-code/session-cache-state.d.ts +10 -0
  41. package/lib/types/host/kimi-code/session-cache-state.d.ts.map +1 -1
  42. package/lib/types/index.d.ts +4 -4
  43. package/lib/types/index.d.ts.map +1 -1
  44. package/lib/types/shared/kimi-code-contracts.d.ts +10 -2
  45. package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
  46. package/package.json +1 -1
@@ -21,7 +21,7 @@ import { Service } from "@deepseek-ai/cordis";
21
21
  * `peerDependencies` 里没有它们(也不该有:装不装它们不该由本包决定),
22
22
  * 所以全部按**结构契约**描述:`SessionLike` / `SessionEventLike` /
23
23
  * `ToolResultMessageLike` 都是本文件里的局部接口,`deepFreeze` 也是本地实现。
24
- * 这样从 0.1.2-alpha.5 到 0.2.2-rc.1 的每一代 harness 都能解析这个模块。
24
+ * 这样从 0.1.2-alpha.5 到 0.2.2-rc.3 的每一代 harness 都能解析这个模块。
25
25
  *
26
26
  * 与官方实现的一致性以测试锁定:`test/tool-result-pruner.test.ts` 覆盖配置校验、
27
27
  * 代理对不劈开、非文本块不计价、以及 `compaction/prune` 与替换事件的先后顺序。
@@ -1 +1 @@
1
- {"version":3,"file":"AntigravityAcpSection.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity-acp/AntigravityAcpSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAS/D,qDAAqD;AACrD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAyZtE"}
1
+ {"version":3,"file":"AntigravityAcpSection.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity-acp/AntigravityAcpSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAS/D,qDAAqD;AACrD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAoatE"}
@@ -26,7 +26,6 @@ export declare const zh: {
26
26
  readonly signInAgain: "重新登录";
27
27
  readonly signInStarting: "正在启动…";
28
28
  readonly signInSuccess: "已发起登录:浏览器由 Antigravity CLI 打开,完成授权后状态会自动变为「已登录」。";
29
- readonly signInAlready: "当前已是登录状态,无需重复登录。";
30
29
  readonly signInHintSummary: "登录是怎么完成的?";
31
30
  readonly signInHint: "登录由 Antigravity CLI 自己完成:点击后它会打开浏览器,完成后回到这里刷新状态。本插件不读取、不保存你的 Google 凭据。";
32
31
  readonly signInHeadless: "无界面环境请在终端执行 agy acp --login,然后回到此页刷新。";
@@ -81,7 +80,7 @@ export declare const zh: {
81
80
  readonly scopeHintSummary: "展开看这四条限制";
82
81
  readonly scopeHint: "这些是 ACP 与官方 Agent 的客观限制,本线路不做绕过:";
83
82
  readonly scopePrompt: "ACP 没有独立的 system 提示槽位:DSH 的系统提示会作为提示首段随会话发送,官方 Agent 自身的系统提示无法移除。";
84
- readonly scopeHistory: "每轮对话按 DSH 的完整历史重建 ACP 会话;历史被压缩或改写时会重新建立会话,而不是复用可能已与 DSH 不一致的旧会话。";
83
+ readonly scopeHistory: "正常结束后会话随进程一起停放供下次复用:下一条消息若前缀指纹与工具目录未变,只发送增量;历史被压缩或改写、工具集变化或进程死亡时才重建会话并重放带锚点的历史。";
85
84
  readonly scopeTools: "作为主模型时工具由 DSH 执行并把关;作为子代理时子进程使用官方 Agent 自己的工具集。";
86
85
  readonly scopeQuota: "官方服务端不公布剩余额度,因此本卡片不显示任何百分比或余额。";
87
86
  readonly error: "操作失败:{detail}";
@@ -118,7 +117,6 @@ export declare const en: {
118
117
  readonly signInAgain: "Sign in again";
119
118
  readonly signInStarting: "Starting...";
120
119
  readonly signInSuccess: "Sign-in started: the Antigravity CLI opens the browser, and the status here turns to signed in once you approve it.";
121
- readonly signInAlready: "This line is already signed in; there is nothing to do.";
122
120
  readonly signInHintSummary: "How does sign-in work?";
123
121
  readonly signInHint: "The Antigravity CLI performs the sign-in itself: it opens the browser, and you come back here to refresh the state. This plugin never reads or stores your Google credentials.";
124
122
  readonly signInHeadless: "On a headless host run agy acp --login in a terminal, then refresh here.";
@@ -173,7 +171,7 @@ export declare const en: {
173
171
  readonly scopeHintSummary: "Show the four limits";
174
172
  readonly scopeHint: "These are objective ACP and official-agent limits; this line does not work around them:";
175
173
  readonly scopePrompt: "ACP has no separate system-prompt slot: the DSH system prompt travels as the head of the prompt, and the official agent's own system prompt cannot be removed.";
176
- readonly scopeHistory: "Every turn rebuilds the ACP session from the complete DSH history; when that history is compacted or rewritten a new session is created instead of resuming one that may no longer match.";
174
+ readonly scopeHistory: "After a normal finish the session parks with its process for reuse: the next message sends only the increment if the prefix fingerprint and tool catalogue are unchanged, and only a compacted or rewritten history, a changed tool set, or a dead process triggers a rebuild with an anchored replay.";
177
175
  readonly scopeTools: "As a main model its tool calls are executed and gated by DSH; as a subagent the child runs the official agent's own tools.";
178
176
  readonly scopeQuota: "The official server publishes no remaining quota, so this card shows no percentage and no balance.";
179
177
  readonly error: "Action failed: {detail}";
@@ -211,7 +209,6 @@ export declare const dictionaries: {
211
209
  readonly signInAgain: "重新登录";
212
210
  readonly signInStarting: "正在启动…";
213
211
  readonly signInSuccess: "已发起登录:浏览器由 Antigravity CLI 打开,完成授权后状态会自动变为「已登录」。";
214
- readonly signInAlready: "当前已是登录状态,无需重复登录。";
215
212
  readonly signInHintSummary: "登录是怎么完成的?";
216
213
  readonly signInHint: "登录由 Antigravity CLI 自己完成:点击后它会打开浏览器,完成后回到这里刷新状态。本插件不读取、不保存你的 Google 凭据。";
217
214
  readonly signInHeadless: "无界面环境请在终端执行 agy acp --login,然后回到此页刷新。";
@@ -266,7 +263,7 @@ export declare const dictionaries: {
266
263
  readonly scopeHintSummary: "展开看这四条限制";
267
264
  readonly scopeHint: "这些是 ACP 与官方 Agent 的客观限制,本线路不做绕过:";
268
265
  readonly scopePrompt: "ACP 没有独立的 system 提示槽位:DSH 的系统提示会作为提示首段随会话发送,官方 Agent 自身的系统提示无法移除。";
269
- readonly scopeHistory: "每轮对话按 DSH 的完整历史重建 ACP 会话;历史被压缩或改写时会重新建立会话,而不是复用可能已与 DSH 不一致的旧会话。";
266
+ readonly scopeHistory: "正常结束后会话随进程一起停放供下次复用:下一条消息若前缀指纹与工具目录未变,只发送增量;历史被压缩或改写、工具集变化或进程死亡时才重建会话并重放带锚点的历史。";
270
267
  readonly scopeTools: "作为主模型时工具由 DSH 执行并把关;作为子代理时子进程使用官方 Agent 自己的工具集。";
271
268
  readonly scopeQuota: "官方服务端不公布剩余额度,因此本卡片不显示任何百分比或余额。";
272
269
  readonly error: "操作失败:{detail}";
@@ -303,7 +300,6 @@ export declare const dictionaries: {
303
300
  readonly signInAgain: "重新登录";
304
301
  readonly signInStarting: "正在启动…";
305
302
  readonly signInSuccess: "已发起登录:浏览器由 Antigravity CLI 打开,完成授权后状态会自动变为「已登录」。";
306
- readonly signInAlready: "当前已是登录状态,无需重复登录。";
307
303
  readonly signInHintSummary: "登录是怎么完成的?";
308
304
  readonly signInHint: "登录由 Antigravity CLI 自己完成:点击后它会打开浏览器,完成后回到这里刷新状态。本插件不读取、不保存你的 Google 凭据。";
309
305
  readonly signInHeadless: "无界面环境请在终端执行 agy acp --login,然后回到此页刷新。";
@@ -358,7 +354,7 @@ export declare const dictionaries: {
358
354
  readonly scopeHintSummary: "展开看这四条限制";
359
355
  readonly scopeHint: "这些是 ACP 与官方 Agent 的客观限制,本线路不做绕过:";
360
356
  readonly scopePrompt: "ACP 没有独立的 system 提示槽位:DSH 的系统提示会作为提示首段随会话发送,官方 Agent 自身的系统提示无法移除。";
361
- readonly scopeHistory: "每轮对话按 DSH 的完整历史重建 ACP 会话;历史被压缩或改写时会重新建立会话,而不是复用可能已与 DSH 不一致的旧会话。";
357
+ readonly scopeHistory: "正常结束后会话随进程一起停放供下次复用:下一条消息若前缀指纹与工具目录未变,只发送增量;历史被压缩或改写、工具集变化或进程死亡时才重建会话并重放带锚点的历史。";
362
358
  readonly scopeTools: "作为主模型时工具由 DSH 执行并把关;作为子代理时子进程使用官方 Agent 自己的工具集。";
363
359
  readonly scopeQuota: "官方服务端不公布剩余额度,因此本卡片不显示任何百分比或余额。";
364
360
  readonly error: "操作失败:{detail}";
@@ -395,7 +391,6 @@ export declare const dictionaries: {
395
391
  readonly signInAgain: "Sign in again";
396
392
  readonly signInStarting: "Starting...";
397
393
  readonly signInSuccess: "Sign-in started: the Antigravity CLI opens the browser, and the status here turns to signed in once you approve it.";
398
- readonly signInAlready: "This line is already signed in; there is nothing to do.";
399
394
  readonly signInHintSummary: "How does sign-in work?";
400
395
  readonly signInHint: "The Antigravity CLI performs the sign-in itself: it opens the browser, and you come back here to refresh the state. This plugin never reads or stores your Google credentials.";
401
396
  readonly signInHeadless: "On a headless host run agy acp --login in a terminal, then refresh here.";
@@ -450,7 +445,7 @@ export declare const dictionaries: {
450
445
  readonly scopeHintSummary: "Show the four limits";
451
446
  readonly scopeHint: "These are objective ACP and official-agent limits; this line does not work around them:";
452
447
  readonly scopePrompt: "ACP has no separate system-prompt slot: the DSH system prompt travels as the head of the prompt, and the official agent's own system prompt cannot be removed.";
453
- readonly scopeHistory: "Every turn rebuilds the ACP session from the complete DSH history; when that history is compacted or rewritten a new session is created instead of resuming one that may no longer match.";
448
+ readonly scopeHistory: "After a normal finish the session parks with its process for reuse: the next message sends only the increment if the prefix fingerprint and tool catalogue are unchanged, and only a compacted or rewritten history, a changed tool set, or a dead process triggers a rebuild with an anchored replay.";
454
449
  readonly scopeTools: "As a main model its tool calls are executed and gated by DSH; as a subagent the child runs the official agent's own tools.";
455
450
  readonly scopeQuota: "The official server publishes no remaining quota, so this card shows no percentage and no balance.";
456
451
  readonly error: "Action failed: {detail}";
@@ -487,7 +482,6 @@ export declare const dictionaries: {
487
482
  readonly signInAgain: "Sign in again";
488
483
  readonly signInStarting: "Starting...";
489
484
  readonly signInSuccess: "Sign-in started: the Antigravity CLI opens the browser, and the status here turns to signed in once you approve it.";
490
- readonly signInAlready: "This line is already signed in; there is nothing to do.";
491
485
  readonly signInHintSummary: "How does sign-in work?";
492
486
  readonly signInHint: "The Antigravity CLI performs the sign-in itself: it opens the browser, and you come back here to refresh the state. This plugin never reads or stores your Google credentials.";
493
487
  readonly signInHeadless: "On a headless host run agy acp --login in a terminal, then refresh here.";
@@ -542,7 +536,7 @@ export declare const dictionaries: {
542
536
  readonly scopeHintSummary: "Show the four limits";
543
537
  readonly scopeHint: "These are objective ACP and official-agent limits; this line does not work around them:";
544
538
  readonly scopePrompt: "ACP has no separate system-prompt slot: the DSH system prompt travels as the head of the prompt, and the official agent's own system prompt cannot be removed.";
545
- readonly scopeHistory: "Every turn rebuilds the ACP session from the complete DSH history; when that history is compacted or rewritten a new session is created instead of resuming one that may no longer match.";
539
+ readonly scopeHistory: "After a normal finish the session parks with its process for reuse: the next message sends only the increment if the prefix fingerprint and tool catalogue are unchanged, and only a compacted or rewritten history, a changed tool set, or a dead process triggers a rebuild with an anchored replay.";
546
540
  readonly scopeTools: "As a main model its tool calls are executed and gated by DSH; as a subagent the child runs the official agent's own tools.";
547
541
  readonly scopeQuota: "The official server publishes no remaining quota, so this card shows no percentage and no balance.";
548
542
  readonly error: "Action failed: {detail}";
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity-acp/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,wBAAwB,CAAA;AAEvD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGL,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity-acp/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,wBAAwB,CAAA;AAEvD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGL,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AA2BvE,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AA4GD,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAmxBhG"}
1
+ {"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AA2BvE,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AA4GD,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAsxBhG"}
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity-acp.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/antigravity-acp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAE5E,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAoG9D,CAAA"}
1
+ {"version":3,"file":"antigravity-acp.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/antigravity-acp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAE5E,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAmG9D,CAAA"}
@@ -76,7 +76,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
76
76
  * `test/responses-client.test.ts` asserts the two agree, so a release that
77
77
  * forgets this constant fails the suite instead of shipping quietly.
78
78
  */
79
- export declare const PLUGIN_VERSION: "0.75.0";
79
+ export declare const PLUGIN_VERSION: "0.75.2";
80
80
  export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
81
81
  export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
82
82
  export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 「进展更新」的宿主入口 —— 本包的**第二个组件**(loader 行)。
3
3
  *
4
- * 这个包原先只有一行:`src/index.ts` 一个 `apply` 同时挂着十二条订阅线路、共享
4
+ * 这个包原先只有一行:`src/index.ts` 一个 `apply` 同时挂着十三条订阅线路、共享
5
5
  * 内核和若干与线路无关的子系统,管理页因此只显示「包含的组件 共1个」。进展更新
6
6
  * 是其中最独立的一块:它是一个**不结束回合**的 `progress_update` 工具、一段系统
7
7
  * 提示词引导、一个只读取数的 HTTP 路由,跟任何线路、任何号池都没有关系。把它单独
@@ -18,7 +18,7 @@
18
18
  * `peerDependencies` 里没有它们(也不该有:装不装它们不该由本包决定),
19
19
  * 所以全部按**结构契约**描述:`SessionLike` / `SessionEventLike` /
20
20
  * `ToolResultMessageLike` 都是本文件里的局部接口,`deepFreeze` 也是本地实现。
21
- * 这样从 0.1.2-alpha.5 到 0.2.2-rc.1 的每一代 harness 都能解析这个模块。
21
+ * 这样从 0.1.2-alpha.5 到 0.2.2-rc.3 的每一代 harness 都能解析这个模块。
22
22
  *
23
23
  * 与官方实现的一致性以测试锁定:`test/tool-result-pruner.test.ts` 覆盖配置校验、
24
24
  * 代理对不劈开、非文本块不计价、以及 `compaction/prune` 与替换事件的先后顺序。
@@ -225,6 +225,23 @@ export declare class AntigravityAcpAdapter extends LlmAdapter {
225
225
  * agent's own start-up wait on the next message.
226
226
  */
227
227
  private closeTurn;
228
+ /**
229
+ * Account for one turn exactly once, then hand its process back.
230
+ *
231
+ * Every ending goes through here: a completed stream parks the conversation, an
232
+ * abandoned one releases the process, and a turn whose live entry was replaced
233
+ * releases it too - it no longer owns this session's conversation, so parking it
234
+ * would replace the parked one with a transcript nobody is talking to.
235
+ *
236
+ * The `closed` flag is what makes this safe to call from a second path: the pump
237
+ * finishing after a cancellation, and a cancellation arriving after the pump
238
+ * finished, both used to be able to decrement `activeTurns` or release a process
239
+ * twice.
240
+ *
241
+ * @param turn - The turn being ended.
242
+ * @param parkAllowed - Whether a conversation may be left parked behind it.
243
+ */
244
+ private finishTurn;
228
245
  /**
229
246
  * Ask the agent to stop the prompt this turn left running.
230
247
  *
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EACL,UAAU,EAGV,KAAK,eAAe,IAAI,sBAAsB,EAC9C,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAA;AAU7B,OAAO,EAIL,KAAK,qBAAqB,EAE3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EACV,sBAAsB,EAEtB,sBAAsB,EACvB,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAE,SAAS,EAAY,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAiB7E,OAAO,KAAK,EAA0B,2BAA2B,EAAE,MAAM,eAAe,CAAA;AACxF,OAAO,EAGL,WAAW,EAKZ,MAAM,YAAY,CAAA;AAcnB;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,SAAU,CAAA;AAElD,kFAAkF;AAClF,eAAO,MAAM,0BAA0B,SAAyB,CAAA;AAEhE,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAE3C,8CAA8C;AAC9C,eAAO,MAAM,+BAA+B,SAAU,CAAA;AAEtD,qGAAqG;AACrG,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,MAAM,CAAA;AAEnD;;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tB,oFAAoF;YACtE,OAAO;IA0BrB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,GAAG;CAGZ;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,QAKzB,CAAA;AAsVX,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -17,8 +17,17 @@
17
17
  * @module dsh-chatgpt-subscription/host/antigravity-acp/auth-cache
18
18
  */
19
19
  import type { AntigravityAcpAuthDto } from '../../shared/antigravity-acp-contracts.ts';
20
- /** How long one probe answers for. */
21
- export declare const AUTH_CACHE_TTL_MS = 60000;
20
+ /**
21
+ * How long one probe answers for.
22
+ *
23
+ * Ten minutes, not one. A probe is a whole `agy` process plus a `session/new`
24
+ * against Google, and the card, the hub overview and the composer badge each poll
25
+ * this route - at a one-minute window that was a process launch per minute for a
26
+ * question whose answer changes only when the user signs in or out. Those two
27
+ * events are exactly what invalidates the cache (`login/start`, `login/status`,
28
+ * the refresh click), so the window does not delay a real state change.
29
+ */
30
+ export declare const AUTH_CACHE_TTL_MS: number;
22
31
  /** The cache itself. */
23
32
  export declare class AcpAuthCache {
24
33
  private readonly probe;
@@ -1 +1 @@
1
- {"version":3,"file":"auth-cache.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/auth-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;AAEtF,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC,wBAAwB;AACxB,qBAAa,YAAY;IAWrB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAZxB,OAAO,CAAC,KAAK,CAAmC;IAChD,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,QAAQ,CAA4C;IAE5D;;;;OAIG;gBAEgB,KAAK,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,EAC3C,GAAG,GAAE,MAAM,MAAiB,EAC5B,KAAK,GAAE,MAA0B;IAGpD,kDAAkD;IAClD,IAAI,IAAI,qBAAqB,GAAG,SAAS;IAKzC;;;;;OAKG;IACG,IAAI,CAAC,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAmB7E,kEAAkE;IAClE,UAAU,IAAI,IAAI;CAInB"}
1
+ {"version":3,"file":"auth-cache.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/auth-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;AAEtF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QAAc,CAAA;AAE5C,wBAAwB;AACxB,qBAAa,YAAY;IAWrB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAZxB,OAAO,CAAC,KAAK,CAAmC;IAChD,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,QAAQ,CAA4C;IAE5D;;;;OAIG;gBAEgB,KAAK,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,EAC3C,GAAG,GAAE,MAAM,MAAiB,EAC5B,KAAK,GAAE,MAA0B;IAGpD,kDAAkD;IAClD,IAAI,IAAI,qBAAqB,GAAG,SAAS;IAKzC;;;;;OAKG;IACG,IAAI,CAAC,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAmB7E,kEAAkE;IAClE,UAAU,IAAI,IAAI;CAInB"}
@@ -58,6 +58,12 @@ export interface AcpBinaryDiagnostics {
58
58
  tried: string[];
59
59
  /** The failure that ended the search, when nothing usable was found. */
60
60
  error?: string;
61
+ /**
62
+ * True when the search stopped short of installing: nothing local was found and
63
+ * this read was not allowed to download. The card says so instead of claiming
64
+ * the download failed - it was never attempted.
65
+ */
66
+ deferred?: boolean;
61
67
  }
62
68
  /** Test seams so this module can be exercised with no network and no home directory. */
63
69
  export interface AcpBinaryOptions {
@@ -73,6 +79,23 @@ export interface AcpBinaryOptions {
73
79
  home?(): string;
74
80
  /** Reads the CLI version; returns undefined when the binary does not answer. */
75
81
  readVersion?(command: string): Promise<string | undefined>;
82
+ /**
83
+ * Whether a missing executable may be downloaded.
84
+ *
85
+ * A *passive* read (the settings card rendering, the composer badge polling) may
86
+ * not: downloading a ~100 MB archive is an action, and it used to happen behind
87
+ * a page render for a user who had not asked for anything. Only an explicit
88
+ * action - a refresh click, the self-check, or an actual turn - sets this true.
89
+ * Defaults to true so every existing caller keeps the active behaviour.
90
+ */
91
+ download?: boolean;
92
+ }
93
+ /** How long a resolved executable is reused before the disk is read again. */
94
+ export declare const BINARY_CACHE_TTL_MS: number;
95
+ /** One resolution result, exactly as the resolver returned it. */
96
+ export interface AcpBinaryResolution {
97
+ binary?: ResolvedAcpBinary;
98
+ diagnostics: AcpBinaryDiagnostics;
76
99
  }
77
100
  /** Candidate paths the local CLI may live at, most specific first. */
78
101
  export declare function localCliCandidates(home: string, platform: string): string[];
@@ -95,6 +118,51 @@ export declare function resolveAcpBinary(configured: string | null, options?: Ac
95
118
  binary?: ResolvedAcpBinary;
96
119
  diagnostics: AcpBinaryDiagnostics;
97
120
  }>;
121
+ /**
122
+ * A cached answer to "which executable may this line run?".
123
+ *
124
+ * Resolution touches the disk once per candidate and spawns `agy --version` to
125
+ * prove the file answers, which is not something a page render should do. The
126
+ * answer is therefore reused for a few minutes; a change of `binaryPath` and the
127
+ * refresh click invalidate or force it.
128
+ *
129
+ * A cached *passive* answer is never served to an active caller: if the reading
130
+ * was taken without permission to download and found nothing, a turn asking the
131
+ * same question must still be allowed to fetch the release.
132
+ */
133
+ export declare class AcpBinaryCache {
134
+ private readonly resolve;
135
+ private readonly now;
136
+ private readonly ttlMs;
137
+ private value;
138
+ private fetchedAt;
139
+ private withDownload;
140
+ private inflight;
141
+ /** Whether the in-flight read is allowed to install. */
142
+ private inflightDownload;
143
+ /**
144
+ * @param resolve - Reads the real answer; called at most once per window.
145
+ * @param now - Clock seam.
146
+ * @param ttlMs - How long one answer stays valid.
147
+ */
148
+ constructor(resolve: (options: {
149
+ download?: boolean;
150
+ }) => Promise<AcpBinaryResolution>, now?: () => number, ttlMs?: number);
151
+ /** The cached answer, when one is still valid. */
152
+ peek(): AcpBinaryResolution | undefined;
153
+ /**
154
+ * Read the resolution, reusing a valid answer or one in-flight read.
155
+ *
156
+ * @param options - `force` re-reads the disk; `download` allows fetching a release.
157
+ * @returns The executable (when one was found) and what was tried.
158
+ */
159
+ read(options?: {
160
+ force?: boolean;
161
+ download?: boolean;
162
+ }): Promise<AcpBinaryResolution>;
163
+ /** Forget the answer, e.g. because the configured path just changed. */
164
+ invalidate(): void;
165
+ }
98
166
  /**
99
167
  * Download and extract one release.
100
168
  *
@@ -1 +1 @@
1
- {"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/binary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AASH,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAA;IACf,mBAAmB;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAA;IACd,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,UAAU,CAAA;AAEzC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAqC1E,CAAA;AAED,4EAA4E;AAC5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,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAdtB,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,QAAQ,CAAiD;IACjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAQ;IAErC;;;;;OAKG;gBAEgB,aAAa,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,EACvC,WAAW,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,SAAS,EAC7C,KAAK,GAAE,MAAkB,EACzB,GAAG,GAAE,MAAM,MAAiB;IAK/C,+EAA+E;IACzE,SAAS,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAQtD;;;;;OAKG;IACG,IAAI,CAAC,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAcxG,yEAAyE;IACzE,UAAU,IAAI,IAAI;YAIJ,OAAO;CAkBtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,CAwCpF;AA8ED,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -25,6 +25,16 @@ export declare const ACP_ERROR_CODES: {
25
25
  readonly ACP_DISCONNECTED: "The Antigravity agent process ended mid-turn. Retry to reconnect.";
26
26
  /** A JSON-RPC error the line has no specific handling for. */
27
27
  readonly ACP_RPC_ERROR: "The Antigravity ACP server returned a JSON-RPC error.";
28
+ /**
29
+ * The service declined the account or the request itself - a quota wall, a
30
+ * policy block, a verification challenge, a rate limit.
31
+ *
32
+ * Kept apart from {@link ACP_RPC_ERROR} because the two want opposite
33
+ * treatment: a transport fault is worth another attempt, while putting the same
34
+ * account in front of the same wall two more times is how a strict policy turns
35
+ * one failure into a pattern.
36
+ */
37
+ readonly ACP_UPSTREAM_BLOCKED: "The Antigravity service declined this account or request (quota, policy or verification). Retrying here will not change the answer - resolve it in the official client first.";
28
38
  /** The server rejected the request parameters or the model id. */
29
39
  readonly ACP_INVALID_PARAMS: "The Antigravity ACP server rejected the request parameters or the model id.";
30
40
  /** The server does not implement the method this client called. */
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElD,2CAA2C;AAC3C,eAAO,MAAM,eAAe;IAC1B,uEAAuE;;IAEvE,sDAAsD;;IAEtD,yCAAyC;;IAEzC,8DAA8D;;IAE9D,kEAAkE;;IAElE,mEAAmE;;IAEnE,oEAAoE;;IAEpE,oCAAoC;;IAEpC,oEAAoE;;IAEpE,2EAA2E;;IAE3E,wCAAwC;;IAExC,kEAAkE;;IAElE,qCAAqC;;CAE7B,CAAA;AAEV,6CAA6C;AAC7C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,eAAe,CAAA;AAEvD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAOtE;AAED,oDAAoD;AACpD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAEnE"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElD,2CAA2C;AAC3C,eAAO,MAAM,eAAe;IAC1B,uEAAuE;;IAEvE,sDAAsD;;IAEtD,yCAAyC;;IAEzC,8DAA8D;;IAE9D;;;;;;;;OAQG;;IAEH,kEAAkE;;IAElE,mEAAmE;;IAEnE,oEAAoE;;IAEpE,oCAAoC;;IAEpC,oEAAoE;;IAEpE,2EAA2E;;IAE3E,wCAAwC;;IAExC,kEAAkE;;IAElE,qCAAqC;;CAE7B,CAAA;AAEV,6CAA6C;AAC7C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,eAAe,CAAA;AAEvD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAOtE;AAED,oDAAoD;AACpD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAEnE"}
@@ -49,6 +49,32 @@ export declare const ACP_MAX_INLINE_IMAGE_BYTES: number;
49
49
  * on every cold start.
50
50
  */
51
51
  export declare const REPLAY_ANCHOR_INSTRUCTION: string;
52
+ /**
53
+ * Heading of the oldest request copy in a replay, placed right after the
54
+ * instructions so the task is readable before any history is.
55
+ */
56
+ export declare const ACTIVE_REQUEST_HEADING = "[active request for this turn]";
57
+ /** Heading of the newest request copy - the one this turn answers. */
58
+ export declare const CURRENT_REQUEST_HEADING = "[current human request]";
59
+ /** Heading of the bounded plain-text archive a compacted replay carries. */
60
+ export declare const REPLAY_ARCHIVE_HEADING = "[archived conversation - context only]";
61
+ /**
62
+ * Size above which a replay stops being a verbatim transcript.
63
+ *
64
+ * A long DSH session re-sends its whole history on every model call, and that
65
+ * history carries each turn's tool traffic. Replaying it into a fresh session
66
+ * produced multi-hundred-kilobyte prompts in which the actual request was a few
67
+ * dozen characters at the end of a wall of already-finished work: the agent read
68
+ * the wall and continued the old task. Above this budget the older turns are
69
+ * archived as plain text instead.
70
+ */
71
+ export declare const REPLAY_COMPACT_TRIGGER_CHARS = 200000;
72
+ /** Characters of older conversation a compacted replay keeps. */
73
+ export declare const REPLAY_ARCHIVE_CHARS = 60000;
74
+ /** Per-message ceiling inside that archive. */
75
+ export declare const REPLAY_MESSAGE_CHARS = 12000;
76
+ /** Ceiling for one copy of the request the replay answers. */
77
+ export declare const REPLAY_REQUEST_CHARS = 30000;
52
78
  /** Content handed to `session/prompt` for one generation. */
53
79
  export interface AcpPrompt {
54
80
  blocks: AcpPromptBlock[];
@@ -1 +1 @@
1
- {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAgB,eAAe,EAAE,OAAO,EAAmB,MAAM,yBAAyB,CAAA;AACtG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAGxE,oCAAoC;AACpC,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAErD,iDAAiD;AACjD,eAAO,MAAM,0BAA0B,QAAmB,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,QAO3B,CAAA;AAEX,6DAA6D;AAC7D,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,wFAAwF;IACxF,eAAe,EAAE,MAAM,CAAA;IACvB,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,qBAAqB,EAC7B,WAAW,EAAE,MAAM,GAClB,SAAS,CAwBX;AAED;;;;;;;;;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O,MAAM,oBAAoB,QAAS,CAAA;AAE1C,+CAA+C;AAC/C,eAAO,MAAM,oBAAoB,QAAS,CAAA;AAE1C,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,QAAS,CAAA;AAE1C,6DAA6D;AAC7D,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,wFAAwF;IACxF,eAAe,EAAE,MAAM,CAAA;IACvB,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,qBAAqB,EAC7B,WAAW,EAAE,MAAM,GAClB,SAAS,CAeX;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAWlG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,MAAM,CAkBxE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB,OAAO,CAGT"}
@@ -23,6 +23,15 @@ import type { AcpLaunch } from './adapter.ts';
23
23
  import type { AntigravityAcpAuthDto } from '../../shared/antigravity-acp-contracts.ts';
24
24
  /** How long the login launcher may run before it is considered detached. */
25
25
  export declare const LOGIN_LAUNCH_BUDGET_MS = 10000;
26
+ /**
27
+ * How long a launcher is watched for a start-up failure before it is left alone.
28
+ *
29
+ * A successful sign-in keeps the process alive until the browser callback lands,
30
+ * so this may not wait for the exit: it only has to catch the failures that
31
+ * happen before the CLI ever gets going - an executable that cannot be spawned,
32
+ * or a command line the CLI rejects.
33
+ */
34
+ export declare const LOGIN_FAILURE_WINDOW_MS = 1000;
26
35
  /** Budget for one auth probe. */
27
36
  export declare const AUTH_PROBE_BUDGET_MS = 30000;
28
37
  /** What starting a sign-in produced. */
@@ -35,15 +44,22 @@ export interface LoginStartResult {
35
44
  /**
36
45
  * Start the official sign-in.
37
46
  *
38
- * The process is spawned detached and its stdout/stderr are drained: on a desktop
39
- * it opens the browser and exits once the callback lands, on a headless host it
40
- * prints the URL it would have opened. Either way this call returns as soon as
41
- * the process exists - it never waits for the user.
47
+ * The process is spawned detached: on a desktop it opens the browser and exits
48
+ * once the callback lands, on a headless host it prints the URL it would have
49
+ * opened. Either way this call never waits for the user.
50
+ *
51
+ * What it *does* wait for is the failure that happens before the CLI gets going.
52
+ * The command line is `agy acp --login`, and a rejected command line, a
53
+ * misconfigured path or a binary that cannot be spawned all exit (or error)
54
+ * within milliseconds - and the previous version reported "sign-in started" for
55
+ * every one of them while discarding the only sentence that explained it. The
56
+ * launcher is therefore watched for {@link LOGIN_FAILURE_WINDOW_MS}: a spawn
57
+ * error, or a non-zero exit that left stderr behind, is returned as the reason.
42
58
  *
43
59
  * @param launch - The resolved executable.
44
- * @returns whether a process was started.
60
+ * @returns whether a process was started, and why it was not.
45
61
  */
46
- export declare function startLogin(launch: AcpLaunch): LoginStartResult;
62
+ export declare function startLogin(launch: AcpLaunch): Promise<LoginStartResult>;
47
63
  /**
48
64
  * Ask the agent whether it currently holds usable credentials.
49
65
  *
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;AAEtF,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB,QAAS,CAAA;AAE5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AAG,OAAO,CAAC,qBAAqB,CAAC,CA4BvG"}
@@ -89,7 +89,6 @@ export declare class McpBridge {
89
89
  private descriptor;
90
90
  private readonly token;
91
91
  private readonly exposed;
92
- private readonly withdrawn;
93
92
  private readonly parked;
94
93
  private readonly waiters;
95
94
  private closed;
@@ -101,7 +100,15 @@ export declare class McpBridge {
101
100
  start(): Promise<BridgeDescriptor>;
102
101
  /** Calls parked since the last read, in arrival order. */
103
102
  takeParked(): ParkedToolCall[];
104
- /** How many calls are currently waiting for an answer. */
103
+ /**
104
+ * How many calls the harness has not picked up yet.
105
+ *
106
+ * Deliberately the *parked* set - calls the agent has made that the harness has
107
+ * not taken yet - and not the responses still held open. The cap exists to stop
108
+ * a runaway agent from piling up calls nobody has picked up; a call the harness
109
+ * already took is one it answers by the next generation, and counting those as
110
+ * well would fire the cap during a legitimate multi-step round.
111
+ */
105
112
  get pendingCount(): number;
106
113
  /**
107
114
  * Resolve one parked call with what the harness produced.
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-bridge.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/mcp-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,qFAAqF;AACrF,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAA;IACjB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;OAOG;IACH,MAAM,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,UAAU;CAiBnB"}
@@ -22,11 +22,22 @@ import type { AntigravityAcpUsageDto } from '../../shared/antigravity-acp-contra
22
22
  export interface AntigravityAcpRouteOptions {
23
23
  settings: AntigravityAcpSettingsStore;
24
24
  catalog: AcpCatalog;
25
- /** Resolve the executable on demand, so the card always shows the current one. */
26
- resolveBinary(): Promise<{
25
+ /**
26
+ * Resolve the executable on demand, so the card always shows the current one.
27
+ *
28
+ * `fresh` means the user asked (a refresh click, a settings change): only then may
29
+ * the resolver download a release. A passive render must never start an install,
30
+ * which is why this is a request and not a getter.
31
+ */
32
+ resolveBinary(options?: {
33
+ fresh?: boolean;
34
+ }): Promise<{
27
35
  binary?: ResolvedAcpBinary;
28
36
  error?: string;
37
+ deferred?: boolean;
29
38
  }>;
39
+ /** Forget the cached resolution, e.g. after `binaryPath` changed. */
40
+ invalidateBinary?(): void;
30
41
  /** Start the official sign-in. */
31
42
  login(): Promise<{
32
43
  started: boolean;
@@ -56,8 +67,16 @@ export interface AntigravityAcpRouteOptions {
56
67
  }[];
57
68
  }>;
58
69
  }
59
- /** Build the status payload the card renders. */
60
- export declare function readStatus(options: AntigravityAcpRouteOptions): Promise<AntigravityAcpStatusDto>;
70
+ /**
71
+ * Build the status payload the card renders.
72
+ *
73
+ * @param options - The line's live state and actions.
74
+ * @param read - `fresh` when this read is a user action rather than a poll.
75
+ * @returns The status the card renders.
76
+ */
77
+ export declare function readStatus(options: AntigravityAcpRouteOptions, read?: {
78
+ fresh?: boolean;
79
+ }): Promise<AntigravityAcpStatusDto>;
61
80
  /**
62
81
  * Mount every route of this line.
63
82
  *
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EACV,sBAAsB,EAEtB,+BAA+B,EAC/B,uBAAuB,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