opencode-antigravity-auth-remix 1.4.6 → 1.5.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.
- package/README.md +24 -17
- package/dist/src/constants.d.ts +22 -8
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +22 -8
- package/dist/src/constants.js.map +1 -1
- package/dist/src/plugin/accounts.d.ts +54 -3
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +269 -9
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/cli.d.ts +3 -1
- package/dist/src/plugin/cli.d.ts.map +1 -1
- package/dist/src/plugin/cli.js +26 -7
- package/dist/src/plugin/cli.js.map +1 -1
- package/dist/src/plugin/config/loader.d.ts.map +1 -1
- package/dist/src/plugin/config/loader.js +7 -4
- package/dist/src/plugin/config/loader.js.map +1 -1
- package/dist/src/plugin/config/models.d.ts +27 -0
- package/dist/src/plugin/config/models.d.ts.map +1 -0
- package/dist/src/plugin/config/models.js +79 -0
- package/dist/src/plugin/config/models.js.map +1 -0
- package/dist/src/plugin/config/schema.d.ts +20 -0
- package/dist/src/plugin/config/schema.d.ts.map +1 -1
- package/dist/src/plugin/config/schema.js +68 -7
- package/dist/src/plugin/config/schema.js.map +1 -1
- package/dist/src/plugin/config/updater.d.ts +55 -0
- package/dist/src/plugin/config/updater.d.ts.map +1 -0
- package/dist/src/plugin/config/updater.js +125 -0
- package/dist/src/plugin/config/updater.js.map +1 -0
- package/dist/src/plugin/debug.d.ts +26 -0
- package/dist/src/plugin/debug.d.ts.map +1 -1
- package/dist/src/plugin/debug.js +69 -1
- package/dist/src/plugin/debug.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +10 -0
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +88 -7
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/recovery.d.ts.map +1 -1
- package/dist/src/plugin/recovery.js +2 -0
- package/dist/src/plugin/recovery.js.map +1 -1
- package/dist/src/plugin/refresh-queue.d.ts.map +1 -1
- package/dist/src/plugin/refresh-queue.js +4 -0
- package/dist/src/plugin/refresh-queue.js.map +1 -1
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +30 -15
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/search.d.ts.map +1 -1
- package/dist/src/plugin/search.js +4 -1
- package/dist/src/plugin/search.js.map +1 -1
- package/dist/src/plugin/storage.d.ts +31 -1
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +134 -7
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/transform/model-resolver.d.ts +13 -10
- package/dist/src/plugin/transform/model-resolver.d.ts.map +1 -1
- package/dist/src/plugin/transform/model-resolver.js +20 -38
- package/dist/src/plugin/transform/model-resolver.js.map +1 -1
- package/dist/src/plugin/transform/types.d.ts +1 -1
- package/dist/src/plugin/transform/types.d.ts.map +1 -1
- package/dist/src/plugin/ui/auth-menu.d.ts +7 -3
- package/dist/src/plugin/ui/auth-menu.d.ts.map +1 -1
- package/dist/src/plugin/ui/auth-menu.js +28 -15
- package/dist/src/plugin/ui/auth-menu.js.map +1 -1
- package/dist/src/plugin/ui/select.d.ts +9 -0
- package/dist/src/plugin/ui/select.d.ts.map +1 -1
- package/dist/src/plugin/ui/select.js +104 -24
- package/dist/src/plugin/ui/select.js.map +1 -1
- package/dist/src/plugin.d.ts +22 -0
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +1033 -84
- package/dist/src/plugin.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
> | Dual Quota System, Multi-Account Rotation, Session Recovery, Thinking Recovery | [NoeFabris/opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) |
|
|
14
14
|
> | `generate_image` Tool (Native Implementation + Img2Img) | Native Implementation |
|
|
15
15
|
>
|
|
16
|
-
> **Status:** Version 1.
|
|
16
|
+
> **Status:** Version 1.5.1 - Aligned endpoint headers and metadata with reference implementation.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
Enable Opencode to authenticate against **Antigravity** (Google's IDE) via OAuth so you can use Antigravity rate limits and access models like `gemini-3-pro-high` and `claude-opus-4-
|
|
20
|
+
Enable Opencode to authenticate against **Antigravity** (Google's IDE) via OAuth so you can use Antigravity rate limits and access models like `gemini-3-pro-high` and `claude-opus-4-6-thinking` with your Google credentials.
|
|
21
21
|
|
|
22
22
|
## What you get
|
|
23
23
|
|
|
@@ -29,6 +29,7 @@ Enable Opencode to authenticate against **Antigravity** (Google's IDE) via OAuth
|
|
|
29
29
|
- **Auto Recovery** - Automatic session recovery from Claude tool_result_missing errors
|
|
30
30
|
- **Plugin Compatible** - Works alongside other OpenCode plugins (opencodesync, etc.)
|
|
31
31
|
- **generate_image Tool** - AI image generation with text-to-image, image-to-image (multi-image fusion), auto-save, and 4K support
|
|
32
|
+
- **check_quota Tool** - Check the current quota status and rate limits for all authenticated Antigravity accounts directly in chat
|
|
32
33
|
- **google_search Tool** - Built-in web search grounding with a separate tool call (no extra config)
|
|
33
34
|
|
|
34
35
|
<details open>
|
|
@@ -70,7 +71,7 @@ Install the opencode-antigravity-auth-remix plugin and add the Antigravity model
|
|
|
70
71
|
|
|
71
72
|
```json
|
|
72
73
|
{
|
|
73
|
-
"plugin": ["opencode-antigravity-auth-remix@1.
|
|
74
|
+
"plugin": ["opencode-antigravity-auth-remix@1.5.1"]
|
|
74
75
|
}
|
|
75
76
|
```
|
|
76
77
|
|
|
@@ -98,7 +99,7 @@ Models with `antigravity-` prefix use **Antigravity quota** (Claude + Gemini 3):
|
|
|
98
99
|
|---| ------------------------------------------- | ------------------------------ | ------------------------------ |
|
|
99
100
|
| 01| `google/antigravity-gemini-3-pro` | `-low`, `-high` | Gemini 3 Pro with thinking |
|
|
100
101
|
| 02| `google/antigravity-gemini-3-flash` | `-minimal`, `-low`, `-medium`, `-high` | Gemini 3 Flash with thinking |
|
|
101
|
-
| 03| `google/antigravity-claude-opus-4-
|
|
102
|
+
| 03| `google/antigravity-claude-opus-4-6-thinking` | `-low`, `-medium`, `-high` | Claude Opus 4.6 with thinking |
|
|
102
103
|
| 04| `google/antigravity-claude-sonnet-4-5-thinking` | `-low`, `-medium`, `-high` | Claude Sonnet 4.5 with thinking|
|
|
103
104
|
| 05| `google/antigravity-claude-sonnet-4-5` | - | Claude Sonnet 4.5 (no thinking)|
|
|
104
105
|
|
|
@@ -121,7 +122,7 @@ Copy this to `~/.config/opencode/opencode.json`:
|
|
|
121
122
|
```json
|
|
122
123
|
{
|
|
123
124
|
"$schema": "https://opencode.ai/config.json",
|
|
124
|
-
"plugin": ["opencode-antigravity-auth-remix@1.
|
|
125
|
+
"plugin": ["opencode-antigravity-auth-remix@1.5.1"],
|
|
125
126
|
"provider": {
|
|
126
127
|
"google": {
|
|
127
128
|
"models": {
|
|
@@ -151,9 +152,9 @@ Copy this to `~/.config/opencode/opencode.json`:
|
|
|
151
152
|
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
152
153
|
}
|
|
153
154
|
},
|
|
154
|
-
"antigravity-claude-opus-4-
|
|
155
|
-
"id": "antigravity-claude-opus-4-
|
|
156
|
-
"name": "#03 Claude Opus 4.
|
|
155
|
+
"antigravity-claude-opus-4-6-thinking": {
|
|
156
|
+
"id": "antigravity-claude-opus-4-6-thinking",
|
|
157
|
+
"name": "#03 Claude Opus 4.6 Thinking (Antigravity)",
|
|
157
158
|
"reasoning": true,
|
|
158
159
|
"limit": { "context": 200000, "output": 64000 },
|
|
159
160
|
"cost": { "input": 0, "output": 0 },
|
|
@@ -257,7 +258,6 @@ opencode run "Hello" --model=google/gemini-2.5-flash
|
|
|
257
258
|
## Built-in Tools
|
|
258
259
|
|
|
259
260
|
### generate_image
|
|
260
|
-
|
|
261
261
|
AI image generation with automatic file saving and WebP conversion. Uses `gemini-3-pro-image`.
|
|
262
262
|
|
|
263
263
|
| Parameter | Type | Required | Default | Description |
|
|
@@ -293,6 +293,9 @@ To use Image-to-Image generation, provide the absolute local paths of your refer
|
|
|
293
293
|
- Supports JPG, PNG, WebP.
|
|
294
294
|
- Maximum 10 reference images.
|
|
295
295
|
|
|
296
|
+
### check_quota
|
|
297
|
+
Check the current quota status and rate limits for all authenticated Antigravity accounts directly in chat. Returns detailed usage statistics for Claude and Gemini models, including remaining quota percentages and reset times.
|
|
298
|
+
|
|
296
299
|
**Account management options (via `opencode auth login`):**
|
|
297
300
|
- **Check quotas** — View remaining API quota for each account
|
|
298
301
|
- **Manage accounts** — Enable/disable specific accounts for rotation
|
|
@@ -320,11 +323,11 @@ MIT
|
|
|
320
323
|
> | 双配额系统、多账号轮换、会话恢复、思考过程恢复 | [NoeFabris/opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) |
|
|
321
324
|
> | `generate_image` 工具 (原生实现 + 图生图) | 原生实现 |
|
|
322
325
|
>
|
|
323
|
-
> **状态:** 版本 1.
|
|
326
|
+
> **状态:** 版本 1.5.0 - 对齐了端点请求头和元数据实现。
|
|
324
327
|
|
|
325
328
|
---
|
|
326
329
|
|
|
327
|
-
使 Opencode 能够通过 OAuth 验证 **Antigravity** (Google 的 IDE),从而让你可以使用 Google 凭据访问 Antigravity 配额并使用 `gemini-3-pro-high` 和 `claude-opus-4-
|
|
330
|
+
使 Opencode 能够通过 OAuth 验证 **Antigravity** (Google 的 IDE),从而让你可以使用 Google 凭据访问 Antigravity 配额并使用 `gemini-3-pro-high` 和 `claude-opus-4-6-thinking` 等模型。
|
|
328
331
|
|
|
329
332
|
## 核心功能
|
|
330
333
|
|
|
@@ -336,6 +339,7 @@ MIT
|
|
|
336
339
|
- **自动恢复** - 自动处理 Claude 的 `tool_result_missing` 错误并恢复会话
|
|
337
340
|
- **插件兼容性** - 可与其他 OpenCode 插件 (如 opencodesync 等) 同时运行
|
|
338
341
|
- **generate_image 工具** - AI 图像生成,支持文生图、图生图 (多图融合)、自动保存、WebP 转换和 4K 输出
|
|
342
|
+
- **check_quota 工具** - 在聊天中直接查询所有已认证 Antigravity 账号的当前配额状态和速率限制
|
|
339
343
|
- **google_search 工具** - 内置联网检索能力,独立工具调用(无需额外配置)
|
|
340
344
|
|
|
341
345
|
## 安装步骤
|
|
@@ -354,7 +358,7 @@ MIT
|
|
|
354
358
|
|
|
355
359
|
```json
|
|
356
360
|
{
|
|
357
|
-
"plugin": ["opencode-antigravity-auth-remix@1.
|
|
361
|
+
"plugin": ["opencode-antigravity-auth-remix@1.5.1"]
|
|
358
362
|
}
|
|
359
363
|
```
|
|
360
364
|
|
|
@@ -382,7 +386,7 @@ MIT
|
|
|
382
386
|
|---| ------------------------------------------- | ------------------------------ | ------------------------------ |
|
|
383
387
|
| 01| `google/antigravity-gemini-3-pro` | `-low`, `-high` | Gemini 3 Pro (带思考过程) |
|
|
384
388
|
| 02| `google/antigravity-gemini-3-flash` | `-minimal`, `-low`, `-medium`, `-high` | Gemini 3 Flash (带思考过程) |
|
|
385
|
-
| 03| `google/antigravity-claude-opus-4-
|
|
389
|
+
| 03| `google/antigravity-claude-opus-4-6-thinking` | `-low`, `-medium`, `-high` | Claude Opus 4.6 (带思考预算) |
|
|
386
390
|
| 04| `google/antigravity-claude-sonnet-4-5-thinking` | `-low`, `-medium`, `-high` | Claude Sonnet 4.5 (带思考预算)|
|
|
387
391
|
| 05| `google/antigravity-claude-sonnet-4-5` | - | Claude Sonnet 4.5 (普通模式)|
|
|
388
392
|
|
|
@@ -405,7 +409,7 @@ MIT
|
|
|
405
409
|
```json
|
|
406
410
|
{
|
|
407
411
|
"$schema": "https://opencode.ai/config.json",
|
|
408
|
-
"plugin": ["opencode-antigravity-auth-remix@1.
|
|
412
|
+
"plugin": ["opencode-antigravity-auth-remix@1.5.1"],
|
|
409
413
|
"provider": {
|
|
410
414
|
"google": {
|
|
411
415
|
"models": {
|
|
@@ -435,9 +439,9 @@ MIT
|
|
|
435
439
|
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
436
440
|
}
|
|
437
441
|
},
|
|
438
|
-
"antigravity-claude-opus-4-
|
|
439
|
-
"id": "antigravity-claude-opus-4-
|
|
440
|
-
"name": "#03 Claude Opus 4.
|
|
442
|
+
"antigravity-claude-opus-4-6-thinking": {
|
|
443
|
+
"id": "antigravity-claude-opus-4-6-thinking",
|
|
444
|
+
"name": "#03 Claude Opus 4.6 Thinking (Antigravity)",
|
|
441
445
|
"reasoning": true,
|
|
442
446
|
"limit": { "context": 200000, "output": 64000 },
|
|
443
447
|
"cost": { "input": 0, "output": 0 },
|
|
@@ -703,6 +707,9 @@ opencode run "你好" --model=google/gemini-2.5-flash
|
|
|
703
707
|
- 支持 JPG, PNG, WebP 格式。
|
|
704
708
|
- 最多支持 10 张参考图片。
|
|
705
709
|
|
|
710
|
+
### check_quota (查额度工具)
|
|
711
|
+
在聊天中直接查询所有已认证 Antigravity 账号的当前配额状态和速率限制。返回详细的 Claude 和 Gemini 模型使用统计信息,包括剩余配额百分比和重置时间。
|
|
712
|
+
|
|
706
713
|
## 开源协议
|
|
707
714
|
|
|
708
715
|
MIT
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -46,8 +46,28 @@ export declare const GEMINI_CLI_ENDPOINT = "https://cloudcode-pa.googleapis.com"
|
|
|
46
46
|
* Hardcoded project id used when Antigravity does not return one (e.g., business/workspace accounts).
|
|
47
47
|
*/
|
|
48
48
|
export declare const ANTIGRAVITY_DEFAULT_PROJECT_ID = "rising-fact-p41fc";
|
|
49
|
+
/**
|
|
50
|
+
* Antigravity version string - SINGLE SOURCE OF TRUTH.
|
|
51
|
+
* Update this value when a new version is needed.
|
|
52
|
+
* Used by ANTIGRAVITY_HEADERS, fingerprint.ts, and all version-dependent code.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* This version MUST be kept in sync with Google's supported Antigravity versions.
|
|
56
|
+
* Using an outdated version will cause "This version of Antigravity is no longer supported" errors.
|
|
57
|
+
*
|
|
58
|
+
* @see https://github.com/NoeFabris/opencode-antigravity-auth/issues/324
|
|
59
|
+
*/
|
|
60
|
+
export declare const ANTIGRAVITY_VERSION: "1.15.8";
|
|
61
|
+
/**
|
|
62
|
+
* Default headers for Antigravity API requests.
|
|
63
|
+
*
|
|
64
|
+
* Uses ANTIGRAVITY_VERSION to ensure the User-Agent version stays in sync
|
|
65
|
+
* with the single source of truth, preventing "version no longer supported" errors.
|
|
66
|
+
*
|
|
67
|
+
* @see https://github.com/NoeFabris/opencode-antigravity-auth/issues/324
|
|
68
|
+
*/
|
|
49
69
|
export declare const ANTIGRAVITY_HEADERS: {
|
|
50
|
-
readonly "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Antigravity/1.
|
|
70
|
+
readonly "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Antigravity/1.15.8 Chrome/138.0.7204.235 Electron/37.3.1 Safari/537.36";
|
|
51
71
|
readonly "X-Goog-Api-Client": "google-cloud-sdk vscode_cloudshelleditor/0.1";
|
|
52
72
|
readonly "Client-Metadata": "{\"ideType\":\"IDE_UNSPECIFIED\",\"platform\":\"PLATFORM_UNSPECIFIED\",\"pluginType\":\"GEMINI\"}";
|
|
53
73
|
};
|
|
@@ -56,12 +76,6 @@ export declare const GEMINI_CLI_HEADERS: {
|
|
|
56
76
|
readonly "X-Goog-Api-Client": "gl-node/22.18.0";
|
|
57
77
|
readonly "Client-Metadata": "ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI";
|
|
58
78
|
};
|
|
59
|
-
/**
|
|
60
|
-
* Antigravity version string - SINGLE SOURCE OF TRUTH.
|
|
61
|
-
* Update this value when a new version is needed.
|
|
62
|
-
* Used by both constants.ts and fingerprint.ts
|
|
63
|
-
*/
|
|
64
|
-
export declare const ANTIGRAVITY_VERSION: "1.15.8";
|
|
65
79
|
export type HeaderSet = {
|
|
66
80
|
"User-Agent": string;
|
|
67
81
|
"X-Goog-Api-Client": string;
|
|
@@ -109,7 +123,7 @@ export declare const SKIP_THOUGHT_SIGNATURE = "skip_thought_signature_validator"
|
|
|
109
123
|
*/
|
|
110
124
|
/**
|
|
111
125
|
* Model used for Google Search grounding requests.
|
|
112
|
-
* Uses gemini-
|
|
126
|
+
* Uses gemini-2.5-flash for fast, cost-effective search operations. (3-flash is always at capacity and doesn't support souce citation).
|
|
113
127
|
*/
|
|
114
128
|
export declare const SEARCH_MODEL = "gemini-2.5-flash";
|
|
115
129
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,qBAAqB,8EAA8E,CAAC;AAEjH;;GAEG;AACH,eAAO,MAAM,yBAAyB,wCAAwC,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAM/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,0CAA0C,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,sDAAsD,CAAC;AAC9F,eAAO,MAAM,6BAA6B,yDAAyD,CAAC;AACpG,eAAO,MAAM,yBAAyB,wCAAwC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,8BAA8B,+JAIjC,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,0BAA0B,+JAI7B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB,sDAA6B,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,wCAA4B,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAElE,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":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AWiD,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,yBAAyB,kDAAwC,CAAC;AAE/E,eAAO,MAAM,6BAA6B,iBAAiB,CAAC;AAC5D,eAAO,MAAM,oCAAoC,mCAAmC,CAAC;AAErF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,qCAAqC,CAAC;AAMzE;;;;GAIG;AAKH;;;GAGG;AACH,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,yBAAyB,qlBAYY,CAAC;AAMnD;;GAEG;AACH,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,mBAAmB,+BAA+B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAa,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAWhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;GAM/B,CAAC;AAEF,eAAO,MAAM,8BAA8B,ifAM1C,CAAC"}
|
package/dist/src/constants.js
CHANGED
|
@@ -60,8 +60,28 @@ export const GEMINI_CLI_ENDPOINT = ANTIGRAVITY_ENDPOINT_PROD;
|
|
|
60
60
|
* Hardcoded project id used when Antigravity does not return one (e.g., business/workspace accounts).
|
|
61
61
|
*/
|
|
62
62
|
export const ANTIGRAVITY_DEFAULT_PROJECT_ID = "rising-fact-p41fc";
|
|
63
|
+
/**
|
|
64
|
+
* Antigravity version string - SINGLE SOURCE OF TRUTH.
|
|
65
|
+
* Update this value when a new version is needed.
|
|
66
|
+
* Used by ANTIGRAVITY_HEADERS, fingerprint.ts, and all version-dependent code.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* This version MUST be kept in sync with Google's supported Antigravity versions.
|
|
70
|
+
* Using an outdated version will cause "This version of Antigravity is no longer supported" errors.
|
|
71
|
+
*
|
|
72
|
+
* @see https://github.com/NoeFabris/opencode-antigravity-auth/issues/324
|
|
73
|
+
*/
|
|
74
|
+
export const ANTIGRAVITY_VERSION = "1.15.8";
|
|
75
|
+
/**
|
|
76
|
+
* Default headers for Antigravity API requests.
|
|
77
|
+
*
|
|
78
|
+
* Uses ANTIGRAVITY_VERSION to ensure the User-Agent version stays in sync
|
|
79
|
+
* with the single source of truth, preventing "version no longer supported" errors.
|
|
80
|
+
*
|
|
81
|
+
* @see https://github.com/NoeFabris/opencode-antigravity-auth/issues/324
|
|
82
|
+
*/
|
|
63
83
|
export const ANTIGRAVITY_HEADERS = {
|
|
64
|
-
"User-Agent":
|
|
84
|
+
"User-Agent": `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Antigravity/${ANTIGRAVITY_VERSION} Chrome/138.0.7204.235 Electron/37.3.1 Safari/537.36`,
|
|
65
85
|
"X-Goog-Api-Client": "google-cloud-sdk vscode_cloudshelleditor/0.1",
|
|
66
86
|
"Client-Metadata": '{"ideType":"IDE_UNSPECIFIED","platform":"PLATFORM_UNSPECIFIED","pluginType":"GEMINI"}',
|
|
67
87
|
};
|
|
@@ -70,12 +90,6 @@ export const GEMINI_CLI_HEADERS = {
|
|
|
70
90
|
"X-Goog-Api-Client": "gl-node/22.18.0",
|
|
71
91
|
"Client-Metadata": "ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI",
|
|
72
92
|
};
|
|
73
|
-
/**
|
|
74
|
-
* Antigravity version string - SINGLE SOURCE OF TRUTH.
|
|
75
|
-
* Update this value when a new version is needed.
|
|
76
|
-
* Used by both constants.ts and fingerprint.ts
|
|
77
|
-
*/
|
|
78
|
-
export const ANTIGRAVITY_VERSION = "1.15.8";
|
|
79
93
|
const ANTIGRAVITY_PLATFORMS = ["windows/amd64", "darwin/arm64", "linux/amd64", "darwin/amd64", "linux/arm64"];
|
|
80
94
|
// Derive user agents from version (keeps them in sync automatically)
|
|
81
95
|
const ANTIGRAVITY_USER_AGENTS = ANTIGRAVITY_PLATFORMS.map(platform => `antigravity/${ANTIGRAVITY_VERSION} ${platform}`);
|
|
@@ -173,7 +187,7 @@ export const SKIP_THOUGHT_SIGNATURE = "skip_thought_signature_validator";
|
|
|
173
187
|
// ============================================================================
|
|
174
188
|
/**
|
|
175
189
|
* Model used for Google Search grounding requests.
|
|
176
|
-
* Uses gemini-
|
|
190
|
+
* Uses gemini-2.5-flash for fast, cost-effective search operations. (3-flash is always at capacity and doesn't support souce citation).
|
|
177
191
|
*/
|
|
178
192
|
export const SEARCH_MODEL = "gemini-2.5-flash";
|
|
179
193
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,2EAA2E,CAAC;AAEjH;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,qCAAqC,CAAC;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,gDAAgD;IAChD,gDAAgD;IAChD,kDAAkD;IAClD,uCAAuC;IACvC,uDAAuD;CACxD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,uCAAuC,CAAC;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,mDAAmD,CAAC;AAC9F,MAAM,CAAC,MAAM,6BAA6B,GAAG,sDAAsD,CAAC;AACpG,MAAM,CAAC,MAAM,yBAAyB,GAAG,qCAAqC,CAAC;AAE/E;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,0BAA0B;IAC1B,6BAA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;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;kDAYS,CAAC;AAEnD,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AAEhE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,EAAE,QAAQ,EAAE,0BAA0B,EAAE,SAAS,EAAE,KAAK,EAAE;IAC1D,EAAE,QAAQ,EAAE,2BAA2B,EAAE,SAAS,EAAE,KAAK,EAAE;IAC3D,EAAE,QAAQ,EAAE,iCAAiC,EAAE,SAAS,EAAE,KAAK,EAAE;IACjE,EAAE,QAAQ,EAAE,iCAAiC,EAAE,SAAS,EAAE,KAAK,EAAE;IACjE,EAAE,QAAQ,EAAE,+BAA+B,EAAE,SAAS,EAAE,KAAK,EAAE;CAChE,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;CAM7C,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type AccountStorageV3, type RateLimitStateV3, type ModelFamily, type HeaderStyle, type CooldownReason } from "./storage";
|
|
1
|
+
import { type AccountStorageV3, type AccountMetadataV3, type RateLimitStateV3, type ModelFamily, type HeaderStyle, type CooldownReason } from "./storage";
|
|
2
2
|
import type { OAuthAuthDetails, RefreshParts } from "./types";
|
|
3
3
|
import type { AccountSelectionStrategy } from "./config/schema";
|
|
4
4
|
import { type Fingerprint, type FingerprintVersion } from "./fingerprint";
|
|
5
|
+
import type { QuotaGroup, QuotaGroupSummary } from "./quota";
|
|
5
6
|
export type { ModelFamily, HeaderStyle, CooldownReason } from "./storage";
|
|
6
7
|
export type { AccountSelectionStrategy } from "./config/schema";
|
|
7
8
|
export type RateLimitReason = "QUOTA_EXHAUSTED" | "RATE_LIMIT_EXCEEDED" | "MODEL_CAPACITY_EXHAUSTED" | "SERVER_ERROR" | "UNKNOWN";
|
|
@@ -34,7 +35,28 @@ export interface ManagedAccount {
|
|
|
34
35
|
fingerprint?: import("./fingerprint").Fingerprint;
|
|
35
36
|
/** History of previous fingerprints for this account */
|
|
36
37
|
fingerprintHistory?: FingerprintVersion[];
|
|
38
|
+
/** Cached quota data from last checkAccountsQuota() call */
|
|
39
|
+
cachedQuota?: Partial<Record<QuotaGroup, QuotaGroupSummary>>;
|
|
40
|
+
cachedQuotaUpdatedAt?: number;
|
|
41
|
+
verificationRequired?: boolean;
|
|
42
|
+
verificationRequiredAt?: number;
|
|
43
|
+
verificationRequiredReason?: string;
|
|
44
|
+
verificationUrl?: string;
|
|
37
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolve the quota group for soft quota checks.
|
|
48
|
+
*
|
|
49
|
+
* When a model string is available, we can precisely determine the quota group.
|
|
50
|
+
* When model is null/undefined, we fall back based on family:
|
|
51
|
+
* - Claude → "claude" quota group
|
|
52
|
+
* - Gemini → "gemini-pro" (conservative fallback; may misclassify flash models)
|
|
53
|
+
*
|
|
54
|
+
* @param family - The model family ("claude" | "gemini")
|
|
55
|
+
* @param model - Optional model string for precise resolution
|
|
56
|
+
* @returns The QuotaGroup to use for soft quota checks
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveQuotaGroup(family: ModelFamily, model?: string | null): QuotaGroup;
|
|
59
|
+
export declare function computeSoftQuotaCacheTtlMs(ttlConfig: "auto" | number, refreshIntervalMinutes: number): number;
|
|
38
60
|
/**
|
|
39
61
|
* In-memory multi-account manager with sticky account selection.
|
|
40
62
|
*
|
|
@@ -68,8 +90,8 @@ export declare class AccountManager {
|
|
|
68
90
|
*/
|
|
69
91
|
shouldShowAccountToast(accountIndex: number, debounceMs?: number): boolean;
|
|
70
92
|
markToastShown(accountIndex: number): void;
|
|
71
|
-
getCurrentOrNextForFamily(family: ModelFamily, model?: string | null, strategy?: AccountSelectionStrategy, headerStyle?: HeaderStyle, pidOffsetEnabled?: boolean): ManagedAccount | null;
|
|
72
|
-
getNextForFamily(family: ModelFamily, model?: string | null, headerStyle?: HeaderStyle): ManagedAccount | null;
|
|
93
|
+
getCurrentOrNextForFamily(family: ModelFamily, model?: string | null, strategy?: AccountSelectionStrategy, headerStyle?: HeaderStyle, pidOffsetEnabled?: boolean, softQuotaThresholdPercent?: number, softQuotaCacheTtlMs?: number): ManagedAccount | null;
|
|
94
|
+
getNextForFamily(family: ModelFamily, model?: string | null, headerStyle?: HeaderStyle, softQuotaThresholdPercent?: number, softQuotaCacheTtlMs?: number): ManagedAccount | null;
|
|
73
95
|
markRateLimited(account: ManagedAccount, retryAfterMs: number, family: ModelFamily, headerStyle?: HeaderStyle, model?: string | null): void;
|
|
74
96
|
/**
|
|
75
97
|
* Mark an account as used after a successful API request.
|
|
@@ -90,6 +112,23 @@ export declare class AccountManager {
|
|
|
90
112
|
getFreshAccountsForQuota(quotaKey: string, family: ModelFamily, model?: string | null): ManagedAccount[];
|
|
91
113
|
isRateLimitedForHeaderStyle(account: ManagedAccount, family: ModelFamily, headerStyle: HeaderStyle, model?: string | null): boolean;
|
|
92
114
|
getAvailableHeaderStyle(account: ManagedAccount, family: ModelFamily, model?: string | null): HeaderStyle | null;
|
|
115
|
+
/**
|
|
116
|
+
* Check if any OTHER account has antigravity quota available for the given family/model.
|
|
117
|
+
*
|
|
118
|
+
* Used to determine whether to switch accounts vs fall back to gemini-cli:
|
|
119
|
+
* - If true: Switch to another account (preserve antigravity priority)
|
|
120
|
+
* - If false: All accounts exhausted antigravity, safe to fall back to gemini-cli
|
|
121
|
+
*
|
|
122
|
+
* @param currentAccountIndex - Index of the current account (will be excluded from check)
|
|
123
|
+
* @param family - Model family ("gemini" or "claude")
|
|
124
|
+
* @param model - Optional model name for model-specific rate limits
|
|
125
|
+
* @returns true if any other enabled, non-cooling-down account has antigravity available
|
|
126
|
+
*/
|
|
127
|
+
hasOtherAccountWithAntigravityAvailable(currentAccountIndex: number, family: ModelFamily, model?: string | null): boolean;
|
|
128
|
+
setAccountEnabled(accountIndex: number, enabled: boolean): boolean;
|
|
129
|
+
markAccountVerificationRequired(accountIndex: number, reason?: string, verifyUrl?: string): boolean;
|
|
130
|
+
clearAccountVerificationRequired(accountIndex: number, enableAccount?: boolean): boolean;
|
|
131
|
+
removeAccountByIndex(accountIndex: number): boolean;
|
|
93
132
|
removeAccount(account: ManagedAccount): boolean;
|
|
94
133
|
updateFromAuth(account: ManagedAccount, auth: OAuthAuthDetails): void;
|
|
95
134
|
toAuthDetails(account: ManagedAccount): OAuthAuthDetails;
|
|
@@ -118,5 +157,17 @@ export declare class AccountManager {
|
|
|
118
157
|
* @returns Array of fingerprint versions, or empty array if not found
|
|
119
158
|
*/
|
|
120
159
|
getAccountFingerprintHistory(accountIndex: number): FingerprintVersion[];
|
|
160
|
+
updateQuotaCache(accountIndex: number, quotaGroups: Partial<Record<QuotaGroup, QuotaGroupSummary>>): void;
|
|
161
|
+
isAccountOverSoftQuota(account: ManagedAccount, family: ModelFamily, thresholdPercent: number, cacheTtlMs: number, model?: string | null): boolean;
|
|
162
|
+
getAccountsForQuotaCheck(): AccountMetadataV3[];
|
|
163
|
+
getOldestQuotaCacheAge(): number | null;
|
|
164
|
+
areAllAccountsOverSoftQuota(family: ModelFamily, thresholdPercent: number, cacheTtlMs: number, model?: string | null): boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Get minimum wait time until any account's soft quota resets.
|
|
167
|
+
* Returns 0 if any account is available (not over threshold).
|
|
168
|
+
* Returns the minimum resetTime across all over-threshold accounts.
|
|
169
|
+
* Returns null if no resetTime data is available.
|
|
170
|
+
*/
|
|
171
|
+
getMinWaitTimeForSoftQuota(family: ModelFamily, thresholdPercent: number, cacheTtlMs: number, model?: string | null): number | null;
|
|
121
172
|
}
|
|
122
173
|
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../src/plugin/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../src/plugin/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACtL,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAuB,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAA2B,MAAM,eAAe,CAAC;AACxH,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAK7D,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1E,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAkBhE,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,qBAA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