@shgroup/dsh-serenity-hooks 1.38.0 → 1.39.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/README.md CHANGED
@@ -268,18 +268,18 @@ DSH 一个进程可以同时带多个工作区,每个工作区各自对接自
268
268
 
269
269
  `trajectory`(轨迹)是一等概念:一个工作区里可以有任意多条轨迹并行。
270
270
 
271
- **定时唤醒**:用 `container_trajectory wake-later` 登记一条"唤醒" = 未来某时刻 + 一条消息——可以给自己预约,也可以唤醒别的轨迹;落在工作区内的 `AGENT_SESSIONS/wake-registry.json`(可读可审计),到点由中心调度器投递,**不阻塞、不等待、也不回执**。
271
+ **定时唤醒**:用 `container_trajectory send-later` 登记一条"唤醒" = 未来某时刻 + 一条消息——可以给自己预约,也可以唤醒别的轨迹;落在工作区内的 `AGENT_SESSIONS/wake-registry.json`(可读可审计),到点由中心调度器投递,**不阻塞、不等待、也不回执**。
272
272
 
273
- **即时投递**:用 `container_trajectory send-message` 把一条消息**现在**就递过去——目标在内存里就**立即注入**;不在内存里就**冷载入后投递**(**等效于直接唤醒**,但**不等调度器的 5 分钟节拍**)。它**有同步回执**(告诉你走了 live 还是冷载入),**不落注册表**(那张表专管"未来时刻")。
273
+ **即时投递**:用 `container_trajectory send-now` 把一条消息**现在**就递过去——目标在内存里就**立即注入**;不在内存里就**冷载入后投递**(**等效于直接唤醒**,但**不等调度器的 5 分钟节拍**)。它**有同步回执**(告诉你走了 live 还是冷载入),**不落注册表**(那张表专管"未来时刻")。
274
274
 
275
- - 两者只差两处:**时刻**(现在 / 未来)与**回执**(有 / 无)。"预约"天生是 fire-and-forget(不可回收、不回执),"递话"则是一次调用一次答复——**各自语义干净,不把两种语义塞进同一个动作**
275
+ - 两者只差两处:**时刻**(现在 / 未来)与**回执**(有 / 无)。"预约"天生是 fire-and-forget(不可回收、不回执),"递话"则是一次调用一次答复——**各自语义干净,不把两种语义塞进同一个动作**(🔴 **更名**:这对动作原名 `wake-later` / `send-message`,现名 **`send-later` / `send-now`**——族名取共享词干 `send-`、轴取 `-later`/`-now`,因为「唤醒」是两条路径**共有**的属性,不配做区分;**硬切无别名**)
276
276
  - ⚠️ **回执只到"已入队"**:它**不表示**目标已经执行或答复;目标正在跑轮次时,消息在**轮次边界**生效(**不打断当前轮**)。要确证"目标真的动了",得看它自己的 `SESSION.md`
277
277
 
278
278
  - **目标没打开也能唤醒**:会话不在内存里时先把它载入再投递(**冷唤醒**);载入不了则条目留在登记表里并记下原因,**不静默丢弃**
279
279
  - **"周期"归工作区自己**:要一轮接一轮,就由**收到唤醒的那条轨迹**在每轮结束时再排一次下一轮——ACC 只提供"到点投递一条消息"这个原语,不替工作区决定节拍(焦点、节拍、偏见都由工作区自定;任意条轨迹并行、互不干扰)
280
280
  - **轨迹可以自带 skill**:在它的 `SESSION.md` 顶部 frontmatter 写 `skills: [名字, …]`,这条轨迹**被绑定期间**的每个请求都会注入这些 skill 的全文(适合把某个领域的做事方法直接挂在轨迹上);skill 名来自工作区数据,**先过安全校验才会用于拼路径**,找不到会在提示里明说"缺失"而**不静默跳过**
281
281
 
282
- > ⚠️ **历史(v1.35.0 起已退场)**:ACC 曾自带一套"**周期自唤醒 autopilot**"——插件内时钟 + 工作区配置里的 `topPrompt`/偏见脚本 + 面板「周期自唤醒」开关 + `container_admin autopilot` 三动作(status/init/generate-bias)。**v1.35.0 起整段删除**。理由:它相对 `wake-later` 只多两样——"周期节拍"与"提示词注入",而这两样**工作区自己就能做**(见上);且 `wake-later` 反而更强(**支持冷会话唤醒**,而 autopilot 要求目标会话已在内存里)。老会话 / 老文档里看到 `container_admin autopilot`、`autopilot-trajectory`、`--auto` 目录后缀、`[Autopilot Trajectory · 唤起]` 等字样,**均按本条理解**:那是已删除的机制。
282
+ > ⚠️ **历史(v1.35.0 起已退场)**:ACC 曾自带一套"**周期自唤醒 autopilot**"——插件内时钟 + 工作区配置里的 `topPrompt`/偏见脚本 + 面板「周期自唤醒」开关 + `container_admin autopilot` 三动作(status/init/generate-bias)。**v1.35.0 起整段删除**。理由:它相对当时的 `wake-later`(**今 `send-later`**)只多两样——"周期节拍"与"提示词注入",而这两样**工作区自己就能做**(见上);且后者反而更强(**支持冷会话唤醒**,而 autopilot 要求目标会话已在内存里)。老会话 / 老文档里看到 `container_admin autopilot`、`autopilot-trajectory`、`--auto` 目录后缀、`[Autopilot Trajectory · 唤起]` 等字样,**均按本条理解**:那是已删除的机制。
283
283
 
284
284
  ### 6.6 安全模型
285
285
 
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-serenity-hooks",
3
- "version": "1.38.0",
3
+ "version": "1.39.0",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——11 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/handyman/localstore/container_admin/im-bridge/acc-diag;后两个按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 轨迹日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.5-rc.2(deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
package/lib/client.js CHANGED
@@ -4933,7 +4933,7 @@ Instruction-following style:
4933
4933
  })
4934
4934
  }) }),
4935
4935
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
4936
- title: "唤醒调度器(wake-later)",
4936
+ title: "唤醒调度器(条目来源:send-later)",
4937
4937
  desc: "投递已登记的“未来时刻 + 一条 message”(全局开关,默认开)",
4938
4938
  expandable: true,
4939
4939
  open: openWakeSched,
@@ -4946,7 +4946,7 @@ Instruction-following style:
4946
4946
  className: "ss-detailStack",
4947
4947
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4948
4948
  className: "ss-detailIntro",
4949
- children: "唤醒调度器全局闸(v1.34 独立开关):\n· 作用:把 CCC 唤醒注册表(AGENT_SESSIONS/wake-registry.json)里到点的条目投递给目标轨迹\n· 条目来源:`container_trajectory wake-later`(对自己或别的 trajectory 预约未来时刻 + 一条 message)\n· 默认开:条目全部由人类/agent 显式登记,无环境自主性 ⇒ 不需要“默认关”的实验保护\n· 唯一性:ACC 现存的**唯一**轨迹调度时钟(原并列的周期自唤醒闸已随 ACC 侧 autopilot 退场删除)\n· 精度:5min tick;补跑窗口 2h(超窗判 missed 留痕);fire-and-forget 无回执"
4949
+ children: "唤醒调度器全局闸(v1.34 独立开关):\n· 作用:把 CCC 唤醒注册表(AGENT_SESSIONS/wake-registry.json)里到点的条目投递给目标轨迹\n· 条目来源:`container_trajectory send-later`(对自己或别的 trajectory 预约未来时刻 + 一条 message)\n· 默认开:条目全部由人类/agent 显式登记,无环境自主性 ⇒ 不需要“默认关”的实验保护\n· 唯一性:ACC 现存的**唯一**轨迹调度时钟(原并列的周期自唤醒闸已随 ACC 侧 autopilot 退场删除)\n· 精度:5min tick;补跑窗口 2h(超窗判 missed 留痕);fire-and-forget 无回执"
4950
4950
  })
4951
4951
  })
4952
4952
  }) })
package/lib/index.js CHANGED
@@ -5,8 +5,8 @@ import { i as cccRootForExec, n as agentCwdFor, o as listCccs, r as cccRootForCw
5
5
  import { a as readWeixinCredential, c as weixinInboundDir, d as LOCALSTORE_SCOPES, f as checkLocalstoreGitCompliance, g as runLocalStore, h as readStore, i as matchWeixinRoute, l as weixinSessionIdFor, m as readGitTrack, n as extractWeixinText, o as readWeixinSettings, p as localstorePath, r as hasVoiceItem, s as sanitizeFileName$1, t as extractWeixinMedia } from "./weixin-route-B2ajFypI.js";
6
6
  import { a as readSkiffRoles, c as roleMsmWhitelist, d as systemPromptSource, f as trajectorySubset, i as isSkiffSessionId, l as roleToolWhitelist, n as buildSkiffBasePrompt, o as resolveRoleSystemPrompt, r as createRolePromptReader, s as resolveSkiffKind } from "./skiff-role-CEHL5cek.js";
7
7
  import { a as unregisterSkiffSession$1, i as skiffSessionSnapshot$1, n as skiffRoleFor$1, r as skiffSessionInfo$1, t as registerSkiffSession$1 } from "./skiff-registry-FTjoWQTQ.js";
8
- import { _ as sessionsRoot, a as DEFAULT_SESSION_SCOPE, b as summarize, c as createSession, d as getActiveSessionInfo, f as listSessions, g as sessionEvents$1, h as resolveSessionByTitle, i as resolveSessionTrajectoryLabel, l as extractSessionMdPathFromText, m as readActiveSessionMd, o as TRAJECTORY_ACTIONS, p as parseSessionContextFromEvents, r as readLastBound, s as clearActiveSessionInfo, t as appendBound, u as findSession, v as setActiveSessionInfo, x as useSession, y as showSession } from "./trajectory-bound-U3ZU_mI6.js";
9
- import { a as WAKE_CATCH_UP_MS, i as registerDisposer, n as sendToTrajectory, o as addWake, r as wakeSchedulerState, s as listWakes, t as registerWakeScheduler } from "./wake-scheduler-Ebdyvzuq.js";
8
+ import { _ as sessionsRoot, a as DEFAULT_SESSION_SCOPE, b as summarize, c as createSession, d as getActiveSessionInfo, f as listSessions, g as sessionEvents$1, h as resolveSessionByTitle, i as resolveSessionTrajectoryLabel, l as extractSessionMdPathFromText, m as readActiveSessionMd, o as TRAJECTORY_ACTIONS, p as parseSessionContextFromEvents, r as readLastBound, s as clearActiveSessionInfo, t as appendBound, u as findSession, v as setActiveSessionInfo, x as useSession, y as showSession } from "./trajectory-bound-CApZRbvx.js";
9
+ import { a as WAKE_CATCH_UP_MS, i as registerDisposer, n as sendToTrajectory, o as addWake, r as wakeSchedulerState, s as listWakes, t as registerWakeScheduler } from "./wake-scheduler-B50eu0jb.js";
10
10
  import { a as FACE_PORTS, c as MECHANISM_PORTS, i as ACP_HTTP_PORT, l as SKIFF_DEBUG_PORT, n as registerSettingsSection, o as GATEWAY_PORT, s as MAIN_WEB_PORT, t as readSimpleSettings, u as WEIXIN_SEND_PORT } from "./settings-section-DMDUoQum.js";
11
11
  import { a as markdownToPlainText, c as sendTyping, i as getUpdates, l as sniffImageExt, n as downloadMedia, o as sendFileMessage, r as getConfig, s as sendTextMessage, t as TypingStatus } from "./weixin-api-CtFYm53S.js";
12
12
  import z from "@deepseek-ai/schemastery";
@@ -955,7 +955,7 @@ const NPX_BIN = process.platform === "win32" ? "npx.cmd" : "npx";
955
955
  const ACC_CATALOG = `═══ ACC Usage Catalog ═══
956
956
  Directory of ACC capabilities — each area lists where to go for details (guides live with their feature; this catalog only points).
957
957
 
958
- ① 轨迹本体 → container_trajectory(list/show/create/use + rebuild 超限重建 + wake-later 未来一次性唤醒 + send-message 即时投递)
958
+ ① 轨迹本体 → container_trajectory(list/show/create/use + rebuild 超限重建 + send-now 即时投递 + send-later 未来一次性唤醒)
959
959
  原 logbook 已并入(v1.33 用户裁决:废除 logbook 词);close/archive 删(归档走 container_fs mv),
960
960
  health/qa/summary 分别并入 use / list,hook-develop-guide 并进 container_admin msm guide
961
961
  ② 认知质量框架 → praxis(eap/neat/cce 三合一——可实践理论注入,section 渐进披露,无参即目录)
@@ -965,8 +965,8 @@ Directory of ACC capabilities — each area lists where to go for details (guide
965
965
  专属工具(**默认对所有 CCC 隐藏**,只有在自己 exclusiveTools 里点名的 CCC 可见)→ acc-diag(运行态诊断)
966
966
  ④ 角色与对外面 → container_admin role(Skiff 认知子集角色:guide/validate/apply/list——skiff_admin 已并入)
967
967
  ACP(程序化 JSON-RPC 3100)/ Skiff 问答页(公网 ask)——面板「外部能力」组
968
- ⑤ 自主与接入 → container_trajectory wake-later(跨轨迹的"未来时刻 + 一条 message";fire-and-forget,无回执无回收)
969
- container_trajectory send-message(跨轨迹的**即时**递送:live 目标立即注入,非 live 冷载入——等效于直接 wake;**有同步回执**)
968
+ ⑤ 自主与接入 → container_trajectory send-now(跨轨迹的**即时**递送:live 目标立即注入,非 live 冷载入——等效于直接 wake;**有同步回执**)
969
+ container_trajectory send-later(跨轨迹的"未来时刻 + 一条 message";fire-and-forget,无回执无回收)
970
970
  weixin 微信桥(配置/扫码/路由/消息 hook——CCC 侧 weixin-doctor MSM:msm("weixin-doctor", ["guide"]))
971
971
  ⑥ CCC 配置总览 → container_admin msm ccc-config(9 段:handyman/sessionKeeper/localstore/hooks/safeMode/skiff/trajectory/weixin/**exclusiveTools**)
972
972
  ⑦ 注册表与安全 → mech-registry.json 由 container_admin msm register/deregister 管理(写保护——不可直接编辑)
@@ -1114,7 +1114,7 @@ CCC 的一条 trajectory = 持久身体(SESSION.md)+ 时间轴(AGENT_SESSI
1114
1114
  域/面板区块一并删除)。自主巡航改由 CCC 自己驱动(home-serenity 侧 msm autopilot-round 每轮自排下一轮,
1115
1115
  真相源 = S151 SESSION.md §1/§1b/§1c)。**本轮的 trajectory.autopilot 配置段保留**(见下表)——
1116
1116
  它现由 **CCC 侧脚本**读取,ACC 不再消费该段。
1117
- 唤醒注册表(container_trajectory wake-later):唤醒 = 未来时刻 + 一条 message,可唤醒自己或别的 trajectory;
1117
+ 唤醒注册表(container_trajectory send-later):唤醒 = 未来时刻 + 一条 message,可唤醒自己或别的 trajectory;
1118
1118
  落点 AGENT_SESSIONS/wake-registry.json,中心调度器到点投递(fire-and-forget;无回执、无回收)。
1119
1119
  运行态诊断(ACC 负责人专用):acc-diag(① live 运行态 / ①b 唤醒时钟 / ③ 唤醒注册表)。
1120
1120
 
@@ -2972,11 +2972,17 @@ function createHandymanTool(ctx) {
2972
2972
  * v1.33(S142 §32 用户裁决):由 `logbook` **更名并收敛为 `trajectory`**(v1.34:工具名再硬切为
2973
2973
  * `container_trajectory`,无别名)——trajectory 是一等概念
2974
2974
  * (SESSION.md 是它的持久身体),本工具管它的**载体生命周期 + 一次性时间安排**。
2975
- * 动作收敛为 **6 个**:list / show / create / use / rebuild / wake-later
2975
+ * 动作面现行 **7 个**:list / show / create / use / rebuild / **`send-now`** / **`send-later`**。
2976
2976
  * 🔴 2026-09-16(所有者裁决):**第 7 个动作 `send-message`(即时投递)**
2977
2977
  * ——与 `wake-later` 共用取用通路,差别只在**时刻**(现在 vs 未来)与**回执**(有 vs 无);
2978
2978
  * 实现落在 `wake-scheduler.ts` 的 `sendToTrajectory()`("怎么把一句话送到一条轨迹"是调度器的知识)。
2979
2979
  * 设计稿 = `docs/trajectory-send-message-design.md`(v0.2 定稿)。
2980
+ * 🔴 2026-09-17(所有者裁决 · **命名 A 案**):**两个投递动作更名** —— `wake-later` → **`send-later`**、
2981
+ * `send-message` → **`send-now`**。判据(R↓):两者本是**同一条投递通路**(同取用机制 / 同载荷 /
2982
+ * 同落点语义),只差**时刻**;而「唤醒(冷载入)」是**两条路径共有**的属性,不配做区分
2983
+ * ⇒ 族名取共享词干 **`send-`**、轴取 **`-now` / `-later`**(同构)。**硬切无别名**(D46/D61 先例);
2984
+ * 机制层词汇(`wake-registry.json` / `w-*` id / `WakeEntry` / 调度器名 / 配置键 `wakeSchedulerEnabled`)
2985
+ * **一律不动** —— 接受"机制叫 wake、动作叫 send-later"的**分层命名**(二者本是两层)。
2980
2986
  *
2981
2987
  * 与旧面(logbook 11 动作 + trajectory 12 动作)的对应(用户逐条裁决,R↓):
2982
2988
  * · `summary` → 并入 `list`(全库统计随清单一起给)
@@ -2988,7 +2994,7 @@ function createHandymanTool(ctx) {
2988
2994
  * 就不要自造协议 + 脚本管道」;轨迹挂哪些 skill 改由 SESSION.md frontmatter 声明 +
2989
2995
  * `systemPrompt.section` 注入,见 `docs/trajectory-skill-injection.md`)
2990
2996
  * · autopilot 面(all/init/random/diag/doc/check/status/guide)→ `container_admin` 的 autopilot 域
2991
- * · `wake-add`/`wake-list`/`wake-rm` → **`wake-later`**(一次登记;**不可回收、无面板**——用户明示接受)
2997
+ * · `wake-add`/`wake-list`/`wake-rm` → **`wake-later`**(v1.33 收敛;**2026-09-17 更名 `send-later`**)
2992
2998
  *
2993
2999
  * 保留 osp 对齐语义的部分:create 的 `--desc`/`--issue` 二选一、use 激活即重命名 dsh 会话标题(F3)。
2994
3000
  * 活跃会话跟踪:内存 Map(按 dsh 会话 id 隔离)+ 从 events 恢复(S134)。
@@ -3119,13 +3125,13 @@ function renderText$3(value) {
3119
3125
  function createTrajectoryTool(ctx) {
3120
3126
  return defineTool({
3121
3127
  name: "container_trajectory",
3122
- description: "Trajectory (AGENT_SESSIONS/ — the persistent body of a trajectory; the dsh conversation is only its rebuildable carrier). Lifecycle + delivery: list (inventory with stats and anomaly marks) / show (read one SESSION.md) / create / use (activate for this conversation, with inline integrity check) / rebuild (clear-and-rebuild the current conversation in place, Ship of Theseus) / wake-later (schedule ONE message to any trajectory at a future instant — fire-and-forget: no receipt, no recall, no panel) / send-message (deliver ONE message to a trajectory RIGHT NOW — live: injected immediately; not live: cold-resumed, i.e. equivalent to a direct wake; returns a synchronous receipt). create requires --desc <desc> [--goal] or --issue <ticket> (exactly one) plus --summary (≤20 chars). use requires --summary (≤20 chars) and may pass --force to switch away from the currently-bound trajectory. rebuild requires --summary (next-phase summary ≤20 chars) + optional --note (task focus for the rebuilt self). wake-later requires target (S### or AGENT_SESSIONS dir name) + at (RFC3339 or +30m/+2h) + message. send-message requires target + message. Its receipt means the message was QUEUED into the target (it does NOT mean the target ran or replied; a busy target applies it at its next round boundary). The summary is appended to the dsh session title (S###-YYYY-MM-DD-<summary>); the S### id and date stay server-derived.",
3128
+ description: "Trajectory (AGENT_SESSIONS/ — the persistent body of a trajectory; the dsh conversation is only its rebuildable carrier). Lifecycle + delivery: list (inventory with stats and anomaly marks) / show (read one SESSION.md) / create / use (activate for this conversation, with inline integrity check) / rebuild (clear-and-rebuild the current conversation in place, Ship of Theseus) / send-now (deliver ONE message to a trajectory RIGHT NOW — live: injected immediately; not live: cold-resumed, i.e. equivalent to a direct wake; returns a synchronous receipt) / send-later (schedule ONE message to any trajectory at a future instant — fire-and-forget: no receipt, no recall, no panel). create requires --desc <desc> [--goal] or --issue <ticket> (exactly one) plus --summary (≤20 chars). use requires --summary (≤20 chars) and may pass --force to switch away from the currently-bound trajectory. rebuild requires --summary (next-phase summary ≤20 chars) + optional --note (task focus for the rebuilt self). send-later requires target (S### or AGENT_SESSIONS dir name) + at (RFC3339 or +30m/+2h) + message. send-now requires target + message. Its receipt means the message was QUEUED into the target (it does NOT mean the target ran or replied; a busy target applies it at its next round boundary). The summary is appended to the dsh session title (S###-YYYY-MM-DD-<summary>); the S### id and date stay server-derived.",
3123
3129
  parameters: {
3124
3130
  action: {
3125
3131
  type: "string",
3126
3132
  enum: [...TRAJECTORY_ACTIONS],
3127
3133
  required: true,
3128
- description: "Subcommand: list (inventory + stats + anomaly marks) / show (S### or dir name or fuzzy keyword) / create (--desc or --issue) / use (activate context; inline integrity check — pass silent, problems reported as hints, not errors) / rebuild (clear-and-rebuild current conversation — requires --summary + optional --note) / wake-later (one future instant + one message, delivered to target trajectory) / send-message (deliver one message RIGHT NOW: live target injected immediately, non-live cold-resumed like a direct wake; returns a synchronous receipt)"
3134
+ description: "Subcommand: list (inventory + stats + anomaly marks) / show (S### or dir name or fuzzy keyword) / create (--desc or --issue) / use (activate context; inline integrity check — pass silent, problems reported as hints, not errors) / rebuild (clear-and-rebuild current conversation — requires --summary + optional --note) / send-now (deliver one message RIGHT NOW: live target injected immediately, non-live cold-resumed like a direct wake; returns a synchronous receipt) / send-later (one future instant + one message, delivered to target trajectory)"
3129
3135
  },
3130
3136
  name: {
3131
3137
  type: "string",
@@ -3161,15 +3167,15 @@ function createTrajectoryTool(ctx) {
3161
3167
  },
3162
3168
  target: {
3163
3169
  type: "string",
3164
- description: "wake-later/send-message: target trajectory (S### or AGENT_SESSIONS directory name)"
3170
+ description: "send-later/send-now: target trajectory (S### or AGENT_SESSIONS directory name)"
3165
3171
  },
3166
3172
  at: {
3167
3173
  type: "string",
3168
- description: "wake-later: future instant (RFC3339 with timezone, or relative +30m / +2h)"
3174
+ description: "send-later: future instant (RFC3339 with timezone, or relative +30m / +2h)"
3169
3175
  },
3170
3176
  message: {
3171
3177
  type: "string",
3172
- description: "wake-later/send-message: the single message delivered to the target trajectory"
3178
+ description: "send-later/send-now: the single message delivered to the target trajectory"
3173
3179
  }
3174
3180
  },
3175
3181
  output: {
@@ -3257,8 +3263,8 @@ function createTrajectoryTool(ctx) {
3257
3263
  instruction: "Queued clear-and-rebuild: when this turn ends, the same conversation will be cleared and injected with the \"continue the work\" anchor (first-anchor protocol body included), then auto-continue — no manual input needed; resume from SESSION.md at that point."
3258
3264
  };
3259
3265
  }
3260
- case "wake-later": {
3261
- if (!args.target || !args.at || !args.message) throw new Error("wake-later requires target (S### or dir name) + at (RFC3339 or +30m/+2h) + message");
3266
+ case "send-later": {
3267
+ if (!args.target || !args.at || !args.message) throw new Error("send-later requires target (S### or dir name) + at (RFC3339 or +30m/+2h) + message");
3262
3268
  const wakeScope = agentScope$2(exec);
3263
3269
  const res = addWake(root, {
3264
3270
  target: args.target,
@@ -3276,8 +3282,8 @@ function createTrajectoryTool(ctx) {
3276
3282
  output: `✓ 已登记唤醒\n${renderWakeEntry(res.entry)}`
3277
3283
  };
3278
3284
  }
3279
- case "send-message": {
3280
- if (!args.target || !args.message) throw new Error("send-message requires target (S### or dir name) + message");
3285
+ case "send-now": {
3286
+ if (!args.target || !args.message) throw new Error("send-now requires target (S### or dir name) + message");
3281
3287
  const sendScope = agentScope$2(exec);
3282
3288
  const res = await sendToTrajectory(ctx, root, args.target, args.message, resolveSessionTrajectoryLabel(exec.agent?.session, sendScope === "default" ? "" : sendScope));
3283
3289
  if (!res.ok) return {
@@ -3300,7 +3306,7 @@ function createTrajectoryTool(ctx) {
3300
3306
  });
3301
3307
  }
3302
3308
  /**
3303
- * 渲染一条唤醒条目(人读;`wake-later` 的登记回执)。
3309
+ * 渲染一条唤醒条目(人读;`send-later` 的登记回执)。
3304
3310
  * 显式写明"不可回收",因为这是用户明示接受的语义(D60 调整后:无 list/rm、无面板)。
3305
3311
  * @param e 刚登记的条目
3306
3312
  */
@@ -5598,7 +5604,7 @@ function toolsBlock() {
5598
5604
  "The ACC (this plugin) provides the following built-in tools:",
5599
5605
  "",
5600
5606
  " container_fs — container filesystem operations (15 subcommands: root/resolve/exists/list/tree/relative/mkdir/rm/mv/cp/touch/append/reveal/info/find)",
5601
- " container_trajectory — one trajectory: its persistent body (SESSION.md) + its timeline. Lifecycle: list (inventory + stats) / show / create / use (activate; inline integrity check — silent when fine) / rebuild (clear-and-rebuild this conversation in place, Ship of Theseus); delivery: wake-later (one future instant + one message to any trajectory; fire-and-forget — no receipt, no recall) / send-message (deliver one message RIGHT NOW; live target injected immediately, non-live cold-resumed like a direct wake — returns a synchronous receipt)",
5607
+ " container_trajectory — one trajectory: its persistent body (SESSION.md) + its timeline. Lifecycle: list (inventory + stats) / show / create / use (activate; inline integrity check — silent when fine) / rebuild (clear-and-rebuild this conversation in place, Ship of Theseus); delivery: send-now (deliver one message RIGHT NOW; live target injected immediately, non-live cold-resumed like a direct wake — returns a synchronous receipt) / send-later (one future instant + one message to any trajectory; fire-and-forget — no receipt, no recall)",
5602
5608
  " dashboard — always-on container instruments: health (CCC three-principle check + registry integrity) / time (now) / wait (N seconds)",
5603
5609
  " container_git— git operations (status/commit/push/log)",
5604
5610
  " msm — execute a registered CCC MSM: msm(name, args); partial name returns candidates; inspect=true shows usage",
@@ -4,11 +4,17 @@
4
4
  * v1.33(S142 §32 用户裁决):由 `logbook` **更名并收敛为 `trajectory`**(v1.34:工具名再硬切为
5
5
  * `container_trajectory`,无别名)——trajectory 是一等概念
6
6
  * (SESSION.md 是它的持久身体),本工具管它的**载体生命周期 + 一次性时间安排**。
7
- * 动作收敛为 **6 个**:list / show / create / use / rebuild / wake-later
7
+ * 动作面现行 **7 个**:list / show / create / use / rebuild / **`send-now`** / **`send-later`**。
8
8
  * 🔴 2026-09-16(所有者裁决):**第 7 个动作 `send-message`(即时投递)**
9
9
  * ——与 `wake-later` 共用取用通路,差别只在**时刻**(现在 vs 未来)与**回执**(有 vs 无);
10
10
  * 实现落在 `wake-scheduler.ts` 的 `sendToTrajectory()`("怎么把一句话送到一条轨迹"是调度器的知识)。
11
11
  * 设计稿 = `docs/trajectory-send-message-design.md`(v0.2 定稿)。
12
+ * 🔴 2026-09-17(所有者裁决 · **命名 A 案**):**两个投递动作更名** —— `wake-later` → **`send-later`**、
13
+ * `send-message` → **`send-now`**。判据(R↓):两者本是**同一条投递通路**(同取用机制 / 同载荷 /
14
+ * 同落点语义),只差**时刻**;而「唤醒(冷载入)」是**两条路径共有**的属性,不配做区分
15
+ * ⇒ 族名取共享词干 **`send-`**、轴取 **`-now` / `-later`**(同构)。**硬切无别名**(D46/D61 先例);
16
+ * 机制层词汇(`wake-registry.json` / `w-*` id / `WakeEntry` / 调度器名 / 配置键 `wakeSchedulerEnabled`)
17
+ * **一律不动** —— 接受"机制叫 wake、动作叫 send-later"的**分层命名**(二者本是两层)。
12
18
  *
13
19
  * 与旧面(logbook 11 动作 + trajectory 12 动作)的对应(用户逐条裁决,R↓):
14
20
  * · `summary` → 并入 `list`(全库统计随清单一起给)
@@ -20,7 +26,7 @@
20
26
  * 就不要自造协议 + 脚本管道」;轨迹挂哪些 skill 改由 SESSION.md frontmatter 声明 +
21
27
  * `systemPrompt.section` 注入,见 `docs/trajectory-skill-injection.md`)
22
28
  * · autopilot 面(all/init/random/diag/doc/check/status/guide)→ `container_admin` 的 autopilot 域
23
- * · `wake-add`/`wake-list`/`wake-rm` → **`wake-later`**(一次登记;**不可回收、无面板**——用户明示接受)
29
+ * · `wake-add`/`wake-list`/`wake-rm` → **`wake-later`**(v1.33 收敛;**2026-09-17 更名 `send-later`**)
24
30
  *
25
31
  * 保留 osp 对齐语义的部分:create 的 `--desc`/`--issue` 二选一、use 激活即重命名 dsh 会话标题(F3)。
26
32
  * 活跃会话跟踪:内存 Map(按 dsh 会话 id 隔离)+ 从 events 恢复(S134)。
@@ -7,8 +7,8 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync,
7
7
  *
8
8
  * 行为对齐 osp(opencode-serenity-plugin/src/session/lib.ts)——osp 是 ACC 工具 spec。
9
9
  *
10
- * v1.33 收敛(S142 §32):本文件只服务 `container_trajectory` 的 6 个动作
11
- * list / show / create / use / rebuild / wake-later)。旧 `logbook` 面里
10
+ * v1.33 收敛(S142 §32):本文件只服务 `container_trajectory` 的动作面
11
+ * (现行 **7 个**:list / show / create / use / rebuild / **send-now** / **send-later**)。旧 `logbook` 面里
12
12
  * **close / archive / health / qa 四个动作已删**(用户裁决「功能上废弃,实际上没用」),
13
13
  * 其函数(closeSession / archiveSessions / healthCheck / qaCheck)**同批删除**——
14
14
  * 保留下来的只有:create(--desc / --issue 二选一、dry-run 预览)、
@@ -21,8 +21,8 @@ const TRAJECTORY_ACTIONS = [
21
21
  "create",
22
22
  "use",
23
23
  "rebuild",
24
- "wake-later",
25
- "send-message"
24
+ "send-now",
25
+ "send-later"
26
26
  ];
27
27
  /**
28
28
  * 读取 Session 事件序列(v1.28.1 适配 0.1.2-rc.1 补齐):rc.1 起官方 Session 类
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * 行为对齐 osp(opencode-serenity-plugin/src/session/lib.ts)——osp 是 ACC 工具 spec。
5
5
  *
6
- * v1.33 收敛(S142 §32):本文件只服务 `container_trajectory` 的 6 个动作
7
- * list / show / create / use / rebuild / wake-later)。旧 `logbook` 面里
6
+ * v1.33 收敛(S142 §32):本文件只服务 `container_trajectory` 的动作面
7
+ * (现行 **7 个**:list / show / create / use / rebuild / **send-now** / **send-later**)。旧 `logbook` 面里
8
8
  * **close / archive / health / qa 四个动作已删**(用户裁决「功能上废弃,实际上没用」),
9
9
  * 其函数(closeSession / archiveSessions / healthCheck / qaCheck)**同批删除**——
10
10
  * 保留下来的只有:create(--desc / --issue 二选一、dry-run 预览)、
@@ -20,11 +20,17 @@
20
20
  * close/archive 删(completed 由 SESSION.md 的 `[x]` 推导;归档走 container_fs mv)|
21
21
  * hook-develop-guide 并进 container_admin msm guide|autopilot 面归 container_admin 的 autopilot 域
22
22
  * (该域 2026-09-15 随 ACC 侧 autopilot 退场删除)|
23
- * wake-add/list/rm 收敛为 wake-later
24
- * 2026-09-16(所有者裁决):新增 **send-message** —— 即时投递(与 wake-later 共用取用通路,
25
- * 差别只在时刻"现在 vs 未来"与回执"有 vs 无")。设计稿 docs/trajectory-send-message-design.md。
23
+ * wake-add/list/rm 收敛为 wake-later(**2026-09-17 更名 `send-later`**)。
24
+ * 2026-09-16(所有者裁决):新增 **send-message**(**2026-09-17 更名 `send-now`**)—— 即时投递
25
+ * (与 wake-later 共用取用通路,差别只在时刻"现在 vs 未来"与回执"有 vs 无")。
26
+ * 设计稿 docs/trajectory-send-message-design.md。
27
+ * 2026-09-17(所有者裁决 · 命名 A 案):**两个投递动作更名** —— `wake-later` → **`send-later`**、
28
+ * `send-message` → **`send-now`**。判据(R↓):两者是**同一条投递通路**(同取用机制 / 同载荷 /
29
+ * 同落点语义),只差**时刻**;而「唤醒(冷载入)」是**两条路径共有**的属性,不配做区分
30
+ * ⇒ 族名取共享词干 **`send-`**、轴取 **`-now` / `-later`**(同构)。**硬切无别名**;
31
+ * 机制层词汇(`wake-registry.json` / `w-*` id / `WakeEntry` / 调度器名)**一律不动**(分层命名)。
26
32
  */
27
- type TrajectoryAction = 'list' | 'show' | 'create' | 'use' | 'rebuild' | 'wake-later' | 'send-message';
33
+ type TrajectoryAction = 'list' | 'show' | 'create' | 'use' | 'rebuild' | 'send-now' | 'send-later';
28
34
  export declare const TRAJECTORY_ACTIONS: readonly TrajectoryAction[];
29
35
  /**
30
36
  * 读取 Session 事件序列(v1.28.1 适配 0.1.2-rc.1 补齐):rc.1 起官方 Session 类
@@ -1,6 +1,6 @@
1
1
  import { r as hostService, t as hostAgents } from "./access-fiehjxV6.js";
2
2
  import { o as listCccs } from "./ccc-roots-Bd_SjEs7.js";
3
- import { _ as sessionsRoot, n as listBoundSessionIds, u as findSession } from "./trajectory-bound-U3ZU_mI6.js";
3
+ import { _ as sessionsRoot, n as listBoundSessionIds, u as findSession } from "./trajectory-bound-CApZRbvx.js";
4
4
  import { t as readSimpleSettings } from "./settings-section-DMDUoQum.js";
5
5
  import { basename, dirname, join } from "node:path";
6
6
  import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
@@ -525,7 +525,7 @@ function resolveWakeTarget(root, target) {
525
525
  * ⚠️ 2026-09-15 用户裁决(S-1 **解耦**):「auto-trajectory 的开关**只关闭 auto-trajectory 唤醒**」。
526
526
  * ⇒ 本函数**不得**再把 `autopilotEnabled`(周期自唤醒闸)作为回退键 —— 旧实现是
527
527
  * `trajectoryEnabled === true || autopilotEnabled === true`,后果实测:所有者关掉 auto-trajectory 后,
528
- * **一次性唤醒 `wake-later` 被连带关掉**,注册表条目静默滞留(当日 6.6h 零 tick)。
528
+ * **一次性唤醒 `wake-later`(今 `send-later`)被连带关掉**,注册表条目静默滞留(当日 6.6h 零 tick)。
529
529
  * 缺省由 false 改 true 的理由:唤醒注册表已是一等机制(D58),条目**全部由人类/agent 显式登记**
530
530
  * 未来时刻(无环境自主性),不需要"默认关"的实验保护;代价 = 一个 unref 的 5min 空检查。
531
531
  *
@@ -673,10 +673,10 @@ function buildSendText(target, message, sender) {
673
673
  ].join("\n");
674
674
  }
675
675
  /**
676
- * 即时投递(`container_trajectory send-message`)——与唤醒**共用取用通路**,
676
+ * 即时投递(`container_trajectory send-now`)——与 `send-later`(预约)**共用取用通路**(`acquireWakeAgent`),
677
677
  * 区别只在**时刻**(现在 vs 未来)与**回执**(有 vs 无):
678
- * · `wake-later`:未来时刻 + 一条 message → 落注册表 → 本文件的调度器到点投递(**fire-and-forget,无回执**)
679
- * · `send-message`:**此刻**把一条 message 递进目标队列 → **同步回执** → **不落注册表**
678
+ * · `send-later`(原 `wake-later`):未来时刻 + 一条 message → 落注册表 → 本文件的调度器到点投递(**fire-and-forget,无回执**)
679
+ * · `send-now`(原 `send-message`):**此刻**把一条 message 递进目标队列 → **同步回执** → **不落注册表**
680
680
  *
681
681
  * **为什么冷路径落在这里(R↓,2026-09-16 所有者裁决)**:`addWake` 显式拒绝 `at ≤ now`
682
682
  * ("时刻必须在未来"——那是"**预约**"语义的地基,不许放宽)⇒ 即时投递**不能**靠一条
@@ -691,7 +691,7 @@ function buildSendText(target, message, sender) {
691
691
  *
692
692
  * **归属**:本函数放在调度器侧而非工具侧 —— "怎么把一句话送到一条轨迹"是**调度器的知识**,
693
693
  * 工具只该知道"有这个动作"。这样 `trajectory.ts` 完全不碰调度器内部(v1.35.0 硬约束①:
694
- * `wake-later` 链路**一行为不动**,本次改动 = **纯新增**)。
694
+ * `send-later` 链路**一行为不动**,本次改动 = **纯新增**)。
695
695
  *
696
696
  * @param ctx 插件上下文
697
697
  * @param root CCC 根
@@ -80,10 +80,10 @@ export declare function deliverWake(ctx: Context, root: string, entry: WakeEntry
80
80
  */
81
81
  export declare function buildSendText(target: WakeTarget, message: string, sender: string): string;
82
82
  /**
83
- * 即时投递(`container_trajectory send-message`)——与唤醒**共用取用通路**,
83
+ * 即时投递(`container_trajectory send-now`)——与 `send-later`(预约)**共用取用通路**(`acquireWakeAgent`),
84
84
  * 区别只在**时刻**(现在 vs 未来)与**回执**(有 vs 无):
85
- * · `wake-later`:未来时刻 + 一条 message → 落注册表 → 本文件的调度器到点投递(**fire-and-forget,无回执**)
86
- * · `send-message`:**此刻**把一条 message 递进目标队列 → **同步回执** → **不落注册表**
85
+ * · `send-later`(原 `wake-later`):未来时刻 + 一条 message → 落注册表 → 本文件的调度器到点投递(**fire-and-forget,无回执**)
86
+ * · `send-now`(原 `send-message`):**此刻**把一条 message 递进目标队列 → **同步回执** → **不落注册表**
87
87
  *
88
88
  * **为什么冷路径落在这里(R↓,2026-09-16 所有者裁决)**:`addWake` 显式拒绝 `at ≤ now`
89
89
  * ("时刻必须在未来"——那是"**预约**"语义的地基,不许放宽)⇒ 即时投递**不能**靠一条
@@ -98,7 +98,7 @@ export declare function buildSendText(target: WakeTarget, message: string, sende
98
98
  *
99
99
  * **归属**:本函数放在调度器侧而非工具侧 —— "怎么把一句话送到一条轨迹"是**调度器的知识**,
100
100
  * 工具只该知道"有这个动作"。这样 `trajectory.ts` 完全不碰调度器内部(v1.35.0 硬约束①:
101
- * `wake-later` 链路**一行为不动**,本次改动 = **纯新增**)。
101
+ * `send-later` 链路**一行为不动**,本次改动 = **纯新增**)。
102
102
  *
103
103
  * @param ctx 插件上下文
104
104
  * @param root CCC 根
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.38.0",
3
+ "version": "1.39.0",
4
4
  "description": "宁静号 ACC harness(Native Cordis 插件)——给 DeepSeek Harness 装一个「AI 工作区」:11 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/handyman/localstore/container_admin/im-bridge/acc-diag)+ 机械约束(安全模式/工作区围墙/密钥守卫/对外输出守卫)+ 工作日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.5-rc.2。",
5
5
  "license": "MIT",
6
6
  "repository": {