oh-my-opencode-slim 2.0.5 → 2.1.0

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 (52) hide show
  1. package/README.ja-JP.md +47 -21
  2. package/README.ko-KR.md +45 -19
  3. package/README.md +56 -32
  4. package/README.zh-CN.md +48 -24
  5. package/dist/agents/council.d.ts +1 -1
  6. package/dist/agents/index.d.ts +7 -2
  7. package/dist/agents/orchestrator.d.ts +1 -1
  8. package/dist/cli/custom-skills-registry.d.ts +18 -0
  9. package/dist/cli/custom-skills.d.ts +3 -19
  10. package/dist/cli/index.js +1089 -185
  11. package/dist/cli/providers.d.ts +5 -9
  12. package/dist/cli/skills.d.ts +2 -2
  13. package/dist/companion/manager.d.ts +7 -0
  14. package/dist/config/loader.d.ts +5 -2
  15. package/dist/config/schema.d.ts +4 -0
  16. package/dist/council/council-manager.d.ts +1 -1
  17. package/dist/hooks/auto-update-checker/skill-sync.d.ts +59 -1
  18. package/dist/hooks/filter-available-skills/index.d.ts +1 -2
  19. package/dist/hooks/foreground-fallback/index.d.ts +5 -1
  20. package/dist/hooks/image-hook.d.ts +1 -1
  21. package/dist/hooks/index.d.ts +1 -0
  22. package/dist/hooks/loop-command/index.d.ts +13 -0
  23. package/dist/hooks/phase-reminder/index.d.ts +1 -2
  24. package/dist/hooks/task-session-manager/index.d.ts +1 -2
  25. package/dist/hooks/task-session-manager/pending-call-tracker.d.ts +13 -0
  26. package/dist/hooks/task-session-manager/task-context-tracker.d.ts +14 -0
  27. package/dist/hooks/types.d.ts +3 -1
  28. package/dist/index.js +2116 -670
  29. package/dist/interview/dashboard-manager.d.ts +21 -0
  30. package/dist/interview/manager.d.ts +0 -14
  31. package/dist/interview/service.d.ts +7 -0
  32. package/dist/interview/session-server.d.ts +21 -0
  33. package/dist/interview/types.d.ts +3 -1
  34. package/dist/loop/loop-session.d.ts +64 -0
  35. package/dist/multiplexer/factory.d.ts +5 -5
  36. package/dist/multiplexer/herdr/index.d.ts +31 -0
  37. package/dist/multiplexer/index.d.ts +1 -0
  38. package/dist/multiplexer/session-manager.d.ts +1 -0
  39. package/dist/multiplexer/types.d.ts +4 -4
  40. package/dist/tui.js +82 -39
  41. package/dist/utils/background-job-board.d.ts +17 -1
  42. package/dist/utils/session.d.ts +1 -1
  43. package/oh-my-opencode-slim.schema.json +6 -1
  44. package/package.json +1 -1
  45. package/src/skills/clonedeps/SKILL.md +2 -2
  46. package/src/skills/clonedeps/codemap.md +23 -32
  47. package/src/skills/codemap/SKILL.md +2 -2
  48. package/src/skills/codemap.md +63 -36
  49. package/src/skills/loop-engineering/SKILL.md +30 -0
  50. package/src/skills/reflect/SKILL.md +133 -0
  51. package/src/skills/release-smoke-test/SKILL.md +159 -0
  52. package/src/skills/simplify/SKILL.md +6 -6
package/README.zh-CN.md CHANGED
@@ -83,10 +83,35 @@ Install and configure oh-my-opencode-slim: https://raw.githubusercontent.com/alv
83
83
  bunx oh-my-opencode-slim@latest install
84
84
  ```
85
85
 
86
+ ### 从 Master 分支运行
87
+
88
+ 如果您想使用最新代码、方便修复问题,或进行本地开发和贡献,可以使用这种方式:
89
+
90
+ ```bash
91
+ git clone https://github.com/alvinunreal/oh-my-opencode-slim.git ~/repos/oh-my-opencode-slim
92
+ cd ~/repos/oh-my-opencode-slim
93
+ bun install
94
+ bun run build
95
+ bun dist/cli/index.js install
96
+ ```
97
+
98
+ 安装程序会把本地仓库路径加入 `~/.config/opencode/opencode.json` 的
99
+ `plugin` 数组,因此 OpenCode 会从该文件夹加载插件。之后要更新:
100
+
101
+ ```bash
102
+ cd ~/repos/oh-my-opencode-slim
103
+ git pull
104
+ bun install
105
+ bun run build
106
+ ```
107
+
86
108
  ### 入门指南
87
109
 
88
110
  安装程序会同时生成 OpenAI 和 OpenCode Go 预设,默认启用 OpenAI。
89
111
 
112
+ > [!TIP]
113
+ > 根据自己的工作流自由微调模型和智能体。默认预设只是起点;本插件的目标是为用户提供深度灵活性和可定制性。
114
+
90
115
  要在安装期间启用 OpenCode Go,请运行 `bunx oh-my-opencode-slim@latest install --preset=opencode-go`,或在安装后修改 `~/.config/opencode/oh-my-opencode-slim.json` 中的默认预设名称。
91
116
 
92
117
  然后:
@@ -109,7 +134,7 @@ bunx oh-my-opencode-slim@latest install
109
134
  > **建议**了解后台编排的工作原理。**[编排者提示词 (Orchestrator prompt)](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/agents/orchestrator.ts#L28)** 包含调度规则、专家路由逻辑,以及何时应把工作分配给后台智能体的阈值。您始终可以通过以下方式手动委派任务:`@智能体名称 <任务内容>`
110
135
 
111
136
  > [!TIP]
112
- > 由于后台智能体现在是默认工作流,**强烈建议**启用并配置 **[Multiplexer Integration](docs/multiplexer-integration.md)**。它会自动在专用的 Tmux 或 Zellij 窗格中打开每个智能体,让您在 Orchestrator 继续协调会话时,实时跟进各个专家智能体的工作。
137
+ > 由于后台智能体现在是默认工作流,**强烈建议**启用并配置 **[Multiplexer Integration](docs/multiplexer-integration.md)**。它会自动在专用的 Tmux、ZellijHerdr 窗格中打开每个智能体,让您在 Orchestrator 继续协调会话时,实时跟进各个专家智能体的工作。
113
138
 
114
139
  默认生成的配置包含 `openai` 和 `opencode-go` 两个预设:
115
140
 
@@ -127,12 +152,11 @@ bunx oh-my-opencode-slim@latest install
127
152
  "fixer": { "model": "openai/gpt-5.5", "variant": "low", "skills": [], "mcps": [] }
128
153
  },
129
154
  "opencode-go": {
130
- "orchestrator": { "model": "opencode-go/glm-5.1", "skills": [ "*" ], "mcps": [ "*", "!context7" ] },
131
- "oracle": { "model": "opencode-go/deepseek-v4-pro", "variant": "max", "skills": ["simplify"], "mcps": [] },
132
- "council": { "model": "opencode-go/deepseek-v4-pro", "variant": "high", "skills": [], "mcps": [] },
133
- "librarian": { "model": "opencode-go/minimax-m2.7", "skills": [], "mcps": [ "websearch", "context7", "gh_grep" ] },
134
- "explorer": { "model": "opencode-go/minimax-m2.7", "skills": [], "mcps": [] },
135
- "designer": { "model": "opencode-go/kimi-k2.6", "variant": "medium", "skills": [], "mcps": [] },
155
+ "orchestrator": { "model": "opencode-go/glm-5.2", "skills": [ "*" ], "mcps": [ "*", "!context7" ] },
156
+ "oracle": { "model": "opencode-go/qwen3.7-max", "variant": "max", "skills": ["simplify"], "mcps": [] },
157
+ "librarian": { "model": "opencode-go/deepseek-v4-flash", "skills": [], "mcps": [ "websearch", "context7", "gh_grep" ] },
158
+ "explorer": { "model": "opencode-go/deepseek-v4-flash", "skills": [], "mcps": [] },
159
+ "designer": { "model": "opencode-go/kimi-k2.7-code", "variant": "medium", "skills": [], "mcps": [] },
136
160
  "fixer": { "model": "opencode-go/deepseek-v4-flash", "variant": "high", "skills": [], "mcps": [] }
137
161
  }
138
162
  }
@@ -170,12 +194,12 @@ ping all agents
170
194
 
171
195
  V2 将 oh-my-opencode-slim 变成了以调度器为核心的多智能体工作流系统。Orchestrator 专注于规划、委派、结果整合与验证,而专家智能体在各自的工作通道中完成任务。
172
196
 
173
- - **[后台智能体](#后台智能体)** Orchestrator 现在会把专家作为后台任务派发,跟踪任务/会话 ID,等待完成事件,并在继续之前整合结果。
174
- - **[Companion](#companion)** 可选的浮动桌面窗口会显示当前活跃的智能体,包括并行运行的后台专家。
175
- - **[Deepwork](#deepwork)** 面向大型、多文件、高风险或分阶段编码工作的结构化工作流,使用持久化计划文件和 Oracle 评审关卡。
176
- - **[Reflect](#reflect)** 回顾重复出现的工作模式,并建议可复用的 skill、智能体、命令、配置规则、提示词规则或项目 playbook。
177
- - **[Worktrees](#worktrees)** 将 Git worktree 作为隔离编码通道管理,并为复杂、高风险或并行任务提供安全协议。
178
- - **[oh-my-opencode-slim Skill](#oh-my-opencode-slim-skill)** 随包提供的配置技能,可安全调优模型、提示词、自定义智能体、MCP 访问、预设和插件行为。
197
+ - **[后台智能体](#后台智能体)** - Orchestrator 现在会把专家作为后台任务派发,跟踪任务/会话 ID,等待完成事件,并在继续之前整合结果。
198
+ - **[Companion](#companion)** - 可选的浮动桌面窗口会显示当前活跃的智能体,包括并行运行的后台专家。
199
+ - **[Deepwork](#deepwork)** - 面向大型、多文件、高风险或分阶段编码工作的结构化工作流,使用持久化计划文件和 Oracle 评审关卡。
200
+ - **[Reflect](#reflect)** - 回顾重复出现的工作模式,并建议可复用的 skill、智能体、命令、配置规则、提示词规则或项目 playbook。
201
+ - **[Worktrees](#worktrees)** - 将 Git worktree 作为隔离编码通道管理,并为复杂、高风险或并行任务提供安全协议。
202
+ - **[oh-my-opencode-slim Skill](#oh-my-opencode-slim-skill)** - 随包提供的配置技能,可安全调优模型、提示词、自定义智能体、MCP 访问、预设和插件行为。
179
203
 
180
204
  #### 后台智能体
181
205
 
@@ -192,7 +216,7 @@ V2 将后台专家作为默认心智模型:Orchestrator 规划工作图,启
192
216
  <p><i>左下角视觉伴侣。</i></p>
193
217
  </div>
194
218
 
195
- 交互式安装期间,安装器会询问是否启用 Companion,并默认选择 `yes`。自动化安装可显式启用:
219
+ 交互式安装期间,安装器会询问是否启用 Companion,并默认选择 `no`。自动化安装可显式启用:
196
220
 
197
221
  ```bash
198
222
  bunx oh-my-opencode-slim@latest install --companion=yes
@@ -264,7 +288,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
264
288
  <br><sub><i>在复杂性的深渊中锻造而成。</i></sub>
265
289
  </td>
266
290
  <td width="70%" valign="top">
267
- 当第一个代码库在自身的复杂性下崩溃时,Orchestrator 诞生了。神明与凡人都无法承担责任——因此 Orchestrator 从虚无中显现,从混沌中建立秩序。它确定实现任何目标的最优路径,平衡速度、质量和成本。它引导整个团队,为每项任务召唤合适的专家,并通过委派任务以获得最佳成果。
291
+ 当第一个代码库在自身的复杂性下崩溃时,Orchestrator 诞生了。神明与凡人都无法承担责任--因此 Orchestrator 从虚无中显现,从混沌中建立秩序。它确定实现任何目标的最优路径,平衡速度、质量和成本。它引导整个团队,为每项任务召唤合适的专家,并通过委派任务以获得最佳成果。
268
292
  </td>
269
293
  </tr>
270
294
  <tr>
@@ -346,7 +370,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
346
370
  <br><sub><i>十字路口的声音。</i></sub>
347
371
  </td>
348
372
  <td width="70%" valign="top">
349
- Oracle 伫立在每个架构决策的十字路口。它走过每一条路,见过每一个终点,了解前方潜伏的所有陷阱。当您站在重大重构的悬崖边时,它是向您耳语哪条路通往毁灭、哪条路通往荣耀的声音。它不会替您做选择——但它会照亮道路,让您明智地抉择。
373
+ Oracle 伫立在每个架构决策的十字路口。它走过每一条路,见过每一个终点,了解前方潜伏的所有陷阱。当您站在重大重构的悬崖边时,它是向您耳语哪条路通往毁灭、哪条路通往荣耀的声音。它不会替您做选择--但它会照亮道路,让您明智地抉择。
350
374
  </td>
351
375
  </tr>
352
376
  <tr>
@@ -410,7 +434,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
410
434
  </tr>
411
435
  <tr>
412
436
  <td colspan="2">
413
- <b>默认设置:</b> <code>配置驱动</code> 议员(councillors)来自 <code>council.presets</code>,而 Council 智能体本身的模型来自您的常规 <code>council</code> 智能体配置。
437
+ <b>默认设置:</b> <code>配置驱动</code> - 议员(councillors)来自 <code>council.presets</code>,而 Council 智能体本身的模型来自您的常规 <code>council</code> 智能体配置。
414
438
  </td>
415
439
  </tr>
416
440
  <tr>
@@ -436,7 +460,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
436
460
  <br><sub><i>理解的编织者。</i></sub>
437
461
  </td>
438
462
  <td width="70%" valign="top">
439
- 当人类意识到没有任何单一思想能容纳所有知识时,Librarian 诞生了。它是一位编织者,将零散的信息线索连接成一幅理解的织锦。它穿梭于无限的人类知识图书馆中,从各个角落收集洞察,并将它们绑定为超越单纯事实的答案。它所返回的不是碎片信息——而是深层的理解。
463
+ 当人类意识到没有任何单一思想能容纳所有知识时,Librarian 诞生了。它是一位编织者,将零散的信息线索连接成一幅理解的织锦。它穿梭于无限的人类知识图书馆中,从各个角落收集洞察,并将它们绑定为超越单纯事实的答案。它所返回的不是碎片信息--而是深层的理解。
440
464
  </td>
441
465
  </tr>
442
466
  <tr>
@@ -477,7 +501,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
477
501
  <br><sub><i>美是不可或缺的。</i></sub>
478
502
  </td>
479
503
  <td width="70%" valign="top">
480
- 在这个经常遗忘美学价值的世界里,Designer 是美的不朽守护者。它见证了数以百万计的界面兴衰更替,它记得哪些被铭记,哪些被遗忘。它背负着神圣的使命,确保每一个像素都有其用途,每一个动画都在讲述故事,每一次交互都令人愉悦。美不是可选的——而是不可或缺的。
504
+ 在这个经常遗忘美学价值的世界里,Designer 是美的不朽守护者。它见证了数以百万计的界面兴衰更替,它记得哪些被铭记,哪些被遗忘。它背负着神圣的使命,确保每一个像素都有其用途,每一个动画都在讲述故事,每一次交互都令人愉悦。美不是可选的--而是不可或缺的。
481
505
  </td>
482
506
  </tr>
483
507
  <tr>
@@ -518,7 +542,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
518
542
  <br><sub><i>愿景与现实之间的最后一步。</i></sub>
519
543
  </td>
520
544
  <td width="70%" valign="top">
521
- Fixer 是曾经构建数字世界基石的建造者血脉的最后传人。当规划和辩论的时代开启时,它们依然坚守——它们是真正动手建造的人。它们掌握着如何将想法转化为实物、如何将规范转化为具体实现的古老知识。它们是愿景与现实之间的最后一步。
545
+ Fixer 是曾经构建数字世界基石的建造者血脉的最后传人。当规划和辩论的时代开启时,它们依然坚守--它们是真正动手建造的人。它们掌握着如何将想法转化为实物、如何将规范转化为具体实现的古老知识。它们是愿景与现实之间的最后一步。
522
546
  </td>
523
547
  </tr>
524
548
  <tr>
@@ -565,11 +589,11 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
565
589
  </td>
566
590
  <td width="70%" valign="top">
567
591
 
568
- **只读视觉分析** —— 解读图像、屏幕截图、PDF 和图表。将结构化的观察结果返回给 Orchestrator,而无需将原始文件字节加载到主上下文窗口中。
592
+ **只读视觉分析** -- 解读图像、屏幕截图、PDF 和图表。将结构化的观察结果返回给 Orchestrator,而无需将原始文件字节加载到主上下文窗口中。
569
593
 
570
594
  - 图像、屏幕截图、图表 → `read` 工具(原生图像支持)
571
595
  - PDF 和二进制文档 → `read` 工具(文本 + 结构提取)
572
- - **默认禁用** —— 通过设置 `"disabled_agents": []` 和配置具有视觉能力的模型来启用;若使用 `--preset=opencode-go` 预设安装,将自动使用 `opencode-go/kimi-k2.6` 启用它。
596
+ - **默认禁用** -- 通过设置 `"disabled_agents": []` 和配置具有视觉能力的模型来启用;若使用 `--preset=opencode-go` 预设安装,将自动使用 `opencode-go/kimi-k2.6` 启用它。
573
597
 
574
598
  </td>
575
599
  </tr>
@@ -580,7 +604,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
580
604
  </tr>
581
605
  <tr>
582
606
  <td colspan="2">
583
- <b>默认模型:</b> <code>openai/gpt-5.4-mini</code> <i>需配置具有视觉能力的模型以启用</i>
607
+ <b>默认模型:</b> <code>openai/gpt-5.4-mini</code> - <i>需配置具有视觉能力的模型以启用</i>
584
608
  </td>
585
609
  </tr>
586
610
  <tr>
@@ -605,7 +629,7 @@ Worktrees 将 Git worktree 作为安全、隔离的编码通道管理,默认
605
629
  | **[Council](docs/council.md)** | 使用 `@council` 并行运行多个模型并合成单一答案 |
606
630
  | **[自定义智能体](docs/configuration.md#custom-agents)** | 使用自定义提示词、模型、MCP 访问和 Orchestrator 委派规则定义自己的专家 |
607
631
  | **[ACP Agents](docs/acp-agents.md)** | 将 Claude Code ACP 或 Gemini ACP 等外部 ACP 兼容智能体连接为可委派子智能体 |
608
- | **[多路复用器集成](docs/multiplexer-integration.md)** | 在 Tmux 或 Zellij 窗格中实时观看智能体工作 |
632
+ | **[多路复用器集成](docs/multiplexer-integration.md)** | 在 Tmux、ZellijHerdr 窗格中实时观看智能体工作 |
609
633
  | **[Codemap](docs/codemap.md)** | 生成层级代码地图,更快理解大型代码库 |
610
634
  | **[Clonedeps](docs/clonedeps.md)** | 将选定的依赖源码克隆到被忽略的本地工作区中以供检查 |
611
635
  | **[Worktrees](docs/worktrees.md)** | 使用 `.slim/worktrees/` 通道进行隔离的并行或高风险编码工作 |
@@ -3,7 +3,7 @@ export declare function createCouncilAgent(model: string, customPrompt?: string,
3
3
  /**
4
4
  * Build the prompt for a specific councillor session.
5
5
  *
6
- * Returns the raw user prompt the agent factory (councillor.ts) provides
6
+ * Returns the raw user prompt - the agent factory (councillor.ts) provides
7
7
  * the system prompt with tool-aware instructions. No duplication.
8
8
  *
9
9
  * If a per-councillor prompt override is provided, it is prepended as
@@ -11,15 +11,20 @@ export declare function isSubagent(name: string): name is SubagentName;
11
11
  * @param config - Optional plugin configuration with agent overrides
12
12
  * @returns Array of agent definitions (orchestrator first, then subagents)
13
13
  */
14
- export declare function createAgents(config?: PluginConfig): AgentDefinition[];
14
+ export declare function createAgents(config?: PluginConfig, options?: {
15
+ projectDirectory?: string;
16
+ }): AgentDefinition[];
15
17
  /**
16
18
  * Get agent configurations formatted for the OpenCode SDK.
17
19
  * Converts agent definitions to SDK config format and applies classification metadata.
18
20
  *
19
21
  * @param config - Optional plugin configuration with agent overrides
22
+ * @param options - Optional options including projectDirectory
20
23
  * @returns Record mapping agent names to their SDK configurations
21
24
  */
22
- export declare function getAgentConfigs(config?: PluginConfig): Record<string, SDKAgentConfig>;
25
+ export declare function getAgentConfigs(config?: PluginConfig, options?: {
26
+ projectDirectory?: string;
27
+ }): Record<string, SDKAgentConfig>;
23
28
  /**
24
29
  * Get the set of disabled agent names from config, applying protection rules.
25
30
  */
@@ -13,7 +13,7 @@ export interface AgentDefinition {
13
13
  /**
14
14
  * Resolve agent prompt from base/custom/append inputs.
15
15
  * If customPrompt is provided, it replaces the base entirely.
16
- * Otherwise, customAppendPrompt is appended to the base.
16
+ * If customAppendPrompt is provided, it appends after whichever base won.
17
17
  */
18
18
  export declare function resolvePrompt(base: string, customPrompt?: string, customAppendPrompt?: string): string;
19
19
  /**
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A custom skill bundled in this repository.
3
+ * Unlike npx-installed skills, these are copied from src/skills/ to the OpenCode skills directory
4
+ */
5
+ export interface CustomSkill {
6
+ /** Skill name (folder name) */
7
+ name: string;
8
+ /** Human-readable description */
9
+ description: string;
10
+ /** List of agents that should auto-allow this skill */
11
+ allowedAgents: string[];
12
+ /** Source path in this repo (relative to project root) */
13
+ sourcePath: string;
14
+ }
15
+ /**
16
+ * Registry of custom skills bundled in this repository.
17
+ */
18
+ export declare const CUSTOM_SKILLS: CustomSkill[];
@@ -1,21 +1,5 @@
1
- /**
2
- * A custom skill bundled in this repository.
3
- * Unlike npx-installed skills, these are copied from src/skills/ to the OpenCode skills directory
4
- */
5
- export interface CustomSkill {
6
- /** Skill name (folder name) */
7
- name: string;
8
- /** Human-readable description */
9
- description: string;
10
- /** List of agents that should auto-allow this skill */
11
- allowedAgents: string[];
12
- /** Source path in this repo (relative to project root) */
13
- sourcePath: string;
14
- }
15
- /**
16
- * Registry of custom skills bundled in this repository.
17
- */
18
- export declare const CUSTOM_SKILLS: CustomSkill[];
1
+ import { CUSTOM_SKILLS, type CustomSkill } from './custom-skills-registry';
2
+ export { CUSTOM_SKILLS, type CustomSkill };
19
3
  /**
20
4
  * Get the target directory for custom skills installation.
21
5
  */
@@ -23,7 +7,7 @@ export declare function getCustomSkillsDir(): string;
23
7
  /**
24
8
  * Install a custom skill by copying from src/skills/ to the OpenCode skills directory
25
9
  * @param skill - The custom skill to install
26
- * @param projectRoot - Root directory of oh-my-opencode-slim project
27
10
  * @returns True if installation succeeded, false otherwise
11
+ * @deprecated Use syncBundledSkillsFromPackage instead.
28
12
  */
29
13
  export declare function installCustomSkill(skill: CustomSkill): boolean;