dsh-cabinet-mode 0.3.0 → 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 +16 -0
- package/README.md +12 -3
- package/README.zh.md +10 -3
- package/cordis.patch.yml +1 -0
- package/package.json +1 -1
- package/scripts/market-index.mjs +2 -2
- package/scripts/test-prompt-assembly.cjs +34 -0
- package/scripts/verify.mjs +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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
|
+
|
|
5
21
|
## [0.3.0] - 2026-11-05
|
|
6
22
|
|
|
7
23
|
### Added
|
package/README.md
CHANGED
|
@@ -57,7 +57,16 @@ resets all five in the draft. Both require Save. Clearing a prompt disables that
|
|
|
57
57
|
office's added block; an empty custom prompt also stays empty. Factory mode restores
|
|
58
58
|
the Lead's 御下术 and the four office duty prompts. These extra sections apply only
|
|
59
59
|
to agents actually composed with the **cabinet** preset; other modes are unchanged.
|
|
60
|
-
|
|
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.
|
|
61
70
|
|
|
62
71
|
Settings live in the **DSH_HOME/profile** configuration (the cabinet-ui namespace),
|
|
63
72
|
not a browser account. Browsers connected to the same profile share settings and
|
|
@@ -184,7 +193,7 @@ On failure, show the exact error. For $.format must be 1, replace the webpage so
|
|
|
184
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:
|
|
185
194
|
|
|
186
195
|
```sh
|
|
187
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.
|
|
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
|
|
188
197
|
dsh plugin --profile desktop list
|
|
189
198
|
```
|
|
190
199
|
|
|
@@ -199,7 +208,7 @@ the same install command with the new version URL (or pick the new `.tgz` in the
|
|
|
199
208
|
plugin page), then fully quit and restart DeepSeek Harness:
|
|
200
209
|
|
|
201
210
|
```sh
|
|
202
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.
|
|
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
|
|
203
212
|
```
|
|
204
213
|
|
|
205
214
|
`dsh plugin --profile desktop list` should report the new version. Upgrades were
|
package/README.zh.md
CHANGED
|
@@ -35,7 +35,14 @@
|
|
|
35
35
|
显示名、头像、提示词恢复出厂状态;**重置全部** 重置五员草稿,二者都须再点保存。
|
|
36
36
|
清空提示词关闭该官职新增的整段;空 custom 文本也保持为空。默认模式启用首辅的
|
|
37
37
|
御下术和四员职责提示。新增提示段只作用于实时绑定 **cabinet** preset 的 Agent,
|
|
38
|
-
|
|
38
|
+
其他模式不受影响。0.3.1 在内阁静态 persona 中新增分派预算约定:
|
|
39
|
+
每个子任务一个交付物、一份写入范围;简单单文件任务最多 30 次工具调用,
|
|
40
|
+
多文件合并/解冲突/实机联调最多 100 次,同一失败最多重试 2 次。任务书须写明
|
|
41
|
+
预算与停止条件,到限回报「失败/未验证」,不得虚报完成。这只是提示词层面的
|
|
42
|
+
约束,没有运行时计数器或强制执行保证。静态 persona 也出现在阁臣的提示词中,靠「仅首辅适用」标题限定语义,并非程序
|
|
43
|
+
从阁臣提示词中删除该段。自定义或关闭成员提示词不会删除这条静态策略。
|
|
44
|
+
该策略是 0.3.1 的新增行为;0.3.0 曾明确
|
|
45
|
+
保持静态 persona 不变,并非解决冲突时意外丢失。
|
|
39
46
|
|
|
40
47
|
配置隔离边界是 **DSH_HOME/profile** 的 cabinet-ui 命名空间,并非浏览器登录账号。
|
|
41
48
|
连接同一 profile 的浏览器共享设置,该 profile 下的内阁会话共用配置;需要隔离时
|
|
@@ -133,7 +140,7 @@ https://raw.githubusercontent.com/luodaoyi/dsh-cabinet-mode/market-index/marketp
|
|
|
133
140
|
仅在商店不可用或本地开发时使用。先完全退出桌面 DSH,释放 profile 锁,再执行:
|
|
134
141
|
|
|
135
142
|
```sh
|
|
136
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.
|
|
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
|
|
137
144
|
dsh plugin --profile desktop list
|
|
138
145
|
```
|
|
139
146
|
|
|
@@ -144,7 +151,7 @@ dsh plugin --profile desktop list
|
|
|
144
151
|
若通过插件市场安装:刷新市场,先在**已安装**页卸载旧版本,再从**插件市场**安装新版本,然后重启——没有 tgz URL 要换,也没有一键更新。否则用同一条安装命令换新版本 URL(或在插件页选新 `.tgz`),然后完全退出并重启 DeepSeek Harness:
|
|
145
152
|
|
|
146
153
|
```sh
|
|
147
|
-
dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.3.
|
|
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
|
|
148
155
|
```
|
|
149
156
|
|
|
150
157
|
`dsh plugin --profile desktop list` 应显示新版本。升级已在 Windows 实测:
|
package/cordis.patch.yml
CHANGED
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
2. 令出即行,全程自主推进,不等待用户逐步确认。分派后主动跟进、裁断卡点、收齐产出、验收闭环,不放任任务悬空。
|
|
51
51
|
3. 执行类工作一律委派,禁止首辅亲自执行。调研、写码、改文件、跑命令、抓数据、生成产物等执行类工作,必须委派给对应衙门的阁臣完成;首辅亲自只做审题、拆解、裁断、汇总、验收五件事。无人可派或确需首辅亲办时,须先在对话中向用户说明理由并获明确同意,方可亲办;未经同意不得以任何理由自行执行。
|
|
52
52
|
4. 委派非免责:成员产出须经核验方许采信。
|
|
53
|
+
5. 分派预算约定(提示词约束,非运行时计数器):单个子任务只许一个交付物、一份写入范围,预算按难度核定并写进任务书——简单单文件任务 ≤30 次工具调用,多文件合并/解冲突/实机联调类 ≤100 次;同一失败重试 ≤2 次。任务书须同时写明工具调用上限与停止条件:到限未完成就交「失败 / 未验证」并回报,禁止无上限轮询等待与第 3 次重试;子代理两次无进展即改派或收窄范围,不得原地空转。
|
|
53
54
|
|
|
54
55
|
首辅规矩:默认只调研不改码——用户未明确授权写操作时只读不写;不编造数据来源,每条结论锚定路径、行号、命令输出或原文,不确定标「未验证」;不越权改 live 配置。
|
|
55
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cabinet-mode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Cabinet Mode (内阁模式) for DeepSeek Harness: a declarative DSH bundle that adds a dual-identity Lead/teammate agent preset for the Great Ming Research Bureau cabinet team.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"icon": "./icon.svg",
|
package/scripts/market-index.mjs
CHANGED
|
@@ -284,8 +284,8 @@ const index = {
|
|
|
284
284
|
name: MANIFEST.name,
|
|
285
285
|
title: { en: 'Cabinet Mode', zh: '内阁模式' },
|
|
286
286
|
description: {
|
|
287
|
-
en: 'Adds the “内阁模式” preset: one persona shared by the Lead and the bureau members (翰林院 / 工部 / 大理寺 / 都察院), research-first rules, and evidence-anchored reporting. Includes the Cabinet sidebar
|
|
288
|
-
zh: '新增「内阁模式」preset:首辅与阁臣(翰林院 / 工部 / 大理寺 / 都察院)共享同一段 persona
|
|
287
|
+
en: 'Adds the “内阁模式” preset: one persona shared by the Lead and the bureau members (翰林院 / 工部 / 大理寺 / 都察院), research-first rules, and evidence-anchored reporting. Includes the Cabinet sidebar, member avatars and profile-wide settings; since 0.3.0 it uses @deepseek-ai/schemastery for its settings schema.',
|
|
288
|
+
zh: '新增「内阁模式」preset:首辅与阁臣(翰林院 / 工部 / 大理寺 / 都察院)共享同一段 persona,默认只调研不改码、结论必须锚定证据。包含内阁侧边栏、成员头像与 profile 共享设置;自 0.3.0 起使用 @deepseek-ai/schemastery 作为设置 schema 依赖。',
|
|
289
289
|
},
|
|
290
290
|
icon: './icon.svg',
|
|
291
291
|
author: MANIFEST.author,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const fs=require('node:fs'),assert=require('node:assert/strict');
|
|
2
|
+
const path=require('node:path');
|
|
3
|
+
if(!process.env.DSH_MODULE_ROOT)throw Error('Set DSH_MODULE_ROOT to the installed official DSH node_modules directory');
|
|
4
|
+
const base=path.join(process.env.DSH_MODULE_ROOT,'@deepseek-ai')+'/';
|
|
5
|
+
const {Context}=require(base+'cordis');const {SystemPrompt,renderPrompt}=require(base+'dsh-system-prompt');
|
|
6
|
+
const {createScope}=require(base+'dsh-scope');const persona=require(base+'dsh-persona');
|
|
7
|
+
const cabinet=require('../index.js');
|
|
8
|
+
const patch=fs.readFileSync(path.join(__dirname,'../cordis.patch.yml'),'utf8').replaceAll('\r\n','\n');
|
|
9
|
+
const lines=patch.split('prefix: |-\n')[1].split('\n');const kept=[];
|
|
10
|
+
for(const line of lines){if(line.trim()&&!line.startsWith(' '))break;kept.push(line.slice(16));}
|
|
11
|
+
const prefix=kept.join('\n').trimEnd();assert.ok(prefix.includes('≤100'));
|
|
12
|
+
(async()=>{
|
|
13
|
+
const ctx=new Context();new SystemPrompt(ctx,{});
|
|
14
|
+
const presets=new WeakMap();ctx.provide('agentPresets',{composedPreset:c=>presets.get(c)});
|
|
15
|
+
ctx.provide('agentTeams',{tryMembership:a=>a.testMember});
|
|
16
|
+
const config={members:[]};cabinet.apply(ctx,config);
|
|
17
|
+
const results=[];
|
|
18
|
+
for(const preset of ['standard','cabinet'])for(const role of ['lead','teammate'])for(const mode of ['','custom','off']){
|
|
19
|
+
const key={};const scope=createScope(ctx,key);presets.set(scope.ctx,preset);
|
|
20
|
+
persona.apply(scope.ctx,{prefix:preset==='cabinet'?prefix:'Standard test persona'});
|
|
21
|
+
const name=role==='lead'?'lead':'dalisi-pingshi';config.members=[{key:role==='lead'?'lead':'dali',mode,prompt:'CUSTOM {{literal}}'}];
|
|
22
|
+
const agent={ctx:scope.ctx,testMember:{role,name}};
|
|
23
|
+
const assembly=await ctx.systemPrompt.assemble({scope:key,agent});const rendered=renderPrompt(assembly);
|
|
24
|
+
assert.equal(rendered.includes('分派预算约定'),preset==='cabinet');
|
|
25
|
+
assert.equal(rendered.includes('CUSTOM {{literal}}'),preset==='cabinet'&&mode==='custom');
|
|
26
|
+
assert.equal(rendered.includes('【御下术'),preset==='cabinet'&&role==='lead'&&mode==='');
|
|
27
|
+
const extra=assembly.sections.find(s=>s.name==='cabinet:member')?.text||'';
|
|
28
|
+
if(preset!=='cabinet'||mode==='off')assert.equal(extra,'');
|
|
29
|
+
results.push({preset,role,mode:mode||'default',budgetInStaticPersona:rendered.includes('分派预算约定'),memberBlock:extra.length});
|
|
30
|
+
await scope.dispose();
|
|
31
|
+
}
|
|
32
|
+
console.log(JSON.stringify({dshVersion:require(base+'dsh/package.json').version,components:'real Cordis/SystemPrompt/Persona/scope',identity:'stub preset and membership services; no Agent/model/team execution',results},null,2));
|
|
33
|
+
console.log('PASS: 12 real registry/persona assemblies; Cabinet Lead/teammate share static policy, standard excludes it; custom/off only alter dynamic member block. Identity services stubbed; no model calls.');
|
|
34
|
+
})().catch(e=>{console.error(e);process.exitCode=1;});
|
package/scripts/verify.mjs
CHANGED
|
@@ -338,6 +338,11 @@ if (existsSync(PATCH_PATH)) {
|
|
|
338
338
|
['Lead duties: close loop', '闭环'],
|
|
339
339
|
['research-only default', '默认只调研不改码'],
|
|
340
340
|
['no fabricated sources', '不编造数据来源'],
|
|
341
|
+
['dispatch budget is prompt-only', '分派预算约定(提示词约束,非运行时计数器)'],
|
|
342
|
+
['single-file budget', '≤30 次工具调用'],
|
|
343
|
+
['integration budget', '≤100 次'],
|
|
344
|
+
['retry budget', '同一失败重试 ≤2 次'],
|
|
345
|
+
['budget exhaustion disclosure', '到限未完成就交「失败 / 未验证」'],
|
|
341
346
|
];
|
|
342
347
|
const personaMissing = personaChecks.filter(([, needle]) => !patchText.includes(needle)).map(([label]) => label);
|
|
343
348
|
if (personaMissing.length === 0) ok('dual-identity persona keywords');
|
|
@@ -478,6 +483,8 @@ if (!dshVersion) {
|
|
|
478
483
|
const missingShipped = shipped.filter((id) => countOccurrences(output, `- id: ${id}`) !== 1);
|
|
479
484
|
if (missingShipped.length === 0) ok('dump-config keeps the four shipped presets');
|
|
480
485
|
else bad('dump-config shipped presets', missingShipped.join(', '));
|
|
486
|
+
if (output.includes('分派预算约定(提示词约束,非运行时计数器)') && output.includes('≤30 次工具调用') && output.includes('≤100 次') && /同一失败重试\s+≤2\s+次/.test(output)) ok('dump-config contains the new prompt-only dispatch budgets');
|
|
487
|
+
else bad('dump-config dispatch budgets');
|
|
481
488
|
if (output.includes('内阁模式')) ok('dump-config contains the Cabinet Mode display name');
|
|
482
489
|
else bad('dump-config contains 内阁模式');
|
|
483
490
|
}
|