@shgroup/dsh-serenity-hooks 1.52.2 → 1.52.3

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.52.2",
3
+ "version": "1.52.3",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——13 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/ontology/handyman/localstore/container_admin;另三个 im-bridge/acc-diag/diagram 按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 轨迹日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.7-rc.1(deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
package/lib/index.js CHANGED
@@ -6588,14 +6588,25 @@ function isConcreteSkill(typeName, onto) {
6588
6588
  function getOntoSkillList(onto) {
6589
6589
  return Object.keys(onto.types || {}).filter((n) => isConcreteSkill(n, onto));
6590
6590
  }
6591
+ /**
6592
+ * 🔴 2026-10-11(v1.52.2):**注册表路径的唯一出口**。
6593
+ * 此前这条路径在 `cmdCompliance` 的文案里是对的、在 `loadMechRegistry` 里漏了 `references/`——
6594
+ * **同一事实写两遍就必然漂移**。⇒ 抽成一个函数,谁要用谁来取。
6595
+ */
6596
+ function mechRegistryPath(rootPath) {
6597
+ return join(rootPath, ".opencode", "skills", TOP_SKILL, "references", "mech-registry.json");
6598
+ }
6591
6599
  function loadMechRegistry(rootPath) {
6592
- const regPath = join(rootPath, ".opencode", "skills", TOP_SKILL, "references", "mech-registry.json");
6600
+ const regPath = mechRegistryPath(rootPath);
6593
6601
  if (!existsSync(regPath)) return {};
6594
6602
  try {
6595
6603
  const raw = JSON.parse(readFileSync(regPath, "utf-8"));
6596
- const entries = raw.msms || raw;
6604
+ const list = Array.isArray(raw) ? raw : raw.entries || raw.msms || [];
6597
6605
  const result = {};
6598
- for (const e of Array.isArray(entries) ? entries : Object.values(entries)) if (e.name) result[e.name] = { skill: e.skill || "" };
6606
+ for (const e of Array.isArray(list) ? list : Object.values(list)) if (e && typeof e === "object" && typeof e.name === "string") {
6607
+ const it = e;
6608
+ result[it.name] = { skill: it.skill || "" };
6609
+ }
6599
6610
  return result;
6600
6611
  } catch {
6601
6612
  return {};
@@ -6658,11 +6669,16 @@ function cmdVerify(args) {
6658
6669
  message: `MSM "${msmName}" registered under skill "${kebab}" but directory not found`
6659
6670
  });
6660
6671
  }
6661
- } else issues.push({
6672
+ } else if (!existsSync(mechRegistryPath(rootPath))) issues.push({
6662
6673
  check: "V3",
6663
6674
  severity: "info",
6664
6675
  message: "No mech-registry.json found — MSM registration check skipped (MSMs managed by ACC at runtime)"
6665
6676
  });
6677
+ else issues.push({
6678
+ check: "V3",
6679
+ severity: "error",
6680
+ message: `mech-registry.json exists at ${mechRegistryPath(rootPath)} but yielded 0 readable entries — MSM registration check **could not run**(这不是"没有文件",是"读了但读不出来")`
6681
+ });
6666
6682
  }
6667
6683
  if (runContinuity) {
6668
6684
  const sessionsDir = join(rootPath, "AGENT_SESSIONS");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.52.2",
3
+ "version": "1.52.3",
4
4
  "description": "宁静号 ACC harness(Native Cordis 插件)——给 DeepSeek Harness 装一个「AI 工作区」:13 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/ontology/handyman/localstore/container_admin;另三个 im-bridge/acc-diag/diagram 按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫/对外输出守卫)+ 工作日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.7-rc.1。",
5
5
  "license": "MIT",
6
6
  "repository": {