oh-my-opencode 2.5.2 → 2.5.3
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 +50 -15
- package/README.ko.md +49 -14
- package/README.md +50 -15
- package/README.zh-cn.md +50 -15
- package/dist/agents/build-prompt.d.ts +31 -0
- package/dist/cli/index.js +1663 -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 +7 -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 +45 -0
- package/dist/config/schema.d.ts +105 -2
- package/dist/index.js +848 -285
- 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
|
@@ -714,24 +714,50 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
|
|
|
714
714
|
|
|
715
715
|
### Sisyphus Agent
|
|
716
716
|
|
|
717
|
-
有効時(デフォルト)、Sisyphus
|
|
717
|
+
有効時(デフォルト)、Sisyphus はオプションの特殊エージェントを備えた強力なオーケストレーターを提供します:
|
|
718
718
|
|
|
719
719
|
- **Sisyphus**: プライマリオーケストレーターエージェント (Claude Opus 4.5)
|
|
720
|
-
- **
|
|
721
|
-
- **
|
|
722
|
-
- **plan**: サブエージェントに降格
|
|
720
|
+
- **Builder-Sisyphus**: OhMyOpenCode 強化版のビルドエージェント(デフォルトで無効)
|
|
721
|
+
- **Planner-Sisyphus**: OhMyOpenCode 強化版のプランエージェント(デフォルトで有効)
|
|
723
722
|
|
|
724
|
-
|
|
723
|
+
**設定オプション:**
|
|
725
724
|
|
|
726
725
|
```json
|
|
727
726
|
{
|
|
728
|
-
"
|
|
727
|
+
"sisyphus_agent": {
|
|
728
|
+
"disabled": false,
|
|
729
|
+
"builder_enabled": false,
|
|
730
|
+
"planner_enabled": true,
|
|
731
|
+
"replace_build": true,
|
|
732
|
+
"replace_plan": true
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
**例:Builder-Sisyphus を有効化し、デフォルトのビルドモードも維持する:**
|
|
738
|
+
|
|
739
|
+
```json
|
|
740
|
+
{
|
|
741
|
+
"sisyphus_agent": {
|
|
742
|
+
"builder_enabled": true,
|
|
743
|
+
"replace_build": false
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
これにより、Builder-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,13 @@ Sisyphus を無効化して元の build/plan エージェントを復元する
|
|
|
747
776
|
}
|
|
748
777
|
```
|
|
749
778
|
|
|
750
|
-
| オプション
|
|
751
|
-
|
|
752
|
-
| `disabled`
|
|
779
|
+
| オプション | デフォルト | 説明 |
|
|
780
|
+
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
781
|
+
| `disabled` | `false` | `true` の場合、すべての Sisyphus オーケストレーションを無効化し、元の build/plan をプライマリとして復元します。 |
|
|
782
|
+
| `builder_enabled` | `false` | `true` の場合、Builder-Sisyphus エージェント(OhMyOpenCode 強化版ビルドモード)を有効化します。デフォルトの OpenCode ビルド体験を維持するため、デフォルトでは無効です。 |
|
|
783
|
+
| `planner_enabled` | `true` | `true` の場合、Planner-Sisyphus エージェント(OhMyOpenCode 強化版プランモード)を有効化します。デフォルトで有効です。 |
|
|
784
|
+
| `replace_build` | `true` | `true` の場合、デフォルトのビルドエージェントをサブエージェントモードに降格させます。`false` に設定すると、Builder-Sisyphus とデフォルトのビルドの両方を利用できます。 |
|
|
785
|
+
| `replace_plan` | `true` | `true` の場合、デフォルトのプランエージェントをサブエージェントモードに降格させます。`false` に設定すると、Planner-Sisyphus とデフォルトのプランの両方を利用できます。 |
|
|
753
786
|
|
|
754
787
|
### Hooks
|
|
755
788
|
|
|
@@ -812,15 +845,17 @@ OpenCode でサポートされるすべての LSP 構成およびカスタム設
|
|
|
812
845
|
{
|
|
813
846
|
"experimental": {
|
|
814
847
|
"aggressive_truncation": true,
|
|
815
|
-
"auto_resume": true
|
|
848
|
+
"auto_resume": true,
|
|
849
|
+
"truncate_all_tool_outputs": false
|
|
816
850
|
}
|
|
817
851
|
}
|
|
818
852
|
```
|
|
819
853
|
|
|
820
|
-
| オプション
|
|
821
|
-
|
|
|
822
|
-
| `aggressive_truncation`
|
|
823
|
-
| `auto_resume`
|
|
854
|
+
| オプション | デフォルト | 説明 |
|
|
855
|
+
| --------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
856
|
+
| `aggressive_truncation` | `false` | トークン制限を超えた場合、ツール出力を積極的に切り詰めて制限内に収めます。デフォルトの切り詰めより積極的です。不十分な場合は要約/復元にフォールバックします。 |
|
|
857
|
+
| `auto_resume` | `false` | thinking block エラーや thinking disabled violation からの回復成功後、自動的にセッションを再開します。最後のユーザーメッセージを抽出して続行します。 |
|
|
858
|
+
| `truncate_all_tool_outputs` | `true` | プロンプトが長くなりすぎるのを防ぐため、コンテキストウィンドウの使用状況に基づいてすべてのツール出力を動的に切り詰めます。完全なツール出力が必要な場合は`false`に設定して無効化します。 |
|
|
824
859
|
|
|
825
860
|
**警告**:これらの機能は実験的であり、予期しない動作を引き起こす可能性があります。影響を理解した場合にのみ有効にしてください。
|
|
826
861
|
|
package/README.ko.md
CHANGED
|
@@ -708,14 +708,40 @@ Schema 자동 완성이 지원됩니다:
|
|
|
708
708
|
|
|
709
709
|
### Sisyphus Agent
|
|
710
710
|
|
|
711
|
-
활성화 시(기본값),
|
|
711
|
+
활성화 시 (기본값), Sisyphus는 옵션으로 선택 가능한 특화 에이전트들과 함께 강력한 오케스트레이터를 제공합니다:
|
|
712
712
|
|
|
713
713
|
- **Sisyphus**: Primary 오케스트레이터 에이전트 (Claude Opus 4.5)
|
|
714
|
-
- **
|
|
715
|
-
- **
|
|
716
|
-
- **plan**: subagent로 강등
|
|
714
|
+
- **Builder-Sisyphus**: OhMyOpenCode 강화 버전 빌드 에이전트 (기본적으로 비활성화)
|
|
715
|
+
- **Planner-Sisyphus**: OhMyOpenCode 강화 버전 플랜 에이전트 (기본적으로 활성화)
|
|
717
716
|
|
|
718
|
-
|
|
717
|
+
**설정 옵션:**
|
|
718
|
+
|
|
719
|
+
```json
|
|
720
|
+
{
|
|
721
|
+
"sisyphus_agent": {
|
|
722
|
+
"disabled": false,
|
|
723
|
+
"builder_enabled": false,
|
|
724
|
+
"planner_enabled": true,
|
|
725
|
+
"replace_build": true,
|
|
726
|
+
"replace_plan": true
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
**예시: Builder-Sisyphus를 활성화하면서 기본 빌드 모드도 유지하기:**
|
|
732
|
+
|
|
733
|
+
```json
|
|
734
|
+
{
|
|
735
|
+
"sisyphus_agent": {
|
|
736
|
+
"builder_enabled": true,
|
|
737
|
+
"replace_build": false
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
이렇게 하면 Builder-Sisyphus와 기본 빌드 에이전트를 동시에 사용할 수 있습니다.
|
|
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,13 @@ Sisyphus 를 비활성화하고 원래 build/plan 에이전트를 복원하려
|
|
|
741
770
|
}
|
|
742
771
|
```
|
|
743
772
|
|
|
744
|
-
| 옵션
|
|
745
|
-
|
|
|
746
|
-
| `disabled`
|
|
773
|
+
| 옵션 | 기본값 | 설명 |
|
|
774
|
+
| ------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
775
|
+
| `disabled` | `false` | `true`면 모든 Sisyphus 오케스트레이션을 비활성화하고 원래 build/plan을 primary로 복원합니다. |
|
|
776
|
+
| `builder_enabled` | `false` | `true`면 Builder-Sisyphus 에이전트 (OhMyOpenCode 강화 빌드 모드)를 활성화합니다. 기본 OpenCode 빌드 경험을 보존하기 위해 기본적으로 비활성화되어 있습니다. |
|
|
777
|
+
| `planner_enabled` | `true` | `true`면 Planner-Sisyphus 에이전트 (OhMyOpenCode 강화 플랜 모드)를 활성화합니다. 기본적으로 활성화되어 있습니다. |
|
|
778
|
+
| `replace_build` | `true` | `true`면 기본 빌드 에이전트를 subagent 모드로 강등시킵니다. `false`로 설정하면 Builder-Sisyphus와 기본 빌드를 모두 사용할 수 있습니다. |
|
|
779
|
+
| `replace_plan` | `true` | `true`면 기본 플랜 에이전트를 subagent 모드로 강등시킵니다. `false`로 설정하면 Planner-Sisyphus와 기본 플랜을 모두 사용할 수 있습니다. |
|
|
747
780
|
|
|
748
781
|
### Hooks
|
|
749
782
|
|
|
@@ -806,15 +839,17 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js
|
|
|
806
839
|
{
|
|
807
840
|
"experimental": {
|
|
808
841
|
"aggressive_truncation": true,
|
|
809
|
-
"auto_resume": true
|
|
842
|
+
"auto_resume": true,
|
|
843
|
+
"truncate_all_tool_outputs": false
|
|
810
844
|
}
|
|
811
845
|
}
|
|
812
846
|
```
|
|
813
847
|
|
|
814
|
-
| 옵션
|
|
815
|
-
|
|
|
816
|
-
| `aggressive_truncation`
|
|
817
|
-
| `auto_resume`
|
|
848
|
+
| 옵션 | 기본값 | 설명 |
|
|
849
|
+
| --------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
850
|
+
| `aggressive_truncation` | `false` | 토큰 제한을 초과하면 도구 출력을 공격적으로 잘라내어 제한 내에 맞춥니다. 기본 truncation보다 더 공격적입니다. 부족하면 요약/복구로 fallback합니다. |
|
|
851
|
+
| `auto_resume` | `false` | thinking block 에러나 thinking disabled violation으로부터 성공적으로 복구한 후 자동으로 세션을 재개합니다. 마지막 사용자 메시지를 추출하여 계속합니다. |
|
|
852
|
+
| `truncate_all_tool_outputs` | `true` | 프롬프트가 너무 길어지는 것을 방지하기 위해 컨텍스트 윈도우 사용량에 따라 모든 도구 출력을 동적으로 잘라냅니다. 전체 도구 출력이 필요한 경우 `false`로 설정하여 비활성화하세요. |
|
|
818
853
|
|
|
819
854
|
**경고**: 이 기능들은 실험적이며 예상치 못한 동작을 유발할 수 있습니다. 의미를 이해한 경우에만 활성화하세요.
|
|
820
855
|
|
package/README.md
CHANGED
|
@@ -780,24 +780,50 @@ Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `
|
|
|
780
780
|
|
|
781
781
|
### Sisyphus Agent
|
|
782
782
|
|
|
783
|
-
When enabled (default), Sisyphus
|
|
783
|
+
When enabled (default), Sisyphus provides a powerful orchestrator with optional specialized agents:
|
|
784
784
|
|
|
785
785
|
- **Sisyphus**: Primary orchestrator agent (Claude Opus 4.5)
|
|
786
|
-
- **
|
|
787
|
-
- **
|
|
788
|
-
- **plan**: Demoted to subagent
|
|
786
|
+
- **Builder-Sisyphus**: Optional build agent with OhMyOpenCode enhancements (disabled by default)
|
|
787
|
+
- **Planner-Sisyphus**: Plan agent with OhMyOpenCode enhancements (enabled by default)
|
|
789
788
|
|
|
790
|
-
|
|
789
|
+
**Configuration Options:**
|
|
791
790
|
|
|
792
791
|
```json
|
|
793
792
|
{
|
|
794
|
-
"
|
|
793
|
+
"sisyphus_agent": {
|
|
794
|
+
"disabled": false,
|
|
795
|
+
"builder_enabled": false,
|
|
796
|
+
"planner_enabled": true,
|
|
797
|
+
"replace_build": true,
|
|
798
|
+
"replace_plan": true
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
```
|
|
802
|
+
|
|
803
|
+
**Example: Enable Builder-Sisyphus and keep default build mode:**
|
|
804
|
+
|
|
805
|
+
```json
|
|
806
|
+
{
|
|
807
|
+
"sisyphus_agent": {
|
|
808
|
+
"builder_enabled": true,
|
|
809
|
+
"replace_build": false
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
This allows you to have both Builder-Sisyphus AND the default build agent available simultaneously.
|
|
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,13 @@ 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
|
+
| `builder_enabled` | `false` | When `true`, enables Builder-Sisyphus agent (OhMyOpenCode enhanced build mode). Disabled by default to preserve default OpenCode build experience. |
|
|
849
|
+
| `planner_enabled` | `true` | When `true`, enables Planner-Sisyphus agent (OhMyOpenCode enhanced plan mode). Enabled by default. |
|
|
850
|
+
| `replace_build` | `true` | When `true`, demotes default build agent to subagent mode. Set to `false` to keep both Builder-Sisyphus and default build available. |
|
|
851
|
+
| `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
852
|
|
|
820
853
|
### Hooks
|
|
821
854
|
|
|
@@ -878,15 +911,17 @@ Opt-in experimental features that may change or be removed in future versions. U
|
|
|
878
911
|
{
|
|
879
912
|
"experimental": {
|
|
880
913
|
"aggressive_truncation": true,
|
|
881
|
-
"auto_resume": true
|
|
914
|
+
"auto_resume": true,
|
|
915
|
+
"truncate_all_tool_outputs": false
|
|
882
916
|
}
|
|
883
917
|
}
|
|
884
918
|
```
|
|
885
919
|
|
|
886
|
-
| Option
|
|
887
|
-
|
|
|
888
|
-
| `aggressive_truncation`
|
|
889
|
-
| `auto_resume`
|
|
920
|
+
| Option | Default | Description |
|
|
921
|
+
| --------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
922
|
+
| `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. |
|
|
923
|
+
| `auto_resume` | `false` | Automatically resumes session after successful recovery from thinking block errors or thinking disabled violations. Extracts the last user message and continues. |
|
|
924
|
+
| `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
925
|
|
|
891
926
|
**Warning**: These features are experimental and may cause unexpected behavior. Enable only if you understand the implications.
|
|
892
927
|
|
package/README.zh-cn.md
CHANGED
|
@@ -714,24 +714,50 @@ Agent 爽了,你自然也爽。但我还想直接让你爽。
|
|
|
714
714
|
|
|
715
715
|
### Sisyphus Agent
|
|
716
716
|
|
|
717
|
-
默认开启。Sisyphus
|
|
717
|
+
默认开启。Sisyphus 提供一个强力的编排器,带可选的专门 Agent:
|
|
718
718
|
|
|
719
719
|
- **Sisyphus**:主编排 Agent(Claude Opus 4.5)
|
|
720
|
-
- **
|
|
721
|
-
- **
|
|
722
|
-
- **plan**:降级为子 Agent
|
|
720
|
+
- **Builder-Sisyphus**:OhMyOpenCode 增强版构建 Agent(默认禁用)
|
|
721
|
+
- **Planner-Sisyphus**:OhMyOpenCode 增强版计划 Agent(默认启用)
|
|
723
722
|
|
|
724
|
-
|
|
723
|
+
**配置选项:**
|
|
725
724
|
|
|
726
725
|
```json
|
|
727
726
|
{
|
|
728
|
-
"
|
|
727
|
+
"sisyphus_agent": {
|
|
728
|
+
"disabled": false,
|
|
729
|
+
"builder_enabled": false,
|
|
730
|
+
"planner_enabled": true,
|
|
731
|
+
"replace_build": true,
|
|
732
|
+
"replace_plan": true
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
**示例:启用 Builder-Sisyphus,同时保留默认构建模式:**
|
|
738
|
+
|
|
739
|
+
```json
|
|
740
|
+
{
|
|
741
|
+
"sisyphus_agent": {
|
|
742
|
+
"builder_enabled": true,
|
|
743
|
+
"replace_build": false
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
这样你就能同时使用 Builder-Sisyphus 和默认构建 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,13 @@ Sisyphus 和 Planner-Sisyphus 也能自定义:
|
|
|
747
776
|
}
|
|
748
777
|
```
|
|
749
778
|
|
|
750
|
-
| 选项
|
|
751
|
-
|
|
|
752
|
-
| `disabled`
|
|
779
|
+
| 选项 | 默认值 | 说明 |
|
|
780
|
+
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
781
|
+
| `disabled` | `false` | 设为 `true` 就禁用所有 Sisyphus 编排,恢复原来的 build/plan。 |
|
|
782
|
+
| `builder_enabled` | `false` | 设为 `true` 就启用 Builder-Sisyphus Agent(OhMyOpenCode 增强构建模式)。为了保留默认 OpenCode 构建体验,默认禁用。 |
|
|
783
|
+
| `planner_enabled` | `true` | 设为 `true` 就启用 Planner-Sisyphus Agent(OhMyOpenCode 增强计划模式)。默认启用。 |
|
|
784
|
+
| `replace_build` | `true` | 设为 `true` 就把默认构建 Agent 降级为子 Agent 模式。设为 `false` 可以同时保留 Builder-Sisyphus 和默认构建。 |
|
|
785
|
+
| `replace_plan` | `true` | 设为 `true` 就把默认计划 Agent 降级为子 Agent 模式。设为 `false` 可以同时保留 Planner-Sisyphus 和默认计划。 |
|
|
753
786
|
|
|
754
787
|
### Hooks
|
|
755
788
|
|
|
@@ -812,15 +845,17 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
|
|
|
812
845
|
{
|
|
813
846
|
"experimental": {
|
|
814
847
|
"aggressive_truncation": true,
|
|
815
|
-
"auto_resume": true
|
|
848
|
+
"auto_resume": true,
|
|
849
|
+
"truncate_all_tool_outputs": false
|
|
816
850
|
}
|
|
817
851
|
}
|
|
818
852
|
```
|
|
819
853
|
|
|
820
|
-
| 选项
|
|
821
|
-
|
|
|
822
|
-
| `aggressive_truncation`
|
|
823
|
-
| `auto_resume`
|
|
854
|
+
| 选项 | 默认值 | 说明 |
|
|
855
|
+
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
856
|
+
| `aggressive_truncation` | `false` | 超出 token 限制时,激进地截断工具输出以适应限制。比默认截断更激进。不够的话会回退到摘要/恢复。 |
|
|
857
|
+
| `auto_resume` | `false` | 从 thinking block 错误或 thinking disabled violation 成功恢复后,自动恢复会话。提取最后一条用户消息继续执行。 |
|
|
858
|
+
| `truncate_all_tool_outputs` | `true` | 为防止提示过长,根据上下文窗口使用情况动态截断所有工具输出。如需完整工具输出,设置为 `false` 禁用此功能。 |
|
|
824
859
|
|
|
825
860
|
**警告**:这些功能是实验性的,可能会导致意外行为。只有在理解其影响的情况下才启用。
|
|
826
861
|
|
|
@@ -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
|
+
};
|