@eddyskywalker/dsh-chatgpt-subscription 0.98.1 → 0.99.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.
Files changed (96) hide show
  1. package/README.md +1 -1
  2. package/lib/client.js +478 -499
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +617 -42
  5. package/lib/types/client/common/AccountPoolSection.d.ts +2 -0
  6. package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -1
  7. package/lib/types/client/common/styles.d.ts.map +1 -1
  8. package/lib/types/client/features/advisor/locales.d.ts +1 -1
  9. package/lib/types/client/locales-ru/alibaba-token-plan.d.ts.map +1 -1
  10. package/lib/types/client/locales-ru/antigravity-acp.d.ts.map +1 -1
  11. package/lib/types/client/locales-ru/grok.d.ts.map +1 -1
  12. package/lib/types/client/locales-ru/longcat.d.ts.map +1 -1
  13. package/lib/types/client/locales-ru/opencode-zen.d.ts.map +1 -1
  14. package/lib/types/client/locales-ru/qianfan-token-plan.d.ts.map +1 -1
  15. package/lib/types/client/locales-ru/tencent-tokenhub.d.ts.map +1 -1
  16. package/lib/types/client/locales-ru/volcengine-ark.d.ts.map +1 -1
  17. package/lib/types/client/providers/alibaba-token-plan/AtpSection.d.ts.map +1 -1
  18. package/lib/types/client/providers/alibaba-token-plan/locales.d.ts +5 -7
  19. package/lib/types/client/providers/alibaba-token-plan/locales.d.ts.map +1 -1
  20. package/lib/types/client/providers/antigravity-acp/AntigravityAcpSection.d.ts.map +1 -1
  21. package/lib/types/client/providers/antigravity-acp/api.d.ts +2 -0
  22. package/lib/types/client/providers/antigravity-acp/api.d.ts.map +1 -1
  23. package/lib/types/client/providers/antigravity-acp/locales.d.ts +78 -60
  24. package/lib/types/client/providers/antigravity-acp/locales.d.ts.map +1 -1
  25. package/lib/types/client/providers/claude/locales.d.ts +24 -24
  26. package/lib/types/client/providers/claude-api/ClaudeApiSection.d.ts.map +1 -1
  27. package/lib/types/client/providers/claude-api/locales.d.ts +5 -7
  28. package/lib/types/client/providers/claude-api/locales.d.ts.map +1 -1
  29. package/lib/types/client/providers/cline-pass/locales.d.ts +6 -6
  30. package/lib/types/client/providers/codex-chatgpt/locales.d.ts +14 -14
  31. package/lib/types/client/providers/command-code/locales.d.ts +3 -3
  32. package/lib/types/client/providers/copilot/CopilotSection.d.ts.map +1 -1
  33. package/lib/types/client/providers/glm-coding-plan/locales.d.ts +12 -12
  34. package/lib/types/client/providers/grok/GrokSection.d.ts.map +1 -1
  35. package/lib/types/client/providers/grok/locales.d.ts +1 -3
  36. package/lib/types/client/providers/grok/locales.d.ts.map +1 -1
  37. package/lib/types/client/providers/grok/styles.d.ts.map +1 -1
  38. package/lib/types/client/providers/kimi-code/locales.d.ts +12 -12
  39. package/lib/types/client/providers/kimi-code/styles.d.ts.map +1 -1
  40. package/lib/types/client/providers/longcat/LongcatSection.d.ts.map +1 -1
  41. package/lib/types/client/providers/longcat/locales.d.ts +1 -3
  42. package/lib/types/client/providers/longcat/locales.d.ts.map +1 -1
  43. package/lib/types/client/providers/minimax-code/locales.d.ts +9 -9
  44. package/lib/types/client/providers/opencode-zen/OpenCodeZenSection.d.ts.map +1 -1
  45. package/lib/types/client/providers/opencode-zen/locales.d.ts +3 -5
  46. package/lib/types/client/providers/opencode-zen/locales.d.ts.map +1 -1
  47. package/lib/types/client/providers/opendesign/locales.d.ts +24 -24
  48. package/lib/types/client/providers/qianfan-token-plan/QianfanSection.d.ts.map +1 -1
  49. package/lib/types/client/providers/qianfan-token-plan/locales.d.ts +11 -7
  50. package/lib/types/client/providers/qianfan-token-plan/locales.d.ts.map +1 -1
  51. package/lib/types/client/providers/qianwen-token-plan/QianwenTokenPlanSection.d.ts.map +1 -1
  52. package/lib/types/client/providers/qianwen-token-plan/locales.d.ts +3 -5
  53. package/lib/types/client/providers/qianwen-token-plan/locales.d.ts.map +1 -1
  54. package/lib/types/client/providers/relayone/RelayOneSection.d.ts.map +1 -1
  55. package/lib/types/client/providers/relayone/locales.d.ts +3 -5
  56. package/lib/types/client/providers/relayone/locales.d.ts.map +1 -1
  57. package/lib/types/client/providers/step-code/locales.d.ts +24 -24
  58. package/lib/types/client/providers/tencent-tokenhub/TokenHubSection.d.ts.map +1 -1
  59. package/lib/types/client/providers/tencent-tokenhub/locales.d.ts +7 -9
  60. package/lib/types/client/providers/tencent-tokenhub/locales.d.ts.map +1 -1
  61. package/lib/types/client/providers/volcengine-ark/ArkSection.d.ts.map +1 -1
  62. package/lib/types/client/providers/volcengine-ark/locales.d.ts +5 -7
  63. package/lib/types/client/providers/volcengine-ark/locales.d.ts.map +1 -1
  64. package/lib/types/client/providers/workbuddy/locales.d.ts +30 -30
  65. package/lib/types/client/providers/xiaomi-mimo/MimoSection.d.ts.map +1 -1
  66. package/lib/types/client/providers/xiaomi-mimo/locales.d.ts +3 -5
  67. package/lib/types/client/providers/xiaomi-mimo/locales.d.ts.map +1 -1
  68. package/lib/types/compat.d.ts +1 -1
  69. package/lib/types/host/common/i18n/en.d.ts.map +1 -1
  70. package/lib/types/host/common/i18n/ru.d.ts.map +1 -1
  71. package/lib/types/host/common/i18n/zh.d.ts +1 -0
  72. package/lib/types/host/common/i18n/zh.d.ts.map +1 -1
  73. package/lib/types/host/providers/antigravity-acp/acp-client.d.ts +18 -0
  74. package/lib/types/host/providers/antigravity-acp/acp-client.d.ts.map +1 -1
  75. package/lib/types/host/providers/antigravity-acp/adapter.d.ts +47 -5
  76. package/lib/types/host/providers/antigravity-acp/adapter.d.ts.map +1 -1
  77. package/lib/types/host/providers/antigravity-acp/binary.d.ts +2 -2
  78. package/lib/types/host/providers/antigravity-acp/cooldown.d.ts +35 -0
  79. package/lib/types/host/providers/antigravity-acp/cooldown.d.ts.map +1 -0
  80. package/lib/types/host/providers/antigravity-acp/history.d.ts +17 -0
  81. package/lib/types/host/providers/antigravity-acp/history.d.ts.map +1 -1
  82. package/lib/types/host/providers/antigravity-acp/login.d.ts +22 -0
  83. package/lib/types/host/providers/antigravity-acp/login.d.ts.map +1 -1
  84. package/lib/types/host/providers/antigravity-acp/routes.d.ts +5 -0
  85. package/lib/types/host/providers/antigravity-acp/routes.d.ts.map +1 -1
  86. package/lib/types/host/providers/antigravity-acp/session-state.d.ts +73 -0
  87. package/lib/types/host/providers/antigravity-acp/session-state.d.ts.map +1 -0
  88. package/lib/types/host/providers/antigravity-acp/settings.d.ts +3 -4
  89. package/lib/types/host/providers/antigravity-acp/settings.d.ts.map +1 -1
  90. package/lib/types/host/providers/copilot/routes.d.ts.map +1 -1
  91. package/lib/types/host/providers/qianfan-token-plan/mapper.d.ts.map +1 -1
  92. package/lib/types/index.d.ts.map +1 -1
  93. package/lib/types/shared/antigravity-acp-contracts.d.ts +3 -3
  94. package/lib/types/shared/qianfan-token-plan-contracts.d.ts +4 -3
  95. package/lib/types/shared/qianfan-token-plan-contracts.d.ts.map +1 -1
  96. package/package.json +1 -1
@@ -19,7 +19,7 @@ export declare const zh: {
19
19
  readonly regionIntl: "国际区";
20
20
  readonly accountType: "账号类型";
21
21
  readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
22
- readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
22
+ readonly routeUnreachableHint: "浏览器插件比 Host 新,重启 DSH 让两端使用同一构建。";
23
23
  readonly rescan: "重新扫描";
24
24
  readonly rescanning: "扫描中...";
25
25
  readonly accounts: "账号管理";
@@ -41,7 +41,7 @@ export declare const zh: {
41
41
  readonly routeOwned: "模型路由由本插件提供";
42
42
  readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
43
43
  readonly modelsSection: "模型";
44
- readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭上方开关可在列表中隐藏该供应商。目录与上下文窗口来自订阅网关的模型目录,并按账号所在区域过滤——跨区调用会被上游拒绝。";
44
+ readonly modelsHint: "仅勾选模型进入选择器;目录按账号区域过滤,跨区调用会被拒。";
45
45
  readonly refreshCatalog: "刷新模型目录";
46
46
  readonly refreshingCatalog: "刷新中...";
47
47
  readonly selectAll: "全选";
@@ -61,7 +61,7 @@ export declare const zh: {
61
61
  readonly noReasoningModels: "当前账号的模型都没有声明可用的思考档位,因此没有可选的默认档位。";
62
62
  readonly defaultEffortKept: "已保存的档位不被当前任何模型支持,已保留但不会生效。";
63
63
  readonly contextWindowSection: "模型上下文窗口";
64
- readonly contextWindowHint: "默认值来自订阅网关的模型目录(每个模型的真实上下文上限);可覆盖为自定义容量,该值用于 DSH 的压缩与溢出判断,可输入 1M、512K、200K 等容量。";
64
+ readonly contextWindowHint: "默认取网关目录的真实上限;可覆盖 DSH 用于压缩和溢出的容量。";
65
65
  readonly contextWindowReset: "恢复默认";
66
66
  readonly contextWindowResetAll: "全部恢复默认";
67
67
  readonly contextWindowResetAllConfirm: "确定把已改过的模型上下文窗口全部恢复为默认值吗?";
@@ -93,7 +93,7 @@ export declare const zh: {
93
93
  readonly checkinNow: "立即签到";
94
94
  readonly checkinRunning: "签到中…";
95
95
  readonly outboundSection: "出站身份";
96
- readonly outboundHint: "决定请求以哪种客户端身份发出。cli 是本线路一直使用、实测可用的身份;auto 会按账号稳定分配一种(同一账号永不漂移)。换身份不会增加额度——额度按账号 × 模型的 24 小时窗口计算。";
96
+ readonly outboundHint: "选择请求的客户端身份;换身份不会增加额度。";
97
97
  readonly outboundAuto: "自动(按账号分配)";
98
98
  readonly outboundCli: "CLI(默认,实测可用)";
99
99
  readonly outboundWorkbuddy: "WorkBuddy 桌面端";
@@ -106,7 +106,7 @@ export declare const zh: {
106
106
  readonly atRestSaved: "已保存密钥";
107
107
  readonly atRestSealed: "检测到 {count} 个加密凭据,未保存密钥前无法使用。";
108
108
  readonly guardrailsSection: "本地额度护栏";
109
- readonly guardrailsHint: "在撞上游 429 之前先停手:剩余积分低于阈值、账号当日 token 达额、或单个模型当日 token 达额时,请求会切到池里其他账号。三项都填 0 = 关闭,计数按本地 0 点重置。";
109
+ readonly guardrailsHint: "额度或日 token 触顶时切到池内其他账号;填 0 关闭。";
110
110
  readonly guardrailsReserve: "保留积分";
111
111
  readonly guardrailsDaily: "账号日 token";
112
112
  readonly guardrailsModelDaily: "模型日 token";
@@ -145,7 +145,7 @@ export declare const en: {
145
145
  readonly regionIntl: "International";
146
146
  readonly accountType: "Account type";
147
147
  readonly routeUnreachable: "The WorkBuddy settings route could not be read";
148
- readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
148
+ readonly routeUnreachableHint: "The browser plugin is newer than the Host; restart DSH so both use the same build.";
149
149
  readonly rescan: "Rescan";
150
150
  readonly rescanning: "Scanning...";
151
151
  readonly accounts: "Account Management";
@@ -167,7 +167,7 @@ export declare const en: {
167
167
  readonly routeOwned: "This plugin serves the model route";
168
168
  readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
169
169
  readonly modelsSection: "Models";
170
- readonly modelsHint: "Checked models appear in the DSH conversation model list. The catalog and its context windows come from the subscription gateway and are filtered by the account’s region — the upstream rejects a model asked of the wrong region.";
170
+ readonly modelsHint: "Only checked models reach the picker; the catalog is region-filtered and cross-region calls fail.";
171
171
  readonly refreshCatalog: "Refresh catalog";
172
172
  readonly refreshingCatalog: "Refreshing...";
173
173
  readonly selectAll: "Select all";
@@ -187,7 +187,7 @@ export declare const en: {
187
187
  readonly noReasoningModels: "None of this account’s models declare a reasoning level, so there is no default to choose.";
188
188
  readonly defaultEffortKept: "The saved level is not supported by any current model; it is kept but has no effect.";
189
189
  readonly contextWindowSection: "Model context window";
190
- readonly contextWindowHint: "Defaults come from the subscription gateway’s own catalog (each model’s real context cap); override one with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
190
+ readonly contextWindowHint: "Uses the gateway catalog limit; override the capacity DSH uses for compaction and overflow.";
191
191
  readonly contextWindowReset: "Restore default";
192
192
  readonly contextWindowResetAll: "Restore all defaults";
193
193
  readonly contextWindowResetAllConfirm: "Restore every changed model context window to its default?";
@@ -219,7 +219,7 @@ export declare const en: {
219
219
  readonly checkinNow: "Check in now";
220
220
  readonly checkinRunning: "Checking in…";
221
221
  readonly outboundSection: "Outbound identity";
222
- readonly outboundHint: "Which client identity requests present. cli is what this route has always sent and was measured working; auto assigns one product per account and never drifts. Switching identity does not create allowance — quota is metered per account × model over a 24h window.";
222
+ readonly outboundHint: "Sets the client identity; switching identity never adds allowance.";
223
223
  readonly outboundAuto: "Auto (per account)";
224
224
  readonly outboundCli: "CLI (default, measured working)";
225
225
  readonly outboundWorkbuddy: "WorkBuddy desktop";
@@ -232,7 +232,7 @@ export declare const en: {
232
232
  readonly atRestSaved: "Key saved";
233
233
  readonly atRestSealed: "{count} sealed credentials found; they stay unreadable until a key is saved.";
234
234
  readonly guardrailsSection: "Local quota guardrails";
235
- readonly guardrailsHint: "Stop before the upstream 429: below a credit floor, at the account daily token cap, or at a per-model daily token cap, the request moves to another account in the pool. 0 disables a rail; counters reset at local midnight.";
235
+ readonly guardrailsHint: "Switches to another pooled account at a credit or daily token limit; 0 disables it.";
236
236
  readonly guardrailsReserve: "Reserve credits";
237
237
  readonly guardrailsDaily: "Account daily tokens";
238
238
  readonly guardrailsModelDaily: "Model daily tokens";
@@ -272,7 +272,7 @@ export declare const dictionaries: {
272
272
  readonly regionIntl: "国际区";
273
273
  readonly accountType: "账号类型";
274
274
  readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
275
- readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
275
+ readonly routeUnreachableHint: "浏览器插件比 Host 新,重启 DSH 让两端使用同一构建。";
276
276
  readonly rescan: "重新扫描";
277
277
  readonly rescanning: "扫描中...";
278
278
  readonly accounts: "账号管理";
@@ -294,7 +294,7 @@ export declare const dictionaries: {
294
294
  readonly routeOwned: "模型路由由本插件提供";
295
295
  readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
296
296
  readonly modelsSection: "模型";
297
- readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭上方开关可在列表中隐藏该供应商。目录与上下文窗口来自订阅网关的模型目录,并按账号所在区域过滤——跨区调用会被上游拒绝。";
297
+ readonly modelsHint: "仅勾选模型进入选择器;目录按账号区域过滤,跨区调用会被拒。";
298
298
  readonly refreshCatalog: "刷新模型目录";
299
299
  readonly refreshingCatalog: "刷新中...";
300
300
  readonly selectAll: "全选";
@@ -314,7 +314,7 @@ export declare const dictionaries: {
314
314
  readonly noReasoningModels: "当前账号的模型都没有声明可用的思考档位,因此没有可选的默认档位。";
315
315
  readonly defaultEffortKept: "已保存的档位不被当前任何模型支持,已保留但不会生效。";
316
316
  readonly contextWindowSection: "模型上下文窗口";
317
- readonly contextWindowHint: "默认值来自订阅网关的模型目录(每个模型的真实上下文上限);可覆盖为自定义容量,该值用于 DSH 的压缩与溢出判断,可输入 1M、512K、200K 等容量。";
317
+ readonly contextWindowHint: "默认取网关目录的真实上限;可覆盖 DSH 用于压缩和溢出的容量。";
318
318
  readonly contextWindowReset: "恢复默认";
319
319
  readonly contextWindowResetAll: "全部恢复默认";
320
320
  readonly contextWindowResetAllConfirm: "确定把已改过的模型上下文窗口全部恢复为默认值吗?";
@@ -346,7 +346,7 @@ export declare const dictionaries: {
346
346
  readonly checkinNow: "立即签到";
347
347
  readonly checkinRunning: "签到中…";
348
348
  readonly outboundSection: "出站身份";
349
- readonly outboundHint: "决定请求以哪种客户端身份发出。cli 是本线路一直使用、实测可用的身份;auto 会按账号稳定分配一种(同一账号永不漂移)。换身份不会增加额度——额度按账号 × 模型的 24 小时窗口计算。";
349
+ readonly outboundHint: "选择请求的客户端身份;换身份不会增加额度。";
350
350
  readonly outboundAuto: "自动(按账号分配)";
351
351
  readonly outboundCli: "CLI(默认,实测可用)";
352
352
  readonly outboundWorkbuddy: "WorkBuddy 桌面端";
@@ -359,7 +359,7 @@ export declare const dictionaries: {
359
359
  readonly atRestSaved: "已保存密钥";
360
360
  readonly atRestSealed: "检测到 {count} 个加密凭据,未保存密钥前无法使用。";
361
361
  readonly guardrailsSection: "本地额度护栏";
362
- readonly guardrailsHint: "在撞上游 429 之前先停手:剩余积分低于阈值、账号当日 token 达额、或单个模型当日 token 达额时,请求会切到池里其他账号。三项都填 0 = 关闭,计数按本地 0 点重置。";
362
+ readonly guardrailsHint: "额度或日 token 触顶时切到池内其他账号;填 0 关闭。";
363
363
  readonly guardrailsReserve: "保留积分";
364
364
  readonly guardrailsDaily: "账号日 token";
365
365
  readonly guardrailsModelDaily: "模型日 token";
@@ -398,7 +398,7 @@ export declare const dictionaries: {
398
398
  readonly regionIntl: "国际区";
399
399
  readonly accountType: "账号类型";
400
400
  readonly routeUnreachable: "无法读取 WorkBuddy 设置路由";
401
- readonly routeUnreachableHint: "浏览器里加载的插件版本可能比 Host 进程里运行的新(客户端资源是现读磁盘的,Host 只在启动时加载)。请重启 DSH,让两端来自同一份构建。";
401
+ readonly routeUnreachableHint: "浏览器插件比 Host 新,重启 DSH 让两端使用同一构建。";
402
402
  readonly rescan: "重新扫描";
403
403
  readonly rescanning: "扫描中...";
404
404
  readonly accounts: "账号管理";
@@ -420,7 +420,7 @@ export declare const dictionaries: {
420
420
  readonly routeOwned: "模型路由由本插件提供";
421
421
  readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
422
422
  readonly modelsSection: "模型";
423
- readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭上方开关可在列表中隐藏该供应商。目录与上下文窗口来自订阅网关的模型目录,并按账号所在区域过滤——跨区调用会被上游拒绝。";
423
+ readonly modelsHint: "仅勾选模型进入选择器;目录按账号区域过滤,跨区调用会被拒。";
424
424
  readonly refreshCatalog: "刷新模型目录";
425
425
  readonly refreshingCatalog: "刷新中...";
426
426
  readonly selectAll: "全选";
@@ -440,7 +440,7 @@ export declare const dictionaries: {
440
440
  readonly noReasoningModels: "当前账号的模型都没有声明可用的思考档位,因此没有可选的默认档位。";
441
441
  readonly defaultEffortKept: "已保存的档位不被当前任何模型支持,已保留但不会生效。";
442
442
  readonly contextWindowSection: "模型上下文窗口";
443
- readonly contextWindowHint: "默认值来自订阅网关的模型目录(每个模型的真实上下文上限);可覆盖为自定义容量,该值用于 DSH 的压缩与溢出判断,可输入 1M、512K、200K 等容量。";
443
+ readonly contextWindowHint: "默认取网关目录的真实上限;可覆盖 DSH 用于压缩和溢出的容量。";
444
444
  readonly contextWindowReset: "恢复默认";
445
445
  readonly contextWindowResetAll: "全部恢复默认";
446
446
  readonly contextWindowResetAllConfirm: "确定把已改过的模型上下文窗口全部恢复为默认值吗?";
@@ -472,7 +472,7 @@ export declare const dictionaries: {
472
472
  readonly checkinNow: "立即签到";
473
473
  readonly checkinRunning: "签到中…";
474
474
  readonly outboundSection: "出站身份";
475
- readonly outboundHint: "决定请求以哪种客户端身份发出。cli 是本线路一直使用、实测可用的身份;auto 会按账号稳定分配一种(同一账号永不漂移)。换身份不会增加额度——额度按账号 × 模型的 24 小时窗口计算。";
475
+ readonly outboundHint: "选择请求的客户端身份;换身份不会增加额度。";
476
476
  readonly outboundAuto: "自动(按账号分配)";
477
477
  readonly outboundCli: "CLI(默认,实测可用)";
478
478
  readonly outboundWorkbuddy: "WorkBuddy 桌面端";
@@ -485,7 +485,7 @@ export declare const dictionaries: {
485
485
  readonly atRestSaved: "已保存密钥";
486
486
  readonly atRestSealed: "检测到 {count} 个加密凭据,未保存密钥前无法使用。";
487
487
  readonly guardrailsSection: "本地额度护栏";
488
- readonly guardrailsHint: "在撞上游 429 之前先停手:剩余积分低于阈值、账号当日 token 达额、或单个模型当日 token 达额时,请求会切到池里其他账号。三项都填 0 = 关闭,计数按本地 0 点重置。";
488
+ readonly guardrailsHint: "额度或日 token 触顶时切到池内其他账号;填 0 关闭。";
489
489
  readonly guardrailsReserve: "保留积分";
490
490
  readonly guardrailsDaily: "账号日 token";
491
491
  readonly guardrailsModelDaily: "模型日 token";
@@ -524,7 +524,7 @@ export declare const dictionaries: {
524
524
  readonly regionIntl: "International";
525
525
  readonly accountType: "Account type";
526
526
  readonly routeUnreachable: "The WorkBuddy settings route could not be read";
527
- readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
527
+ readonly routeUnreachableHint: "The browser plugin is newer than the Host; restart DSH so both use the same build.";
528
528
  readonly rescan: "Rescan";
529
529
  readonly rescanning: "Scanning...";
530
530
  readonly accounts: "Account Management";
@@ -546,7 +546,7 @@ export declare const dictionaries: {
546
546
  readonly routeOwned: "This plugin serves the model route";
547
547
  readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
548
548
  readonly modelsSection: "Models";
549
- readonly modelsHint: "Checked models appear in the DSH conversation model list. The catalog and its context windows come from the subscription gateway and are filtered by the account’s region — the upstream rejects a model asked of the wrong region.";
549
+ readonly modelsHint: "Only checked models reach the picker; the catalog is region-filtered and cross-region calls fail.";
550
550
  readonly refreshCatalog: "Refresh catalog";
551
551
  readonly refreshingCatalog: "Refreshing...";
552
552
  readonly selectAll: "Select all";
@@ -566,7 +566,7 @@ export declare const dictionaries: {
566
566
  readonly noReasoningModels: "None of this account’s models declare a reasoning level, so there is no default to choose.";
567
567
  readonly defaultEffortKept: "The saved level is not supported by any current model; it is kept but has no effect.";
568
568
  readonly contextWindowSection: "Model context window";
569
- readonly contextWindowHint: "Defaults come from the subscription gateway’s own catalog (each model’s real context cap); override one with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
569
+ readonly contextWindowHint: "Uses the gateway catalog limit; override the capacity DSH uses for compaction and overflow.";
570
570
  readonly contextWindowReset: "Restore default";
571
571
  readonly contextWindowResetAll: "Restore all defaults";
572
572
  readonly contextWindowResetAllConfirm: "Restore every changed model context window to its default?";
@@ -598,7 +598,7 @@ export declare const dictionaries: {
598
598
  readonly checkinNow: "Check in now";
599
599
  readonly checkinRunning: "Checking in…";
600
600
  readonly outboundSection: "Outbound identity";
601
- readonly outboundHint: "Which client identity requests present. cli is what this route has always sent and was measured working; auto assigns one product per account and never drifts. Switching identity does not create allowance — quota is metered per account × model over a 24h window.";
601
+ readonly outboundHint: "Sets the client identity; switching identity never adds allowance.";
602
602
  readonly outboundAuto: "Auto (per account)";
603
603
  readonly outboundCli: "CLI (default, measured working)";
604
604
  readonly outboundWorkbuddy: "WorkBuddy desktop";
@@ -611,7 +611,7 @@ export declare const dictionaries: {
611
611
  readonly atRestSaved: "Key saved";
612
612
  readonly atRestSealed: "{count} sealed credentials found; they stay unreadable until a key is saved.";
613
613
  readonly guardrailsSection: "Local quota guardrails";
614
- readonly guardrailsHint: "Stop before the upstream 429: below a credit floor, at the account daily token cap, or at a per-model daily token cap, the request moves to another account in the pool. 0 disables a rail; counters reset at local midnight.";
614
+ readonly guardrailsHint: "Switches to another pooled account at a credit or daily token limit; 0 disables it.";
615
615
  readonly guardrailsReserve: "Reserve credits";
616
616
  readonly guardrailsDaily: "Account daily tokens";
617
617
  readonly guardrailsModelDaily: "Model daily tokens";
@@ -650,7 +650,7 @@ export declare const dictionaries: {
650
650
  readonly regionIntl: "International";
651
651
  readonly accountType: "Account type";
652
652
  readonly routeUnreachable: "The WorkBuddy settings route could not be read";
653
- readonly routeUnreachableHint: "The plugin loaded in the browser may be newer than the one running in the Host: client assets are read from disk on demand, while the Host loads them only at startup. Restart DSH so both halves come from the same build.";
653
+ readonly routeUnreachableHint: "The browser plugin is newer than the Host; restart DSH so both use the same build.";
654
654
  readonly rescan: "Rescan";
655
655
  readonly rescanning: "Scanning...";
656
656
  readonly accounts: "Account Management";
@@ -672,7 +672,7 @@ export declare const dictionaries: {
672
672
  readonly routeOwned: "This plugin serves the model route";
673
673
  readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
674
674
  readonly modelsSection: "Models";
675
- readonly modelsHint: "Checked models appear in the DSH conversation model list. The catalog and its context windows come from the subscription gateway and are filtered by the account’s region — the upstream rejects a model asked of the wrong region.";
675
+ readonly modelsHint: "Only checked models reach the picker; the catalog is region-filtered and cross-region calls fail.";
676
676
  readonly refreshCatalog: "Refresh catalog";
677
677
  readonly refreshingCatalog: "Refreshing...";
678
678
  readonly selectAll: "Select all";
@@ -692,7 +692,7 @@ export declare const dictionaries: {
692
692
  readonly noReasoningModels: "None of this account’s models declare a reasoning level, so there is no default to choose.";
693
693
  readonly defaultEffortKept: "The saved level is not supported by any current model; it is kept but has no effect.";
694
694
  readonly contextWindowSection: "Model context window";
695
- readonly contextWindowHint: "Defaults come from the subscription gateway’s own catalog (each model’s real context cap); override one with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).";
695
+ readonly contextWindowHint: "Uses the gateway catalog limit; override the capacity DSH uses for compaction and overflow.";
696
696
  readonly contextWindowReset: "Restore default";
697
697
  readonly contextWindowResetAll: "Restore all defaults";
698
698
  readonly contextWindowResetAllConfirm: "Restore every changed model context window to its default?";
@@ -724,7 +724,7 @@ export declare const dictionaries: {
724
724
  readonly checkinNow: "Check in now";
725
725
  readonly checkinRunning: "Checking in…";
726
726
  readonly outboundSection: "Outbound identity";
727
- readonly outboundHint: "Which client identity requests present. cli is what this route has always sent and was measured working; auto assigns one product per account and never drifts. Switching identity does not create allowance — quota is metered per account × model over a 24h window.";
727
+ readonly outboundHint: "Sets the client identity; switching identity never adds allowance.";
728
728
  readonly outboundAuto: "Auto (per account)";
729
729
  readonly outboundCli: "CLI (default, measured working)";
730
730
  readonly outboundWorkbuddy: "WorkBuddy desktop";
@@ -737,7 +737,7 @@ export declare const dictionaries: {
737
737
  readonly atRestSaved: "Key saved";
738
738
  readonly atRestSealed: "{count} sealed credentials found; they stay unreadable until a key is saved.";
739
739
  readonly guardrailsSection: "Local quota guardrails";
740
- readonly guardrailsHint: "Stop before the upstream 429: below a credit floor, at the account daily token cap, or at a per-model daily token cap, the request moves to another account in the pool. 0 disables a rail; counters reset at local midnight.";
740
+ readonly guardrailsHint: "Switches to another pooled account at a credit or daily token limit; 0 disables it.";
741
741
  readonly guardrailsReserve: "Reserve credits";
742
742
  readonly guardrailsDaily: "Account daily tokens";
743
743
  readonly guardrailsModelDaily: "Model daily tokens";
@@ -1 +1 @@
1
- {"version":3,"file":"MimoSection.d.ts","sourceRoot":"","sources":["../../../../../src/client/providers/xiaomi-mimo/MimoSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkBzB,OAAO,EAAkB,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAUjF,wBAAgB,0BAA0B,CAAC,KAAK,GAAE,sBAA2B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsEhG"}
1
+ {"version":3,"file":"MimoSection.d.ts","sourceRoot":"","sources":["../../../../../src/client/providers/xiaomi-mimo/MimoSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkBzB,OAAO,EAAkB,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAUjF,wBAAgB,0BAA0B,CAAC,KAAK,GAAE,sBAA2B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqEhG"}
@@ -1,10 +1,9 @@
1
1
  export declare const NS_XIAOMI_MIMO = "dsh-xiaomi-mimo";
2
2
  export declare const zh: {
3
3
  readonly title: "Xiaomi MiMo Token Plan(Xiaomi MiMo)";
4
- readonly pageDesc: "使用Xiaomi MiMo Token Plan 专属 API Key 调用 MiMo V2.6,管理显式缓存、思考回放、推理档位、模型和视觉预算。";
4
+ readonly pageDesc: "用套餐专属 Key 调用 MiMo,支持缓存、思考与视觉预算。";
5
5
  readonly loading: "加载中...";
6
6
  readonly moreNotes: "更多说明";
7
- readonly enabled: "启用此线路";
8
7
  readonly keySection: "API Key";
9
8
  readonly keyConfigured: "已配置套餐专属 API Key;凭据只保存在主机加密存储中。";
10
9
  readonly keyMissing: "尚未配置 API Key。请在Xiaomi MiMo Token Plan 控制台创建套餐专属 Key。";
@@ -80,10 +79,9 @@ export declare const en: Record<XiaomiMimoLocaleKey, string>;
80
79
  export declare const dictionaries: {
81
80
  zh: {
82
81
  readonly title: "Xiaomi MiMo Token Plan(Xiaomi MiMo)";
83
- readonly pageDesc: "使用Xiaomi MiMo Token Plan 专属 API Key 调用 MiMo V2.6,管理显式缓存、思考回放、推理档位、模型和视觉预算。";
82
+ readonly pageDesc: "用套餐专属 Key 调用 MiMo,支持缓存、思考与视觉预算。";
84
83
  readonly loading: "加载中...";
85
84
  readonly moreNotes: "更多说明";
86
- readonly enabled: "启用此线路";
87
85
  readonly keySection: "API Key";
88
86
  readonly keyConfigured: "已配置套餐专属 API Key;凭据只保存在主机加密存储中。";
89
87
  readonly keyMissing: "尚未配置 API Key。请在Xiaomi MiMo Token Plan 控制台创建套餐专属 Key。";
@@ -154,7 +152,7 @@ export declare const dictionaries: {
154
152
  readonly noQuota: "无配额数据";
155
153
  readonly proxy: "代理";
156
154
  };
157
- en: Record<"loading" | "save" | "tokens" | "title" | "pageDesc" | "moreNotes" | "region" | "regionHint" | "testConnection" | "testingConnection" | "routeOwned" | "routeConflict" | "modelsSection" | "modelsHint" | "selectAll" | "defaultEffort" | "effortMinimal" | "effortLow" | "effortMedium" | "effortHigh" | "effortMax" | "saving" | "invalidCapacity" | "cacheSection" | "cacheDesc" | "cacheHitRatio" | "composerLabel" | "enabled" | "keySection" | "keyConfigured" | "keyMissing" | "keyPlaceholder" | "saveKey" | "savingKey" | "removeKey" | "removingKey" | "storagePath" | "connectionOk" | "connectionFailed" | "latency" | "thinkingSection" | "effortDefault" | "effortNone" | "effortHint" | "clearAll" | "selectionHint" | "contextSection" | "contextHint" | "contextEmpty" | "reset" | "resetAll" | "visionSection" | "imageDetail" | "detailLow" | "detailAuto" | "detailHigh" | "visionHint" | "noQuota" | "dashboard" | "cacheEnabled" | "cacheTtl" | "ttl5m" | "ttl1h" | "cacheHint" | "effortXhigh" | "thinkingSummary" | "thinkingSummaryHint" | "maxPixels" | "maxPixelsPlaceholder" | "maxPixelsSave" | "maxPixelsReset" | "invalidPixels" | "proxy" | "quotaUnsupported", string>;
155
+ en: Record<"loading" | "save" | "tokens" | "title" | "pageDesc" | "moreNotes" | "region" | "regionHint" | "testConnection" | "testingConnection" | "routeOwned" | "routeConflict" | "modelsSection" | "modelsHint" | "selectAll" | "defaultEffort" | "effortMinimal" | "effortLow" | "effortMedium" | "effortHigh" | "effortMax" | "saving" | "invalidCapacity" | "cacheSection" | "cacheDesc" | "cacheHitRatio" | "composerLabel" | "keySection" | "keyConfigured" | "keyMissing" | "keyPlaceholder" | "saveKey" | "savingKey" | "removeKey" | "removingKey" | "storagePath" | "connectionOk" | "connectionFailed" | "latency" | "thinkingSection" | "effortDefault" | "effortNone" | "effortHint" | "clearAll" | "selectionHint" | "contextSection" | "contextHint" | "contextEmpty" | "reset" | "resetAll" | "visionSection" | "imageDetail" | "detailLow" | "detailAuto" | "detailHigh" | "visionHint" | "noQuota" | "dashboard" | "cacheEnabled" | "cacheTtl" | "ttl5m" | "ttl1h" | "cacheHint" | "effortXhigh" | "thinkingSummary" | "thinkingSummaryHint" | "maxPixels" | "maxPixelsPlaceholder" | "maxPixelsSave" | "maxPixelsReset" | "invalidPixels" | "proxy" | "quotaUnsupported", string>;
158
156
  };
159
157
  declare module '@deepseek-ai/dsh-client-ui-slots' {
160
158
  interface LocaleNamespaceMap {
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../../src/client/providers/xiaomi-mimo/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAC/C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EL,CAAA;AACV,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,EAAE,CAAA;AACjD,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAUlD,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAA;AAEtC,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAAG,iBAAiB,EAAE,mBAAmB,CAAA;KAAE;CACxE"}
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../../src/client/providers/xiaomi-mimo/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAC/C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EL,CAAA;AACV,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,EAAE,CAAA;AACjD,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAUlD,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAA;AAEtC,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAAG,iBAAiB,EAAE,mBAAmB,CAAA;KAAE;CACxE"}
@@ -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.98.1";
79
+ export declare const PLUGIN_VERSION: "0.99.0";
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 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../../src/host/common/i18n/en.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAqL5C,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../../src/host/common/i18n/en.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAsL5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../../../src/host/common/i18n/ru.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAqL5C,CAAA"}
1
+ {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../../../src/host/common/i18n/ru.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAsL5C,CAAA"}
@@ -164,6 +164,7 @@ export declare const zh: {
164
164
  readonly 'antigravityAcp.notSignedIn': "还没有登录 Antigravity:请在设置页发起登录,或在终端执行 agy acp --login。";
165
165
  readonly 'antigravityAcp.noBinary': "未找到可用的 Antigravity CLI(agy),且官方 ACP 服务端尚未下载。";
166
166
  readonly 'antigravityAcp.nativeTool': "[Antigravity 使用了它自带的工具,这次调用没有经过 DSH 权限:{call}]\n";
167
+ readonly 'antigravityAcp.nativeToolDenied': "[Antigravity 请求使用它自带的工具,本次调用将被拒绝且对话继续;请改用 DSH 提供的工具:{call}]\n";
167
168
  readonly 'provider.qianwen-token-plan': "Qwen Token Plan(千问)";
168
169
  readonly 'provider.copilot': "GitHub Copilot(订阅)";
169
170
  readonly 'provider.volcengine-ark': "火山方舟(Ark 套餐)";
@@ -1 +1 @@
1
- {"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../../src/host/common/i18n/zh.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgML,CAAA;AAEV,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../../src/host/common/i18n/zh.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiML,CAAA;AAEV,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -96,6 +96,10 @@ export declare class AcpClient {
96
96
  private closed;
97
97
  private stderrTail;
98
98
  private handlers;
99
+ /** Whether the last initialize result advertised `sessionCapabilities.close`. */
100
+ private sessionClose;
101
+ /** Whether the last initialize result advertised `sessionCapabilities.resume`. */
102
+ private sessionResume;
99
103
  private readonly disposeEofGraceMs;
100
104
  private readonly disposeGraceMs;
101
105
  private readonly temp;
@@ -103,6 +107,20 @@ export declare class AcpClient {
103
107
  constructor(options: AcpSpawnOptions, handlers?: AcpClientHandlers);
104
108
  /** Whether the underlying process is still running. */
105
109
  get alive(): boolean;
110
+ /**
111
+ * Remember the capabilities an `initialize` result advertised.
112
+ *
113
+ * ACP requires clients to check a session capability before using its method;
114
+ * a warm process reused across turns therefore keeps this bit alongside the
115
+ * connection rather than letting each turn guess from the server version.
116
+ *
117
+ * @param value - The raw `initialize` result.
118
+ */
119
+ noteAgentCapabilities(value: unknown): void;
120
+ /** Whether this connection may be asked to close a session explicitly. */
121
+ get supportsSessionClose(): boolean;
122
+ /** Whether this connection may reconnect to an existing session without replay. */
123
+ get supportsSessionResume(): boolean;
106
124
  /**
107
125
  * Replace the handlers for the next turn.
108
126
  *
@@ -1 +1 @@
1
- {"version":3,"file":"acp-client.d.ts","sourceRoot":"","sources":["../../../../../src/host/providers/antigravity-acp/acp-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,+BAA+B;AAC/B,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AAEjC,2EAA2E;AAC3E,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,EAAE,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,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8,8 @@ import { type AttachmentImageReader } from '../../common/request-images.ts';
8
8
  import type { AntigravityAcpModelDto, AntigravityAcpUsageDto } from '../../../shared/antigravity-acp-contracts.ts';
9
9
  import { AcpClient, type AcpClientHandlers } from './acp-client.ts';
10
10
  import type { AntigravityAcpSettingsStore } from './settings.ts';
11
+ import type { AcpSessionStateStore } from './session-state.ts';
12
+ import type { AcpUpstreamCooldownStore } from './cooldown.ts';
11
13
  import { PROVIDER_ID } from './types.ts';
12
14
  /**
13
15
  * First-output budget.
@@ -92,6 +94,10 @@ export interface AntigravityAcpAdapterOptions {
92
94
  dormantSessionLimit?: number;
93
95
  /** How long one parked session may sit unused. */
94
96
  dormantSessionTimeoutMs?: number;
97
+ /** Durable pointers for resuming across process restarts; omitted disables it. */
98
+ sessionState?: AcpSessionStateStore;
99
+ /** Durable cooldown after an upstream refusal; omitted disables it. */
100
+ cooldown?: AcpUpstreamCooldownStore;
95
101
  /** Clock seam. */
96
102
  now?(): number;
97
103
  }
@@ -141,6 +147,14 @@ export declare class AntigravityAcpAdapter extends LlmAdapter {
141
147
  resolveModel(provider: string, model: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
142
148
  prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
143
149
  stream(options: HarnessGenerateOptions): AsyncIterable<StreamChunk>;
150
+ /**
151
+ * Drop every parked conversation without interrupting a live answer.
152
+ *
153
+ * Used after an account change or sign-out: the old ACP session must not be
154
+ * reused by the next message. In-flight turns finish but are no longer
155
+ * parkable, so they cannot write a fresh pointer behind the reset.
156
+ */
157
+ forgetConversations(): Promise<void>;
144
158
  /** Close every process this adapter owns. */
145
159
  dispose(): Promise<void>;
146
160
  /**
@@ -154,7 +168,19 @@ export declare class AntigravityAcpAdapter extends LlmAdapter {
154
168
  private run;
155
169
  /** Start a fresh ACP session for one generation and stream its answer. */
156
170
  private startTurn;
157
- /** Continue the live turn after the harness executed its tools. */
171
+ /** Whether a durable pointer still describes this conversation. */
172
+ private usablePersisted;
173
+ /**
174
+ * Reconnect to a session that outlived the process which created it.
175
+ *
176
+ * Officially this is `session/resume`: the server restores the conversation
177
+ * without replaying it, then the new bridge is attached and only the delta is
178
+ * sent. Any failure falls back to a cold session; the stale pointer is removed
179
+ * so the next turn does not retry a conversation the server no longer has.
180
+ */
181
+ private resumePersisted;
182
+ /**
183
+ * Continue the live turn after the harness executed its tools. */
158
184
  private continueTurn;
159
185
  /** Drain one turn's updates, yielding harness chunks as they arrive. */
160
186
  private pump;
@@ -264,16 +290,32 @@ export declare class AntigravityAcpAdapter extends LlmAdapter {
264
290
  * nobody answers.
265
291
  */
266
292
  private park;
293
+ /**
294
+ * Remember the completed conversation for the next host process.
295
+ *
296
+ * Only a parkable turn is stored: auxiliary title/compaction requests carry a
297
+ * different history and must never replace the user's conversation pointer.
298
+ */
299
+ private rememberSession;
267
300
  /**
268
301
  * Drop a parked session and hand its process back to the pool.
269
302
  *
270
- * The conversation itself is abandoned rather than closed with `session/close`:
271
- * not every agent version this line supports answers that request, and a request
272
- * that never settles would occupy one of the client's protocol slots for the
273
- * life of the process. The next turn opens a fresh conversation on the same warm
303
+ * The conversation is closed with `session/close` when the agent advertises
304
+ * that capability, then its process is pooled or disposed. The optional request
305
+ * is bounded so an older or wedged server cannot hold a protocol slot open; the
306
+ * next turn opens a fresh conversation on the same warm process. `preserve` is
307
+ * used only by adapter shutdown, where the durable pointer must outlive this
274
308
  * process.
275
309
  */
276
310
  private closeDormant;
311
+ /**
312
+ * Release one ACP session before its process is pooled or disposed.
313
+ *
314
+ * Official servers advertise `sessionCapabilities.close`; older ones do not,
315
+ * and the ACP specification forbids calling the method without that bit. The
316
+ * short abort keeps a wedged optional request from occupying a protocol slot.
317
+ */
318
+ private closeAcpSession;
277
319
  /**
278
320
  * Take one warm process out of the pool.
279
321
  *
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/host/providers/antigravity-acp/adapter.ts"],"names":[],"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OAMG;IACH,OAAO,CAAC,UAAU;IAKlB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,aAAa;IAMrB;;;;;;;;;;;;;OAaG;YACW,aAAa;IAwD3B;;;;;;OAMG;YACW,IAAI;IAwClB;;;;;OAKG;YACW,eAAe;IAa7B;;;;;;;;;OASG;YACW,YAAY;IAU1B;;;;;;OAMG;YACW,eAAe;IAc7B;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;IAepB,uDAAuD;IACvD,OAAO,CAAC,cAAc;IAoBtB,oFAAoF;YACtE,OAAO;IA0BrB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,GAAG;CAGZ;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,QAKzB,CAAA;AAwWX,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -34,11 +34,11 @@ export interface AcpBinaryRelease {
34
34
  * The registry entry this build was verified against.
35
35
  *
36
36
  * Source: `https://github.com/agentclientprotocol/registry` →
37
- * `antigravity-acp/agent.json`, fetched 2026-11-12. `license: proprietary`;
37
+ * `antigravity-acp/agent.json`, latest entry checked against the official Registry.
38
38
  * the archive is fetched from `dl.google.com` at install time and is never
39
39
  * redistributed with this package.
40
40
  */
41
- export declare const ACP_BINARY_VERSION = "1.5.0";
41
+ export declare const ACP_BINARY_VERSION = "1.5.2";
42
42
  /** Platform archives, keyed by `process.platform` + `process.arch`. */
43
43
  export declare const ACP_BINARY_RELEASES: Readonly<Record<string, AcpBinaryRelease>>;
44
44
  /** Largest archive this line will download; the Windows build is ~80 MB. */
@@ -0,0 +1,35 @@
1
+ /**
2
+ * A short, durable cooldown after an upstream account/rate refusal.
3
+ *
4
+ * The point is not to retry sooner or smarter; it is to stop a user (or an
5
+ * automated client) from putting the same account in front of the same wall
6
+ * repeatedly. The marker is local, opaque, and contains no credentials.
7
+ *
8
+ * @module dsh-chatgpt-subscription/host/antigravity-acp/cooldown
9
+ */
10
+ /** How long an upstream refusal suppresses new prompts. */
11
+ export declare const UPSTREAM_COOLDOWN_MS = 60000;
12
+ /** The adapter's view of the cooldown. */
13
+ export interface AcpUpstreamCooldownStore {
14
+ /** Milliseconds left before a new prompt may be attempted. */
15
+ remaining(): Promise<number>;
16
+ /** Start a fresh cooldown. */
17
+ block(): Promise<void>;
18
+ }
19
+ /** Where the cooldown marker lives. */
20
+ export declare function antigravityAcpCooldownPath(): string;
21
+ /** File-backed cooldown shared by host restarts. */
22
+ export declare class AntigravityAcpUpstreamCooldownStore implements AcpUpstreamCooldownStore {
23
+ private readonly filePath;
24
+ private readonly now;
25
+ private blockedUntil;
26
+ private loading;
27
+ private writes;
28
+ constructor(filePath?: string, now?: () => number);
29
+ remaining(): Promise<number>;
30
+ block(): Promise<void>;
31
+ private read;
32
+ private load;
33
+ private enqueue;
34
+ }
35
+ //# sourceMappingURL=cooldown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cooldown.d.ts","sourceRoot":"","sources":["../../../../../src/host/providers/antigravity-acp/cooldown.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,QAAS,CAAA;AAE1C,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACvC,8DAA8D;IAC9D,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAC5B,8BAA8B;IAC9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAED,uCAAuC;AACvC,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD;AAED,oDAAoD;AACpD,qBAAa,mCAAoC,YAAW,wBAAwB;IAMhF,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IANtB,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,MAAM,CAAmC;gBAG9B,QAAQ,SAA+B,EACvC,GAAG,GAAE,MAAM,MAAiB;IAGzC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAK5B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAWd,IAAI;YASJ,IAAI;YAaJ,OAAO;CAKtB"}
@@ -75,6 +75,14 @@ export declare const REPLAY_ARCHIVE_CHARS = 60000;
75
75
  export declare const REPLAY_MESSAGE_CHARS = 12000;
76
76
  /** Ceiling for one copy of the request the replay answers. */
77
77
  export declare const REPLAY_REQUEST_CHARS = 30000;
78
+ /**
79
+ * UTF-8 byte budget for the text blocks in one ACP prompt.
80
+ *
81
+ * The official server silently drops the tail of an oversized prompt at about
82
+ * 192 KB, so the client keeps a margin below that line. Inline image bytes are
83
+ * governed by ACP's separate image ceiling and are not counted here.
84
+ */
85
+ export declare const ACP_MAX_PROMPT_TEXT_BYTES = 180000;
78
86
  /** Content handed to `session/prompt` for one generation. */
79
87
  export interface AcpPrompt {
80
88
  blocks: AcpPromptBlock[];
@@ -92,6 +100,15 @@ export interface AcpPrompt {
92
100
  * @returns The blocks to send, plus what they cover.
93
101
  */
94
102
  export declare function buildPrompt(options: GenerateOptions, images: ResolvedRequestImages, fromMessage: number): AcpPrompt;
103
+ /**
104
+ * Keep the UTF-8 text budget below the official server's silent cut-off.
105
+ *
106
+ * The first block and the request tail are protected while older middle blocks
107
+ * are discarded. If a protected block is still too large, it is shortened from
108
+ * the middle so the newest request remains identifiable. Images are left alone:
109
+ * ACP has a separate image ceiling for them.
110
+ */
111
+ export declare function capPromptTextBytes(blocks: readonly AcpPromptBlock[], maxBytes?: number): AcpPromptBlock[];
95
112
  /**
96
113
  * Digest over a message range.
97
114
  *