@shgroup/dsh-serenity-hooks 1.128.0 → 1.128.1

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.128.0",
3
+ "version": "1.128.1",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——14 个工具(container_fs/cognitive_trajectory/dashboard/container_git/msm/praxis/ontology/serenity-skill-creator/localstore/container_admin/browser_slot;另三个 im-bridge/diagram/reconstruct 按条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 认知轨迹日志与原地重建 + 网页登录入口/IM 桥/认知轨迹唤醒注册表 + 浏览器槽位管理(≤20 个独立 profile 的 Chrome 槽位,带占用归属与异常时向所属会话反向注入提醒)。轨迹声明 = 轨迹目录下的 trajectory.json(约束面 + 旧标识 uid + CRO 机器绑定 cro.host;旧名 trajectory-constraint.json / skiff.json 仍在读取族里);轨迹提示词 = 轨迹目录下的 PROMPT.md(一条轨迹「是谁、按什么章程工作」,所有轨迹通用,追加在容器层与质量层之后,不替换它们)。适配 DSH 0.1.7-rc.1 / 0.2.0-rc.1 / 0.2.1-rc.1(三档,deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
package/lib/index.js CHANGED
@@ -4,7 +4,7 @@ import { a as findSerenityRoot$1, d as readCccName, g as resolveInside, l as pat
4
4
  import { A as useSession, C as resolveSessionByTitle, D as showSession, E as setActiveSessionInfo, F as isoLocal, I as localFileStamp, M as TRAJECTORY_LEGACY_FILENAMES, O as summarize, S as readTrajectoryUid, T as sessionsRoot, _ as listSessions, b as parseTrajectoryCode, c as UID_FILENAME, d as createSession, f as extractSessionMdPathFromText, j as TRAJECTORY_FILENAME, k as trajectoryDescOf, l as archiveSession, m as getActiveSessionInfo, o as COGNITIVE_TRAJECTORY_ACTIONS, p as findSession, u as clearActiveSessionInfo, v as namingTitleFor, w as sessionEvents, y as parseSessionContextFromEvents } from "./bind-file-B0TuOP89.js";
5
5
  import { n as checkLocalstoreGitCompliance, o as readStore, s as runLocalStore, t as LOCALSTORE_SCOPES } from "./service-BRUHmVFn.js";
6
6
  import { d as findPackageRoot, i as constraintSystemPromptSource, l as resolveConstraintSystemPrompt, r as constraintCognitiveTrajectory, t as TRAJECTORY_CONSTRAINT_HINT, u as ACC_VERSION } from "./rules-BYeykzys.js";
7
- import { C as runMsmAsync, S as runMsm, T as setWeixinSendEndpoint, _ as ACC_CATALOG, a as loadOpencodeSkill, b as findEntry, c as summarizeHostContract, f as forgetNonCccToolVisibility, g as forgetToolVisibility, h as syncToolVisibility, i as listOpencodeSkillDirs, m as registerGuards, n as readDshVersion, o as compareSemver, r as setSafeMode, s as hostContractReport, t as getStatus, v as CCC_CONFIG_REFERENCE, w as docsPointer, x as loadMsmEntries } from "./status-O7MPoKFy.js";
7
+ import { C as runMsmAsync, S as runMsm, T as setWeixinSendEndpoint, _ as ACC_CATALOG, a as loadOpencodeSkill, b as findEntry, c as summarizeHostContract, f as forgetNonCccToolVisibility, g as forgetToolVisibility, h as syncToolVisibility, i as listOpencodeSkillDirs, m as registerGuards, n as readDshVersion, o as compareSemver, r as setSafeMode, s as hostContractReport, t as getStatus, v as CCC_CONFIG_REFERENCE, w as docsPointer, x as loadMsmEntries } from "./status-thzfjL_4.js";
8
8
  import { c as replacesDefaultIdentity, i as listTrajectoryConstraints, l as trajectoryCodeForSession, n as findDirNameByCode, o as readTrajectoryConstraintAt, r as isTrajectoryConstrained, s as readTrajectoryConstraintByCode, t as TRAJECTORY_CONSTRAINT_FILENAME } from "./profile-DpxC9HtB.js";
9
9
  import { A as TRAJECTORY_PROMPT_FILENAME, C as recordToolUsage, D as buildResourceNameSuffix, E as buildResourceIndex, O as isSafeSkillName, S as verifyTotpCode, T as SKILL_ONTOLOGY_FILE, _ as projectKnownWorkspaces, a as trajectoryConstraintFor, b as FACE_PORTS, c as trajectoryWorkspaceMdPath, d as splitModel, f as registerCognitiveTrajectorySkillSection, g as migrateLegacyLocalstore, h as applyWirePatch, i as getTrajectoryAgent, j as hasTrajectoryPrompt, k as truncateContent, l as unregisterTrajectorySession, m as registerEntrySkillSectionGlobal, n as deliverToTrajectory, o as trajectoryConstraintMsmGate, p as registerEntrySkillSection, r as ensureWorkspacePromptSection, s as trajectoryConstraintParticipates, t as createTrajectoryAgent, u as workspaceCognitiveTrajectoryLine, v as readAdvancedSettings, w as REFERENCE_DIR, x as MECHANISM_PORTS, y as toWire } from "./session-B5CKVEIF.js";
10
10
  import { a as ACC_MESSAGE_KIND, d as readLastBound, f as resolveSessionCognitiveTrajectoryLabel, i as toMessage, l as findTrajectoryOfSession, n as deliver, o as PLUGIN_SOURCE, r as makeInjection, s as appendBound, u as listBoundSessionIds } from "./injection-CKx49Mlf.js";
@@ -515,7 +515,7 @@ const KIT_ACTIONS = [
515
515
  async function runKit(root, args, hostCtx) {
516
516
  switch (args.action) {
517
517
  case "health": {
518
- const { containerStatus } = await import("./observation-jNfDH9lC.js");
518
+ const { containerStatus } = await import("./observation-ryu83rOe.js");
519
519
  const s = containerStatus({
520
520
  root,
521
521
  hostCtx
@@ -561,7 +561,7 @@ async function runKit(root, args, hostCtx) {
561
561
  }
562
562
  case "diag": {
563
563
  if (hostCtx === void 0) throw new Error("diag requires the plugin context (live session data unavailable without it)");
564
- const { runDiag, renderDiag } = await import("./service-BGwhex36.js");
564
+ const { runDiag, renderDiag } = await import("./service-CTD39Kby.js");
565
565
  return renderDiag(await runDiag(hostCtx, root ?? ""));
566
566
  }
567
567
  default: throw new Error(`Unknown action: ${args.action}`);
@@ -1,6 +1,6 @@
1
1
  import { d as readCccName, i as findGitRoot, l as pathInside, s as loadSerenityConfig, t as DEFAULT_SERENITY_CONFIG_PATHS } from "./ccc-DSMqTrRU.js";
2
2
  import { u as ACC_VERSION } from "./rules-BYeykzys.js";
3
- import { n as readDshVersion, s as hostContractReport, y as checkRegistryQuality } from "./status-O7MPoKFy.js";
3
+ import { n as readDshVersion, s as hostContractReport, y as checkRegistryQuality } from "./status-thzfjL_4.js";
4
4
  import { a as wakeSchedulerState, y as listWakes } from "./scheduler-CgjLs5_S.js";
5
5
  import { resolve } from "node:path";
6
6
  import { existsSync, readFileSync, statSync } from "node:fs";
@@ -4,7 +4,7 @@ import { F as isoLocal, w as sessionEvents } from "./bind-file-B0TuOP89.js";
4
4
  import { _ as WAKE_CATCH_UP_MS, h as listCroCognitiveTrajectories } from "./scheduler-CgjLs5_S.js";
5
5
  import { n as readSimpleSettings } from "./settings-CUabGkal.js";
6
6
  import { i as subscriptionStats, r as subscriptionEval } from "./subscriptions-C4oGjnC2.js";
7
- import { containerClocks, containerWakes } from "./observation-jNfDH9lC.js";
7
+ import { containerClocks, containerWakes } from "./observation-ryu83rOe.js";
8
8
  //#region src/trajectory/live.ts
9
9
  /**
10
10
  * trajectory/live.ts — 进程内 live 会话取数 + 精简诊断
@@ -632,7 +632,12 @@ function checkRegistryQuality(root) {
632
632
  detail: "no main() guard"
633
633
  });
634
634
  }
635
- for (const f of e.flags ?? []) if ("name" in f && /path|file|dir/i.test(f.name) && f.type !== "path") issues.push({
635
+ const isPathLikeFlagName = (name) => {
636
+ if (name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().split(/[-_.]+/).filter(Boolean).some((s) => PATH_LIKE_SEGMENTS.has(s))) return true;
637
+ if (EXEMPT_FROM_PATH_SUFFIX.has(name.toLowerCase())) return false;
638
+ return PATH_LIKE_SUFFIXES.some((suf) => name.toLowerCase().endsWith(suf));
639
+ };
640
+ for (const f of e.flags ?? []) if ("name" in f && isPathLikeFlagName(String(f.name)) && f.type !== "path") issues.push({
636
641
  name: e.name,
637
642
  check: "M4",
638
643
  detail: `flag --${f.name} should be type:"path"`
@@ -643,6 +648,33 @@ function checkRegistryQuality(root) {
643
648
  issues
644
649
  };
645
650
  }
651
+ /**
652
+ * 构成"路径型"的**整段**词。
653
+ * ⛔ 不要往里加 `profile` / `file` 之外的模糊词 —— 这份集合的每一次扩写都必须能说出
654
+ * "哪个 flag 因为它被正确识别了",否则它就只是在制造假阳。
655
+ */
656
+ const PATH_LIKE_SEGMENTS = /* @__PURE__ */ new Set([
657
+ "path",
658
+ "file",
659
+ "dir",
660
+ "folder",
661
+ "directory"
662
+ ]);
663
+ /**
664
+ * 连写形式(`outfile` / `indir` / `outpath`)的判据 = **词尾**。
665
+ * ⛔ 不加 `profile`:它以 `file` 结尾,但那个 flag 是**名字**不是路径。
666
+ * ⇒ 这一条正是本判据此前的假阳来源;把它排除在此,而不是把 profile 硬标成 path。
667
+ */
668
+ const PATH_LIKE_SUFFIXES = [
669
+ "file",
670
+ "path",
671
+ "dir"
672
+ ];
673
+ /**
674
+ * 名字以路径词结尾、但**语义上不是路径**的 flag(点名例外)。
675
+ * 每加一项都要能说出"为什么它不是路径",否则就是拿例外掩盖假阳。
676
+ */
677
+ const EXEMPT_FROM_PATH_SUFFIX = /* @__PURE__ */ new Set(["profile"]);
646
678
  function registryPathFor(root, _skill) {
647
679
  const cccName = readCccName(root) ?? "unknown";
648
680
  return join(root, ".opencode", "skills", cccName, "references", "mech-registry.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.128.0",
3
+ "version": "1.128.1",
4
4
  "description": "宁静号 ACC harness(Native Cordis 插件)——给 DeepSeek Harness 装一个「AI 工作区」:14 个工具(container_fs/cognitive_trajectory/dashboard/container_git/msm/praxis/ontology/serenity-skill-creator/localstore/container_admin/browser_slot;另三个 im-bridge/diagram/reconstruct 按条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫/对外输出守卫)+ 认知轨迹日志与原地重建 + 网页登录入口/IM 桥/认知轨迹唤醒注册表 + 浏览器槽位管理(≤20 个独立 profile 的 Chrome 槽位,带占用归属与异常时向所属会话反向注入提醒)。轨迹声明 = 轨迹目录下的 trajectory.json(约束面 + 旧标识 uid + CRO 机器绑定 cro.host;旧名 trajectory-constraint.json / skiff.json 仍在读取族里);轨迹提示词 = 轨迹目录下的 PROMPT.md(一条轨迹「是谁、按什么章程工作」,所有轨迹通用,追加在容器层与质量层之后,不替换它们)。适配 DSH 0.1.7-rc.1 / 0.2.0-rc.1 / 0.2.1-rc.1(三档)。",
5
5
  "license": "MIT",
6
6
  "repository": {