@eddyskywalker/dsh-chatgpt-subscription 0.68.1 → 0.70.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.
- package/CHANGELOG.md +41 -0
- package/README.md +5 -7
- package/lib/client.js +338 -1357
- package/lib/client.js.map +1 -1
- package/lib/codemode.js +440 -18
- package/lib/{entry-plan-mode-gqE4UeU5.js → entry-plan-mode-5DBZA4Il.js} +38 -11
- package/lib/index.js +2900 -7157
- package/lib/plan-mode-pipeline.js +20 -6
- package/lib/plan-mode.js +1 -1
- package/lib/types/client/CodexImageToolView.d.ts.map +1 -1
- package/lib/types/client/claude/locales.d.ts +2 -2
- package/lib/types/client/codemode/CodeRunToolView.d.ts.map +1 -1
- package/lib/types/client/command-code/locales.d.ts +2 -2
- package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -1
- package/lib/types/client/common/account-pool-labels.d.ts +1 -1
- package/lib/types/client/common/account-pool-labels.d.ts.map +1 -1
- package/lib/types/client/common/format.d.ts +1 -1
- package/lib/types/client/glm-coding-plan/locales.d.ts +2 -2
- package/lib/types/client/hub/brand-icons.d.ts +1 -1
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
- package/lib/types/client/hub/providers.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +0 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/locales.d.ts +2 -2
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +1 -3
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/minimax-code/locales.d.ts +2 -2
- package/lib/types/client/progress-updates/locales.d.ts +3 -3
- package/lib/types/client/progress-updates/styles.d.ts +1 -1
- package/lib/types/client/qoder/locales.d.ts +1 -1
- package/lib/types/client/step-code/StepCodeComposerQuota.d.ts +3 -5
- package/lib/types/client/step-code/StepCodeComposerQuota.d.ts.map +1 -1
- package/lib/types/client/step-code/locales.d.ts +2 -2
- package/lib/types/compat.d.ts +1 -10
- package/lib/types/compat.d.ts.map +1 -1
- package/lib/types/entry-codemode.d.ts.map +1 -1
- package/lib/types/entry-plan-mode-pipeline.d.ts.map +1 -1
- package/lib/types/host/agent-preset.d.ts +5 -3
- package/lib/types/host/agent-preset.d.ts.map +1 -1
- package/lib/types/host/codemode/transport.d.ts +61 -5
- package/lib/types/host/codemode/transport.d.ts.map +1 -1
- package/lib/types/host/common/capabilities.d.ts.map +1 -1
- package/lib/types/host/common/i18n/en.d.ts.map +1 -1
- package/lib/types/host/common/i18n/ru.d.ts.map +1 -1
- package/lib/types/host/common/i18n/zh.d.ts +0 -2
- package/lib/types/host/common/i18n/zh.d.ts.map +1 -1
- package/lib/types/host/common/idle-watchdog.d.ts +10 -2
- package/lib/types/host/common/idle-watchdog.d.ts.map +1 -1
- package/lib/types/host/common/model-request-control.d.ts +1 -1
- package/lib/types/host/common/model-request-control.d.ts.map +1 -1
- package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
- package/lib/types/host/common/request-diagnostics.d.ts +1 -1
- package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
- package/lib/types/host/credential-store-secret-service.d.ts +3 -5
- package/lib/types/host/credential-store-secret-service.d.ts.map +1 -1
- package/lib/types/host/dispatch-execution-guard.d.ts.map +1 -1
- package/lib/types/host/glm-coding-plan/oauth.d.ts +1 -1
- package/lib/types/host/kimi-code/adapter.d.ts +6 -2
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/lib/types/host/kimi-code/types.d.ts +14 -0
- package/lib/types/host/kimi-code/types.d.ts.map +1 -1
- package/lib/types/host/opendesign/types.d.ts +1 -2
- package/lib/types/host/opendesign/types.d.ts.map +1 -1
- package/lib/types/host/preset-sync.d.ts +2 -2
- package/lib/types/host/preset-sync.d.ts.map +1 -1
- package/lib/types/host/proxy-manager.d.ts +10 -10
- package/lib/types/host/proxy-manager.d.ts.map +1 -1
- package/lib/types/host/widget-board/line-contracts.d.ts +1 -1
- package/lib/types/host/widget-board/line-quota.d.ts +1 -16
- package/lib/types/host/widget-board/line-quota.d.ts.map +1 -1
- package/lib/types/host/widget-board/line-registry.d.ts.map +1 -1
- package/lib/types/index.d.ts +2 -8
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/minimax-code-contracts.d.ts +1 -1
- package/package.json +26 -24
- package/widgets/line-flip/widget.json +2 -7
- package/bin/antigravity-login.mjs +0 -47
- package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts +0 -32
- package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts.map +0 -1
- package/lib/types/client/antigravity/AntigravitySection.d.ts +0 -8
- package/lib/types/client/antigravity/AntigravitySection.d.ts.map +0 -1
- package/lib/types/client/antigravity/locales.d.ts +0 -290
- package/lib/types/client/antigravity/locales.d.ts.map +0 -1
- package/lib/types/client/antigravity/styles.d.ts +0 -3
- package/lib/types/client/antigravity/styles.d.ts.map +0 -1
- package/lib/types/client/locales-ru/antigravity.d.ts +0 -10
- package/lib/types/client/locales-ru/antigravity.d.ts.map +0 -1
- package/lib/types/host/antigravity/account-pool.d.ts +0 -158
- package/lib/types/host/antigravity/account-pool.d.ts.map +0 -1
- package/lib/types/host/antigravity/adapter.d.ts +0 -71
- package/lib/types/host/antigravity/adapter.d.ts.map +0 -1
- package/lib/types/host/antigravity/cache-stats.d.ts +0 -166
- package/lib/types/host/antigravity/cache-stats.d.ts.map +0 -1
- package/lib/types/host/antigravity/catalog-limits.d.ts +0 -23
- package/lib/types/host/antigravity/catalog-limits.d.ts.map +0 -1
- package/lib/types/host/antigravity/client-version.d.ts +0 -55
- package/lib/types/host/antigravity/client-version.d.ts.map +0 -1
- package/lib/types/host/antigravity/client.d.ts +0 -74
- package/lib/types/host/antigravity/client.d.ts.map +0 -1
- package/lib/types/host/antigravity/image-tool.d.ts +0 -73
- package/lib/types/host/antigravity/image-tool.d.ts.map +0 -1
- package/lib/types/host/antigravity/mapper.d.ts +0 -165
- package/lib/types/host/antigravity/mapper.d.ts.map +0 -1
- package/lib/types/host/antigravity/oauth.d.ts +0 -98
- package/lib/types/host/antigravity/oauth.d.ts.map +0 -1
- package/lib/types/host/antigravity/port-constants.d.ts +0 -33
- package/lib/types/host/antigravity/port-constants.d.ts.map +0 -1
- package/lib/types/host/antigravity/routes.d.ts +0 -7
- package/lib/types/host/antigravity/routes.d.ts.map +0 -1
- package/lib/types/host/antigravity/token-store.d.ts +0 -76
- package/lib/types/host/antigravity/token-store.d.ts.map +0 -1
- package/lib/types/host/antigravity/tool-schema.d.ts +0 -14
- package/lib/types/host/antigravity/tool-schema.d.ts.map +0 -1
- package/lib/types/host/antigravity/types.d.ts +0 -119
- package/lib/types/host/antigravity/types.d.ts.map +0 -1
- package/lib/types/shared/antigravity-contracts.d.ts +0 -175
- package/lib/types/shared/antigravity-contracts.d.ts.map +0 -1
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { type Server } from 'node:http';
|
|
2
|
-
import { FileCredentialStore, type AntigravityCredentials } from './token-store.ts';
|
|
3
|
-
import { type LoadCodeAssistDetailResult } from './client.ts';
|
|
4
|
-
export interface WebLoginFlowState {
|
|
5
|
-
status: 'idle' | 'pending' | 'complete' | 'error';
|
|
6
|
-
authUrl?: string;
|
|
7
|
-
startedAt?: number;
|
|
8
|
-
completedAt?: number;
|
|
9
|
-
email?: string;
|
|
10
|
-
error?: string;
|
|
11
|
-
validationUrl?: string;
|
|
12
|
-
progress?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function callbackPort(): number;
|
|
15
|
-
/**
|
|
16
|
-
* First usable loopback port for the callback listener.
|
|
17
|
-
*
|
|
18
|
-
* Windows (Hyper-V/WinNAT) dynamically reserves TCP port ranges that change on
|
|
19
|
-
* every reboot, and the CLI's default port can land inside one — `listen` then
|
|
20
|
-
* fails with `EACCES: permission denied ::1:51121` and browser authorization
|
|
21
|
-
* never opens. A fixed port therefore cannot be relied on; the Google redirect
|
|
22
|
-
* URI carries whatever port this returns, so any free loopback port works. A
|
|
23
|
-
* configured `DSH_ANTIGRAVITY_CALLBACK_PORT` still wins — callers who set it
|
|
24
|
-
* accept that the port must be usable.
|
|
25
|
-
*
|
|
26
|
-
* How wide such a reserved run is not something this function can look up — it
|
|
27
|
-
* is the host's own bookkeeping — so the probe only has to be wider than the
|
|
28
|
-
* widest run it can meet, and it walks a window sized for that (see
|
|
29
|
-
* {@link CALLBACK_PORT_ATTEMPTS}) instead of guessing a block size. `start` and
|
|
30
|
-
* `probe` are the seams that keep that claim testable: production probes from
|
|
31
|
-
* the line's own default and judges each port by really binding it, and a test
|
|
32
|
-
* can point the walk at a run whose width it controls.
|
|
33
|
-
*/
|
|
34
|
-
export declare function resolveCallbackPort(attempts?: number, host?: string, start?: number,
|
|
35
|
-
/**
|
|
36
|
-
* How one port is judged. Defaults to the real bind on `host`, the only
|
|
37
|
-
* authority that can answer the question for the machine this will run on.
|
|
38
|
-
*
|
|
39
|
-
* Overridable because the width of the window is a contract while the width of
|
|
40
|
-
* the run it must clear is a machine fact: Windows reservations appear *and*
|
|
41
|
-
* are released while a test is running, and another process can own a port a
|
|
42
|
-
* scenario wanted free, so a run built out of real sockets measures this host
|
|
43
|
-
* as much as the probe. An injected judge gives the run a known width and
|
|
44
|
-
* leaves the assertion about the window alone. (The Claude line injects its
|
|
45
|
-
* probe the same way.)
|
|
46
|
-
*/
|
|
47
|
-
probe?: (port: number) => Promise<boolean>): Promise<number>;
|
|
48
|
-
export declare function resolveCallbackHost(raw?: string | undefined): string;
|
|
49
|
-
export declare function redirectUri(port?: number, host?: string): string;
|
|
50
|
-
export declare function clientId(): string;
|
|
51
|
-
export declare function clientSecret(): string;
|
|
52
|
-
export declare function generatePKCE(): {
|
|
53
|
-
verifier: string;
|
|
54
|
-
challenge: string;
|
|
55
|
-
};
|
|
56
|
-
export declare function openBrowser(url: string): void;
|
|
57
|
-
export declare function getUserEmail(token: string, fetchFn?: typeof fetch): Promise<string | undefined>;
|
|
58
|
-
export declare function startCallbackServer(expectedState: string): Promise<{
|
|
59
|
-
server: Server;
|
|
60
|
-
waitForCode: () => Promise<{
|
|
61
|
-
code: string;
|
|
62
|
-
state: string;
|
|
63
|
-
}>;
|
|
64
|
-
/** The redirect URI the provider receives: the probed port, not the default. */
|
|
65
|
-
callbackUrl: string;
|
|
66
|
-
}>;
|
|
67
|
-
export declare function extractGoogleValidationUrl(text: string): string | undefined;
|
|
68
|
-
export declare function assertFreeTierEligible(payload: LoadCodeAssistDetailResult): void;
|
|
69
|
-
/**
|
|
70
|
-
* The tier to onboard with, chosen the way the Hub chooses one.
|
|
71
|
-
*
|
|
72
|
-
* The Hub onboards into its own default allowed tier; this route additionally
|
|
73
|
-
* requires the free tier to be on offer (it is the only tier this line claims
|
|
74
|
-
* eligibility for), so that one is preferred next. Everything else is the
|
|
75
|
-
* reference implementation's order: first allowed tier, current tier, free tier.
|
|
76
|
-
*/
|
|
77
|
-
export declare function selectOnboardTier(payload: LoadCodeAssistDetailResult): string;
|
|
78
|
-
export declare function discoverAntigravityProject(token: string, fetchFn?: typeof fetch, signal?: AbortSignal, onProgress?: (stage: string) => void): Promise<string | undefined>;
|
|
79
|
-
export declare function exchangeOAuthCode(code: string, verifier: string, callbackUrl: string, fetchFn?: typeof fetch, signal?: AbortSignal, onProgress?: (stage: string) => void): Promise<AntigravityCredentials>;
|
|
80
|
-
export declare function beginWebLogin(store: FileCredentialStore, fetchFn?: typeof fetch, signal?: AbortSignal, onSave?: (credentials: AntigravityCredentials) => Promise<unknown>): Promise<WebLoginFlowState>;
|
|
81
|
-
export declare function getWebLoginStatus(): WebLoginFlowState;
|
|
82
|
-
export declare function refreshAntigravityToken(credentials: AntigravityCredentials, fetchFn?: typeof fetch): Promise<AntigravityCredentials>;
|
|
83
|
-
export declare function ensureApiKey(store: FileCredentialStore, fetchFn?: typeof fetch): Promise<{
|
|
84
|
-
token: string;
|
|
85
|
-
projectId?: string;
|
|
86
|
-
}>;
|
|
87
|
-
export declare function loginAndSave(store: FileCredentialStore, signal?: AbortSignal, onUrl?: (url: string) => void, fetchFn?: typeof fetch, onProgress?: (stage: string) => void,
|
|
88
|
-
/**
|
|
89
|
-
* 打开授权页的方式;缺省是本模块那份平台实现。
|
|
90
|
-
*
|
|
91
|
-
* 这一栏只是给测试留的口子:这一行以前是硬编码的 openBrowser(authUrl),将来
|
|
92
|
-
* 任何调用 loginAndSave 的用例都会在跑测试的机器上真的弹出窗口,而写用例的人
|
|
93
|
-
* 不会事先知道。
|
|
94
|
-
*
|
|
95
|
-
* 默认值就是改动前那一行本身,所以**生产行为一点没变**:该开还是开。
|
|
96
|
-
*/
|
|
97
|
-
openFn?: (url: string) => void): Promise<AntigravityCredentials>;
|
|
98
|
-
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/oauth.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AAcrD,OAAO,EAAE,mBAAmB,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACnF,OAAO,EAKL,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;IACjD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AASD,wBAAgB,YAAY,IAAI,MAAM,CAMrC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAA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AE,MAAM,KAAK,IAAI;AACpC;;;;;;;;GAQG;AACH,MAAM,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAkB,GAC1C,OAAO,CAAC,sBAAsB,CAAC,CA+BjC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Loopback callback ports for provider sign-in flows.
|
|
3
|
-
*
|
|
4
|
-
* Windows (Hyper-V/WinNAT) dynamically reserves TCP port ranges that change on
|
|
5
|
-
* every reboot. A fixed callback port can land inside one and `listen` fails
|
|
6
|
-
* with `EACCES` — browser authorization never opens. Flows therefore probe for
|
|
7
|
-
* a usable port instead of assuming the default is free; the redirect URI the
|
|
8
|
-
* provider receives carries whichever port was probed.
|
|
9
|
-
*/
|
|
10
|
-
/** Default loopback port the Antigravity CLI's own flow uses. */
|
|
11
|
-
export declare const DEFAULT_CALLBACK_PORT = 51121;
|
|
12
|
-
/**
|
|
13
|
-
* How many consecutive ports one probe covers, starting at the default.
|
|
14
|
-
*
|
|
15
|
-
* An excluded range is not a block of fixed width. Windows reserves whatever
|
|
16
|
-
* span Hyper-V/WinNAT/its own services hold, it moves on every reboot, and a
|
|
17
|
-
* Windows 11 host was measured handing this line's default port 277 consecutive
|
|
18
|
-
* excluded ports (51121-51397). A window narrower than the run the default
|
|
19
|
-
* starts inside ends *inside* that run and then reports "no usable port" on a
|
|
20
|
-
* machine where hundreds of free ports sit immediately behind it — so the width
|
|
21
|
-
* of this window, not the width the probe assumes, is what keeps the flow
|
|
22
|
-
* working.
|
|
23
|
-
*
|
|
24
|
-
* 1024 is roughly 3.7x the widest run measured, which is the margin that stops
|
|
25
|
-
* this depending on any single host's layout, and it still ends at 52144, far
|
|
26
|
-
* below the 65535 ceiling. The window is cheap because it is walked one failed
|
|
27
|
-
* bind at a time: a rejected listen measured ~0.35ms here (277 probes in 96ms),
|
|
28
|
-
* so even the full 1024-probe worst case — only reached when every port in the
|
|
29
|
-
* window is unusable, immediately before the actionable error — costs ~0.36s
|
|
30
|
-
* once per sign-in. The ordinary case stops at the first usable port.
|
|
31
|
-
*/
|
|
32
|
-
export declare const CALLBACK_PORT_ATTEMPTS = 1024;
|
|
33
|
-
//# sourceMappingURL=port-constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"port-constants.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/port-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,QAAQ,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import { FileCredentialStore, FileModelSettingsStore, type AntigravityPreferenceStore } from './token-store.ts';
|
|
3
|
-
import { AccountPoolStore } from './account-pool.ts';
|
|
4
|
-
import type { AntigravityWebStatus } from '../../shared/antigravity-contracts.ts';
|
|
5
|
-
export declare function getAntigravityWebStatus(store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: AntigravityPreferenceStore, accountPool?: AccountPoolStore, sessionId?: string): Promise<AntigravityWebStatus>;
|
|
6
|
-
export declare function registerAntigravityRoutes(ctx: Context, store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: AntigravityPreferenceStore, fetchFn?: typeof fetch, accountPool?: AccountPoolStore): () => void;
|
|
7
|
-
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAO1E,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,CA8C/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"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
|
|
2
|
-
import type { CredentialStore } from '../token-store.ts';
|
|
3
|
-
export declare const ANTIGRAVITY_PREFERENCES_NAMESPACE = "dsh-antigravity";
|
|
4
|
-
export interface AntigravityCredentials {
|
|
5
|
-
access?: string;
|
|
6
|
-
access_token?: string;
|
|
7
|
-
refresh?: string;
|
|
8
|
-
refresh_token?: string;
|
|
9
|
-
expires?: number;
|
|
10
|
-
expires_at?: number;
|
|
11
|
-
email?: string;
|
|
12
|
-
projectId?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface AntigravityCatalogModel {
|
|
15
|
-
id: string;
|
|
16
|
-
name?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
/** Context window `fetchAvailableModels` reported for this runtime id, when it did. */
|
|
19
|
-
contextWindow?: number;
|
|
20
|
-
/** Output ceiling `fetchAvailableModels` reported for this runtime id, when it did. */
|
|
21
|
-
maxOutputTokens?: number;
|
|
22
|
-
}
|
|
23
|
-
export interface AntigravityModelSettings {
|
|
24
|
-
enabled?: boolean;
|
|
25
|
-
enabledModelIds: string[];
|
|
26
|
-
catalogModels: AntigravityCatalogModel[];
|
|
27
|
-
contextWindowOverrides?: Record<string, number>;
|
|
28
|
-
defaultReasoningEffort?: 'low' | 'medium' | 'high' | null;
|
|
29
|
-
}
|
|
30
|
-
export interface AntigravityPreferenceStore {
|
|
31
|
-
status(): AntigravityModelSettings;
|
|
32
|
-
update(patch: {
|
|
33
|
-
enabled?: boolean;
|
|
34
|
-
enabledModelIds?: string[];
|
|
35
|
-
/** `null` deletes one override and falls back to the catalog default. */
|
|
36
|
-
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
37
|
-
defaultReasoningEffort?: 'low' | 'medium' | 'high' | null;
|
|
38
|
-
}): Promise<AntigravityModelSettings>;
|
|
39
|
-
}
|
|
40
|
-
export declare function registerAntigravityPreferenceStore(settings?: unknown, fallbackStore?: FileModelSettingsStore): AntigravityPreferenceStore;
|
|
41
|
-
export declare function dshHomeDir(): string;
|
|
42
|
-
export declare function credentialPath(): string;
|
|
43
|
-
export declare function modelSettingsPath(): string;
|
|
44
|
-
export declare function parseAntigravityCredentials(value: unknown): AntigravityCredentials;
|
|
45
|
-
/** Keeps the public API; filePath identifies the legacy JSON that is migrated on first use. */
|
|
46
|
-
export declare class FileCredentialStore {
|
|
47
|
-
private readonly filePath;
|
|
48
|
-
private readonly backend;
|
|
49
|
-
constructor(filePath?: string, backend?: CredentialStore<AntigravityCredentials>);
|
|
50
|
-
path(): string;
|
|
51
|
-
private serialize;
|
|
52
|
-
private removeLegacy;
|
|
53
|
-
private saveVerified;
|
|
54
|
-
read(): Promise<AntigravityCredentials | null>;
|
|
55
|
-
write(credentials: AntigravityCredentials): Promise<void>;
|
|
56
|
-
delete(): Promise<void>;
|
|
57
|
-
}
|
|
58
|
-
export declare class FileModelSettingsStore {
|
|
59
|
-
private readonly filePath;
|
|
60
|
-
constructor(filePath?: string);
|
|
61
|
-
path(): string;
|
|
62
|
-
read(): Promise<AntigravityModelSettings>;
|
|
63
|
-
write(settings: AntigravityModelSettings): Promise<void>;
|
|
64
|
-
updateSettings(patch: {
|
|
65
|
-
enabled?: boolean;
|
|
66
|
-
enabledModelIds?: string[];
|
|
67
|
-
/** `null` deletes one override and falls back to the catalog default. */
|
|
68
|
-
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
69
|
-
defaultReasoningEffort?: 'low' | 'medium' | 'high' | null;
|
|
70
|
-
}): Promise<AntigravityModelSettings>;
|
|
71
|
-
setEnabledModelIds(enabledModelIds: string[]): Promise<AntigravityModelSettings>;
|
|
72
|
-
setCatalogModels(catalogModels: AntigravityCatalogModel[], options?: {
|
|
73
|
-
enabledModelIds?: string[];
|
|
74
|
-
}): Promise<AntigravityModelSettings>;
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=token-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/token-store.ts"],"names":[],"mappings":"AASA,OAAO,EAA+B,KAAK,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AACpH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAKxD,eAAO,MAAM,iCAAiC,oBAAoB,CAAA;AAElE,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,C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Z,YAAY;IAO1B,IAAI,IAAI,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC;IA8B9C,KAAK,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAOxB;AAED,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,SAAsB;IAE3D,IAAI,IAAI,MAAM;IAIR,IAAI,IAAI,OAAO,CAAC,wBAAwB,CAAC;IA4CzC,KAAK,CAAC,QAAQ,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxD,cAAc,CAAC,KAAK,EAAE;QAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;QAC1B,yEAAyE;QACzE,sBAAsB,CAAC,EAAE,0BAA0B,CAAA;QACnD,sBAAsB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAA;KAC1D,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAsB/B,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAIhF,gBAAgB,CACpB,aAAa,EAAE,uBAAuB,EAAE,EACxC,OAAO,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GACvC,OAAO,CAAC,wBAAwB,CAAC;CAUrC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** One outbound tool-schema conversion's per-target options. */
|
|
2
|
-
export interface AntigravityToolSchemaOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Collapse `anyOf`/`oneOf`/`allOf` and type unions into one declared form.
|
|
5
|
-
*
|
|
6
|
-
* Gemini ignores `anyOf` and takes the composed form as sent. Antigravity routes
|
|
7
|
-
* a Claude-family request to Vertex Anthropic, whose `input_schema` check rejects
|
|
8
|
-
* a tool schema the request still composes with (#39). That is a gateway limit,
|
|
9
|
-
* not a JSON Schema rule: the caller's schema is valid draft 2020-12.
|
|
10
|
-
*/
|
|
11
|
-
foldUnions?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function toAntigravityToolSchema(schema: unknown, options?: AntigravityToolSchemaOptions): unknown;
|
|
14
|
-
//# sourceMappingURL=tool-schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-schema.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/tool-schema.ts"],"names":[],"mappings":"AAUA,gEAAgE;AAChE,MAAM,WAAW,4BAA4B;IAC3C;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAgND,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,OAAO,GAAE,4BAAiC,GACzC,OAAO,CA6ET"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
export declare const PROVIDER_NAME = "Antigravity";
|
|
2
|
-
export declare const PROVIDER_ID = "antigravity";
|
|
3
|
-
/**
|
|
4
|
-
* Idle ceiling for one streaming response before it is declared stalled.
|
|
5
|
-
*
|
|
6
|
-
* Strictly inside the transport's own 300 s stream timeout; see
|
|
7
|
-
* `host/common/idle-watchdog.ts` for the measured basis.
|
|
8
|
-
*/
|
|
9
|
-
export declare const STREAM_IDLE_TIMEOUT_MS = 120000;
|
|
10
|
-
export declare const STREAM_IDLE_TIMEOUT_CODE = "LLM_STREAM_IDLE_TIMEOUT";
|
|
11
|
-
export declare const DISCOVERY_TIMEOUT_MS = 8000;
|
|
12
|
-
export declare const PROJECT_CACHE_TTL_MS: number;
|
|
13
|
-
export declare const MODEL_CACHE_TTL_MS: number;
|
|
14
|
-
export declare const OAUTH_CALLBACK_TIMEOUT_MS: number;
|
|
15
|
-
export declare const DEFAULT_ENDPOINT = "https://cloudcode-pa.googleapis.com";
|
|
16
|
-
export declare const DAILY_ENDPOINT = "https://daily-cloudcode-pa.googleapis.com";
|
|
17
|
-
export declare const ENDPOINT_FALLBACKS: string[];
|
|
18
|
-
export declare const FREE_TIER_ID = "free-tier";
|
|
19
|
-
/**
|
|
20
|
-
* The `project` a request names when discovery returned nothing.
|
|
21
|
-
*
|
|
22
|
-
* The native client always names a real project. The placeholder this route
|
|
23
|
-
* used before, `antigravity-default`, names nothing any client ever sends, so
|
|
24
|
-
* every request that fell through discovery announced itself as a
|
|
25
|
-
* reimplementation by that string alone. This is the default project the wider
|
|
26
|
-
* Code Assist ecosystem falls back to in the same situation: a request carrying
|
|
27
|
-
* it reads as one whose project is unresolved, not as one from another client.
|
|
28
|
-
*/
|
|
29
|
-
export declare const FALLBACK_PROJECT_ID = "rising-fact-p41fc";
|
|
30
|
-
export declare const ONBOARD_TIMEOUT_MS = 30000;
|
|
31
|
-
export declare const ONBOARD_POLL_INTERVAL_MS = 1000;
|
|
32
|
-
/**
|
|
33
|
-
* The Hub release reported when the updater manifest has not been read yet.
|
|
34
|
-
*
|
|
35
|
-
* Cloud Code gates its model catalogue and its Gemini quota buckets on this
|
|
36
|
-
* version, so it is the *floor* of what this route may claim: keep it at or
|
|
37
|
-
* above the reference implementations' minimum, and refresh it together with
|
|
38
|
-
* `HUB_RELEASE_CHANGELISTS` (see `client-version.ts`).
|
|
39
|
-
*/
|
|
40
|
-
export declare const DEFAULT_ANTIGRAVITY_VERSION = "2.31.0";
|
|
41
|
-
export declare const DEFAULT_ANTIGRAVITY_CL = "1017595969";
|
|
42
|
-
/**
|
|
43
|
-
* The two identity fields the Hub adds on `onboardUser` control-plane calls.
|
|
44
|
-
*
|
|
45
|
-
* Onboarding is not served by the same surface as inference: the Hub appends a
|
|
46
|
-
* Node API client to its User-Agent there and states an X-Goog-Api-Client, while
|
|
47
|
-
* content requests carry neither.
|
|
48
|
-
*/
|
|
49
|
-
export declare const HUB_ONBOARD_UA_SUFFIX = "google-api-nodejs-client/10.3.0";
|
|
50
|
-
export declare const HUB_ONBOARD_API_CLIENT = "gl-node/22.21.1";
|
|
51
|
-
/**
|
|
52
|
-
* Headers the native Antigravity client never sends, but Node's fetch adds itself.
|
|
53
|
-
*
|
|
54
|
-
* `sec-fetch-mode` and `accept-language` are browser idioms: undici's `fetch` adds
|
|
55
|
-
* them to every request and offers no way to suppress them, so the only seam is
|
|
56
|
-
* the dispatcher underneath. The native client is a Go HTTP client and sends
|
|
57
|
-
* neither, which makes them a shape difference an upstream can match on without
|
|
58
|
-
* any TLS inspection.
|
|
59
|
-
*
|
|
60
|
-
* `connection: keep-alive` is deliberately NOT listed: undici's HTTP/1.1 writer
|
|
61
|
-
* re-adds it regardless of what the dispatcher is handed.
|
|
62
|
-
*/
|
|
63
|
-
export declare const ANTIGRAVITY_ABSENT_HEADERS: readonly ["sec-fetch-mode", "accept-language"];
|
|
64
|
-
export declare const REDIRECT_PATH = "/oauth-callback";
|
|
65
|
-
export declare const AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
66
|
-
export declare const TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
67
|
-
export declare const SCOPES: string[];
|
|
68
|
-
export declare const DEFAULT_CLIENT_ID: string;
|
|
69
|
-
export declare const DEFAULT_CLIENT_SECRET: string;
|
|
70
|
-
/**
|
|
71
|
-
* The Antigravity persona, as the native client states it.
|
|
72
|
-
*
|
|
73
|
-
* Only these two opening sentences are attested — they are the part captured
|
|
74
|
-
* `language_server` traffic and the reference reimplementations quote. The
|
|
75
|
-
* capture's tail is a truncated fragment (`**Absolute paths only****
|
|
76
|
-
* Proactiveness**`), so nothing past these sentences is reconstructed here: a
|
|
77
|
-
* guessed continuation would be one more thing only this route sends.
|
|
78
|
-
*/
|
|
79
|
-
export declare const ANTIGRAVITY_SYSTEM_INSTRUCTION: string;
|
|
80
|
-
export declare const GEMINI_ROLE: {
|
|
81
|
-
readonly user: "user";
|
|
82
|
-
readonly model: "model";
|
|
83
|
-
};
|
|
84
|
-
export declare const TOOL_CALLING_MODE: {
|
|
85
|
-
readonly none: "NONE";
|
|
86
|
-
readonly any: "ANY";
|
|
87
|
-
readonly auto: "AUTO";
|
|
88
|
-
readonly validated: "VALIDATED";
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* How one selectable model reaches its runtime ids.
|
|
92
|
-
*
|
|
93
|
-
* Every entry resolves to exactly ONE runtime id per request. There is
|
|
94
|
-
* deliberately no fallback list: retrying a failed request on a different
|
|
95
|
-
* model (3.8 → 3.7 → 3.6, Pro High → Pro Low) served the user a model they
|
|
96
|
-
* did not pick without telling them, which the official client never does. A
|
|
97
|
-
* runtime id the service rejects now surfaces as that rejection.
|
|
98
|
-
*
|
|
99
|
-
* The runtime ids are the ones `fetchAvailableModels` lists (verified through
|
|
100
|
-
* 2026-11-11, clients 2.29.0 / 2.31.0); the display names it publishes beside
|
|
101
|
-
* them are quoted where the mapping is not obvious.
|
|
102
|
-
*/
|
|
103
|
-
export interface AntigravityRoutingEntry {
|
|
104
|
-
off: string;
|
|
105
|
-
routing: Record<string, string>;
|
|
106
|
-
defaultRequestId: string;
|
|
107
|
-
}
|
|
108
|
-
export declare const ROUTING: Record<string, AntigravityRoutingEntry>;
|
|
109
|
-
export declare const RUNTIME_MAX_OUTPUT_TOKENS: Record<string, number>;
|
|
110
|
-
export interface AntigravityModelDef {
|
|
111
|
-
id: string;
|
|
112
|
-
name: string;
|
|
113
|
-
inputModalities: Array<'text' | 'image'>;
|
|
114
|
-
contextWindow: number;
|
|
115
|
-
maxTokens: number;
|
|
116
|
-
reasoningEfforts?: string[];
|
|
117
|
-
}
|
|
118
|
-
export declare const MODELS: AntigravityModelDef[];
|
|
119
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,gBAAgB,CAAA;AAC1C,eAAO,MAAM,WAAW,gBAAgB,CAAA;AAExC;;;;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C,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAsI3D,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAuB5D,CAAA;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAA;IACxC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B;AAED,eAAO,MAAM,MAAM,EAAE,mBAAmB,EA8FvC,CAAA"}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
export interface AntigravityModelBucket {
|
|
2
|
-
bucketId: string;
|
|
3
|
-
displayName: string;
|
|
4
|
-
window?: string;
|
|
5
|
-
resetTime?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Share of this allowance still available, 0-1, or `null` when the service
|
|
9
|
-
* stated no usable number for it.
|
|
10
|
-
*
|
|
11
|
-
* `null` is NOT zero. Zero is a real measurement meaning "nothing left", while
|
|
12
|
-
* an absent field means nobody measured the bucket at all — publishing that as
|
|
13
|
-
* 0 would draw a fully consumed bar no reading supports.
|
|
14
|
-
*/
|
|
15
|
-
remainingFraction: number | null;
|
|
16
|
-
}
|
|
17
|
-
export interface AntigravityQuotaGroup {
|
|
18
|
-
displayName: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
buckets: AntigravityModelBucket[];
|
|
21
|
-
}
|
|
22
|
-
export interface AntigravityModelOption {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
defaultContextWindow: number;
|
|
27
|
-
contextWindow?: number;
|
|
28
|
-
description?: string;
|
|
29
|
-
reasoningEfforts?: string[];
|
|
30
|
-
}
|
|
31
|
-
export interface AntigravityAccountQuota {
|
|
32
|
-
projectId?: string;
|
|
33
|
-
endpoint?: string;
|
|
34
|
-
planLabel?: string;
|
|
35
|
-
productTier?: {
|
|
36
|
-
id?: string;
|
|
37
|
-
name?: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
};
|
|
40
|
-
paidTier?: {
|
|
41
|
-
id?: string;
|
|
42
|
-
name?: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
};
|
|
45
|
-
groups: AntigravityQuotaGroup[];
|
|
46
|
-
groupDescription?: string;
|
|
47
|
-
models: Array<{
|
|
48
|
-
modelId: string;
|
|
49
|
-
displayName?: string;
|
|
50
|
-
description?: string;
|
|
51
|
-
}>;
|
|
52
|
-
catalogModels: Array<{
|
|
53
|
-
id: string;
|
|
54
|
-
name?: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
}>;
|
|
57
|
-
defaultAgentModelId?: string;
|
|
58
|
-
fetchedAt: number;
|
|
59
|
-
}
|
|
60
|
-
import type { AccountRotationStrategy, PoolAccountSummaryDto } from './account-pool-contracts.ts';
|
|
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
|
-
}
|
|
132
|
-
/** One pooled Antigravity account as the settings card renders it. */
|
|
133
|
-
export interface AntigravityAccountSummaryDto extends PoolAccountSummaryDto {
|
|
134
|
-
projectId?: string;
|
|
135
|
-
planLabel?: string;
|
|
136
|
-
}
|
|
137
|
-
export interface AntigravityWebStatus {
|
|
138
|
-
enabled?: boolean;
|
|
139
|
-
authenticated: boolean;
|
|
140
|
-
email?: string;
|
|
141
|
-
projectId?: string;
|
|
142
|
-
planLabel?: string;
|
|
143
|
-
hasCredentials: boolean;
|
|
144
|
-
storagePath: string;
|
|
145
|
-
lastFetchedAt?: number;
|
|
146
|
-
/**
|
|
147
|
-
* Whether a quota refresh is running behind this answer.
|
|
148
|
-
*
|
|
149
|
-
* The card renders the snapshot it already had instead of waiting on the
|
|
150
|
-
* upstream request; when this is true the client asks again shortly so the
|
|
151
|
-
* refreshed snapshot reaches the UI.
|
|
152
|
-
*/
|
|
153
|
-
quotaRefreshing?: boolean;
|
|
154
|
-
quota?: AntigravityAccountQuota;
|
|
155
|
-
models: AntigravityModelOption[];
|
|
156
|
-
contextWindowOverrides: Record<string, number>;
|
|
157
|
-
defaultReasoningEffort?: 'low' | 'medium' | 'high' | null;
|
|
158
|
-
accounts?: AntigravityAccountSummaryDto[];
|
|
159
|
-
activeAccountId?: string;
|
|
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;
|
|
167
|
-
}
|
|
168
|
-
export interface AntigravitySettingsUpdateDto {
|
|
169
|
-
enabled?: boolean;
|
|
170
|
-
enabledModelIds?: string[];
|
|
171
|
-
/** A number sets an override for that model; `null` restores the catalog default. */
|
|
172
|
-
contextWindowOverrides?: Record<string, number | null>;
|
|
173
|
-
defaultReasoningEffort?: 'low' | 'medium' | 'high' | null;
|
|
174
|
-
}
|
|
175
|
-
//# sourceMappingURL=antigravity-contracts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,C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