dsh-cabinet-mode 0.2.7 → 0.3.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 CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.3.0] - 2026-11-05
6
+
7
+ ### Added
8
+
9
+ - Profile-wide Cabinet member settings for display names, portraits and duty prompts.
10
+ - Explicit atomic Save/Cancel with revision checks to prevent stale tabs overwriting settings.
11
+ - Cabinet-only runtime prompt sections. Standard and other presets remain unchanged.
12
+ - Default Lead policy and four office duty prompts; clear disables a block and restore
13
+ restores its factory default. Runtime identities and task ownership remain unchanged.
14
+ - Settings are shared by browsers connected to the same DSH_HOME/profile, not isolated
15
+ by browser account. Native roster names remain runtime identities.
16
+
5
17
  ## [0.2.7] - 2026-11-05
6
18
 
7
19
  ### 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`, an empty `apply`) and a browser half
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 has **no third-party runtime
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,35 @@ 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
+ The existing static persona is unchanged in this release.
61
+
62
+ Settings live in the **DSH_HOME/profile** configuration (the cabinet-ui namespace),
63
+ not a browser account. Browsers connected to the same profile share settings and
64
+ all Cabinet sessions in it use them; use separate profiles/DSH_HOME for isolation.
65
+ Invalid fields fall back to defaults. The preset-only fallback installation does
66
+ not install this settings UI or runtime prompt section; use the market bundle.
67
+
68
+
41
69
  ## The cabinet at a glance
42
70
 
43
71
  ![Cabinet team layout](docs/images/cabinet-team.svg)
@@ -156,7 +184,7 @@ On failure, show the exact error. For $.format must be 1, replace the webpage so
156
184
  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
185
 
158
186
  ```sh
159
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.2.7/dsh-cabinet-mode-0.2.7.tgz
187
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.0/dsh-cabinet-mode-0.3.0.tgz
160
188
  dsh plugin --profile desktop list
161
189
  ```
162
190
 
@@ -171,7 +199,7 @@ the same install command with the new version URL (or pick the new `.tgz` in the
171
199
  plugin page), then fully quit and restart DeepSeek Harness:
172
200
 
173
201
  ```sh
174
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.2.7/dsh-cabinet-mode-0.2.7.tgz
202
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.0/dsh-cabinet-mode-0.3.0.tgz
175
203
  ```
176
204
 
177
205
  `dsh plugin --profile desktop list` should report the new version. Upgrades were
@@ -217,7 +245,7 @@ on DSH 0.2.1-rc.5.
217
245
  | Method | Windows | Linux | macOS | Notes |
218
246
  |---|---|---|---|---|
219
247
  | **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** | Pure YAML bundle: no build, no dependencies, no OS-specific code. See [docs/cross-platform.md](docs/cross-platform.md). |
248
+ | **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
249
  | **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
250
 
223
251
  **Method A and Method B are mutually exclusive.** Both create the preset
package/README.zh.md CHANGED
@@ -13,12 +13,36 @@
13
13
 
14
14
  模式设定取自大明科研司·内阁:首辅(Lead)统摄,阁臣(成员)分曹——翰林院编修主调研、工部尚书主执行、大理寺卿主核验、左都御史主验收;默认只调研不改码,不编造数据来源。
15
15
 
16
- 本包含 host 半部 `index.js`(空 `apply`)与浏览器半部 `client.js`(右栏「内阁」面板),面板内嵌五张官职头像与一张无官阶回退头像(128px data URL;源图在 `docs/images/avatars/`,由 `src/build_avatars.py` 缩放生成);另随包提供可选的 Node.js 回退脚本(`scripts/*.mjs`)。本包**无第三方运行时依赖**,React 等经 DSH 客户端模块表取用,不自带重复依赖或 CDN。
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
+ 其他模式不受影响。本次发布不改变既有静态 persona。
39
+
40
+ 配置隔离边界是 **DSH_HOME/profile** 的 cabinet-ui 命名空间,并非浏览器登录账号。
41
+ 连接同一 profile 的浏览器共享设置,该 profile 下的内阁会话共用配置;需要隔离时
42
+ 使用独立 profile/DSH_HOME。坏字段按默认值处理。只安装 preset 的回退方法没有成员
43
+ 设置页和运行时提示段,请优先使用商店 bundle。
44
+
45
+
22
46
  ## 团队结构一览
23
47
 
24
48
  ![内阁团队结构](docs/images/cabinet-team.svg)
@@ -109,7 +133,7 @@ https://raw.githubusercontent.com/luodaoyi/dsh-cabinet-mode/market-index/marketp
109
133
  仅在商店不可用或本地开发时使用。先完全退出桌面 DSH,释放 profile 锁,再执行:
110
134
 
111
135
  ```sh
112
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.2.7/dsh-cabinet-mode-0.2.7.tgz
136
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.0/dsh-cabinet-mode-0.3.0.tgz
113
137
  dsh plugin --profile desktop list
114
138
  ```
115
139
 
@@ -120,7 +144,7 @@ dsh plugin --profile desktop list
120
144
  若通过插件市场安装:刷新市场,先在**已安装**页卸载旧版本,再从**插件市场**安装新版本,然后重启——没有 tgz URL 要换,也没有一键更新。否则用同一条安装命令换新版本 URL(或在插件页选新 `.tgz`),然后完全退出并重启 DeepSeek Harness:
121
145
 
122
146
  ```sh
123
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.2.7/dsh-cabinet-mode-0.2.7.tgz
147
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.0/dsh-cabinet-mode-0.3.0.tgz
124
148
  ```
125
149
 
126
150
  `dsh plugin --profile desktop list` 应显示新版本。升级已在 Windows 实测: