@eddyskywalker/dsh-chatgpt-subscription 0.69.0 → 0.70.1

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 (108) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +3 -5
  3. package/lib/client.js +361 -1356
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +2852 -7174
  6. package/lib/types/client/CodexImageToolView.d.ts.map +1 -1
  7. package/lib/types/client/claude/locales.d.ts +2 -2
  8. package/lib/types/client/command-code/locales.d.ts +2 -2
  9. package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -1
  10. package/lib/types/client/common/account-pool-labels.d.ts +1 -1
  11. package/lib/types/client/common/account-pool-labels.d.ts.map +1 -1
  12. package/lib/types/client/common/format.d.ts +1 -1
  13. package/lib/types/client/common/styles.d.ts.map +1 -1
  14. package/lib/types/client/glm-coding-plan/locales.d.ts +2 -2
  15. package/lib/types/client/hub/brand-icons.d.ts +1 -1
  16. package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
  17. package/lib/types/client/hub/providers.d.ts.map +1 -1
  18. package/lib/types/client/index.d.ts +0 -2
  19. package/lib/types/client/index.d.ts.map +1 -1
  20. package/lib/types/client/kimi-code/locales.d.ts +2 -2
  21. package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
  22. package/lib/types/client/locales-ru/index.d.ts.map +1 -1
  23. package/lib/types/client/locales.d.ts +1 -3
  24. package/lib/types/client/locales.d.ts.map +1 -1
  25. package/lib/types/client/minimax-code/locales.d.ts +2 -2
  26. package/lib/types/client/progress-updates/locales.d.ts +3 -3
  27. package/lib/types/client/progress-updates/styles.d.ts +1 -1
  28. package/lib/types/client/qoder/locales.d.ts +1 -1
  29. package/lib/types/client/step-code/StepCodeComposerQuota.d.ts +3 -5
  30. package/lib/types/client/step-code/StepCodeComposerQuota.d.ts.map +1 -1
  31. package/lib/types/client/step-code/locales.d.ts +2 -2
  32. package/lib/types/compat.d.ts +1 -10
  33. package/lib/types/compat.d.ts.map +1 -1
  34. package/lib/types/host/agent-preset.d.ts +5 -3
  35. package/lib/types/host/agent-preset.d.ts.map +1 -1
  36. package/lib/types/host/common/capabilities.d.ts.map +1 -1
  37. package/lib/types/host/common/i18n/en.d.ts.map +1 -1
  38. package/lib/types/host/common/i18n/ru.d.ts.map +1 -1
  39. package/lib/types/host/common/i18n/zh.d.ts +0 -2
  40. package/lib/types/host/common/i18n/zh.d.ts.map +1 -1
  41. package/lib/types/host/common/model-request-control.d.ts +1 -1
  42. package/lib/types/host/common/model-request-control.d.ts.map +1 -1
  43. package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
  44. package/lib/types/host/common/request-diagnostics.d.ts +1 -1
  45. package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
  46. package/lib/types/host/credential-store-secret-service.d.ts +3 -5
  47. package/lib/types/host/credential-store-secret-service.d.ts.map +1 -1
  48. package/lib/types/host/glm-coding-plan/oauth.d.ts +1 -1
  49. package/lib/types/host/kimi-code/adapter.d.ts +6 -2
  50. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  51. package/lib/types/host/kimi-code/types.d.ts +14 -0
  52. package/lib/types/host/kimi-code/types.d.ts.map +1 -1
  53. package/lib/types/host/opendesign/types.d.ts +1 -2
  54. package/lib/types/host/opendesign/types.d.ts.map +1 -1
  55. package/lib/types/host/preset-sync.d.ts +2 -2
  56. package/lib/types/host/preset-sync.d.ts.map +1 -1
  57. package/lib/types/host/proxy-manager.d.ts +10 -10
  58. package/lib/types/host/proxy-manager.d.ts.map +1 -1
  59. package/lib/types/host/widget-board/line-contracts.d.ts +1 -1
  60. package/lib/types/host/widget-board/line-quota.d.ts +1 -16
  61. package/lib/types/host/widget-board/line-quota.d.ts.map +1 -1
  62. package/lib/types/host/widget-board/line-registry.d.ts.map +1 -1
  63. package/lib/types/index.d.ts +2 -31
  64. package/lib/types/index.d.ts.map +1 -1
  65. package/lib/types/shared/minimax-code-contracts.d.ts +1 -1
  66. package/package.json +8 -6
  67. package/widgets/line-flip/widget.json +2 -7
  68. package/bin/antigravity-login.mjs +0 -47
  69. package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts +0 -32
  70. package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts.map +0 -1
  71. package/lib/types/client/antigravity/AntigravitySection.d.ts +0 -8
  72. package/lib/types/client/antigravity/AntigravitySection.d.ts.map +0 -1
  73. package/lib/types/client/antigravity/locales.d.ts +0 -290
  74. package/lib/types/client/antigravity/locales.d.ts.map +0 -1
  75. package/lib/types/client/antigravity/styles.d.ts +0 -3
  76. package/lib/types/client/antigravity/styles.d.ts.map +0 -1
  77. package/lib/types/client/locales-ru/antigravity.d.ts +0 -10
  78. package/lib/types/client/locales-ru/antigravity.d.ts.map +0 -1
  79. package/lib/types/host/antigravity/account-pool.d.ts +0 -158
  80. package/lib/types/host/antigravity/account-pool.d.ts.map +0 -1
  81. package/lib/types/host/antigravity/adapter.d.ts +0 -73
  82. package/lib/types/host/antigravity/adapter.d.ts.map +0 -1
  83. package/lib/types/host/antigravity/cache-stats.d.ts +0 -166
  84. package/lib/types/host/antigravity/cache-stats.d.ts.map +0 -1
  85. package/lib/types/host/antigravity/catalog-limits.d.ts +0 -23
  86. package/lib/types/host/antigravity/catalog-limits.d.ts.map +0 -1
  87. package/lib/types/host/antigravity/client-version.d.ts +0 -55
  88. package/lib/types/host/antigravity/client-version.d.ts.map +0 -1
  89. package/lib/types/host/antigravity/client.d.ts +0 -74
  90. package/lib/types/host/antigravity/client.d.ts.map +0 -1
  91. package/lib/types/host/antigravity/image-tool.d.ts +0 -73
  92. package/lib/types/host/antigravity/image-tool.d.ts.map +0 -1
  93. package/lib/types/host/antigravity/mapper.d.ts +0 -165
  94. package/lib/types/host/antigravity/mapper.d.ts.map +0 -1
  95. package/lib/types/host/antigravity/oauth.d.ts +0 -98
  96. package/lib/types/host/antigravity/oauth.d.ts.map +0 -1
  97. package/lib/types/host/antigravity/port-constants.d.ts +0 -33
  98. package/lib/types/host/antigravity/port-constants.d.ts.map +0 -1
  99. package/lib/types/host/antigravity/routes.d.ts +0 -7
  100. package/lib/types/host/antigravity/routes.d.ts.map +0 -1
  101. package/lib/types/host/antigravity/token-store.d.ts +0 -76
  102. package/lib/types/host/antigravity/token-store.d.ts.map +0 -1
  103. package/lib/types/host/antigravity/tool-schema.d.ts +0 -14
  104. package/lib/types/host/antigravity/tool-schema.d.ts.map +0 -1
  105. package/lib/types/host/antigravity/types.d.ts +0 -140
  106. package/lib/types/host/antigravity/types.d.ts.map +0 -1
  107. package/lib/types/shared/antigravity-contracts.d.ts +0 -175
  108. package/lib/types/shared/antigravity-contracts.d.ts.map +0 -1
@@ -1,290 +0,0 @@
1
- export declare const NS_ANTIGRAVITY = "dsh-antigravity";
2
- export declare const zh: {
3
- title: string;
4
- pageDesc: string;
5
- account: string;
6
- signedIn: string;
7
- signedOut: string;
8
- accountPool: string;
9
- addAccount: string;
10
- primaryAccount: string;
11
- activeAccount: string;
12
- setPrimary: string;
13
- deleteAccount: string;
14
- cooling: string;
15
- clearCooldown: string;
16
- rotationStrategy: string;
17
- strategySequential: string;
18
- strategyRoundRobin: string;
19
- strategySticky: string;
20
- noAccounts: string;
21
- plan: string;
22
- accountId: string;
23
- expires: string;
24
- signInAgain: string;
25
- refreshToken: string;
26
- signOut: string;
27
- signIn: string;
28
- signingIn: string;
29
- connection: string;
30
- modelsHint: string;
31
- modelsSection: string;
32
- selectAll: string;
33
- unselectAll: string;
34
- enhanced: string;
35
- defaultReasoningEffort: string;
36
- defaultReasoningEffortHint: string;
37
- defaultEffortAuto: string;
38
- contextWindowSection: string;
39
- contextWindowHint: string;
40
- contextWindowReset: string;
41
- contextWindowResetAll: string;
42
- contextWindowResetAllConfirm: string;
43
- contextWindowNoneEnabled: string;
44
- save: string;
45
- saved: string;
46
- saving: string;
47
- cacheSection: string;
48
- cacheDesc: string;
49
- cacheEmpty: string;
50
- cacheHitRatio: string;
51
- cacheCached: string;
52
- cacheFresh: string;
53
- cacheRequests: string;
54
- cacheMiss: string;
55
- cacheMissIdle: string;
56
- cacheDriftNone: string;
57
- cacheDriftContents: string;
58
- cacheDriftSystemInstruction: string;
59
- cacheDriftTools: string;
60
- cacheDriftSessionId: string;
61
- cacheDriftNewSession: string;
62
- quotaSection: string;
63
- quotaDesc: string;
64
- refreshQuota: string;
65
- refreshingQuota: string;
66
- quotaEmpty: string;
67
- googleValidation: string;
68
- resetPrefix: string;
69
- resetUnavailable: string;
70
- resetNow: string;
71
- timeDayHour: string;
72
- timeHourMin: string;
73
- timeMin: string;
74
- updatedAt: string;
75
- loading: string;
76
- loginFailed: string;
77
- tokens: string;
78
- accountCount: string;
79
- cooldownLeft: string;
80
- cooldownRemaining: string;
81
- cooldownRemainingSeconds: string;
82
- needsRelogin: string;
83
- relogin: string;
84
- email: string;
85
- lastUsed: string;
86
- accountQuota: string;
87
- quotaNone: string;
88
- quotaSnapshot: string;
89
- quotaResets: string;
90
- quotaExhausted: string;
91
- quotaWindow: string;
92
- quotaUsed: string;
93
- quotaFactsScope: string;
94
- composerLabel: string;
95
- };
96
- export declare const en: Record<keyof typeof zh, string>;
97
- export declare const dictionaries: {
98
- zh: {
99
- title: string;
100
- pageDesc: string;
101
- account: string;
102
- signedIn: string;
103
- signedOut: string;
104
- accountPool: string;
105
- addAccount: string;
106
- primaryAccount: string;
107
- activeAccount: string;
108
- setPrimary: string;
109
- deleteAccount: string;
110
- cooling: string;
111
- clearCooldown: string;
112
- rotationStrategy: string;
113
- strategySequential: string;
114
- strategyRoundRobin: string;
115
- strategySticky: string;
116
- noAccounts: string;
117
- plan: string;
118
- accountId: string;
119
- expires: string;
120
- signInAgain: string;
121
- refreshToken: string;
122
- signOut: string;
123
- signIn: string;
124
- signingIn: string;
125
- connection: string;
126
- modelsHint: string;
127
- modelsSection: string;
128
- selectAll: string;
129
- unselectAll: string;
130
- enhanced: string;
131
- defaultReasoningEffort: string;
132
- defaultReasoningEffortHint: string;
133
- defaultEffortAuto: string;
134
- contextWindowSection: string;
135
- contextWindowHint: string;
136
- contextWindowReset: string;
137
- contextWindowResetAll: string;
138
- contextWindowResetAllConfirm: string;
139
- contextWindowNoneEnabled: string;
140
- save: string;
141
- saved: string;
142
- saving: string;
143
- cacheSection: string;
144
- cacheDesc: string;
145
- cacheEmpty: string;
146
- cacheHitRatio: string;
147
- cacheCached: string;
148
- cacheFresh: string;
149
- cacheRequests: string;
150
- cacheMiss: string;
151
- cacheMissIdle: string;
152
- cacheDriftNone: string;
153
- cacheDriftContents: string;
154
- cacheDriftSystemInstruction: string;
155
- cacheDriftTools: string;
156
- cacheDriftSessionId: string;
157
- cacheDriftNewSession: string;
158
- quotaSection: string;
159
- quotaDesc: string;
160
- refreshQuota: string;
161
- refreshingQuota: string;
162
- quotaEmpty: string;
163
- googleValidation: string;
164
- resetPrefix: string;
165
- resetUnavailable: string;
166
- resetNow: string;
167
- timeDayHour: string;
168
- timeHourMin: string;
169
- timeMin: string;
170
- updatedAt: string;
171
- loading: string;
172
- loginFailed: string;
173
- tokens: string;
174
- accountCount: string;
175
- cooldownLeft: string;
176
- cooldownRemaining: string;
177
- cooldownRemainingSeconds: string;
178
- needsRelogin: string;
179
- relogin: string;
180
- email: string;
181
- lastUsed: string;
182
- accountQuota: string;
183
- quotaNone: string;
184
- quotaSnapshot: string;
185
- quotaResets: string;
186
- quotaExhausted: string;
187
- quotaWindow: string;
188
- quotaUsed: string;
189
- quotaFactsScope: string;
190
- composerLabel: string;
191
- };
192
- 'zh-CN': {
193
- title: string;
194
- pageDesc: string;
195
- account: string;
196
- signedIn: string;
197
- signedOut: string;
198
- accountPool: string;
199
- addAccount: string;
200
- primaryAccount: string;
201
- activeAccount: string;
202
- setPrimary: string;
203
- deleteAccount: string;
204
- cooling: string;
205
- clearCooldown: string;
206
- rotationStrategy: string;
207
- strategySequential: string;
208
- strategyRoundRobin: string;
209
- strategySticky: string;
210
- noAccounts: string;
211
- plan: string;
212
- accountId: string;
213
- expires: string;
214
- signInAgain: string;
215
- refreshToken: string;
216
- signOut: string;
217
- signIn: string;
218
- signingIn: string;
219
- connection: string;
220
- modelsHint: string;
221
- modelsSection: string;
222
- selectAll: string;
223
- unselectAll: string;
224
- enhanced: string;
225
- defaultReasoningEffort: string;
226
- defaultReasoningEffortHint: string;
227
- defaultEffortAuto: string;
228
- contextWindowSection: string;
229
- contextWindowHint: string;
230
- contextWindowReset: string;
231
- contextWindowResetAll: string;
232
- contextWindowResetAllConfirm: string;
233
- contextWindowNoneEnabled: string;
234
- save: string;
235
- saved: string;
236
- saving: string;
237
- cacheSection: string;
238
- cacheDesc: string;
239
- cacheEmpty: string;
240
- cacheHitRatio: string;
241
- cacheCached: string;
242
- cacheFresh: string;
243
- cacheRequests: string;
244
- cacheMiss: string;
245
- cacheMissIdle: string;
246
- cacheDriftNone: string;
247
- cacheDriftContents: string;
248
- cacheDriftSystemInstruction: string;
249
- cacheDriftTools: string;
250
- cacheDriftSessionId: string;
251
- cacheDriftNewSession: string;
252
- quotaSection: string;
253
- quotaDesc: string;
254
- refreshQuota: string;
255
- refreshingQuota: string;
256
- quotaEmpty: string;
257
- googleValidation: string;
258
- resetPrefix: string;
259
- resetUnavailable: string;
260
- resetNow: string;
261
- timeDayHour: string;
262
- timeHourMin: string;
263
- timeMin: string;
264
- updatedAt: string;
265
- loading: string;
266
- loginFailed: string;
267
- tokens: string;
268
- accountCount: string;
269
- cooldownLeft: string;
270
- cooldownRemaining: string;
271
- cooldownRemainingSeconds: string;
272
- needsRelogin: string;
273
- relogin: string;
274
- email: string;
275
- lastUsed: string;
276
- accountQuota: string;
277
- quotaNone: string;
278
- quotaSnapshot: string;
279
- quotaResets: string;
280
- quotaExhausted: string;
281
- quotaWindow: string;
282
- quotaUsed: string;
283
- quotaFactsScope: string;
284
- composerLabel: string;
285
- };
286
- en: Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "cooldownRemaining" | "cooldownRemainingSeconds" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheRequests" | "cacheMiss" | "cacheMissIdle" | "cacheDriftNone" | "cacheDriftContents" | "cacheDriftSystemInstruction" | "cacheDriftTools" | "cacheDriftSessionId" | "cacheDriftNewSession" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
287
- 'en-US': Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "cooldownRemaining" | "cooldownRemainingSeconds" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheRequests" | "cacheMiss" | "cacheMissIdle" | "cacheDriftNone" | "cacheDriftContents" | "cacheDriftSystemInstruction" | "cacheDriftTools" | "cacheDriftSessionId" | "cacheDriftNewSession" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
288
- };
289
- export type AntigravityLocaleKey = keyof typeof zh;
290
- //# sourceMappingURL=locales.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAI/C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Ed,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CA6E9C,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const STYLE_ID = "dsh-antigravity-settings-style";
2
- export declare function installAntigravityStyles(): void;
3
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,mCAAmC,CAAA;AAExD,wBAAgB,wBAAwB,IAAI,IAAI,CA4E/C"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Russian wording for the Antigravity namespace.
3
- *
4
- * Key set and order follow the `zh` object key for key; the meaning is taken
5
- * from `en`. The account-pool subset comes from `account-pool.ts` and is
6
- * repeated here only because the source re-lists it in place.
7
- */
8
- import type { AntigravityLocaleKey } from '../antigravity/locales.ts';
9
- export declare const dictionary: Record<AntigravityLocaleKey, string>;
10
- //# sourceMappingURL=antigravity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAGrE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CA6E3D,CAAA"}
@@ -1,158 +0,0 @@
1
- import type { CredentialStore } from '../token-store.ts';
2
- import { FileCredentialStore, type AntigravityCredentials } from './token-store.ts';
3
- import type { AntigravityAccountQuota, AntigravityAccountSummaryDto, AccountRotationStrategy } from '../../shared/antigravity-contracts.ts';
4
- import type { PoolAccountQuotaDto } from '../../shared/account-pool-contracts.ts';
5
- export interface AntigravityPoolAccount {
6
- id: string;
7
- alias: string;
8
- email?: string;
9
- projectId?: string;
10
- planLabel?: string;
11
- credentials: AntigravityCredentials;
12
- addedAt: number;
13
- lastUsedAt?: number;
14
- cooldownUntil?: number;
15
- cooldownReason?: string;
16
- isPrimary?: boolean;
17
- }
18
- export interface AntigravityPoolData {
19
- version: 1;
20
- activeAccountId?: string;
21
- rotationStrategy: AccountRotationStrategy;
22
- accounts: AntigravityPoolAccount[];
23
- }
24
- export declare function poolPath(): string;
25
- /**
26
- * The rotation strategy this line defaults to, and the reader for it.
27
- *
28
- * Sticky rather than the shared core's sequential default, because the account a
29
- * request is served by may also decide which server-side prefix cache it can
30
- * reach: each account is a separate quota domain, and an account that changes mid
31
- * conversation plausibly lands on a cache the previous one had not warmed, so the
32
- * next turn may reprocess a prefix that was already paid for. Holding the account
33
- * that served the previous request is the cheap way to not find out the hard way,
34
- * and a request that is rate limited still falls through to another account.
35
- *
36
- * That account identity selects a cache namespace is INFERRED, not measured.
37
- * Nothing here observes an account-scoped cache metric, no live capture has been
38
- * taken, and docs/antigravity-claude-cache-audit.md records the upstream position
39
- * — on-wire session affinity still needs transport diagnostics — against a run
40
- * that had a single account, so cross-account behaviour was never exercised.
41
- * The default stands as a design assumption until one of those is done.
42
- *
43
- * Only the DEFAULT differs. An explicit stored choice is returned unchanged, and
44
- * a pool file written before this change carries an explicit 'sequential' — so
45
- * upgrading does not silently move an existing user onto a different strategy.
46
- * The shared core keeps its own sequential default for every other line.
47
- */
48
- export declare function poolRotationStrategy(value: unknown): AccountRotationStrategy;
49
- export declare function parseAntigravityPoolData(value: unknown): AntigravityPoolData;
50
- /**
51
- * One cached Antigravity snapshot as the shared account card renders it.
52
- *
53
- * One window per bucket. The service states what is LEFT, and the card draws what
54
- * is SPENT, so the used share is the complement. A bucket whose fraction is
55
- * `null` (never measured) or outside 0-1 is dropped rather than drawn as 0% or
56
- * 100%: "not stated" and "nothing used" are different claims and only one of
57
- * them is true. A stated 0 is a real measurement — the allowance is exhausted —
58
- * and is published as 100% used.
59
- *
60
- * `windowDurationMins` is deliberately absent. The bucket's `window` field is
61
- * carried through this line's cache verbatim and nothing in the line interprets
62
- * it as a duration, so naming a window from it would be a guess; the card names
63
- * each window from the label below instead.
64
- */
65
- export declare function antigravityPoolQuota(quota: AntigravityAccountQuota | undefined): PoolAccountQuotaDto | undefined;
66
- /**
67
- * Antigravity's account pool.
68
- *
69
- * The storage, eligibility, rotation and cooldown rules live in the shared
70
- * {@link AccountPoolCore}; this facade keeps the provider-shaped API the routes
71
- * and the adapter were written against, including the credential projection
72
- * (`token` / `projectId`) that predates the shared core.
73
- */
74
- export declare class AccountPoolStore {
75
- private readonly core;
76
- private readonly legacyStore;
77
- constructor(filePath?: string, backend?: CredentialStore<AntigravityPoolData>, legacyStore?: FileCredentialStore);
78
- /** Human description of where this pool's credentials live. */
79
- path(): string;
80
- read(): Promise<AntigravityPoolData>;
81
- write(data: AntigravityPoolData): Promise<void>;
82
- listAccounts(): Promise<AntigravityAccountSummaryDto[]>;
83
- addAccount(credentials: AntigravityCredentials, alias?: string): Promise<AntigravityPoolAccount>;
84
- setPrimary(accountId: string): Promise<void>;
85
- setAlias(accountId: string, alias: string): Promise<void>;
86
- deleteAccount(accountId: string): Promise<void>;
87
- setStrategy(strategy: AccountRotationStrategy): Promise<void>;
88
- markCooldown(accountId: string, durationMs: number, reason: string): Promise<void>;
89
- clearCooldown(accountId: string): Promise<void>;
90
- hasAnotherAvailableAccount(triedAccountIds: ReadonlySet<string>): Promise<boolean>;
91
- /**
92
- * Pick the account for the next request, with the credential projection the
93
- * Antigravity adapter consumes.
94
- */
95
- getEffectiveAccount(excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
96
- account: AntigravityPoolAccount;
97
- token: string;
98
- projectId?: string;
99
- }>;
100
- /**
101
- * Cooldowns keyed by account AND quota family.
102
- *
103
- * Antigravity meters Gemini and "Claude and GPT" as separate allowances
104
- * (`retrieveUserQuotaSummary` reports them as separate groups), so a 429 on
105
- * one says nothing about the other. The account-wide cooldown the shared core
106
- * writes took a whole account out of rotation for 15 minutes when only its
107
- * Claude allowance was spent, and its Gemini allowance went unused.
108
- *
109
- * Held in memory rather than in the pool document: it is a routing hint that
110
- * the next 429 re-establishes, and the shared pool format has no per-family
111
- * field to put it in.
112
- */
113
- private readonly familyCooldowns;
114
- private familyKey;
115
- /**
116
- * Cool one account down for one quota family after an upstream 429.
117
- *
118
- * `detail` is what the upstream actually said, kept beside the cooldown it
119
- * caused: the pool sentence the guard raises is about the pool, and the
120
- * upstream statement is the only part that tells the user WHY the request
121
- * was refused.
122
- */
123
- markFamilyCooldown(accountId: string, family: AntigravityQuotaFamily, durationMs: number, reason: string, detail?: string): void;
124
- /** Accounts whose allowance for this family is still cooling down. */
125
- familyCoolingAccountIds(family: AntigravityQuotaFamily, now?: number): Set<string>;
126
- /**
127
- * The family cooldown that expires soonest, with the account it belongs to.
128
- *
129
- * The wait the guard reports and the upstream detail it quotes come from
130
- * this ONE entry: two separate scans could pick different accounts, and the
131
- * message would then name a wait for one cooldown and a reason for another.
132
- */
133
- private soonestFamilyCooldown;
134
- /**
135
- * {@link getEffectiveAccount} for one quota family: accounts whose allowance
136
- * for that family is cooling down are skipped, every other account stays
137
- * eligible.
138
- *
139
- * @throws LlmError `RATE_LIMIT` naming the family's own wait when every
140
- * remaining account is cooling down for this family.
141
- */
142
- getEffectiveAccountFor(family: AntigravityQuotaFamily, excludeIds?: ReadonlySet<string>, fetchFn?: typeof fetch): Promise<{
143
- account: AntigravityPoolAccount;
144
- token: string;
145
- projectId?: string;
146
- }>;
147
- /** Whether an account not yet tried may still serve this family. */
148
- hasAnotherAvailableAccountFor(family: AntigravityQuotaFamily, triedAccountIds: ReadonlySet<string>): Promise<boolean>;
149
- }
150
- /**
151
- * The separately metered allowance one model draws from.
152
- *
153
- * Mirrors the quota groups `retrieveUserQuotaSummary` reports: Gemini models in
154
- * one, "Claude and GPT models" in the other.
155
- */
156
- export type AntigravityQuotaFamily = 'gemini' | 'claude-gpt';
157
- export declare function quotaFamilyForModel(modelId: string): AntigravityQuotaFamily;
158
- //# sourceMappingURL=account-pool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/account-pool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAIxD,OAAO,EACL,mBAAmB,EAEnB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EACV,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAA6B,MAAM,wCAAwC,CAAA;AAE5G,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,sBAAsB,CAAA;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,CAAA;IACV,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,EAAE,uBAAuB,CAAA;IACzC,QAAQ,EAAE,sBAAsB,EAAE,CAAA;CACnC;AAED,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB,CAI5E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,m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@
1
- import { LlmAdapter, ReasoningEffortId, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type StreamChunk } from '@deepseek-ai/dsh-llm';
2
- import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
3
- import { FileCredentialStore, FileModelSettingsStore, type AntigravityPreferenceStore } from './token-store.ts';
4
- import { type AttachmentImageReader } from './mapper.ts';
5
- import { type PromptCacheOverride } from '../common/prompt-cache-policy.ts';
6
- export declare function resolveDefaultReasoningEffort(efforts: readonly string[], configuredEffort?: string | null): ReasoningEffortId | undefined;
7
- import { AccountPoolStore } from './account-pool.ts';
8
- /**
9
- * The upstream error body, short enough to read in a notice.
10
- *
11
- * A 429 body is small when the service states a reset time in it and can be an
12
- * arbitrary blob when it does not, so the excerpt is what a notice carries.
13
- */
14
- export declare function upstreamBodyExcerpt(body: string): string;
15
- /**
16
- * Milliseconds in one duration string: protobuf JSON (`"12.5s"`) or Go form
17
- * (`"1h2m3.5s"`, `"373.8ms"`). Undefined when the string is neither.
18
- */
19
- export declare function parseDurationMs(value: string): number | undefined;
20
- /**
21
- * How long one 429 says to wait, or undefined when it does not say.
22
- *
23
- * Google states the reset in the error body rather than in `Retry-After`:
24
- * `ErrorInfo.metadata.quotaResetTimeStamp` (an instant) and `quotaResetDelay`
25
- * (a Go duration) for a spent allowance, `RetryInfo.retryDelay` for a short
26
- * rate limit. Reading only the header made every Antigravity 429 fall back to
27
- * the flat 15 minutes, whether the allowance reset in two seconds or in five
28
- * hours. The most specific statement wins; the header is the last resort.
29
- */
30
- export declare function retryDelayMs(headers: Headers, body: string, now?: number): number | undefined;
31
- /**
32
- * The same request body without its `toolConfig`, when that config asked for
33
- * VALIDATED; undefined when it did not (nothing to fall back from).
34
- */
35
- export declare function withoutValidatedToolConfig(body: string): string | undefined;
36
- export declare class AntigravityAdapter extends LlmAdapter {
37
- private readonly store;
38
- private readonly modelSettings;
39
- private readonly preferences?;
40
- private readonly options;
41
- private readonly accountPool;
42
- /**
43
- * Set once the service refuses `functionCallingConfig.mode: VALIDATED`; from
44
- * then on Claude requests leave the mode unset (AUTO) for this process.
45
- */
46
- private validatedToolCallingRejected;
47
- constructor(store?: FileCredentialStore, modelSettings?: FileModelSettingsStore, preferences?: AntigravityPreferenceStore | undefined, options?: {
48
- fetchFn?: typeof fetch;
49
- attachments?: AttachmentImageReader;
50
- promptCache?: PromptCacheOverride;
51
- /** Overrides {@link STREAM_FIRST_OUTPUT_TIMEOUT_MS}; equal to the idle budget collapses to one window. */
52
- firstOutputTimeoutMs?: number;
53
- }, accountPool?: AccountPoolStore);
54
- providerInfo(provider: string): LlmProviderInfo;
55
- providerRetryPolicy(): undefined;
56
- imageRequestPricing(_provider?: string, _model?: string): undefined;
57
- imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): {
58
- width: number;
59
- height: number;
60
- maxPixels: number;
61
- maxBytes: number;
62
- } | {
63
- width: number;
64
- height: number;
65
- maxBytes: number;
66
- };
67
- listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
68
- resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
69
- prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
70
- stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
71
- private requestStream;
72
- }
73
- //# sourceMappingURL=adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAarE,OAAO,EACL,mBAAmB,EACnB,sB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