oh-my-opencode 3.0.0-beta.6 → 3.0.0-beta.8

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.
Files changed (42) hide show
  1. package/README.ja.md +55 -29
  2. package/README.md +66 -34
  3. package/README.zh-cn.md +59 -29
  4. package/bin/oh-my-opencode.js +80 -0
  5. package/bin/platform.js +38 -0
  6. package/bin/platform.test.ts +148 -0
  7. package/dist/agents/prometheus-prompt.d.ts +1 -1
  8. package/dist/agents/sisyphus-junior.d.ts +1 -1
  9. package/dist/cli/config-manager.d.ts +9 -1
  10. package/dist/cli/index.js +272 -224
  11. package/dist/cli/types.d.ts +3 -0
  12. package/dist/config/schema.d.ts +2 -0
  13. package/dist/features/background-agent/manager.d.ts +5 -0
  14. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
  15. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
  16. package/dist/features/hook-message-injector/index.d.ts +1 -1
  17. package/dist/features/opencode-skill-loader/skill-content.d.ts +10 -0
  18. package/dist/features/skill-mcp-manager/manager.d.ts +10 -0
  19. package/dist/features/task-toast-manager/index.d.ts +1 -1
  20. package/dist/features/task-toast-manager/manager.d.ts +2 -1
  21. package/dist/features/task-toast-manager/types.d.ts +5 -0
  22. package/dist/hooks/comment-checker/cli.d.ts +0 -1
  23. package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
  24. package/dist/hooks/index.d.ts +1 -0
  25. package/dist/hooks/sisyphus-task-retry/index.d.ts +24 -0
  26. package/dist/hooks/sisyphus-task-retry/index.test.d.ts +1 -0
  27. package/dist/index.js +2794 -1061
  28. package/dist/shared/index.d.ts +2 -0
  29. package/dist/shared/migration.d.ts +1 -0
  30. package/dist/shared/session-cursor.d.ts +13 -0
  31. package/dist/shared/session-cursor.test.d.ts +1 -0
  32. package/dist/shared/shell-env.d.ts +41 -0
  33. package/dist/shared/shell-env.test.d.ts +1 -0
  34. package/dist/tools/look-at/tools.d.ts +7 -0
  35. package/dist/tools/look-at/tools.test.d.ts +1 -0
  36. package/dist/tools/lsp/client.d.ts +0 -7
  37. package/dist/tools/lsp/constants.d.ts +0 -3
  38. package/dist/tools/lsp/tools.d.ts +0 -7
  39. package/dist/tools/lsp/types.d.ts +0 -56
  40. package/dist/tools/lsp/utils.d.ts +1 -8
  41. package/package.json +20 -5
  42. package/postinstall.mjs +43 -0
package/README.ja.md CHANGED
@@ -28,7 +28,29 @@
28
28
 
29
29
  > `oh-my-opencode` をインストールして、ドーピングしたかのようにコーディングしましょう。バックグラウンドでエージェントを走らせ、oracle、librarian、frontend engineer のような専門エージェントを呼び出してください。丹精込めて作られた LSP/AST ツール、厳選された MCP、そして完全な Claude Code 互換レイヤーを、たった一行で手に入れましょう。
30
30
 
31
- **注意: librarianには高価なモデルを使用しないでください。これはあなたにとって役に立たないだけでなく、LLMプロバイダーにも負担をかけます。代わりにClaude Haiku、Gemini Flash、GLM 4.7、MiniMaxなどのモデルを使用してください。**
31
+ # Claude OAuth アクセスに関するお知らせ
32
+
33
+ ## TL;DR
34
+
35
+ > Q. oh-my-opencodeを使用できますか?
36
+
37
+ はい。
38
+
39
+ > Q. Claude Codeのサブスクリプションで使用できますか?
40
+
41
+ はい、技術的には可能です。ただし、使用を推奨することはできません。
42
+
43
+ ## 詳細
44
+
45
+ > 2026年1月より、AnthropicはToS違反を理由にサードパーティのOAuthアクセスを制限しました。
46
+ >
47
+ > [**Anthropicはこのプロジェクト oh-my-opencode を、opencodeをブロックする正当化の根拠として挙げています。**](https://x.com/thdxr/status/2010149530486911014)
48
+ >
49
+ > 実際、Claude CodeのOAuthリクエストシグネチャを偽装するプラグインがコミュニティに存在します。
50
+ >
51
+ > これらのツールは技術的な検出可能性に関わらず動作する可能性がありますが、ユーザーはToSへの影響を認識すべきであり、私個人としてはそれらの使用を推奨できません。
52
+ >
53
+ > このプロジェクトは非公式ツールの使用に起因するいかなる問題についても責任を負いません。また、**私たちはそれらのOAuthシステムのカスタム実装を一切持っていません。**
32
54
 
33
55
  <div align="center">
34
56
 
@@ -91,8 +113,7 @@
91
113
  - [4.2 Google Gemini (Antigravity OAuth)](#42-google-gemini-antigravity-oauth)
92
114
  - [4.2.1 モデル設定](#421-モデル設定)
93
115
  - [4.2.2 oh-my-opencode エージェントモデルのオーバーライド](#422-oh-my-opencode-エージェントモデルのオーバーライド)
94
- - [4.3 OpenAI (ChatGPT Plus/Pro)](#43-openai-chatgpt-pluspro)
95
- - [モデル設定](#モデル設定)
116
+
96
117
  - [⚠️ 注意](#️-注意)
97
118
  - [セットアップの確認](#セットアップの確認)
98
119
  - [ユーザーに「おめでとうございます!🎉」と伝える](#ユーザーにおめでとうございますと伝える)
@@ -354,37 +375,46 @@ opencode auth login
354
375
 
355
376
  **マルチアカウントロードバランシング**: プラグインは最大10個の Google アカウントをサポートします。1つのアカウントがレートリミットに達すると、自動的に次のアカウントに切り替わります。
356
377
 
357
- #### 4.3 OpenAI (ChatGPT Plus/Pro)
378
+ #### 4.3 GitHub Copilot(フォールバックプロバイダー)
358
379
 
359
- まず、opencode-openai-codex-auth プラグインを追加します:
380
+ GitHub Copilot は、ネイティブプロバイダー(Claude、ChatGPT、Gemini)が利用できない場合の**フォールバックプロバイダー**としてサポートされています。インストーラーは、Copilot をネイティブプロバイダーより低い優先度で構成します。
360
381
 
361
- ```json
362
- {
363
- "plugin": [
364
- "oh-my-opencode",
365
- "opencode-openai-codex-auth@4.3.0"
366
- ]
367
- }
368
- ```
382
+ **優先度**: ネイティブプロバイダー (Claude/ChatGPT/Gemini) > GitHub Copilot > 無料モデル
369
383
 
370
- ##### モデル設定
384
+ ##### モデルマッピング
371
385
 
372
- `opencode.json` に完全なモデル設定も構成する必要があります。
373
- [opencode-openai-codex-auth ドキュメント](https://github.com/numman-ali/opencode-openai-codex-auth)を読み、[`config/opencode-modern.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/opencode-modern.json)(OpenCode v1.0.210+)または [`config/opencode-legacy.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/opencode-legacy.json)(旧バージョン)から provider/models 設定をコピーして、ユーザーの既存のセットアップを壊さないよう慎重にマージしてください。
386
+ GitHub Copilot が有効な場合、oh-my-opencode は以下のモデル割り当てを使用します:
374
387
 
375
- **利用可能なモデル**: `openai/gpt-5.2`, `openai/gpt-5.2-codex`, `openai/gpt-5.1-codex-max`, `openai/gpt-5.1-codex`, `openai/gpt-5.1-codex-mini`, `openai/gpt-5.1`
388
+ | エージェント | モデル |
389
+ |--------------|--------|
390
+ | **Sisyphus** | `github-copilot/claude-opus-4.5` |
391
+ | **Oracle** | `github-copilot/gpt-5.2` |
392
+ | **Explore** | `grok code`(デフォルト) |
393
+ | **Librarian** | `glm 4.7 free`(デフォルト) |
376
394
 
377
- **Variants** (OpenCode v1.0.210+): `--variant=<none|low|medium|high|xhigh>` オプションで推論強度を制御できます。
395
+ GitHub Copilot はプロキシプロバイダーとして機能し、サブスクリプションに基づいて基盤となるモデルにリクエストをルーティングします。
378
396
 
379
- その後、認証を行います:
397
+ ##### セットアップ
398
+
399
+ インストーラーを実行し、GitHub Copilot で「はい」を選択します:
400
+
401
+ ```bash
402
+ bunx oh-my-opencode install
403
+ # サブスクリプション(Claude、ChatGPT、Gemini)を選択
404
+ # プロンプトが表示されたら: "Do you have a GitHub Copilot subscription?" → 「はい」を選択
405
+ ```
406
+
407
+ または、非対話モードを使用します:
408
+
409
+ ```bash
410
+ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no --copilot=yes
411
+ ```
412
+
413
+ その後、GitHub で認証します:
380
414
 
381
415
  ```bash
382
416
  opencode auth login
383
- # Provider: OpenAI を選択
384
- # Login method: ChatGPT Plus/Pro (Codex Subscription) を選択
385
- # ユーザーにブラウザでの OAuth フロー完了を案内
386
- # 完了まで待機
387
- # 成功を確認し、ユーザーに報告
417
+ # 選択: GitHub → OAuth 経由で認証
388
418
  ```
389
419
 
390
420
 
@@ -518,17 +548,13 @@ Ask @explore for the policy on this feature
518
548
  あなたがエディタで使っているその機能、他のエージェントは触ることができません。
519
549
  最高の同僚に最高の道具を渡してください。これでリファクタリングも、ナビゲーションも、分析も、エージェントが適切に行えるようになります。
520
550
 
521
- - **lsp_hover**: その位置の型情報、ドキュメント、シグネチャを取得
522
551
  - **lsp_goto_definition**: シンボル定義へジャンプ
523
552
  - **lsp_find_references**: ワークスペース全体で使用箇所を検索
524
- - **lsp_document_symbols**: ファイルのシンボルアウトラインを取得
525
- - **lsp_workspace_symbols**: プロジェクト全体から名前でシンボルを検索
553
+ - **lsp_symbols**: ファイルからシンボルを取得 (scope='document') またはワークスペース全体を検索 (scope='workspace')
526
554
  - **lsp_diagnostics**: ビルド前にエラー/警告を取得
527
555
  - **lsp_servers**: 利用可能な LSP サーバー一覧
528
556
  - **lsp_prepare_rename**: 名前変更操作の検証
529
557
  - **lsp_rename**: ワークスペース全体でシンボル名を変更
530
- - **lsp_code_actions**: 利用可能なクイックフィックス/リファクタリングを取得
531
- - **lsp_code_action_resolve**: コードアクションを適用
532
558
  - **ast_grep_search**: AST 認識コードパターン検索 (25言語対応)
533
559
  - **ast_grep_replace**: AST 認識コード置換
534
560
 
package/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
 
6
6
  > [!TIP]
7
7
  >
8
- > [![The Orchestrator is now available in beta.](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.1)
9
- > > **The Orchestrator is now available in beta. Use `oh-my-opencode@3.0.0-beta.1` to install it.**
8
+ > [![The Orchestrator is now available in beta.](./.github/assets/orchestrator-sisyphus.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0-beta.7)
9
+ > > **The Orchestrator is now available in beta. Use `oh-my-opencode@3.0.0-beta.7` to install it.**
10
10
  >
11
11
  > Be with us!
12
12
  >
@@ -28,8 +28,29 @@
28
28
 
29
29
  > This is coding on steroids—`oh-my-opencode` in action. Run background agents, call specialized agents like oracle, librarian, and frontend engineer. Use crafted LSP/AST tools, curated MCPs, and a full Claude Code compatibility layer.
30
30
 
31
+ # Claude OAuth Access Notice
31
32
 
32
- **Notice: Do not use expensive models for librarian. This is not only unhelpful to you, but also burdens LLM providers. Use models like Claude Haiku, Gemini Flash, GLM 4.7, or MiniMax instead.**
33
+ ## TL;DR
34
+
35
+ > Q. Can I use oh-my-opencode?
36
+
37
+ Yes.
38
+
39
+ > Q. Can I use it with my Claude Code subscription?
40
+
41
+ Yes, technically possible. But I cannot recommend using it.
42
+
43
+ ## FULL
44
+
45
+ > As of January 2026, Anthropic has restricted third-party OAuth access citing ToS violations.
46
+ >
47
+ > [**Anthropic has cited this project, oh-my-opencode as justification for blocking opencode.**](https://x.com/thdxr/status/2010149530486911014)
48
+ >
49
+ > Indeed, some plugins that spoof Claude Code's oauth request signatures exist in the community.
50
+ >
51
+ > These tools may work regardless of technical detectability, but users should be aware of ToS implications, and I personally cannot recommend to use those.
52
+ >
53
+ > This project is not responsible for any issues arising from the use of unofficial tools, and **we do not have any custom implementations of those oauth systems.**
33
54
 
34
55
 
35
56
  <div align="center">
@@ -76,6 +97,9 @@
76
97
 
77
98
  ## Contents
78
99
 
100
+ - [Claude OAuth Access Notice](#claude-oauth-access-notice)
101
+ - [Reviews](#reviews)
102
+ - [Contents](#contents)
79
103
  - [Oh My OpenCode](#oh-my-opencode)
80
104
  - [Just Skip Reading This Readme](#just-skip-reading-this-readme)
81
105
  - [It's the Age of Agents](#its-the-age-of-agents)
@@ -94,8 +118,9 @@
94
118
  - [Google Gemini (Antigravity OAuth)](#google-gemini-antigravity-oauth)
95
119
  - [Model Configuration](#model-configuration)
96
120
  - [oh-my-opencode Agent Model Override](#oh-my-opencode-agent-model-override)
97
- - [OpenAI (ChatGPT Plus/Pro)](#openai-chatgpt-pluspro)
98
- - [Model Configuration](#model-configuration-1)
121
+ - [GitHub Copilot (Fallback Provider)](#github-copilot-fallback-provider)
122
+ - [Model Mappings](#model-mappings)
123
+ - [Setup](#setup)
99
124
  - [⚠️ Warning](#️-warning)
100
125
  - [Verify the setup](#verify-the-setup)
101
126
  - [Say 'Congratulations! 🎉' to the user](#say-congratulations--to-the-user)
@@ -236,12 +261,14 @@ If you don't want all this, as mentioned, you can just pick and choose specific
236
261
  Run the interactive installer:
237
262
 
238
263
  ```bash
239
- bunx oh-my-opencode install
240
- # or use npx if bunx doesn't work
241
264
  npx oh-my-opencode install
265
+ # or with bun
266
+ bunx oh-my-opencode install
242
267
  ```
243
268
 
244
- > **Note for Ubuntu/Debian users**: If you installed Bun via Snap (`/snap/bin/bun`), `bunx` will fail with "script not found" due to Snap's sandboxing. Either use `npx` instead, or reinstall Bun via the official installer: `curl -fsSL https://bun.sh/install | bash`
269
+ > **Note**: The CLI ships with standalone binaries for all major platforms. No runtime (Bun/Node.js) is required for CLI execution after installation.
270
+ >
271
+ > **Supported platforms**: macOS (ARM64, x64), Linux (x64, ARM64, Alpine/musl), Windows (x64)
245
272
 
246
273
  Follow the prompts to configure your Claude, ChatGPT, and Gemini subscriptions. After installation, authenticate your providers as instructed.
247
274
 
@@ -381,37 +408,46 @@ opencode auth login
381
408
 
382
409
  **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.
383
410
 
384
- #### OpenAI (ChatGPT Plus/Pro)
411
+ #### GitHub Copilot (Fallback Provider)
385
412
 
386
- First, add the opencode-openai-codex-auth plugin:
413
+ GitHub Copilot is supported as a **fallback provider** when native providers (Claude, ChatGPT, Gemini) are unavailable. The installer configures Copilot with lower priority than native providers.
387
414
 
388
- ```json
389
- {
390
- "plugin": [
391
- "oh-my-opencode",
392
- "opencode-openai-codex-auth@4.3.0"
393
- ]
394
- }
395
- ```
415
+ **Priority**: Native providers (Claude/ChatGPT/Gemini) > GitHub Copilot > Free models
396
416
 
397
- ##### Model Configuration
417
+ ##### Model Mappings
398
418
 
399
- You'll also need full model settings in `opencode.json`.
400
- Read the [opencode-openai-codex-auth documentation](https://github.com/numman-ali/opencode-openai-codex-auth), copy provider/models config from [`config/opencode-modern.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/opencode-modern.json) (for OpenCode v1.0.210+) or [`config/opencode-legacy.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/opencode-legacy.json) (for older versions), and merge carefully to avoid breaking the user's existing setup.
419
+ When GitHub Copilot is enabled, oh-my-opencode uses these model assignments:
401
420
 
402
- **Available models**: `openai/gpt-5.2`, `openai/gpt-5.2-codex`, `openai/gpt-5.1-codex-max`, `openai/gpt-5.1-codex`, `openai/gpt-5.1-codex-mini`, `openai/gpt-5.1`
421
+ | Agent | Model |
422
+ | ------------- | -------------------------------- |
423
+ | **Sisyphus** | `github-copilot/claude-opus-4.5` |
424
+ | **Oracle** | `github-copilot/gpt-5.2` |
425
+ | **Explore** | `grok code` (default) |
426
+ | **Librarian** | `glm 4.7 free` (default) |
403
427
 
404
- **Variants** (OpenCode v1.0.210+): Use `--variant=<none|low|medium|high|xhigh>` for reasoning effort control.
428
+ GitHub Copilot acts as a proxy provider, routing requests to underlying models based on your subscription.
405
429
 
406
- Then authenticate:
430
+ ##### Setup
431
+
432
+ Run the installer and select "Yes" for GitHub Copilot:
433
+
434
+ ```bash
435
+ bunx oh-my-opencode install
436
+ # Select your subscriptions (Claude, ChatGPT, Gemini)
437
+ # When prompted: "Do you have a GitHub Copilot subscription?" → Select "Yes"
438
+ ```
439
+
440
+ Or use non-interactive mode:
441
+
442
+ ```bash
443
+ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no --copilot=yes
444
+ ```
445
+
446
+ Then authenticate with GitHub:
407
447
 
408
448
  ```bash
409
449
  opencode auth login
410
- # Interactive Terminal: Provider: Select OpenAI
411
- # Interactive Terminal: Login method: Select ChatGPT Plus/Pro (Codex Subscription)
412
- # Interactive Terminal: Guide user through OAuth flow in browser
413
- # Wait for completion
414
- # Verify success and confirm with user
450
+ # Select: GitHub Authenticate via OAuth
415
451
  ```
416
452
 
417
453
 
@@ -541,17 +577,13 @@ Syntax highlighting, autocomplete, refactoring, navigation, analysis—and now a
541
577
  The features in your editor? Other agents can't touch them.
542
578
  Hand your best tools to your best colleagues. Now they can properly refactor, navigate, and analyze.
543
579
 
544
- - **lsp_hover**: Type info, docs, signatures at position
545
580
  - **lsp_goto_definition**: Jump to symbol definition
546
581
  - **lsp_find_references**: Find all usages across workspace
547
- - **lsp_document_symbols**: Get file symbol outline
548
- - **lsp_workspace_symbols**: Search symbols by name across project
582
+ - **lsp_symbols**: Get symbols from file (scope='document') or search across workspace (scope='workspace')
549
583
  - **lsp_diagnostics**: Get errors/warnings before build
550
584
  - **lsp_servers**: List available LSP servers
551
585
  - **lsp_prepare_rename**: Validate rename operation
552
586
  - **lsp_rename**: Rename symbol across workspace
553
- - **lsp_code_actions**: Get available quick fixes/refactorings
554
- - **lsp_code_action_resolve**: Apply code action
555
587
  - **ast_grep_search**: AST-aware code pattern search (25 languages)
556
588
  - **ast_grep_replace**: AST-aware code replacement
557
589
  - **call_omo_agent**: Spawn specialized explore/librarian agents. Supports `run_in_background` parameter for async execution.
package/README.zh-cn.md CHANGED
@@ -28,8 +28,29 @@
28
28
 
29
29
  > 这是开挂级别的编程——`oh-my-opencode` 实战效果。运行后台智能体,调用专业智能体如 oracle、librarian 和前端工程师。使用精心设计的 LSP/AST 工具、精选的 MCP,以及完整的 Claude Code 兼容层。
30
30
 
31
+ # Claude OAuth 访问通知
31
32
 
32
- **注意:请勿为 librarian 使用昂贵的模型。这不仅对你没有帮助,还会增加 LLM 服务商的负担。请使用 Claude Haiku、Gemini Flash、GLM 4.7 或 MiniMax 等模型。**
33
+ ## TL;DR
34
+
35
+ > Q. 我可以使用 oh-my-opencode 吗?
36
+
37
+ 可以。
38
+
39
+ > Q. 我可以用 Claude Code 订阅来使用它吗?
40
+
41
+ 是的,技术上可以。但我不建议使用。
42
+
43
+ ## 详细说明
44
+
45
+ > 自2026年1月起,Anthropic 以违反服务条款为由限制了第三方 OAuth 访问。
46
+ >
47
+ > [**Anthropic 将本项目 oh-my-opencode 作为封锁 opencode 的理由。**](https://x.com/thdxr/status/2010149530486911014)
48
+ >
49
+ > 事实上,社区中确实存在一些伪造 Claude Code OAuth 请求签名的插件。
50
+ >
51
+ > 无论技术上是否可检测,这些工具可能都能正常工作,但用户应注意服务条款的相关影响,我个人不建议使用这些工具。
52
+ >
53
+ > 本项目对使用非官方工具产生的任何问题概不负责,**我们没有任何这些 OAuth 系统的自定义实现。**
33
54
 
34
55
 
35
56
  <div align="center">
@@ -93,8 +114,7 @@
93
114
  - [Google Gemini (Antigravity OAuth)](#google-gemini-antigravity-oauth)
94
115
  - [模型配置](#模型配置)
95
116
  - [oh-my-opencode 智能体模型覆盖](#oh-my-opencode-智能体模型覆盖)
96
- - [OpenAI (ChatGPT Plus/Pro)](#openai-chatgpt-pluspro)
97
- - [模型配置](#模型配置-1)
117
+
98
118
  - [⚠️ 警告](#️-警告)
99
119
  - [验证安装](#验证安装)
100
120
  - [向用户说 '恭喜!🎉'](#向用户说-恭喜)
@@ -232,6 +252,11 @@
232
252
 
233
253
  ### 面向人类用户
234
254
 
255
+ > **⚠️ 先决条件:需要安装 Bun**
256
+ >
257
+ > 此工具**需要系统中已安装 [Bun](https://bun.sh/)** 才能运行。
258
+ > 即使使用 `npx` 运行安装程序,底层运行时仍依赖于 Bun。
259
+
235
260
  运行交互式安装程序:
236
261
 
237
262
  ```bash
@@ -380,37 +405,46 @@ opencode auth login
380
405
 
381
406
  **多账号负载均衡**:该插件支持最多 10 个 Google 账号。当一个账号达到速率限制时,它会自动切换到下一个可用账号。
382
407
 
383
- #### OpenAI (ChatGPT Plus/Pro)
408
+ #### GitHub Copilot(备用提供商)
384
409
 
385
- 首先,添加 opencode-openai-codex-auth 插件:
410
+ GitHub Copilot 作为**备用提供商**受支持,当原生提供商(Claude、ChatGPT、Gemini)不可用时使用。安装程序将 Copilot 配置为低于原生提供商的优先级。
386
411
 
387
- ```json
388
- {
389
- "plugin": [
390
- "oh-my-opencode",
391
- "opencode-openai-codex-auth@4.3.0"
392
- ]
393
- }
394
- ```
412
+ **优先级**:原生提供商 (Claude/ChatGPT/Gemini) > GitHub Copilot > 免费模型
395
413
 
396
- ##### 模型配置
414
+ ##### 模型映射
397
415
 
398
- 你还需要在 `opencode.json` 中配置完整的模型设置。
399
- 阅读 [opencode-openai-codex-auth 文档](https://github.com/numman-ali/opencode-openai-codex-auth),从 [`config/opencode-modern.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/opencode-modern.json)(适用于 OpenCode v1.0.210+)或 [`config/opencode-legacy.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/opencode-legacy.json)(适用于旧版本)复制 provider/models 配置,并仔细合并以避免破坏用户现有的设置。
416
+ 启用 GitHub Copilot 后,oh-my-opencode 使用以下模型分配:
400
417
 
401
- **可用模型**:`openai/gpt-5.2`、`openai/gpt-5.2-codex`、`openai/gpt-5.1-codex-max`、`openai/gpt-5.1-codex`、`openai/gpt-5.1-codex-mini`、`openai/gpt-5.1`
418
+ | 代理 | 模型 |
419
+ |------|------|
420
+ | **Sisyphus** | `github-copilot/claude-opus-4.5` |
421
+ | **Oracle** | `github-copilot/gpt-5.2` |
422
+ | **Explore** | `grok code`(默认) |
423
+ | **Librarian** | `glm 4.7 free`(默认) |
402
424
 
403
- **变体**(OpenCode v1.0.210+):使用 `--variant=<none|low|medium|high|xhigh>` 控制推理力度。
425
+ GitHub Copilot 作为代理提供商,根据你的订阅将请求路由到底层模型。
404
426
 
405
- 然后进行认证:
427
+ ##### 设置
428
+
429
+ 运行安装程序并为 GitHub Copilot 选择"是":
430
+
431
+ ```bash
432
+ bunx oh-my-opencode install
433
+ # 选择你的订阅(Claude、ChatGPT、Gemini)
434
+ # 出现提示时:"Do you have a GitHub Copilot subscription?" → 选择"是"
435
+ ```
436
+
437
+ 或使用非交互模式:
438
+
439
+ ```bash
440
+ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no --copilot=yes
441
+ ```
442
+
443
+ 然后使用 GitHub 进行身份验证:
406
444
 
407
445
  ```bash
408
446
  opencode auth login
409
- # 交互式终端:Provider:选择 OpenAI
410
- # 交互式终端:Login method:选择 ChatGPT Plus/Pro (Codex Subscription)
411
- # 交互式终端:引导用户在浏览器中完成 OAuth 流程
412
- # 等待完成
413
- # 验证成功并向用户确认
447
+ # 选择:GitHub → 通过 OAuth 进行身份验证
414
448
  ```
415
449
 
416
450
 
@@ -540,17 +574,13 @@ gh repo star code-yeongyu/oh-my-opencode
540
574
  你编辑器中的功能?其他智能体无法触及。
541
575
  把你最好的工具交给你最好的同事。现在它们可以正确地重构、导航和分析。
542
576
 
543
- - **lsp_hover**:位置处的类型信息、文档、签名
544
577
  - **lsp_goto_definition**:跳转到符号定义
545
578
  - **lsp_find_references**:查找工作区中的所有使用
546
- - **lsp_document_symbols**:获取文件符号概览
547
- - **lsp_workspace_symbols**:按名称在项目中搜索符号
579
+ - **lsp_symbols**:从文件获取符号 (scope='document') 或在工作区中搜索 (scope='workspace')
548
580
  - **lsp_diagnostics**:在构建前获取错误/警告
549
581
  - **lsp_servers**:列出可用的 LSP 服务器
550
582
  - **lsp_prepare_rename**:验证重命名操作
551
583
  - **lsp_rename**:在工作区中重命名符号
552
- - **lsp_code_actions**:获取可用的快速修复/重构
553
- - **lsp_code_action_resolve**:应用代码操作
554
584
  - **ast_grep_search**:AST 感知的代码模式搜索(25 种语言)
555
585
  - **ast_grep_replace**:AST 感知的代码替换
556
586
  - **call_omo_agent**:生成专业的 explore/librarian 智能体。支持 `run_in_background` 参数进行异步执行。
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+ // bin/oh-my-opencode.js
3
+ // Wrapper script that detects platform and spawns the correct binary
4
+
5
+ import { spawnSync } from "node:child_process";
6
+ import { createRequire } from "node:module";
7
+ import { getPlatformPackage, getBinaryPath } from "./platform.js";
8
+
9
+ const require = createRequire(import.meta.url);
10
+
11
+ /**
12
+ * Detect libc family on Linux
13
+ * @returns {string | null} 'glibc', 'musl', or null if detection fails
14
+ */
15
+ function getLibcFamily() {
16
+ if (process.platform !== "linux") {
17
+ return undefined; // Not needed on non-Linux
18
+ }
19
+
20
+ try {
21
+ const detectLibc = require("detect-libc");
22
+ return detectLibc.familySync();
23
+ } catch {
24
+ // detect-libc not available
25
+ return null;
26
+ }
27
+ }
28
+
29
+ function main() {
30
+ const { platform, arch } = process;
31
+ const libcFamily = getLibcFamily();
32
+
33
+ // Get platform package name
34
+ let pkg;
35
+ try {
36
+ pkg = getPlatformPackage({ platform, arch, libcFamily });
37
+ } catch (error) {
38
+ console.error(`\noh-my-opencode: ${error.message}\n`);
39
+ process.exit(1);
40
+ }
41
+
42
+ // Resolve binary path
43
+ const binRelPath = getBinaryPath(pkg, platform);
44
+
45
+ let binPath;
46
+ try {
47
+ binPath = require.resolve(binRelPath);
48
+ } catch {
49
+ console.error(`\noh-my-opencode: Platform binary not installed.`);
50
+ console.error(`\nYour platform: ${platform}-${arch}${libcFamily === "musl" ? "-musl" : ""}`);
51
+ console.error(`Expected package: ${pkg}`);
52
+ console.error(`\nTo fix, run:`);
53
+ console.error(` npm install ${pkg}\n`);
54
+ process.exit(1);
55
+ }
56
+
57
+ // Spawn the binary
58
+ const result = spawnSync(binPath, process.argv.slice(2), {
59
+ stdio: "inherit",
60
+ });
61
+
62
+ // Handle spawn errors
63
+ if (result.error) {
64
+ console.error(`\noh-my-opencode: Failed to execute binary.`);
65
+ console.error(`Error: ${result.error.message}\n`);
66
+ process.exit(2);
67
+ }
68
+
69
+ // Handle signals
70
+ if (result.signal) {
71
+ const signalNum = result.signal === "SIGTERM" ? 15 :
72
+ result.signal === "SIGKILL" ? 9 :
73
+ result.signal === "SIGINT" ? 2 : 1;
74
+ process.exit(128 + signalNum);
75
+ }
76
+
77
+ process.exit(result.status ?? 1);
78
+ }
79
+
80
+ main();
@@ -0,0 +1,38 @@
1
+ // bin/platform.js
2
+ // Shared platform detection module - used by wrapper and postinstall
3
+
4
+ /**
5
+ * Get the platform-specific package name
6
+ * @param {{ platform: string, arch: string, libcFamily?: string | null }} options
7
+ * @returns {string} Package name like "oh-my-opencode-darwin-arm64"
8
+ * @throws {Error} If libc cannot be detected on Linux
9
+ */
10
+ export function getPlatformPackage({ platform, arch, libcFamily }) {
11
+ let suffix = "";
12
+ if (platform === "linux") {
13
+ if (libcFamily === null || libcFamily === undefined) {
14
+ throw new Error(
15
+ "Could not detect libc on Linux. " +
16
+ "Please ensure detect-libc is installed or report this issue."
17
+ );
18
+ }
19
+ if (libcFamily === "musl") {
20
+ suffix = "-musl";
21
+ }
22
+ }
23
+
24
+ // Map platform names: win32 -> windows (for package name)
25
+ const os = platform === "win32" ? "windows" : platform;
26
+ return `oh-my-opencode-${os}-${arch}${suffix}`;
27
+ }
28
+
29
+ /**
30
+ * Get the path to the binary within a platform package
31
+ * @param {string} pkg Package name
32
+ * @param {string} platform Process platform
33
+ * @returns {string} Relative path like "oh-my-opencode-darwin-arm64/bin/oh-my-opencode"
34
+ */
35
+ export function getBinaryPath(pkg, platform) {
36
+ const ext = platform === "win32" ? ".exe" : "";
37
+ return `${pkg}/bin/oh-my-opencode${ext}`;
38
+ }