oh-my-opencode 2.5.4 → 2.6.1

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 (45) hide show
  1. package/README.ja.md +13 -5
  2. package/README.ko.md +13 -5
  3. package/README.md +43 -5
  4. package/README.zh-cn.md +13 -5
  5. package/dist/cli/get-local-version/formatter.d.ts +3 -0
  6. package/dist/cli/get-local-version/index.d.ts +3 -0
  7. package/dist/cli/get-local-version/types.d.ts +13 -0
  8. package/dist/cli/index.js +1241 -108
  9. package/dist/config/index.d.ts +1 -1
  10. package/dist/config/schema.d.ts +87 -0
  11. package/dist/features/background-agent/manager.d.ts +1 -0
  12. package/dist/features/claude-code-plugin-loader/index.d.ts +3 -0
  13. package/dist/features/claude-code-plugin-loader/loader.d.ts +20 -0
  14. package/dist/features/claude-code-plugin-loader/types.d.ts +173 -0
  15. package/dist/hooks/anthropic-auto-compact/index.d.ts +1 -1
  16. package/dist/hooks/anthropic-auto-compact/pruning-deduplication.d.ts +7 -0
  17. package/dist/hooks/anthropic-auto-compact/pruning-deduplication.test.d.ts +1 -0
  18. package/dist/hooks/anthropic-auto-compact/pruning-executor.d.ts +3 -0
  19. package/dist/hooks/anthropic-auto-compact/pruning-purge-errors.d.ts +7 -0
  20. package/dist/hooks/anthropic-auto-compact/pruning-storage.d.ts +2 -0
  21. package/dist/hooks/anthropic-auto-compact/pruning-supersede.d.ts +6 -0
  22. package/dist/hooks/anthropic-auto-compact/pruning-types.d.ts +36 -0
  23. package/dist/hooks/anthropic-auto-compact/types.d.ts +5 -0
  24. package/dist/hooks/index.d.ts +1 -0
  25. package/dist/hooks/session-notification-utils.d.ts +9 -0
  26. package/dist/hooks/thinking-block-validator/index.d.ts +30 -0
  27. package/dist/index.js +2723 -644
  28. package/dist/shared/claude-config-dir.d.ts +1 -0
  29. package/dist/shared/claude-config-dir.test.d.ts +1 -0
  30. package/dist/shared/index.d.ts +2 -0
  31. package/dist/shared/jsonc-parser.d.ts +15 -0
  32. package/dist/shared/jsonc-parser.test.d.ts +1 -0
  33. package/dist/tools/ast-grep/index.d.ts +2 -90
  34. package/dist/tools/ast-grep/tools.d.ts +3 -88
  35. package/dist/tools/background-task/tools.d.ts +4 -38
  36. package/dist/tools/call-omo-agent/tools.d.ts +2 -21
  37. package/dist/tools/glob/tools.d.ts +2 -11
  38. package/dist/tools/grep/tools.d.ts +2 -13
  39. package/dist/tools/index.d.ts +3 -367
  40. package/dist/tools/interactive-bash/tools.d.ts +2 -9
  41. package/dist/tools/look-at/tools.d.ts +2 -12
  42. package/dist/tools/lsp/tools.d.ts +12 -152
  43. package/dist/tools/session-manager/tools.d.ts +5 -52
  44. package/dist/tools/slashcommand/tools.d.ts +2 -9
  45. package/package.json +2 -1
package/README.ja.md CHANGED
@@ -601,8 +601,7 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
601
601
  - **Agent Usage Reminder**: 検索ツールを直接呼び出す際、バックグラウンドタスクを通じた専門エージェントの活用を推奨するリマインダーを表示します。
602
602
  - **Anthropic Auto Compact**: Claude モデルがトークン制限に達すると、自動的にセッションを要約・圧縮します。手動での介入は不要です。
603
603
  - **Session Recovery**: セッションエラー(ツールの結果欠落、thinking ブロックの問題、空のメッセージなど)から自動復旧します。セッションが途中でクラッシュすることはありません。もしクラッシュしても復旧します。
604
- - **Auto Update Checker**: oh-my-opencode の新バージョンがリリースされると通知します。
605
- - **Startup Toast**: OhMyOpenCode ロード時にウェルカムメッセージを表示します。セッションを正しく始めるための、ささやかな "oMoMoMo" です。
604
+ - **Auto Update Checker**: oh-my-opencode の新バージョンを自動でチェックし、設定を自動更新できます。現在のバージョンと Sisyphus ステータスを表示する起動トースト通知を表示します(Sisyphus 有効時は「Sisyphus on steroids is steering OpenCode」、無効時は「OpenCode is now on Steroids. oMoMoMoMo...」)。全機能を無効化するには `disabled_hooks` に `"auto-update-checker"` を、トースト通知のみ無効化するには `"startup-toast"` を追加してください。[設定 > フック](#フック) 参照。
606
605
  - **Background Notification**: バックグラウンドエージェントのタスクが完了すると通知を受け取ります。
607
606
  - **Session Notification**: エージェントがアイドル状態になると OS 通知を送ります。macOS、Linux、Windows で動作します—エージェントが入力を待っている時を見逃しません。
608
607
  - **Empty Task Response Detector**: Task ツールが空の応答を返すと検知します。既に空の応答が返ってきているのに、いつまでも待ち続ける状況を防ぎます。
@@ -795,6 +794,8 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
795
794
 
796
795
  利用可能なフック:`todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `tool-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`, `interactive-bash-session`, `empty-message-sanitizer`
797
796
 
797
+ **`auto-update-checker`と`startup-toast`について**: `startup-toast` フックは `auto-update-checker` のサブ機能です。アップデートチェックは有効なまま起動トースト通知のみを無効化するには、`disabled_hooks` に `"startup-toast"` を追加してください。すべてのアップデートチェック機能(トーストを含む)を無効化するには、`"auto-update-checker"` を追加してください。
798
+
798
799
  ### MCPs
799
800
 
800
801
  コンテキスト7、Exa、grep.app MCP がデフォルトで有効になっています。
@@ -845,7 +846,8 @@ OpenCode でサポートされるすべての LSP 構成およびカスタム設
845
846
  "experimental": {
846
847
  "aggressive_truncation": true,
847
848
  "auto_resume": true,
848
- "truncate_all_tool_outputs": false
849
+ "truncate_all_tool_outputs": false,
850
+ "dcp_on_compaction_failure": true
849
851
  }
850
852
  }
851
853
  ```
@@ -855,6 +857,7 @@ OpenCode でサポートされるすべての LSP 構成およびカスタム設
855
857
  | `aggressive_truncation` | `false` | トークン制限を超えた場合、ツール出力を積極的に切り詰めて制限内に収めます。デフォルトの切り詰めより積極的です。不十分な場合は要約/復元にフォールバックします。 |
856
858
  | `auto_resume` | `false` | thinking block エラーや thinking disabled violation からの回復成功後、自動的にセッションを再開します。最後のユーザーメッセージを抽出して続行します。 |
857
859
  | `truncate_all_tool_outputs` | `true` | プロンプトが長くなりすぎるのを防ぐため、コンテキストウィンドウの使用状況に基づいてすべてのツール出力を動的に切り詰めます。完全なツール出力が必要な場合は`false`に設定して無効化します。 |
860
+ | `dcp_on_compaction_failure` | `false` | 有効にすると、DCP(Dynamic Context Pruning)はコンパクション(要約)が失敗した後にのみ実行され、その後コンパクションを再試行します。通常時は DCP は実行されません。トークン制限に達した際によりスマートな回復が必要な場合は有効にしてください。 |
858
861
 
859
862
  **警告**:これらの機能は実験的であり、予期しない動作を引き起こす可能性があります。影響を理解した場合にのみ有効にしてください。
860
863
 
@@ -902,11 +905,16 @@ OpenCode が Debian / ArchLinux だとしたら、Oh My OpenCode は Ubuntu / [O
902
905
  - [修正 PR](https://github.com/sst/opencode/pull/5040) は 1.0.132 以降にマージされたため、新しいバージョンを使用してください。
903
906
  - 余談:この PR も、OhMyOpenCode の Librarian、Explore、Oracle セットアップを活用して偶然発見され、修正されました。
904
907
 
905
- *素晴らしいヒーロー画像を作成してくれた [@junhoyeo](https://github.com/junhoyeo) に感謝します*
906
-
907
908
  ## こちらの企業の専門家にご愛用いただいています
908
909
 
909
910
  - [Indent](https://indentcorp.com)
910
911
  - Making Spray - influencer marketing solution, vovushop - crossborder commerce platform, vreview - ai commerce review marketing solution
911
912
  - [Google](https://google.com)
912
913
  - [Microsoft](https://microsoft.com)
914
+
915
+ ## スポンサー
916
+ - **Numman Ali** [GitHub](https://github.com/numman-ali) [X](https://x.com/nummanali)
917
+ - 最初のスポンサー
918
+ - **Aaron Iker** [GitHub](https://github.com/aaroniker) [X](https://x.com/aaroniker)
919
+
920
+ *素晴らしいヒーロー画像を作成してくれた [@junhoyeo](https://github.com/junhoyeo) に感謝します*
package/README.ko.md CHANGED
@@ -595,8 +595,7 @@ Oh My OpenCode는 다음 위치의 훅을 읽고 실행합니다:
595
595
  - **Agent Usage Reminder**: 검색 도구를 직접 호출할 때, 백그라운드 작업을 통한 전문 에이전트 활용을 권장하는 리마인더를 표시합니다.
596
596
  - **Anthropic Auto Compact**: Claude 모델이 토큰 제한에 도달하면 자동으로 세션을 요약하고 압축합니다. 수동 개입 없이 작업을 계속할 수 있습니다.
597
597
  - **Session Recovery**: 세션 에러(누락된 도구 결과, thinking 블록 문제, 빈 메시지 등)에서 자동 복구합니다. 돌다가 세션이 망가지지 않습니다. 망가져도 복구됩니다.
598
- - **Auto Update Checker**: oh-my-opencode의 새 버전이 출시되면 알림을 표시합니다.
599
- - **Startup Toast**: OhMyOpenCode 로드 시 환영 메시지를 표시합니다. 세션을 제대로 시작하기 위한 작은 "oMoMoMo".
598
+ - **Auto Update Checker**: oh-my-opencode의 새 버전을 자동으로 확인하고 설정을 자동 업데이트할 수 있습니다. 현재 버전과 Sisyphus 상태를 표시하는 시작 토스트 알림을 표시합니다 (Sisyphus 활성화 시 "Sisyphus on steroids is steering OpenCode", 비활성화 시 "OpenCode is now on Steroids. oMoMoMoMo..."). 모든 기능을 비활성화하려면 `disabled_hooks`에 `"auto-update-checker"`를, 토스트 알림만 비활성화하려면 `"startup-toast"`를 추가하세요. [설정 > 훅](#훅) 참조.
600
599
  - **Background Notification**: 백그라운드 에이전트 작업이 완료되면 알림을 받습니다.
601
600
  - **Session Notification**: 에이전트가 대기 상태가 되면 OS 알림을 보냅니다. macOS, Linux, Windows에서 작동—에이전트가 입력을 기다릴 때 놓치지 마세요.
602
601
  - **Empty Task Response Detector**: Task 도구가 빈 응답을 반환하면 감지합니다. 이미 빈 응답이 왔는데 무한정 기다리는 상황을 방지합니다.
@@ -789,6 +788,8 @@ Schema 자동 완성이 지원됩니다:
789
788
 
790
789
  사용 가능한 훅: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `tool-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`, `interactive-bash-session`, `empty-message-sanitizer`
791
790
 
791
+ **`auto-update-checker`와 `startup-toast`에 대한 참고사항**: `startup-toast` 훅은 `auto-update-checker`의 하위 기능입니다. 업데이트 확인은 유지하면서 시작 토스트 알림만 비활성화하려면 `disabled_hooks`에 `"startup-toast"`를 추가하세요. 모든 업데이트 확인 기능(토스트 포함)을 비활성화하려면 `"auto-update-checker"`를 추가하세요.
792
+
792
793
  ### MCPs
793
794
 
794
795
  기본적으로 Context7, Exa, grep.app MCP 를 지원합니다.
@@ -839,7 +840,8 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js
839
840
  "experimental": {
840
841
  "aggressive_truncation": true,
841
842
  "auto_resume": true,
842
- "truncate_all_tool_outputs": false
843
+ "truncate_all_tool_outputs": false,
844
+ "dcp_on_compaction_failure": true
843
845
  }
844
846
  }
845
847
  ```
@@ -849,6 +851,7 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js
849
851
  | `aggressive_truncation` | `false` | 토큰 제한을 초과하면 도구 출력을 공격적으로 잘라내어 제한 내에 맞춥니다. 기본 truncation보다 더 공격적입니다. 부족하면 요약/복구로 fallback합니다. |
850
852
  | `auto_resume` | `false` | thinking block 에러나 thinking disabled violation으로부터 성공적으로 복구한 후 자동으로 세션을 재개합니다. 마지막 사용자 메시지를 추출하여 계속합니다. |
851
853
  | `truncate_all_tool_outputs` | `true` | 프롬프트가 너무 길어지는 것을 방지하기 위해 컨텍스트 윈도우 사용량에 따라 모든 도구 출력을 동적으로 잘라냅니다. 전체 도구 출력이 필요한 경우 `false`로 설정하여 비활성화하세요. |
854
+ | `dcp_on_compaction_failure` | `false` | 활성화하면, DCP(Dynamic Context Pruning)가 compaction(요약) 실패 후에만 실행되고 compaction을 재시도합니다. DCP는 평소에는 실행되지 않습니다. 토큰 제한에 도달했을 때 더 스마트한 복구를 원하면 활성화하세요. |
852
855
 
853
856
  **경고**: 이 기능들은 실험적이며 예상치 못한 동작을 유발할 수 있습니다. 의미를 이해한 경우에만 활성화하세요.
854
857
 
@@ -896,11 +899,16 @@ OpenCode 를 사용하여 이 프로젝트의 99% 를 작성했습니다. 기능
896
899
  - [이를 고치는 PR 이 1.0.132 배포 이후에 병합되었으므로](https://github.com/sst/opencode/pull/5040) 이 변경사항이 포함된 최신 버전을 사용해주세요.
897
900
  - TMI: PR 도 OhMyOpenCode 의 셋업의 Librarian, Explore, Oracle 을 활용하여 우연히 발견하고 해결되었습니다.
898
901
 
899
- *멋진 히어로 이미지를 만들어주신 히어로 [@junhoyeo](https://github.com/junhoyeo) 께 감사드립니다*
900
-
901
902
  ## 다음 기업의 능력있는 개인들이 사용하고 있습니다
902
903
 
903
904
  - [Indent](https://indentcorp.com)
904
905
  - Making Spray - influencer marketing solution, vovushop - crossborder commerce platform, vreview - ai commerce review marketing solution
905
906
  - [Google](https://google.com)
906
907
  - [Microsoft](https://microsoft.com)
908
+
909
+ ## 스폰서
910
+ - **Numman Ali** [GitHub](https://github.com/numman-ali) [X](https://x.com/nummanali)
911
+ - 첫 번째 스폰서
912
+ - **Aaron Iker** [GitHub](https://github.com/aaroniker) [X](https://x.com/aaroniker)
913
+
914
+ *멋진 히어로 이미지를 만들어주신 히어로 [@junhoyeo](https://github.com/junhoyeo) 께 감사드립니다*
package/README.md CHANGED
@@ -667,8 +667,7 @@ When agents thrive, you thrive. But I want to help you directly too.
667
667
  - **Agent Usage Reminder**: When you call search tools directly, reminds you to leverage specialized agents via background tasks for better results.
668
668
  - **Anthropic Auto Compact**: When Claude models hit token limits, automatically summarizes and compacts the session—no manual intervention needed.
669
669
  - **Session Recovery**: Automatically recovers from session errors (missing tool results, thinking block issues, empty messages). Sessions don't crash mid-run. Even if they do, they recover.
670
- - **Auto Update Checker**: Notifies you when a new version of oh-my-opencode is available.
671
- - **Startup Toast**: Shows a welcome message when OhMyOpenCode loads. A little "oMoMoMo" to start your session right.
670
+ - **Auto Update Checker**: Automatically checks for new versions of oh-my-opencode and can auto-update your configuration. Shows startup toast notifications displaying current version and Sisyphus status ("Sisyphus on steroids is steering OpenCode" when enabled, or "OpenCode is now on Steroids. oMoMoMoMo..." otherwise). Disable all features with `"auto-update-checker"` in `disabled_hooks`, or disable just toast notifications with `"startup-toast"` in `disabled_hooks`. See [Configuration > Hooks](#hooks).
672
671
  - **Background Notification**: Get notified when background agent tasks complete.
673
672
  - **Session Notification**: Sends OS notifications when agents go idle. Works on macOS, Linux, and Windows—never miss when your agent needs input.
674
673
  - **Empty Task Response Detector**: Catches when Task tool returns nothing. Warns you about potential agent failures so you don't wait forever for a response that already came back empty.
@@ -697,6 +696,36 @@ Schema autocomplete supported:
697
696
  }
698
697
  ```
699
698
 
699
+ ### JSONC Support
700
+
701
+ The `oh-my-opencode` configuration file supports JSONC (JSON with Comments):
702
+ - Line comments: `// comment`
703
+ - Block comments: `/* comment */`
704
+ - Trailing commas: `{ "key": "value", }`
705
+
706
+ When both `oh-my-opencode.jsonc` and `oh-my-opencode.json` files exist, `.jsonc` takes priority.
707
+
708
+ **Example with comments:**
709
+
710
+ ```jsonc
711
+ {
712
+ "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
713
+
714
+ // Enable Google Gemini via Antigravity OAuth
715
+ "google_auth": false,
716
+
717
+ /* Agent overrides - customize models for specific tasks */
718
+ "agents": {
719
+ "oracle": {
720
+ "model": "openai/gpt-5.2" // GPT for strategic reasoning
721
+ },
722
+ "explore": {
723
+ "model": "opencode/grok-code" // Free & fast for exploration
724
+ },
725
+ },
726
+ }
727
+ ```
728
+
700
729
  ### Google Auth
701
730
 
702
731
  **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).
@@ -861,6 +890,8 @@ Disable specific built-in hooks via `disabled_hooks` in `~/.config/opencode/oh-m
861
890
 
862
891
  Available hooks: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `tool-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`, `interactive-bash-session`, `empty-message-sanitizer`
863
892
 
893
+ **Note on `auto-update-checker` and `startup-toast`**: The `startup-toast` hook is a sub-feature of `auto-update-checker`. To disable only the startup toast notification while keeping update checking enabled, add `"startup-toast"` to `disabled_hooks`. To disable all update checking features (including the toast), add `"auto-update-checker"` to `disabled_hooks`.
894
+
864
895
  ### MCPs
865
896
 
866
897
  Context7, Exa, and grep.app MCP enabled by default.
@@ -911,7 +942,8 @@ Opt-in experimental features that may change or be removed in future versions. U
911
942
  "experimental": {
912
943
  "aggressive_truncation": true,
913
944
  "auto_resume": true,
914
- "truncate_all_tool_outputs": false
945
+ "truncate_all_tool_outputs": false,
946
+ "dcp_on_compaction_failure": true
915
947
  }
916
948
  }
917
949
  ```
@@ -921,6 +953,7 @@ Opt-in experimental features that may change or be removed in future versions. U
921
953
  | `aggressive_truncation` | `false` | When token limit is exceeded, aggressively truncates tool outputs to fit within limits. More aggressive than the default truncation behavior. Falls back to summarize/revert if insufficient. |
922
954
  | `auto_resume` | `false` | Automatically resumes session after successful recovery from thinking block errors or thinking disabled violations. Extracts the last user message and continues. |
923
955
  | `truncate_all_tool_outputs` | `true` | Dynamically truncates ALL tool outputs based on context window usage to prevent prompts from becoming too long. Disable by setting to `false` if you need full tool outputs. |
956
+ | `dcp_on_compaction_failure` | `false` | When enabled, Dynamic Context Pruning (DCP) runs only after compaction (summarize) fails, then retries compaction. DCP does NOT run during normal operations. Enable this for smarter recovery when hitting token limits. |
924
957
 
925
958
  **Warning**: These features are experimental and may cause unexpected behavior. Enable only if you understand the implications.
926
959
 
@@ -968,11 +1001,16 @@ I have no affiliation with any project or model mentioned here. This is purely p
968
1001
  - [The fix](https://github.com/sst/opencode/pull/5040) was merged after 1.0.132—use a newer version.
969
1002
  - Fun fact: That PR was discovered and fixed thanks to OhMyOpenCode's Librarian, Explore, and Oracle setup.
970
1003
 
971
- *Special thanks to [@junhoyeo](https://github.com/junhoyeo) for this amazing hero image.*
972
-
973
1004
  ## Loved by professionals at
974
1005
 
975
1006
  - [Indent](https://indentcorp.com)
976
1007
  - Making Spray - influencer marketing solution, vovushop - crossborder commerce platform, vreview - ai commerce review marketing solution
977
1008
  - [Google](https://google.com)
978
1009
  - [Microsoft](https://microsoft.com)
1010
+
1011
+ ## Sponsors
1012
+ - **Numman Ali** [GitHub](https://github.com/numman-ali) [X](https://x.com/nummanali)
1013
+ - The first sponsor
1014
+ - **Aaron Iker** [GitHub](https://github.com/aaroniker) [X](https://x.com/aaroniker)
1015
+
1016
+ *Special thanks to [@junhoyeo](https://github.com/junhoyeo) for this amazing hero image.*
package/README.zh-cn.md CHANGED
@@ -606,8 +606,7 @@ Agent 爽了,你自然也爽。但我还想直接让你爽。
606
606
  - **Agent 使用提醒**:你自己搜东西的时候,弹窗提醒你"这种事让后台专业 Agent 干更好"。
607
607
  - **Anthropic 自动压缩**:Claude Token 爆了?自动总结压缩会话——不用你操心。
608
608
  - **会话恢复**:工具没结果?Thinking 卡住?消息是空的?自动恢复。会话崩不了,崩了也能救回来。
609
- - **自动更新检查**:oh-my-opencode 更新了会告诉你。
610
- - **启动提示**:加载时来句"oMoMoMo",开启元气满满的一次会话。
609
+ - **自动更新检查**:自动检查 oh-my-opencode 新版本并可自动更新配置。显示启动提示通知,展示当前版本和 Sisyphus 状态(Sisyphus 启用时显示「Sisyphus on steroids is steering OpenCode」,禁用时显示「OpenCode is now on Steroids. oMoMoMoMo...」)。要禁用全部功能,在 `disabled_hooks` 中添加 `"auto-update-checker"`;只禁用提示通知,添加 `"startup-toast"`。详见 [配置 > Hooks](#hooks)。
611
610
  - **后台通知**:后台 Agent 活儿干完了告诉你。
612
611
  - **会话通知**:Agent 没事干了发系统通知。macOS、Linux、Windows 通吃——别让 Agent 等你。
613
612
  - **空 Task 响应检测**:Task 工具回了个寂寞?立马报警,别傻傻等一个永远不会来的响应。
@@ -795,6 +794,8 @@ Sisyphus Agent 也能自定义:
795
794
 
796
795
  可关的 hook:`todo-continuation-enforcer`、`context-window-monitor`、`session-recovery`、`session-notification`、`comment-checker`、`grep-output-truncator`、`tool-output-truncator`、`directory-agents-injector`、`directory-readme-injector`、`empty-task-response-detector`、`think-mode`、`anthropic-auto-compact`、`rules-injector`、`background-notification`、`auto-update-checker`、`startup-toast`、`keyword-detector`、`agent-usage-reminder`、`non-interactive-env`、`interactive-bash-session`、`empty-message-sanitizer`
797
796
 
797
+ **关于 `auto-update-checker` 和 `startup-toast`**: `startup-toast` hook 是 `auto-update-checker` 的子功能。若想保持更新检查但只禁用启动提示通知,在 `disabled_hooks` 中添加 `"startup-toast"`。若要禁用所有更新检查功能(包括提示),添加 `"auto-update-checker"`。
798
+
798
799
  ### MCPs
799
800
 
800
801
  默认送你 Context7、Exa 和 grep.app MCP。
@@ -845,7 +846,8 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
845
846
  "experimental": {
846
847
  "aggressive_truncation": true,
847
848
  "auto_resume": true,
848
- "truncate_all_tool_outputs": false
849
+ "truncate_all_tool_outputs": false,
850
+ "dcp_on_compaction_failure": true
849
851
  }
850
852
  }
851
853
  ```
@@ -855,6 +857,7 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
855
857
  | `aggressive_truncation` | `false` | 超出 token 限制时,激进地截断工具输出以适应限制。比默认截断更激进。不够的话会回退到摘要/恢复。 |
856
858
  | `auto_resume` | `false` | 从 thinking block 错误或 thinking disabled violation 成功恢复后,自动恢复会话。提取最后一条用户消息继续执行。 |
857
859
  | `truncate_all_tool_outputs` | `true` | 为防止提示过长,根据上下文窗口使用情况动态截断所有工具输出。如需完整工具输出,设置为 `false` 禁用此功能。 |
860
+ | `dcp_on_compaction_failure` | `false` | 启用后,DCP(动态上下文剪枝)仅在压缩(摘要)失败后运行,然后重试压缩。平时 DCP 不会运行。当达到 token 限制时需要更智能的恢复请启用此选项。 |
858
861
 
859
862
  **警告**:这些功能是实验性的,可能会导致意外行为。只有在理解其影响的情况下才启用。
860
863
 
@@ -901,11 +904,16 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
901
904
  - [修复 PR](https://github.com/sst/opencode/pull/5040) 在 1.0.132 之后才合进去——请用新版本。
902
905
  - 花絮:这 bug 也是靠 OhMyOpenCode 的 Librarian、Explore、Oracle 配合发现并修好的。
903
906
 
904
- *感谢 [@junhoyeo](https://github.com/junhoyeo) 制作了这张超帅的 hero 图。*
905
-
906
907
  ## 以下企业的专业人士都在用
907
908
 
908
909
  - [Indent](https://indentcorp.com)
909
910
  - Making Spray - influencer marketing solution, vovushop - crossborder commerce platform, vreview - ai commerce review marketing solution
910
911
  - [Google](https://google.com)
911
912
  - [Microsoft](https://microsoft.com)
913
+
914
+ ## 赞助者
915
+ - **Numman Ali** [GitHub](https://github.com/numman-ali) [X](https://x.com/nummanali)
916
+ - 第一位赞助者
917
+ - **Aaron Iker** [GitHub](https://github.com/aaroniker) [X](https://x.com/aaroniker)
918
+
919
+ *感谢 [@junhoyeo](https://github.com/junhoyeo) 制作了这张超帅的 hero 图。*
@@ -0,0 +1,3 @@
1
+ import type { VersionInfo } from "./types";
2
+ export declare function formatVersionOutput(info: VersionInfo): string;
3
+ export declare function formatJsonOutput(info: VersionInfo): string;
@@ -0,0 +1,3 @@
1
+ import type { GetLocalVersionOptions } from "./types";
2
+ export declare function getLocalVersion(options?: GetLocalVersionOptions): Promise<number>;
3
+ export * from "./types";
@@ -0,0 +1,13 @@
1
+ export interface VersionInfo {
2
+ currentVersion: string | null;
3
+ latestVersion: string | null;
4
+ isUpToDate: boolean;
5
+ isLocalDev: boolean;
6
+ isPinned: boolean;
7
+ pinnedVersion: string | null;
8
+ status: "up-to-date" | "outdated" | "local-dev" | "pinned" | "error" | "unknown";
9
+ }
10
+ export interface GetLocalVersionOptions {
11
+ directory?: string;
12
+ json?: boolean;
13
+ }