oh-my-opencode 2.5.1 → 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.
Files changed (45) hide show
  1. package/LICENSE.md +82 -0
  2. package/README.ja.md +79 -40
  3. package/README.ko.md +78 -39
  4. package/README.md +79 -40
  5. package/README.zh-cn.md +79 -40
  6. package/dist/agents/build-prompt.d.ts +31 -0
  7. package/dist/agents/document-writer.d.ts +1 -0
  8. package/dist/agents/explore.d.ts +1 -0
  9. package/dist/agents/frontend-ui-ux-engineer.d.ts +1 -0
  10. package/dist/agents/librarian.d.ts +1 -0
  11. package/dist/agents/multimodal-looker.d.ts +1 -0
  12. package/dist/agents/types.d.ts +3 -1
  13. package/dist/cli/config-manager.d.ts +0 -1
  14. package/dist/cli/index.js +1664 -3
  15. package/dist/cli/run/completion.d.ts +2 -0
  16. package/dist/cli/run/completion.test.d.ts +1 -0
  17. package/dist/cli/run/events.d.ts +7 -0
  18. package/dist/cli/run/events.test.d.ts +1 -0
  19. package/dist/cli/run/index.d.ts +2 -0
  20. package/dist/cli/run/runner.d.ts +2 -0
  21. package/dist/cli/run/types.d.ts +45 -0
  22. package/dist/config/schema.d.ts +126 -2
  23. package/dist/hooks/claude-code-hooks/config-loader.d.ts +1 -0
  24. package/dist/hooks/claude-code-hooks/index.d.ts +5 -0
  25. package/dist/hooks/claude-code-hooks/pre-compact.d.ts +16 -0
  26. package/dist/hooks/claude-code-hooks/types.d.ts +17 -1
  27. package/dist/hooks/non-interactive-env/detector.d.ts +1 -0
  28. package/dist/hooks/non-interactive-env/index.d.ts +1 -0
  29. package/dist/hooks/session-notification.test.d.ts +1 -0
  30. package/dist/hooks/todo-continuation-enforcer.d.ts +5 -1
  31. package/dist/index.js +1143 -339
  32. package/dist/shared/data-path.d.ts +15 -0
  33. package/dist/shared/index.d.ts +1 -0
  34. package/dist/tools/index.d.ts +52 -0
  35. package/dist/tools/session-manager/constants.d.ts +11 -0
  36. package/dist/tools/session-manager/index.d.ts +3 -0
  37. package/dist/tools/session-manager/storage.d.ts +8 -0
  38. package/dist/tools/session-manager/storage.test.d.ts +1 -0
  39. package/dist/tools/session-manager/tools.d.ts +52 -0
  40. package/dist/tools/session-manager/tools.test.d.ts +1 -0
  41. package/dist/tools/session-manager/types.d.ts +71 -0
  42. package/dist/tools/session-manager/utils.d.ts +11 -0
  43. package/dist/tools/session-manager/utils.test.d.ts +1 -0
  44. package/package.json +3 -2
  45. package/LICENSE +0 -21
package/README.zh-cn.md CHANGED
@@ -1,4 +1,13 @@
1
- 公告:oh-my-opencode 的相关消息之前在我的 X 账号发布,但由于账号被无辜封禁,现在由 [@justsisyphus](https://x.com/justsisyphus) 代为管理更新。
1
+ > [!NOTE]
2
+ >
3
+ > *"我致力于引发一场软件革命,创造一个AI生成的代码与人类代码无法区分、却能实现更多的世界。我已经在这段旅程中投入了个人时间、热情和资金,并将继续这样做。"*
4
+ >
5
+ > 与我们同行!
6
+ >
7
+ > | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PWpXmbhF) | 加入我们的 [Discord 社区](https://discord.gg/PWpXmbhF),和贡献者们、`oh-my-opencode` 用户们一起交流。 |
8
+ > | :-----| :----- |
9
+ > | [<img alt="X link" src="https://img.shields.io/badge/Follow-%40justsisyphus-00CED1?style=flat-square&logo=x&labelColor=black" width="156px" />](https://x.com/justsisyphus) | `oh-my-opencode` 的消息之前在我的 X 账号发,但账号被无辜封了,<br />现在 [@justsisyphus](https://x.com/justsisyphus) 替我发更新。 |
10
+ > | [<img alt="Sponsor" src="https://img.shields.io/badge/Sponsor-❤-ff69b4?style=flat-square&logo=github-sponsors&labelColor=black" width="156px" />](https://github.com/sponsors/code-yeongyu) | [成为赞助者](https://github.com/sponsors/code-yeongyu),支持 `oh-my-opencode` 的开发。您的支持让这个项目持续成长。 |
2
11
 
3
12
  <!-- <CENTERED SECTION FOR GITHUB DISPLAY> -->
4
13
 
@@ -25,7 +34,7 @@
25
34
  [![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-opencode?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/network/members)
26
35
  [![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-opencode?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/stargazers)
27
36
  [![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-opencode?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/issues)
28
- [![License](https://img.shields.io/badge/license-MIT-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/blob/master/LICENSE)
37
+ [![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/blob/master/LICENSE.md)
29
38
 
30
39
  [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-cn.md)
31
40
 
@@ -33,6 +42,24 @@
33
42
 
34
43
  <!-- </CENTERED SECTION FOR GITHUB DISPLAY> -->
35
44
 
45
+ ## 用户评价
46
+
47
+ > "如果 Claude Code 能在 7 天内完成人类 3 个月的工作,那么 Sisyphus 只需要 1 小时。任务完成之前它就是一直干。It is a discipline agent." — B, Quant Researcher
48
+
49
+ > "只用了一天,就用 Oh My Opencode 干掉了 8000 个 eslint 警告" — [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
50
+
51
+ > "你们应该把它合并到核心代码里并聘用他。认真的。这真的、真的、真的很好" — Henning Kilset
52
+
53
+ > "如果你能说服 @yeon_gyu_kim,就雇佣他吧,这家伙彻底改变了 opencode" — [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
54
+
55
+ > "哇靠 @androolloyd 这玩意儿是真的,oh my opencode 太强了" — [z80.eth](https://x.com/0xz80/status/2001815226505924791)
56
+
57
+ > "用了 oh-my-opencode,你就回不去了" — [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
58
+
59
+ > "Oh My Opencode 独孤求败,没有对手" — [RyanOnThePath](https://x.com/RyanOnThePath/status/2001438321252118548)
60
+
61
+ ---
62
+
36
63
  ## 目录
37
64
 
38
65
  - [Oh My OpenCode](#oh-my-opencode)
@@ -687,24 +714,50 @@ Agent 爽了,你自然也爽。但我还想直接让你爽。
687
714
 
688
715
  ### Sisyphus Agent
689
716
 
690
- 默认开启。Sisyphus 会加两个主 Agent,把原来的降级成小弟:
717
+ 默认开启。Sisyphus 提供一个强力的编排器,带可选的专门 Agent
691
718
 
692
719
  - **Sisyphus**:主编排 Agent(Claude Opus 4.5)
693
- - **Planner-Sisyphus**:运行时继承 OpenCode plan Agent 所有设置(描述里加了"OhMyOpenCode version")
694
- - **build**:降级为子 Agent
695
- - **plan**:降级为子 Agent
720
+ - **Builder-Sisyphus**:OhMyOpenCode 增强版构建 Agent(默认禁用)
721
+ - **Planner-Sisyphus**:OhMyOpenCode 增强版计划 Agent(默认启用)
696
722
 
697
- 想禁用 Sisyphus 恢复原来的?
723
+ **配置选项:**
698
724
 
699
725
  ```json
700
726
  {
701
- "omo_agent": {
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": {
702
755
  "disabled": true
703
756
  }
704
757
  }
705
758
  ```
706
759
 
707
- Sisyphus Planner-Sisyphus 也能自定义:
760
+ Sisyphus Agent 也能自定义:
708
761
 
709
762
  ```json
710
763
  {
@@ -713,6 +766,9 @@ Sisyphus 和 Planner-Sisyphus 也能自定义:
713
766
  "model": "anthropic/claude-sonnet-4",
714
767
  "temperature": 0.3
715
768
  },
769
+ "Builder-Sisyphus": {
770
+ "model": "anthropic/claude-opus-4"
771
+ },
716
772
  "Planner-Sisyphus": {
717
773
  "model": "openai/gpt-5.2"
718
774
  }
@@ -720,9 +776,13 @@ Sisyphus 和 Planner-Sisyphus 也能自定义:
720
776
  }
721
777
  ```
722
778
 
723
- | 选项 | 默认值 | 说明 |
724
- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
725
- | `disabled` | `false` | 设为 `true` 就禁用 Sisyphus,恢复原来的 build/plan。设为 `false`(默认)就是 Sisyphus 和 Planner-Sisyphus 掌权。 |
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 和默认计划。 |
726
786
 
727
787
  ### Hooks
728
788
 
@@ -785,15 +845,17 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
785
845
  {
786
846
  "experimental": {
787
847
  "aggressive_truncation": true,
788
- "auto_resume": true
848
+ "auto_resume": true,
849
+ "truncate_all_tool_outputs": false
789
850
  }
790
851
  }
791
852
  ```
792
853
 
793
- | 选项 | 默认值 | 说明 |
794
- | ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
795
- | `aggressive_truncation` | `false` | 超出 token 限制时,激进地截断工具输出以适应限制。比默认截断更激进。不够的话会回退到摘要/恢复。 |
796
- | `auto_resume` | `false` | 从 thinking block 错误或 thinking disabled violation 成功恢复后,自动恢复会话。提取最后一条用户消息继续执行。 |
854
+ | 选项 | 默认值 | 说明 |
855
+ | --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
856
+ | `aggressive_truncation` | `false` | 超出 token 限制时,激进地截断工具输出以适应限制。比默认截断更激进。不够的话会回退到摘要/恢复。 |
857
+ | `auto_resume` | `false` | 从 thinking block 错误或 thinking disabled violation 成功恢复后,自动恢复会话。提取最后一条用户消息继续执行。 |
858
+ | `truncate_all_tool_outputs` | `true` | 为防止提示过长,根据上下文窗口使用情况动态截断所有工具输出。如需完整工具输出,设置为 `false` 禁用此功能。 |
797
859
 
798
860
  **警告**:这些功能是实验性的,可能会导致意外行为。只有在理解其影响的情况下才启用。
799
861
 
@@ -842,29 +904,6 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
842
904
 
843
905
  *感谢 [@junhoyeo](https://github.com/junhoyeo) 制作了这张超帅的 hero 图。*
844
906
 
845
- ## 用户评价
846
-
847
- > "如果 Claude Code 能在 7 天内完成人类 3 个月的工作,那么 Sisyphus 只需要 1 小时"
848
- > -- B, Quant Researcher
849
-
850
- > "只用了一天,就用 Oh My Opencode 干掉了 8000 个 eslint 警告"
851
- > -- Jacob Ferrari, from [X](https://x.com/jacobferrari_/status/2003258761952289061)
852
-
853
- > "如果你能说服 @yeon_gyu_kim,就雇佣他吧,这家伙彻底彻底改变了 opencode"
854
- > -- [回复 Sam Altman 的帖子](https://x.com/mysticaltech/status/2001858758608376079)
855
-
856
- > "你们应该把它合并到核心代码里并聘用他。认真的。这真的、真的、真的很好"
857
- > -- Henning Kilset, from X
858
-
859
- > "哇靠 @androolloyd 这玩意儿是真的,oh my opencode 太强了"
860
- > -- z80.eth, from [X](https://x.com/0xz80/status/2001815226505924791)
861
-
862
- > "用了 oh-my-opencode,你就回不去了"
863
- > -- [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
864
-
865
- > "Oh My Opencode 独孤求败,没有对手"
866
- > -- [RyanOnThePath](https://x.com/RyanOnThePath/status/2001438321252118548)
867
-
868
907
  ## 以下企业的专业人士都在用
869
908
 
870
909
  - [Indent](https://indentcorp.com)
@@ -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
+ };
@@ -1,2 +1,3 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare function createDocumentWriterAgent(model?: string): AgentConfig;
2
3
  export declare const documentWriterAgent: AgentConfig;
@@ -1,2 +1,3 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare function createExploreAgent(model?: string): AgentConfig;
2
3
  export declare const exploreAgent: AgentConfig;
@@ -1,2 +1,3 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare function createFrontendUiUxEngineerAgent(model?: string): AgentConfig;
2
3
  export declare const frontendUiUxEngineerAgent: AgentConfig;
@@ -1,2 +1,3 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare function createLibrarianAgent(model?: string): AgentConfig;
2
3
  export declare const librarianAgent: AgentConfig;
@@ -1,2 +1,3 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare function createMultimodalLookerAgent(model?: string): AgentConfig;
2
3
  export declare const multimodalLookerAgent: AgentConfig;
@@ -4,5 +4,7 @@ export declare function isGptModel(model: string): boolean;
4
4
  export type BuiltinAgentName = "Sisyphus" | "oracle" | "librarian" | "explore" | "frontend-ui-ux-engineer" | "document-writer" | "multimodal-looker";
5
5
  export type OverridableAgentName = "build" | BuiltinAgentName;
6
6
  export type AgentName = BuiltinAgentName;
7
- export type AgentOverrideConfig = Partial<AgentConfig>;
7
+ export type AgentOverrideConfig = Partial<AgentConfig> & {
8
+ prompt_append?: string;
9
+ };
8
10
  export type AgentOverrides = Partial<Record<OverridableAgentName, AgentOverrideConfig>>;
@@ -16,7 +16,6 @@ export declare function runBunInstall(): Promise<boolean>;
16
16
  export declare const ANTIGRAVITY_PROVIDER_CONFIG: {
17
17
  google: {
18
18
  name: string;
19
- api: string;
20
19
  models: {
21
20
  "gemini-3-pro-high": {
22
21
  name: string;