dsh-cabinet-mode 0.2.5 → 0.2.6
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 +11 -0
- package/README.md +30 -10
- package/README.zh.md +23 -9
- package/client.js +772 -765
- package/cordis.patch.yml +5 -5
- package/docs/images/avatars/README.md +6 -4
- package/docs/images/avatars/dali.png +0 -0
- package/docs/images/avatars/prompts.json +26 -1
- package/docs/images/avatars/works.png +0 -0
- package/docs/images/cabinet-runtime-dark.png +0 -0
- package/docs/images/cabinet-runtime-light.png +0 -0
- package/docs/images/cabinet-team.svg +3 -3
- package/package.json +1 -1
- package/scripts/test-client.mjs +17 -10
- package/src/avatars/dali.png +0 -0
- package/src/avatars/works.png +0 -0
- package/src/avatars.js +769 -762
package/cordis.patch.yml
CHANGED
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
name: '@deepseek-ai/dsh-persona'
|
|
27
27
|
config:
|
|
28
28
|
prefix: |-
|
|
29
|
-
你是大明科研司·内阁成员,运行在 DeepSeek Harness
|
|
29
|
+
你是大明科研司·内阁成员,运行在 DeepSeek Harness 之上。内阁设首辅一人,阁臣分曹:翰林院编修、工部尚书、大理寺卿、左都御史。
|
|
30
30
|
|
|
31
31
|
【身份判定】
|
|
32
32
|
1. 首辅判据:若系统/运行上下文中出现精确短语 `You are the Team Lead named "lead".`,你就是内阁首辅。
|
|
33
|
-
2. 阁臣判据:若出现精确短语 `You are teammate "<name>".` 或 `Your Team Lead is named "lead".`,你就是阁臣;以该短语中的 <name>
|
|
33
|
+
2. 阁臣判据:若出现精确短语 `You are teammate "<name>".` 或 `Your Team Lead is named "lead".`,你就是阁臣;以该短语中的 <name> 或首辅分派时写明的衙门身份自称(翰林院编修/工部尚书/大理寺卿/左都御史)。
|
|
34
34
|
3. 判据只有上述精确短语:不要用「是否持有 spawn_teammate 等团队工具」判断身份(Team 工具对所有成员可见);也不要用字样匹配(首辅上下文同样含 teammates 一词)。
|
|
35
35
|
4. 都没有时按阁臣行事,并在回复中说明身份未定。任何情况下不得自封首辅。
|
|
36
36
|
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
你是内阁首辅(队长),对用户所托负总责,六条职责:
|
|
39
39
|
一、审题:先读懂用户真正所求与边界;含混处先问,给备选,不臆测。
|
|
40
40
|
二、拟旨拆解:把目标拆成可执行子任务,逐条写清目标、交付物、验收标准、写入范围与依赖顺序。
|
|
41
|
-
|
|
41
|
+
三、分派:按衙门分派阁臣——翰林院编修主调研,工部尚书主执行,大理寺卿主核验,左都御史主验收;说明串行或并行;有依赖必串行。
|
|
42
42
|
四、裁断:成员分歧、卡点、范围争议由你拍板并说明依据,不把决定权下推,不骑墙。
|
|
43
43
|
五、汇总:收齐产出后去重、对齐,按用户原话逐项回对,指出未做到与未验证之处。
|
|
44
44
|
六、闭环:验收合格方可交差;失败、遗留与风险必须明写,不得隐瞒。
|
|
45
45
|
|
|
46
46
|
首辅令制(强制,不可省略):
|
|
47
|
-
1. 接到任务必须先拆解,再分派——不得跳过分派直接开工。拆解后立即用 spawn_teammate
|
|
47
|
+
1. 接到任务必须先拆解,再分派——不得跳过分派直接开工。拆解后立即用 spawn_teammate 把子任务点名分派给相应阁臣(翰林院编修/工部尚书/大理寺卿/左都御史),并用 team_task_create 建任务板,逐条写明目标、交付物、验收标准、写入范围与依赖顺序;有依赖的串行,无依赖的并行。
|
|
48
48
|
2. 令出即行,全程自主推进,不等待用户逐步确认。分派后主动跟进、裁断卡点、收齐产出、验收闭环,不放任任务悬空。
|
|
49
49
|
3. 执行类工作一律委派,禁止首辅亲自执行。调研、写码、改文件、跑命令、抓数据、生成产物等执行类工作,必须委派给对应衙门的阁臣完成;首辅亲自只做审题、拆解、裁断、汇总、验收五件事。无人可派或确需首辅亲办时,须先在对话中向用户说明理由并获明确同意,方可亲办;未经同意不得以任何理由自行执行。
|
|
50
50
|
4. 委派非免责:成员产出须经核验方许采信。
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
【阁臣职责与规矩】(仅阁臣适用)
|
|
55
55
|
你是阁臣(下属),受首辅节制,不代行首辅职权。
|
|
56
56
|
1. 接令先复述任务与写入范围,确认边界后开工;只在分派范围内写,不擅自扩大。
|
|
57
|
-
2.
|
|
57
|
+
2. 本衙职责:翰林院编修主调研与文献考据;工部尚书主动手执行与产出;大理寺卿主独立核验;左都御史主验收并按律弹劾缺陷。
|
|
58
58
|
3. 遇阻必带三件回报首辅:已做什么、卡在哪里、需要什么;不空手抛问。
|
|
59
59
|
4. 产出必附证据:路径、行号、命令输出;未实测标「未验证」,禁以推测冒充实测。
|
|
60
60
|
5. 默认只调研不改码,写操作以任务明确授权为限;不编造数据来源;不改 live 配置。
|
|
@@ -8,12 +8,14 @@ These are original AI-generated chibi illustrations. The requested reference is
|
|
|
8
8
|
| --- | --- | --- |
|
|
9
9
|
| lead | 内阁首辅,以加一品衔大学士作艺术设定 | 鹤 / crane; 首辅本身不是固定品阶 |
|
|
10
10
|
| hanlin | 翰林院编修 | 正七品,鸂鶒 / ornamental duck |
|
|
11
|
-
| works |
|
|
12
|
-
| dali |
|
|
13
|
-
| yushi |
|
|
11
|
+
| works | 工部尚书 | 正二品,锦鸡 / golden pheasant |
|
|
12
|
+
| dali | 大理寺卿 | 正三品,孔雀 / peacock |
|
|
13
|
+
| yushi | 左都御史 | 正二品,风宪官獬豸 / xiezhi |
|
|
14
14
|
|
|
15
|
-
Sources: [《明史》卷六十七·舆服三](https://zh.wikisource.org/wiki/明史/卷67), [卷七十二·职官一](https://zh.wikisource.org/wiki/明史/卷72), [卷七十三·职官二](https://zh.wikisource.org/wiki/明史/卷73). The five-to-seven-rank blue rule concerns 公服; the chosen burgundy, teal, rust, slate and plum palette is artistic, not a claim about mandatory 常服 colours.
|
|
15
|
+
Sources: [《明史》卷六十七·舆服三](https://zh.wikisource.org/wiki/明史/卷67), [卷七十二·职官一](https://zh.wikisource.org/wiki/明史/卷72), [卷七十三·职官二](https://zh.wikisource.org/wiki/明史/卷73). The five-to-seven-rank blue rule concerns 公服; the chosen burgundy, teal, rust, slate and plum palette is artistic, not a claim about mandatory 常服 colours. 大理寺卿 is not assigned the censor's xiezhi badge.
|
|
16
16
|
|
|
17
17
|
The original PNGs are 1254×1254. Run `python3 src/build_avatars.py` from the repository root (Pillow required) to regenerate all 128×128 PNGs, `src/avatars.js`, and the marked avatar region of `client.js`. Exact generation prompts are recorded in [prompts.json](prompts.json). Existing role matching and original member names are preserved.
|
|
18
18
|
|
|
19
19
|
Full-size and 128px artwork are visually reviewed; automated tests only check PNG dimensions and byte parity between files and embedded modules. At 22–24px, embroidery details are not reliably readable: use the adjacent role and member labels, not colour or badge alone, to identify a member.
|
|
20
|
+
|
|
21
|
+
Version 0.2.6 raises the three requested offices and redraws Works and Dali badges accordingly. The approved faces, palette and style are retained; the censor badge remains xiezhi. Old 主事、评事、监察御史 aliases remain compatible, with original member names visible. The edit prompts reference the Works and Dali originals at tag v0.2.5.
|
|
Binary file
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
[
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"key": "lead",
|
|
4
|
+
"prompt": "Use case: historical-scene. Create one original square 1024x1024 avatar for a Chinese Ming dynasty cabinet software panel, a polished coherent chibi illustrated portrait (not a copied book plate), clean thin dark outlines, soft matte colors, subtle paper texture. Half-length portrait, full black wushamao official cap with two plain horizontal side wings entirely inside frame, big expressive face, upper torso and a LARGE fully visible square embroidered chest rank badge, lower crop at waist, no hands covering badge. Plain pale ivory background with subtle circular warm-gold halo; uncluttered, legible down to 24px and 128px. Subject: dignified mature chief grand secretary, gentle confident smile, small neat dark moustache and short beard. Artistic character setting: grand secretary with an additional first-rank title, NOT claiming all chief secretaries have that rank. Ming mid/late period round-collar robe in muted deep burgundy, white inner collar, plain black cap, square dark chest badge edged gold featuring ONE WHITE CRANE with red crown, long neck and long legs, distinct crane silhouette above stylized clouds. Important: ordinary official changfu, no dragon/python robe, no emperor yellow, no crown, no Qing hat/button/beads, no peacock feather, no jeweled headdress, no earrings, no text or labels or watermark. Keep cap, face and square crane badge prominent, not full-body. This establishes the style for a set of five."
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"key": "hanlin",
|
|
8
|
+
"prompt": "Use case: historical-scene. Create ONE original square chibi Ming-dynasty official portrait, same coherent thin-line matte illustrated style, paper texture, head proportions, black plain wushamao cap with two horizontal side wings, pale ivory background and subtle circular halo as the supplied STYLE reference. Reference is style/composition only; replace character and rank badge as specified. Upper torso portrait, complete cap within image, round-collar plain robe and white inner collar, LARGE fully visible square embroidered rank badge centered on chest, no hands or objects over badge. Keep all details simple and high contrast for 128px avatar. No text, watermark, dragon/python robe, imperial crown, Qing topknot/hat button/bead necklace, jeweled headgear, earrings. Ordinary mid/late Ming changfu. Robe color is an artistic UI distinction, not a claimed rank regulation. Young scholarly Hanlin compiler, clean-shaven, gentle thoughtful expression, muted teal robe and cool jade halo. Seventh rank: square badge depicts a SINGLE MANDARIN-DUCK-LIKE XICHI WATERFOWL (鸂鶒), compact body floating above little ripples, short duck bill, short neck, distinctive crest and raised decorative wing feather. A duck, NOT a crane/heron with long legs; no mammal."
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"key": "works",
|
|
12
|
+
"prompt": "Edit the provided original portrait, preserving its approved chibi illustration style, face, expression, black Ming wushamao with plain horizontal wings, round-collar robe, composition, square badge gold frame, ivory paper texture and circular halo. Produce a single square portrait, not a montage, no text. This is original simplified Ming changfu art, not a book plate reproduction. Only change the embroidery inside the chest rank badge as instructed. Use the FIRST reference image, the smiling rust-red robed official with orange halo (works). He is now 工部尚书, Ming second-rank civil minister. Replace the white egret completely with one clearly recognizable golden pheasant (锦鸡): golden crest, warm red breast, richly patterned golden-orange neck cape, darker blue-green wings, and very long elegant striped tail feathers; compact pheasant neck, short pointed beak, two legs on a rock among stylized clouds. Keep the full pheasant and long tail inside the square badge. No crane, no egret, no duck, no peacock eye spots, no dragon. Keep all other portrait details visually the same.",
|
|
13
|
+
"originalPrompt": "Use case: historical-scene. Create ONE original square chibi Ming-dynasty official portrait, same coherent thin-line matte illustrated style, paper texture, head proportions, black plain wushamao cap with two horizontal side wings, pale ivory background and subtle circular halo as the supplied STYLE reference. Reference is style/composition only; replace character and rank badge as specified. Upper torso portrait, complete cap within image, round-collar plain robe and white inner collar, LARGE fully visible square embroidered rank badge centered on chest, no hands or objects over badge. Keep all details simple and high contrast for 128px avatar. No text, watermark, dragon/python robe, imperial crown, Qing topknot/hat button/bead necklace, jeweled headgear, earrings. Ordinary mid/late Ming changfu. Robe color is an artistic UI distinction, not a claimed rank regulation. Practical confident adult Ministry of Works principal secretary, clean-shaven, slightly broad eyebrows, muted rust-red robe and warm terracotta halo. Sixth rank: square chest badge depicts a SINGLE WHITE EGRET (鹭鸶), long slim S-curved neck, slender pointed bill, long thin legs standing in shallow water, a little flowing crest behind its head, NO red crane crown, NOT a duck or beast.",
|
|
14
|
+
"reference": "v0.2.5 docs/images/avatars/works.png and dali.png"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "dali",
|
|
18
|
+
"prompt": "Edit the provided original portrait, preserving its approved chibi illustration style, face, expression, black Ming wushamao with plain horizontal wings, round-collar robe, composition, square badge gold frame, ivory paper texture and circular halo. Produce a single square portrait, not a montage, no text. This is original simplified Ming changfu art, not a book plate reproduction. Only change the embroidery inside the chest rank badge as instructed. Use the SECOND reference image, the serious slate-indigo robed official with blue-gray halo (dali). He is now 大理寺卿, Ming third-rank civil official. Replace the swimming duck completely with one clearly recognizable peacock (孔雀): slender blue-green neck, small upright crest, graceful standing body and a beautiful long tail with clearly visible peacock eye spots arranged decoratively inside the badge (partly fanned is acceptable). Show legs on a rock among stylized clouds. The tail's eye spots must distinguish this from a pheasant or duck. No duck, no crane, no xiezhi, no dragon. Keep all other portrait details visually the same.",
|
|
19
|
+
"originalPrompt": "Use case: historical-scene. Create ONE original square chibi Ming-dynasty official portrait, same coherent thin-line matte illustrated style, paper texture, head proportions, black plain wushamao cap with two horizontal side wings, pale ivory background and subtle circular halo as the supplied STYLE reference. Reference is style/composition only; replace character and rank badge as specified. Upper torso portrait, complete cap within image, round-collar plain robe and white inner collar, LARGE fully visible square embroidered rank badge centered on chest, no hands or objects over badge. Keep all details simple and high contrast for 128px avatar. No text, watermark, dragon/python robe, imperial crown, Qing topknot/hat button/bead necklace, jeweled headgear, earrings. Ordinary mid/late Ming changfu. Robe color is an artistic UI distinction, not a claimed rank regulation. Thoughtful serious adult Dali Temple pingshi judicial reviewer, clean-shaven with more angular eyebrows than Hanlin, muted slate-indigo robe and blue-gray halo. Seventh rank: square chest badge depicts a SINGLE XICHI WATERFOWL (鸂鶒), compact duck body, short duck bill and short neck, crested head and ornamental upright wing feather, floating on ripples. A duck NOT a xiezhi or any mammal, NOT long-neck crane/heron. Plain male official cap, no jewelry.",
|
|
20
|
+
"reference": "v0.2.5 docs/images/avatars/works.png and dali.png"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"key": "yushi",
|
|
24
|
+
"prompt": "Use case: historical-scene. Create ONE original square chibi Ming-dynasty official portrait, same coherent thin-line matte illustrated style, paper texture, head proportions, black plain wushamao cap with two horizontal side wings, pale ivory background and subtle circular halo as the supplied STYLE reference. Reference is style/composition only; replace character and rank badge as specified. Upper torso portrait, complete cap within image, round-collar plain robe and white inner collar, LARGE fully visible square embroidered rank badge centered on chest, no hands or objects over badge. Keep all details simple and high contrast for 128px avatar. No text, watermark, dragon/python robe, imperial crown, Qing topknot/hat button/bead necklace, jeweled headgear, earrings. Ordinary mid/late Ming changfu. Robe color is an artistic UI distinction, not a claimed rank regulation. Stern attentive adult supervising censor, clean-shaven, sharply defined eyebrows, muted plum robe and pale mauve halo. Censorate insignia: LARGE square chest badge depicts a SINGLE XIEZHI (獬豸), an unmistakable four-legged goat/deer-like mythical justice beast, hooves, leonine mane, ONE straight central horn on forehead, dark bronze-gold silhouette in side view, tail and four legs clearly visible. NOT a bird, NOT a dragon, NOT two antlers. Plain black cap with NO animal motif on cap."
|
|
25
|
+
}
|
|
26
|
+
]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
<text x="135" y="290" font-size="12" font-weight="normal">调研 · 撰稿</text>
|
|
18
18
|
|
|
19
19
|
<rect x="270" y="240" width="190" height="64" rx="10" fill="#1e8449" stroke="#145a32" stroke-width="2"/>
|
|
20
|
-
<text x="365" y="268"
|
|
20
|
+
<text x="365" y="268">工部尚书</text>
|
|
21
21
|
<text x="365" y="290" font-size="12" font-weight="normal">执行 · 产出</text>
|
|
22
22
|
|
|
23
23
|
<rect x="500" y="240" width="190" height="64" rx="10" fill="#6c3483" stroke="#4a235a" stroke-width="2"/>
|
|
24
|
-
<text x="595" y="268"
|
|
24
|
+
<text x="595" y="268">大理寺卿</text>
|
|
25
25
|
<text x="595" y="290" font-size="12" font-weight="normal">结论核验</text>
|
|
26
26
|
|
|
27
27
|
<rect x="730" y="240" width="190" height="64" rx="10" fill="#b9770e" stroke="#8a5a08" stroke-width="2"/>
|
|
28
|
-
<text x="825" y="268"
|
|
28
|
+
<text x="825" y="268">左都御史</text>
|
|
29
29
|
<text x="825" y="290" font-size="12" font-weight="normal">监督验收</text>
|
|
30
30
|
</g>
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cabinet-mode",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
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/test-client.mjs
CHANGED
|
@@ -21,32 +21,39 @@ runInNewContext(source.replace(exportPoint,
|
|
|
21
21
|
});
|
|
22
22
|
for (const [english, chinese] of [
|
|
23
23
|
['lead', '首辅'], ['lead', '内阁首辅'], ['hanlin', '翰林院编修'],
|
|
24
|
-
['works', '
|
|
24
|
+
['works', '工部尚书'], ['dali', '大理寺卿'], ['yushi', '都察院御史'],
|
|
25
25
|
]) assert.equal(client.avatarFor(english), client.avatarFor(' ' + chinese + '-一 '));
|
|
26
26
|
assert.match(client.avatarFor('unknown'), /^data:image\/svg\+xml/);
|
|
27
27
|
assert.match(client.avatarFor(null), /^data:image\/svg\+xml/);
|
|
28
28
|
for (const [name, expected] of [
|
|
29
|
-
['gongbu2', '
|
|
30
|
-
['works-ui', '
|
|
31
|
-
['works_ui', '
|
|
32
|
-
['works.ui', '
|
|
29
|
+
['gongbu2', '工部尚书2 · gongbu2'],
|
|
30
|
+
['works-ui', '工部尚书(ui) · works-ui'],
|
|
31
|
+
['works_ui', '工部尚书(ui) · works_ui'],
|
|
32
|
+
['works.ui', '工部尚书(ui) · works.ui'],
|
|
33
33
|
['翰林院编修-一', '翰林院编修(一) · 翰林院编修-一'],
|
|
34
|
-
['
|
|
34
|
+
['工部尚书', '工部尚书'],
|
|
35
35
|
['hanlinx', 'hanlinx'], ['works-', 'works-'], ['gongbu2x', 'gongbu2x'],
|
|
36
36
|
]) assert.equal(client.displayName(name), expected);
|
|
37
37
|
for (const name of ['hanlinx', 'works-', 'gongbu2x']) assert.match(client.avatarFor(name), /^data:image\/svg\+xml/);
|
|
38
38
|
assert.equal(client.avatarFor('gongbu2'), client.avatarFor('works'));
|
|
39
39
|
// Display Chinese offices without changing the original runtime identity.
|
|
40
40
|
for (const [key, title] of [
|
|
41
|
-
['lead', '内阁首辅'], ['hanlin', '翰林院编修'], ['works', '
|
|
42
|
-
['dali', '
|
|
41
|
+
['lead', '内阁首辅'], ['hanlin', '翰林院编修'], ['works', '工部尚书'],
|
|
42
|
+
['dali', '大理寺卿'], ['yushi', '左都御史'],
|
|
43
43
|
]) {
|
|
44
44
|
assert.equal(client.displayName(key), title + ' · ' + key);
|
|
45
45
|
assert.equal(client.displayName(title), title);
|
|
46
46
|
assert.equal(client.avatarFor(key), client.avatarFor(title));
|
|
47
47
|
}
|
|
48
|
-
assert.equal(client.displayName('都察院御史'), '
|
|
49
|
-
assert.equal(client.avatarFor('都察院御史-一'), client.avatarFor('
|
|
48
|
+
assert.equal(client.displayName('都察院御史'), '左都御史 · 都察院御史');
|
|
49
|
+
assert.equal(client.avatarFor('都察院御史-一'), client.avatarFor('左都御史-一'));
|
|
50
|
+
for (const [oldTitle, newTitle] of [
|
|
51
|
+
['工部主事', '工部尚书'], ['大理寺评事', '大理寺卿'], ['监察御史', '左都御史'],
|
|
52
|
+
]) {
|
|
53
|
+
assert.equal(client.displayName(oldTitle), newTitle + ' · ' + oldTitle);
|
|
54
|
+
assert.equal(client.avatarFor(oldTitle + '-一'), client.avatarFor(newTitle + '-一'));
|
|
55
|
+
assert.notEqual(client.displayName(oldTitle), client.displayName(newTitle));
|
|
56
|
+
}
|
|
50
57
|
for (const language of [client.zh, client.en]) assert.equal(language['lead.tag'], '内阁首辅');
|
|
51
58
|
|
|
52
59
|
const render = (team, language) => client.CabinetPanel({
|
package/src/avatars/dali.png
CHANGED
|
Binary file
|
package/src/avatars/works.png
CHANGED
|
Binary file
|