opencode-gemini-business 2.0.5 → 2.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 CHANGED
@@ -1,102 +1,64 @@
1
- # 🔄 opencode-gemini-business
1
+ <div align="center">
2
2
 
3
- [🇬🇧 **English**](README.md) | [🇷🇺 Русский](README.ru.md)
3
+ # 🔄 opencode-gemini-business
4
4
 
5
- > Multi-account Gemini Business pool with intelligent rotation for OpenCode
5
+ **Мульти-аккаунтный пул Gemini Business с интеллектуальной ротацией для OpenCode**
6
6
 
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![npm version](https://img.shields.io/npm/v/opencode-gemini-business.svg)](https://www.npmjs.com/package/opencode-gemini-business)
9
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
7
+ [![npm version](https://img.shields.io/npm/v/opencode-gemini-business.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/opencode-gemini-business)
8
+ [![npm downloads](https://img.shields.io/npm/dm/opencode-gemini-business.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/opencode-gemini-business)
9
+ [![GitHub release](https://img.shields.io/github/v/release/izzzzzi/opencode-gemini-business?style=flat&colorA=18181B&colorB=28CF8D)](https://github.com/izzzzzi/opencode-gemini-business/releases)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat&colorA=18181B&colorB=28CF8D)](LICENSE)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue?style=flat&colorA=18181B&colorB=3178C6)](https://www.typescriptlang.org/)
12
+ [![Node.js](https://img.shields.io/badge/Node.js-ESM-green?style=flat&colorA=18181B&colorB=339933)](https://nodejs.org/)
10
13
 
11
- ---
14
+ **🇷🇺 Русский** | [🇬🇧 English](README.en.md)
12
15
 
13
- ## 📖 Overview
16
+ <br />
14
17
 
15
- **opencode-gemini-business** is an OpenCode plugin that enables multi-account rotation for **Gemini Business API**, providing automatic failover and load balancing across multiple accounts. Pool multiple Gemini Business accounts with intelligent rotation strategies to overcome rate limits.
18
+ *Auth-плагин для [OpenCode](https://github.com/anomalyco/opencode) пул из нескольких аккаунтов Gemini Business с автоматической ротацией, фейловером и балансировкой нагрузки.*
16
19
 
17
- **⚠️ Important**: This plugin uses the **official Gemini Business API** (`business.gemini.google`), NOT Google AI Studio.
20
+ </div>
18
21
 
19
- ## ✨ Key Features
22
+ ---
20
23
 
21
- | Feature | Description |
22
- |---------|-------------|
23
- | 🔄 **Multi-Account Rotation** | Automatically rotate between multiple Gemini Business accounts |
24
- | 🛡️ **Automatic Failover** | Retry failed requests with different accounts seamlessly |
25
- | 🔐 **Session Management** | Built-in XSRF token and session lifecycle management |
26
- | ⚙️ **Flexible Strategies** | Round-robin, least-used, or random rotation |
27
- | 📊 **Health Monitoring** | Track usage statistics and error counts per account |
28
- | 🚀 **OpenCode Compatible** | Works seamlessly with OpenCode's provider system |
29
- | 💾 **Persistent Config** | Secure storage in `~/.config/opencode/gemini-business-accounts.json` |
24
+ ## 📖 Обзор
30
25
 
31
- ## 🤖 Supported Models
26
+ **opencode-gemini-business** плагин для OpenCode, который обеспечивает ротацию между несколькими аккаунтами **Gemini Business API** (`business.gemini.google`), предоставляя автоматическое переключение при ошибках и балансировку нагрузки.
32
27
 
33
- The plugin supports all Gemini Business models:
28
+ > **Важно**: Плагин использует **Gemini Business / Enterprise API**, НЕ Google AI Studio.
34
29
 
35
- | Model | Context Length | Max Output | Best For |
36
- |-------|---------------|------------|----------|
37
- | `gemini-2.5-pro` | 1M tokens | 32K tokens | Complex reasoning, long documents |
38
- | `gemini-2.5-flash` | 1M tokens | 8K tokens | Fast responses, simple tasks |
39
- | `gemini-2.0-pro` | 2M tokens | 32K tokens | Massive context, deep analysis |
40
- | `gemini-1.5-pro` | 2M tokens | 8K tokens | Production workloads |
41
- | `gemini-1.5-flash` | 1M tokens | 8K tokens | Cost-effective development |
30
+ ---
42
31
 
43
- ## 🔧 Installation & Configuration
32
+ ## Возможности
44
33
 
45
- ### 📦 Install the Plugin
34
+ | Возможность | Описание |
35
+ |-------------|----------|
36
+ | 🔄 **Ротация аккаунтов** | Автоматическое переключение между несколькими аккаунтами Gemini Business |
37
+ | 🛡️ **Автоматический фейловер** | Повторные запросы с другим аккаунтом при ошибках |
38
+ | 🔐 **JWT-аутентификация** | Встроенное получение XSRF-токена и подписание JWT (HS256) |
39
+ | 📡 **Поддержка стриминга** | Полная поддержка SSE, JSON-lines и fallback-парсинга |
40
+ | ⚙️ **Гибкие стратегии** | Round-robin, least-used или случайный выбор |
41
+ | 🔑 **Автонастройка auth** | `add-account` автоматически создаёт auth-запись OpenCode |
46
42
 
47
- ```bash
48
- npm install -g opencode-gemini-business
49
- ```
43
+ ---
50
44
 
51
- Or use with npx:
45
+ ## 🤖 Поддерживаемые модели
52
46
 
53
- ```bash
54
- npx opencode-gemini-business@latest
55
- ```
47
+ | Модель | Internal API ID | Для чего |
48
+ |--------|:---------------:|----------|
49
+ | `gemini-2.5-flash` | `gemini-2.5-flash` | Повседневные задачи, быстрые ответы |
50
+ | `gemini-2.5-pro` | `gemini-2.5-pro` | Сложные рассуждения |
51
+ | `gemini-3-flash` | `gemini-3-flash-preview` | Новое поколение, быстрая |
52
+ | `gemini-3.1-pro` | `gemini-3.1-pro-preview` | Продвинутые рассуждения (preview) |
53
+ | `auto` | *(пусто)* | Gemini автоматически выберет лучшую модель |
56
54
 
57
- ### ⚙️ Configure OpenCode
55
+ ---
58
56
 
59
- Add to `~/.config/opencode/opencode.json`:
57
+ ## 🚀 Быстрый старт
60
58
 
61
- ```json
62
- {
63
- "$schema": "https://opencode.ai/config.json",
64
- "plugin": ["opencode-gemini-business@latest"],
65
- "provider": {
66
- "gemini-business": {
67
- "models": {
68
- "gemini-2.5-pro": {
69
- "name": "Gemini 2.5 Pro (Business)",
70
- "limit": { "context": 1048576, "output": 32768 },
71
- "modalities": { "input": ["text"], "output": ["text"] }
72
- },
73
- "gemini-2.5-flash": {
74
- "name": "Gemini 2.5 Flash (Business)",
75
- "limit": { "context": 1048576, "output": 8192 },
76
- "modalities": { "input": ["text"], "output": ["text"] }
77
- },
78
- "gemini-2.0-pro": {
79
- "name": "Gemini 2.0 Pro (Business)",
80
- "limit": { "context": 2097152, "output": 32768 },
81
- "modalities": { "input": ["text"], "output": ["text"] }
82
- },
83
- "gemini-1.5-pro": {
84
- "name": "Gemini 1.5 Pro (Business)",
85
- "limit": { "context": 2097152, "output": 8192 },
86
- "modalities": { "input": ["text"], "output": ["text"] }
87
- },
88
- "gemini-1.5-flash": {
89
- "name": "Gemini 1.5 Flash (Business)",
90
- "limit": { "context": 1048576, "output": 8192 },
91
- "modalities": { "input": ["text"], "output": ["text"] }
92
- }
93
- }
94
- }
95
- }
96
- }
97
- ```
59
+ ### Шаг 1: Настроить OpenCode
98
60
 
99
- **Or use short aliases:**
61
+ Добавьте в `~/.config/opencode/opencode.json`:
100
62
 
101
63
  ```json
102
64
  {
@@ -104,288 +66,213 @@ Add to `~/.config/opencode/opencode.json`:
104
66
  "plugin": ["opencode-gemini-business@latest"],
105
67
  "provider": {
106
68
  "gemini-business": {
69
+ "name": "Gemini Business",
70
+ "options": {
71
+ "baseURL": "https://business.gemini.google/v1",
72
+ "apiKey": "unused"
73
+ },
107
74
  "models": {
108
- "gemini-2.5-pro": { "name": "Gemini 2.5 Pro" },
109
75
  "gemini-2.5-flash": { "name": "Gemini 2.5 Flash" },
110
- "gemini-2.0-pro": { "name": "Gemini 2.0 Pro" },
111
- "gemini-1.5-pro": { "name": "Gemini 1.5 Pro" },
112
- "gemini-1.5-flash": { "name": "Gemini 1.5 Flash" }
76
+ "gemini-2.5-pro": { "name": "Gemini 2.5 Pro" },
77
+ "gemini-3-flash": { "name": "Gemini 3 Flash" },
78
+ "gemini-3.1-pro": { "name": "Gemini 3.1 Pro" },
79
+ "auto": { "name": "Авто-выбор" }
113
80
  }
114
81
  }
115
82
  }
116
83
  }
117
84
  ```
118
85
 
119
- ### 🔑 Extract Credentials
86
+ ### Шаг 2: Добавить аккаунт Gemini Business
120
87
 
121
- #### Method 1: Using Browser Extension (RECOMMENDED) ⚡
88
+ Установите CLI-инструмент:
122
89
 
123
- **Use the "Get cookies.txt LOCALLY" extension** to export cookies including HttpOnly:
124
-
125
- 1. **Install Extension**:
126
- - [Chrome Web Store: Get cookies.txt LOCALLY](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)
127
- - This extension can export **all cookies** including HttpOnly (which JavaScript cannot access)
128
-
129
- 2. **Login** to [Gemini Business](https://business.gemini.google)
130
-
131
- 3. **Click extension icon** → Export cookies for `business.gemini.google`
132
-
133
- 4. **Find in exported file**:
134
- - `__Secure-C_SES`: `CSE.xxx...`
135
- - `__Host-C_OSES`: `COS.xxx...`
136
-
137
- 5. **Get csesidx from URL**:
138
- - Look at your browser URL: `?csesidx=1370433092`
139
- - Copy the number after `csesidx=`
140
-
141
- 6. **Get team_id from URL**:
142
- - Look at your browser URL: `/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/`
143
- - Copy the UUID after `/cid/` - this is your `team_id`
144
- - Format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
145
-
146
- 7. **Add account** (see below)
147
-
148
- #### Method 2: Manual Extraction via DevTools
90
+ ```bash
91
+ npm install -g opencode-gemini-business
92
+ ```
149
93
 
150
- 1. **Login** to [Gemini Business](https://business.gemini.google)
94
+ Добавьте аккаунт (нужен Google Chrome или Chromium):
151
95
 
152
- 2. **Get team_id from URL**:
153
- - Look at your browser URL: `/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/`
154
- - Copy the UUID after `/cid/` - this is your `team_id`
96
+ ```bash
97
+ opencode-gemini-business add-account
98
+ ```
155
99
 
156
- 3. **Get csesidx from URL**:
157
- - Look at your browser URL: `?csesidx=1370433092`
158
- - Copy the number after `csesidx=`
100
+ Откроется окно Chrome войдите в аккаунт Gemini Business и отправьте любое сообщение в чат. Куки и учётные данные будут захвачены автоматически. Готово!
159
101
 
160
- 4. **Open DevTools** (F12) **Application** tab **Cookies** `https://business.gemini.google`
102
+ > **Примечание:** `add-account` автоматически создаёт auth-запись в `~/.local/share/opencode/auth.json`, поэтому запускать `opencode auth login` не нужно.
161
103
 
162
- 5. **Copy cookies**:
163
- - Find `__Secure-C_SES` → copy the value
164
- - Find `__Host-C_OSES` → copy the value
104
+ <details>
105
+ <summary>Ручной режим (для продвинутых)</summary>
165
106
 
166
- 6. **Add account**:
107
+ Если хотите указать данные вручную или Chrome не установлен:
167
108
 
168
109
  ```bash
169
- opencode-gemini-business add-account \
170
- "My Account" \
110
+ opencode-gemini-business add-account --manual \
111
+ "Мой аккаунт" \
171
112
  "e1f353e7-0291-44cf-9085-e0b6efd20e41" \
172
113
  "CSE.AXUaAj_MKeqeFLr_..." \
173
114
  "COS.AfQtEyCcW1aLwKb3..." \
174
115
  "1370433092"
175
116
  ```
176
117
 
177
- **Or use environment variables**:
118
+ | # | Аргумент | Описание |
119
+ |:-:|----------|----------|
120
+ | 1 | Имя аккаунта | Отображаемое имя аккаунта |
121
+ | 2 | `team_id` | UUID из URL `/cid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/` |
122
+ | 3 | `__Secure-C_SES` | Значение cookie (начинается с `CSE.`) |
123
+ | 4 | `__Host-C_OSES` | Значение cookie (начинается с `COS.`) |
124
+ | 5 | `csesidx` | Число из URL `?csesidx=...` |
125
+
126
+ Или через переменные окружения:
178
127
 
179
128
  ```bash
180
- export GEMINI_ACCOUNT_NAME="My Account"
129
+ export GEMINI_ACCOUNT_NAME="Мой аккаунт"
181
130
  export GEMINI_TEAM_ID="e1f353e7-0291-44cf-9085-e0b6efd20e41"
182
131
  export GEMINI_SECURE_C_SES="CSE.AXUaAj_MKeqeFLr_..."
183
132
  export GEMINI_HOST_C_OSES="COS.AfQtEyCcW1aLwKb3..."
184
133
  export GEMINI_CSESIDX="1370433092"
185
134
 
186
- opencode-gemini-business add-account
135
+ opencode-gemini-business add-account --manual
187
136
  ```
188
137
 
189
- ## 🚀 Usage
138
+ </details>
190
139
 
191
- ### Basic Usage
140
+ ### Шаг 3: Использовать
192
141
 
193
142
  ```bash
194
- # Use Pro model (best quality)
195
- opencode run "Analyze this codebase architecture" --model=gemini-pro
143
+ # Flash (быстрая)
144
+ opencode run --model=gemini-business/gemini-2.5-flash "Исправь баг"
196
145
 
197
- # Use Flash model (fastest)
198
- opencode run "Fix this syntax error" --model=gemini-flash
146
+ # Pro (лучшее качество)
147
+ opencode run --model=gemini-business/gemini-2.5-pro "Спроектируй архитектуру"
199
148
 
200
- # Use 2.0 Pro (largest context - 2M tokens)
201
- opencode run "Summarize these 100 files" --model=gemini-2-pro
149
+ # Модели нового поколения
150
+ opencode run --model=gemini-business/gemini-3-flash "Быстрая задача"
151
+ opencode run --model=gemini-business/gemini-3.1-pro "Продвинутые рассуждения"
152
+ opencode run --model=gemini-business/auto "Gemini выберет сам"
202
153
  ```
203
154
 
204
- ### Model-Specific Usage
155
+ Установить модель по умолчанию в `opencode.json`:
205
156
 
206
- ```bash
207
- # Complex reasoning tasks → gemini-2.5-pro
208
- opencode run "Design microservices architecture" --model=gemini-pro
157
+ ```json
158
+ {
159
+ "model": "gemini-business/gemini-2.5-flash"
160
+ }
161
+ ```
209
162
 
210
- # Quick simple tasks → gemini-2.5-flash
211
- opencode run "Write hello world" --model=gemini-flash
163
+ ---
164
+
165
+ ## 🔍 Извлечение учётных данных
212
166
 
213
- # Massive context gemini-2.0-pro (2M tokens)
214
- opencode run "Analyze entire codebase" --model=gemini-2-pro
167
+ ### Где найти каждое значение
215
168
 
216
- # Production workloads gemini-1.5-pro
217
- opencode run "Review this PR" --model=gemini-1.5-pro
169
+ Войдите в [business.gemini.google](https://business.gemini.google) и посмотрите URL:
218
170
 
219
- # Cost-effective → gemini-1.5-flash
220
- opencode run "Generate tests" --model=gemini-1.5-flash
171
+ ```
172
+ https://business.gemini.google/home/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/r/session/123?csesidx=1370433092
173
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^
174
+ team_id (UUID после /cid/) csesidx
221
175
  ```
222
176
 
223
- ### Set Default Model
177
+ ### Cookies
224
178
 
225
- ```bash
226
- # Set your preferred model as default
227
- export OPENCODE_MODEL=gemini-pro
228
- opencode run "Your task here"
229
- ```
179
+ **Способ 1: Расширение браузера (рекомендуется)**
180
+
181
+ 1. Установите [Get cookies.txt LOCALLY](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)
182
+ 2. Откройте `business.gemini.google` и экспортируйте cookies
183
+ 3. Найдите `__Secure-C_SES` (начинается с `CSE.`) и `__Host-C_OSES` (начинается с `COS.`)
184
+
185
+ **Способ 2: DevTools**
186
+
187
+ 1. Откройте DevTools (F12) → **Application** → **Cookies** → `https://business.gemini.google`
188
+ 2. Скопируйте значения `__Secure-C_SES` и `__Host-C_OSES`
189
+
190
+ ---
230
191
 
231
- ### 🛠️ Account Management
192
+ ## 🔧 Управление аккаунтами
232
193
 
233
194
  ```bash
234
- # List all accounts
195
+ # Список аккаунтов
235
196
  opencode-gemini-business list-accounts
236
197
 
237
- # Test specific account
198
+ # Тест подключения
238
199
  opencode-gemini-business test-account <account_id>
239
200
 
240
- # Remove account
201
+ # Удалить аккаунт
241
202
  opencode-gemini-business remove-account <account_id>
242
203
 
243
- # Show help
204
+ # Помощь
244
205
  opencode-gemini-business help
245
206
  ```
246
207
 
247
- ## 🔄 Rotation Strategies
248
-
249
- | Strategy | Behavior | Use Case |
250
- |----------|----------|----------|
251
- | `round-robin` | Cycles through accounts in order | Balanced usage across all accounts |
252
- | `least-used` | Selects account with oldest last_used timestamp | Minimize individual account usage |
253
- | `random` | Random probabilistic selection | Unpredictable load distribution |
254
-
255
- **Configure strategy** in OpenCode config:
256
-
257
- ```json
258
- {
259
- "$schema": "https://opencode.ai/config.json",
260
- "plugin": ["opencode-gemini-business@latest"],
261
- "provider": {
262
- "gemini-business": {
263
- "rotation_strategy": "least-used", // ← Change here
264
- "models": {
265
- "gemini-2.5-pro": {
266
- "name": "Gemini 2.5 Pro (Business)",
267
- "limit": { "context": 1048576, "output": 32768 },
268
- "modalities": { "input": ["text"], "output": ["text"] }
269
- }
270
- }
271
- }
272
- }
273
- }
274
- ```
208
+ ---
275
209
 
210
+ ## ⚙️ Стратегии ротации
276
211
 
277
- ## FAQ
212
+ | Стратегия | Поведение |
213
+ |-----------|-----------|
214
+ | `round-robin` (по умолчанию) | Циклический обход аккаунтов по порядку |
215
+ | `least-used` | Выбор наименее недавно использованного |
216
+ | `random` | Случайный выбор |
278
217
 
279
- <details>
280
- <summary><b>Q: How do I handle session expiration?</b></summary>
218
+ Настраивается в `~/.config/opencode/gemini-business-accounts.json` (создаётся автоматически при первом `add-account`).
281
219
 
282
- The plugin automatically refreshes sessions. Sessions are cached for 50 minutes and auto-refresh when needed. If you see "Session has expired" errors, the plugin will create a new session automatically.
220
+ ---
283
221
 
284
- </details>
222
+ ## 🛠️ Как это работает
285
223
 
286
- <details>
287
- <summary><b>Q: Which model should I use?</b></summary>
224
+ 1. Плагин регистрируется как auth-провайдер `gemini-business` в OpenCode
225
+ 2. При запросе `loader()` возвращает кастомную функцию `fetch()`
226
+ 3. Кастомный `fetch()` перехватывает запрос от `@ai-sdk/openai-compatible`
227
+ 4. Вместо вызова `baseURL/chat/completions` он:
228
+ - Выбирает аккаунт по стратегии ротации
229
+ - Получает XSRF-токен и создаёт JWT (HS256)
230
+ - Создаёт сессию через `widgetCreateSession`
231
+ - Отправляет запрос на `widgetStreamAssist`
232
+ - Конвертирует ответ в OpenAI-совместимый формат
233
+ 5. Поддерживает стриминг (SSE) и обычные ответы
288
234
 
289
- - **Complex tasks**: `gemini-2.5-pro` or `gemini-2.0-pro` for best reasoning
290
- - **Quick tasks**: `gemini-2.5-flash` or `gemini-1.5-flash` for speed
291
- - **Large contexts**: `gemini-2.0-pro` supports up to 2M tokens
235
+ ---
292
236
 
293
- </details>
237
+ ## ❓ FAQ
294
238
 
295
239
  <details>
296
- <summary><b>Q: How many accounts should I add?</b></summary>
240
+ <summary><b>В: Где найти team_id?</b></summary>
297
241
 
298
- Recommended: 2-5 accounts for optimal failover and load distribution. More accounts provide better redundancy but increase configuration complexity.
242
+ Посмотрите URL в браузере: `https://business.gemini.google/home/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/...`
299
243
 
244
+ UUID после `/cid/` — это ваш `team_id`.
300
245
  </details>
301
246
 
302
247
  <details>
303
- <summary><b>Q: Where do I find team_id?</b></summary>
304
-
305
- **Easy way:** Look at your browser URL when logged into Gemini Business:
306
- ```
307
- https://business.gemini.google/home/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/...
308
- ```
309
-
310
- The UUID after `/cid/` is your `team_id`. Format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
311
-
312
- This ID identifies your organization/team in Google Workspace and is required for all API requests.
248
+ <summary><b>В: Нужно ли запускать `opencode auth login`?</b></summary>
313
249
 
250
+ Нет. Команда `add-account` автоматически создаёт auth-запись в `~/.local/share/opencode/auth.json`. Если по какой-то причине запись не создалась, запустите `opencode auth login`, выберите **gemini-business** и введите любой ключ (например `unused`).
314
251
  </details>
315
252
 
316
253
  <details>
317
- <summary><b>Q: Is the credential extraction script safe?</b></summary>
318
-
319
- **YES, 100% safe!** The script:
320
- - ✅ Runs ONLY in your browser (locally)
321
- - ✅ Does NOT send data to external servers
322
- - ✅ Only reads cookies from business.gemini.google
323
- - ✅ Open source - you can review the code
324
-
325
- **Never** run scripts from untrusted sources. Only use from official repository.
254
+ <summary><b>В: Ошибки истечения сессии?</b></summary>
326
255
 
256
+ Плагин автоматически обновляет сессии (кешируются на 50 минут). Если ошибки не проходят — cookies могли истечь, извлеките их заново из браузера.
327
257
  </details>
328
258
 
329
259
  <details>
330
- <summary><b>Q: What's the difference from Google AI Studio?</b></summary>
331
-
332
- This plugin uses **Gemini Business API** (`business.gemini.google`), which is:
333
- - ✅ Enterprise/business accounts
334
- - ✅ Higher rate limits
335
- - ✅ Business-grade features
336
-
337
- **NOT** Google AI Studio (`aistudio.google.com`), which is:
338
- - ❌ Free/developer tier
339
- - ❌ Lower rate limits
340
- - ❌ Different API endpoints
260
+ <summary><b>В: Чем отличается от Google AI Studio?</b></summary>
341
261
 
262
+ Плагин использует **Gemini Business API** (`business.gemini.google`) — корпоративные аккаунты с высокими лимитами. НЕ Google AI Studio (`aistudio.google.com`).
342
263
  </details>
343
264
 
344
- ## 🔒 Security Best Practices
345
-
346
- ### Credential Safety
347
-
348
- ```
349
- ⚠️ CRITICAL: Keep your credentials PRIVATE!
350
-
351
- ✅ DO:
352
- - Store credentials only in ~/.config/opencode/gemini-business-accounts.json
353
- - Use environment variables for temporary access
354
- - Rotate credentials regularly
355
- - Add *.json to .gitignore
356
-
357
- ❌ DON'T:
358
- - Commit credentials to git repositories
359
- - Share credentials with others
360
- - Store credentials in plain text files
361
- - Use credentials in public environments
362
- ```
363
-
364
- ### Cookie Extraction Script Safety
365
-
366
- ```
367
- ✅ The extraction script is SAFE because:
368
- - Runs 100% locally in your browser
369
- - NO external network requests
370
- - NO data transmission to servers
371
- - Open source and reviewable
372
-
373
- ⚠️ Security Tips:
374
- - Only use from official repository
375
- - Review code before running (it's short!)
376
- - Never paste modified scripts
377
- - Check browser console for any warnings
378
- ```
379
-
380
- ## 📄 License
381
-
382
- MIT License - feel free to use this plugin!
265
+ ---
383
266
 
384
- ## 💬 Need Help?
267
+ ## 🔒 Безопасность
385
268
 
386
- - Check the [FAQ](#-faq) above for common questions
387
- - Test your accounts: `opencode-gemini-business test-account <account_id>`
388
- - Report issues: [GitHub Issues](https://github.com/izzzzzi/opencode-gemini-business/issues)
269
+ - Учётные данные хранятся локально в `~/.config/opencode/gemini-business-accounts.json`
270
+ - Не коммитьте credentials в git
271
+ - Регулярно обновляйте cookies
272
+ - Плагин не отправляет данные третьим сторонам
389
273
 
390
274
  ---
391
275
 
276
+ ## 📄 Лицензия
277
+
278
+ [MIT](LICENSE) © opencode-gemini-business contributors
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAMA;;GAEG;AACH,wBAAsB,GAAG,kBAkCxB"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAUA;;GAEG;AACH,wBAAsB,GAAG,kBAkCxB"}