opencode-antigravity-auth-remix 1.1.0 → 1.2.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/README.md +451 -48
- package/dist/src/constants.d.ts +1 -1
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/constants.js.map +1 -1
- package/dist/src/plugin/core/streaming/transformer.d.ts +8 -2
- package/dist/src/plugin/core/streaming/transformer.d.ts.map +1 -1
- package/dist/src/plugin/core/streaming/transformer.js +27 -6
- package/dist/src/plugin/core/streaming/transformer.js.map +1 -1
- package/dist/src/plugin/count-tokens.d.ts +11 -0
- package/dist/src/plugin/count-tokens.d.ts.map +1 -0
- package/dist/src/plugin/count-tokens.js +57 -0
- package/dist/src/plugin/count-tokens.js.map +1 -0
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +58 -17
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/search.d.ts +5 -0
- package/dist/src/plugin/search.d.ts.map +1 -1
- package/dist/src/plugin/search.js +33 -3
- package/dist/src/plugin/search.js.map +1 -1
- package/dist/src/plugin/stores/signature-store.d.ts +16 -0
- package/dist/src/plugin/stores/signature-store.d.ts.map +1 -1
- package/dist/src/plugin/stores/signature-store.js +24 -0
- package/dist/src/plugin/stores/signature-store.js.map +1 -1
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +30 -0
- package/dist/src/plugin.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Antigravity + Gemini CLI OAuth Plugin for Opencode (Enhanced Fork)
|
|
2
2
|
|
|
3
|
+
[English](#english) | [简体中文](#简体中文)
|
|
4
|
+
|
|
5
|
+
<a name="english"></a>
|
|
6
|
+
|
|
3
7
|
[](LICENSE)
|
|
4
8
|
|
|
5
9
|
> **This is an enhanced fork** that merges the best features from multiple excellent projects:
|
|
@@ -10,7 +14,7 @@
|
|
|
10
14
|
> | `google_search` Tool (Experimental) | [shekohex/opencode-google-antigravity-auth](https://github.com/shekohex/opencode-google-antigravity-auth) |
|
|
11
15
|
> | `generate_image` Tool (Native Implementation) | Ported from Antigravity Manager logic |
|
|
12
16
|
>
|
|
13
|
-
> **Status:** Version 1.1.
|
|
17
|
+
> **Status:** Version 1.1.1 - Fixed `@opencode-ai/plugin` dependency resolution (upgraded to v1.0.182+)
|
|
14
18
|
|
|
15
19
|
---
|
|
16
20
|
|
|
@@ -26,7 +30,8 @@ Enable Opencode to authenticate against **Antigravity** (Google's IDE) via OAuth
|
|
|
26
30
|
- **Auto Recovery** - Automatic session recovery from Claude tool_result_missing errors
|
|
27
31
|
- **Plugin Compatible** - Works alongside other OpenCode plugins (opencodesync, etc.)
|
|
28
32
|
- **generate_image Tool** - AI image generation with auto-save, WebP conversion, and 4K support (Stability varies)
|
|
29
|
-
- **google_search Tool** -
|
|
33
|
+
- **google_search Tool** - High-quality web search with structural citations and URL analysis.
|
|
34
|
+
- **count_tokens Tool** - Count tokens for any text using specified models.
|
|
30
35
|
|
|
31
36
|
## Installation
|
|
32
37
|
|
|
@@ -46,7 +51,7 @@ Install the opencode-antigravity-auth-remix plugin and add the Antigravity model
|
|
|
46
51
|
|
|
47
52
|
```json
|
|
48
53
|
{
|
|
49
|
-
"plugin": ["opencode-antigravity-auth-remix@1.
|
|
54
|
+
"plugin": ["opencode-antigravity-auth-remix@1.2.0"]
|
|
50
55
|
}
|
|
51
56
|
```
|
|
52
57
|
|
|
@@ -56,63 +61,179 @@ Install the opencode-antigravity-auth-remix plugin and add the Antigravity model
|
|
|
56
61
|
opencode auth login
|
|
57
62
|
```
|
|
58
63
|
|
|
59
|
-
3. **Add models**
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"plugin": ["opencode-antigravity-auth-remix@1.1.0"],
|
|
64
|
-
"provider": {
|
|
65
|
-
"google": {
|
|
66
|
-
"models": {
|
|
67
|
-
"antigravity-claude-sonnet-4-5": {
|
|
68
|
-
"name": "Claude Sonnet 4.5 (Antigravity)",
|
|
69
|
-
"limit": { "context": 200000, "output": 64000 },
|
|
70
|
-
"modalities": {
|
|
71
|
-
"input": ["text", "image", "pdf"],
|
|
72
|
-
"output": ["text"]
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
```
|
|
64
|
+
3. **Add models** - Copy the complete configuration below to your `~/.config/opencode/opencode.json`:
|
|
80
65
|
|
|
81
66
|
4. **Use it:**
|
|
82
67
|
|
|
83
68
|
```bash
|
|
84
|
-
opencode run "Hello" --model=google/antigravity-claude-sonnet-4-5
|
|
69
|
+
opencode run "Hello" --model=google/antigravity-claude-sonnet-4-5-thinking-high
|
|
85
70
|
```
|
|
86
71
|
|
|
87
72
|
## Available Models
|
|
88
73
|
|
|
89
74
|
### Antigravity Quota
|
|
90
75
|
|
|
91
|
-
Models with `antigravity-` prefix use Antigravity quota:
|
|
92
|
-
|
|
93
|
-
| Model
|
|
94
|
-
|
|
|
95
|
-
| `google/antigravity-gemini-3-
|
|
96
|
-
| `google/antigravity-gemini-3-
|
|
97
|
-
| `google/antigravity-
|
|
98
|
-
| `google/antigravity-claude-sonnet-4-5`
|
|
99
|
-
| `google/antigravity-claude-sonnet-4-5
|
|
100
|
-
| `google/antigravity-claude-sonnet-4-5-thinking-medium` | Sonnet with 16K thinking budget |
|
|
101
|
-
| `google/antigravity-claude-sonnet-4-5-thinking-high` | Sonnet with 32K thinking budget |
|
|
102
|
-
| `google/antigravity-claude-opus-4-5-thinking-low` | Opus with 8K thinking budget |
|
|
103
|
-
| `google/antigravity-claude-opus-4-5-thinking-medium` | Opus with 16K thinking budget |
|
|
104
|
-
| `google/antigravity-claude-opus-4-5-thinking-high` | Opus with 32K thinking budget |
|
|
76
|
+
Models with `antigravity-` prefix use **Antigravity quota** (Claude + Gemini 3):
|
|
77
|
+
|
|
78
|
+
| # | Model | Variants | Description |
|
|
79
|
+
|---| ------------------------------------------- | ------------------------------ | ------------------------------ |
|
|
80
|
+
| 01| `google/antigravity-gemini-3-pro` | `-low`, `-high` | Gemini 3 Pro with thinking |
|
|
81
|
+
| 02| `google/antigravity-gemini-3-flash` | `-minimal`, `-low`, `-medium`, `-high` | Gemini 3 Flash with thinking |
|
|
82
|
+
| 03| `google/antigravity-claude-opus-4-5-thinking` | `-low`, `-medium`, `-high` | Claude Opus 4.5 with thinking |
|
|
83
|
+
| 04| `google/antigravity-claude-sonnet-4-5-thinking` | `-low`, `-medium`, `-high` | Claude Sonnet 4.5 with thinking|
|
|
84
|
+
| 05| `google/antigravity-claude-sonnet-4-5` | - | Claude Sonnet 4.5 (no thinking)|
|
|
105
85
|
|
|
106
86
|
### Gemini CLI Quota
|
|
107
87
|
|
|
108
|
-
Models
|
|
88
|
+
Models without `antigravity-` prefix use **Gemini CLI quota**:
|
|
89
|
+
|
|
90
|
+
| # | Model | Variants | Description |
|
|
91
|
+
|---| ------------------------------- | ------------------------------------- | ------------------------------ |
|
|
92
|
+
| 06| `google/gemini-3-pro-preview` | `-low`, `-medium`, `-high` | Gemini 3 Pro (CLI quota) |
|
|
93
|
+
| 07| `google/gemini-3-flash-preview` | `-minimal`, `-low`, `-medium`, `-high`| Gemini 3 Flash (CLI quota) |
|
|
94
|
+
| 08| `google/gemini-2.5-pro` | - | Gemini 2.5 Pro |
|
|
95
|
+
| 09| `google/gemini-2.5-flash` | - | Gemini 2.5 Flash |
|
|
96
|
+
| 10| `google/gemini-2.5-flash-lite` | - | Gemini 2.5 Flash Lite |
|
|
97
|
+
|
|
98
|
+
## Complete Configuration
|
|
99
|
+
|
|
100
|
+
Copy this to `~/.config/opencode/opencode.json`:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"$schema": "https://opencode.ai/config.json",
|
|
105
|
+
"plugin": ["opencode-antigravity-auth-remix@1.2.0"],
|
|
106
|
+
"provider": {
|
|
107
|
+
"google": {
|
|
108
|
+
"models": {
|
|
109
|
+
"antigravity-gemini-3-pro": {
|
|
110
|
+
"id": "antigravity-gemini-3-pro",
|
|
111
|
+
"name": "#01 Gemini 3 Pro (Antigravity)",
|
|
112
|
+
"reasoning": true,
|
|
113
|
+
"limit": { "context": 1048576, "output": 65535 },
|
|
114
|
+
"cost": { "input": 0, "output": 0 },
|
|
115
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
116
|
+
"variants": {
|
|
117
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
118
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"antigravity-gemini-3-flash": {
|
|
122
|
+
"id": "antigravity-gemini-3-flash",
|
|
123
|
+
"name": "#02 Gemini 3 Flash (Antigravity)",
|
|
124
|
+
"reasoning": true,
|
|
125
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
126
|
+
"cost": { "input": 0, "output": 0 },
|
|
127
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
128
|
+
"variants": {
|
|
129
|
+
"minimal": { "options": { "thinkingConfig": { "thinkingLevel": "minimal", "includeThoughts": true } } },
|
|
130
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
131
|
+
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
|
|
132
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"antigravity-claude-opus-4-5-thinking": {
|
|
136
|
+
"id": "antigravity-claude-opus-4-5-thinking",
|
|
137
|
+
"name": "#03 Claude Opus 4.5 Thinking (Antigravity)",
|
|
138
|
+
"reasoning": true,
|
|
139
|
+
"limit": { "context": 200000, "output": 64000 },
|
|
140
|
+
"cost": { "input": 0, "output": 0 },
|
|
141
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
142
|
+
"variants": {
|
|
143
|
+
"low": { "options": { "thinkingConfig": { "thinkingBudget": 8192, "includeThoughts": true } } },
|
|
144
|
+
"medium": { "options": { "thinkingConfig": { "thinkingBudget": 16384, "includeThoughts": true } } },
|
|
145
|
+
"high": { "options": { "thinkingConfig": { "thinkingBudget": 32768, "includeThoughts": true } } }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"antigravity-claude-sonnet-4-5-thinking": {
|
|
149
|
+
"id": "antigravity-claude-sonnet-4-5-thinking",
|
|
150
|
+
"name": "#04 Claude Sonnet 4.5 Thinking (Antigravity)",
|
|
151
|
+
"reasoning": true,
|
|
152
|
+
"limit": { "context": 200000, "output": 64000 },
|
|
153
|
+
"cost": { "input": 0, "output": 0 },
|
|
154
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
155
|
+
"variants": {
|
|
156
|
+
"low": { "options": { "thinkingConfig": { "thinkingBudget": 8192, "includeThoughts": true } } },
|
|
157
|
+
"medium": { "options": { "thinkingConfig": { "thinkingBudget": 16384, "includeThoughts": true } } },
|
|
158
|
+
"high": { "options": { "thinkingConfig": { "thinkingBudget": 32768, "includeThoughts": true } } }
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"antigravity-claude-sonnet-4-5": {
|
|
162
|
+
"id": "antigravity-claude-sonnet-4-5",
|
|
163
|
+
"name": "#05 Claude Sonnet 4.5 (Antigravity)",
|
|
164
|
+
"reasoning": false,
|
|
165
|
+
"limit": { "context": 200000, "output": 64000 },
|
|
166
|
+
"cost": { "input": 0, "output": 0 },
|
|
167
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
168
|
+
},
|
|
169
|
+
"gemini-3-pro-preview": {
|
|
170
|
+
"id": "gemini-3-pro-preview",
|
|
171
|
+
"name": "#06 Gemini 3 Pro (CLI)",
|
|
172
|
+
"reasoning": true,
|
|
173
|
+
"limit": { "context": 1000000, "output": 64000 },
|
|
174
|
+
"cost": { "input": 0, "output": 0 },
|
|
175
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
176
|
+
"variants": {
|
|
177
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
178
|
+
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
|
|
179
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"gemini-3-flash-preview": {
|
|
183
|
+
"id": "gemini-3-flash-preview",
|
|
184
|
+
"name": "#07 Gemini 3 Flash (CLI)",
|
|
185
|
+
"reasoning": true,
|
|
186
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
187
|
+
"cost": { "input": 0, "output": 0 },
|
|
188
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
189
|
+
"variants": {
|
|
190
|
+
"minimal": { "options": { "thinkingConfig": { "thinkingLevel": "minimal", "includeThoughts": true } } },
|
|
191
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
192
|
+
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
|
|
193
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"gemini-2.5-pro": {
|
|
197
|
+
"id": "gemini-2.5-pro",
|
|
198
|
+
"name": "#08 Gemini 2.5 Pro (CLI)",
|
|
199
|
+
"reasoning": true,
|
|
200
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
201
|
+
"cost": { "input": 0, "output": 0 },
|
|
202
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
203
|
+
},
|
|
204
|
+
"gemini-2.5-flash": {
|
|
205
|
+
"id": "gemini-2.5-flash",
|
|
206
|
+
"name": "#09 Gemini 2.5 Flash (CLI)",
|
|
207
|
+
"reasoning": false,
|
|
208
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
209
|
+
"cost": { "input": 0, "output": 0 },
|
|
210
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
211
|
+
},
|
|
212
|
+
"gemini-2.5-flash-lite": {
|
|
213
|
+
"id": "gemini-2.5-flash-lite",
|
|
214
|
+
"name": "#10 Gemini 2.5 Flash Lite (CLI)",
|
|
215
|
+
"reasoning": false,
|
|
216
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
217
|
+
"cost": { "input": 0, "output": 0 },
|
|
218
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Usage Examples
|
|
109
227
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
228
|
+
```bash
|
|
229
|
+
# Antigravity quota models
|
|
230
|
+
opencode run "Hello" --model=google/antigravity-claude-sonnet-4-5-thinking-high
|
|
231
|
+
opencode run "Hello" --model=google/antigravity-gemini-3-pro-high
|
|
232
|
+
|
|
233
|
+
# Gemini CLI quota models
|
|
234
|
+
opencode run "Hello" --model=google/gemini-3-pro-preview-high
|
|
235
|
+
opencode run "Hello" --model=google/gemini-2.5-flash
|
|
236
|
+
```
|
|
116
237
|
|
|
117
238
|
## Built-in Tools
|
|
118
239
|
|
|
@@ -133,10 +254,292 @@ AI image generation with automatic file saving and WebP conversion. Uses `gemini
|
|
|
133
254
|
- Generates WebP version (75% quality) alongside original
|
|
134
255
|
- 4K support via dynamic model configuration
|
|
135
256
|
|
|
136
|
-
### google_search
|
|
257
|
+
### google_search
|
|
258
|
+
|
|
259
|
+
High-quality web search and URL analysis with structural citations.
|
|
260
|
+
|
|
261
|
+
### count_tokens
|
|
262
|
+
|
|
263
|
+
Count the number of tokens in a given text string.
|
|
137
264
|
|
|
138
|
-
|
|
265
|
+
| Parameter | Type | Required | Default | Description |
|
|
266
|
+
|-----------|------|----------|---------|-------------|
|
|
267
|
+
| `text` | string | Yes | - | The text to count tokens for |
|
|
268
|
+
| `model` | string | No | "gemini-2.5-flash" | The model to use for counting |
|
|
139
269
|
|
|
140
270
|
## License
|
|
141
271
|
|
|
142
272
|
MIT
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
<a name="简体中文"></a>
|
|
277
|
+
|
|
278
|
+
# Antigravity + Gemini CLI OAuth Opencode 插件 (增强分支)
|
|
279
|
+
|
|
280
|
+
[English](#english) | [简体中文](#简体中文)
|
|
281
|
+
|
|
282
|
+
[](LICENSE)
|
|
283
|
+
|
|
284
|
+
> **这是一个增强分支**,融合了多个优秀项目的核心功能:
|
|
285
|
+
>
|
|
286
|
+
> | 功能 | 来源 |
|
|
287
|
+
> | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- |
|
|
288
|
+
> | 双配额系统、多账号轮换、会话恢复、思考过程恢复 | [NoeFabris/opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) |
|
|
289
|
+
> | `google_search` 工具 (实验性) | [shekohex/opencode-google-antigravity-auth](https://github.com/shekohex/opencode-google-antigravity-auth) |
|
|
290
|
+
> | `generate_image` 工具 (原生实现) | 移植自 Antigravity Manager 逻辑 |
|
|
291
|
+
>
|
|
292
|
+
> **状态:** 版本 1.1.1 - 修复了 `@opencode-ai/plugin` 依赖解析问题 (已升级至 v1.0.182+)
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
使 Opencode 能够通过 OAuth 验证 **Antigravity** (Google 的 IDE),从而让你可以使用 Google 凭据访问 Antigravity 配额并使用 `gemini-3-pro-high` 和 `claude-opus-4-5-thinking` 等模型。
|
|
297
|
+
|
|
298
|
+
## 核心功能
|
|
299
|
+
|
|
300
|
+
- **Google OAuth 登录** - 通过 `opencode auth login` 自动刷新令牌
|
|
301
|
+
- **双配额系统** - 单个插件即可访问 Antigravity 配额 (Claude, Gemini 3) 和 Gemini CLI 配额
|
|
302
|
+
- **多账号轮换** - 支持添加多个 Google 账号;当某个账号触发频率限制时自动切换
|
|
303
|
+
- **实时 SSE 流式传输** - 包括思考块 (Thinking blocks) 和增量输出
|
|
304
|
+
- **扩展思考能力** - 原生支持 Claude 思考预算和 Gemini 3 思考等级
|
|
305
|
+
- **自动恢复** - 自动处理 Claude 的 `tool_result_missing` 错误并恢复会话
|
|
306
|
+
- **插件兼容性** - 可与其他 OpenCode 插件 (如 opencodesync 等) 同时运行
|
|
307
|
+
- **generate_image 工具** - AI 图像生成,支持自动保存、WebP 转换和 4K 输出 (稳定性视配额而定)
|
|
308
|
+
- **google_search 工具** - 高质量网页搜索,支持结构化引用和 URL 分析。
|
|
309
|
+
- **count_tokens 工具** - 统计指定文本在特定模型下的 Token 消耗。
|
|
310
|
+
|
|
311
|
+
## 安装步骤
|
|
312
|
+
|
|
313
|
+
### 智能助手安装 (推荐)
|
|
314
|
+
|
|
315
|
+
将以下指令发送给任何 LLM 助手 (Claude Code, OpenCode, Cursor 等):
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
参考 https://raw.githubusercontent.com/Darkstarrd-dev/opencode-antigravity-auth/main/README.md 安装 opencode-antigravity-auth-remix 插件,并将 Antigravity 模型定义添加到 ~/.config/opencode/opencode.json。
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### 手动安装
|
|
322
|
+
|
|
323
|
+
1. **在配置中添加插件** (`~/.config/opencode/opencode.json`):
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
{
|
|
327
|
+
"plugin": ["opencode-antigravity-auth-remix@1.2.0"]
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
2. **身份验证:**
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
opencode auth login
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
3. **添加模型定义** - 将下方的完整配置复制到你的 `~/.config/opencode/opencode.json`。
|
|
338
|
+
|
|
339
|
+
4. **开始使用:**
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
opencode run "你好" --model=google/antigravity-claude-sonnet-4-5-thinking-high
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## 可用模型
|
|
346
|
+
|
|
347
|
+
### Antigravity 配额 (Antigravity Quota)
|
|
348
|
+
|
|
349
|
+
带有 `antigravity-` 前缀的模型使用 **Antigravity 配额** (包含 Claude 和 Gemini 3):
|
|
350
|
+
|
|
351
|
+
| # | 模型 | 变体 (Variants) | 描述 |
|
|
352
|
+
|---| ------------------------------------------- | ------------------------------ | ------------------------------ |
|
|
353
|
+
| 01| `google/antigravity-gemini-3-pro` | `-low`, `-high` | Gemini 3 Pro (带思考过程) |
|
|
354
|
+
| 02| `google/antigravity-gemini-3-flash` | `-minimal`, `-low`, `-medium`, `-high` | Gemini 3 Flash (带思考过程) |
|
|
355
|
+
| 03| `google/antigravity-claude-opus-4-5-thinking` | `-low`, `-medium`, `-high` | Claude Opus 4.5 (带思考预算) |
|
|
356
|
+
| 04| `google/antigravity-claude-sonnet-4-5-thinking` | `-low`, `-medium`, `-high` | Claude Sonnet 4.5 (带思考预算)|
|
|
357
|
+
| 05| `google/antigravity-claude-sonnet-4-5` | - | Claude Sonnet 4.5 (普通模式)|
|
|
358
|
+
|
|
359
|
+
### Gemini CLI 配额 (Gemini CLI Quota)
|
|
360
|
+
|
|
361
|
+
不带 `antigravity-` 前缀的模型使用 **Gemini CLI 配额**:
|
|
362
|
+
|
|
363
|
+
| # | 模型 | 变体 (Variants) | 描述 |
|
|
364
|
+
|---| ------------------------------- | ------------------------------------- | ------------------------------ |
|
|
365
|
+
| 06| `google/gemini-3-pro-preview` | `-low`, `-medium`, `-high` | Gemini 3 Pro (CLI 配额) |
|
|
366
|
+
| 07| `google/gemini-3-flash-preview` | `-minimal`, `-low`, `-medium`, `-high`| Gemini 3 Flash (CLI 配额) |
|
|
367
|
+
| 08| `google/gemini-2.5-pro` | - | Gemini 2.5 Pro |
|
|
368
|
+
| 09| `google/gemini-2.5-flash` | - | Gemini 2.5 Flash |
|
|
369
|
+
| 10| `google/gemini-2.5-flash-lite` | - | Gemini 2.5 Flash Lite |
|
|
370
|
+
|
|
371
|
+
## 完整配置示例
|
|
372
|
+
|
|
373
|
+
将以下内容复制到 `~/.config/opencode/opencode.json`:
|
|
374
|
+
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"$schema": "https://opencode.ai/config.json",
|
|
378
|
+
"plugin": ["opencode-antigravity-auth-remix@1.2.0"],
|
|
379
|
+
"provider": {
|
|
380
|
+
"google": {
|
|
381
|
+
"models": {
|
|
382
|
+
"antigravity-gemini-3-pro": {
|
|
383
|
+
"id": "antigravity-gemini-3-pro",
|
|
384
|
+
"name": "#01 Gemini 3 Pro (Antigravity)",
|
|
385
|
+
"reasoning": true,
|
|
386
|
+
"limit": { "context": 1048576, "output": 65535 },
|
|
387
|
+
"cost": { "input": 0, "output": 0 },
|
|
388
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
389
|
+
"variants": {
|
|
390
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
391
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"antigravity-gemini-3-flash": {
|
|
395
|
+
"id": "antigravity-gemini-3-flash",
|
|
396
|
+
"name": "#02 Gemini 3 Flash (Antigravity)",
|
|
397
|
+
"reasoning": true,
|
|
398
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
399
|
+
"cost": { "input": 0, "output": 0 },
|
|
400
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
401
|
+
"variants": {
|
|
402
|
+
"minimal": { "options": { "thinkingConfig": { "thinkingLevel": "minimal", "includeThoughts": true } } },
|
|
403
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
404
|
+
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
|
|
405
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"antigravity-claude-opus-4-5-thinking": {
|
|
409
|
+
"id": "antigravity-claude-opus-4-5-thinking",
|
|
410
|
+
"name": "#03 Claude Opus 4.5 Thinking (Antigravity)",
|
|
411
|
+
"reasoning": true,
|
|
412
|
+
"limit": { "context": 200000, "output": 64000 },
|
|
413
|
+
"cost": { "input": 0, "output": 0 },
|
|
414
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
415
|
+
"variants": {
|
|
416
|
+
"low": { "options": { "thinkingConfig": { "thinkingBudget": 8192, "includeThoughts": true } } },
|
|
417
|
+
"medium": { "options": { "thinkingConfig": { "thinkingBudget": 16384, "includeThoughts": true } } },
|
|
418
|
+
"high": { "options": { "thinkingConfig": { "thinkingBudget": 32768, "includeThoughts": true } } }
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"antigravity-claude-sonnet-4-5-thinking": {
|
|
422
|
+
"id": "antigravity-claude-sonnet-4-5-thinking",
|
|
423
|
+
"name": "#04 Claude Sonnet 4.5 Thinking (Antigravity)",
|
|
424
|
+
"reasoning": true,
|
|
425
|
+
"limit": { "context": 200000, "output": 64000 },
|
|
426
|
+
"cost": { "input": 0, "output": 0 },
|
|
427
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
428
|
+
"variants": {
|
|
429
|
+
"low": { "options": { "thinkingConfig": { "thinkingBudget": 8192, "includeThoughts": true } } },
|
|
430
|
+
"medium": { "options": { "thinkingConfig": { "thinkingBudget": 16384, "includeThoughts": true } } },
|
|
431
|
+
"high": { "options": { "thinkingConfig": { "thinkingBudget": 32768, "includeThoughts": true } } }
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"antigravity-claude-sonnet-4-5": {
|
|
435
|
+
"id": "antigravity-claude-sonnet-4-5",
|
|
436
|
+
"name": "#05 Claude Sonnet 4.5 (Antigravity)",
|
|
437
|
+
"reasoning": false,
|
|
438
|
+
"limit": { "context": 200000, "output": 64000 },
|
|
439
|
+
"cost": { "input": 0, "output": 0 },
|
|
440
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
441
|
+
},
|
|
442
|
+
"gemini-3-pro-preview": {
|
|
443
|
+
"id": "gemini-3-pro-preview",
|
|
444
|
+
"name": "#06 Gemini 3 Pro (CLI)",
|
|
445
|
+
"reasoning": true,
|
|
446
|
+
"limit": { "context": 1000000, "output": 64000 },
|
|
447
|
+
"cost": { "input": 0, "output": 0 },
|
|
448
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
449
|
+
"variants": {
|
|
450
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
451
|
+
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
|
|
452
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"gemini-3-flash-preview": {
|
|
456
|
+
"id": "gemini-3-flash-preview",
|
|
457
|
+
"name": "#07 Gemini 3 Flash (CLI)",
|
|
458
|
+
"reasoning": true,
|
|
459
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
460
|
+
"cost": { "input": 0, "output": 0 },
|
|
461
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
462
|
+
"variants": {
|
|
463
|
+
"minimal": { "options": { "thinkingConfig": { "thinkingLevel": "minimal", "includeThoughts": true } } },
|
|
464
|
+
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
|
|
465
|
+
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
|
|
466
|
+
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"gemini-2.5-pro": {
|
|
470
|
+
"id": "gemini-2.5-pro",
|
|
471
|
+
"name": "#08 Gemini 2.5 Pro (CLI)",
|
|
472
|
+
"reasoning": true,
|
|
473
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
474
|
+
"cost": { "input": 0, "output": 0 },
|
|
475
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
476
|
+
},
|
|
477
|
+
"gemini-2.5-flash": {
|
|
478
|
+
"id": "gemini-2.5-flash",
|
|
479
|
+
"name": "#09 Gemini 2.5 Flash (CLI)",
|
|
480
|
+
"reasoning": false,
|
|
481
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
482
|
+
"cost": { "input": 0, "output": 0 },
|
|
483
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
484
|
+
},
|
|
485
|
+
"gemini-2.5-flash-lite": {
|
|
486
|
+
"id": "gemini-2.5-flash-lite",
|
|
487
|
+
"name": "#10 Gemini 2.5 Flash Lite (CLI)",
|
|
488
|
+
"reasoning": false,
|
|
489
|
+
"limit": { "context": 1048576, "output": 65536 },
|
|
490
|
+
"cost": { "input": 0, "output": 0 },
|
|
491
|
+
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
## 使用示例
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
# 使用 Antigravity 配额模型
|
|
503
|
+
opencode run "你好" --model=google/antigravity-claude-sonnet-4-5-thinking-high
|
|
504
|
+
opencode run "你好" --model=google/antigravity-gemini-3-pro-high
|
|
505
|
+
|
|
506
|
+
# 使用 Gemini CLI 配额模型
|
|
507
|
+
opencode run "你好" --model=google/gemini-3-pro-preview-high
|
|
508
|
+
opencode run "你好" --model=google/gemini-2.5-flash
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
## 内置工具
|
|
512
|
+
|
|
513
|
+
### generate_image (生图工具)
|
|
514
|
+
|
|
515
|
+
基于 `gemini-3-pro-image` 实现的 AI 图像生成工具,支持自动保存和 WebP 格式转换。
|
|
516
|
+
|
|
517
|
+
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
518
|
+
|-----------|------|----------|---------|-------------|
|
|
519
|
+
| `prompt` | string | 是 | - | 图像描述词 |
|
|
520
|
+
| `aspect_ratio` | string | 否 | "1:1" | 纵横比 |
|
|
521
|
+
| `quality` | string | 否 | "standard" | 图像质量 (hd = 4K) |
|
|
522
|
+
|
|
523
|
+
**支持的纵横比:** `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`
|
|
524
|
+
|
|
525
|
+
**主要特性:**
|
|
526
|
+
- 自动保存至项目目录下的 `{project}/imgs/`
|
|
527
|
+
- 同时生成 WebP 版本 (75% 质量) 以节省空间
|
|
528
|
+
- 支持动态配置 4K (HD) 高清输出
|
|
529
|
+
|
|
530
|
+
### google_search (搜索工具)
|
|
531
|
+
|
|
532
|
+
高质量网页搜索和 URL 分析,支持结构化引用来源。
|
|
533
|
+
|
|
534
|
+
### count_tokens (Token 统计工具)
|
|
535
|
+
|
|
536
|
+
统计指定文本在特定模型下的 Token 消耗。
|
|
537
|
+
|
|
538
|
+
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
539
|
+
|-----------|------|----------|---------|-------------|
|
|
540
|
+
| `text` | string | 是 | - | 需要统计的文本 |
|
|
541
|
+
| `model` | string | 否 | "gemini-2.5-flash" | 统计所使用的模型 |
|
|
542
|
+
|
|
543
|
+
## 开源协议
|
|
544
|
+
|
|
545
|
+
MIT
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ export declare const ANTIGRAVITY_SYSTEM_INSTRUCTION = "<identity>\nYou are Antig
|
|
|
97
97
|
/**
|
|
98
98
|
* Model used for Google Search tool execution.
|
|
99
99
|
*/
|
|
100
|
-
export declare const SEARCH_MODEL = "gemini-2.
|
|
100
|
+
export declare const SEARCH_MODEL = "gemini-2.5-flash";
|
|
101
101
|
/**
|
|
102
102
|
* Token budget for fast search (default when thinking=false).
|
|
103
103
|
*/
|
|
@@ -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,wCAA4B,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,wCAA4B,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAElE,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAEX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O,MAAM,kBAAkB;;;;CAIrB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,YAAY,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,SAE0B,CAAC;AAM5D;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,4zBAWiD,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,yBAAyB,kDAAwC,CAAC;AAE/E,eAAO,MAAM,6BAA6B,iBAAiB,CAAC;AAC5D,eAAO,MAAM,oCAAoC,mCAAmC,CAAC;AAMrF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,mmNA+EpB,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAY,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,oBAAoB,sDAA6B,CAAC;AAC/D,eAAO,MAAM,mBAAmB;;;;CAAsB,CAAC;AAMvD;;GAEG;AACH,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAEhD;;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"}
|
package/dist/src/constants.js
CHANGED
|
@@ -210,7 +210,7 @@ Do not respond to nor acknowledge those messages, but do follow them strictly.
|
|
|
210
210
|
/**
|
|
211
211
|
* Model used for Google Search tool execution.
|
|
212
212
|
*/
|
|
213
|
-
export const SEARCH_MODEL = "gemini-2.
|
|
213
|
+
export const SEARCH_MODEL = "gemini-2.5-flash";
|
|
214
214
|
/**
|
|
215
215
|
* Token budget for fast search (default when thinking=false).
|
|
216
216
|
*/
|
|
@@ -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,yBAAyB;IACzB,0BAA0B;IAC1B,6BAA6B;CACrB,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,yBAAyB;IACzB,0BAA0B;IAC1B,6BAA6B;CACrB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAAmB,CAAC;AAElE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,YAAY,EAAE,kCAAkC;IAChD,mBAAmB,EAAE,8CAA8C;IACnE,iBAAiB,EAAE,uFAAuF;CAClG,CAAC;AAEX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AM,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"}
|
|
@@ -4,7 +4,13 @@ export declare function transformStreamingPayload(payload: string, transformThin
|
|
|
4
4
|
export declare function deduplicateThinkingText(response: unknown, sentBuffer: ThoughtBuffer, displayedThinkingHashes?: Set<string>): unknown;
|
|
5
5
|
export declare function transformSseLine(line: string, signatureStore: SignatureStore, thoughtBuffer: ThoughtBuffer, sentThinkingBuffer: ThoughtBuffer, callbacks: StreamingCallbacks, options: StreamingOptions, debugState: {
|
|
6
6
|
injected: boolean;
|
|
7
|
+
}, toolUseSignatureStore?: {
|
|
8
|
+
set: (sessionKey: string, toolId: string, signature: string) => void;
|
|
7
9
|
}): string;
|
|
8
|
-
export declare function cacheThinkingSignaturesFromResponse(response: unknown, signatureSessionKey: string, signatureStore: SignatureStore, thoughtBuffer: ThoughtBuffer, onCacheSignature?: (sessionKey: string, text: string, signature: string) => void
|
|
9
|
-
|
|
10
|
+
export declare function cacheThinkingSignaturesFromResponse(response: unknown, signatureSessionKey: string, signatureStore: SignatureStore, thoughtBuffer: ThoughtBuffer, onCacheSignature?: (sessionKey: string, text: string, signature: string) => void, toolUseSignatureStore?: {
|
|
11
|
+
set: (sessionKey: string, toolId: string, signature: string) => void;
|
|
12
|
+
}): void;
|
|
13
|
+
export declare function createStreamingTransformer(signatureStore: SignatureStore, callbacks: StreamingCallbacks, options?: StreamingOptions, toolUseSignatureStore?: {
|
|
14
|
+
set: (sessionKey: string, toolId: string, signature: string) => void;
|
|
15
|
+
}): TransformStream<Uint8Array, Uint8Array>;
|
|
10
16
|
//# sourceMappingURL=transformer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/core/streaming/transformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACd,MAAM,SAAS,CAAC;AAcjB,wBAAgB,mBAAmB,IAAI,aAAa,CAOnD;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,sBAAsB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,GACtD,MAAM,CAuBR;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,aAAa,EACzB,uBAAuB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GACpC,OAAO,CAkGT;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,aAAa,EACjC,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/core/streaming/transformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACd,MAAM,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