oh-my-opencode-cohub 1.0.14 → 1.0.15
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.md +40 -10
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,15 +16,35 @@ OpenCode 中文智能体编排插件 CoHub——纯调度模式、全中文提
|
|
|
16
16
|
- 📜 **AGENTS.md 全覆盖**:项目级和用户级 AGENTS.md 对**本插件所有代理**(内置 8 个 + 插件 4 个)均生效,无需额外配置
|
|
17
17
|
- 📖 **架构借鉴**:插件架构和代理编排理念借鉴了 oh-my-opencode-slim,但完全独立实现、无运行时依赖
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## 安装
|
|
20
20
|
|
|
21
|
-
###
|
|
21
|
+
### 前置条件
|
|
22
|
+
|
|
23
|
+
- [OpenCode](https://opencode.ai) 已安装
|
|
24
|
+
- 推荐安装 [Bun](https://bun.sh)(CLI 一键安装需要)
|
|
25
|
+
|
|
26
|
+
### 方式一:CLI 一键安装(推荐)
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
bunx oh-my-opencode-cohub install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
CLI 会自动完成以下操作:
|
|
33
|
+
|
|
34
|
+
1. 将 `oh-my-opencode-cohub` 注册到 `~/.config/opencode/opencode.json` 的 `plugin` 数组
|
|
35
|
+
2. 将插件注册到 TUI 配置 `~/.config/opencode/tui.json`
|
|
36
|
+
3. 在 `opencode.json` 的 `agent` 字段中注册全部 12 个 `co-*` 代理
|
|
37
|
+
4. 写入默认配置文件 `~/.config/opencode/oh-my-opencode-cohub.json`
|
|
38
|
+
|
|
39
|
+
重启 OpenCode 即可生效。
|
|
40
|
+
|
|
41
|
+
### 方式二:npm 安装 + 手动配置
|
|
22
42
|
|
|
23
43
|
```bash
|
|
24
44
|
npm install oh-my-opencode-cohub
|
|
25
45
|
```
|
|
26
46
|
|
|
27
|
-
|
|
47
|
+
然后在 `~/.config/opencode/opencode.json` 中添加:
|
|
28
48
|
|
|
29
49
|
```json
|
|
30
50
|
{
|
|
@@ -32,15 +52,25 @@ npm install oh-my-opencode-cohub
|
|
|
32
52
|
}
|
|
33
53
|
```
|
|
34
54
|
|
|
35
|
-
重启 OpenCode 即可。
|
|
55
|
+
重启 OpenCode 即可。
|
|
56
|
+
|
|
57
|
+
### 卸载
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bunx oh-my-opencode-cohub uninstall
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
CLI 会精确清理所有 `co-*` 代理和相关配置,不影响其他插件的配置数据。
|
|
64
|
+
|
|
65
|
+
如果使用 npm 手动安装,则需手动从 `opencode.json` 的 `plugin` 数组中移除 `"oh-my-opencode-cohub"`,然后 `npm uninstall oh-my-opencode-cohub`。
|
|
66
|
+
|
|
67
|
+
### 验证安装
|
|
36
68
|
|
|
37
|
-
|
|
69
|
+
安装并重启 OpenCode 后,确认以下效果:
|
|
38
70
|
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
- 注入中文语言要求
|
|
43
|
-
- 所有代理(包括 @rule-user、@rule-project、@rule-app、@planner)自动继承项目级和用户级 AGENTS.md 规则
|
|
71
|
+
- 对话中自动出现 **中文语言要求**(如 "你必须始终使用中文进行思考、推理和回复")
|
|
72
|
+
- 可用代理列表中出现 12 个 `co-*` 前缀代理(`co-orchestrator`、`co-oracle`、`co-librarian`、`co-explorer`、`co-designer`、`co-fixer`、`co-observer`、`co-council`、`co-rule-user`、`co-rule-project`、`co-rule-app`、`co-planner`)
|
|
73
|
+
- Orchestrator 自动进入纯调度模式(只做规划、委派、验证,不直接操作文件)
|
|
44
74
|
|
|
45
75
|
## 代理一览
|
|
46
76
|
|
package/dist/index.js
CHANGED
|
@@ -660,7 +660,9 @@ var CoHubPlugin = async (input, options) => {
|
|
|
660
660
|
const agents = [
|
|
661
661
|
{
|
|
662
662
|
name: "co-orchestrator",
|
|
663
|
-
config: { mode: "primary", model: "deepseek/deepseek-v4-pro", variant: "max", prompt:
|
|
663
|
+
config: { mode: "primary", model: "deepseek/deepseek-v4-pro", variant: "max", prompt: ORCHESTRATOR_PROMPT + `
|
|
664
|
+
|
|
665
|
+
` + CHINESE_LANGUAGE_INSTRUCTION }
|
|
664
666
|
},
|
|
665
667
|
{
|
|
666
668
|
name: "co-oracle",
|