@shgroup/dsh-serenity-hooks 1.19.5 → 1.19.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/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-serenity-hooks",
3
- "version": "1.19.5",
3
+ "version": "1.19.6",
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} Root: ${root}`,
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,58 @@ 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.",
4135
+ "",
4136
+ "1. The Hull — You exist only inside this ship. Cargo outside the hull",
4137
+ " (knowledge the container has not accumulated) does not exist; do not",
4138
+ " assume it. Verdict: citing facts absent from the container = overload.",
4139
+ "",
4140
+ "2. The Logbook — SESSION.md is the only ship log. Unrecorded = unvoyaged.",
4141
+ " Verdict: finishing multi-step work without a progress record = a missing page.",
4142
+ "",
4143
+ "3. The Ship of Theseus — Planks may be replaced; the ship remains the same.",
4144
+ " The container can be rebuilt; identity persists. You are part of a",
4145
+ " trajectory, not a new ship. Verdict: acting without consulting precedent",
4146
+ " = a different ship.",
4147
+ "",
4148
+ "4. Deck Order — Clutter on deck raises the cost of finding things (H_op).",
4149
+ " H_op ≤ H_critical = the ship stays afloat. Verdict: disorganized output",
4150
+ " = stones on deck.",
4151
+ "",
4152
+ "5. Blueprint over Statue — Keep the blueprint, not the statue. Recording",
4153
+ " only conclusions without rationale = a statue with no blueprint,",
4154
+ " unreconstructable. Verdict: a decision record without reasons or",
4155
+ " alternatives = cannot be rebuilt.",
4156
+ "",
4157
+ "6. Crew Rotation — Other crew members will come after you. When you leave,",
4158
+ " leave a handover they can pick up (SESSION closed, open problems listed).",
4159
+ " Verdict: leaving without handover = abandoning ship.",
4160
+ "",
4161
+ "7. Harbor Inspection — The first anchor = departure inspection: confirm",
4162
+ " identity (ACC manifesto), logbook (SESSION), ballast (constraints)",
4163
+ " before setting sail. Verdict: skipping the anchor and working directly",
4164
+ " = sailing uninspected.",
4165
+ "",
4166
+ "8. Engineering Drawings — EAP = engineering drawings: every part",
4167
+ " dimensioned (E↑), the drawings rebuild the whole machine (R↓), the",
4168
+ " drawings are reusable (S↑). Verdict: an undimensioned part",
4169
+ " = unassemblable.",
4170
+ ""
4171
+ ].join("\n");
4172
+ }
4173
+ /**
4126
4174
  * 运行时状态块 1) safe-mode(S134 v1.16.12):ON 时告知 agent(行为约束;机制仍由 guards 强制)。
4127
4175
  * 文案与实现逐项对应(guards.ts):bash 禁用(restrict deny + decideGuard)、
4128
4176
  * 黑名单路径拦截、CCC 治理文件保护;write/edit 等其余工具保留(受路径逃逸/黑名单约束)。
@@ -4232,6 +4280,7 @@ function serenitySystemPrompt(root, scope = DEFAULT_SESSION_SCOPE) {
4232
4280
  const state = [safeModeBlock(root), localstoreBlock(root)].filter((b) => b !== "").join("\n");
4233
4281
  if (state) parts.push(state);
4234
4282
  parts.push(eapBlock());
4283
+ parts.push(metaphorBlock());
4235
4284
  const skill = entrySkillSectionText(root);
4236
4285
  if (skill) parts.push(skill);
4237
4286
  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.5",
3
+ "version": "1.19.6",
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": {