@shgroup/dsh-serenity-hooks 1.136.3 → 1.136.4

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.136.3",
3
+ "version": "1.136.4",
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": {
@@ -242,9 +242,7 @@ const COGNITIVE_TRAJECTORY_ACTIONS = [
242
242
  "send-now",
243
243
  "send-later",
244
244
  "cro-guide",
245
- "resident",
246
- "interrupted",
247
- "continue-all-interrupted"
245
+ "resident"
248
246
  ];
249
247
  /**
250
248
  * 读取 Session 事件序列(v1.28.1 适配 0.1.2-rc.1 补齐):rc.1 起官方 Session 类
@@ -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-DpxC9HtB.js").then((n) => n.a);
238
+ const { listTrajectoryConstraints } = await import("./profile-RuvXAGBX.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,19 +1,18 @@
1
1
  import { i as __toESM, n as __exportAll } from "./rolldown-runtime-B4iAMlE-.js";
2
- import { c as hostAgents, 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-CtNmjx5v.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";
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
- 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";
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-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
- 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-Bn4hLNOX.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-DpxC9HtB.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-_YAYyCEI.js";
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";
11
- import { _ as WAKE_CATCH_UP_MS, c as formatPendingTools, d as listRunningSessionIds, f as registerCroTurnTracking, g as CARRIER_OPENING_MARK, i as sendToCognitiveTrajectory, l as projectDirNameForCwd, m as buildCroSnapshot, n as registerWakeScheduler, o as DEFAULT_LOOKBACK_MS, p as registerDisposer, s as createResumeOne, t as createAndBindTarget, u as scanInterruptedSessions, v as addWake } from "./scheduler-thJE2bc1.js";
12
- import { i as sessionsRootDir } from "./cleanup-CPl1SSaK.js";
13
- import { i as hostAliveProbe, n as readSimpleSettings, r as registerSettingsSection } from "./settings-CUabGkal.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-BjebXb2G.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-y44CGve_.js";
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-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";
14
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";
15
14
  import { i as runImBridge, n as isImWiredTrajectory, r as registerImChannel, t as imChannelIds } from "./channels-Covd8vLQ.js";
16
- import { i as subscriptionStats, n as registerTrajectorySubscriptions, r as subscriptionEval, t as defaultSubscriptionDeps } from "./subscriptions-AwsOFMf6.js";
15
+ import { i as subscriptionStats, n as registerTrajectorySubscriptions, r as subscriptionEval, t as defaultSubscriptionDeps } from "./subscriptions-DLLyoLSW.js";
17
16
  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";
18
17
  import { a as registerImAccountImpl, i as normalizeAccountChannel, n as getImAccountImpl, r as imAccountChannels } from "./accounts-BHQbakUh.js";
19
18
  import { createRequire } from "node:module";
@@ -515,7 +514,7 @@ const KIT_ACTIONS = [
515
514
  async function runKit(root, args, hostCtx) {
516
515
  switch (args.action) {
517
516
  case "health": {
518
- const { containerStatus } = await import("./observation-BHbpGV-C.js");
517
+ const { containerStatus } = await import("./observation-BWJTHStS.js");
519
518
  const s = containerStatus({
520
519
  root,
521
520
  hostCtx
@@ -561,7 +560,7 @@ async function runKit(root, args, hostCtx) {
561
560
  }
562
561
  case "diag": {
563
562
  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-B58LbpWM.js");
563
+ const { runDiag, renderDiag } = await import("./service-CSwriijn.js");
565
564
  return renderDiag(await runDiag(hostCtx, root ?? ""));
566
565
  }
567
566
  default: throw new Error(`Unknown action: ${args.action}`);
@@ -6356,170 +6355,6 @@ function listResident(root) {
6356
6355
  * 保留 osp 对齐语义的部分:create 的 `--desc`/`--issue` 二选一、use 激活即重命名 dsh 会话标题(F3)。
6357
6356
  * 活跃会话跟踪:内存 Map(按 dsh 会话 id 隔离)+ 从 events 恢复(S134)。
6358
6357
  */
6359
- /**
6360
- * 当前**正在跑轮次**的 dsh 会话 id(用于把 live 会话排除出"待续"名单)。
6361
- *
6362
- * 🔴 **为什么必须排除**:一个正在跑的会话,其日志末条**不是** `session/end-seed`
6363
- * (它还在写),所以按判据本来也不会命中;但排除是**双保险** ——
6364
- * 万一某轮刚被中断、宿主还没来得及继续,把 live 会话当"待续"会导致**重复投递**。
6365
- *
6366
- * ── 🔴🔴 2026-10-23 A105:**从「live 表」改为「在跑表」,且从 `ctx` 取数** ──────────
6367
- *
6368
- * **修前有两个缺陷,叠在一起让这段排除在生产上形同虚设:**
6369
- *
6370
- * ① **`ctx` 传的是 `undefined`** ⇒ `listLiveSessions(undefined)` ⇒ `hostSessions(undefined)`
6371
- * ⇒ 取不到宿主 ⇒ **live 表恒空** ⇒ `scanInterruptedSessions` 的 `liveIds` 是空集。
6372
- * ⚠️ 原注释写「ctx 在 execute 里拿不到(本工具只拿到 exec)」,**那句是错的**:
6373
- * 本工具的工厂 `createCognitiveTrajectoryTool(ctx)` **闭包捕获了真 ctx**,
6374
- * 且同文件的 `continue-all-interrupted` 分支早就靠它取 `hostAgents(ctx)` / `hostService(ctx,…)`
6375
- * —— 见那一支的注释「**必须用工厂参数 `ctx`,不能用 `exec`**」。**同一份源码里,
6376
- * 一处说"拿不到"、另一处说"必须用它"**,这正是两个读数打架的典型形态。
6377
- *
6378
- * ② **粒度错了:`live ≠ 在跑`。** `listLiveSessions` 答的是「宿主认不认识这个会话」
6379
- * (会话对象已载入本进程),**不是**「它此刻有没有轮次在跑」。
6380
- * ⇒ 一条**已载入但空闲**的会话会被误排除 ⇒ **它恰恰是"上一轮被重启打断、最该被接走"的那一类**。
6381
- * 2026-10-23 实测:同一时刻 `acc-diag` 把一条会话列为 live,而本动作把它当命中扫出 ⇒
6382
- * 两个口径两个答案;随后真机证明那条会话当时**确实该被接走**。
6383
- *
6384
- * ⇒ **现在答的是「此刻有没有在跑」**,取数口 = `listRunningSessionIds(nowMs)`(`cro/turns.ts`):
6385
- * 由 `agent/status=running` 置位、`idle` 清位,`TURN_TTL_MS` 兜底。
6386
- *
6387
- * 🔴 **不要再改回「宿主认不认识它」** —— 这是本函数最容易被"改得更省事"而改回去的地方。
6388
- * 「宿主认识」是**载入状态**,「在跑」是**轮次状态**,两者互不蕴含:
6389
- * 载入而空闲(该接走)、在跑但刚被中断(该接走)、在跑且健康(才该排除)。
6390
- * 只有第三格该排除 ⇒ 判据必须是轮次状态。
6391
- *
6392
- * 拿不到 running 表时退化为空集(不阻断扫描,只少一层保护)—— 与修前同口径。
6393
- */
6394
- function collectRunningSessionIds(nowMs) {
6395
- const out = /* @__PURE__ */ new Set();
6396
- try {
6397
- for (const id of listRunningSessionIds(nowMs)) if (typeof id === "string" && id) out.add(id);
6398
- } catch {}
6399
- return out;
6400
- }
6401
- /**
6402
- * 渲染 `interrupted` 扫描结果(人读)。
6403
- *
6404
- * 显示口径:**先给"有没有",再给每一条的定位信息,最后给边界说明**。
6405
- * ⚠️ 明确写出"这些会话是否续跑由调用方决定" —— 否则读者会以为本动作已经处理了。
6406
- */
6407
- function renderInterruptedScan(input) {
6408
- const { projectDir, lookbackHours, scan } = input;
6409
- const lines = [];
6410
- const excludedCount = scan.excluded.length;
6411
- const undecidableCount = scan.undecidable.length;
6412
- lines.push(`═══ 末轮未跑完的 dsh 会话(回看 ${lookbackHours}h)═══`);
6413
- lines.push(` 扫描域: ${projectDir}`);
6414
- lines.push(` 检查 ${scan.scanned} 个 · 命中 ${scan.sessions.length} · 跳过 ${scan.skipped}` + (excludedCount > 0 ? ` · 排除在跑 ${excludedCount} 个` : "") + ` · 不可判定 ${undecidableCount} 个 · 耗时 ${scan.elapsedMs}ms${scan.errors.length > 0 ? ` · 读取失败 ${scan.errors.length}` : ""}`);
6415
- if (excludedCount > 0) {
6416
- lines.push(` ⓘ 窗口内共 ${scan.scanned + excludedCount} 个会话,其中 ${excludedCount} 个**此刻有轮次在跑**,按「正在跑的不该被判为待续」的纪律被排除:`);
6417
- for (const id of scan.excluded) lines.push(` - ${id}`);
6418
- lines.push(" ⚠️ 这些**没有**被检查过。若你认为其中某个其实已死(进程重启后残留的\"在跑\"标记),");
6419
- lines.push(" 请告知 ACC 维护方 —— 那是「在跑」表的判据问题,不是扫描的问题。");
6420
- }
6421
- if (undecidableCount > 0) {
6422
- lines.push("");
6423
- lines.push(` ⚠️ **不可判定 ${undecidableCount} 个** —— 这些**既不是"命中"也不是"没事"**,是"判不出来":`);
6424
- for (const u of scan.undecidable) {
6425
- const at = u.lastEventAt !== null ? new Date(u.lastEventAt).toISOString() : "(时间未知)";
6426
- lines.push(` - ${u.sessionId}(末事件 ${at})`);
6427
- lines.push(` ${u.reason}`);
6428
- }
6429
- lines.push(" ⇒ 成因通常是:**一整轮长到 8 MiB 都装不下它的起点**(`turn/start` 在窗口之外)。");
6430
- lines.push(" 🔴 **是否处理由你决定**(ACC 不代判)。本仓纪律:**宁可多醒不可漏** ⇒ 倾向按\"该接走\"处理。");
6431
- }
6432
- if (scan.sessions.length === 0) {
6433
- lines.push("");
6434
- const tails = [];
6435
- if (excludedCount > 0) tails.push(`另有 ${excludedCount} 个在跑,未检查`);
6436
- if (undecidableCount > 0) tails.push(`另有 ${undecidableCount} 个**不可判定**`);
6437
- lines.push(tails.length > 0 ? `✓ 被检查的 ${scan.scanned} 个里没有末轮未跑完的 —— ${tails.join(";")}(见上)。` : "✓ 没有末轮未跑完的会话 —— 无需处理。");
6438
- return lines.join("\n");
6439
- }
6440
- lines.push("");
6441
- for (const s of scan.sessions) {
6442
- const at = s.lastEventAt !== null ? new Date(s.lastEventAt).toISOString() : "(时间未知)";
6443
- lines.push(` · ${s.sessionId}`);
6444
- const formText = s.form === "unclosed" ? "未收尾(窗口内无 turn/end)" : "有收尾(reason.kind 命中)";
6445
- lines.push(` 轮次 turn=${s.turn ?? "?"} · 末事件 ${at}`);
6446
- lines.push(` 形态 ${s.form} = ${formText} · 末条 turn/end.kind=${s.lastTurnEndKind ?? "null"} · 窗口内最后 turn/start=${s.lastTurnStartTurn ?? "null"}`);
6447
- if (s.pendingTools.length > 0) lines.push(` ⚠️ 有调用无结果的工具(副作用未知): ${formatPendingTools(s.pendingTools)}`);
6448
- }
6449
- lines.push("");
6450
- lines.push("判据(两种形态,任一命中即收):");
6451
- lines.push(" A `interrupted-end`: 末条 `turn/end.reason.kind` ∈ {interrupted, aborted},且其后没有新的 turn/start。");
6452
- lines.push(" interrupted = 进程崩溃后被 resume 补收尾 / aborted = 被正常终止(重启、销毁、用户中断)。");
6453
- lines.push(" B `unclosed`: 窗口内最后一条 `turn/start` 之后没有 `turn/end`(进程在轮内任意位置死掉,宿主来不及写收尾)。");
6454
- lines.push("🔴 **怎么用「形态」判该不该续**(调用方口径,ACC 不代判):");
6455
- lines.push(" · 投递方式 `cold-resume` ⇒ 该会话**未被载入本进程**(死着)⇒ 真需要接走;");
6456
- lines.push(" · 投递方式 `live+steer` ⇒ 它在进程里 ⇒ ⚠️ **「载入」≠「空闲」**:");
6457
- lines.push(" `form=unclosed` 且 `窗口内最后 turn/start` == 命中 turn ⇒ 可能**那一轮正在跑** ⇒ 先核再注入。");
6458
- lines.push("🔴 本动作**只读** —— 是否续跑、续哪条、几点续,由调用方(你的认知轨迹)决定。");
6459
- lines.push("⚠️ 未完成的工具调用「副作用未知」≠「没执行」:它们可能已写文件 / 已发消息。");
6460
- lines.push(" 续跑前应先核对副作用,而不是把那一轮整段重放。");
6461
- if (scan.errors.length > 0) {
6462
- lines.push("");
6463
- lines.push("读取失败(诊断):");
6464
- for (const e of scan.errors.slice(0, 10)) lines.push(` · ${e.sessionId}: ${e.message}`);
6465
- }
6466
- return lines.join("\n");
6467
- }
6468
- /**
6469
- * 渲染 `continue-all-interrupted` 的结果(人读)。
6470
- *
6471
- * 三种形态必须能一眼分清:**dryRun(只预告)** / **有命中且全成功** / **有失败**。
6472
- * ⚠️ 明确写出"已注入 ≠ 已跑完" —— 与 `send-now` 的回执口径一致(D-族:回执只到注入)。
6473
- */
6474
- function renderContinueResult(input) {
6475
- const { projectDir, lookbackHours, scan, outcomes, dryRun } = input;
6476
- const lines = [];
6477
- const excludedCount = scan.excluded.length;
6478
- const undecidableCount = scan.undecidable.length;
6479
- const head = dryRun ? "续跑预告(dryRun,未注入任何消息)" : "中断续跑结果";
6480
- lines.push(`═══ ${head}(回看 ${lookbackHours}h)═══`);
6481
- lines.push(` 扫描域: ${projectDir}`);
6482
- lines.push(` 检查 ${scan.scanned} 个 · 命中 ${scan.sessions.length} · 跳过 ${scan.skipped}` + (excludedCount > 0 ? ` · 排除在跑 ${excludedCount} 个` : "") + ` · 不可判定 ${undecidableCount} 个 · 耗时 ${scan.elapsedMs}ms`);
6483
- if (excludedCount > 0) lines.push(` ⓘ 另有 ${excludedCount} 个会话**此刻有轮次在跑**,未检查:${scan.excluded.join("、")}`);
6484
- if (undecidableCount > 0) {
6485
- lines.push(` ⚠️ 另有 ${undecidableCount} 个**不可判定**(既非同中、也非没事),**未处理**:` + scan.undecidable.map((u) => u.sessionId).join("、"));
6486
- lines.push(" ⇒ 若要处理它们,须人工/调用方判断(ACC 不代判)。");
6487
- }
6488
- if (scan.sessions.length === 0) {
6489
- lines.push("");
6490
- const tails = [];
6491
- if (excludedCount > 0) tails.push(`另有 ${excludedCount} 个在跑,未续`);
6492
- if (undecidableCount > 0) tails.push(`另有 ${undecidableCount} 个不可判定`);
6493
- lines.push(tails.length > 0 ? `✓ 被检查的 ${scan.scanned} 个里没有末轮未跑完的 —— ${tails.join(";")}(见上)。` : "✓ 没有末轮未跑完的会话 —— 无需续跑。");
6494
- return lines.join("\n");
6495
- }
6496
- lines.push("");
6497
- if (dryRun) {
6498
- lines.push("将对这些会话注入续跑消息:");
6499
- for (const s of scan.sessions) {
6500
- const at = s.lastEventAt !== null ? new Date(s.lastEventAt).toISOString() : "(时间未知)";
6501
- lines.push(` · ${s.sessionId} turn=${s.turn ?? "?"} 末事件 ${at}`);
6502
- if (s.pendingTools.length > 0) lines.push(` 副作用未知: ${formatPendingTools(s.pendingTools)}`);
6503
- }
6504
- lines.push("");
6505
- lines.push("要真的执行,去掉 dryRun 再调用一次。");
6506
- return lines.join("\n");
6507
- }
6508
- const okCount = (outcomes ?? []).filter((o) => o.ok).length;
6509
- const failCount = (outcomes ?? []).length - okCount;
6510
- lines.push(`结果:已注入 ${okCount} / 失败 ${failCount}`);
6511
- lines.push("");
6512
- for (const o of outcomes ?? []) lines.push(o.ok ? ` ✓ ${o.sessionId} (${o.how ?? "已注入"})` : ` ✗ ${o.sessionId} ${o.error ?? "未知原因"}`);
6513
- lines.push("");
6514
- lines.push("⚠️ 回执只到「消息已注入」——**不表示**目标已经跑完或已答复。");
6515
- lines.push(" 要确认它真的动了,去看该会话的日志 / 它自己的 SESSION.md。");
6516
- if (scan.errors.length > 0) {
6517
- lines.push("");
6518
- lines.push("扫描期读取失败(诊断):");
6519
- for (const e of scan.errors.slice(0, 10)) lines.push(` · ${e.sessionId}: ${e.message}`);
6520
- }
6521
- return lines.join("\n");
6522
- }
6523
6358
  /** 当前 dsh 会话 id(use/close 按会话隔离的 scope) */
6524
6359
  function agentScope$1(exec) {
6525
6360
  return exec.agent?.session?.id ?? "default";
@@ -6908,94 +6743,19 @@ function createCognitiveTrajectoryTool(ctx) {
6908
6743
  * 🔴 **不进系统提示词**(owner 裁决 Q2:说明类信息按需取,不占每轮 token)。
6909
6744
  */
6910
6745
  return listResident(root);
6911
- case "interrupted": {
6912
- /**
6913
- * 以未完成轮次结尾的 dsh 会话(owner 2026-10-22 令:**只出入口**)。
6914
- *
6915
- * 🔴 **边界(owner 原话:「我们 ACC 不关心周期」)**:本动作**只回答**"此刻哪些会话
6916
- * 的最后一轮没跑完",**不判周期、不自动续跑、不改日志**。
6917
- * 何时扫、续谁、怎么续 = 调用方(CCC 的认知轨迹)的事。
6918
- *
6919
- * 🔴 **为什么不是"曾经中断过"**:长会话历史上可中断几十次(实测单会话 33 次);
6920
- * 按"曾经"判会把早已恢复的会话全部当成待续 ⇒ 灾难。
6921
- * 🔴 **判据只在一处**:`trajectory/interrupted.ts` 的 `detectInterruptedEnd`
6922
- * (⛔ 别在此处复述取值域 —— 2026-10-24 就是这份复述漏掉了 `aborted`)。
6923
- *
6924
- * 🔴 **正在跑的会话要排除**:live 会话不该被判成"待续"(它正在跑,不是中断)。
6925
- */
6926
- const lookbackHours = typeof args.lookbackHours === "number" && args.lookbackHours > 0 ? args.lookbackHours : DEFAULT_LOOKBACK_MS / 36e5;
6927
- const sessionsRootPath = sessionsRootDir();
6928
- const cwd = exec.agent?.session?.header?.cwd ?? root;
6929
- const projectDir = join(sessionsRootPath, projectDirNameForCwd(cwd));
6930
- return renderInterruptedScan({
6931
- projectDir,
6932
- lookbackHours,
6933
- scan: scanInterruptedSessions(projectDir, {
6934
- lookbackMs: lookbackHours * 36e5,
6935
- liveIds: collectRunningSessionIds(Date.now())
6936
- })
6937
- });
6938
- }
6939
- case "continue-all-interrupted": {
6940
- /**
6941
- * 扫 + 逐条注入续跑消息(owner 2026-10-22 追加令:
6942
- * 「我希望实现的是 continue-all-interrupted 方法,调用后自动找到 8h 内所有 dsh 会话
6943
- * 注入简单的 continue 进行唤醒,这样 CCC 就不用动脑子了」)。
6944
- *
6945
- * 🔴 **与 `interrupted` 分立而不合并**:前者是**观察**(只读、零副作用),
6946
- * 后者是**动作**(会真起 agent、真烧算力)。想看一眼清单却误触发全量续跑
6947
- * 是不可接受的 ⇒ 两个动作各自可调用。
6948
- *
6949
- * 🔴 **边界仍是"不判周期"**:何时调用归调用方(CCC 的定时轨迹)。
6950
- * 本动作只保证"**调用一次就把该做的做完**"。
6951
- */
6952
- const lookbackHours = typeof args.lookbackHours === "number" && args.lookbackHours > 0 ? args.lookbackHours : DEFAULT_LOOKBACK_MS / 36e5;
6953
- const dryRun = args.dryRun === true;
6954
- const sessionsRootPath = sessionsRootDir();
6955
- const cwdRead = exec.agent?.session?.header?.cwd ?? root;
6956
- const projectDir = join(sessionsRootPath, projectDirNameForCwd(cwdRead));
6957
- const scan = scanInterruptedSessions(projectDir, {
6958
- lookbackMs: lookbackHours * 36e5,
6959
- liveIds: collectRunningSessionIds(Date.now())
6960
- });
6961
- if (dryRun) return renderContinueResult({
6962
- projectDir,
6963
- lookbackHours,
6964
- scan,
6965
- outcomes: null,
6966
- dryRun: true
6967
- });
6968
- const agents = hostAgents(ctx);
6969
- const sc = hostService(ctx, "sessionController");
6970
- const resumeOne = createResumeOne({
6971
- agents,
6972
- sessionController: sc,
6973
- makeMessage: (text) => toMessage(makeInjection({
6974
- origin: "acc",
6975
- form: "notice",
6976
- summary: "中断兜底继续(工具面)",
6977
- text,
6978
- delivery: "wake-now"
6979
- }))
6980
- });
6981
- const outcomes = [];
6982
- for (const hit of scan.sessions) try {
6983
- outcomes.push(await resumeOne(hit));
6984
- } catch (err) {
6985
- outcomes.push({
6986
- sessionId: hit.sessionId,
6987
- ok: false,
6988
- error: err instanceof Error ? err.message : String(err)
6989
- });
6990
- }
6991
- return renderContinueResult({
6992
- projectDir,
6993
- lookbackHours,
6994
- scan,
6995
- outcomes,
6996
- dryRun: false
6997
- });
6998
- }
6746
+ /**
6747
+ * 🔴 **`interrupted` / `continue-all-interrupted` 两个动作已于 2026-11-15 移除(owner 令)。**
6748
+ *
6749
+ * 理由:ACC 的**自动兜底**(`wake/scheduler.ts` 的 60s tick)已经足够可靠,
6750
+ * 它自己扫、自己注入,不依赖任何调用方。工具上再挂一份同样能起 agent 的入口,
6751
+ * 只会制造"两条路做同一件事"的第二真相源 —— 而它的失效形态是**把一件已自动化的事
6752
+ * 重新变成人的义务**(调用方以为自己必须记得调它)。
6753
+ *
6754
+ * ⚠️ **能力没删,只删入口**:`scanInterruptedSessions` / `createResumeOne` /
6755
+ * `buildContinueText` 全部留在 `trajectory/interrupted.ts`,**scheduler 仍在用它们**。
6756
+ *
6757
+ * 恢复方式见 `trajectory/core.ts` 的 `CognitiveTrajectoryAction` 注释。
6758
+ */
6999
6759
  default: throw new Error(`Unknown action: ${args.action}`);
7000
6760
  }
7001
6761
  }
@@ -10950,7 +10710,7 @@ function registerStatusApi(ctx, opts = {}) {
10950
10710
  });
10951
10711
  }
10952
10712
  const { saveWeixinRoutes } = await import("./route-DcUo9alz.js").then((n) => n.l);
10953
- const { findDirNameByCode } = await import("./profile-DpxC9HtB.js").then((n) => n.a);
10713
+ const { findDirNameByCode } = await import("./profile-RuvXAGBX.js").then((n) => n.a);
10954
10714
  for (const r of routes) if (findDirNameByCode(root, r.trajectory) === null) {
10955
10715
  sendJson$2(res, 400, { error: `unknown trajectory: ${r.trajectory} (no such trajectory code in ${root})` });
10956
10716
  return;
@@ -15401,7 +15161,7 @@ const MEDIA_MAX_BYTES = 20971520;
15401
15161
  */
15402
15162
  async function resolveCccRootByAlias(ctx, alias) {
15403
15163
  try {
15404
- const { listCccs } = await import("./ccc-roots-CtNmjx5v.js").then((n) => n.a);
15164
+ const { listCccs } = await import("./ccc-roots-Bg4Eq2X3.js").then((n) => n.a);
15405
15165
  const entries = await listCccs(ctx);
15406
15166
  const byName = entries.find((e) => e.name === alias);
15407
15167
  if (byName) return byName.root;
@@ -15469,7 +15229,7 @@ async function resolveInboundTarget(ctx, input) {
15469
15229
  });
15470
15230
  return null;
15471
15231
  }
15472
- const { findDirNameByCode } = await import("./profile-DpxC9HtB.js").then((n) => n.a);
15232
+ const { findDirNameByCode } = await import("./profile-RuvXAGBX.js").then((n) => n.a);
15473
15233
  if (findDirNameByCode(root, target.role) === null) {
15474
15234
  const detail = `目标 CCC "${target.ccc}" 内没有编码为 "${target.role}" 的认知轨迹`;
15475
15235
  console.error(`[serenity-hooks] ✗ human-channel: ${detail}(account=${input.account} user=${input.user})—— 该消息**未投递**,请改订阅表里的目标编码`);
@@ -16479,7 +16239,7 @@ function syncHumanChannel(ctx) {
16479
16239
  (async () => {
16480
16240
  try {
16481
16241
  stopMachineLoops();
16482
- const { listCccs } = await import("./ccc-roots-CtNmjx5v.js").then((n) => n.a);
16242
+ const { listCccs } = await import("./ccc-roots-Bg4Eq2X3.js").then((n) => n.a);
16483
16243
  for (const entry of await listCccs(ctx)) syncCccBridge(ctx, entry.root);
16484
16244
  } catch {}
16485
16245
  })();
@@ -16772,7 +16532,7 @@ function matchCcc(input, candidates) {
16772
16532
  }
16773
16533
  /** 组装候选列表(`ccc-roots.listCccs` 投影 + `.serenity` 名;动态 import 保持本模块静态依赖轻量) */
16774
16534
  async function collectCandidates(ctx) {
16775
- const { listCccs } = await import("./ccc-roots-CtNmjx5v.js").then((n) => n.a);
16535
+ const { listCccs } = await import("./ccc-roots-Bg4Eq2X3.js").then((n) => n.a);
16776
16536
  const entries = await listCccs(ctx, { defaultRoot: process.cwd() });
16777
16537
  const seen = /* @__PURE__ */ new Set();
16778
16538
  const out = [];
@@ -1,5 +1,5 @@
1
- import { r as cccRootForCwd } from "./ccc-roots-CtNmjx5v.js";
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-B0TuOP89.js";
1
+ import { r as cccRootForCwd } from "./ccc-roots-Bg4Eq2X3.js";
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";
5
5
  //#region src/trajectory/bound.ts
@@ -1,7 +1,7 @@
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-Bn4hLNOX.js";
4
- import { a as wakeSchedulerState, y as listWakes } from "./scheduler-thJE2bc1.js";
3
+ import { n as readDshVersion, s as hostContractReport, y as checkRegistryQuality } from "./status-BjebXb2G.js";
4
+ import { a as wakeSchedulerState, p as listWakes } from "./scheduler-DMF2hKeT.js";
5
5
  import { resolve } from "node:path";
6
6
  import { existsSync, readFileSync, statSync } from "node:fs";
7
7
  //#region src/surface/observation.ts
@@ -1,6 +1,6 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.js";
2
2
  import { g as resolveInside, h as readUtf8 } from "./ccc-DSMqTrRU.js";
3
- import { N as findTrajectoryFile, T as sessionsRoot, b as parseTrajectoryCode, i as listBindDeclarations, j as TRAJECTORY_FILENAME } from "./bind-file-B0TuOP89.js";
3
+ import { N as findTrajectoryFile, T as sessionsRoot, b as parseTrajectoryCode, i as listBindDeclarations, j as TRAJECTORY_FILENAME } from "./bind-file-Dy6Qmm7z.js";
4
4
  import { join } from "node:path";
5
5
  import { readdirSync } from "node:fs";
6
6
  //#region src/trajectory/policy/window.ts
@@ -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-CtNmjx5v.js";
2
+ import { c as hostAgents, o as listCccs, u as hostService } from "./ccc-roots-Bg4Eq2X3.js";
3
3
  import { g as resolveInside } from "./ccc-DSMqTrRU.js";
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-B0TuOP89.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-CKx49Mlf.js";
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";
6
6
  import { i as sessionsRootDir, n as findSessionLog } from "./cleanup-CPl1SSaK.js";
7
- import { i as hostAliveProbe, n as readSimpleSettings } from "./settings-CUabGkal.js";
7
+ import { i as hostAliveProbe, n as readSimpleSettings } from "./settings-zIGSzPPG.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";
@@ -1793,8 +1793,6 @@ const ZSTD_MAGIC = Buffer.from([
1793
1793
  47,
1794
1794
  253
1795
1795
  ]);
1796
- /** 默认回看窗口:8 小时(owner 2026-10-22 定) */
1797
- const DEFAULT_LOOKBACK_MS = 288e5;
1798
1796
  /**
1799
1797
  * 尾部读取的**渐进块**(从小到大,够用就停)。
1800
1798
  *
@@ -3789,4 +3787,4 @@ function registerWakeScheduler(ctx) {
3789
3787
  registerDisposer(ctx, "认知轨迹唤醒调度器", () => clock.dispose());
3790
3788
  }
3791
3789
  //#endregion
3792
- export { WAKE_CATCH_UP_MS as _, wakeSchedulerState as a, formatPendingTools as c, listRunningSessionIds as d, registerCroTurnTracking as f, CARRIER_OPENING_MARK as g, listCroCognitiveTrajectories as h, sendToCognitiveTrajectory as i, projectDirNameForCwd as l, buildCroSnapshot as m, registerWakeScheduler as n, DEFAULT_LOOKBACK_MS as o, registerDisposer as p, scheduler_exports as r, createResumeOne as s, createAndBindTarget as t, scanInterruptedSessions as u, addWake as v, listWakes as y };
3790
+ export { wakeSchedulerState as a, buildCroSnapshot as c, WAKE_CATCH_UP_MS as d, addWake as f, sendToCognitiveTrajectory as i, listCroCognitiveTrajectories as l, registerWakeScheduler as n, registerCroTurnTracking as o, listWakes as p, scheduler_exports as r, registerDisposer as s, createAndBindTarget as t, CARRIER_OPENING_MARK as u };
@@ -1,10 +1,10 @@
1
- import { d as hostSessions, r as cccRootForCwd } from "./ccc-roots-CtNmjx5v.js";
1
+ import { d as hostSessions, r as cccRootForCwd } from "./ccc-roots-Bg4Eq2X3.js";
2
2
  import { p as readTrajectorySubscriptions } from "./ccc-DSMqTrRU.js";
3
- import { F as isoLocal, w as sessionEvents } from "./bind-file-B0TuOP89.js";
4
- import { _ as WAKE_CATCH_UP_MS, h as listCroCognitiveTrajectories } from "./scheduler-thJE2bc1.js";
5
- import { n as readSimpleSettings } from "./settings-CUabGkal.js";
6
- import { i as subscriptionStats, r as subscriptionEval } from "./subscriptions-AwsOFMf6.js";
7
- import { containerClocks, containerWakes } from "./observation-BHbpGV-C.js";
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-BWJTHStS.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-CtNmjx5v.js";
1
+ import { c as hostAgents, n as agentCwdFor, r as cccRootForCwd, s as hostAgentDefaultModel } from "./ccc-roots-Bg4Eq2X3.js";
2
2
  import { f as readCognitiveTrajectorySkills, h as readUtf8, o as isSafeModeOn, u as readBlacklist } from "./ccc-DSMqTrRU.js";
3
- import { F as isoLocal, T as sessionsRoot, s as DEFAULT_SESSION_SCOPE, x as readActiveSessionMd } from "./bind-file-B0TuOP89.js";
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-DpxC9HtB.js";
7
- import { d as readLastBound, i as toMessage, r as makeInjection } from "./injection-CKx49Mlf.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";
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-CtNmjx5v.js";
1
+ import { c as hostAgents, f as hostSettings, u as hostService } from "./ccc-roots-Bg4Eq2X3.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-CtNmjx5v.js";
1
+ import { l as hostInjected, r as cccRootForCwd, u as hostService } from "./ccc-roots-Bg4Eq2X3.js";
2
2
  import { c as matchBlacklist, d as readCccName$1, l as pathInside, n as SAFE_MODE_MARKER, o as isSafeModeOn, r as classifyPath, s as loadSerenityConfig, t as DEFAULT_SERENITY_CONFIG_PATHS, u as readBlacklist } from "./ccc-DSMqTrRU.js";
3
- import { F as isoLocal, g as listActiveTrajectories } from "./bind-file-B0TuOP89.js";
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-DpxC9HtB.js";
5
+ import { l as trajectoryCodeForSession, u as trajectoryConstraintForSession } from "./profile-RuvXAGBX.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-CtNmjx5v.js";
1
+ import { r as cccRootForCwd } from "./ccc-roots-Bg4Eq2X3.js";
2
2
  import { p as readTrajectorySubscriptions } from "./ccc-DSMqTrRU.js";
3
- import { L as localHuman, n as findTrajectoryHolding } from "./bind-file-B0TuOP89.js";
4
- import { p as registerDisposer } from "./scheduler-thJE2bc1.js";
3
+ import { L as localHuman, n as findTrajectoryHolding } from "./bind-file-Dy6Qmm7z.js";
4
+ import { s as registerDisposer } from "./scheduler-DMF2hKeT.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-thJE2bc1.js").then((n) => n.r);
309
+ const { sendToCognitiveTrajectory } = await import("./scheduler-DMF2hKeT.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,
@@ -72,15 +72,24 @@
72
72
  * 🔴 **2026-10-24(owner 报障「不是崩溃的就扫不到」)**:"未跑完"有两种宿主写法 ——
73
73
  * `interrupted`(崩溃后 resume 补收尾)与 `aborted`(被正常终止:重启/销毁/用户中断)。
74
74
  * 修前只认前者 ⇒ **发布重启这一类整批漏扫**。取值域只在 `trajectory/interrupted.ts` 一处定义。
75
- * 2026-10-22(owner 追加令「我希望实现的是 continue-all-interrupted 方法,调用后自动找到
76
- * 8h 内所有 dsh 会话注入简单的 continue 进行唤醒,这样 CCC 就不用动脑子了」):
77
- * 新增 **`continue-all-interrupted`** = `interrupted` 的**动作版**(扫 → 逐条注入续跑消息)。
78
- * 判据(R↓,两者为何并存而不合并):`interrupted` 是**观察**(只读,零副作用),
79
- * `continue-all-interrupted` 是**动作**(会真起 agent、真消耗算力)。
80
- * ⇒ 观察与动作**必须分开可调用** —— 想看一眼清单却误触发全量续跑,是不可接受的副作用。
81
- * ⚠️ 边界不变:ACC 仍**不判周期**(何时调用归调用方),只是把"调用一次要做完什么"补齐。
75
+ *
76
+ * 🔴🔴 **2026-11-15(owner 令):`interrupted` 与 `continue-all-interrupted` 两个动作已从工具面移除。**
77
+ *
78
+ * **移除的理由(这是判据,不是"收拾东西")**:
79
+ * ACC 的**自动兜底**(`wake/scheduler.ts` 的 60s tick)已经**过于可靠**——它每拍自己扫、
80
+ * 自己注入,不需要任何调用方。⇒ 工具上再挂一份**同样能起 agent、同样烧算力**的入口,
81
+ * 只增加"两条路都能做同一件事"的第二真相源,而**它的失效形态比沉默更坏**:
82
+ * 调用方以为自己必须记得调它,于是**把一件已经自动化的事重新变成人的义务**。
83
+ *
84
+ * **删的只是"工具面那两个动作",底层函数一个都没删** ——
85
+ * `scanInterruptedSessions` / `createResumeOne` / `buildContinueText` **仍被 scheduler 使用**,
86
+ * 那是自动兜底的唯一实现。⇒ 判据:**删入口 ≠ 删能力**;能力归自动兜底,入口不必重复。
87
+ *
88
+ * ⚠️ **恢复这两个动作的方式**(若哪天自动兜底不够用):把 `'interrupted'` / `'continue-all-interrupted'`
89
+ * 加回本数组 + 加回 `tools/cognitive-trajectory.ts` 的 `switch`(那两个 case 的正文当时整段删除,
90
+ * 重建时照 `trajectory/interrupted.ts` 的现有导出写即可——它从没动过)。
82
91
  */
83
- type CognitiveTrajectoryAction = 'list' | 'show' | 'create' | 'use' | 'rebuild' | 'archive' | 'uid' | 'send-now' | 'send-later' | 'cro-guide' | 'resident' | 'interrupted' | 'continue-all-interrupted';
92
+ type CognitiveTrajectoryAction = 'list' | 'show' | 'create' | 'use' | 'rebuild' | 'archive' | 'uid' | 'send-now' | 'send-later' | 'cro-guide' | 'resident';
84
93
  export declare const COGNITIVE_TRAJECTORY_ACTIONS: readonly CognitiveTrajectoryAction[];
85
94
  /**
86
95
  * 读取 Session 事件序列(v1.28.1 适配 0.1.2-rc.1 补齐):rc.1 起官方 Session 类
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.136.3",
3
+ "version": "1.136.4",
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": {