dsh-cabinet-mode 0.2.7 → 0.3.1
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 +28 -0
- package/README.md +43 -6
- package/README.zh.md +34 -3
- package/client.js +489 -6
- package/cordis.patch.yml +1 -0
- package/index.js +250 -2
- package/package.json +6 -2
- package/scripts/market-index.mjs +2 -2
- package/scripts/test-client.mjs +33 -1
- package/scripts/test-member-settings.mjs +78 -0
- package/scripts/test-prompt-assembly.cjs +34 -0
- package/scripts/test-roster.mjs +6 -1
- package/scripts/verify.mjs +132 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.3.1] - 2026-11-05
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Add a new Cabinet dispatch-budget policy: one deliverable/write scope per
|
|
10
|
+
subtask, up to 30 tool calls for simple single-file work or 100 for multi-file
|
|
11
|
+
merge/conflict/integration work, and at most two retries of the same failure.
|
|
12
|
+
Task briefs must specify stop conditions; exhausted budgets require an honest
|
|
13
|
+
failed/unverified report. Existing authorization and evidence rules remain.
|
|
14
|
+
- This is prompt-level guidance, not a runtime counter or enforced tool quota.
|
|
15
|
+
It intentionally introduces a policy omitted from 0.3.0 during review, rather
|
|
16
|
+
than restoring content supposedly lost in a merge conflict.
|
|
17
|
+
- Keep the existing explicit Save/Cancel settings behavior, canonical runtime
|
|
18
|
+
identities, custom portrait precedence and neutral fallback unchanged.
|
|
19
|
+
- Clarify the policy in both READMEs while preserving market-first installation.
|
|
20
|
+
|
|
21
|
+
## [0.3.0] - 2026-11-05
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Profile-wide Cabinet member settings for display names, portraits and duty prompts.
|
|
26
|
+
- Explicit atomic Save/Cancel with revision checks to prevent stale tabs overwriting settings.
|
|
27
|
+
- Cabinet-only runtime prompt sections. Standard and other presets remain unchanged.
|
|
28
|
+
- Default Lead policy and four office duty prompts; clear disables a block and restore
|
|
29
|
+
restores its factory default. Runtime identities and task ownership remain unchanged.
|
|
30
|
+
- Settings are shared by browsers connected to the same DSH_HOME/profile, not isolated
|
|
31
|
+
by browser account. Native roster names remain runtime identities.
|
|
32
|
+
|
|
5
33
|
## [0.2.7] - 2026-11-05
|
|
6
34
|
|
|
7
35
|
### Fixed
|
package/README.md
CHANGED
|
@@ -16,12 +16,11 @@ a research-team preset modeled on the Great Ming Research Bureau cabinet
|
|
|
16
16
|
(大明科研司·内阁): a Lead (内阁首辅) directs members (阁臣) of four bureaus, defaults
|
|
17
17
|
to research before touching code, and must never fabricate sources.
|
|
18
18
|
|
|
19
|
-
The package ships a host half (`index.js`,
|
|
19
|
+
The package ships a host half (`index.js`, the member schema and Cabinet-only prompt provider) and a browser half
|
|
20
20
|
(`client.js`, the right-Sidebar **Cabinet** panel) with five role portraits and an unranked fallback portrait
|
|
21
21
|
embedded as 128px data URLs (square sources in `docs/images/avatars/`,
|
|
22
22
|
downscaled by `src/build_avatars.py`); it also keeps the optional Node.js
|
|
23
|
-
fallback scripts (`scripts/*.mjs`). It
|
|
24
|
-
dependencies** — React and friends come from the DSH client module table, with no
|
|
23
|
+
fallback scripts (`scripts/*.mjs`). It uses `@deepseek-ai/schemastery` for the host settings schema. React and friends come from the DSH client module table, with no
|
|
25
24
|
bundled duplicate and no CDN.
|
|
26
25
|
|
|
27
26
|
It declares **two rows** — `preset-cabinet` (one `@deepseek-ai/dsh-agent-preset`
|
|
@@ -38,6 +37,44 @@ This bundle declares **no hard DSH version gate**: no `engines.dsh`, no DSH
|
|
|
38
37
|
**0.2.1-rc.3**; other DSH versions that provide the declarative preset mechanism
|
|
39
38
|
may work, but are **not verified** (see [DSH-side constraints](#dsh-side-constraints)).
|
|
40
39
|
|
|
40
|
+
## Cabinet member settings
|
|
41
|
+
|
|
42
|
+
After a bundle install, open **Settings → Cabinet members (内阁成员)**. The five
|
|
43
|
+
office groups have a display name (40 characters), portrait and prompt (4000
|
|
44
|
+
characters). Names remain accompanied by the original member ID in Cabinet cards
|
|
45
|
+
and Owner labels. Task ownership and native roster names never change.
|
|
46
|
+
|
|
47
|
+
Edit, then click **Save**. **Cancel and reload** discards edits and reads the latest
|
|
48
|
+
saved values; leaving the page discards unsaved edits. Save writes all five members
|
|
49
|
+
atomically using the revision that was loaded. If another page changes settings,
|
|
50
|
+
cancel/reload before editing again; a stale draft cannot overwrite it. Editing is
|
|
51
|
+
disabled until settings have loaded. Changes apply to the next prompt assembly.
|
|
52
|
+
|
|
53
|
+
Upload PNG/JPEG/WebP up to 2 MB; the browser crops it to a 96×96 PNG (at most
|
|
54
|
+
48 KB data URL). Saved portraits apply to Cabinet cards and native team avatars.
|
|
55
|
+
Restore default resets that office's name, portrait and factory prompt; Reset all
|
|
56
|
+
resets all five in the draft. Both require Save. Clearing a prompt disables that
|
|
57
|
+
office's added block; an empty custom prompt also stays empty. Factory mode restores
|
|
58
|
+
the Lead's 御下术 and the four office duty prompts. These extra sections apply only
|
|
59
|
+
to agents actually composed with the **cabinet** preset; other modes are unchanged.
|
|
60
|
+
Version 0.3.1 adds a dispatch-budget policy to the Cabinet static persona:
|
|
61
|
+
one deliverable and one write scope per subtask; up to 30 tool calls for simple
|
|
62
|
+
single-file tasks, up to 100 for multi-file merges/conflict resolution/integration,
|
|
63
|
+
and up to two retries of the same failure. Task briefs must name the budget and
|
|
64
|
+
stop conditions; at the limit report failed/unverified, never fabricate completion.
|
|
65
|
+
This is prompt-level guidance, not a runtime counter or guaranteed enforcement.
|
|
66
|
+
The static persona is shared with teammates; its Lead-only heading is a semantic
|
|
67
|
+
instruction, not programmatic removal from teammate prompts. Customizing or turning
|
|
68
|
+
off a member prompt does not remove this static policy.
|
|
69
|
+
It is a new policy in 0.3.1; 0.3.0 deliberately kept the static persona unchanged.
|
|
70
|
+
|
|
71
|
+
Settings live in the **DSH_HOME/profile** configuration (the cabinet-ui namespace),
|
|
72
|
+
not a browser account. Browsers connected to the same profile share settings and
|
|
73
|
+
all Cabinet sessions in it use them; use separate profiles/DSH_HOME for isolation.
|
|
74
|
+
Invalid fields fall back to defaults. The preset-only fallback installation does
|
|
75
|
+
not install this settings UI or runtime prompt section; use the market bundle.
|
|
76
|
+
|
|
77
|
+
|
|
41
78
|
## The cabinet at a glance
|
|
42
79
|
|
|
43
80
|

|
|
@@ -156,7 +193,7 @@ On failure, show the exact error. For $.format must be 1, replace the webpage so
|
|
|
156
193
|
Use this only when the market is unavailable or for local development. Fully quit desktop DSH first to release the profile lock, then install the release bundle:
|
|
157
194
|
|
|
158
195
|
```sh
|
|
159
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.
|
|
196
|
+
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.1/dsh-cabinet-mode-0.3.1.tgz
|
|
160
197
|
dsh plugin --profile desktop list
|
|
161
198
|
```
|
|
162
199
|
|
|
@@ -171,7 +208,7 @@ the same install command with the new version URL (or pick the new `.tgz` in the
|
|
|
171
208
|
plugin page), then fully quit and restart DeepSeek Harness:
|
|
172
209
|
|
|
173
210
|
```sh
|
|
174
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.
|
|
211
|
+
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.1/dsh-cabinet-mode-0.3.1.tgz
|
|
175
212
|
```
|
|
176
213
|
|
|
177
214
|
`dsh plugin --profile desktop list` should report the new version. Upgrades were
|
|
@@ -217,7 +254,7 @@ on DSH 0.2.1-rc.5.
|
|
|
217
254
|
| Method | Windows | Linux | macOS | Notes |
|
|
218
255
|
|---|---|---|---|---|
|
|
219
256
|
| **Plugin market** (index source): see [Install from the plugin market](#install-from-the-plugin-market-recommended) | ✅ **Windows rc.5 web client install verified** (isolated profile, 2026-11-05) | ❌ **not tested** | ❌ **not tested** | Same npm bundle install through DSH's plugin market; the npm publish and the `market-index` branch now exist. |
|
|
220
|
-
| **A. DSH plugin manager** (fallback): plugin page "Add plugin -> local directory/package", or `dsh plugin --profile <profile> add <absolute path / .tgz / release URL>` | ✅ tested locally on 2026-10-29: local-directory install **and GitHub Release asset URL install**; `dsh plugin --profile desktop list` = 3 packages; composition check passed | ⚙️ code-level inference, **not tested on this machine** | ⚙️ code-level inference, **not tested on this machine** |
|
|
257
|
+
| **A. DSH plugin manager** (fallback): plugin page "Add plugin -> local directory/package", or `dsh plugin --profile <profile> add <absolute path / .tgz / release URL>` | ✅ tested locally on 2026-10-29: local-directory install **and GitHub Release asset URL install**; `dsh plugin --profile desktop list` = 3 packages; composition check passed | ⚙️ code-level inference, **not tested on this machine** | ⚙️ code-level inference, **not tested on this machine** | Declarative preset plus host/browser JavaScript: no build step. See [docs/cross-platform.md](docs/cross-platform.md). |
|
|
221
258
|
| **B. Fallback node scripts** (no plugin manager): `node scripts/install.mjs --profile <profile>` then `--apply`; writes the profile `cordis.patch.yml` | ✅ scripts tested on Windows (dry-run + temp copies) | ⚙️ code-level inference, **not tested** | ⚙️ code-level inference, **not tested** | Same file layout on all platforms: `<DSH_HOME>/profiles/<profile>/cordis.patch.yml`. |
|
|
222
259
|
|
|
223
260
|
**Method A and Method B are mutually exclusive.** Both create the preset
|
package/README.zh.md
CHANGED
|
@@ -13,12 +13,43 @@
|
|
|
13
13
|
|
|
14
14
|
模式设定取自大明科研司·内阁:首辅(Lead)统摄,阁臣(成员)分曹——翰林院编修主调研、工部尚书主执行、大理寺卿主核验、左都御史主验收;默认只调研不改码,不编造数据来源。
|
|
15
15
|
|
|
16
|
-
本包含 host 半部 `index.js
|
|
16
|
+
本包含 host 半部 `index.js`(成员配置与内阁模式提示词)与浏览器半部 `client.js`(右栏「内阁」面板),面板内嵌五张官职头像与一张无官阶回退头像(128px data URL;源图在 `docs/images/avatars/`,由 `src/build_avatars.py` 缩放生成);另随包提供可选的 Node.js 回退脚本(`scripts/*.mjs`)。本包使用 `@deepseek-ai/schemastery` 作为配置 schema 运行时依赖,React 等经 DSH 客户端模块表取用,不自带重复依赖或 CDN。
|
|
17
17
|
|
|
18
18
|
它声明**两行**——`preset-cabinet`(一条 `@deepseek-ai/dsh-agent-preset` 声明)与 `cabinet-ui`(载入本包 JavaScript 的 Loader 行)——并复用 DSH **标准模式**(Standard Mode)出厂的 22 行插件清单,因此工具与标准模式一致;与出厂模式的差异是 persona,并另加右栏「内阁」面板。团队工具(`spawn_teammate`、`team_task_*` 等)由 profile 层的 `@deepseek-ai/dsh-experimental-agent-team-profile` 提供,**本 preset 未内置**。
|
|
19
19
|
|
|
20
20
|
本包声明 **无 DSH 版本硬限制**:没有 `engines.dsh`、没有 DSH `peerDependencies`、安装时不做版本检查。本机在 DSH **0.2.1-rc.3** 实测;其他提供声明式 preset 机制的 DSH 版本可尝试安装,但**未经验证**(见 [DSH 侧限制与说明](#dsh-侧限制与说明))。
|
|
21
21
|
|
|
22
|
+
## 内阁成员配置
|
|
23
|
+
|
|
24
|
+
通过商店安装 bundle 后,打开 **设置 → 内阁成员**。五个官职组分别支持显示名
|
|
25
|
+
(40 字符)、头像和提示词(4000 字符)。内阁卡片与 Owner 标签保留原始成员 ID,
|
|
26
|
+
不会改动任务归属或原生成员列表中的运行时名称。
|
|
27
|
+
|
|
28
|
+
编辑后点击 **保存**;**取消并重新读取** 丢弃草稿并读取最新配置,离开页面也会
|
|
29
|
+
丢弃未保存修改。保存按加载时的修订号原子写入五员配置;其他页面已修改时会提示
|
|
30
|
+
冲突,须取消重读后再编辑,不会用旧草稿覆盖。配置尚未加载时禁止编辑。
|
|
31
|
+
保存的提示词在下一次提示词装配时生效。
|
|
32
|
+
|
|
33
|
+
可上传不超过 2 MB 的 PNG/JPEG/WebP;浏览器居中裁成 96×96 PNG,data URL 不超过
|
|
34
|
+
48 KB。保存后头像同时用于内阁面板和原生团队列表。**恢复默认** 将该官职组的
|
|
35
|
+
显示名、头像、提示词恢复出厂状态;**重置全部** 重置五员草稿,二者都须再点保存。
|
|
36
|
+
清空提示词关闭该官职新增的整段;空 custom 文本也保持为空。默认模式启用首辅的
|
|
37
|
+
御下术和四员职责提示。新增提示段只作用于实时绑定 **cabinet** preset 的 Agent,
|
|
38
|
+
其他模式不受影响。0.3.1 在内阁静态 persona 中新增分派预算约定:
|
|
39
|
+
每个子任务一个交付物、一份写入范围;简单单文件任务最多 30 次工具调用,
|
|
40
|
+
多文件合并/解冲突/实机联调最多 100 次,同一失败最多重试 2 次。任务书须写明
|
|
41
|
+
预算与停止条件,到限回报「失败/未验证」,不得虚报完成。这只是提示词层面的
|
|
42
|
+
约束,没有运行时计数器或强制执行保证。静态 persona 也出现在阁臣的提示词中,靠「仅首辅适用」标题限定语义,并非程序
|
|
43
|
+
从阁臣提示词中删除该段。自定义或关闭成员提示词不会删除这条静态策略。
|
|
44
|
+
该策略是 0.3.1 的新增行为;0.3.0 曾明确
|
|
45
|
+
保持静态 persona 不变,并非解决冲突时意外丢失。
|
|
46
|
+
|
|
47
|
+
配置隔离边界是 **DSH_HOME/profile** 的 cabinet-ui 命名空间,并非浏览器登录账号。
|
|
48
|
+
连接同一 profile 的浏览器共享设置,该 profile 下的内阁会话共用配置;需要隔离时
|
|
49
|
+
使用独立 profile/DSH_HOME。坏字段按默认值处理。只安装 preset 的回退方法没有成员
|
|
50
|
+
设置页和运行时提示段,请优先使用商店 bundle。
|
|
51
|
+
|
|
52
|
+
|
|
22
53
|
## 团队结构一览
|
|
23
54
|
|
|
24
55
|

|
|
@@ -109,7 +140,7 @@ https://raw.githubusercontent.com/luodaoyi/dsh-cabinet-mode/market-index/marketp
|
|
|
109
140
|
仅在商店不可用或本地开发时使用。先完全退出桌面 DSH,释放 profile 锁,再执行:
|
|
110
141
|
|
|
111
142
|
```sh
|
|
112
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.
|
|
143
|
+
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.1/dsh-cabinet-mode-0.3.1.tgz
|
|
113
144
|
dsh plugin --profile desktop list
|
|
114
145
|
```
|
|
115
146
|
|
|
@@ -120,7 +151,7 @@ dsh plugin --profile desktop list
|
|
|
120
151
|
若通过插件市场安装:刷新市场,先在**已安装**页卸载旧版本,再从**插件市场**安装新版本,然后重启——没有 tgz URL 要换,也没有一键更新。否则用同一条安装命令换新版本 URL(或在插件页选新 `.tgz`),然后完全退出并重启 DeepSeek Harness:
|
|
121
152
|
|
|
122
153
|
```sh
|
|
123
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.
|
|
154
|
+
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.1/dsh-cabinet-mode-0.3.1.tgz
|
|
124
155
|
```
|
|
125
156
|
|
|
126
157
|
`dsh plugin --profile desktop list` 应显示新版本。升级已在 Windows 实测:
|