@shgroup/dsh-serenity-hooks 1.137.3 → 1.137.5

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.137.3",
3
+ "version": "1.137.5",
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": {
@@ -235,7 +235,7 @@ async function listCccs(ctx, opts = {}) {
235
235
  if (typeof defaultRoot === "string" && defaultRoot !== "" && !c.roots.includes(defaultRoot)) c.roots.unshift(defaultRoot);
236
236
  let rolesOf = null;
237
237
  if (opts.withRoles === true) {
238
- const { listTrajectoryConstraints } = await import("./profile-RuvXAGBX.js").then((n) => n.a);
238
+ const { listTrajectoryConstraints } = await import("./profile-CRcW3ifg.js").then((n) => n.a);
239
239
  rolesOf = (root) => {
240
240
  try {
241
241
  return listTrajectoryConstraints(root).map((p) => p.code);
package/lib/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { i as __toESM, n as __exportAll } from "./rolldown-runtime-B4iAMlE-.js";
2
- import { d as hostSessions, f as hostSettings, i as cccRootForExec, m as hostWebServer, n as agentCwdFor, o as listCccs, p as hostWeb, r as cccRootForCwd, t as NO_CCC_FROM_AGENT_CWD, u as hostService } from "./ccc-roots-Bg4Eq2X3.js";
2
+ import { d as hostSessions, f as hostSettings, i as cccRootForExec, m as hostWebServer, n as agentCwdFor, o as listCccs, p as hostWeb, r as cccRootForCwd, t as NO_CCC_FROM_AGENT_CWD, u as hostService } from "./ccc-roots-B6dJON2X.js";
3
3
  import { a as findSerenityRoot$1, d as readCccName, g as resolveInside, l as pathInside, m as readUserQuotesEnabled, p as readTrajectorySubscriptions, s as loadSerenityConfig, t as DEFAULT_SERENITY_CONFIG_PATHS } from "./ccc-DSMqTrRU.js";
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, 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-Dy6Qmm7z.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
7
  import { a as loadMsmEntries, c as docsPointer, i as findEntry, l as setWeixinSendEndpoint, n as CCC_CONFIG_REFERENCE, o as runMsm, s as runMsmAsync, t as ACC_CATALOG } from "./service-DF23HvHY.js";
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-RuvXAGBX.js";
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-BUyOHV12.js";
10
- import { 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-BVKPD4Yf.js";
11
- import { c as buildCroSnapshot, d as WAKE_CATCH_UP_MS, f as addWake, i as sendToCognitiveTrajectory, n as registerWakeScheduler, o as registerCroTurnTracking, s as registerDisposer, t as createAndBindTarget, u as CARRIER_OPENING_MARK } from "./scheduler-DMF2hKeT.js";
12
- import { i as hostAliveProbe, n as readSimpleSettings, r as registerSettingsSection } from "./settings-zIGSzPPG.js";
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-CRcW3ifg.js";
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-Bi6owHoL.js";
10
+ import { 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-ME-aoZVl.js";
11
+ import { c as buildCroSnapshot, d as WAKE_CATCH_UP_MS, f as addWake, i as sendToCognitiveTrajectory, n as registerWakeScheduler, o as registerCroTurnTracking, s as registerDisposer, t as createAndBindTarget, u as CARRIER_OPENING_MARK } from "./scheduler-pOtONqPy.js";
12
+ import { i as hostAliveProbe, n as readSimpleSettings, r as registerSettingsSection } from "./settings-YC-csZus.js";
13
13
  import { a as readFeishuCredential, c as readWeixinSettings, d as weixinInboundDir, f as weixinSessionIdForTrajectory, i as matchWeixinRoute, n as extractWeixinText, r as hasVoiceItem, s as readWeixinCredential, t as extractWeixinMedia, u as sanitizeFileName$1 } from "./route-DcUo9alz.js";
14
14
  import { i as runImBridge, n as isImWiredTrajectory, r as registerImChannel, t as imChannelIds } from "./channels-Covd8vLQ.js";
15
- import { a as loadOpencodeSkill, 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 } from "./status-8oXxyBw6.js";
16
- import { a as ACK_PREFIX, c as eventToken, i as resolveSessionMdPath, l as DEFAULT_FAKE_INITIAL_MESSAGES, o as ASSISTANT_PREFIX, r as registerRebuildTurnHook, s as LOG_FILE_REL, t as buildRebuildAnchor, u as registerBootstrap } from "./rebuild-zCm04DGI.js";
17
- import { i as subscriptionStats, n as registerTrajectorySubscriptions, r as subscriptionEval, t as defaultSubscriptionDeps } from "./subscriptions-DLLyoLSW.js";
15
+ import { a as loadOpencodeSkill, 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 } from "./status-BwfDsakn.js";
16
+ import { a as ACK_PREFIX, c as eventToken, i as resolveSessionMdPath, l as DEFAULT_FAKE_INITIAL_MESSAGES, o as ASSISTANT_PREFIX, r as registerRebuildTurnHook, s as LOG_FILE_REL, t as buildRebuildAnchor, u as registerBootstrap } from "./rebuild-BjOT8IDK.js";
17
+ import { i as subscriptionStats, n as registerTrajectorySubscriptions, r as subscriptionEval, t as defaultSubscriptionDeps } from "./subscriptions-DBoO0GSO.js";
18
18
  import { c as sendTextMessage, i as getUpdates, l as sendTyping, n as downloadMedia, o as markdownToPlainText, r as getConfig, s as sendFileMessage, t as TypingStatus, u as sniffImageExt } from "./ilink-CsZ-f64q.js";
19
19
  import { a as registerImAccountImpl, i as normalizeAccountChannel, n as getImAccountImpl, r as imAccountChannels } from "./accounts-BHQbakUh.js";
20
20
  import { createRequire } from "node:module";
@@ -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-BIpcL_F3.js");
518
+ const { containerStatus } = await import("./observation-DiD_yJjS.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-TiJlHI6n.js");
564
+ const { runDiag, renderDiag } = await import("./service-mYmQXFFT.js");
565
565
  return renderDiag(await runDiag(hostCtx, root ?? ""));
566
566
  }
567
567
  default: throw new Error(`Unknown action: ${args.action}`);
@@ -6668,7 +6668,7 @@ function createCognitiveTrajectoryTool(ctx) {
6668
6668
  };
6669
6669
  }
6670
6670
  } catch {}
6671
- const { queueRebuild } = await import("./rebuild-zCm04DGI.js").then((n) => n.n);
6671
+ const { queueRebuild } = await import("./rebuild-BjOT8IDK.js").then((n) => n.n);
6672
6672
  const result = await queueRebuild(ctx, {
6673
6673
  root,
6674
6674
  note: args.note,
@@ -6909,9 +6909,17 @@ becomes a 轨迹约束; delete it and it goes back to being an ordinary trajecto
6909
6909
  "writes": ["AGENT_SESSIONS/<我的目录>/"], // optional; **不写 = 不收窄**。显式 [] = 一个写都落不下
6910
6910
  "cognitiveTrajectory": { "session": true, "keeper": true, "rebuild": true }, // 缺省 TRUE(见下)
6911
6911
  "resident": { "serves": "..." }, // optional; 对外用途自述(见 trajectory-self 章)
6912
- "cro": { "host": "<machine name>" } // optional: which machine may run this trajectory's CRO program
6912
+ "cro": { "host": "<machine name>" },// optional: which machine may run this trajectory's CRO program
6913
+ "prompt": { "injection": "replace", "replaces": ["metaphor","cce"] } // optional; 注入面(见下)
6913
6914
  }
6914
6915
 
6916
+ 🔴 **\`prompt\` 是「替换面」,不属于上面的限制面**(2026-11-17 补写,此前只在代码里存在):
6917
+ 它决定**哪些 ACC 注入块被本轨迹自己的 PROMPT.md 取代**。
6918
+ · \`injection\`:\`"replace"\` = 用 PROMPT.md 整体取代 \`replaces\` 列出的那些块;
6919
+ · \`replaces\`:块名列表(例 \`["metaphor","cce"]\`)。
6920
+ 🔴 **身份块(\`=== Serenity ACC ===\`)刻意不可替换** —— 那是容器的身份,换掉它就不再是同一个容器。
6921
+ 判据与允许清单的唯一真相源 = \`trajectory/prompt-injection.ts\`(此处不重复抄)。
6922
+
6915
6923
  🔴 **所有 key 都是可选的:不写 = 不设定 = 不影响默认行为**(owner 2026-10-20 裁决)。
6916
6924
  ⛔ **"没写" ≠ "写了空数组"**:\`"tools": []\` 是"我一个都不给"(除 \`skill\` 外全隐藏);
6917
6925
  **不写 \`tools\`** 是"不收窄"。这两者在旧版被混成同一个意思,害人把自己锁死过。
@@ -9694,7 +9702,7 @@ function registerStatusApi(ctx, opts = {}) {
9694
9702
  });
9695
9703
  }
9696
9704
  const { saveWeixinRoutes } = await import("./route-DcUo9alz.js").then((n) => n.l);
9697
- const { findDirNameByCode } = await import("./profile-RuvXAGBX.js").then((n) => n.a);
9705
+ const { findDirNameByCode } = await import("./profile-CRcW3ifg.js").then((n) => n.a);
9698
9706
  for (const r of routes) if (findDirNameByCode(root, r.trajectory) === null) {
9699
9707
  sendJson$2(res, 400, { error: `unknown trajectory: ${r.trajectory} (no such trajectory code in ${root})` });
9700
9708
  return;
@@ -14145,7 +14153,7 @@ const MEDIA_MAX_BYTES = 20971520;
14145
14153
  */
14146
14154
  async function resolveCccRootByAlias(ctx, alias) {
14147
14155
  try {
14148
- const { listCccs } = await import("./ccc-roots-Bg4Eq2X3.js").then((n) => n.a);
14156
+ const { listCccs } = await import("./ccc-roots-B6dJON2X.js").then((n) => n.a);
14149
14157
  const entries = await listCccs(ctx);
14150
14158
  const byName = entries.find((e) => e.name === alias);
14151
14159
  if (byName) return byName.root;
@@ -14213,7 +14221,7 @@ async function resolveInboundTarget(ctx, input) {
14213
14221
  });
14214
14222
  return null;
14215
14223
  }
14216
- const { findDirNameByCode } = await import("./profile-RuvXAGBX.js").then((n) => n.a);
14224
+ const { findDirNameByCode } = await import("./profile-CRcW3ifg.js").then((n) => n.a);
14217
14225
  if (findDirNameByCode(root, target.role) === null) {
14218
14226
  const detail = `目标 CCC "${target.ccc}" 内没有编码为 "${target.role}" 的认知轨迹`;
14219
14227
  console.error(`[serenity-hooks] ✗ human-channel: ${detail}(account=${input.account} user=${input.user})—— 该消息**未投递**,请改订阅表里的目标编码`);
@@ -15223,7 +15231,7 @@ function syncHumanChannel(ctx) {
15223
15231
  (async () => {
15224
15232
  try {
15225
15233
  stopMachineLoops();
15226
- const { listCccs } = await import("./ccc-roots-Bg4Eq2X3.js").then((n) => n.a);
15234
+ const { listCccs } = await import("./ccc-roots-B6dJON2X.js").then((n) => n.a);
15227
15235
  for (const entry of await listCccs(ctx)) syncCccBridge(ctx, entry.root);
15228
15236
  } catch {}
15229
15237
  })();
@@ -15516,7 +15524,7 @@ function matchCcc(input, candidates) {
15516
15524
  }
15517
15525
  /** 组装候选列表(`ccc-roots.listCccs` 投影 + `.serenity` 名;动态 import 保持本模块静态依赖轻量) */
15518
15526
  async function collectCandidates(ctx) {
15519
- const { listCccs } = await import("./ccc-roots-Bg4Eq2X3.js").then((n) => n.a);
15527
+ const { listCccs } = await import("./ccc-roots-B6dJON2X.js").then((n) => n.a);
15520
15528
  const entries = await listCccs(ctx, { defaultRoot: process.cwd() });
15521
15529
  const seen = /* @__PURE__ */ new Set();
15522
15530
  const out = [];
@@ -1,4 +1,4 @@
1
- import { r as cccRootForCwd } from "./ccc-roots-Bg4Eq2X3.js";
1
+ import { r as cccRootForCwd } from "./ccc-roots-B6dJON2X.js";
2
2
  import { T as sessionsRoot, a as readBindDeclaration, b as parseTrajectoryCode, h as getLastActiveSessionInfo, i as listBindDeclarations, m as getActiveSessionInfo, n as findTrajectoryHolding, r as isBindUsable, t as claimBinding, w as sessionEvents } from "./bind-file-Dy6Qmm7z.js";
3
3
  import { join } from "node:path";
4
4
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
@@ -1,8 +1,8 @@
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
3
  import { r as checkRegistryQuality } from "./service-DF23HvHY.js";
4
- import { a as wakeSchedulerState, p as listWakes } from "./scheduler-DMF2hKeT.js";
5
- import { n as readDshVersion, s as hostContractReport } from "./status-8oXxyBw6.js";
4
+ import { a as wakeSchedulerState, p as listWakes } from "./scheduler-pOtONqPy.js";
5
+ import { n as readDshVersion, s as hostContractReport } from "./status-BwfDsakn.js";
6
6
  import { resolve } from "node:path";
7
7
  import { existsSync, readFileSync, statSync } from "node:fs";
8
8
  //#region src/surface/observation.ts
@@ -245,10 +245,43 @@ function findDirNameByCode(root, code) {
245
245
  * @returns 约束面;不是 轨迹约束会话 → `null`
246
246
  */
247
247
  function trajectoryConstraintForSession(root, sessionId, boundDirName) {
248
- const dirName = boundDirName ?? registeredDirName(sessionId);
248
+ const dirName = boundDirName ?? resolveDirNameForSession(root, sessionId);
249
249
  if (dirName === null || dirName === "") return null;
250
250
  return readTrajectoryConstraintAt(join(sessionsRoot(root), dirName), root);
251
251
  }
252
+ /**
253
+ * **会话 → 轨迹目录名**(两来源并取,本文件内唯一入口)。
254
+ *
255
+ * 🔴🔴 **2026-11-17 真机缺陷(某条长期存活轨迹拿到白名单外的工具)—— 这一格曾经只取 ①**:
256
+ *
257
+ * 旧实现是 `boundDirName ?? registeredDirName(sessionId)` —— **只读进程内内存表**
258
+ * (`policy/window.ts` 的 `trajectorySessions`)。而 `window.ts` 的文件头**逐字承诺**
259
+ * 「两个来源并取,都不中才判不是」,`trajectoryCodeForSession` 也是照那条承诺写的
260
+ * ⇒ **只有本函数漏了 ②**。后果不是"少一条兜底",是**权限面静默松开**:
261
+ *
262
+ * | 步 | 发生什么 |
263
+ * |---|---|
264
+ * | 1 | 宿主进程重启(每次发版装机会发生)⇒ 内存 Map 清空 |
265
+ * | 2 | `registerTrajectorySession` 全仓**只有一处调用**(`trajectory/session.ts:374`,建/恢复轨迹会话时) |
266
+ * | 3 | **长期存活**的载体会话没有任何路径重新登记它 |
267
+ * | 4 | 本函数返回 `null` ⇒ `computeVisibilitySources` 第 ⑥ 源贡献 `deny: []` |
268
+ * | 5 | **工具白名单整个不生效**,模型看得到全部工具 |
269
+ *
270
+ * 而这一点在当时**没有任何读数信号**:诊断 Map 也是空的,配置读起来完全正确。
271
+ * ⇒ 判据:**任何"内存 + 持久"双来源的设计,两处都必须真的取两个**;
272
+ * 只写在一处的注释不能替代另一处的实现(D151 同族:文档承诺与实现脱节)。
273
+ *
274
+ * @returns 轨迹目录名;两来源都不中 ⇒ `null`(= 这条会话不属任何轨迹)
275
+ */
276
+ function resolveDirNameForSession(root, sessionId) {
277
+ const fromMemory = registeredDirName(sessionId);
278
+ if (fromMemory !== null && fromMemory !== "") return fromMemory;
279
+ if (typeof sessionId !== "string" || sessionId === "") return null;
280
+ try {
281
+ for (const { dirName, decl } of listBindDeclarations(sessionsRoot(root))) if (decl.sessionId === sessionId) return dirName;
282
+ } catch {}
283
+ return null;
284
+ }
252
285
  /** 内存登记的轨迹目录名(注册表单一真相源在 `./registry.ts`;此处只做一次转发) */
253
286
  function registeredDirName(sessionId) {
254
287
  if (typeof sessionId !== "string" || sessionId === "") return null;
@@ -1,9 +1,9 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.js";
2
- import { n as agentCwdFor, r as cccRootForCwd, u as hostService } from "./ccc-roots-Bg4Eq2X3.js";
2
+ import { n as agentCwdFor, r as cccRootForCwd, u as hostService } from "./ccc-roots-B6dJON2X.js";
3
3
  import { F as isoLocal, b as parseTrajectoryCode, f as extractSessionMdPathFromText, m as getActiveSessionInfo, v as namingTitleFor, w as sessionEvents, y as parseSessionContextFromEvents } from "./bind-file-Dy6Qmm7z.js";
4
- import { c as replacesDefaultIdentity } from "./profile-RuvXAGBX.js";
5
- import { a as trajectoryConstraintFor } from "./session-BUyOHV12.js";
6
- import { a as ACC_MESSAGE_KIND, d as readLastBound, n as deliver, r as makeInjection, s as appendBound } from "./injection-BVKPD4Yf.js";
4
+ import { c as replacesDefaultIdentity } from "./profile-CRcW3ifg.js";
5
+ import { a as trajectoryConstraintFor } from "./session-Bi6owHoL.js";
6
+ import { a as ACC_MESSAGE_KIND, d as readLastBound, n as deliver, r as makeInjection, s as appendBound } from "./injection-ME-aoZVl.js";
7
7
  import { basename, dirname, join, resolve } from "node:path";
8
8
  import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from "node:fs";
9
9
  import { deriveEventMessage } from "@deepseek-ai/dsh-session";
@@ -1,10 +1,10 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.js";
2
- import { c as hostAgents, o as listCccs, u as hostService } from "./ccc-roots-Bg4Eq2X3.js";
2
+ import { c as hostAgents, o as listCccs, u as hostService } from "./ccc-roots-B6dJON2X.js";
3
3
  import { g as resolveInside } from "./ccc-DSMqTrRU.js";
4
4
  import { F as isoLocal, L as localHuman, P as readTrajectoryFile, R as localIdStamp, T as sessionsRoot, b as parseTrajectoryCode, j as TRAJECTORY_FILENAME, k as trajectoryDescOf, p as findSession, v as namingTitleFor } from "./bind-file-Dy6Qmm7z.js";
5
- import { c as carrierState, i as toMessage, n as deliver, r as makeInjection, s as appendBound, t as assertInjection, u as listBoundSessionIds } from "./injection-BVKPD4Yf.js";
5
+ import { c as carrierState, i as toMessage, n as deliver, r as makeInjection, s as appendBound, t as assertInjection, u as listBoundSessionIds } from "./injection-ME-aoZVl.js";
6
6
  import { i as sessionsRootDir, n as findSessionLog } from "./cleanup-CPl1SSaK.js";
7
- import { i as hostAliveProbe, n as readSimpleSettings } from "./settings-zIGSzPPG.js";
7
+ import { i as hostAliveProbe, n as readSimpleSettings } from "./settings-YC-csZus.js";
8
8
  import { basename, dirname, join } from "node:path";
9
9
  import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
10
10
  import { spawn } from "node:child_process";
@@ -1,10 +1,10 @@
1
- import { d as hostSessions, r as cccRootForCwd } from "./ccc-roots-Bg4Eq2X3.js";
1
+ import { d as hostSessions, r as cccRootForCwd } from "./ccc-roots-B6dJON2X.js";
2
2
  import { p as readTrajectorySubscriptions } from "./ccc-DSMqTrRU.js";
3
3
  import { F as isoLocal, w as sessionEvents } from "./bind-file-Dy6Qmm7z.js";
4
- import { d as WAKE_CATCH_UP_MS, l as listCroCognitiveTrajectories } from "./scheduler-DMF2hKeT.js";
5
- import { n as readSimpleSettings } from "./settings-zIGSzPPG.js";
6
- import { i as subscriptionStats, r as subscriptionEval } from "./subscriptions-DLLyoLSW.js";
7
- import { containerClocks, containerWakes } from "./observation-BIpcL_F3.js";
4
+ import { d as WAKE_CATCH_UP_MS, l as listCroCognitiveTrajectories } from "./scheduler-pOtONqPy.js";
5
+ import { n as readSimpleSettings } from "./settings-YC-csZus.js";
6
+ import { i as subscriptionStats, r as subscriptionEval } from "./subscriptions-DBoO0GSO.js";
7
+ import { containerClocks, containerWakes } from "./observation-DiD_yJjS.js";
8
8
  //#region src/trajectory/live.ts
9
9
  /**
10
10
  * trajectory/live.ts — 进程内 live 会话取数 + 精简诊断
@@ -1,10 +1,10 @@
1
- import { c as hostAgents, n as agentCwdFor, r as cccRootForCwd, s as hostAgentDefaultModel } from "./ccc-roots-Bg4Eq2X3.js";
1
+ import { c as hostAgents, n as agentCwdFor, r as cccRootForCwd, s as hostAgentDefaultModel } from "./ccc-roots-B6dJON2X.js";
2
2
  import { f as readCognitiveTrajectorySkills, h as readUtf8, o as isSafeModeOn, u as readBlacklist } from "./ccc-DSMqTrRU.js";
3
3
  import { F as isoLocal, T as sessionsRoot, s as DEFAULT_SESSION_SCOPE, x as readActiveSessionMd } from "./bind-file-Dy6Qmm7z.js";
4
4
  import { a as readGitTrack, i as localstorePath } from "./service-BRUHmVFn.js";
5
5
  import { a as createProfilePromptReader, n as buildTrajectoryBasePrompt, o as profileMsmWhitelist, r as constraintCognitiveTrajectory, u as ACC_VERSION } from "./rules-BYeykzys.js";
6
- import { d as registerTrajectorySession$1, f as trajectoryDirNameForSession, o as readTrajectoryConstraintAt, p as unregisterTrajectorySession$1, u as trajectoryConstraintForSession } from "./profile-RuvXAGBX.js";
7
- import { d as readLastBound, i as toMessage, r as makeInjection } from "./injection-BVKPD4Yf.js";
6
+ import { d as registerTrajectorySession$1, f as trajectoryDirNameForSession, o as readTrajectoryConstraintAt, p as unregisterTrajectorySession$1, u as trajectoryConstraintForSession } from "./profile-CRcW3ifg.js";
7
+ import { d as readLastBound, i as toMessage, r as makeInjection } from "./injection-ME-aoZVl.js";
8
8
  import { basename, dirname, join, resolve } from "node:path";
9
9
  import { chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from "node:fs";
10
10
  import { createHmac, randomBytes, randomUUID, scryptSync } from "node:crypto";
@@ -1,4 +1,4 @@
1
- import { c as hostAgents, f as hostSettings, u as hostService } from "./ccc-roots-Bg4Eq2X3.js";
1
+ import { c as hostAgents, f as hostSettings, u as hostService } from "./ccc-roots-B6dJON2X.js";
2
2
  import { i as sessionsRootDir, r as hasSessionLogById } from "./cleanup-CPl1SSaK.js";
3
3
  //#region src/trajectory/alive.ts
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { l as hostInjected, r as cccRootForCwd, u as hostService } from "./ccc-roots-Bg4Eq2X3.js";
1
+ import { l as hostInjected, r as cccRootForCwd, u as hostService } from "./ccc-roots-B6dJON2X.js";
2
2
  import { c as matchBlacklist, d as readCccName, l as pathInside, n as SAFE_MODE_MARKER, o as isSafeModeOn, s as loadSerenityConfig, t as DEFAULT_SERENITY_CONFIG_PATHS, u as readBlacklist } from "./ccc-DSMqTrRU.js";
3
3
  import { F as isoLocal, g as listActiveTrajectories } from "./bind-file-Dy6Qmm7z.js";
4
4
  import { c as profileWriteWhitelist, s as profileToolWhitelist, u as ACC_VERSION } from "./rules-BYeykzys.js";
5
- import { l as trajectoryCodeForSession, u as trajectoryConstraintForSession } from "./profile-RuvXAGBX.js";
5
+ import { l as trajectoryCodeForSession, u as trajectoryConstraintForSession } from "./profile-CRcW3ifg.js";
6
6
  import { n as isImWiredTrajectory } from "./channels-Covd8vLQ.js";
7
7
  import { REGISTERED_TOOLS } from "./invariant.js";
8
8
  import { basename, dirname, join, relative, resolve } from "node:path";
@@ -1,7 +1,7 @@
1
- import { r as cccRootForCwd } from "./ccc-roots-Bg4Eq2X3.js";
1
+ import { r as cccRootForCwd } from "./ccc-roots-B6dJON2X.js";
2
2
  import { p as readTrajectorySubscriptions } from "./ccc-DSMqTrRU.js";
3
3
  import { L as localHuman, n as findTrajectoryHolding } from "./bind-file-Dy6Qmm7z.js";
4
- import { s as registerDisposer } from "./scheduler-DMF2hKeT.js";
4
+ import { s as registerDisposer } from "./scheduler-pOtONqPy.js";
5
5
  //#region src/trajectory/subscriptions.ts
6
6
  /**
7
7
  * trajectory/subscriptions.ts — 轨迹消息订阅(v1.107.0,owner 2026-11-01 令)
@@ -306,7 +306,7 @@ function defaultSubscriptionDeps(ctx) {
306
306
  readSubs: (root) => readTrajectorySubscriptions(root),
307
307
  dirForSession: (root, sessionId) => findTrajectoryHolding(`${root}/AGENT_SESSIONS`, sessionId),
308
308
  deliver: async (root, target, message) => {
309
- const { sendToCognitiveTrajectory } = await import("./scheduler-DMF2hKeT.js").then((n) => n.r);
309
+ const { sendToCognitiveTrajectory } = await import("./scheduler-pOtONqPy.js").then((n) => n.r);
310
310
  const res = await sendToCognitiveTrajectory(ctx, root, target, message, "trajectory-subscription");
311
311
  return {
312
312
  ok: res.ok,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.137.3",
3
+ "version": "1.137.5",
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": {