dsh-rolegroup 0.11.3 → 0.12.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.
- package/CHANGELOG.md +148 -2
- package/README.en.md +63 -51
- package/README.md +54 -44
- package/lib/client.js +32 -15
- package/lib/command.js +125 -4
- package/lib/doctor.js +9 -9
- package/lib/index.js +54 -34
- package/lib/roles.js +50 -16
- package/package.json +1 -1
- package/src/client/card.jsx +14 -5
- package/src/client/controller.js +3 -4
- package/src/client/locales.js +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,8 +3,154 @@
|
|
|
3
3
|
本项目遵循 [Semantic Versioning](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
版本纪律见 `AGENTS.md`「提交与发布」。
|
|
5
5
|
|
|
6
|
-
>
|
|
7
|
-
>
|
|
6
|
+
> **历史注记**:`0.7.0` 发布前,npm 上的上一版本是 `0.6.1`;这期间开发中用过 0.6.2 / 0.6.3 / 0.8.0 等
|
|
7
|
+
> 内部里程碑号但都没发布,所以 `0.7.0` 是**自 `0.6.1` 以来的累积变更**(按 semver 只升一个 minor,不跳号)。
|
|
8
|
+
> 当前 npm 上的 latest 见 registry(2026-11-16 查 `dist-tags.latest` = `0.11.7`)。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## [0.12.0] — 2026-11-16
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- 新增 `/rg <任务>` 命令(`/rolegroup work <任务>` 长别名):向主会话注入一条
|
|
17
|
+
`source.kind='rolegroup'` 的委派指令;只主会话可用,子会话拒绝;不点名具体角色,按在册公告选择。
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- 角色委派方法论:`analyst` / `reviewer` / `scout` 的 persona 增加核验纪律(逐字引用、`UNVERIFIED`、
|
|
22
|
+
`PARTIAL` 与 `FALSE` 的区分);`roleAnnouncement` 增加简报模板、父 agent 规范(子任务结论是输入不是裁决)
|
|
23
|
+
和角色分流(代码定位/事实取证 → scout,带验收标准的收口核对 → reviewer,设计判断 → analyst;
|
|
24
|
+
实现任务已有结构化计划或规格才派 coder,未形成计划的可先派 planner)。
|
|
25
|
+
- 依据:2026-11-16 的四臂对照。同一 `analyst` 下,中性简报逐字准确;加了“如果全真就说 5/5 TRUE”的简报
|
|
26
|
+
把 5 条部分成立的命题全判 `TRUE` 并编造引用。完整记录在内部评测档案,不随仓库公开。
|
|
27
|
+
- 角色公告明确备用链只在配置提供 `fallbackModels` 时生效,示例路由改为 `kimi-coding/k3.1-pro`,并明确角色工具仅主会话可用。
|
|
28
|
+
- coder/planner 去方法论化:内置 persona 不再写死 TDD 与 plans.md;计划/规格路径由调用方简报给出(兼容 openspec
|
|
29
|
+
的 tasks.md、superpowers 的 docs/plans/*.md、changeflow 的 plans/<change>.md),验证节奏以计划描述为准。
|
|
30
|
+
注意传播断点:已在面板保存过角色的用户,其内联 persona 不受内置表变更影响,需「恢复官方推荐」或手动编辑才能切换到新默认。
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- 启动期改用备用档后,末次角色公告会按实际路由重发,并列出「已改用备用档」的角色;重挂失败或被 preset
|
|
35
|
+
健康审计剔除的角色不会再同时出现在这条备用档提示里。
|
|
36
|
+
- 零在册角色且有降级时,公告只说明当前无角色、列出降级并给出 `/rolegroup doctor`,不再输出空角色列表、
|
|
37
|
+
`fallback` 分流或简报模板;降级段也删去了并不总成立的「其余角色不受影响」。零角色且无降级时公告返回空串。
|
|
38
|
+
- provider 已注册但模型未在广告列表的角色,除了启动日志,现在也会在公告中列出「模型未在广告列表」及
|
|
39
|
+
「委派预检可能失败」;降级与该预警可并存,风险条目使用 resolved 实际备用路由,不再错写主路由。
|
|
40
|
+
- 修复路由解析返回角色副本后按对象 key 回收导致的 fiber/preset 残留;重挂失败立即按 toolName 从有效角色
|
|
41
|
+
剔除并回收资源,后续审计 reject/timeout 不再把它留在 registered,也不影响其他健康角色。
|
|
42
|
+
- 修正公告的备用链与证据要求:不再声称所有角色都有备用链;代码、运行、图片与外部事实分别要求文件:行号、
|
|
43
|
+
命令与输出、区域/坐标和原始来源,无法复现的按 UNVERIFIED 处理。
|
|
44
|
+
- 文档修正与精简:源码首装改为 `npm install --omit=peer` → `link:deps`,analyst 示例回到
|
|
45
|
+
`qwen3.8-max`,vision 备用链说明补齐账号档;删除过期的测试数量,合并重复安装说明并压缩 doctor 正常示例。
|
|
46
|
+
|
|
47
|
+
### 验证
|
|
48
|
+
|
|
49
|
+
- `npm test` 154 passed;
|
|
50
|
+
- `npm run build:client` 连跑两次,产物 hash 一致(构建确定性);
|
|
51
|
+
- 真实 DSH 中 `/rolegroup doctor`:重载前后均 8 个角色在册,`failed` / `invalid` / `problems` 为空;
|
|
52
|
+
- 一次 `/rg` 实际委派:命中 `fallback`,返回了包名与版本;
|
|
53
|
+
- 插件停用再启用后,启动报告的时间字段有更新。
|
|
54
|
+
|
|
55
|
+
截至定版时尚未执行 `npm publish`。
|
|
56
|
+
|
|
57
|
+
### English summary
|
|
58
|
+
|
|
59
|
+
Adds `/rg` for role-based delegation from the main session. Changes delegation verification discipline
|
|
60
|
+
(verbatim citations, evidence requirements per fact type) and makes coder/planner methodology-neutral so
|
|
61
|
+
callers pass their own plan or spec paths. Fixes lifecycle cleanup (no leftover fiber/preset when
|
|
62
|
+
re-registration fails), warnings that now report the actual fallback route, and role announcement text that
|
|
63
|
+
no longer overclaims fallback chains or hides degradation states. Also corrects and trims the bilingual
|
|
64
|
+
installation, model, and diagnostics documentation.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## [0.11.7] — 2026-11-13
|
|
69
|
+
|
|
70
|
+
发布前把文档过了一遍,清掉最后几处"旧世界"残留(都不影响行为)。
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
|
|
74
|
+
- README 中英的致谢段不再提"JSONC 配置格式"(配置文件层已删);
|
|
75
|
+
- AGENTS 架构地图把 `settings-table.js` 的职责从"section ↔ 文件配置"改为"section ↔ 面板覆盖表";
|
|
76
|
+
- AGENTS 的剪枝说明改为"沿链降级到 `deepseek-account` / `deepseek-official`"(链首已是账号);
|
|
77
|
+
- 删掉测试文件里一段描述已删除测试的孤儿注释(还在讲"整层择一")。
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## [0.11.6] — 2026-11-13
|
|
82
|
+
|
|
83
|
+
第一次用 `dsh-browser-playwright-codex` 在真浏览器里点了一遍设置页(隔离 profile,不动用户配置)。
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- **「推理档位」把"模型不可用"说成"该模型不支持"**:目录里没有该模型(凭据缺失 / provider 未注册)时
|
|
88
|
+
`modelInfo` 存在但 `available === false`,代码却断言它不支持推理档位。现在分两种:`available === false`
|
|
89
|
+
显示「模型不可用」,只有目录明确声明无档位时才说「该模型不支持推理档位」。
|
|
90
|
+
|
|
91
|
+
### 验证(浏览器实测,dsh 0.2.2-rc.3 + dsh-browser-playwright-codex 0.8.3)
|
|
92
|
+
|
|
93
|
+
- 官方推荐态:状态行「当前生效:官方推荐(内置表)」、8 行、`保存`/`放弃` 禁用、`恢复官方推荐` 不渲染;
|
|
94
|
+
- 新增角色 → 「未保存」+ 两个按钮可用;带空 provider 保存 → 页内「保存失败:请检查标红字段后重试」,
|
|
95
|
+
**未发起写入**;删除该行 → 标记消失;
|
|
96
|
+
- 改一行后保存 → 状态变「面板自定义(8 行覆盖)」,`恢复官方推荐` 出现;
|
|
97
|
+
- 点「恢复官方推荐」→ 回到官方推荐态,行内容回到出厂值,按钮消失;profile patch 落盘为
|
|
98
|
+
`enabled: true` + `roles: []`;
|
|
99
|
+
- 改一行后点「放弃」→ 值回到生效值,「未保存」消失;
|
|
100
|
+
- 内层滚动生效:头部与状态行固定、列表独立滚动、动作区固定在底部。
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## [0.11.5] — 2026-11-13
|
|
105
|
+
|
|
106
|
+
dsh 升到 **0.2.2-rc.3**(跨了 `0.2.1-rc.3` → `0.2.2-rc.1` 四个升级目录)。按升级文档逐条核对,只命中
|
|
107
|
+
两个 subagent 相关变更,都不影响本插件;真机实测也通过。
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
|
|
111
|
+
- README 中英的"本机实测"版本改为 0.2.2-rc.3(`engines.dsh` 保持 `>=0.2.1-rc.1`)。
|
|
112
|
+
- AGENTS 补充一条坑:dsh 升级后 `link:deps` 若报「已存在且不是软链」,说明本地留着一份旧版 schemastery
|
|
113
|
+
真实副本(这次是 3.18.5 vs 部署树 3.19.0),两边不一致会让 settings 表单行为异常。删掉重跑即可。
|
|
114
|
+
|
|
115
|
+
### 验证(0.2.2-rc.3 真机)
|
|
116
|
+
|
|
117
|
+
- 启动报告 8/8 注册,`failed` / `invalid` / `problems` 全空;
|
|
118
|
+
- 委派链路实测:`scout` 子会话 header `agentPreset=rolegroup-scout`、depth 1,正常调用 `glob` + `read`
|
|
119
|
+
并返回正确结果,`turn/end: completed`;
|
|
120
|
+
- `npm test` 138 passed(含 engines 覆盖断言)。
|
|
121
|
+
|
|
122
|
+
### 核对过的升级项(均不适用)
|
|
123
|
+
|
|
124
|
+
`subagent-names`(改的是调用参数与 `list_agents` 行格式,我们不消费)、`subagent-explicit-reasoning`
|
|
125
|
+
(要求调用时 provider/model 同时给出;我们把两者写在实例 Config 里,且 `modelSelectionSettings: false`)、
|
|
126
|
+
`model-listing-refresh`(我们没有自建列表缓存)、`context-menu` / `css-anchored-menus`(不使用菜单)。
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## [0.11.4] — 2026-11-13
|
|
131
|
+
|
|
132
|
+
发布前的干净环境实测:在隔离 DSH_HOME、没有任何 qwen/kimi 凭据的机器上装 0.11.3,**8 个角色只注册了
|
|
133
|
+
2 个**,6 个被剪枝。市场审核装的大概率就是这种环境。
|
|
134
|
+
|
|
135
|
+
### Fixed
|
|
136
|
+
|
|
137
|
+
- **备用链比主路由严格**:主路由「provider 在册、模型不在广告列表」是宽容的(照用 + 警告),但链上的
|
|
138
|
+
候选会被直接跳过。凭据缺失时模型列表为空,于是整条链不可用 → 角色被剪枝。现在链与主路由同口径:
|
|
139
|
+
记下第一个"provider 在册、模型未广告"的候选并降级过去(带 `warning: 'model-unadvertised'`)。
|
|
140
|
+
同一环境修复后 **8/8 注册、6 个标降级到 `deepseek-account/deepseek-flash`**。
|
|
141
|
+
- 剪枝原因、doctor 的修复建议、面板层级说明仍在让用户去改 `rolegroup.jsonc`(v0.11 起已不生效),
|
|
142
|
+
并复述旧的三层优先级。统统改为指向「设置 → 角色配置」/ 两层模型。
|
|
143
|
+
- README 的目录表还列着已删除的 `config-info.js`、`config-file.js`。
|
|
144
|
+
|
|
145
|
+
### Changed
|
|
146
|
+
|
|
147
|
+
- 官方推荐态下不再渲染灰着的「恢复官方推荐」——与「补齐」按钮同一条规则:没活干就不显示。
|
|
148
|
+
|
|
149
|
+
### Added
|
|
150
|
+
|
|
151
|
+
- compose 级断言:干净环境(仅两个 DeepSeek provider、`listModels` 恒空)必须 8/8 在册、`invalid` 为空、
|
|
152
|
+
恰 6 条带 `primary` 的降级记录。证伪:去掉链宽容 → 「2 !== 8」红。
|
|
153
|
+
- 断言:剪枝原因不得出现 `rolegroup.jsonc` 且必须指向设置面板;自定义态才渲染「恢复官方推荐」。
|
|
8
154
|
|
|
9
155
|
---
|
|
10
156
|
|
package/README.en.md
CHANGED
|
@@ -7,7 +7,7 @@ instance, so the tool name is the role name.
|
|
|
7
7
|
The role/category binding is inspired by
|
|
8
8
|
[oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent) ("omo"); see §9.
|
|
9
9
|
|
|
10
|
-
> Version **0.
|
|
10
|
+
> Version **0.12.0** | dsh **≥ 0.2.1-rc.1** (verified on 0.2.2-rc.3) | MIT
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -30,11 +30,9 @@ delegation. The two can coexist in one deployment. A common pattern is to split
|
|
|
30
30
|
|
|
31
31
|
| We do not | Why |
|
|
32
32
|
|---|---|
|
|
33
|
-
| **Orchestrate** (DAGs, multi-round collaboration, team pipelines) | That is the official Agent Teams' job; two orchestrators fight each other |
|
|
34
33
|
| **Register an MCP server** | Dozens of tools inflate the tool list, the permission surface, and the prompt budget |
|
|
35
34
|
| **Write a project-level state directory** (`.rolegroup/`) | We route work; we are not a runtime state machine — state belongs to the orchestration layer |
|
|
36
35
|
| **Take over the main session's Agent Preset** | An explicit preset **replaces** the parent composition (§4); taking over means choosing for the user |
|
|
37
|
-
| **Keep dual-shape branches for old dsh lines** | Since v0.6 we support ≥0.2.1 only; older lines get a clear error instead of half-working |
|
|
38
36
|
|
|
39
37
|
When you need orchestration, state, or an MCP tool chain, compose other plugins — they do not replace this one.
|
|
40
38
|
|
|
@@ -49,12 +47,8 @@ dsh plugin --profile web add dsh-rolegroup
|
|
|
49
47
|
You can also open the Plugins page, click "Add plugin", choose "Install a third-party plugin", enter
|
|
50
48
|
`dsh-rolegroup`, and click "Install". Restart `dsh web` after installing.
|
|
51
49
|
|
|
52
|
-
If a third-party market rewrite drops the plugin, add it again.
|
|
53
|
-
|
|
54
|
-
### Plugin market
|
|
55
|
-
|
|
56
|
-
Open the Plugin Market, search for `dsh-rolegroup`, and install it. The market uses the same plugin manager
|
|
57
|
-
underneath.
|
|
50
|
+
If a third-party market rewrite drops the plugin, add it again. You can also search for
|
|
51
|
+
`dsh-rolegroup` in the Plugin Market and install it — same flow underneath.
|
|
58
52
|
|
|
59
53
|
### From source
|
|
60
54
|
|
|
@@ -63,16 +57,19 @@ For development or local changes:
|
|
|
63
57
|
```sh
|
|
64
58
|
git clone https://github.com/zhouxnsz/dsh-rolegroup.git
|
|
65
59
|
cd dsh-rolegroup
|
|
60
|
+
npm install --omit=peer
|
|
66
61
|
npm run link:deps
|
|
67
|
-
npm install
|
|
68
62
|
dsh plugin --profile web add "link:$PWD"
|
|
69
63
|
```
|
|
70
64
|
|
|
71
|
-
`
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
`--omit=peer` installs the esbuild devDependency without pulling the peer
|
|
66
|
+
`@deepseek-ai/schemastery` in as a real copy; `link:deps` then symlinks the deployment's schemastery into
|
|
67
|
+
this repo, which the Settings panel needs for source installs. The reverse order breaks: a plain
|
|
68
|
+
`npm install` puts a real copy there first, and `link:deps` **does not overwrite** an existing real
|
|
69
|
+
directory. If you already have one, delete `node_modules/@deepseek-ai/schemastery` and rerun `link:deps`.
|
|
74
70
|
|
|
75
|
-
You can also mount it on the home layer
|
|
71
|
+
You can also mount it on the home layer (use this only to survive profile rewrites; for regular
|
|
72
|
+
development use the `link:` install above):
|
|
76
73
|
|
|
77
74
|
```sh
|
|
78
75
|
ln -sfn "$PWD" ~/.dsh/profiles/web/node_modules/dsh-rolegroup
|
|
@@ -95,6 +92,19 @@ dsh --profile web --dump-config | grep -A1 dsh-rolegroup # should show - id: d
|
|
|
95
92
|
Restart `dsh web` and open a new session. The eight role tools should be in the tool list; you can also run
|
|
96
93
|
`/rolegroup doctor` from the new session.
|
|
97
94
|
|
|
95
|
+
### Delegate by role
|
|
96
|
+
|
|
97
|
+
Type:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
/rg <task>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The plugin injects the task plus a "delegate by role" directive into the main session; the main model then
|
|
104
|
+
picks from the roles registered on this machine, writes briefs, and dispatches. `/rolegroup work <task>` is
|
|
105
|
+
the long alias. `/rg` is main-session only — child sessions get an error. It only triggers; whether to
|
|
106
|
+
dispatch is still the main model's call.
|
|
107
|
+
|
|
98
108
|
After changing code, restart and open a new session. For panel saves, see §5.
|
|
99
109
|
|
|
100
110
|
## 3. Built-in roles
|
|
@@ -110,8 +120,8 @@ them in the panel. Model ids and the effective routes are whatever `/rolegroup d
|
|
|
110
120
|
| Role | Built-in model | Responsibility |
|
|
111
121
|
|---|---|---|
|
|
112
122
|
| `analyst` | Qwen3.8 Max | Requirement clarification, path classification, plan review (do it / how), architecture decisions |
|
|
113
|
-
| `planner` | Kimi K3.1 Pro | Plan design: file layout, task breakdown, interface contracts, writing
|
|
114
|
-
| `coder` | Kimi K3.1 Pro | Implementation:
|
|
123
|
+
| `planner` | Kimi K3.1 Pro | Plan design: file layout, task breakdown, interface contracts, writing the plan document |
|
|
124
|
+
| `coder` | Kimi K3.1 Pro | Implementation: follow the steps of the plan/spec document supplied in the brief and report evidence per step |
|
|
115
125
|
| `reviewer` | Qwen3.8 Flash | Closing review: check acceptance criteria against evidence (was it actually done) |
|
|
116
126
|
| `scout` | DeepSeek V4.1 Flash | Exploration and bulk search (returns `file:line` evidence) |
|
|
117
127
|
| `scribe` | Qwen3.8 Flash | Documentation backfill, reports, spec maintenance |
|
|
@@ -120,8 +130,28 @@ them in the panel. Model ids and the effective routes are whatever `/rolegroup d
|
|
|
120
130
|
|
|
121
131
|
### Recommended bindings (official suggestion)
|
|
122
132
|
|
|
123
|
-
See **[MODELS.en.md](./MODELS.en.md)** for the
|
|
124
|
-
|
|
133
|
+
See **[MODELS.en.md](./MODELS.en.md)** for the built-in default model per role.
|
|
134
|
+
|
|
135
|
+
### Delegation quality
|
|
136
|
+
|
|
137
|
+
Roles do not inherit the parent's context; the more specific the brief, the more usable the result. The
|
|
138
|
+
plugin gives the main model a fixed template in the system prompt:
|
|
139
|
+
|
|
140
|
+
- A brief should state: background, goal, constraints, acceptance, known facts (`file:line`), claims to verify;
|
|
141
|
+
- Factual conclusions need verifiable evidence: `file:line` for code, command and output for runtime results,
|
|
142
|
+
region/coordinates for images, and original sources for external facts;
|
|
143
|
+
quote verbatim, and unreproducible facts are marked UNVERIFIED;
|
|
144
|
+
- Do not prescribe the expected verdict distribution ("should be all true / should find problems"). The
|
|
145
|
+
2026-11-16 comparison showed this wording makes `analyst` compress partially-true claims into `TRUE` and
|
|
146
|
+
fabricate quotes; the neutral briefs quoted verbatim.
|
|
147
|
+
- A subagent's conclusion is input, not a verdict. Spot-check quotes; do not adopt a confident report that
|
|
148
|
+
cannot show evidence.
|
|
149
|
+
|
|
150
|
+
Fallback chains apply only when a role configuration provides fallbackModels; an explicitly configured role
|
|
151
|
+
without that field does not inherit the built-in chain.
|
|
152
|
+
The degraded and model-unadvertised warnings can coexist, and preflight risk names the actual fallback route.
|
|
153
|
+
|
|
154
|
+
Use `scout` for code location and fact-finding, `reviewer` for acceptance-criteria closing review, and `analyst` for design judgement. For implementation, use `coder` when a structured plan or spec already exists (with its path supplied in the brief); if no plan has been formed, you may delegate to `planner` first.
|
|
125
155
|
|
|
126
156
|
## 4. Configuration
|
|
127
157
|
|
|
@@ -159,14 +189,11 @@ available, with repair hints when something is wrong. When a built-in fallback i
|
|
|
159
189
|
> On a fresh machine, run `/rolegroup doctor` first to see which roles' primary routes are unavailable; change
|
|
160
190
|
> bindings in the panel.
|
|
161
191
|
|
|
162
|
-
Note: pasting text starting with `/` into the GUI composer sends it as a normal message, not a command. Type
|
|
163
|
-
it by hand or pick it from the completion list.
|
|
164
|
-
|
|
165
192
|
Example:
|
|
166
193
|
|
|
167
194
|
> If a role's provider is not registered, an error block is appended below the table and the provider is
|
|
168
195
|
> marked ❌. The role is not registered. This matters most for a fallback role: a skipped fallback route does
|
|
169
|
-
> not exist.
|
|
196
|
+
> not exist. The built-in `fallback` role uses `deepseek-official` because that provider is always registered:
|
|
170
197
|
|
|
171
198
|
```
|
|
172
199
|
❌ fallback:provider "example-provider" 当前未注册(在用:deepseek-official, kimi-coding, qwen-token-plan-cn)
|
|
@@ -175,18 +202,9 @@ Example:
|
|
|
175
202
|
|
|
176
203
|
```
|
|
177
204
|
dsh-rolegroup doctor — 8 个在册角色
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
analyst qwen-token-plan-cn/qwen3.8-max ✅ ✅
|
|
182
|
-
planner kimi-coding/k3.1-pro ✅ ✅
|
|
183
|
-
coder kimi-coding/k3.1-pro ✅ ✅
|
|
184
|
-
reviewer qwen-token-plan-cn/qwen3.8-flash ✅ ✅
|
|
185
|
-
scout deepseek-official/deepseek-flash ✅ ✅
|
|
186
|
-
scribe qwen-token-plan-cn/qwen3.8-flash ✅ ✅
|
|
187
|
-
vision qwen-token-plan-cn/qwen3.8-flash ✅ ✅
|
|
188
|
-
fallback deepseek-official/deepseek-flash ✅ ✅
|
|
189
|
-
|
|
205
|
+
analyst qwen-token-plan-cn/qwen3.8-max ✅ ✅
|
|
206
|
+
planner kimi-coding/k3.1-pro ✅ ✅
|
|
207
|
+
…
|
|
190
208
|
✅ 无异常
|
|
191
209
|
```
|
|
192
210
|
|
|
@@ -196,37 +214,31 @@ when the llm service is down the availability column shows ➖.
|
|
|
196
214
|
## 7. Development
|
|
197
215
|
|
|
198
216
|
```sh
|
|
199
|
-
npm
|
|
200
|
-
npm
|
|
201
|
-
npm test
|
|
202
|
-
npm run build:client
|
|
217
|
+
npm install --omit=peer # esbuild devDependency, without schemastery as a real copy
|
|
218
|
+
npm run link:deps # symlink the deployment's schemastery into this repo
|
|
219
|
+
npm test # offline smoke suite (plain Node); pretest runs link:deps
|
|
220
|
+
npm run build:client # after editing src/client/** or lib/roles.js
|
|
203
221
|
```
|
|
204
222
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
`link:deps`. Without `npm install`, `npm test` fails with `ERR_MODULE_NOT_FOUND: esbuild`. Without
|
|
208
|
-
`link:deps`, dsh prints
|
|
223
|
+
For the install order and why, see §2 "From source". Without `npm install`, `npm test` fails with
|
|
224
|
+
`ERR_MODULE_NOT_FOUND: esbuild`. Without `link:deps`, dsh prints
|
|
209
225
|
`无法使用部署树的 @deepseek-ai/schemastery …` at startup and the plugin runs host-only: role tools still
|
|
210
|
-
work, but the Settings section is missing.
|
|
211
|
-
|
|
212
|
-
What `link:deps` does: the plugin is installed as a `link:`, so by Node's realpath rule it cannot import
|
|
213
|
-
`@deepseek-ai/*` directly. Settings also requires the entry to export a schemastery `Config` statically,
|
|
214
|
-
which cannot be resolved lazily. The script symlinks the deployment's schemastery into this repo; the symlink
|
|
215
|
-
is not committed.
|
|
226
|
+
work, but the Settings section is missing. `pretest` runs `link:deps` automatically, but it likewise does
|
|
227
|
+
not overwrite an existing real copy.
|
|
216
228
|
|
|
217
229
|
Layout:
|
|
218
230
|
|
|
219
231
|
| Path | Contents |
|
|
220
232
|
|---|---|
|
|
221
|
-
| `lib/` | Host side: `index.js` (composition/recomposition), `roles.js` (role table and merge), `config.js` (settings `Config`), `
|
|
222
|
-
| `src/client/` | Client sources (`controller.js` / `card.jsx` / `locales.js` / `meta.js`
|
|
233
|
+
| `lib/` | Host side: `index.js` (composition/recomposition), `roles.js` (role table and merge), `config.js` (settings `Config`), `settings-table.js` (override table ↔ section), `init.js` (`/rolegroup init` export), `doctor.js`, `command.js` |
|
|
234
|
+
| `src/client/` | Client sources (`controller.js` / `card.jsx` / `locales.js` / `meta.js`); `lib/client.js` is the esbuild artifact and must be rebuilt after edits |
|
|
223
235
|
| `tests/` | Offline smoke suite (plain Node, no browser) |
|
|
224
236
|
| `scripts/` | `build-client.mjs` (esbuild bundle; injects the `package.json` version) and `link-deployment-deps.mjs` (environment symlink) |
|
|
225
237
|
| `locale/` | Plugin metadata: `meta.title` and `meta.description` in `en.json` / `zh.json`, shown by the Plugins page and the Plugin Market |
|
|
226
238
|
|
|
227
239
|
## 8. Credits
|
|
228
240
|
|
|
229
|
-
The role (category) to model binding, the
|
|
241
|
+
The role (category) to model binding, the persona convention, and the rule that role subagents cannot
|
|
230
242
|
delegate again are inspired by [oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent) ("omo"). The
|
|
231
243
|
model pairings are not copied from omo; this plugin's bindings are decided by its own configuration and
|
|
232
244
|
evaluation.
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ dsh 的角色化委派插件。先定义角色(名字、绑定模型、persona
|
|
|
6
6
|
角色/类别绑定的思路参考了 [oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent)(omo),
|
|
7
7
|
详见 §9。
|
|
8
8
|
|
|
9
|
-
> 版本 **0.
|
|
9
|
+
> 版本 **0.12.0** | 要求 dsh **≥ 0.2.1-rc.1**(本机实测 0.2.2-rc.3)| MIT
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -27,7 +27,6 @@ dsh 的角色化委派插件。先定义角色(名字、绑定模型、persona
|
|
|
27
27
|
|
|
28
28
|
| 不做 | 为什么 |
|
|
29
29
|
|---|---|
|
|
30
|
-
| **不做编排**(DAG / 多轮协作 / 团队流水线) | 那是官方智能体团队的职责;两套编排会互相踩 |
|
|
31
30
|
| **不注册 MCP server** | 几十个工具会把工具列表、权限面、prompt 预算一起撑大 |
|
|
32
31
|
| **不写项目级状态目录**(`.rolegroup/`) | 我们做的是「路由」,不是「运行时状态机」;状态属于编排层 |
|
|
33
32
|
| **不接管主会话的会话模式(Agent Preset)** | 显式 preset 是**替换**父组合(§4),接管等于替用户做选择 |
|
|
@@ -45,11 +44,8 @@ dsh plugin --profile web add dsh-rolegroup
|
|
|
45
44
|
也可以在「插件」页 →「添加插件」→「安装第三方插件」,填 `dsh-rolegroup`,点「安装」。装好后重启
|
|
46
45
|
`dsh web`。
|
|
47
46
|
|
|
48
|
-
如果第三方市场重写 profile 把插件清掉,重新 `add`
|
|
49
|
-
|
|
50
|
-
### 插件市场
|
|
51
|
-
|
|
52
|
-
打开「插件市场」,搜索 `dsh-rolegroup`,点安装。市场和上面的插件管理器走同一套安装流程。
|
|
47
|
+
如果第三方市场重写 profile 把插件清掉,重新 `add` 一次即可。也可以在「插件市场」搜索
|
|
48
|
+
`dsh-rolegroup` 安装,走同一套流程。
|
|
53
49
|
|
|
54
50
|
### 从源码安装
|
|
55
51
|
|
|
@@ -58,15 +54,17 @@ dsh plugin --profile web add dsh-rolegroup
|
|
|
58
54
|
```sh
|
|
59
55
|
git clone https://github.com/zhouxnsz/dsh-rolegroup.git
|
|
60
56
|
cd dsh-rolegroup
|
|
57
|
+
npm install --omit=peer
|
|
61
58
|
npm run link:deps
|
|
62
|
-
npm install
|
|
63
59
|
dsh plugin --profile web add "link:$PWD"
|
|
64
60
|
```
|
|
65
61
|
|
|
66
|
-
`
|
|
67
|
-
`
|
|
62
|
+
`--omit=peer` 装 devDependency esbuild 而不把 peer `@deepseek-ai/schemastery` 装成真实副本;随后
|
|
63
|
+
`link:deps` 把部署树的 schemastery 软链进来,设置面板需要它。顺序反过来会踩坑:普通 `npm install`
|
|
64
|
+
先装出真实副本,之后 `link:deps` 遇到真实目录**不覆盖**。已有真实副本时删掉
|
|
65
|
+
`node_modules/@deepseek-ai/schemastery` 再跑一次 `link:deps`。
|
|
68
66
|
|
|
69
|
-
也可以挂到 home
|
|
67
|
+
也可以挂到 home 层(仅当需要绕过 profile 重写时使用;常规开发用上面的 `link:` 安装):
|
|
70
68
|
|
|
71
69
|
```sh
|
|
72
70
|
ln -sfn "$PWD" ~/.dsh/profiles/web/node_modules/dsh-rolegroup
|
|
@@ -77,8 +75,7 @@ cat >> ~/.dsh/cordis.patch.yml <<'YAML'
|
|
|
77
75
|
YAML
|
|
78
76
|
```
|
|
79
77
|
|
|
80
|
-
home 层不会被 profile
|
|
81
|
-
不要同时用。
|
|
78
|
+
home 层不会被 profile 重写覆盖,但不会出现在「已安装」组,也没有启停开关。两种方式选一个,不要同时用。
|
|
82
79
|
|
|
83
80
|
### 验证
|
|
84
81
|
|
|
@@ -89,6 +86,18 @@ dsh --profile web --dump-config | grep -A1 dsh-rolegroup # 应出现 - id: dsh
|
|
|
89
86
|
重启 `dsh web`,开一个新会话。工具列表里应该出现 8 个角色工具;也可以在新会话里跑
|
|
90
87
|
`/rolegroup doctor`。
|
|
91
88
|
|
|
89
|
+
### 按角色委派
|
|
90
|
+
|
|
91
|
+
在会话里输入:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
/rg <任务>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
插件会把任务和一段“按角色委派”的指令注入主会话;主模型据此从本机在册角色中选择、写简报并派发。
|
|
98
|
+
`/rolegroup work <任务>` 是长别名。`/rg` 只主会话可用,子会话调用会被拒绝;它只负责触发,
|
|
99
|
+
是否派发仍由主模型判断。
|
|
100
|
+
|
|
92
101
|
改代码后需要重启并开新会话。面板保存怎么生效,见 §5。
|
|
93
102
|
|
|
94
103
|
## 3. 内置角色
|
|
@@ -102,8 +111,8 @@ dsh --profile web --dump-config | grep -A1 dsh-rolegroup # 应出现 - id: dsh
|
|
|
102
111
|
| 角色 | 内置绑定模型 | 职责 |
|
|
103
112
|
|---|---|---|
|
|
104
113
|
| `analyst` | Qwen3.8 Max | 需求澄清、路径分类、方案评审(做不做/怎么做)、架构决策 |
|
|
105
|
-
| `planner` | Kimi K3.1 Pro |
|
|
106
|
-
| `coder` | Kimi K3.1 Pro |
|
|
114
|
+
| `planner` | Kimi K3.1 Pro | 计划设计:文件结构、任务拆分、接口契约、计划文档落笔 |
|
|
115
|
+
| `coder` | Kimi K3.1 Pro | 编码执行:按计划/规格文档步骤实现并回填证据 |
|
|
107
116
|
| `reviewer` | Qwen3.8 Flash | 收口审查:逐项核对验收标准与证据(做没做到) |
|
|
108
117
|
| `scout` | DeepSeek V4.1 Flash | 探索定位、批量搜索(返回 `文件:行号` 证据) |
|
|
109
118
|
| `scribe` | Qwen3.8 Flash | 文档回填、报告、spec 维护 |
|
|
@@ -112,7 +121,22 @@ dsh --profile web --dump-config | grep -A1 dsh-rolegroup # 应出现 - id: dsh
|
|
|
112
121
|
|
|
113
122
|
### 推荐绑定(官方建议)
|
|
114
123
|
|
|
115
|
-
|
|
124
|
+
各角色的内置默认模型见 **[MODELS.md](./MODELS.md)**。
|
|
125
|
+
|
|
126
|
+
### 委派质量
|
|
127
|
+
|
|
128
|
+
角色不继承父会话上下文,简报越具体,返回越可用。插件在系统提示里给主模型一段固定模板:
|
|
129
|
+
|
|
130
|
+
- 简报至少写:背景、目标、约束、验收、已知事实(文件:行号)、待核验命题;
|
|
131
|
+
- 事实性结论必须有可核验依据:代码事实给文件:行号,运行结果给命令与输出,图片给区域/坐标,外部事实给原始来源;引用逐字,无法复现的按 UNVERIFIED 处理;
|
|
132
|
+
- 不要预设结论分布(不要写「应该全真/应该有问题」)。2026-11-16 的对照显示,这种写法会让 `analyst`
|
|
133
|
+
把部分成立的命题压成 `TRUE` 并编造引用;中性简报逐字准确。
|
|
134
|
+
- 子任务结论是输入,不是裁决;主模型要抽查引用,重结论轻证据的回报不要直接采纳。
|
|
135
|
+
|
|
136
|
+
备用链仅在角色配置提供 fallbackModels 时生效;显式配置的角色没写这个字段时,不继承内置链。
|
|
137
|
+
降级与模型未广告预警可并存,预检风险使用实际备用路由。
|
|
138
|
+
|
|
139
|
+
代码定位与事实取证用 `scout`;带验收标准的收口核对用 `reviewer`;设计判断用 `analyst`。实现任务已有结构化计划或规格时用 `coder`(路径随简报给出),未形成计划的可先派 `planner`。
|
|
116
140
|
|
|
117
141
|
## 4. 配置
|
|
118
142
|
|
|
@@ -160,18 +184,9 @@ doctor 会写明「主路由 X 不可用,已用内置备用档 Y」。
|
|
|
160
184
|
|
|
161
185
|
```
|
|
162
186
|
dsh-rolegroup doctor — 8 个在册角色
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
analyst qwen-token-plan-cn/qwen3.8-max ✅ ✅
|
|
167
|
-
planner kimi-coding/k3.1-pro ✅ ✅
|
|
168
|
-
coder kimi-coding/k3.1-pro ✅ ✅
|
|
169
|
-
reviewer qwen-token-plan-cn/qwen3.8-flash ✅ ✅
|
|
170
|
-
scout deepseek-official/deepseek-flash ✅ ✅
|
|
171
|
-
scribe qwen-token-plan-cn/qwen3.8-flash ✅ ✅
|
|
172
|
-
vision qwen-token-plan-cn/qwen3.8-flash ✅ ✅
|
|
173
|
-
fallback deepseek-official/deepseek-flash ✅ ✅
|
|
174
|
-
|
|
187
|
+
analyst qwen-token-plan-cn/qwen3.8-max ✅ ✅
|
|
188
|
+
planner kimi-coding/k3.1-pro ✅ ✅
|
|
189
|
+
…
|
|
175
190
|
✅ 无异常
|
|
176
191
|
```
|
|
177
192
|
|
|
@@ -180,35 +195,30 @@ fallback deepseek-official/deepseek-flash ✅ ✅
|
|
|
180
195
|
## 7. 开发
|
|
181
196
|
|
|
182
197
|
```sh
|
|
183
|
-
npm
|
|
184
|
-
npm
|
|
185
|
-
npm test
|
|
186
|
-
npm run build:client
|
|
198
|
+
npm install --omit=peer # 装 devDependency esbuild,不把 schemastery 装成真实副本
|
|
199
|
+
npm run link:deps # 把部署树的 schemastery 软链进来
|
|
200
|
+
npm test # 离线 smoke suite(Node 直跑);pretest 会自动跑 link:deps
|
|
201
|
+
npm run build:client # 改了 src/client/** 或 lib/roles.js 后重建 lib/client.js
|
|
187
202
|
```
|
|
188
203
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
那一节会缺席。
|
|
194
|
-
|
|
195
|
-
`link:deps` 是做什么的:插件以 `link:` 形式安装,按 Node 的 realpath 规则,没法直接 import
|
|
196
|
-
`@deepseek-ai/*`;而 settings 要求条目静态导出 schemastery 的 `Config`,不能延迟解析。所以脚本把部署
|
|
197
|
-
树里的 schemastery 软链到本仓库,软链不会提交。
|
|
204
|
+
安装顺序和原因见 §2「从源码安装」。不跑 `npm install`,`npm test` 会报
|
|
205
|
+
`ERR_MODULE_NOT_FOUND: esbuild`。不跑 `link:deps`,dsh 启动时会打印
|
|
206
|
+
`无法使用部署树的 @deepseek-ai/schemastery …`,插件降级成 host-only:角色工具还能用,设置页
|
|
207
|
+
那一节会缺席。`pretest` 虽然自动跑 `link:deps`,但同样不会覆盖已存在的真实副本。
|
|
198
208
|
|
|
199
209
|
目录:
|
|
200
210
|
|
|
201
211
|
| 路径 | 内容 |
|
|
202
212
|
|---|---|
|
|
203
|
-
| `lib/` | 宿主侧:`index.js`(装配/重组装)、`roles.js`(角色表与合并)、`config.js`(settings `Config`)、`
|
|
204
|
-
| `src/client/` | 客户端源码(`controller.js` / `card.jsx` / `locales.js` / `meta.js
|
|
213
|
+
| `lib/` | 宿主侧:`index.js`(装配/重组装)、`roles.js`(角色表与合并)、`config.js`(settings `Config`)、`settings-table.js`(覆盖表 ↔ section)、`init.js`(`/rolegroup init` 导出)、`doctor.js`、`command.js` |
|
|
214
|
+
| `src/client/` | 客户端源码(`controller.js` / `card.jsx` / `locales.js` / `meta.js`);`lib/client.js` 是 esbuild 产物,改完要重建 |
|
|
205
215
|
| `tests/` | 离线 smoke suite(Node 直跑,不需要浏览器) |
|
|
206
216
|
| `scripts/` | `build-client.mjs`(esbuild 打包,注入 `package.json` 的版本号)、`link-deployment-deps.mjs`(环境软链) |
|
|
207
217
|
| `locale/` | 插件元数据:`en.json` / `zh.json` 里的 `meta.title` 与 `meta.description`,供插件页与插件市场显示本地化名称和说明 |
|
|
208
218
|
|
|
209
219
|
## 8. 参考与致谢
|
|
210
220
|
|
|
211
|
-
|
|
221
|
+
角色(类别)到模型的绑定方式与 persona 约定,以及角色子代理不能再委派这条约束,参考了
|
|
212
222
|
[oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent)(omo)。模型搭配没有照搬 omo 的
|
|
213
223
|
结论;本插件的绑定按自己的配置和评测决定。
|
|
214
224
|
|