oh-my-opencode 2.1.7 → 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.ja.md +83 -16
- package/README.ko.md +83 -16
- package/README.md +91 -16
- package/dist/agents/utils.d.ts +1 -1
- package/dist/features/claude-code-session-state/index.d.ts +0 -2
- package/dist/features/claude-code-session-state/state.d.ts +0 -9
- package/dist/index.js +89 -148
- package/package.json +1 -1
- package/dist/features/claude-code-session-state/detector.d.ts +0 -1
- package/dist/features/claude-code-session-state/types.d.ts +0 -7
- package/dist/features/terminal/index.d.ts +0 -1
- package/dist/features/terminal/title.d.ts +0 -13
package/README.ja.md
CHANGED
|
@@ -150,15 +150,42 @@ Windows から Linux に初めて乗り換えた時のこと、自分の思い
|
|
|
150
150
|
### ステップ 0: セットアップについてユーザーに尋ねる
|
|
151
151
|
|
|
152
152
|
OpenCode は様々なモデルをサポートしており、当プラグインは様々な最先端 LLM の使用を提案しています。そのため、ユーザーに以下の質問をする必要があります:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
153
|
+
|
|
154
|
+
1. **Claude Pro/Max のサブスクリプションをお持ちですか?** お持ちでない場合、メインオーケストレーターモデルとして 'opencode/big-pickle' (GLM 4.6 として知られる) を使用することになります (非推奨)。
|
|
155
|
+
- ユーザーが**「はい」**と答えた場合、ToDo 追加: "ユーザーの Claude Pro/Max 認証設定"
|
|
156
|
+
- ユーザーが**「いいえ」**と答えた場合、`~/.config/opencode/oh-my-opencode.json` に以下を保存:
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"agents": {
|
|
160
|
+
"OmO": { "model": "opencode/big-pickle" },
|
|
161
|
+
"librarian": { "model": "opencode/big-pickle" }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
2. **ChatGPT のサブスクリプションをお持ちですか?** お持ちでない場合、oracle エージェントに 'anthropic/claude-opus-4-5' を使用することになります。
|
|
167
|
+
- ユーザーが**「はい」**と答えた場合、ToDo 追加: "ユーザーの ChatGPT 認証設定"
|
|
168
|
+
- ユーザーが**「いいえ」**と答えた場合、`oh-my-opencode.json` に以下をマージ:
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"agents": {
|
|
172
|
+
"oracle": { "model": "anthropic/claude-opus-4-5" }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
3. **Gemini モデルを統合しますか?** 統合しない場合、美しいデザインを享受できません。
|
|
178
|
+
- ユーザーが**「はい」**と答えた場合、ToDo 追加: "Google OAuth 設定"
|
|
179
|
+
- ユーザーが**「いいえ」**と答えた場合、`oh-my-opencode.json` に以下をマージ:
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"agents": {
|
|
183
|
+
"frontend-ui-ux-engineer": { "model": "anthropic/claude-opus-4-5" },
|
|
184
|
+
"document-writer": { "model": "anthropic/claude-opus-4-5" },
|
|
185
|
+
"multimodal-looker": { "model": "anthropic/claude-opus-4-5" }
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
162
189
|
|
|
163
190
|
### ステップ 1: OpenCode インストール確認
|
|
164
191
|
|
|
@@ -223,25 +250,52 @@ opencode auth login
|
|
|
223
250
|
|
|
224
251
|
#### 4.2 Google Gemini (Antigravity OAuth)
|
|
225
252
|
|
|
226
|
-
|
|
253
|
+
まず、opencode-antigravity-auth プラグインを追加します:
|
|
227
254
|
|
|
228
255
|
```json
|
|
229
256
|
{
|
|
230
|
-
"
|
|
257
|
+
"plugin": [
|
|
258
|
+
"oh-my-opencode",
|
|
259
|
+
"opencode-antigravity-auth@1.1.2"
|
|
260
|
+
]
|
|
231
261
|
}
|
|
232
262
|
```
|
|
233
263
|
|
|
264
|
+
#### 4.2.1 モデル設定
|
|
265
|
+
|
|
266
|
+
`opencode.json` に完全なモデル設定も構成する必要があります。
|
|
267
|
+
[opencode-antigravity-auth ドキュメント](https://github.com/NoeFabris/opencode-antigravity-auth)を読み、README から provider/models 設定をコピーして、ユーザーの既存のセットアップを壊さないよう慎重にマージしてください。
|
|
268
|
+
|
|
269
|
+
#### 4.2.2 oh-my-opencode エージェントモデルのオーバーライド
|
|
270
|
+
|
|
271
|
+
`opencode-antigravity-auth` プラグインは内蔵 Google auth と異なるモデル名を使用します。`oh-my-opencode.json`(または `.opencode/oh-my-opencode.json`)でエージェントモデルをオーバーライドし、内蔵 `google_auth` を無効化してください:
|
|
272
|
+
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
"google_auth": false,
|
|
276
|
+
"agents": {
|
|
277
|
+
"frontend-ui-ux-engineer": { "model": "google/gemini-3-pro-high" },
|
|
278
|
+
"document-writer": { "model": "google/gemini-3-pro-high" },
|
|
279
|
+
"multimodal-looker": { "model": "google/gemini-2.5-flash" }
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**利用可能なモデル名**: `google/gemini-3-pro-high`, `google/gemini-3-pro-medium`, `google/gemini-3-pro-low`, `google/gemini-2.5-flash`, `google/gemini-2.5-flash-lite`, `google/claude-sonnet-4-5`, `google/claude-sonnet-4-5-thinking`, `google/claude-opus-4-5-thinking`, `google/gpt-oss-120b-medium`
|
|
285
|
+
|
|
234
286
|
その後、認証を行います:
|
|
235
287
|
|
|
236
288
|
```bash
|
|
237
289
|
opencode auth login
|
|
238
290
|
# Provider: Google を選択
|
|
239
291
|
# Login method: OAuth with Google (Antigravity) を選択
|
|
240
|
-
#
|
|
241
|
-
#
|
|
292
|
+
# ブラウザでサインイン完了(自動検出)
|
|
293
|
+
# オプション:マルチアカウントロードバランシング用に追加の Google アカウントを登録
|
|
242
294
|
# 成功を確認し、ユーザーに報告
|
|
243
295
|
```
|
|
244
296
|
|
|
297
|
+
**マルチアカウントロードバランシング**: プラグインは最大10個の Google アカウントをサポートします。1つのアカウントがレートリミットに達すると、自動的に次のアカウントに切り替わります。
|
|
298
|
+
|
|
245
299
|
#### 4.3 OpenAI (ChatGPT Plus/Pro)
|
|
246
300
|
|
|
247
301
|
まず、opencode-openai-codex-auth プラグインを追加します:
|
|
@@ -559,15 +613,28 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
|
|
|
559
613
|
|
|
560
614
|
### Google Auth
|
|
561
615
|
|
|
562
|
-
|
|
616
|
+
**推奨**: 外部の [`opencode-antigravity-auth`](https://github.com/NoeFabris/opencode-antigravity-auth) プラグインを使用してください。マルチアカウントロードバランシング、より多くのモデル(Antigravity 経由の Claude を含む)、活発なメンテナンスを提供します。[インストール > Google Gemini](#42-google-gemini-antigravity-oauth) を参照。
|
|
617
|
+
|
|
618
|
+
`opencode-antigravity-auth` 使用時は内蔵 auth を無効化し、`oh-my-opencode.json` でエージェントモデルをオーバーライドしてください:
|
|
563
619
|
|
|
564
620
|
```json
|
|
565
621
|
{
|
|
566
|
-
"google_auth":
|
|
622
|
+
"google_auth": false,
|
|
623
|
+
"agents": {
|
|
624
|
+
"frontend-ui-ux-engineer": { "model": "google/gemini-3-pro-high" },
|
|
625
|
+
"document-writer": { "model": "google/gemini-3-pro-high" },
|
|
626
|
+
"multimodal-looker": { "model": "google/gemini-2.5-flash" }
|
|
627
|
+
}
|
|
567
628
|
}
|
|
568
629
|
```
|
|
569
630
|
|
|
570
|
-
|
|
631
|
+
**代替案**: 内蔵 Antigravity OAuth を有効化(単一アカウント、Gemini モデルのみ):
|
|
632
|
+
|
|
633
|
+
```json
|
|
634
|
+
{
|
|
635
|
+
"google_auth": true
|
|
636
|
+
}
|
|
637
|
+
```
|
|
571
638
|
|
|
572
639
|
### Agents
|
|
573
640
|
|
package/README.ko.md
CHANGED
|
@@ -147,15 +147,42 @@ OpenCode 가 낭만이 사라진것같은 오늘날의 시대에, 당신에게
|
|
|
147
147
|
### 0단계: 사용자에게 설정에 대해 물어보세요.
|
|
148
148
|
|
|
149
149
|
OpenCode는 다양한 모델을 지원하며, 이 플러그인은 다양한 프론티어 LLM 사용을 제안합니다. 따라서 사용자에게 다음 질문을 해야 합니다:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
150
|
+
|
|
151
|
+
1. **Claude Pro/Max 구독이 있으신가요?** 그렇지 않다면 메인 오케스트레이터 모델로 'opencode/big-pickle'(GLM 4.6으로 알려짐)을 사용하게 됩니다 (권장하지 않음).
|
|
152
|
+
- 사용자가 **'예'**라고 답하면, 할 일 추가: "사용자 Claude Pro/Max 인증 설정"
|
|
153
|
+
- 사용자가 **'아니오'**라고 답하면, `~/.config/opencode/oh-my-opencode.json`에 다음을 저장:
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"agents": {
|
|
157
|
+
"OmO": { "model": "opencode/big-pickle" },
|
|
158
|
+
"librarian": { "model": "opencode/big-pickle" }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
2. **ChatGPT 구독이 있으신가요?** 그렇지 않다면 oracle 에이전트에 'anthropic/claude-opus-4-5'를 사용하게 됩니다.
|
|
164
|
+
- 사용자가 **'예'**라고 답하면, 할 일 추가: "사용자 ChatGPT 인증 설정"
|
|
165
|
+
- 사용자가 **'아니오'**라고 답하면, `oh-my-opencode.json`에 다음을 병합:
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"agents": {
|
|
169
|
+
"oracle": { "model": "anthropic/claude-opus-4-5" }
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
3. **Gemini 모델을 통합하시겠습니까?** 그렇지 않다면 아름다운 디자인을 즐길 수 없습니다.
|
|
175
|
+
- 사용자가 **'예'**라고 답하면, 할 일 추가: "Google OAuth 설정"
|
|
176
|
+
- 사용자가 **'아니오'**라고 답하면, `oh-my-opencode.json`에 다음을 병합:
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"agents": {
|
|
180
|
+
"frontend-ui-ux-engineer": { "model": "anthropic/claude-opus-4-5" },
|
|
181
|
+
"document-writer": { "model": "anthropic/claude-opus-4-5" },
|
|
182
|
+
"multimodal-looker": { "model": "anthropic/claude-opus-4-5" }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
159
186
|
|
|
160
187
|
### 1단계: OpenCode 설치 확인
|
|
161
188
|
|
|
@@ -220,25 +247,52 @@ opencode auth login
|
|
|
220
247
|
|
|
221
248
|
#### 4.2 Google Gemini (Antigravity OAuth)
|
|
222
249
|
|
|
223
|
-
먼저
|
|
250
|
+
먼저 opencode-antigravity-auth 플러그인 추가:
|
|
224
251
|
|
|
225
252
|
```json
|
|
226
253
|
{
|
|
227
|
-
"
|
|
254
|
+
"plugin": [
|
|
255
|
+
"oh-my-opencode",
|
|
256
|
+
"opencode-antigravity-auth@1.1.2"
|
|
257
|
+
]
|
|
228
258
|
}
|
|
229
259
|
```
|
|
230
260
|
|
|
261
|
+
#### 4.2.1 모델 설정
|
|
262
|
+
|
|
263
|
+
`opencode.json`에 전체 모델 설정도 구성해야 합니다.
|
|
264
|
+
[opencode-antigravity-auth 문서](https://github.com/NoeFabris/opencode-antigravity-auth)를 읽고, README에서 provider/models 설정을 복사하여, 사용자의 기존 셋업에 영향을 주지 않도록 신중하게 통합하세요.
|
|
265
|
+
|
|
266
|
+
#### 4.2.2 oh-my-opencode 에이전트 모델 오버라이드
|
|
267
|
+
|
|
268
|
+
`opencode-antigravity-auth` 플러그인은 내장 Google auth와 다른 모델 이름을 사용합니다. `oh-my-opencode.json` (또는 `.opencode/oh-my-opencode.json`)에서 에이전트 모델을 오버라이드하고, 내장 `google_auth`를 비활성화하세요:
|
|
269
|
+
|
|
270
|
+
```json
|
|
271
|
+
{
|
|
272
|
+
"google_auth": false,
|
|
273
|
+
"agents": {
|
|
274
|
+
"frontend-ui-ux-engineer": { "model": "google/gemini-3-pro-high" },
|
|
275
|
+
"document-writer": { "model": "google/gemini-3-pro-high" },
|
|
276
|
+
"multimodal-looker": { "model": "google/gemini-2.5-flash" }
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**사용 가능한 모델 이름**: `google/gemini-3-pro-high`, `google/gemini-3-pro-medium`, `google/gemini-3-pro-low`, `google/gemini-2.5-flash`, `google/gemini-2.5-flash-lite`, `google/claude-sonnet-4-5`, `google/claude-sonnet-4-5-thinking`, `google/claude-opus-4-5-thinking`, `google/gpt-oss-120b-medium`
|
|
282
|
+
|
|
231
283
|
그 후 인증:
|
|
232
284
|
|
|
233
285
|
```bash
|
|
234
286
|
opencode auth login
|
|
235
287
|
# Provider: Google 선택
|
|
236
288
|
# Login method: OAuth with Google (Antigravity) 선택
|
|
237
|
-
#
|
|
238
|
-
#
|
|
289
|
+
# 브라우저에서 로그인 완료 (자동 감지)
|
|
290
|
+
# 선택사항: 멀티 계정 로드밸런싱을 위해 추가 Google 계정 등록
|
|
239
291
|
# 진짜 완료되었음을 검증하고 사용자에게 안내
|
|
240
292
|
```
|
|
241
293
|
|
|
294
|
+
**멀티 계정 로드밸런싱**: 플러그인은 최대 10개의 Google 계정을 지원합니다. 한 계정이 레이트 리밋에 걸리면 자동으로 다음 계정으로 전환됩니다.
|
|
295
|
+
|
|
242
296
|
#### 4.3 OpenAI (ChatGPT Plus/Pro)
|
|
243
297
|
|
|
244
298
|
먼저 opencode-openai-codex-auth 플러그인 추가:
|
|
@@ -553,15 +607,28 @@ Schema 자동 완성이 지원됩니다:
|
|
|
553
607
|
|
|
554
608
|
### Google Auth
|
|
555
609
|
|
|
556
|
-
|
|
610
|
+
**권장**: 외부 [`opencode-antigravity-auth`](https://github.com/NoeFabris/opencode-antigravity-auth) 플러그인을 사용하세요. 멀티 계정 로드밸런싱, 더 많은 모델(Antigravity를 통한 Claude 포함), 활발한 유지보수를 제공합니다. [설치 > Google Gemini](#42-google-gemini-antigravity-oauth) 참조.
|
|
611
|
+
|
|
612
|
+
`opencode-antigravity-auth` 사용 시 내장 auth를 비활성화하고 `oh-my-opencode.json`에서 에이전트 모델을 오버라이드하세요:
|
|
557
613
|
|
|
558
614
|
```json
|
|
559
615
|
{
|
|
560
|
-
"google_auth":
|
|
616
|
+
"google_auth": false,
|
|
617
|
+
"agents": {
|
|
618
|
+
"frontend-ui-ux-engineer": { "model": "google/gemini-3-pro-high" },
|
|
619
|
+
"document-writer": { "model": "google/gemini-3-pro-high" },
|
|
620
|
+
"multimodal-looker": { "model": "google/gemini-2.5-flash" }
|
|
621
|
+
}
|
|
561
622
|
}
|
|
562
623
|
```
|
|
563
624
|
|
|
564
|
-
|
|
625
|
+
**대안**: 내장 Antigravity OAuth 활성화 (단일 계정, Gemini 모델만):
|
|
626
|
+
|
|
627
|
+
```json
|
|
628
|
+
{
|
|
629
|
+
"google_auth": true
|
|
630
|
+
}
|
|
631
|
+
```
|
|
565
632
|
|
|
566
633
|
### Agents
|
|
567
634
|
|
package/README.md
CHANGED
|
@@ -172,15 +172,42 @@ follow these steps:
|
|
|
172
172
|
### Step 0: Ask user about the setup.
|
|
173
173
|
|
|
174
174
|
Since OpenCode Supports various models, and our plugin suggests various frontier LLMs. Thus, you must ask user, following questions:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
|
|
176
|
+
1. **Do you have a Claude Pro/Max Subscription?** Otherwise, we'll use 'opencode/big-pickle' (known for GLM 4.6) as a main orchestrator model (not recommended)
|
|
177
|
+
- If user said **yes**, add ToDo: "Setup user Claude Pro/Max Auth"
|
|
178
|
+
- If user said **no**, merge the following to `~/.config/opencode/oh-my-opencode.json`:
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"agents": {
|
|
182
|
+
"OmO": { "model": "opencode/big-pickle" },
|
|
183
|
+
"librarian": { "model": "opencode/big-pickle" }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
2. **Do you have a ChatGPT Subscription?** Otherwise, we'll use 'anthropic/claude-opus-4-5' with 32k thinking option for oracle agent.
|
|
189
|
+
- If user said **yes**, add ToDo: "Setup user ChatGPT Auth"
|
|
190
|
+
- If user said **no**, merge the following to `oh-my-opencode.json`:
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"agents": {
|
|
194
|
+
"oracle": { "model": "anthropic/claude-opus-4-5" }
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
3. **Will you integrate Gemini models?** Otherwise, you cannot enjoy the beautiful design.
|
|
200
|
+
- If user said **yes**, add ToDo: "Setup Google OAuth"
|
|
201
|
+
- If user said **no**, merge the following to `oh-my-opencode.json`:
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"agents": {
|
|
205
|
+
"frontend-ui-ux-engineer": { "model": "anthropic/claude-opus-4-5" },
|
|
206
|
+
"document-writer": { "model": "anthropic/claude-opus-4-5" },
|
|
207
|
+
"multimodal-looker": { "model": "anthropic/claude-opus-4-5" }
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
184
211
|
|
|
185
212
|
### Step 1: Install OpenCode, if not
|
|
186
213
|
|
|
@@ -249,17 +276,52 @@ opencode auth login
|
|
|
249
276
|
|
|
250
277
|
#### Google Gemini (Antigravity OAuth)
|
|
251
278
|
|
|
279
|
+
First, add the opencode-antigravity-auth plugin:
|
|
280
|
+
|
|
281
|
+
```json
|
|
282
|
+
{
|
|
283
|
+
"plugin": [
|
|
284
|
+
"oh-my-opencode",
|
|
285
|
+
"opencode-antigravity-auth@1.1.2"
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
##### Model Configuration
|
|
291
|
+
|
|
292
|
+
You'll also need full model settings in `opencode.json`.
|
|
293
|
+
Read the [opencode-antigravity-auth documentation](https://github.com/NoeFabris/opencode-antigravity-auth), copy provider/models config from the README, and merge carefully to avoid breaking the user's existing setup.
|
|
294
|
+
|
|
295
|
+
##### oh-my-opencode Agent Model Override
|
|
296
|
+
|
|
297
|
+
The `opencode-antigravity-auth` plugin uses different model names than the built-in Google auth. Override the agent models in `oh-my-opencode.json` (or `.opencode/oh-my-opencode.json`) and disable the built-in `google_auth`:
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"google_auth": false,
|
|
302
|
+
"agents": {
|
|
303
|
+
"frontend-ui-ux-engineer": { "model": "google/gemini-3-pro-high" },
|
|
304
|
+
"document-writer": { "model": "google/gemini-3-pro-high" },
|
|
305
|
+
"multimodal-looker": { "model": "google/gemini-2.5-flash" }
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Available model names**: `google/gemini-3-pro-high`, `google/gemini-3-pro-medium`, `google/gemini-3-pro-low`, `google/gemini-2.5-flash`, `google/gemini-2.5-flash-lite`, `google/claude-sonnet-4-5`, `google/claude-sonnet-4-5-thinking`, `google/claude-opus-4-5-thinking`, `google/gpt-oss-120b-medium`
|
|
311
|
+
|
|
252
312
|
Then authenticate:
|
|
253
313
|
|
|
254
314
|
```bash
|
|
255
315
|
opencode auth login
|
|
256
|
-
# Interactive Terminal:
|
|
257
|
-
# Interactive Terminal:
|
|
258
|
-
#
|
|
259
|
-
#
|
|
316
|
+
# Interactive Terminal: Provider: Select Google
|
|
317
|
+
# Interactive Terminal: Login method: Select OAuth with Google (Antigravity)
|
|
318
|
+
# Complete sign-in in browser (auto-detected)
|
|
319
|
+
# Optional: Add more Google accounts for multi-account load balancing
|
|
260
320
|
# Verify success and confirm with user
|
|
261
321
|
```
|
|
262
322
|
|
|
323
|
+
**Multi-Account Load Balancing**: The plugin supports up to 10 Google accounts. When one account hits rate limits, it automatically switches to the next available account.
|
|
324
|
+
|
|
263
325
|
#### OpenAI (ChatGPT Plus/Pro)
|
|
264
326
|
|
|
265
327
|
First, add the opencode-openai-codex-auth plugin:
|
|
@@ -574,15 +636,28 @@ Schema autocomplete supported:
|
|
|
574
636
|
|
|
575
637
|
### Google Auth
|
|
576
638
|
|
|
577
|
-
|
|
639
|
+
**Recommended**: Use the external [`opencode-antigravity-auth`](https://github.com/NoeFabris/opencode-antigravity-auth) plugin. It provides multi-account load balancing, more models (including Claude via Antigravity), and active maintenance. See [Installation > Google Gemini](#google-gemini-antigravity-oauth).
|
|
640
|
+
|
|
641
|
+
When using `opencode-antigravity-auth`, disable the built-in auth and override agent models in `oh-my-opencode.json`:
|
|
578
642
|
|
|
579
643
|
```json
|
|
580
644
|
{
|
|
581
|
-
"google_auth":
|
|
645
|
+
"google_auth": false,
|
|
646
|
+
"agents": {
|
|
647
|
+
"frontend-ui-ux-engineer": { "model": "google/gemini-3-pro-high" },
|
|
648
|
+
"document-writer": { "model": "google/gemini-3-pro-high" },
|
|
649
|
+
"multimodal-looker": { "model": "google/gemini-2.5-flash" }
|
|
650
|
+
}
|
|
582
651
|
}
|
|
583
652
|
```
|
|
584
653
|
|
|
585
|
-
|
|
654
|
+
**Alternative**: Enable built-in Antigravity OAuth (single account, Gemini models only):
|
|
655
|
+
|
|
656
|
+
```json
|
|
657
|
+
{
|
|
658
|
+
"google_auth": true
|
|
659
|
+
}
|
|
660
|
+
```
|
|
586
661
|
|
|
587
662
|
### Agents
|
|
588
663
|
|
package/dist/agents/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
2
|
import type { BuiltinAgentName, AgentOverrides } from "./types";
|
|
3
3
|
export declare function createEnvContext(directory: string): string;
|
|
4
|
-
export declare function createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides, directory?: string): Record<string, AgentConfig>;
|
|
4
|
+
export declare function createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string): Record<string, AgentConfig>;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import type { SessionErrorState, SessionInterruptState } from "./types";
|
|
2
|
-
export declare const sessionErrorState: Map<string, SessionErrorState>;
|
|
3
|
-
export declare const sessionInterruptState: Map<string, SessionInterruptState>;
|
|
4
1
|
export declare const subagentSessions: Set<string>;
|
|
5
|
-
export declare const sessionFirstMessageProcessed: Set<string>;
|
|
6
|
-
export declare let currentSessionID: string | undefined;
|
|
7
|
-
export declare let currentSessionTitle: string | undefined;
|
|
8
2
|
export declare let mainSessionID: string | undefined;
|
|
9
|
-
export declare function setCurrentSession(id: string | undefined, title: string | undefined): void;
|
|
10
3
|
export declare function setMainSession(id: string | undefined): void;
|
|
11
|
-
export declare function getCurrentSessionID(): string | undefined;
|
|
12
|
-
export declare function getCurrentSessionTitle(): string | undefined;
|
|
13
4
|
export declare function getMainSessionID(): string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1783,14 +1783,43 @@ Briefly announce "Consulting Oracle for [reason]" before invocation.
|
|
|
1783
1783
|
</Oracle_Usage>
|
|
1784
1784
|
|
|
1785
1785
|
<Task_Management>
|
|
1786
|
-
## Todo Management
|
|
1786
|
+
## Todo Management (CRITICAL)
|
|
1787
1787
|
|
|
1788
|
-
|
|
1788
|
+
**DEFAULT BEHAVIOR**: Create todos BEFORE starting any non-trivial task. This is your PRIMARY coordination mechanism.
|
|
1789
1789
|
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1790
|
+
### When to Create Todos (MANDATORY)
|
|
1791
|
+
|
|
1792
|
+
| Trigger | Action |
|
|
1793
|
+
|---------|--------|
|
|
1794
|
+
| Multi-step task (2+ steps) | ALWAYS create todos first |
|
|
1795
|
+
| Uncertain scope | ALWAYS (todos clarify thinking) |
|
|
1796
|
+
| User request with multiple items | ALWAYS |
|
|
1797
|
+
| Complex single task | Create todos to break down |
|
|
1798
|
+
|
|
1799
|
+
### Workflow (NON-NEGOTIABLE)
|
|
1800
|
+
|
|
1801
|
+
1. **IMMEDIATELY on receiving request**: \`todowrite\` to plan atomic steps
|
|
1802
|
+
2. **Before starting each step**: Mark \`in_progress\` (only ONE at a time)
|
|
1803
|
+
3. **After completing each step**: Mark \`completed\` IMMEDIATELY (NEVER batch)
|
|
1804
|
+
4. **If scope changes**: Update todos before proceeding
|
|
1805
|
+
|
|
1806
|
+
### Why This Is Non-Negotiable
|
|
1807
|
+
|
|
1808
|
+
- **User visibility**: User sees real-time progress, not a black box
|
|
1809
|
+
- **Prevents drift**: Todos anchor you to the actual request
|
|
1810
|
+
- **Recovery**: If interrupted, todos enable seamless continuation
|
|
1811
|
+
- **Accountability**: Each todo = explicit commitment
|
|
1812
|
+
|
|
1813
|
+
### Anti-Patterns (BLOCKING)
|
|
1814
|
+
|
|
1815
|
+
| Violation | Why It's Bad |
|
|
1816
|
+
|-----------|--------------|
|
|
1817
|
+
| Skipping todos on multi-step tasks | User has no visibility, steps get forgotten |
|
|
1818
|
+
| Batch-completing multiple todos | Defeats real-time tracking purpose |
|
|
1819
|
+
| Proceeding without marking in_progress | No indication of what you're working on |
|
|
1820
|
+
| Finishing without completing todos | Task appears incomplete to user |
|
|
1821
|
+
|
|
1822
|
+
**FAILURE TO USE TODOS ON NON-TRIVIAL TASKS = INCOMPLETE WORK.**
|
|
1794
1823
|
|
|
1795
1824
|
### Clarification Protocol (when asking):
|
|
1796
1825
|
|
|
@@ -3137,7 +3166,7 @@ Here is some useful information about the environment you are running in:
|
|
|
3137
3166
|
function mergeAgentConfig(base, override) {
|
|
3138
3167
|
return deepMerge(base, override);
|
|
3139
3168
|
}
|
|
3140
|
-
function createBuiltinAgents(disabledAgents = [], agentOverrides = {}, directory) {
|
|
3169
|
+
function createBuiltinAgents(disabledAgents = [], agentOverrides = {}, directory, systemDefaultModel) {
|
|
3141
3170
|
const result = {};
|
|
3142
3171
|
for (const [name, config] of Object.entries(allBuiltinAgents)) {
|
|
3143
3172
|
const agentName = name;
|
|
@@ -3153,6 +3182,12 @@ function createBuiltinAgents(disabledAgents = [], agentOverrides = {}, directory
|
|
|
3153
3182
|
};
|
|
3154
3183
|
}
|
|
3155
3184
|
const override = agentOverrides[agentName];
|
|
3185
|
+
if (agentName === "OmO" && systemDefaultModel && !override?.model) {
|
|
3186
|
+
finalConfig = {
|
|
3187
|
+
...finalConfig,
|
|
3188
|
+
model: systemDefaultModel
|
|
3189
|
+
};
|
|
3190
|
+
}
|
|
3156
3191
|
if (override) {
|
|
3157
3192
|
result[name] = mergeAgentConfig(finalConfig, override);
|
|
3158
3193
|
} else {
|
|
@@ -3534,24 +3569,13 @@ ${CONTEXT_REMINDER}
|
|
|
3534
3569
|
}
|
|
3535
3570
|
// src/hooks/session-notification.ts
|
|
3536
3571
|
import { platform } from "os";
|
|
3572
|
+
|
|
3537
3573
|
// src/features/claude-code-session-state/state.ts
|
|
3538
|
-
var sessionErrorState = new Map;
|
|
3539
|
-
var sessionInterruptState = new Map;
|
|
3540
3574
|
var subagentSessions = new Set;
|
|
3541
|
-
var sessionFirstMessageProcessed = new Set;
|
|
3542
|
-
var currentSessionID;
|
|
3543
|
-
var currentSessionTitle;
|
|
3544
3575
|
var mainSessionID;
|
|
3545
|
-
function setCurrentSession(id, title) {
|
|
3546
|
-
currentSessionID = id;
|
|
3547
|
-
currentSessionTitle = title;
|
|
3548
|
-
}
|
|
3549
3576
|
function setMainSession(id) {
|
|
3550
3577
|
mainSessionID = id;
|
|
3551
3578
|
}
|
|
3552
|
-
function getCurrentSessionTitle() {
|
|
3553
|
-
return currentSessionTitle;
|
|
3554
|
-
}
|
|
3555
3579
|
function getMainSessionID() {
|
|
3556
3580
|
return mainSessionID;
|
|
3557
3581
|
}
|
|
@@ -6598,13 +6622,13 @@ setInterval(() => {
|
|
|
6598
6622
|
}, CACHE_TTL);
|
|
6599
6623
|
|
|
6600
6624
|
// src/hooks/claude-code-hooks/index.ts
|
|
6601
|
-
var
|
|
6602
|
-
var
|
|
6603
|
-
var
|
|
6625
|
+
var sessionFirstMessageProcessed = new Set;
|
|
6626
|
+
var sessionErrorState = new Map;
|
|
6627
|
+
var sessionInterruptState = new Map;
|
|
6604
6628
|
function createClaudeCodeHooksHook(ctx, config = {}) {
|
|
6605
6629
|
return {
|
|
6606
6630
|
"chat.message": async (input, output) => {
|
|
6607
|
-
const interruptState =
|
|
6631
|
+
const interruptState = sessionInterruptState.get(input.sessionID);
|
|
6608
6632
|
if (interruptState?.interrupted) {
|
|
6609
6633
|
log("chat.message hook skipped - session interrupted", { sessionID: input.sessionID });
|
|
6610
6634
|
return;
|
|
@@ -6619,7 +6643,7 @@ function createClaudeCodeHooksHook(ctx, config = {}) {
|
|
|
6619
6643
|
type: p.type,
|
|
6620
6644
|
text: p.text
|
|
6621
6645
|
}));
|
|
6622
|
-
const interruptStateBeforeHooks =
|
|
6646
|
+
const interruptStateBeforeHooks = sessionInterruptState.get(input.sessionID);
|
|
6623
6647
|
if (interruptStateBeforeHooks?.interrupted) {
|
|
6624
6648
|
log("chat.message hooks skipped - interrupted during preparation", { sessionID: input.sessionID });
|
|
6625
6649
|
return;
|
|
@@ -6631,8 +6655,8 @@ function createClaudeCodeHooksHook(ctx, config = {}) {
|
|
|
6631
6655
|
});
|
|
6632
6656
|
parentSessionId = sessionInfo.data?.parentID;
|
|
6633
6657
|
} catch {}
|
|
6634
|
-
const isFirstMessage = !
|
|
6635
|
-
|
|
6658
|
+
const isFirstMessage = !sessionFirstMessageProcessed.has(input.sessionID);
|
|
6659
|
+
sessionFirstMessageProcessed.add(input.sessionID);
|
|
6636
6660
|
if (isFirstMessage) {
|
|
6637
6661
|
log("Skipping UserPromptSubmit hooks on first message for title generation", { sessionID: input.sessionID });
|
|
6638
6662
|
return;
|
|
@@ -6649,7 +6673,7 @@ function createClaudeCodeHooksHook(ctx, config = {}) {
|
|
|
6649
6673
|
if (result.block) {
|
|
6650
6674
|
throw new Error(result.reason ?? "Hook blocked the prompt");
|
|
6651
6675
|
}
|
|
6652
|
-
const interruptStateAfterHooks =
|
|
6676
|
+
const interruptStateAfterHooks = sessionInterruptState.get(input.sessionID);
|
|
6653
6677
|
if (interruptStateAfterHooks?.interrupted) {
|
|
6654
6678
|
log("chat.message injection skipped - interrupted during hooks", { sessionID: input.sessionID });
|
|
6655
6679
|
return;
|
|
@@ -6769,7 +6793,7 @@ ${result.message}`;
|
|
|
6769
6793
|
const props = event.properties;
|
|
6770
6794
|
const sessionID = props?.sessionID;
|
|
6771
6795
|
if (sessionID) {
|
|
6772
|
-
|
|
6796
|
+
sessionErrorState.set(sessionID, {
|
|
6773
6797
|
hasError: true,
|
|
6774
6798
|
errorMessage: String(props?.error ?? "Unknown error")
|
|
6775
6799
|
});
|
|
@@ -6780,9 +6804,9 @@ ${result.message}`;
|
|
|
6780
6804
|
const props = event.properties;
|
|
6781
6805
|
const sessionInfo = props?.info;
|
|
6782
6806
|
if (sessionInfo?.id) {
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6807
|
+
sessionErrorState.delete(sessionInfo.id);
|
|
6808
|
+
sessionInterruptState.delete(sessionInfo.id);
|
|
6809
|
+
sessionFirstMessageProcessed.delete(sessionInfo.id);
|
|
6786
6810
|
}
|
|
6787
6811
|
return;
|
|
6788
6812
|
}
|
|
@@ -6793,9 +6817,9 @@ ${result.message}`;
|
|
|
6793
6817
|
return;
|
|
6794
6818
|
const claudeConfig = await loadClaudeHooksConfig();
|
|
6795
6819
|
const extendedConfig = await loadPluginExtendedConfig();
|
|
6796
|
-
const errorStateBefore =
|
|
6820
|
+
const errorStateBefore = sessionErrorState.get(sessionID);
|
|
6797
6821
|
const endedWithErrorBefore = errorStateBefore?.hasError === true;
|
|
6798
|
-
const interruptStateBefore =
|
|
6822
|
+
const interruptStateBefore = sessionInterruptState.get(sessionID);
|
|
6799
6823
|
const interruptedBefore = interruptStateBefore?.interrupted === true;
|
|
6800
6824
|
let parentSessionId;
|
|
6801
6825
|
try {
|
|
@@ -6811,9 +6835,9 @@ ${result.message}`;
|
|
|
6811
6835
|
cwd: ctx.directory
|
|
6812
6836
|
};
|
|
6813
6837
|
const stopResult = await executeStopHooks(stopCtx, claudeConfig, extendedConfig);
|
|
6814
|
-
const errorStateAfter =
|
|
6838
|
+
const errorStateAfter = sessionErrorState.get(sessionID);
|
|
6815
6839
|
const endedWithErrorAfter = errorStateAfter?.hasError === true;
|
|
6816
|
-
const interruptStateAfter =
|
|
6840
|
+
const interruptStateAfter = sessionInterruptState.get(sessionID);
|
|
6817
6841
|
const interruptedAfter = interruptStateAfter?.interrupted === true;
|
|
6818
6842
|
const shouldBypass = endedWithErrorBefore || endedWithErrorAfter || interruptedBefore || interruptedAfter;
|
|
6819
6843
|
if (shouldBypass && stopResult.block) {
|
|
@@ -6831,8 +6855,8 @@ ${result.message}`;
|
|
|
6831
6855
|
log("Stop hook returned block", { sessionID, reason: stopResult.reason });
|
|
6832
6856
|
}
|
|
6833
6857
|
}
|
|
6834
|
-
|
|
6835
|
-
|
|
6858
|
+
sessionErrorState.delete(sessionID);
|
|
6859
|
+
sessionInterruptState.delete(sessionID);
|
|
6836
6860
|
}
|
|
6837
6861
|
}
|
|
6838
6862
|
};
|
|
@@ -8205,6 +8229,7 @@ var ANTIGRAVITY_HEADERS = {
|
|
|
8205
8229
|
pluginType: "GEMINI"
|
|
8206
8230
|
})
|
|
8207
8231
|
};
|
|
8232
|
+
var ANTIGRAVITY_DEFAULT_PROJECT_ID = "rising-fact-p41fc";
|
|
8208
8233
|
var GOOGLE_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
8209
8234
|
var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
8210
8235
|
var GOOGLE_USERINFO_URL = "https://www.googleapis.com/oauth2/v1/userinfo";
|
|
@@ -8522,7 +8547,7 @@ function getDefaultTierId(allowedTiers) {
|
|
|
8522
8547
|
}
|
|
8523
8548
|
function isFreeTier(tierId) {
|
|
8524
8549
|
if (!tierId)
|
|
8525
|
-
return
|
|
8550
|
+
return true;
|
|
8526
8551
|
const lower = tierId.toLowerCase();
|
|
8527
8552
|
return lower === "free" || lower === "free-tier" || lower.startsWith("free");
|
|
8528
8553
|
}
|
|
@@ -8648,21 +8673,30 @@ async function fetchProjectContext(accessToken) {
|
|
|
8648
8673
|
}
|
|
8649
8674
|
}
|
|
8650
8675
|
if (!loadPayload) {
|
|
8651
|
-
debugLog4(`[fetchProjectContext] loadCodeAssist returned null,
|
|
8652
|
-
|
|
8676
|
+
debugLog4(`[fetchProjectContext] loadCodeAssist returned null, trying with fallback project ID`);
|
|
8677
|
+
const fallbackPayload = await callLoadCodeAssistAPI(accessToken, ANTIGRAVITY_DEFAULT_PROJECT_ID);
|
|
8678
|
+
const fallbackProjectId = extractProjectId(fallbackPayload?.cloudaicompanionProject);
|
|
8679
|
+
if (fallbackProjectId) {
|
|
8680
|
+
const result = { cloudaicompanionProject: fallbackProjectId };
|
|
8681
|
+
projectContextCache.set(accessToken, result);
|
|
8682
|
+
debugLog4(`[fetchProjectContext] Using fallback project ID: ${fallbackProjectId}`);
|
|
8683
|
+
return result;
|
|
8684
|
+
}
|
|
8685
|
+
debugLog4(`[fetchProjectContext] Fallback also failed, using default: ${ANTIGRAVITY_DEFAULT_PROJECT_ID}`);
|
|
8686
|
+
return { cloudaicompanionProject: ANTIGRAVITY_DEFAULT_PROJECT_ID };
|
|
8653
8687
|
}
|
|
8654
8688
|
const currentTierId = loadPayload.currentTier?.id;
|
|
8655
8689
|
debugLog4(`[fetchProjectContext] currentTier: ${currentTierId}, allowedTiers: ${JSON.stringify(loadPayload.allowedTiers)}`);
|
|
8656
8690
|
if (currentTierId && !isFreeTier(currentTierId)) {
|
|
8657
|
-
debugLog4(`[fetchProjectContext] PAID tier detected
|
|
8658
|
-
return { cloudaicompanionProject:
|
|
8691
|
+
debugLog4(`[fetchProjectContext] PAID tier detected (${currentTierId}), using fallback: ${ANTIGRAVITY_DEFAULT_PROJECT_ID}`);
|
|
8692
|
+
return { cloudaicompanionProject: ANTIGRAVITY_DEFAULT_PROJECT_ID };
|
|
8659
8693
|
}
|
|
8660
8694
|
const defaultTierId = getDefaultTierId(loadPayload.allowedTiers);
|
|
8661
8695
|
const tierId = defaultTierId ?? "free-tier";
|
|
8662
8696
|
debugLog4(`[fetchProjectContext] Resolved tierId: ${tierId}`);
|
|
8663
8697
|
if (!isFreeTier(tierId)) {
|
|
8664
|
-
debugLog4(`[fetchProjectContext] Non-FREE tier without project,
|
|
8665
|
-
return { cloudaicompanionProject:
|
|
8698
|
+
debugLog4(`[fetchProjectContext] Non-FREE tier (${tierId}) without project, using fallback: ${ANTIGRAVITY_DEFAULT_PROJECT_ID}`);
|
|
8699
|
+
return { cloudaicompanionProject: ANTIGRAVITY_DEFAULT_PROJECT_ID };
|
|
8666
8700
|
}
|
|
8667
8701
|
debugLog4(`[fetchProjectContext] FREE tier detected (${tierId}), calling onboardUser...`);
|
|
8668
8702
|
const managedProjectId = await onboardManagedProject(accessToken, tierId);
|
|
@@ -8675,8 +8709,8 @@ async function fetchProjectContext(accessToken) {
|
|
|
8675
8709
|
debugLog4(`[fetchProjectContext] Got managed project ID: ${managedProjectId}`);
|
|
8676
8710
|
return result;
|
|
8677
8711
|
}
|
|
8678
|
-
debugLog4(`[fetchProjectContext] Failed to get managed project ID,
|
|
8679
|
-
return { cloudaicompanionProject:
|
|
8712
|
+
debugLog4(`[fetchProjectContext] Failed to get managed project ID, using fallback: ${ANTIGRAVITY_DEFAULT_PROJECT_ID}`);
|
|
8713
|
+
return { cloudaicompanionProject: ANTIGRAVITY_DEFAULT_PROJECT_ID };
|
|
8680
8714
|
}
|
|
8681
8715
|
function clearProjectContextCache(accessToken) {
|
|
8682
8716
|
if (accessToken) {
|
|
@@ -10199,43 +10233,6 @@ async function loadMcpConfigs() {
|
|
|
10199
10233
|
}
|
|
10200
10234
|
return { servers, loadedServers };
|
|
10201
10235
|
}
|
|
10202
|
-
// src/features/terminal/title.ts
|
|
10203
|
-
var STATUS_ICONS = {
|
|
10204
|
-
ready: "",
|
|
10205
|
-
processing: "\u25D0",
|
|
10206
|
-
tool: "\u26A1",
|
|
10207
|
-
error: "\u2716",
|
|
10208
|
-
idle: "\u25CB"
|
|
10209
|
-
};
|
|
10210
|
-
var DEFAULT_TITLE = "OpenCode";
|
|
10211
|
-
var MAX_TITLE_LENGTH = 30;
|
|
10212
|
-
function truncate(str, maxLen) {
|
|
10213
|
-
if (str.length <= maxLen)
|
|
10214
|
-
return str;
|
|
10215
|
-
return str.slice(0, maxLen - 1) + "\u2026";
|
|
10216
|
-
}
|
|
10217
|
-
function formatTerminalTitle(ctx) {
|
|
10218
|
-
const title = ctx.sessionTitle || DEFAULT_TITLE;
|
|
10219
|
-
const truncatedTitle = truncate(title, MAX_TITLE_LENGTH);
|
|
10220
|
-
const parts = ["[OpenCode]", truncatedTitle];
|
|
10221
|
-
if (ctx.status) {
|
|
10222
|
-
parts.push(STATUS_ICONS[ctx.status]);
|
|
10223
|
-
}
|
|
10224
|
-
return parts.join(" ");
|
|
10225
|
-
}
|
|
10226
|
-
function isTmuxEnvironment() {
|
|
10227
|
-
return !!process.env.TMUX || process.env.TERM_PROGRAM === "tmux";
|
|
10228
|
-
}
|
|
10229
|
-
function setTerminalTitle(title) {
|
|
10230
|
-
process.stderr.write(`\x1B]0;${title}\x07`);
|
|
10231
|
-
if (isTmuxEnvironment()) {
|
|
10232
|
-
process.stderr.write(`\x1Bk${title}\x1B\\`);
|
|
10233
|
-
}
|
|
10234
|
-
}
|
|
10235
|
-
function updateTerminalTitle(ctx) {
|
|
10236
|
-
const title = formatTerminalTitle(ctx);
|
|
10237
|
-
setTerminalTitle(title);
|
|
10238
|
-
}
|
|
10239
10236
|
// src/tools/lsp/constants.ts
|
|
10240
10237
|
var SYMBOL_KIND_MAP = {
|
|
10241
10238
|
1: "File",
|
|
@@ -21498,10 +21495,10 @@ function _property(property, schema, params) {
|
|
|
21498
21495
|
...normalizeParams(params)
|
|
21499
21496
|
});
|
|
21500
21497
|
}
|
|
21501
|
-
function _mime(
|
|
21498
|
+
function _mime(types10, params) {
|
|
21502
21499
|
return new $ZodCheckMimeType({
|
|
21503
21500
|
check: "mime_type",
|
|
21504
|
-
mime:
|
|
21501
|
+
mime: types10,
|
|
21505
21502
|
...normalizeParams(params)
|
|
21506
21503
|
});
|
|
21507
21504
|
}
|
|
@@ -23411,7 +23408,7 @@ var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
|
23411
23408
|
ZodType.init(inst, def);
|
|
23412
23409
|
inst.min = (size, params) => inst.check(_minSize(size, params));
|
|
23413
23410
|
inst.max = (size, params) => inst.check(_maxSize(size, params));
|
|
23414
|
-
inst.mime = (
|
|
23411
|
+
inst.mime = (types10, params) => inst.check(_mime(Array.isArray(types10) ? types10 : [types10], params));
|
|
23415
23412
|
});
|
|
23416
23413
|
function file(params) {
|
|
23417
23414
|
return _file(ZodFile, params);
|
|
@@ -26797,7 +26794,6 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
26797
26794
|
const nonInteractiveEnv = isHookEnabled("non-interactive-env") ? createNonInteractiveEnvHook(ctx) : null;
|
|
26798
26795
|
const interactiveBashSession = isHookEnabled("interactive-bash-session") ? createInteractiveBashSessionHook(ctx) : null;
|
|
26799
26796
|
const emptyMessageSanitizer = isHookEnabled("empty-message-sanitizer") ? createEmptyMessageSanitizerHook() : null;
|
|
26800
|
-
updateTerminalTitle({ sessionId: "main" });
|
|
26801
26797
|
const backgroundManager = new BackgroundManager(ctx);
|
|
26802
26798
|
const backgroundNotificationHook = isHookEnabled("background-notification") ? createBackgroundNotificationHook(backgroundManager) : null;
|
|
26803
26799
|
const backgroundTools = createBackgroundTools(backgroundManager, ctx.client);
|
|
@@ -26822,7 +26818,7 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
26822
26818
|
await emptyMessageSanitizer?.["experimental.chat.messages.transform"]?.(input, output);
|
|
26823
26819
|
},
|
|
26824
26820
|
config: async (config3) => {
|
|
26825
|
-
const builtinAgents = createBuiltinAgents(pluginConfig.disabled_agents, pluginConfig.agents, ctx.directory);
|
|
26821
|
+
const builtinAgents = createBuiltinAgents(pluginConfig.disabled_agents, pluginConfig.agents, ctx.directory, config3.model);
|
|
26826
26822
|
const userAgents = pluginConfig.claude_code?.agents ?? true ? loadUserAgents() : {};
|
|
26827
26823
|
const projectAgents = pluginConfig.claude_code?.agents ?? true ? loadProjectAgents() : {};
|
|
26828
26824
|
const isOmoEnabled = pluginConfig.omo_agent?.disabled !== true;
|
|
@@ -26878,6 +26874,11 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
26878
26874
|
look_at: false
|
|
26879
26875
|
};
|
|
26880
26876
|
}
|
|
26877
|
+
config3.permission = {
|
|
26878
|
+
...config3.permission,
|
|
26879
|
+
webfetch: "allow",
|
|
26880
|
+
external_directory: "allow"
|
|
26881
|
+
};
|
|
26881
26882
|
const mcpResult = pluginConfig.claude_code?.mcp ?? true ? await loadMcpConfigs() : { servers: {} };
|
|
26882
26883
|
config3.mcp = {
|
|
26883
26884
|
...config3.mcp,
|
|
@@ -26922,36 +26923,12 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
26922
26923
|
const sessionInfo = props?.info;
|
|
26923
26924
|
if (!sessionInfo?.parentID) {
|
|
26924
26925
|
setMainSession(sessionInfo?.id);
|
|
26925
|
-
setCurrentSession(sessionInfo?.id, sessionInfo?.title);
|
|
26926
|
-
updateTerminalTitle({
|
|
26927
|
-
sessionId: sessionInfo?.id || "main",
|
|
26928
|
-
status: "idle",
|
|
26929
|
-
directory: ctx.directory,
|
|
26930
|
-
sessionTitle: sessionInfo?.title
|
|
26931
|
-
});
|
|
26932
|
-
}
|
|
26933
|
-
}
|
|
26934
|
-
if (event.type === "session.updated") {
|
|
26935
|
-
const sessionInfo = props?.info;
|
|
26936
|
-
if (!sessionInfo?.parentID) {
|
|
26937
|
-
setCurrentSession(sessionInfo?.id, sessionInfo?.title);
|
|
26938
|
-
updateTerminalTitle({
|
|
26939
|
-
sessionId: sessionInfo?.id || "main",
|
|
26940
|
-
status: "processing",
|
|
26941
|
-
directory: ctx.directory,
|
|
26942
|
-
sessionTitle: sessionInfo?.title
|
|
26943
|
-
});
|
|
26944
26926
|
}
|
|
26945
26927
|
}
|
|
26946
26928
|
if (event.type === "session.deleted") {
|
|
26947
26929
|
const sessionInfo = props?.info;
|
|
26948
26930
|
if (sessionInfo?.id === getMainSessionID()) {
|
|
26949
26931
|
setMainSession(undefined);
|
|
26950
|
-
setCurrentSession(undefined, undefined);
|
|
26951
|
-
updateTerminalTitle({
|
|
26952
|
-
sessionId: "main",
|
|
26953
|
-
status: "idle"
|
|
26954
|
-
});
|
|
26955
26932
|
}
|
|
26956
26933
|
}
|
|
26957
26934
|
if (event.type === "session.error") {
|
|
@@ -26973,25 +26950,6 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
26973
26950
|
}).catch(() => {});
|
|
26974
26951
|
}
|
|
26975
26952
|
}
|
|
26976
|
-
if (sessionID && sessionID === getMainSessionID()) {
|
|
26977
|
-
updateTerminalTitle({
|
|
26978
|
-
sessionId: sessionID,
|
|
26979
|
-
status: "error",
|
|
26980
|
-
directory: ctx.directory,
|
|
26981
|
-
sessionTitle: getCurrentSessionTitle()
|
|
26982
|
-
});
|
|
26983
|
-
}
|
|
26984
|
-
}
|
|
26985
|
-
if (event.type === "session.idle") {
|
|
26986
|
-
const sessionID = props?.sessionID;
|
|
26987
|
-
if (sessionID && sessionID === getMainSessionID()) {
|
|
26988
|
-
updateTerminalTitle({
|
|
26989
|
-
sessionId: sessionID,
|
|
26990
|
-
status: "idle",
|
|
26991
|
-
directory: ctx.directory,
|
|
26992
|
-
sessionTitle: getCurrentSessionTitle()
|
|
26993
|
-
});
|
|
26994
|
-
}
|
|
26995
26953
|
}
|
|
26996
26954
|
},
|
|
26997
26955
|
"tool.execute.before": async (input, output) => {
|
|
@@ -27008,15 +26966,6 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
27008
26966
|
...isExploreOrLibrarian ? { call_omo_agent: false } : {}
|
|
27009
26967
|
};
|
|
27010
26968
|
}
|
|
27011
|
-
if (input.sessionID === getMainSessionID()) {
|
|
27012
|
-
updateTerminalTitle({
|
|
27013
|
-
sessionId: input.sessionID,
|
|
27014
|
-
status: "tool",
|
|
27015
|
-
currentTool: input.tool,
|
|
27016
|
-
directory: ctx.directory,
|
|
27017
|
-
sessionTitle: getCurrentSessionTitle()
|
|
27018
|
-
});
|
|
27019
|
-
}
|
|
27020
26969
|
},
|
|
27021
26970
|
"tool.execute.after": async (input, output) => {
|
|
27022
26971
|
await claudeCodeHooks["tool.execute.after"](input, output);
|
|
@@ -27029,14 +26978,6 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
27029
26978
|
await emptyTaskResponseDetector?.["tool.execute.after"](input, output);
|
|
27030
26979
|
await agentUsageReminder?.["tool.execute.after"](input, output);
|
|
27031
26980
|
await interactiveBashSession?.["tool.execute.after"](input, output);
|
|
27032
|
-
if (input.sessionID === getMainSessionID()) {
|
|
27033
|
-
updateTerminalTitle({
|
|
27034
|
-
sessionId: input.sessionID,
|
|
27035
|
-
status: "idle",
|
|
27036
|
-
directory: ctx.directory,
|
|
27037
|
-
sessionTitle: getCurrentSessionTitle()
|
|
27038
|
-
});
|
|
27039
|
-
}
|
|
27040
26981
|
}
|
|
27041
26982
|
};
|
|
27042
26983
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function detectInterrupt(error: unknown): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./title";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type SessionStatus = "ready" | "processing" | "tool" | "error" | "idle";
|
|
2
|
-
export interface TitleContext {
|
|
3
|
-
sessionId: string;
|
|
4
|
-
sessionTitle?: string;
|
|
5
|
-
directory?: string;
|
|
6
|
-
status?: SessionStatus;
|
|
7
|
-
currentTool?: string;
|
|
8
|
-
customSuffix?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function formatTerminalTitle(ctx: TitleContext): string;
|
|
11
|
-
export declare function setTerminalTitle(title: string): void;
|
|
12
|
-
export declare function updateTerminalTitle(ctx: TitleContext): void;
|
|
13
|
-
export declare function resetTerminalTitle(): void;
|