opencode-gemini-business 2.0.1 → 2.0.2

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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.0.2](https://github.com/izzzzzi/opencode-gemini-business/compare/v2.0.1...v2.0.2) (2026-02-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add exports field to package.json for proper ES module resolution ([6835f96](https://github.com/izzzzzi/opencode-gemini-business/commit/6835f96252956b76b21a06ea541500c0048d1edf))
7
+
1
8
  ## [2.0.1](https://github.com/izzzzzi/opencode-gemini-business/compare/v2.0.0...v2.0.1) (2026-02-15)
2
9
 
3
10
 
package/README.md CHANGED
@@ -138,11 +138,10 @@ Add to `~/.config/opencode/opencode.json`:
138
138
  - Look at your browser URL: `?csesidx=1370433092`
139
139
  - Copy the number after `csesidx=`
140
140
 
141
- 6. **Get team_id from Network tab**:
142
- - F12 **Network** tab
143
- - Send a message to Gemini
144
- - Find request to `biz-discoveryengine.googleapis.com`
145
- - Click request → **Headers** → find `X-Goog-Team-Id: team_xxxxx`
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`
146
145
 
147
146
  7. **Add account** (see below)
148
147
 
@@ -150,37 +149,39 @@ Add to `~/.config/opencode/opencode.json`:
150
149
 
151
150
  1. **Login** to [Gemini Business](https://business.gemini.google)
152
151
 
153
- 2. **Open DevTools** (F12) → **Network tab**
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`
154
155
 
155
- 3. **Send a message** to Gemini or refresh the page
156
+ 3. **Get csesidx from URL**:
157
+ - Look at your browser URL: `?csesidx=1370433092`
158
+ - Copy the number after `csesidx=`
156
159
 
157
- 4. **Find any request** to `biz-discoveryengine.googleapis.com`
160
+ 4. **Open DevTools** (F12) → **Application** tab → **Cookies** → `https://business.gemini.google`
158
161
 
159
- 5. **Copy from request headers**:
160
- - `X-Goog-Team-Id` → this is your `team_id`
161
- - Cookie: `__Secure-c_ses` → copy the value
162
- - Cookie: `__Host-c_oses` → copy the value
163
- - Find `csesidx` in request payload or headers
162
+ 5. **Copy cookies**:
163
+ - Find `__Secure-C_SES` → copy the value
164
+ - Find `__Host-C_OSES` → copy the value
164
165
 
165
166
  6. **Add account**:
166
167
 
167
168
  ```bash
168
169
  opencode-gemini-business add-account \
169
170
  "My Account" \
170
- "team_abc123" \
171
- "secure_ses_cookie_value" \
172
- "host_oses_cookie_value" \
173
- "csesidx_value"
171
+ "e1f353e7-0291-44cf-9085-e0b6efd20e41" \
172
+ "CSE.AXUaAj_MKeqeFLr_..." \
173
+ "COS.AfQtEyCcW1aLwKb3..." \
174
+ "1370433092"
174
175
  ```
175
176
 
176
177
  **Or use environment variables**:
177
178
 
178
179
  ```bash
179
180
  export GEMINI_ACCOUNT_NAME="My Account"
180
- export GEMINI_TEAM_ID="team_abc123"
181
- export GEMINI_SECURE_C_SES="secure_ses_value"
182
- export GEMINI_HOST_C_OSES="host_oses_value"
183
- export GEMINI_CSESIDX="csesidx_value"
181
+ export GEMINI_TEAM_ID="e1f353e7-0291-44cf-9085-e0b6efd20e41"
182
+ export GEMINI_SECURE_C_SES="CSE.AXUaAj_MKeqeFLr_..."
183
+ export GEMINI_HOST_C_OSES="COS.AfQtEyCcW1aLwKb3..."
184
+ export GEMINI_CSESIDX="1370433092"
184
185
 
185
186
  opencode-gemini-business add-account
186
187
  ```
@@ -298,6 +299,20 @@ Recommended: 2-5 accounts for optimal failover and load distribution. More accou
298
299
 
299
300
  </details>
300
301
 
302
+ <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.
313
+
314
+ </details>
315
+
301
316
  <details>
302
317
  <summary><b>Q: Is the credential extraction script safe?</b></summary>
303
318
 
package/README.ru.md CHANGED
@@ -136,11 +136,10 @@ npx opencode-gemini-business@latest
136
136
  - Посмотрите на URL в браузере: `?csesidx=1370433092`
137
137
  - Скопируйте число после `csesidx=`
138
138
 
139
- 6. **Получите team_id из вкладки Network**:
140
- - F12 вкладка **Network**
141
- - Отправьте сообщение в Gemini
142
- - Найдите запрос к `biz-discoveryengine.googleapis.com`
143
- - Кликните на запрос → **Headers** → найдите `X-Goog-Team-Id: team_xxxxx`
139
+ 6. **Получите team_id из URL**:
140
+ - Посмотрите на URL в браузере: `/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/`
141
+ - Скопируйте UUID после `/cid/` - это ваш `team_id`
142
+ - Формат: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
144
143
 
145
144
  7. **Добавьте аккаунт** (см. ниже)
146
145
 
@@ -148,27 +147,29 @@ npx opencode-gemini-business@latest
148
147
 
149
148
  1. **Войдите** в [Gemini Business](https://business.gemini.google)
150
149
 
151
- 2. **Откройте DevTools** (F12) → вкладка **Network**
150
+ 2. **Получите team_id из URL**:
151
+ - Посмотрите на URL в браузере: `/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/`
152
+ - Скопируйте UUID после `/cid/` - это ваш `team_id`
152
153
 
153
- 3. **Отправьте сообщение** в Gemini или обновите страницу
154
+ 3. **Получите csesidx из URL**:
155
+ - Посмотрите на URL в браузере: `?csesidx=1370433092`
156
+ - Скопируйте число после `csesidx=`
154
157
 
155
- 4. **Найдите любой запрос** к `biz-discoveryengine.googleapis.com`
158
+ 4. **Откройте DevTools** (F12) вкладка **Application** → **Cookies** → `https://business.gemini.google`
156
159
 
157
- 5. **Скопируйте из заголовков запроса**:
158
- - `X-Goog-Team-Id` → это ваш `team_id`
159
- - Cookie: `__Secure-c_ses` → скопируйте значение
160
- - Cookie: `__Host-c_oses` → скопируйте значение
161
- - Найдите `csesidx` в теле запроса или заголовках
160
+ 5. **Скопируйте cookies**:
161
+ - Найдите `__Secure-C_SES` → скопируйте значение
162
+ - Найдите `__Host-C_OSES` → скопируйте значение
162
163
 
163
164
  6. **Добавьте аккаунт**:
164
165
 
165
166
  ```bash
166
167
  opencode-gemini-business add-account \
167
168
  "Основной аккаунт" \
168
- "team_abc123" \
169
- "secure_ses_cookie_value" \
170
- "host_oses_cookie_value" \
171
- "csesidx_value"
169
+ "e1f353e7-0291-44cf-9085-e0b6efd20e41" \
170
+ "CSE.AXUaAj_MKeqeFLr_..." \
171
+ "COS.AfQtEyCcW1aLwKb3..." \
172
+ "1370433092"
172
173
  ```
173
174
 
174
175
  ### 📝 Добавление аккаунта
@@ -176,20 +177,20 @@ opencode-gemini-business add-account \
176
177
  ```bash
177
178
  opencode-gemini-business add-account \
178
179
  "Основной аккаунт" \
179
- "team_abc123" \
180
- "secure_ses_cookie_value" \
181
- "host_oses_cookie_value" \
182
- "csesidx_value"
180
+ "e1f353e7-0291-44cf-9085-e0b6efd20e41" \
181
+ "CSE.AXUaAj_MKeqeFLr_..." \
182
+ "COS.AfQtEyCcW1aLwKb3..." \
183
+ "1370433092"
183
184
  ```
184
185
 
185
186
  **Или через переменные окружения**:
186
187
 
187
188
  ```bash
188
189
  export GEMINI_ACCOUNT_NAME="Основной аккаунт"
189
- export GEMINI_TEAM_ID="team_abc123"
190
- export GEMINI_SECURE_C_SES="secure_ses_value"
191
- export GEMINI_HOST_C_OSES="host_oses_value"
192
- export GEMINI_CSESIDX="csesidx_value"
190
+ export GEMINI_TEAM_ID="e1f353e7-0291-44cf-9085-e0b6efd20e41"
191
+ export GEMINI_SECURE_C_SES="CSE.AXUaAj_MKeqeFLr_..."
192
+ export GEMINI_HOST_C_OSES="COS.AfQtEyCcW1aLwKb3..."
193
+ export GEMINI_CSESIDX="1370433092"
193
194
 
194
195
  opencode-gemini-business add-account
195
196
  ```
@@ -307,6 +308,20 @@ opencode-gemini-business help
307
308
 
308
309
  </details>
309
310
 
311
+ <details>
312
+ <summary><b>В: Где найти team_id?</b></summary>
313
+
314
+ **Простой способ:** Посмотрите на URL в браузере, когда вы вошли в Gemini Business:
315
+ ```
316
+ https://business.gemini.google/home/cid/e1f353e7-0291-44cf-9085-e0b6efd20e41/...
317
+ ```
318
+
319
+ UUID после `/cid/` - это ваш `team_id`. Формат: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
320
+
321
+ Этот ID идентифицирует вашу организацию/команду в Google Workspace и требуется для всех API запросов.
322
+
323
+ </details>
324
+
310
325
  <details>
311
326
  <summary><b>В: Безопасен ли скрипт извлечения credentials?</b></summary>
312
327
 
package/package.json CHANGED
@@ -1,10 +1,16 @@
1
1
  {
2
2
  "name": "opencode-gemini-business",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "OpenCode plugin for multi-account Gemini Business pool with automatic rotation",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
8
14
  "bin": {
9
15
  "opencode-gemini-business": "./bin/cli.js"
10
16
  },