@shgroup/dsh-serenity-hooks 1.18.8 → 1.19.0

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,8 +1,8 @@
1
1
  {
2
2
  "id": "dsh-serenity-hooks",
3
- "version": "1.18.8",
3
+ "version": "1.19.0",
4
4
  "main": "lib/index.js",
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 组织)。",
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": {
7
7
  "dsh": ">=0.1.0-rc.5"
8
8
  },
package/lib/index.js CHANGED
@@ -1684,15 +1684,6 @@ function qaCheck(root, key) {
1684
1684
  if (verified) lines.push(" • Session looks clean — no issues detected");
1685
1685
  return lines.join("\n");
1686
1686
  }
1687
- /** 追加会话心跳(turn-stopping 机械落盘用) */
1688
- function appendHeartbeat(sessionMd) {
1689
- try {
1690
- appendFileSync(sessionMd, `- ${(/* @__PURE__ */ new Date()).toISOString()} — [auto] turn heartbeat (dsh-serenity-hooks)\n`, "utf-8");
1691
- return true;
1692
- } catch {
1693
- return false;
1694
- }
1695
- }
1696
1687
  //#endregion
1697
1688
  //#region src/tools/session.ts
1698
1689
  /**
@@ -3816,22 +3807,6 @@ function registerBootstrap(ctx) {
3816
3807
  }, { prepend: true });
3817
3808
  }
3818
3809
  //#endregion
3819
- //#region src/seams/loop.ts
3820
- /** 解析当前 dsh 会话 scope 的活跃会话 SESSION.md 绝对路径;无标记/越界返回 null */
3821
- function resolveActiveSession(root, scope = DEFAULT_SESSION_SCOPE) {
3822
- return readActiveSessionMd(root, scope);
3823
- }
3824
- /** 注册 agent/turn-stopping:CCC 内活动会话自动心跳落盘(按 dsh 会话隔离) */
3825
- function registerTurnFlush(ctx) {
3826
- ctx.on("agent/turn-stopping", async (payload) => {
3827
- const agent = payload.agent;
3828
- const root = findSerenityRoot(agent.session?.header?.cwd ?? process.cwd());
3829
- if (!root) return;
3830
- const sessionMd = resolveActiveSession(root, agent.session?.id ?? "default");
3831
- if (sessionMd) appendHeartbeat(sessionMd);
3832
- });
3833
- }
3834
- //#endregion
3835
3810
  //#region src/seams/keeper.ts
3836
3811
  const SCORES = {
3837
3812
  write: 3,
@@ -4744,7 +4719,6 @@ const Config = z.object({
4744
4719
  serenityConfigPaths: z.array(z.string()).default([...DEFAULT_SERENITY_CONFIG_PATHS]),
4745
4720
  tools: z.boolean().default(true),
4746
4721
  guards: z.boolean().default(true),
4747
- turnFlush: z.boolean().default(true),
4748
4722
  keeper: z.boolean().default(true),
4749
4723
  keeperThreshold: z.number().default(150),
4750
4724
  context: z.boolean().default(true),
@@ -4768,7 +4742,6 @@ function apply(ctx, config) {
4768
4742
  ctx.tools.register(localstoreTool);
4769
4743
  }
4770
4744
  if (config.guards) registerGuards(ctx, { configPaths: config.serenityConfigPaths });
4771
- if (config.turnFlush) registerTurnFlush(ctx);
4772
4745
  if (config.keeper) registerKeeper(ctx, {
4773
4746
  configPaths: config.serenityConfigPaths,
4774
4747
  defaultThreshold: config.keeperThreshold
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.18.8",
3
+ "version": "1.19.0",
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": {