oh-my-opencode 2.5.2 → 2.5.4
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 +49 -15
- package/README.ko.md +48 -14
- package/README.md +49 -15
- package/README.zh-cn.md +49 -15
- package/dist/agents/build-prompt.d.ts +31 -0
- package/dist/cli/index.js +1823 -1
- package/dist/cli/run/completion.d.ts +2 -0
- package/dist/cli/run/completion.test.d.ts +1 -0
- package/dist/cli/run/events.d.ts +11 -0
- package/dist/cli/run/events.test.d.ts +1 -0
- package/dist/cli/run/index.d.ts +2 -0
- package/dist/cli/run/runner.d.ts +2 -0
- package/dist/cli/run/types.d.ts +71 -0
- package/dist/config/schema.d.ts +103 -2
- package/dist/features/background-agent/types.d.ts +8 -0
- package/dist/hooks/anthropic-auto-compact/executor.test.d.ts +1 -0
- package/dist/index.js +1126 -510
- package/dist/shared/data-path.d.ts +15 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/tools/index.d.ts +52 -0
- package/dist/tools/session-manager/constants.d.ts +11 -0
- package/dist/tools/session-manager/index.d.ts +3 -0
- package/dist/tools/session-manager/storage.d.ts +8 -0
- package/dist/tools/session-manager/storage.test.d.ts +1 -0
- package/dist/tools/session-manager/tools.d.ts +52 -0
- package/dist/tools/session-manager/tools.test.d.ts +1 -0
- package/dist/tools/session-manager/types.d.ts +71 -0
- package/dist/tools/session-manager/utils.d.ts +11 -0
- package/dist/tools/session-manager/utils.test.d.ts +1 -0
- package/package.json +2 -1
package/README.ja.md
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
|
|
57
57
|
> "Oh My Opencodeは頂点に立っています、敵はいません" — [RyanOnThePath](https://x.com/RyanOnThePath/status/2001438321252118548)
|
|
58
58
|
|
|
59
|
+
> "シジフォスという名前自体が美しいじゃないですか?" — Sigrid ([@sigridjin_eth](https://x.com/sigridjin_eth))
|
|
60
|
+
|
|
59
61
|
---
|
|
60
62
|
|
|
61
63
|
## 目次
|
|
@@ -714,24 +716,48 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
|
|
|
714
716
|
|
|
715
717
|
### Sisyphus Agent
|
|
716
718
|
|
|
717
|
-
有効時(デフォルト)、Sisyphus
|
|
719
|
+
有効時(デフォルト)、Sisyphus はオプションの特殊エージェントを備えた強力なオーケストレーターを提供します:
|
|
718
720
|
|
|
719
721
|
- **Sisyphus**: プライマリオーケストレーターエージェント (Claude Opus 4.5)
|
|
720
|
-
- **
|
|
721
|
-
- **
|
|
722
|
-
- **plan**: サブエージェントに降格
|
|
722
|
+
- **Builder-Sisyphus**: OpenCode のデフォルトビルドエージェント(SDK 制限により名前変更、デフォルトで無効)
|
|
723
|
+
- **Planner-Sisyphus**: OpenCode のデフォルトプランエージェント(SDK 制限により名前変更、デフォルトで有効)
|
|
723
724
|
|
|
724
|
-
|
|
725
|
+
**設定オプション:**
|
|
725
726
|
|
|
726
727
|
```json
|
|
727
728
|
{
|
|
728
|
-
"
|
|
729
|
+
"sisyphus_agent": {
|
|
730
|
+
"disabled": false,
|
|
731
|
+
"default_builder_enabled": false,
|
|
732
|
+
"planner_enabled": true,
|
|
733
|
+
"replace_plan": true
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
**例:Builder-Sisyphus を有効化:**
|
|
739
|
+
|
|
740
|
+
```json
|
|
741
|
+
{
|
|
742
|
+
"sisyphus_agent": {
|
|
743
|
+
"default_builder_enabled": true
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
これにより、Sisyphus と並行して Builder-Sisyphus エージェントを有効化できます。Sisyphus が有効な場合、デフォルトのビルドエージェントは常にサブエージェントモードに降格されます。
|
|
749
|
+
|
|
750
|
+
**例:すべての Sisyphus オーケストレーションを無効化:**
|
|
751
|
+
|
|
752
|
+
```json
|
|
753
|
+
{
|
|
754
|
+
"sisyphus_agent": {
|
|
729
755
|
"disabled": true
|
|
730
756
|
}
|
|
731
757
|
}
|
|
732
758
|
```
|
|
733
759
|
|
|
734
|
-
他のエージェント同様、Sisyphus
|
|
760
|
+
他のエージェント同様、Sisyphus エージェントもカスタマイズ可能です:
|
|
735
761
|
|
|
736
762
|
```json
|
|
737
763
|
{
|
|
@@ -740,6 +766,9 @@ Sisyphus を無効化して元の build/plan エージェントを復元する
|
|
|
740
766
|
"model": "anthropic/claude-sonnet-4",
|
|
741
767
|
"temperature": 0.3
|
|
742
768
|
},
|
|
769
|
+
"Builder-Sisyphus": {
|
|
770
|
+
"model": "anthropic/claude-opus-4"
|
|
771
|
+
},
|
|
743
772
|
"Planner-Sisyphus": {
|
|
744
773
|
"model": "openai/gpt-5.2"
|
|
745
774
|
}
|
|
@@ -747,9 +776,12 @@ Sisyphus を無効化して元の build/plan エージェントを復元する
|
|
|
747
776
|
}
|
|
748
777
|
```
|
|
749
778
|
|
|
750
|
-
| オプション
|
|
751
|
-
|
|
752
|
-
| `disabled`
|
|
779
|
+
| オプション | デフォルト | 説明 |
|
|
780
|
+
| --------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
781
|
+
| `disabled` | `false` | `true` の場合、すべての Sisyphus オーケストレーションを無効化し、元の build/plan をプライマリとして復元します。 |
|
|
782
|
+
| `default_builder_enabled` | `false` | `true` の場合、Builder-Sisyphus エージェントを有効化します(OpenCode build と同じ、SDK 制限により名前変更)。デフォルトでは無効です。 |
|
|
783
|
+
| `planner_enabled` | `true` | `true` の場合、Planner-Sisyphus エージェントを有効化します(OpenCode plan と同じ、SDK 制限により名前変更)。デフォルトで有効です。 |
|
|
784
|
+
| `replace_plan` | `true` | `true` の場合、デフォルトのプランエージェントをサブエージェントモードに降格させます。`false` に設定すると、Planner-Sisyphus とデフォルトのプランの両方を利用できます。 |
|
|
753
785
|
|
|
754
786
|
### Hooks
|
|
755
787
|
|
|
@@ -812,15 +844,17 @@ OpenCode でサポートされるすべての LSP 構成およびカスタム設
|
|
|
812
844
|
{
|
|
813
845
|
"experimental": {
|
|
814
846
|
"aggressive_truncation": true,
|
|
815
|
-
"auto_resume": true
|
|
847
|
+
"auto_resume": true,
|
|
848
|
+
"truncate_all_tool_outputs": false
|
|
816
849
|
}
|
|
817
850
|
}
|
|
818
851
|
```
|
|
819
852
|
|
|
820
|
-
| オプション
|
|
821
|
-
|
|
|
822
|
-
| `aggressive_truncation`
|
|
823
|
-
| `auto_resume`
|
|
853
|
+
| オプション | デフォルト | 説明 |
|
|
854
|
+
| --------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
855
|
+
| `aggressive_truncation` | `false` | トークン制限を超えた場合、ツール出力を積極的に切り詰めて制限内に収めます。デフォルトの切り詰めより積極的です。不十分な場合は要約/復元にフォールバックします。 |
|
|
856
|
+
| `auto_resume` | `false` | thinking block エラーや thinking disabled violation からの回復成功後、自動的にセッションを再開します。最後のユーザーメッセージを抽出して続行します。 |
|
|
857
|
+
| `truncate_all_tool_outputs` | `true` | プロンプトが長くなりすぎるのを防ぐため、コンテキストウィンドウの使用状況に基づいてすべてのツール出力を動的に切り詰めます。完全なツール出力が必要な場合は`false`に設定して無効化します。 |
|
|
824
858
|
|
|
825
859
|
**警告**:これらの機能は実験的であり、予期しない動作を引き起こす可能性があります。影響を理解した場合にのみ有効にしてください。
|
|
826
860
|
|
package/README.ko.md
CHANGED
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
|
|
54
54
|
> "Oh My Opencode는 독보적입니다, 경쟁자가 없습니다" — [RyanOnThePath](https://x.com/RyanOnThePath/status/2001438321252118548)
|
|
55
55
|
|
|
56
|
+
> "시지푸스 이름 자체가 이쁘잖아요?" — Sigrid ([@sigridjin_eth](https://x.com/sigridjin_eth))
|
|
57
|
+
|
|
56
58
|
---
|
|
57
59
|
|
|
58
60
|
## 목차
|
|
@@ -708,14 +710,38 @@ Schema 자동 완성이 지원됩니다:
|
|
|
708
710
|
|
|
709
711
|
### Sisyphus Agent
|
|
710
712
|
|
|
711
|
-
활성화 시(기본값),
|
|
713
|
+
활성화 시 (기본값), Sisyphus는 옵션으로 선택 가능한 특화 에이전트들과 함께 강력한 오케스트레이터를 제공합니다:
|
|
712
714
|
|
|
713
715
|
- **Sisyphus**: Primary 오케스트레이터 에이전트 (Claude Opus 4.5)
|
|
714
|
-
- **
|
|
715
|
-
- **
|
|
716
|
-
|
|
716
|
+
- **Builder-Sisyphus**: OpenCode 기본 빌드 에이전트 (SDK 제한으로 이름만 변경, 기본적으로 비활성화)
|
|
717
|
+
- **Planner-Sisyphus**: OpenCode 기본 플랜 에이전트 (SDK 제한으로 이름만 변경, 기본적으로 활성화)
|
|
718
|
+
|
|
719
|
+
**설정 옵션:**
|
|
720
|
+
|
|
721
|
+
```json
|
|
722
|
+
{
|
|
723
|
+
"sisyphus_agent": {
|
|
724
|
+
"disabled": false,
|
|
725
|
+
"default_builder_enabled": false,
|
|
726
|
+
"planner_enabled": true,
|
|
727
|
+
"replace_plan": true
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
```
|
|
717
731
|
|
|
718
|
-
Sisyphus
|
|
732
|
+
**예시: Builder-Sisyphus 활성화하기:**
|
|
733
|
+
|
|
734
|
+
```json
|
|
735
|
+
{
|
|
736
|
+
"sisyphus_agent": {
|
|
737
|
+
"default_builder_enabled": true
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
이렇게 하면 Sisyphus와 함께 Builder-Sisyphus 에이전트를 활성화할 수 있습니다. Sisyphus가 활성화되면 기본 빌드 에이전트는 항상 subagent 모드로 강등됩니다.
|
|
743
|
+
|
|
744
|
+
**예시: 모든 Sisyphus 오케스트레이션 비활성화:**
|
|
719
745
|
|
|
720
746
|
```json
|
|
721
747
|
{
|
|
@@ -725,7 +751,7 @@ Sisyphus 를 비활성화하고 원래 build/plan 에이전트를 복원하려
|
|
|
725
751
|
}
|
|
726
752
|
```
|
|
727
753
|
|
|
728
|
-
다른 에이전트처럼 Sisyphus
|
|
754
|
+
다른 에이전트처럼 Sisyphus 에이전트들도 커스터마이징할 수 있습니다:
|
|
729
755
|
|
|
730
756
|
```json
|
|
731
757
|
{
|
|
@@ -734,6 +760,9 @@ Sisyphus 를 비활성화하고 원래 build/plan 에이전트를 복원하려
|
|
|
734
760
|
"model": "anthropic/claude-sonnet-4",
|
|
735
761
|
"temperature": 0.3
|
|
736
762
|
},
|
|
763
|
+
"Builder-Sisyphus": {
|
|
764
|
+
"model": "anthropic/claude-opus-4"
|
|
765
|
+
},
|
|
737
766
|
"Planner-Sisyphus": {
|
|
738
767
|
"model": "openai/gpt-5.2"
|
|
739
768
|
}
|
|
@@ -741,9 +770,12 @@ Sisyphus 를 비활성화하고 원래 build/plan 에이전트를 복원하려
|
|
|
741
770
|
}
|
|
742
771
|
```
|
|
743
772
|
|
|
744
|
-
| 옵션
|
|
745
|
-
|
|
|
746
|
-
| `disabled`
|
|
773
|
+
| 옵션 | 기본값 | 설명 |
|
|
774
|
+
| --------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
775
|
+
| `disabled` | `false` | `true`면 모든 Sisyphus 오케스트레이션을 비활성화하고 원래 build/plan을 primary로 복원합니다. |
|
|
776
|
+
| `default_builder_enabled` | `false` | `true`면 Builder-Sisyphus 에이전트를 활성화합니다 (OpenCode build와 동일, SDK 제한으로 이름만 변경). 기본적으로 비활성화되어 있습니다. |
|
|
777
|
+
| `planner_enabled` | `true` | `true`면 Planner-Sisyphus 에이전트를 활성화합니다 (OpenCode plan과 동일, SDK 제한으로 이름만 변경). 기본적으로 활성화되어 있습니다. |
|
|
778
|
+
| `replace_plan` | `true` | `true`면 기본 플랜 에이전트를 subagent 모드로 강등시킵니다. `false`로 설정하면 Planner-Sisyphus와 기본 플랜을 모두 사용할 수 있습니다. |
|
|
747
779
|
|
|
748
780
|
### Hooks
|
|
749
781
|
|
|
@@ -806,15 +838,17 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js
|
|
|
806
838
|
{
|
|
807
839
|
"experimental": {
|
|
808
840
|
"aggressive_truncation": true,
|
|
809
|
-
"auto_resume": true
|
|
841
|
+
"auto_resume": true,
|
|
842
|
+
"truncate_all_tool_outputs": false
|
|
810
843
|
}
|
|
811
844
|
}
|
|
812
845
|
```
|
|
813
846
|
|
|
814
|
-
| 옵션
|
|
815
|
-
|
|
|
816
|
-
| `aggressive_truncation`
|
|
817
|
-
| `auto_resume`
|
|
847
|
+
| 옵션 | 기본값 | 설명 |
|
|
848
|
+
| --------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
849
|
+
| `aggressive_truncation` | `false` | 토큰 제한을 초과하면 도구 출력을 공격적으로 잘라내어 제한 내에 맞춥니다. 기본 truncation보다 더 공격적입니다. 부족하면 요약/복구로 fallback합니다. |
|
|
850
|
+
| `auto_resume` | `false` | thinking block 에러나 thinking disabled violation으로부터 성공적으로 복구한 후 자동으로 세션을 재개합니다. 마지막 사용자 메시지를 추출하여 계속합니다. |
|
|
851
|
+
| `truncate_all_tool_outputs` | `true` | 프롬프트가 너무 길어지는 것을 방지하기 위해 컨텍스트 윈도우 사용량에 따라 모든 도구 출력을 동적으로 잘라냅니다. 전체 도구 출력이 필요한 경우 `false`로 설정하여 비활성화하세요. |
|
|
818
852
|
|
|
819
853
|
**경고**: 이 기능들은 실험적이며 예상치 못한 동작을 유발할 수 있습니다. 의미를 이해한 경우에만 활성화하세요.
|
|
820
854
|
|
package/README.md
CHANGED
|
@@ -61,6 +61,8 @@ No stupid token consumption massive subagents here. No bloat tools here.
|
|
|
61
61
|
|
|
62
62
|
> "Oh My Opencode is king of the hill and has no contenders" — [RyanOnThePath](https://x.com/RyanOnThePath/status/2001438321252118548)
|
|
63
63
|
|
|
64
|
+
> "Isn't the name Sisyphus itself beautiful?" — Sigrid ([@sigridjin_eth](https://x.com/sigridjin_eth))
|
|
65
|
+
|
|
64
66
|
---
|
|
65
67
|
|
|
66
68
|
## Contents
|
|
@@ -780,24 +782,48 @@ Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `
|
|
|
780
782
|
|
|
781
783
|
### Sisyphus Agent
|
|
782
784
|
|
|
783
|
-
When enabled (default), Sisyphus
|
|
785
|
+
When enabled (default), Sisyphus provides a powerful orchestrator with optional specialized agents:
|
|
784
786
|
|
|
785
787
|
- **Sisyphus**: Primary orchestrator agent (Claude Opus 4.5)
|
|
786
|
-
- **
|
|
787
|
-
- **
|
|
788
|
-
- **plan**: Demoted to subagent
|
|
788
|
+
- **Builder-Sisyphus**: OpenCode's default build agent, renamed due to SDK limitations (disabled by default)
|
|
789
|
+
- **Planner-Sisyphus**: OpenCode's default plan agent, renamed due to SDK limitations (enabled by default)
|
|
789
790
|
|
|
790
|
-
|
|
791
|
+
**Configuration Options:**
|
|
791
792
|
|
|
792
793
|
```json
|
|
793
794
|
{
|
|
794
|
-
"
|
|
795
|
+
"sisyphus_agent": {
|
|
796
|
+
"disabled": false,
|
|
797
|
+
"default_builder_enabled": false,
|
|
798
|
+
"planner_enabled": true,
|
|
799
|
+
"replace_plan": true
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
**Example: Enable Builder-Sisyphus:**
|
|
805
|
+
|
|
806
|
+
```json
|
|
807
|
+
{
|
|
808
|
+
"sisyphus_agent": {
|
|
809
|
+
"default_builder_enabled": true
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
This enables Builder-Sisyphus agent alongside Sisyphus. The default build agent is always demoted to subagent mode when Sisyphus is enabled.
|
|
815
|
+
|
|
816
|
+
**Example: Disable all Sisyphus orchestration:**
|
|
817
|
+
|
|
818
|
+
```json
|
|
819
|
+
{
|
|
820
|
+
"sisyphus_agent": {
|
|
795
821
|
"disabled": true
|
|
796
822
|
}
|
|
797
823
|
}
|
|
798
824
|
```
|
|
799
825
|
|
|
800
|
-
You can also customize Sisyphus
|
|
826
|
+
You can also customize Sisyphus agents like other agents:
|
|
801
827
|
|
|
802
828
|
```json
|
|
803
829
|
{
|
|
@@ -806,6 +832,9 @@ You can also customize Sisyphus and Planner-Sisyphus like other agents:
|
|
|
806
832
|
"model": "anthropic/claude-sonnet-4",
|
|
807
833
|
"temperature": 0.3
|
|
808
834
|
},
|
|
835
|
+
"Builder-Sisyphus": {
|
|
836
|
+
"model": "anthropic/claude-opus-4"
|
|
837
|
+
},
|
|
809
838
|
"Planner-Sisyphus": {
|
|
810
839
|
"model": "openai/gpt-5.2"
|
|
811
840
|
}
|
|
@@ -813,9 +842,12 @@ You can also customize Sisyphus and Planner-Sisyphus like other agents:
|
|
|
813
842
|
}
|
|
814
843
|
```
|
|
815
844
|
|
|
816
|
-
| Option
|
|
817
|
-
|
|
|
818
|
-
| `disabled`
|
|
845
|
+
| Option | Default | Description |
|
|
846
|
+
| --------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
847
|
+
| `disabled` | `false` | When `true`, disables all Sisyphus orchestration and restores original build/plan as primary. |
|
|
848
|
+
| `default_builder_enabled` | `false` | When `true`, enables Builder-Sisyphus agent (same as OpenCode build, renamed due to SDK limitations). Disabled by default. |
|
|
849
|
+
| `planner_enabled` | `true` | When `true`, enables Planner-Sisyphus agent (same as OpenCode plan, renamed due to SDK limitations). Enabled by default. |
|
|
850
|
+
| `replace_plan` | `true` | When `true`, demotes default plan agent to subagent mode. Set to `false` to keep both Planner-Sisyphus and default plan available. |
|
|
819
851
|
|
|
820
852
|
### Hooks
|
|
821
853
|
|
|
@@ -878,15 +910,17 @@ Opt-in experimental features that may change or be removed in future versions. U
|
|
|
878
910
|
{
|
|
879
911
|
"experimental": {
|
|
880
912
|
"aggressive_truncation": true,
|
|
881
|
-
"auto_resume": true
|
|
913
|
+
"auto_resume": true,
|
|
914
|
+
"truncate_all_tool_outputs": false
|
|
882
915
|
}
|
|
883
916
|
}
|
|
884
917
|
```
|
|
885
918
|
|
|
886
|
-
| Option
|
|
887
|
-
|
|
|
888
|
-
| `aggressive_truncation`
|
|
889
|
-
| `auto_resume`
|
|
919
|
+
| Option | Default | Description |
|
|
920
|
+
| --------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
921
|
+
| `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
|
+
| `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
|
+
| `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. |
|
|
890
924
|
|
|
891
925
|
**Warning**: These features are experimental and may cause unexpected behavior. Enable only if you understand the implications.
|
|
892
926
|
|
package/README.zh-cn.md
CHANGED
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
|
|
59
59
|
> "Oh My Opencode 独孤求败,没有对手" — [RyanOnThePath](https://x.com/RyanOnThePath/status/2001438321252118548)
|
|
60
60
|
|
|
61
|
+
> "西西弗斯这个名字本身不就很美吗?" — Sigrid ([@sigridjin_eth](https://x.com/sigridjin_eth))
|
|
62
|
+
|
|
61
63
|
---
|
|
62
64
|
|
|
63
65
|
## 目录
|
|
@@ -714,24 +716,48 @@ Agent 爽了,你自然也爽。但我还想直接让你爽。
|
|
|
714
716
|
|
|
715
717
|
### Sisyphus Agent
|
|
716
718
|
|
|
717
|
-
默认开启。Sisyphus
|
|
719
|
+
默认开启。Sisyphus 提供一个强力的编排器,带可选的专门 Agent:
|
|
718
720
|
|
|
719
721
|
- **Sisyphus**:主编排 Agent(Claude Opus 4.5)
|
|
720
|
-
- **
|
|
721
|
-
- **
|
|
722
|
-
- **plan**:降级为子 Agent
|
|
722
|
+
- **Builder-Sisyphus**:OpenCode 默认构建 Agent(因 SDK 限制仅改名,默认禁用)
|
|
723
|
+
- **Planner-Sisyphus**:OpenCode 默认计划 Agent(因 SDK 限制仅改名,默认启用)
|
|
723
724
|
|
|
724
|
-
|
|
725
|
+
**配置选项:**
|
|
725
726
|
|
|
726
727
|
```json
|
|
727
728
|
{
|
|
728
|
-
"
|
|
729
|
+
"sisyphus_agent": {
|
|
730
|
+
"disabled": false,
|
|
731
|
+
"default_builder_enabled": false,
|
|
732
|
+
"planner_enabled": true,
|
|
733
|
+
"replace_plan": true
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
**示例:启用 Builder-Sisyphus:**
|
|
739
|
+
|
|
740
|
+
```json
|
|
741
|
+
{
|
|
742
|
+
"sisyphus_agent": {
|
|
743
|
+
"default_builder_enabled": true
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
这样能和 Sisyphus 一起启用 Builder-Sisyphus Agent。启用 Sisyphus 后,默认构建 Agent 总会降级为子 Agent 模式。
|
|
749
|
+
|
|
750
|
+
**示例:禁用所有 Sisyphus 编排:**
|
|
751
|
+
|
|
752
|
+
```json
|
|
753
|
+
{
|
|
754
|
+
"sisyphus_agent": {
|
|
729
755
|
"disabled": true
|
|
730
756
|
}
|
|
731
757
|
}
|
|
732
758
|
```
|
|
733
759
|
|
|
734
|
-
Sisyphus
|
|
760
|
+
Sisyphus Agent 也能自定义:
|
|
735
761
|
|
|
736
762
|
```json
|
|
737
763
|
{
|
|
@@ -740,6 +766,9 @@ Sisyphus 和 Planner-Sisyphus 也能自定义:
|
|
|
740
766
|
"model": "anthropic/claude-sonnet-4",
|
|
741
767
|
"temperature": 0.3
|
|
742
768
|
},
|
|
769
|
+
"Builder-Sisyphus": {
|
|
770
|
+
"model": "anthropic/claude-opus-4"
|
|
771
|
+
},
|
|
743
772
|
"Planner-Sisyphus": {
|
|
744
773
|
"model": "openai/gpt-5.2"
|
|
745
774
|
}
|
|
@@ -747,9 +776,12 @@ Sisyphus 和 Planner-Sisyphus 也能自定义:
|
|
|
747
776
|
}
|
|
748
777
|
```
|
|
749
778
|
|
|
750
|
-
| 选项
|
|
751
|
-
|
|
|
752
|
-
| `disabled`
|
|
779
|
+
| 选项 | 默认值 | 说明 |
|
|
780
|
+
| --------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
781
|
+
| `disabled` | `false` | 设为 `true` 就禁用所有 Sisyphus 编排,恢复原来的 build/plan。 |
|
|
782
|
+
| `default_builder_enabled` | `false` | 设为 `true` 就启用 Builder-Sisyphus Agent(与 OpenCode build 相同,因 SDK 限制仅改名)。默认禁用。 |
|
|
783
|
+
| `planner_enabled` | `true` | 设为 `true` 就启用 Planner-Sisyphus Agent(与 OpenCode plan 相同,因 SDK 限制仅改名)。默认启用。 |
|
|
784
|
+
| `replace_plan` | `true` | 设为 `true` 就把默认计划 Agent 降级为子 Agent 模式。设为 `false` 可以同时保留 Planner-Sisyphus 和默认计划。 |
|
|
753
785
|
|
|
754
786
|
### Hooks
|
|
755
787
|
|
|
@@ -812,15 +844,17 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
|
|
|
812
844
|
{
|
|
813
845
|
"experimental": {
|
|
814
846
|
"aggressive_truncation": true,
|
|
815
|
-
"auto_resume": true
|
|
847
|
+
"auto_resume": true,
|
|
848
|
+
"truncate_all_tool_outputs": false
|
|
816
849
|
}
|
|
817
850
|
}
|
|
818
851
|
```
|
|
819
852
|
|
|
820
|
-
| 选项
|
|
821
|
-
|
|
|
822
|
-
| `aggressive_truncation`
|
|
823
|
-
| `auto_resume`
|
|
853
|
+
| 选项 | 默认值 | 说明 |
|
|
854
|
+
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
855
|
+
| `aggressive_truncation` | `false` | 超出 token 限制时,激进地截断工具输出以适应限制。比默认截断更激进。不够的话会回退到摘要/恢复。 |
|
|
856
|
+
| `auto_resume` | `false` | 从 thinking block 错误或 thinking disabled violation 成功恢复后,自动恢复会话。提取最后一条用户消息继续执行。 |
|
|
857
|
+
| `truncate_all_tool_outputs` | `true` | 为防止提示过长,根据上下文窗口使用情况动态截断所有工具输出。如需完整工具输出,设置为 `false` 禁用此功能。 |
|
|
824
858
|
|
|
825
859
|
**警告**:这些功能是实验性的,可能会导致意外行为。只有在理解其影响的情况下才启用。
|
|
826
860
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode's default build agent system prompt.
|
|
3
|
+
*
|
|
4
|
+
* This prompt enables FULL EXECUTION mode for the build agent, allowing file
|
|
5
|
+
* modifications, command execution, and system changes while focusing on
|
|
6
|
+
* implementation and execution.
|
|
7
|
+
*
|
|
8
|
+
* Inspired by OpenCode's build agent behavior.
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/session/prompt/build-switch.txt
|
|
11
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L118-L125
|
|
12
|
+
*/
|
|
13
|
+
export declare const BUILD_SYSTEM_PROMPT = "<system-reminder>\n# Build Mode - System Reminder\n\nBUILD MODE ACTIVE - you are in EXECUTION phase. Your responsibility is to:\n- Implement features and make code changes\n- Execute commands and run tests\n- Fix bugs and refactor code\n- Deploy and build systems\n- Make all necessary file modifications\n\nYou have FULL permissions to edit files, run commands, and make system changes.\nThis is the implementation phase - execute decisively and thoroughly.\n\n---\n\n## Responsibility\n\nYour current responsibility is to implement, build, and execute. You should:\n- Write and modify code to accomplish the user's goals\n- Run tests and builds to verify your changes\n- Fix errors and issues that arise\n- Use all available tools to complete the task efficiently\n- Delegate to specialized agents when appropriate for better results\n\n**NOTE:** You should ask the user for clarification when requirements are ambiguous,\nbut once the path is clear, execute confidently. The goal is to deliver working,\ntested, production-ready solutions.\n\n---\n\n## Important\n\nThe user wants you to execute and implement. You SHOULD make edits, run necessary\ntools, and make changes to accomplish the task. Use your full capabilities to\ndeliver excellent results.\n</system-reminder>\n";
|
|
14
|
+
/**
|
|
15
|
+
* OpenCode's default build agent permission configuration.
|
|
16
|
+
*
|
|
17
|
+
* Allows the build agent full execution permissions:
|
|
18
|
+
* - edit: "ask" - Can modify files with confirmation
|
|
19
|
+
* - bash: "ask" - Can execute commands with confirmation
|
|
20
|
+
* - webfetch: "allow" - Can fetch web content
|
|
21
|
+
*
|
|
22
|
+
* This provides balanced permissions - powerful but with safety checks.
|
|
23
|
+
*
|
|
24
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L57-L68
|
|
25
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L118-L125
|
|
26
|
+
*/
|
|
27
|
+
export declare const BUILD_PERMISSION: {
|
|
28
|
+
edit: "ask";
|
|
29
|
+
bash: "ask";
|
|
30
|
+
webfetch: "allow";
|
|
31
|
+
};
|