dsh-rolegroup 0.12.2 → 0.13.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 +38 -1
- package/MODELS.en.md +1 -1
- package/MODELS.md +1 -1
- package/README.en.md +103 -90
- package/README.md +96 -63
- package/assets/banners/rolegroup-en.webp +0 -0
- package/assets/banners/rolegroup-zh.webp +0 -0
- package/assets/screenshots/rolegroup-settings-panel.png +0 -0
- package/lib/client.js +576 -208
- package/lib/roles.js +1 -1
- package/lib/settings-table.js +2 -2
- package/package.json +4 -2
- package/src/client/card.jsx +399 -241
- package/src/client/controller.js +226 -51
- package/src/client/locales.js +62 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,44 @@
|
|
|
5
5
|
|
|
6
6
|
> **历史注记**:`0.7.0` 发布前,npm 上的上一版本是 `0.6.1`;这期间开发中用过 0.6.2 / 0.6.3 / 0.8.0 等
|
|
7
7
|
> 内部里程碑号但都没发布,所以 `0.7.0` 是**自 `0.6.1` 以来的累积变更**(按 semver 只升一个 minor,不跳号)。
|
|
8
|
-
> 当前 npm 上的 latest 见 registry(2026-11-
|
|
8
|
+
> 当前 npm 上的 latest 见 registry(2026-11-27 查 `dist-tags.latest` = `0.12.2`)。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## [0.13.0] — 2026-11-26
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- 设置页改为「角色列表 + 单角色编辑区 + 常显保存栏」,切换角色保留整张草稿;配置来源、角色来源和未保存修改分开显示。
|
|
17
|
+
- 备用路由按配置顺序只读展示,空链有说明;主路由仍保留目录外的旧值。
|
|
18
|
+
- 新增角色后选中并聚焦工具名;逐行标记修改,自定义角色可从列表或编辑器删除,内置角色没有删除入口。
|
|
19
|
+
- `analyst` 内置绑定从 `qwen3.8-max` 更新为 `qwen4-max`;在本机 harness 完成事实核验与设计评审对照后换绑,未观察到质量回退。
|
|
20
|
+
- README 中英两版改用本地化品牌 banner + 徽章 + 目录 + 功能概览;设置面板截图裁掉左侧导航后放进 §5,`assets/banners` 与 `assets/screenshots` 随 npm 包发布。
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- 保存或恢复官方推荐失败时保留草稿并退出保存中状态;显式空 `fallbackModels` 在面板与 section 映射间不再被补成内置链。
|
|
25
|
+
- 设置面板 clean 状态的禁用保存/放弃增加高特异度 `not-allowed` 光标(不再被通用 `cursor: default` 覆盖)与悬停说明,提示改为「没有未保存修改;改任意字段后可保存」,避免把禁用误判为按钮失效。
|
|
26
|
+
- 新增、删除、重命名、外部快照更新后的选中项始终指向可见角色;补齐字段标签、错误关联、键盘焦点和窄屏布局。
|
|
27
|
+
- summary 使用独立阅读高度并保留纵向 resize 与滚动条 gutter;主路由按容器 auto-fit,避免窄右栏固定三列截断完整值。禁用保存按钮不再叠 50% 透明,修改徽标正文与 warn 边框分开使用宿主 token。
|
|
28
|
+
- 布局断点改为按**卡片容器宽度**(容器查询)而不是视口宽度。设置弹层正文只有约 600px,而视口约 1400px,原先按视口写的窄屏规则永不触发,编辑器被挤到约 290px。现在窄容器下改为「角色条在上、全宽编辑器在下」,角色标签隐藏冗余的「内置角色」chips、摘要按内容自适应高度(`field-sizing`,不支持时回落 140px)。
|
|
29
|
+
|
|
30
|
+
### 验证
|
|
31
|
+
|
|
32
|
+
- `npm test` 200 passed(新增 README 图片引用断言);`npm run build:client` 在 UI 改动后成功,`git diff --check` 通过。新增 4 组行为回归,并在既有用例中补充 restore guard、嵌套 button 和真实 bundle 视觉结构断言。
|
|
33
|
+
- 2026-11-27 analyst 换绑门槛:`qwen3.8-max` / `qwen4-max` 各跑事实核验 1 次、设计评审 1 次;启动报告确认候选实际走 `qwen4-max`、无降级。两版判定与引用均合格,候选额外完成只读运行时复核,并识别零覆盖跟随与 `reasoningEffort` 清理路径。
|
|
34
|
+
- 24 个临时副本 mutation 均被对应断言拒绝,无 surviving。archive 旧实现复核在 T1-1 首个失败即终止,只作为 T1-1 证据;T2/T3/T4 的红来自此前分阶段运行。
|
|
35
|
+
- 现有 3080 / dsh 0.2.2-rc.5 验证了 8 角色切换、跨角色草稿与放弃、新增/聚焦样式/本地校验/重命名/删除、备用链、模型切回、中英和 light/dark;全程未做有效配置保存。
|
|
36
|
+
- 修复后 2891×1450 真机图确认 analyst/vision 摘要不再截成半行,provider 与模型标签完整显示;新增校验和 light/dark 保存栏的按钮、徽标可读性改善。测试后已放弃草稿并恢复 Light + 中文。
|
|
37
|
+
- 容器查询落地后,在 3080 真实设置弹层(正文约 600px)复核:8 个角色一行铺开、编辑器全宽,`qwen-token-plan-cn` / `Qwen3.8 Max` 完整可见,analyst 与 vision 摘要均完整无裁切;证据见内部验收档案(不随仓库公开)。
|
|
38
|
+
- UNVERIFIED:1280/768/390 视口与 DOM 几何测量、console、对比度数值、真实保存/恢复成功及真实写入失败/冲突;离线用例覆盖这些状态机路径。
|
|
39
|
+
|
|
40
|
+
The settings section now uses a role list, a single-role editor, and an always-visible save bar. Drafts survive
|
|
41
|
+
role switches and failed writes; source and modified states are separate. Fallback chains are read-only in
|
|
42
|
+
configuration order, explicit empty chains round-trip, and legacy routes remain available. Selection repair,
|
|
43
|
+
field accessibility, keyboard focus, and narrow layouts are covered by offline render tests. Summaries have
|
|
44
|
+
room to read, route fields wrap by container width, and disabled actions and modified badges stay legible.
|
|
45
|
+
The bilingual READMEs now use a localized hero banner, badges, a table of contents, and a cropped settings-panel screenshot in §5. Disabled Save/Discard actions now explain that an edit is required. The analyst built-in binding moves from qwen3.8-max to qwen4-max after a same-role fact and design comparison; the startup report confirms qwen4-max ran without fallback.
|
|
9
46
|
|
|
10
47
|
---
|
|
11
48
|
|
package/MODELS.en.md
CHANGED
package/MODELS.md
CHANGED
package/README.en.md
CHANGED
|
@@ -1,23 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/banners/rolegroup-en.webp" alt="dsh-rolegroup: bind each kind of work to a model once, then delegate by role name" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="README.md">简体中文</a> ·
|
|
7
|
+
<a href="#contents">Contents</a> ·
|
|
8
|
+
<a href="CHANGELOG.md">Changelog</a> ·
|
|
9
|
+
<a href="MODELS.en.md">Models</a> ·
|
|
10
|
+
<a href="LICENSE">MIT</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.npmjs.com/package/dsh-rolegroup"><img src="https://img.shields.io/badge/version-0.13.0-4D6BFE" alt="version 0.13.0"></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/dsh-rolegroup"><img src="https://img.shields.io/npm/dm/dsh-rolegroup?label=downloads" alt="npm downloads"></a>
|
|
16
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/dsh-rolegroup" alt="MIT"></a>
|
|
17
|
+
<img src="https://img.shields.io/badge/dsh-%E2%89%A50.2.1--rc.1-4D6BFE" alt="dsh >= 0.2.1-rc.1">
|
|
18
|
+
<img src="https://img.shields.io/badge/roles-8-0f766e" alt="8 roles">
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
> A community-maintained DeepSeek Harness (dsh) plugin, not an official DeepSeek product.
|
|
22
|
+
>
|
|
23
|
+
> This README describes **0.13.0**. Requires dsh **≥ 0.2.1-rc.1** (verified on 0.2.2-rc.5). The settings-page nav icon only shows on dsh ≥ 0.2.2-rc.5; everything else works on older releases.
|
|
6
24
|
|
|
7
|
-
|
|
8
|
-
[oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent) ("omo"); see §9.
|
|
25
|
+
## Contents
|
|
9
26
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
27
|
+
- [1. Overview](#1-overview)
|
|
28
|
+
- [2. Quick start](#2-quick-start)
|
|
29
|
+
- [3. Built-in roles](#3-built-in-roles)
|
|
30
|
+
- [4. Configuration](#4-configuration)
|
|
31
|
+
- [5. Settings panel](#5-settings-panel)
|
|
32
|
+
- [6. Diagnostics](#6-diagnostics)
|
|
33
|
+
- [7. Development](#7-development)
|
|
34
|
+
- [8. Credits](#8-credits)
|
|
35
|
+
- [9. License](#9-license)
|
|
14
36
|
|
|
15
|
-
|
|
37
|
+
## 1. Overview
|
|
16
38
|
|
|
17
|
-
|
|
39
|
+
dsh-rolegroup takes the question "which model should this kind of work use?" out of each delegation and turns it into a role: name, provider/model, persona. Define it once, then call the role name.
|
|
18
40
|
|
|
19
|
-
|
|
20
|
-
|
|
41
|
+
- **The role is the tool name**: eight built-in roles, `analyst` / `planner` / `coder` / `reviewer` / `scout` / `scribe` / `vision` / `fallback`; call the role name instead of writing `provider`/`model`.
|
|
42
|
+
- **Bind once, reuse everywhere**: a role carries its primary route, reasoning effort, fallback chain, and persona; changing the model is a configuration change, not a call-site change.
|
|
43
|
+
- **Two configuration layers**: the built-in table (factory defaults) and optional panel overrides; a panel save applies to new sessions, not in-flight work.
|
|
44
|
+
- **Fallbacks and diagnostics**: built-in roles carry DeepSeek fallback chains; `/rolegroup doctor` lists each effective route, availability, and repair hints.
|
|
45
|
+
- **Delegation only, no orchestration**: one-off specialist delegation; DAGs, multi-round collaboration, and state stay with Agent Teams or other plugins.
|
|
21
46
|
|
|
22
47
|
| | Input | It handles | Limit |
|
|
23
48
|
|---|---|---|---|
|
|
@@ -25,33 +50,34 @@ the answer lives in the call, it is easy to get wrong and hard to reuse.
|
|
|
25
50
|
| **Agent Teams** (official; 智能体团队) | task DAG / roster | who does what, dependencies, multi-round work | teammates inherit the root model; no per-member model binding |
|
|
26
51
|
| **dsh-rolegroup** | roles, defined once | which model this kind of work uses | one-off specialist delegation; no orchestration |
|
|
27
52
|
|
|
28
|
-
They solve different problems. Agent Teams coordinates the work; rolegroup picks the model for a single
|
|
29
|
-
delegation. The two can coexist in one deployment. A common pattern is to split expensive and cheap work:
|
|
30
|
-
`reviewer` on a cheap model, `coder` on a strong one, with Agent Teams still doing the coordination.
|
|
53
|
+
They solve different problems. Agent Teams coordinates the work; rolegroup picks the model for a single delegation. The two can coexist in one deployment. A common pattern is to split expensive and cheap work: `reviewer` on a cheap model, `coder` on a strong one, with Agent Teams still doing the coordination.
|
|
31
54
|
|
|
32
|
-
|
|
55
|
+
<details>
|
|
56
|
+
<summary><b>Scope: what we deliberately do not do</b></summary>
|
|
33
57
|
|
|
34
58
|
| We do not | Why |
|
|
35
59
|
|---|---|
|
|
36
60
|
| **Register an MCP server** | Dozens of tools inflate the tool list, the permission surface, and the prompt budget |
|
|
37
61
|
| **Write a project-level state directory** (`.rolegroup/`) | We route work; we are not a runtime state machine — state belongs to the orchestration layer |
|
|
38
|
-
| **Take over the main session's Agent Preset** | An explicit preset
|
|
62
|
+
| **Take over the main session's Agent Preset** | An explicit preset replaces the parent composition; taking over means choosing for the user |
|
|
39
63
|
|
|
40
64
|
When you need orchestration, state, or an MCP tool chain, compose other plugins — they do not replace this one.
|
|
41
65
|
|
|
66
|
+
</details>
|
|
67
|
+
|
|
42
68
|
## 2. Quick start
|
|
43
69
|
|
|
70
|
+
Requires dsh ≥ 0.2.1-rc.1; the commands below use the `web` profile.
|
|
71
|
+
|
|
44
72
|
### Official plugin manager
|
|
45
73
|
|
|
46
74
|
```sh
|
|
47
75
|
dsh plugin --profile web add dsh-rolegroup
|
|
48
76
|
```
|
|
49
77
|
|
|
50
|
-
You can also open the Plugins page, click "Add plugin", choose "Install a third-party plugin", enter
|
|
51
|
-
`dsh-rolegroup`, and click "Install". Restart `dsh web` after installing.
|
|
78
|
+
You can also open the Plugins page, click "Add plugin", choose "Install a third-party plugin", enter `dsh-rolegroup`, and click "Install". Restart `dsh web` after installing.
|
|
52
79
|
|
|
53
|
-
If a third-party market rewrite drops the plugin, add it again. You can also search for
|
|
54
|
-
`dsh-rolegroup` in the Plugin Market and install it — same flow underneath.
|
|
80
|
+
If a third-party market rewrite drops the plugin, add it again. You can also search for `dsh-rolegroup` in the Plugin Market and install it — same flow underneath.
|
|
55
81
|
|
|
56
82
|
### From source
|
|
57
83
|
|
|
@@ -65,14 +91,10 @@ npm run link:deps
|
|
|
65
91
|
dsh plugin --profile web add "link:$PWD"
|
|
66
92
|
```
|
|
67
93
|
|
|
68
|
-
`--omit=peer` installs the esbuild devDependency without pulling the peer
|
|
69
|
-
`@deepseek-ai/schemastery` in as a real copy; `link:deps` then symlinks the deployment's schemastery into
|
|
70
|
-
this repo, which the Settings panel needs for source installs. The reverse order breaks: a plain
|
|
71
|
-
`npm install` puts a real copy there first, and `link:deps` **does not overwrite** an existing real
|
|
72
|
-
directory. If you already have one, delete `node_modules/@deepseek-ai/schemastery` and rerun `link:deps`.
|
|
94
|
+
`--omit=peer` installs the esbuild devDependency without pulling the peer `@deepseek-ai/schemastery` in as a real copy; `link:deps` then symlinks the deployment's schemastery into this repo, which the Settings panel needs for source installs. The reverse order breaks: a plain `npm install` puts a real copy there first, and `link:deps` **does not overwrite** an existing real directory. If you already have one, delete `node_modules/@deepseek-ai/schemastery` and rerun `link:deps`.
|
|
73
95
|
|
|
74
|
-
|
|
75
|
-
|
|
96
|
+
<details>
|
|
97
|
+
<summary>Alternative install: mount on the home layer (only to survive profile rewrites)</summary>
|
|
76
98
|
|
|
77
99
|
```sh
|
|
78
100
|
ln -sfn "$PWD" ~/.dsh/profiles/web/node_modules/dsh-rolegroup
|
|
@@ -83,8 +105,9 @@ cat >> ~/.dsh/cordis.patch.yml <<'YAML'
|
|
|
83
105
|
YAML
|
|
84
106
|
```
|
|
85
107
|
|
|
86
|
-
The home layer survives profile rewrites, but it does not show up under "Installed" and has no toggle. Pick
|
|
87
|
-
|
|
108
|
+
The home layer survives profile rewrites, but it does not show up under "Installed" and has no toggle. Pick one; do not use both.
|
|
109
|
+
|
|
110
|
+
</details>
|
|
88
111
|
|
|
89
112
|
### Verify
|
|
90
113
|
|
|
@@ -92,8 +115,7 @@ one; do not use both.
|
|
|
92
115
|
dsh --profile web --dump-config | grep -A1 dsh-rolegroup # should show - id: dsh-rolegroup
|
|
93
116
|
```
|
|
94
117
|
|
|
95
|
-
Restart `dsh web` and open a new session. The eight role tools should be in the tool list; you can also run
|
|
96
|
-
`/rolegroup doctor` from the new session.
|
|
118
|
+
Restart `dsh web` and open a new session. The eight role tools should be in the tool list; you can also run `/rolegroup doctor` from the new session.
|
|
97
119
|
|
|
98
120
|
### Delegate by role
|
|
99
121
|
|
|
@@ -103,26 +125,19 @@ Type:
|
|
|
103
125
|
/rg <task>
|
|
104
126
|
```
|
|
105
127
|
|
|
106
|
-
The plugin injects the task plus a "delegate by role" directive into the main session; the main model then
|
|
107
|
-
picks from the roles registered on this machine, writes briefs, and dispatches. `/rolegroup work <task>` is
|
|
108
|
-
the long alias. `/rg` is main-session only — child sessions get an error. It only triggers; whether to
|
|
109
|
-
dispatch is still the main model's call.
|
|
128
|
+
The plugin injects the task plus a "delegate by role" directive into the main session; the main model then picks from the roles registered on this machine, writes briefs, and dispatches. `/rolegroup work <task>` is the long alias. `/rg` is main-session only — child sessions get an error. It only triggers; whether to dispatch is still the main model's call.
|
|
110
129
|
|
|
111
130
|
After changing code, restart and open a new session. For panel saves, see §5.
|
|
112
131
|
|
|
113
132
|
## 3. Built-in roles
|
|
114
133
|
|
|
115
|
-
With no
|
|
116
|
-
the panel can override them.
|
|
134
|
+
With no override, the plugin registers these eight roles. The table shows the built-in initial values; the panel can override them.
|
|
117
135
|
|
|
118
|
-
The table names models only: one model usually has several routes (subscription plan, pay-as-you-go, gateway),
|
|
119
|
-
and the provider is up to your configuration. The built-in default points at the built-in table's providers (the
|
|
120
|
-
author's subscriptions) — on your machine run `/rolegroup init` to generate routes that actually work, or edit
|
|
121
|
-
them in the panel. Model ids and the effective routes are whatever `/rolegroup doctor` prints.
|
|
136
|
+
The table names models only: one model usually has several routes (subscription plan, pay-as-you-go, gateway), and the provider is up to your configuration. The built-in default points at the built-in table's providers (the author's subscriptions) — on your machine run `/rolegroup init` to generate routes that actually work, or edit them in the panel. Model ids and the effective routes are whatever `/rolegroup doctor` prints.
|
|
122
137
|
|
|
123
138
|
| Role | Built-in model | Responsibility |
|
|
124
139
|
|---|---|---|
|
|
125
|
-
| `analyst` |
|
|
140
|
+
| `analyst` | Qwen4 Max | Requirement clarification, path classification, plan review (do it / how), architecture decisions |
|
|
126
141
|
| `planner` | Kimi K3.1 Pro | Plan design: file layout, task breakdown, interface contracts, writing the plan document |
|
|
127
142
|
| `coder` | Kimi K3.1 Pro | Implementation: follow the steps of the plan/spec document supplied in the brief and report evidence per step |
|
|
128
143
|
| `reviewer` | Qwen3.8 Flash | Closing review: check acceptance criteria against evidence (was it actually done) |
|
|
@@ -131,7 +146,7 @@ them in the panel. Model ids and the effective routes are whatever `/rolegroup d
|
|
|
131
146
|
| `vision` | Qwen3.8 Flash | Vision: image analysis, UI review, prototype reading, OCR (**the bound model must accept images**) |
|
|
132
147
|
| `fallback` | DeepSeek V4.1 Flash | Catch-all for unclassified lightweight tasks |
|
|
133
148
|
|
|
134
|
-
### Recommended bindings
|
|
149
|
+
### Recommended bindings
|
|
135
150
|
|
|
136
151
|
See **[MODELS.en.md](./MODELS.en.md)** for the built-in default model per role.
|
|
137
152
|
|
|
@@ -140,18 +155,11 @@ See **[MODELS.en.md](./MODELS.en.md)** for the built-in default model per role.
|
|
|
140
155
|
Roles do not inherit the parent session's conversation history or the bodies of skills already loaded there. The role preset recomposes the project `AGENTS.md` instructions and skill catalog for the child session's cwd, so the brief still needs to be self-contained. The more specific the brief, the more usable the result. The plugin gives the main model a fixed template in the system prompt:
|
|
141
156
|
|
|
142
157
|
- A brief should state: background, goal, constraints, acceptance, known facts (`file:line`), claims to verify;
|
|
143
|
-
- Factual conclusions need verifiable evidence: `file:line` for code, command and output for runtime results,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
fabricate quotes; the neutral briefs quoted verbatim.
|
|
149
|
-
- A subagent's conclusion is input, not a verdict. Spot-check quotes; do not adopt a confident report that
|
|
150
|
-
cannot show evidence.
|
|
151
|
-
|
|
152
|
-
Fallback chains apply only when a role configuration provides fallbackModels; an explicitly configured role
|
|
153
|
-
without that field does not inherit the built-in chain.
|
|
154
|
-
The degraded and model-unadvertised warnings can coexist, and preflight risk names the actual fallback route.
|
|
158
|
+
- Factual conclusions need verifiable evidence: `file:line` for code, command and output for runtime results, region/coordinates for images, and original sources for external facts; quote verbatim, and unreproducible facts are marked UNVERIFIED;
|
|
159
|
+
- Do not prescribe the expected verdict distribution ("should be all true / should find problems"). The 2026-11-16 comparison showed this wording makes `analyst` compress partially-true claims into `TRUE` and fabricate quotes; the neutral briefs quoted verbatim.
|
|
160
|
+
- A subagent's conclusion is input, not a verdict. Spot-check quotes; do not adopt a confident report that cannot show evidence.
|
|
161
|
+
|
|
162
|
+
Fallback chains apply only when a role configuration provides fallbackModels; an explicitly configured role without that field does not inherit the built-in chain. The degraded and model-unadvertised warnings can coexist, and preflight risk names the actual fallback route.
|
|
155
163
|
|
|
156
164
|
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.
|
|
157
165
|
|
|
@@ -165,45 +173,56 @@ These are usage conventions, not a built-in OpenSpec integration.
|
|
|
165
173
|
|
|
166
174
|
## 4. Configuration
|
|
167
175
|
|
|
168
|
-
Two layers: the built-in table (factory defaults) and panel overrides (optional).
|
|
176
|
+
Two layers: the built-in table (factory defaults) and panel overrides (optional). A panel save applies to new sessions; `rolegroup.jsonc` is no longer a configuration source.
|
|
177
|
+
|
|
178
|
+
| Layer | What it is | When to use it |
|
|
179
|
+
|---|---|---|
|
|
180
|
+
| Built-in table | The eight factory bindings | Works with no configuration |
|
|
181
|
+
| Panel override | The table saved under Settings → 角色配置 | Change provider/model/persona |
|
|
169
182
|
|
|
170
183
|
### Fallback chains
|
|
171
184
|
|
|
172
|
-
Built-in roles ship a chain that only targets the two DeepSeek providers dsh bundles: **`deepseek-account`
|
|
173
|
-
(account login) first**, since that is what most users have, then `deepseek-official` (API key):
|
|
185
|
+
Built-in roles ship a chain that only targets the two DeepSeek providers dsh bundles: **`deepseek-account` (account login) first**, since that is what most users have, then `deepseek-official` (API key):
|
|
174
186
|
|
|
175
187
|
```jsonc
|
|
176
188
|
"analyst": {
|
|
177
189
|
"provider": "qwen-token-plan-cn",
|
|
178
|
-
"model": "
|
|
190
|
+
"model": "qwen4-max",
|
|
179
191
|
"fallbackModels": ["deepseek-account/deepseek-flash", "deepseek-official/deepseek-flash", "deepseek-official/deepseek-v4-pro"]
|
|
180
192
|
}
|
|
181
193
|
```
|
|
182
194
|
|
|
183
195
|
## 5. Settings panel
|
|
184
196
|
|
|
185
|
-
|
|
186
|
-
|
|
197
|
+
- **Entry**: Settings → 角色配置.
|
|
198
|
+
- **Layout**: role list on the left, one-role editor on the right; one role at a time.
|
|
199
|
+
- **Drafts**: switching roles keeps every draft; only Save writes the table, and saved routes apply to new sessions.
|
|
200
|
+
- **Disabled state**: Save and Discard are disabled while there are no unsaved changes; edit any field to enable them. Use the X in the top-right to close the panel.
|
|
201
|
+
- **Custom roles**: removable from the list or the editor; built-in roles have no remove control.
|
|
202
|
+
- **Fallback routes**: read-only in configured order, with an explicit empty-chain message; they show saved configuration, not the route actually used at runtime.
|
|
203
|
+
- **Failures**: validation, write, and conflict failures keep the draft so you can fix it and retry, or discard it explicitly.
|
|
204
|
+
|
|
205
|
+
<p align="center">
|
|
206
|
+
<img src="assets/screenshots/rolegroup-settings-panel.png" alt="Settings → 角色配置: role list on the left, one-role editor on the right, persistent save bar at the bottom" width="820">
|
|
207
|
+
</p>
|
|
208
|
+
|
|
209
|
+
<sub><i>Settings → 角色配置: one role at a time; switching keeps every draft, and the save bar stays visible.</i></sub>
|
|
187
210
|
|
|
188
211
|
## 6. Diagnostics
|
|
189
212
|
|
|
190
|
-
`/rolegroup doctor` reads the `$DSH_HOME/plugins/dsh-rolegroup/last-startup.json` snapshot and compares it
|
|
191
|
-
with the live llm service. It lists each role's name, bound model, provider, and whether the model is
|
|
192
|
-
available, with repair hints when something is wrong. When a built-in fallback is in effect it says so
|
|
193
|
-
("primary X unavailable, using built-in fallback Y").
|
|
213
|
+
`/rolegroup doctor` reads the `$DSH_HOME/plugins/dsh-rolegroup/last-startup.json` snapshot and compares it with the live llm service. It lists each role's name, bound model, provider, and whether the model is available, with repair hints when something is wrong. When a built-in fallback is in effect it says so ("primary X unavailable, using built-in fallback Y").
|
|
194
214
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
215
|
+
| Command | What it does |
|
|
216
|
+
|---|---|
|
|
217
|
+
| `/rolegroup doctor` | Diagnose the current bindings and availability |
|
|
218
|
+
| `/rolegroup init` | Print the current effective bindings as JSONC (nothing written) |
|
|
219
|
+
| `/rg <task>` | Inject the delegate-by-role directive (main session) |
|
|
198
220
|
|
|
199
|
-
> On a fresh machine, run `/rolegroup doctor` first to see which roles' primary routes are unavailable; change
|
|
200
|
-
> bindings in the panel.
|
|
221
|
+
> On a fresh machine, run `/rolegroup doctor` first to see which roles' primary routes are unavailable; change bindings in the panel.
|
|
201
222
|
|
|
202
223
|
Example:
|
|
203
224
|
|
|
204
|
-
> If a role's provider is not registered, an error block is appended below the table and the provider is
|
|
205
|
-
> marked ❌. The role is not registered. This matters most for a fallback role: a skipped fallback route does
|
|
206
|
-
> not exist. The built-in `fallback` role uses `deepseek-official` because that provider is always registered:
|
|
225
|
+
> If a role's provider is not registered, an error block is appended below the table and the provider is marked ❌. The role is not registered. This matters most for a fallback role: a skipped fallback route does not exist. The built-in `fallback` role uses `deepseek-official` because that provider is always registered:
|
|
207
226
|
|
|
208
227
|
```
|
|
209
228
|
❌ fallback:provider "example-provider" 当前未注册(在用:deepseek-official, kimi-coding, qwen-token-plan-cn)
|
|
@@ -212,14 +231,13 @@ Example:
|
|
|
212
231
|
|
|
213
232
|
```
|
|
214
233
|
dsh-rolegroup doctor — 8 个在册角色
|
|
215
|
-
analyst qwen-token-plan-cn/
|
|
234
|
+
analyst qwen-token-plan-cn/qwen4-max ✅ ✅
|
|
216
235
|
planner kimi-coding/k3.1-pro ✅ ✅
|
|
217
236
|
…
|
|
218
237
|
✅ 无异常
|
|
219
238
|
```
|
|
220
239
|
|
|
221
|
-
Also: a snapshot older than 7 days, or one that looks hand-edited, gets a ⚠️ but the table is still printed;
|
|
222
|
-
when the llm service is down the availability column shows ➖.
|
|
240
|
+
Also: a snapshot older than 7 days, or one that looks hand-edited, gets a ⚠️ but the table is still printed; when the llm service is down the availability column shows ➖.
|
|
223
241
|
|
|
224
242
|
## 7. Development
|
|
225
243
|
|
|
@@ -230,11 +248,7 @@ npm test # offline smoke suite (plain Node); pretest runs link:d
|
|
|
230
248
|
npm run build:client # after editing src/client/** or lib/roles.js
|
|
231
249
|
```
|
|
232
250
|
|
|
233
|
-
For the install order and why, see §2 "From source". Without `npm install`, `npm test` fails with
|
|
234
|
-
`ERR_MODULE_NOT_FOUND: esbuild`. Without `link:deps`, dsh prints
|
|
235
|
-
`无法使用部署树的 @deepseek-ai/schemastery …` at startup and the plugin runs host-only: role tools still
|
|
236
|
-
work, but the Settings section is missing. `pretest` runs `link:deps` automatically, but it likewise does
|
|
237
|
-
not overwrite an existing real copy.
|
|
251
|
+
For the install order and why, see §2 "From source". Without `npm install`, `npm test` fails with `ERR_MODULE_NOT_FOUND: esbuild`. Without `link:deps`, dsh prints `无法使用部署树的 @deepseek-ai/schemastery …` at startup and the plugin runs host-only: role tools still work, but the Settings section is missing. `pretest` runs `link:deps` automatically, but it likewise does not overwrite an existing real copy.
|
|
238
252
|
|
|
239
253
|
Layout:
|
|
240
254
|
|
|
@@ -248,11 +262,10 @@ Layout:
|
|
|
248
262
|
|
|
249
263
|
## 8. Credits
|
|
250
264
|
|
|
251
|
-
The role (category) to model binding, the persona convention, and the rule that role subagents cannot
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
evaluation.
|
|
265
|
+
The role (category) to model binding, the persona convention, and the rule that role subagents cannot delegate again are inspired by [oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent) ("omo"). The model pairings are not copied from omo; this plugin's bindings are decided by its own configuration and evaluation.
|
|
266
|
+
|
|
267
|
+
More dsh plugins: [Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin).
|
|
255
268
|
|
|
256
269
|
## 9. License
|
|
257
270
|
|
|
258
|
-
MIT
|
|
271
|
+
MIT © Zhou.XiaoNing. See [LICENSE](LICENSE).
|