@shgroup/dsh-serenity-hooks 1.16.10 → 1.16.11

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.16.10",
3
+ "version": "1.16.11",
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
@@ -3009,14 +3009,15 @@ const PLUGIN_SOURCE = {
3009
3009
  plugin: "dsh-serenity-hooks"
3010
3010
  };
3011
3011
  /**
3012
- * ACC 注入消息:完整内容 = 简短身份头 + 完整系统提示词(ACC 5 + CCC 顶层 skill 原文)。
3013
- * 用户要求:在此处注入完整 ACC 系统提示词内容 + CCC 顶层 skill 原文(对齐 osp system.transform)。
3014
- * scope = dsh 会话 id:Session 块按会话隔离,不跨会话泄露。
3012
+ * ACC 注入消息(S134 去重):**只含简短身份锚点**([ACC] 已激活 + CCC + 约束 + loop 模型 + Phase 2)。
3013
+ * 完整身份(ACC 5 + CCE + Constraints + EAP + SKILL 全文 + Session 块)由**系统提示词层**
3014
+ * (systemPrompt.section,每轮 prompt 装配自动注入,含 subagent)承担——对话消息流/压缩重注入
3015
+ * 不再重复注入同一内容(token 双倍浪费,见 S134 注入方案梳理)。
3015
3016
  */
3016
- function accMessage(root, configPaths, entrySkillMaxChars, scope = DEFAULT_SESSION_SCOPE) {
3017
+ function accMessage(root, configPaths, entrySkillMaxChars) {
3017
3018
  const content = [{
3018
3019
  type: "text",
3019
- text: `${accIdentityText(root, configPaths, entrySkillMaxChars)}\n\n${serenitySystemPrompt(root, scope)}`
3020
+ text: accIdentityText(root, configPaths, entrySkillMaxChars)
3020
3021
  }];
3021
3022
  return createUserMessage({
3022
3023
  content,
@@ -3063,7 +3064,7 @@ function registerContext(ctx, opts = {}) {
3063
3064
  } catch {}
3064
3065
  if (injected.has(key)) return;
3065
3066
  injected.add(key);
3066
- agent.inject(accMessage(root, configPaths, entrySkillMaxChars, agentScope(agent)));
3067
+ agent.inject(accMessage(root, configPaths, entrySkillMaxChars));
3067
3068
  syncSafeModeRestriction(agent, root);
3068
3069
  };
3069
3070
  if (opts.seedOnStart ?? true) ctx.on("agent/session-start", (payload) => {
@@ -3087,7 +3088,7 @@ function registerContext(ctx, opts = {}) {
3087
3088
  return {
3088
3089
  kind: "enter",
3089
3090
  messages: [
3090
- accMessage(root, configPaths, entrySkillMaxChars, agentScope(agent)),
3091
+ accMessage(root, configPaths, entrySkillMaxChars),
3091
3092
  ...messages,
3092
3093
  ...downstream.messages
3093
3094
  ]
@@ -3110,9 +3111,8 @@ function registerCompactRetention(ctx, opts = {}) {
3110
3111
  if (!agent) return;
3111
3112
  const root = findSerenityRoot(agent.session?.header?.cwd ?? process.cwd());
3112
3113
  if (!root) return;
3113
- const scope = agent.session?.id ?? "default";
3114
3114
  try {
3115
- agent.inject(accMessage(root, configPaths, entrySkillMaxChars, scope));
3115
+ agent.inject(accMessage(root, configPaths, entrySkillMaxChars));
3116
3116
  } catch {}
3117
3117
  });
3118
3118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.16.10",
3
+ "version": "1.16.11",
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": {