@eddyskywalker/dsh-chatgpt-subscription 0.16.0 → 0.17.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.
@@ -44,6 +44,21 @@ export declare const zh: {
44
44
  save: string;
45
45
  saved: string;
46
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;
47
62
  quotaSection: string;
48
63
  quotaDesc: string;
49
64
  refreshQuota: string;
@@ -123,6 +138,21 @@ export declare const dictionaries: {
123
138
  save: string;
124
139
  saved: string;
125
140
  saving: string;
141
+ cacheSection: string;
142
+ cacheDesc: string;
143
+ cacheEmpty: string;
144
+ cacheHitRatio: string;
145
+ cacheCached: string;
146
+ cacheFresh: string;
147
+ cacheRequests: string;
148
+ cacheMiss: string;
149
+ cacheMissIdle: string;
150
+ cacheDriftNone: string;
151
+ cacheDriftContents: string;
152
+ cacheDriftSystemInstruction: string;
153
+ cacheDriftTools: string;
154
+ cacheDriftSessionId: string;
155
+ cacheDriftNewSession: string;
126
156
  quotaSection: string;
127
157
  quotaDesc: string;
128
158
  refreshQuota: string;
@@ -200,6 +230,21 @@ export declare const dictionaries: {
200
230
  save: string;
201
231
  saved: string;
202
232
  saving: string;
233
+ cacheSection: string;
234
+ cacheDesc: string;
235
+ cacheEmpty: string;
236
+ cacheHitRatio: string;
237
+ cacheCached: string;
238
+ cacheFresh: string;
239
+ cacheRequests: string;
240
+ cacheMiss: string;
241
+ cacheMissIdle: string;
242
+ cacheDriftNone: string;
243
+ cacheDriftContents: string;
244
+ cacheDriftSystemInstruction: string;
245
+ cacheDriftTools: string;
246
+ cacheDriftSessionId: string;
247
+ cacheDriftNewSession: string;
203
248
  quotaSection: string;
204
249
  quotaDesc: string;
205
250
  refreshQuota: string;
@@ -232,8 +277,8 @@ export declare const dictionaries: {
232
277
  quotaFactsScope: string;
233
278
  composerLabel: string;
234
279
  };
235
- 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" | "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" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
236
- '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" | "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" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
280
+ 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" | "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>;
281
+ '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" | "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>;
237
282
  };
238
283
  export type AntigravityLocaleKey = keyof typeof zh;
239
284
  //# sourceMappingURL=locales.d.ts.map
@@ -1 +1 @@
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Dd,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CA8D9C,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,EAAE,CAAA"}
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"}
@@ -454,8 +454,8 @@ export declare const dictionaries: {
454
454
  readonly quotaFactsScope: string;
455
455
  readonly composerLabel: string;
456
456
  };
457
- en: Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "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" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "cacheTtl" | "cacheTtlHint" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortHigh" | "effortMax" | "resetAt" | "copied" | "authenticatedAt" | "openSignInPage" | "wireAnthropic" | "wireOpenai" | "nickname" | "region" | "regionMainland" | "regionGlobal" | "refreshRejected" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "oauthHost" | "codingEndpoint" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "capInputCap" | "capNoTools" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "cacheTtlDefault" | "effortNone" | "contextWindowPlan" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheOutput" | "cacheRequests" | "cacheHint" | "cacheExpired" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftTools" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "requests", string>;
458
- 'en-US': Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "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" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "cacheTtl" | "cacheTtlHint" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortHigh" | "effortMax" | "resetAt" | "copied" | "authenticatedAt" | "openSignInPage" | "wireAnthropic" | "wireOpenai" | "nickname" | "region" | "regionMainland" | "regionGlobal" | "refreshRejected" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "oauthHost" | "codingEndpoint" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "capInputCap" | "capNoTools" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "cacheTtlDefault" | "effortNone" | "contextWindowPlan" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheOutput" | "cacheRequests" | "cacheHint" | "cacheExpired" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftTools" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "requests", string>;
457
+ en: Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "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" | "cacheDriftTools" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "cacheTtl" | "cacheTtlHint" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortHigh" | "effortMax" | "resetAt" | "copied" | "authenticatedAt" | "openSignInPage" | "wireAnthropic" | "wireOpenai" | "nickname" | "region" | "regionMainland" | "regionGlobal" | "refreshRejected" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "oauthHost" | "codingEndpoint" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "capInputCap" | "capNoTools" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "cacheTtlDefault" | "effortNone" | "contextWindowPlan" | "cacheOutput" | "cacheHint" | "cacheExpired" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "requests", string>;
458
+ 'en-US': Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "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" | "cacheDriftTools" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "cacheTtl" | "cacheTtlHint" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortHigh" | "effortMax" | "resetAt" | "copied" | "authenticatedAt" | "openSignInPage" | "wireAnthropic" | "wireOpenai" | "nickname" | "region" | "regionMainland" | "regionGlobal" | "refreshRejected" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "oauthHost" | "codingEndpoint" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "capInputCap" | "capNoTools" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "cacheTtlDefault" | "effortNone" | "contextWindowPlan" | "cacheOutput" | "cacheHint" | "cacheExpired" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "requests", string>;
459
459
  };
460
460
  export type KimiCodeLocaleKey = keyof typeof zh;
461
461
  //# sourceMappingURL=locales.d.ts.map
@@ -22,6 +22,30 @@ export interface AntigravityPoolData {
22
22
  accounts: AntigravityPoolAccount[];
23
23
  }
24
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;
25
49
  export declare function parseAntigravityPoolData(value: unknown): AntigravityPoolData;
26
50
  /**
27
51
  * One cached Antigravity snapshot as the shared account card renders it.
@@ -1 +1 @@
1
- {"version":3,"file":"account-pool.d.ts","s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,kBAAmB,SAAQ,UAAU;IAI9C,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkB;gBAG3B,KAAK,sBAA4B,EACjC,aAAa,yBAA+B,EAC5C,WAAW,CAAC,EAAE,0BAA0B,YAAA,EACxC,OAAO,GAAE;QAAE,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;QAAC,WAAW,CAAC,EAAE,qBAAqB,CAAA;KAAO,EAC9F,WAAW,CAAC,EAAE,gBAAgB;IAMhC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe;IAI/C,mBAAmB,IAAI,SAAS;IAIhC,mBAAmB,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS;IAI7D,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAmB/D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAwCpG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAO/F,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YAwBpD,aAAa;CAsL7B"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Per-session cache accounting for the Antigravity line.
3
+ *
4
+ * Antigravity's prompt cache is implicit and server-side: the client sets no
5
+ * cache-control field, and the only evidence that a prefix was reused is the
6
+ * pair `usageMetadata.cachedContentTokenCount` / `promptTokenCount` on each
7
+ * response. A ratio on its own cannot explain itself, so every request also
8
+ * fingerprints the three parts of its body that decide the prefix the service is
9
+ * able to reuse — `request.contents`, `request.systemInstruction` and
10
+ * `request.tools` — and diffs them against the previous request of the same
11
+ * session.
12
+ *
13
+ * Everything here is process-local, scoped by session, and never written to
14
+ * disk: the numbers describe the conversations this host served, and one
15
+ * session's misses must never be blended into another's ratio.
16
+ *
17
+ * KNOWN LIMITATION — the two halves read the request at different scopes.
18
+ *
19
+ * This is a measured fact about this module, not a theory: the prefix snapshots
20
+ * that produce a drift cause are keyed by SESSION alone ({@link
21
+ * sessionScopeKey}), while the token totals are keyed by SESSION AND ACCOUNT
22
+ * ({@link statsScopeKey}). The account is deliberately absent from the snapshot
23
+ * because the account that will answer a request is not known when the body is
24
+ * assembled — the adapter resolves it at the pool, after the fingerprint is
25
+ * taken.
26
+ *
27
+ * What follows from that: when one conversation is served by more than one
28
+ * pooled account (a 429 falls through to the next account mid-session), the
29
+ * three prefix segments and the raw session id are all byte-for-byte unchanged,
30
+ * so the drift comparator reports 'none'. A reader must NOT read that as "the
31
+ * client sent nothing different, so the chill came from the service" — the
32
+ * account did change. The request that reached the service was not the same
33
+ * request, even though every field this module fingerprints is identical.
34
+ *
35
+ * Whether the serving account actually partitions the server-side cache is
36
+ * INFERRED, not measured — the same unverified assumption the account-scoped
37
+ * totals rest on, and the reason no 'account' drift cause exists yet: promoting
38
+ * it to the contract before the assumption is checked would state it as fact.
39
+ * The honest reading of a 'none' beside a rising fresh-token count is "the client
40
+ * prefix held; look at which account served the turn".
41
+ */
42
+ /**
43
+ * The part of a request that changed since that session's previous request.
44
+ *
45
+ * `'none'` means the prefix held, so a cold turn is not explained by anything the
46
+ * client sent IN THE SEGMENTS THIS MODULE FINGERPRINTS — it points at the service
47
+ * or at something the fingerprints cannot see (see the file header's known
48
+ * limitation: the serving account is one such thing). Every other value names the
49
+ * input that broke the prefix, which is the half of the diagnostic a bare hit
50
+ * ratio cannot supply.
51
+ */
52
+ export type AntigravityPrefixDriftCause =
53
+ /** The prefix is unchanged. */
54
+ 'none'
55
+ /** The conversation itself changed. */
56
+ | 'contents'
57
+ /** The system instruction changed. */
58
+ | 'systemInstruction'
59
+ /** The tool list changed. */
60
+ | 'tools'
61
+ /**
62
+ * The session identifier the request carries changed inside one session scope.
63
+ *
64
+ * It names the CLIENT-SIDE string, and deliberately promises nothing about the
65
+ * service's cache: whether that identifier partitions anything server-side is
66
+ * inferred, not measured. In practice this branch is close to unreachable — the
67
+ * scope key trims, so it takes two spellings of one session (a trailing space)
68
+ * to trigger it within a single conversation.
69
+ */
70
+ | 'session-id'
71
+ /** Nothing to compare against: this scope's first request. */
72
+ | 'new-session';
73
+ /** One request's token counts, as the service reported them. */
74
+ export interface AntigravityUsageSample {
75
+ /** Prompt tokens served from the service's cache (`cachedContentTokenCount`). */
76
+ cachedTokens: number;
77
+ /** Prompt tokens it had to process (`promptTokenCount` minus the cached part). */
78
+ freshTokens: number;
79
+ }
80
+ /** Rolling cache totals for one scope. */
81
+ export interface AntigravityCacheStats {
82
+ /** Requests that reported usage. */
83
+ requests: number;
84
+ /** Prompt tokens served from cache across those requests. */
85
+ cachedTokens: number;
86
+ /** Prompt tokens processed afresh across those requests. */
87
+ freshTokens: number;
88
+ /** cachedTokens / (cachedTokens + freshTokens); null until a request reports usage. */
89
+ hitRatio: number | null;
90
+ }
91
+ /** The shape the settings route publishes, and the browser card renders. */
92
+ export interface AntigravityCacheStatsDto extends AntigravityCacheStats {
93
+ /**
94
+ * The most recent request that came back with nothing cached.
95
+ *
96
+ * Only misses are published. A prefix change on its own says nothing: a new
97
+ * user turn always changes `contents`, and that turn still hits the cache for
98
+ * everything before it. Publishing every change made the card read "contents
99
+ * changed" on every single turn — it named the one input that is SUPPOSED to
100
+ * change and hid the one that actually costs: an idle gap that outlived the
101
+ * service's cache.
102
+ */
103
+ lastMiss?: AntigravityCacheMiss;
104
+ }
105
+ /**
106
+ * One total miss, and the two facts that explain it.
107
+ *
108
+ * A miss here means the response reported zero cached tokens — the whole prefix
109
+ * was reprocessed. That is the event worth naming; a partial hit is the normal
110
+ * state of a growing conversation.
111
+ */
112
+ export interface AntigravityCacheMiss {
113
+ /** The segment that changed since this session's previous request. */
114
+ cause: AntigravityPrefixDriftCause;
115
+ /**
116
+ * Milliseconds since this session's previous request, or undefined when this
117
+ * was the session's first. The service's cache expires on idle time it does
118
+ * not disclose, so this is the reading that separates "the conversation
119
+ * restarted" from "the cache timed out while the user was away".
120
+ */
121
+ idleMs?: number;
122
+ /** When the miss was recorded. */
123
+ at: number;
124
+ }
125
+ /**
126
+ * Fingerprint the prefix of a request about to be sent, and attribute whatever
127
+ * changed since this session's previous request.
128
+ *
129
+ * Called once per turn, before the request goes out, so the answer describes the
130
+ * prefix the service will actually see. The reason is remembered for the session
131
+ * as well, so the route can publish the attribution beside the ratio it explains.
132
+ *
133
+ * @param body - The serialized request body, exactly as it will be sent.
134
+ * @param sessionId - Conversation the request belongs to, when it has one.
135
+ * @returns The change attributed to this request.
136
+ */
137
+ export declare function recordCacheRequest(body: string, sessionId?: unknown): AntigravityPrefixDriftCause;
138
+ /**
139
+ * Add one request's reported counts to its session's totals.
140
+ *
141
+ * The scope carries the account as well as the session, because a pooled line
142
+ * can answer one conversation from several accounts and each of those keeps its
143
+ * own cache server-side: one account's cold misses must not be averaged into
144
+ * another's warm hits.
145
+ *
146
+ * @param sample - Token counts the response reported.
147
+ * @param sessionId - Conversation the request belonged to.
148
+ * @param accountId - Pooled account that served it, when the pool is in use.
149
+ */
150
+ export declare function recordCacheUsage(sample: AntigravityUsageSample, sessionId?: unknown, accountId?: string): void;
151
+ /**
152
+ * Cache totals for one account's share of a session, one whole session, or every
153
+ * tracked session.
154
+ *
155
+ * A missing session is not an error: the settings card has no conversation in
156
+ * hand, and the process aggregate is the honest answer there.
157
+ */
158
+ export declare function getCacheStats(sessionId?: string, accountId?: string): AntigravityCacheStatsDto;
159
+ /**
160
+ * Forget one session's numbers, or all of them.
161
+ *
162
+ * Session teardown and test seam: a conversation that ended must not leave its
163
+ * ratio behind to be read as another's.
164
+ */
165
+ export declare function resetCacheStats(sessionId?: string): void;
166
+ //# sourceMappingURL=cache-stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-stats.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/cache-stats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B;AACrC,+BAA+B;AAC7B,MAAM;AACR,uCAAuC;GACrC,UAAU;AACZ,sCAAsC;GACpC,mBAAmB;AACrB,6BAA6B;GAC3B,OAAO;AACT;;;;;;;;GAQG;GACD,YAAY;AACd,8DAA8D;GAC5D,aAAa,CAAA;AAEjB,gEAAgE;AAChE,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,YAAY,EAAE,MAAM,CAAA;IACpB,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAA;IACpB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAA;IACnB,uFAAuF;IACvF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,4EAA4E;AAC5E,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC;AAiBD;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,KAAK,EAAE,2BAA2B,CAAA;IAClC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAA;CACX;AA0ID;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,2BAA2B,CAyBjG;AAOD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CA2B9G;AAmDD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAS9F;AAUD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAcxD"}
@@ -1,10 +1,18 @@
1
1
  import { type OutboundContentBlock, type GenerateOptions, type StreamChunk } from '../common/llm-compat.ts';
2
- import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
2
+ import type { AttachmentStore, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
3
3
  import { type AntigravityModelDef } from './types.ts';
4
4
  import { type AntigravityToolSchemaOptions } from './tool-schema.ts';
5
5
  export declare function sanitizeToolCallId(id: string, fallbackName: string): string;
6
- /** Attachment seam this route needs: verified bytes for one durable image. */
7
- export type AttachmentImageReader = Pick<AttachmentStore, 'readImage'>;
6
+ /**
7
+ * Attachment seam this route needs: verified bytes for one durable image, and a
8
+ * downscaled request version of one that is larger than the wire wants.
9
+ *
10
+ * Every harness generation in the peer range declares readImageRequest; a
11
+ * backend that cannot derive request versions rejects the call, and that
12
+ * rejection is handled like any other unreadable image. Matching the Claude
13
+ * route's declaration keeps the two scaled routes on one contract.
14
+ */
15
+ export type AttachmentImageReader = Pick<AttachmentStore, 'readImage' | 'readImageRequest'>;
8
16
  /** One durable user image resolved for an in-flight request, or proven unreadable. */
9
17
  export type ResolvedRequestImage = {
10
18
  readonly kind: 'inline';
@@ -21,6 +29,34 @@ export type ResolvedRequestImages = ReadonlyMap<string, ResolvedRequestImage>;
21
29
  * instruction, the conversation text, and the tool declarations.
22
30
  */
23
31
  export declare const MAX_REQUEST_IMAGE_BYTES: number;
32
+ /**
33
+ * Longest edge, in pixels, one image of this request may keep.
34
+ *
35
+ * CHOICE: 1024 px matches the long edge the other scaled routes send, and it is
36
+ * what makes the scaling in {@link resolveRequestImages} effective rather than
37
+ * nominal: the target is computed from the stored image's own dimensions, so the
38
+ * same image yields the same request bytes in every later turn and the prefix
39
+ * Google's implicit cache matches stays byte-stable.
40
+ *
41
+ * The budget stays Antigravity's own 12 MB. The 1.5 MB in
42
+ * host/common/request-images.ts is Kimi's, and that file warns in the same
43
+ * breath that importing one route's number into another refuses the other
44
+ * route's own legal images; Google accepts a request of up to 20 MB.
45
+ */
46
+ export declare const REQUEST_IMAGE_MAX_EDGE = 1024;
47
+ /**
48
+ * Request-version target for one stored image whose long edge is over the
49
+ * ceiling, or undefined when it already fits and is sent as stored.
50
+ *
51
+ * A reference without usable dimensions is sent as stored: there is no basis for
52
+ * choosing a target, and the budget fallback in
53
+ * {@link offloadOldestRequestImages} still applies to it.
54
+ */
55
+ export declare function requestImageTarget(ref: ImageAttachmentRef, edge?: number): {
56
+ width: number;
57
+ height: number;
58
+ maxBytes: number;
59
+ } | undefined;
24
60
  /**
25
61
  * Replace the oldest inline images with a text placeholder once one request
26
62
  * would carry more than {@link MAX_REQUEST_IMAGE_BYTES} of base64 image data.
@@ -31,6 +67,12 @@ export declare const MAX_REQUEST_IMAGE_BYTES: number;
31
67
  * order them, and the placeholder tells the model the image is missing instead
32
68
  * of letting it answer as though the picture were simply blank.
33
69
  *
70
+ * Each occurrence is measured at the size it will actually be sent at, so an
71
+ * image that only fits after scaling is not replaced (see
72
+ * {@link requestImageBytes}). Replacing an image is the LAST resort: it rewrites
73
+ * the retained prefix and costs the next turn its whole implicit cache hit, so
74
+ * it is worth keeping the image count stable for as long as the bytes allow.
75
+ *
34
76
  * @param options - the request about to be built; durable history stays untouched.
35
77
  * @returns the original options when they already fit, otherwise shallow copies.
36
78
  */
@@ -45,12 +87,42 @@ export declare function offloadOldestRequestImages(options: GenerateOptions): Ge
45
87
  * model a text marker, because a turn that silently loses its image is far
46
88
  * harder to diagnose than one that says so.
47
89
  *
90
+ * WHY SCALE INSTEAD OF DROP. `offloadOldestRequestImages` has to replace an
91
+ * image with placeholder text once the request exceeds
92
+ * {@link MAX_REQUEST_IMAGE_BYTES}, and the count it replaces grows with every
93
+ * image added afterwards. Each change rewrites the retained prefix, so Google's
94
+ * implicit cache misses again on the very next turn. An image whose long edge is
95
+ * over {@link REQUEST_IMAGE_MAX_EDGE} is therefore sent as the harness's
96
+ * downscaled request version, which keeps the image COUNT steady and with it the
97
+ * prefix. The stored image and durable history do not change, and an image that
98
+ * already fits is sent byte-for-byte as stored. The drop path stays as the last
99
+ * resort for a request that is over budget even after scaling.
100
+ *
48
101
  * @param options - the exact request about to be built.
49
102
  * @param attachments - durable attachment store; absent when the host wired none.
50
103
  * @param signal - cancellation, forwarded to every attachment read.
51
104
  * @returns one resolution per distinct attachment id, empty when there is no image.
52
105
  */
53
106
  export declare function resolveRequestImages(options: GenerateOptions, attachments: AttachmentImageReader | undefined, signal?: AbortSignal): Promise<ResolvedRequestImages>;
107
+ /**
108
+ * Collapse each run of adjacent pure-text parts into a single part.
109
+ *
110
+ * SSE transport chunks are not semantic content blocks. One answer arrives as
111
+ * hundreds of text deltas, and replaying each delta as its own part adds one
112
+ * part per delta to the request prefix on every later turn of the conversation.
113
+ * Antigravity relies on Google's implicit cache, which matches a byte-stable
114
+ * prefix: the moment the prefix gains a part the previous request did not have,
115
+ * everything after it misses. The Claude route lost 68.84% cache hits to exactly
116
+ * that growth before its deltas were merged; the Gemini route sends the same
117
+ * deltas and needs the same treatment.
118
+ *
119
+ * Merging is restricted to pure text, so signed, opaque, thinking, and tool
120
+ * parts keep their boundaries exactly where the model produced them.
121
+ *
122
+ * @param parts - replay parts in model order; the input is never mutated.
123
+ * @returns parts with every adjacent pure-text run merged into its first member.
124
+ */
125
+ export declare function mergeAdjacentTextParts(parts: ReadonlyArray<Record<string, unknown>>): Array<Record<string, unknown>>;
54
126
  export declare function convertMessages(options: GenerateOptions, model: AntigravityModelDef, runtimeModel: string, images?: ResolvedRequestImages): Array<{
55
127
  role: string;
56
128
  parts: Array<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/mapper.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,oBAAoB,EAEzB,KAAK,eAAe,EAEpB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,6BAA6B,CAAA;AAEtF,OAAO,EAQL,KAAK,mBAAmB,EACzB,MAAM,YAAY,CAAA;AACnB,OAAO,EAA2B,KAAK,4BAA4B,EAAE,MAAM,kBAAkB,CAAA;AAwB7F,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAI3E;AAkBD,8EAA8E;AAC9E,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAA;AAEtE,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAA;AAEpC,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAgD7E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,QAAmB,CAAA;AAwBvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,CA4BpF;A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AAC,CAAA;IAC9D,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAChF,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,OAAO,CAAA;IACpB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,iBAAiB,IAAI,WAAW,CAW/C;AA2CD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,EAAE,CAiGjF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,EAAE,CAmB7D"}
@@ -2,6 +2,6 @@ import type { Context } from '@deepseek-ai/cordis';
2
2
  import { FileCredentialStore, FileModelSettingsStore, type AntigravityPreferenceStore } from './token-store.ts';
3
3
  import { AccountPoolStore } from './account-pool.ts';
4
4
  import type { AntigravityWebStatus } from '../../shared/antigravity-contracts.ts';
5
- export declare function getAntigravityWebStatus(store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: AntigravityPreferenceStore, accountPool?: AccountPoolStore): Promise<AntigravityWebStatus>;
5
+ export declare function getAntigravityWebStatus(store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: AntigravityPreferenceStore, accountPool?: AccountPoolStore, sessionId?: string): Promise<AntigravityWebStatus>;
6
6
  export declare function registerAntigravityRoutes(ctx: Context, store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: AntigravityPreferenceStore, fetchFn?: typeof fetch, accountPool?: AccountPoolStore): () => void;
7
7
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAC/G,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAKpD,OAAO,KAAK,EAA0B,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AA+BzG,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,0BAA0B,EACxC,WAAW,mBAAoD,GAC9D,OAAO,CAAC,oBAAoB,CAAC,CAoC/B;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,0BAA0B,EACxC,OAAO,GAAE,OAAO,KAAa,EAC7B,WAAW,mBAAoD,GAC9D,MAAM,IAAI,CA6IZ"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAC/G,OAAO,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAA;AAM1E,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,uCAAuC,CAAA;AA+B9C,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,0BAA0B,EACxC,WAAW,mBAAoD,EAC/D,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,oBAAoB,CAAC,CAyC/B;AAiBD,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,0BAA0B,EACxC,OAAO,GAAE,OAAO,KAAa,EAC7B,WAAW,mBAAoD,GAC9D,MAAM,IAAI,CAsJZ"}
@@ -59,6 +59,76 @@ export interface AntigravityAccountQuota {
59
59
  }
60
60
  import type { AccountRotationStrategy, PoolAccountSummaryDto } from './account-pool-contracts.ts';
61
61
  export type { AccountRotationStrategy };
62
+ /**
63
+ * The part of an Antigravity request that changed since that session's previous
64
+ * request.
65
+ *
66
+ * The line's cache is implicit and server-side: nothing in the request turns it
67
+ * on, so a hit ratio alone cannot say why a turn went cold. `'none'` means the
68
+ * prefix held; every other value names the input that broke it.
69
+ *
70
+ * Read `'none'` narrowly. It says the segments this line fingerprints are
71
+ * byte-identical to the previous request of the same session — not that nothing
72
+ * about the turn changed. The serving account is one input it cannot see: the
73
+ * snapshots are keyed by session while the token totals are keyed by session and
74
+ * account, so a conversation that fell through to another pooled account reports
75
+ * `'none'` even though the account changed. Whether that accounts for anything
76
+ * server-side is inferred, not measured.
77
+ */
78
+ export type AntigravityPrefixDriftCause = 'none' | 'contents' | 'systemInstruction' | 'tools'
79
+ /**
80
+ * The session identifier the request carries changed inside one session scope.
81
+ * It names the client-side string and promises nothing about the service's
82
+ * cache, which is why it is spelled out rather than shortened to "session ID".
83
+ */
84
+ | 'session-id' | 'new-session';
85
+ /**
86
+ * How well Antigravity's implicit prefix cache is working for one session.
87
+ *
88
+ * Reported because the cache is invisible otherwise: there is no marker to set
89
+ * and no client-side control field, so the served-from-cache share of the prompt
90
+ * is the only evidence a conversation is reusing its prefix.
91
+ */
92
+ export interface AntigravityCacheStatsDto {
93
+ /** Requests that reported usage. */
94
+ requests: number;
95
+ /** Prompt tokens served from cache across those requests. */
96
+ cachedTokens: number;
97
+ /** Prompt tokens processed afresh across those requests. */
98
+ freshTokens: number;
99
+ /** cached / (cached + fresh); null until a request reports usage. */
100
+ hitRatio: number | null;
101
+ /**
102
+ * The most recent request that came back with NOTHING cached.
103
+ *
104
+ * Only total misses are published. Every user turn changes the conversation, so
105
+ * reporting the latest prefix change reported the same thing on every turn and
106
+ * buried the reading that matters: how long the client was idle before the turn
107
+ * that lost the cache. A partial hit is the normal state of a growing
108
+ * conversation and is deliberately not reported here.
109
+ */
110
+ lastMiss?: AntigravityCacheMiss;
111
+ }
112
+ /**
113
+ * One total miss, and the two facts that explain it.
114
+ *
115
+ * A miss means the response reported zero cached tokens: the service reprocessed
116
+ * the entire prefix. Naming the cause beside the idle time is what separates a
117
+ * conversation that restarted from a cache that expired while the user was away
118
+ * — the two have opposite remedies, and the ratio alone cannot tell them apart.
119
+ */
120
+ export interface AntigravityCacheMiss {
121
+ /** The segment that changed since this session's previous request. */
122
+ cause: AntigravityPrefixDriftCause;
123
+ /**
124
+ * Milliseconds since this session's previous request, or undefined when this
125
+ * was the session's first. The service's cache expires on idle time it does
126
+ * not disclose, so this is the only client-side reading of that boundary.
127
+ */
128
+ idleMs?: number;
129
+ /** When the miss was recorded, in Unix milliseconds. */
130
+ at: number;
131
+ }
62
132
  /** One pooled Antigravity account as the settings card renders it. */
63
133
  export interface AntigravityAccountSummaryDto extends PoolAccountSummaryDto {
64
134
  projectId?: string;
@@ -88,6 +158,12 @@ export interface AntigravityWebStatus {
88
158
  accounts?: AntigravityAccountSummaryDto[];
89
159
  activeAccountId?: string;
90
160
  rotationStrategy?: AccountRotationStrategy;
161
+ /**
162
+ * Rolling prefix-cache effectiveness for the requested session, or for the
163
+ * whole process when the request named none. Null while nothing has reported
164
+ * usage yet — which is not the same fact as a 0% hit ratio.
165
+ */
166
+ cache?: AntigravityCacheStatsDto | null;
91
167
  }
92
168
  export interface AntigravitySettingsUpdateDto {
93
169
  enabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity-contracts.d.ts","sourceRoot":"","sources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,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,uBAAuB,CAAA;CAC3C;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,qFAAqF;IACrF,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IACtD,sBAAsB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAA;CAC1D"}
1
+ {"version":3,"file":"antigravity-contracts.d.ts","sourceRoot":"","sources":["../../../src/shared/antigravity-contracts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;OAOG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,sBAAsB,EAAE,CAAA;CAClC;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CA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,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,qFAAqF;IACrF,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IACtD,sBAAsB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAA;CAC1D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eddyskywalker/dsh-chatgpt-subscription",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "DSH provider plugin for Codex access through a ChatGPT subscription.",
5
5
  "author": {
6
6
  "name": "eddyskywalker",