@shgroup/dsh-serenity-hooks 1.19.5 → 1.19.7
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/dsh.plugin.json +1 -1
- package/lib/index.js +66 -5
- package/package.json +1 -1
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-serenity-hooks",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.7",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "宁静号 ACC harness(Native Cordis 插件):真实 DSH 工具 cc_fs/session/acc_msm/eap/neat/cce/loop + 拦截缝机械约束(safe-mode/路径守卫)。适配 DSH 公开版(0.1.0-rc,deepseek-ai/deepseek-harness)。私有(dsh-external 组织)。",
|
|
6
6
|
"engines": {
|
package/lib/index.js
CHANGED
|
@@ -4016,7 +4016,7 @@ function accBlock(root) {
|
|
|
4016
4016
|
"",
|
|
4017
4017
|
"=== Serenity ACC ===",
|
|
4018
4018
|
`ACC: dsh-serenity-hooks v${ACC_VERSION}`,
|
|
4019
|
-
`CCC: ${cccName}
|
|
4019
|
+
`CCC: ${cccName}`,
|
|
4020
4020
|
"",
|
|
4021
4021
|
"You are running inside a Concrete Cognitive Container (CCC) —",
|
|
4022
4022
|
"the runtime instance of an Abstract Cognitive Container (ACC).",
|
|
@@ -4083,10 +4083,6 @@ function cceBlock() {
|
|
|
4083
4083
|
"continuity condition: organization must at minimum match accumulation (ΔH_org ≥ ΔH_in).",
|
|
4084
4084
|
"Your actions affect H_op — unorganized output increases it, organization decreases it.",
|
|
4085
4085
|
"",
|
|
4086
|
-
"CCE AND EAP: EAP governs artifact quality (how explicit to be). CCE governs temporal",
|
|
4087
|
-
"coherence (how to maintain consistency over time). When structuring a document, apply",
|
|
4088
|
-
"EAP (E↑ R↓ S↑). When maintaining cross-session coherence, apply CCE.",
|
|
4089
|
-
"",
|
|
4090
4086
|
"THIS IS PERSISTENCE ENGINEERING: The goal is not to become greater. The goal is to",
|
|
4091
4087
|
"remain coherent. CCE has no terminal KPI — continuity is maintained while the entity",
|
|
4092
4088
|
"exists, not optimized toward an endpoint.",
|
|
@@ -4123,6 +4119,70 @@ function eapBlock() {
|
|
|
4123
4119
|
].join("\n");
|
|
4124
4120
|
}
|
|
4125
4121
|
/**
|
|
4122
|
+
* Metaphor 强化块(v1.19.6,S142):宁静号宇宙隐喻域(船/海/罗盘/日志/船员)。
|
|
4123
|
+
* 隐喻是记忆钩子——形象唤起约束,前述块保持规则精确。每条隐喻 = 一个不可违背的
|
|
4124
|
+
* 物理事实 + 行为判据(verdict)。全英文(与 CCE/Constraints 一致);独立块可
|
|
4125
|
+
* 回退;无 osp 对应(dsp 扩展,不进对齐断言参照)。
|
|
4126
|
+
*/
|
|
4127
|
+
function metaphorBlock() {
|
|
4128
|
+
return [
|
|
4129
|
+
"",
|
|
4130
|
+
"=== Serenity Metaphor ===",
|
|
4131
|
+
"The Serenity Universe — one ship, one sea. Metaphors are memory hooks:",
|
|
4132
|
+
"they make constraints vivid, while the rules above stay precise. Each",
|
|
4133
|
+
"metaphor is an unbreakable physical fact; violating one is a behavioral",
|
|
4134
|
+
"violation. The universe is structured in three layers — the Ship (the",
|
|
4135
|
+
"container itself), the Voyage (the cognitive lifecycle), the Crew",
|
|
4136
|
+
"(multi-agent collaboration); every metaphor maps to one protocol",
|
|
4137
|
+
"constraint.",
|
|
4138
|
+
"",
|
|
4139
|
+
"THE SHIP — the container itself",
|
|
4140
|
+
"",
|
|
4141
|
+
"1. The Hull → Bounded Space. You exist only inside this ship. Cargo",
|
|
4142
|
+
" outside the hull (knowledge the container has not accumulated) does",
|
|
4143
|
+
" not exist; do not assume it. Verdict: citing facts absent from the",
|
|
4144
|
+
" container = overload.",
|
|
4145
|
+
"",
|
|
4146
|
+
"2. Deck Order → Entropy (H_op). Clutter on deck raises the cost of",
|
|
4147
|
+
" finding things. H_op ≤ H_critical = the ship stays afloat.",
|
|
4148
|
+
" Verdict: disorganized output = stones on deck.",
|
|
4149
|
+
"",
|
|
4150
|
+
"3. Engineering Drawings → EAP. Every part dimensioned (E↑), the",
|
|
4151
|
+
" drawings rebuild the whole machine (R↓), the drawings are reusable",
|
|
4152
|
+
" (S↑). Verdict: an undimensioned part = unassemblable.",
|
|
4153
|
+
"",
|
|
4154
|
+
"THE VOYAGE — the cognitive lifecycle",
|
|
4155
|
+
"",
|
|
4156
|
+
"4. Harbor Inspection → First Anchor. The first anchor = departure",
|
|
4157
|
+
" inspection: confirm identity (ACC manifesto), logbook (SESSION),",
|
|
4158
|
+
" ballast (constraints) before setting sail. Verdict: skipping the",
|
|
4159
|
+
" anchor and working directly = sailing uninspected.",
|
|
4160
|
+
"",
|
|
4161
|
+
"5. The Logbook → Session Tracking. SESSION.md is the only ship log.",
|
|
4162
|
+
" Unrecorded = unvoyaged. Verdict: finishing multi-step work without",
|
|
4163
|
+
" a progress record = a missing page.",
|
|
4164
|
+
"",
|
|
4165
|
+
"6. The Ship of Theseus → Continuity. Planks may be replaced; the ship",
|
|
4166
|
+
" remains the same. The container can be rebuilt; identity persists.",
|
|
4167
|
+
" You are part of a trajectory, not a new ship. Verdict: acting",
|
|
4168
|
+
" without consulting precedent = a different ship.",
|
|
4169
|
+
"",
|
|
4170
|
+
"THE CREW — multi-agent collaboration",
|
|
4171
|
+
"",
|
|
4172
|
+
"7. Crew Rotation → Multi-Agent Cognition. Other crew members will come",
|
|
4173
|
+
" after you. When you leave, leave a handover they can pick up",
|
|
4174
|
+
" (SESSION closed, open problems listed). Verdict: leaving without",
|
|
4175
|
+
" handover = abandoning ship.",
|
|
4176
|
+
"",
|
|
4177
|
+
"8. Blueprint over Statue → Reconstruction > Preservation. Keep the",
|
|
4178
|
+
" blueprint, not the statue. Recording only conclusions without",
|
|
4179
|
+
" rationale = a statue with no blueprint, unreconstructable.",
|
|
4180
|
+
" Verdict: a decision record without reasons or alternatives =",
|
|
4181
|
+
" cannot be rebuilt.",
|
|
4182
|
+
""
|
|
4183
|
+
].join("\n");
|
|
4184
|
+
}
|
|
4185
|
+
/**
|
|
4126
4186
|
* 运行时状态块 1) safe-mode(S134 v1.16.12):ON 时告知 agent(行为约束;机制仍由 guards 强制)。
|
|
4127
4187
|
* 文案与实现逐项对应(guards.ts):bash 禁用(restrict deny + decideGuard)、
|
|
4128
4188
|
* 黑名单路径拦截、CCC 治理文件保护;write/edit 等其余工具保留(受路径逃逸/黑名单约束)。
|
|
@@ -4232,6 +4292,7 @@ function serenitySystemPrompt(root, scope = DEFAULT_SESSION_SCOPE) {
|
|
|
4232
4292
|
const state = [safeModeBlock(root), localstoreBlock(root)].filter((b) => b !== "").join("\n");
|
|
4233
4293
|
if (state) parts.push(state);
|
|
4234
4294
|
parts.push(eapBlock());
|
|
4295
|
+
parts.push(metaphorBlock());
|
|
4235
4296
|
const skill = entrySkillSectionText(root);
|
|
4236
4297
|
if (skill) parts.push(skill);
|
|
4237
4298
|
const session = sessionBlock(root, scope);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.7",
|
|
4
4
|
"description": "宁静号 ACC harness — Native Cordis 插件(DeepSeek Harness 运行时)。真实 DSH 工具注册(cc_fs/session/acc_msm 等 9 工具)+ 拦截缝机械约束(safe-mode/路径守卫/会话落盘)+ 系统提示词注入(ACC/CCE/Constraints/SKILL/Session 五块)。适配 DSH 公开版(deepseek-ai/deepseek-harness 0.1.0-rc)。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|