@sema-agent/server 7.52.1 → 7.53.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.
Files changed (323) hide show
  1. package/USAGE.md +2 -1
  2. package/dist/adoption/plan.d.ts +3 -3
  3. package/dist/adoption/quiesce.d.ts +1 -1
  4. package/dist/adoption/sql.d.ts +2 -2
  5. package/dist/adoption/wire.d.ts +1 -1
  6. package/dist/approval-ask-machine.d.ts +2 -2
  7. package/dist/approval-card.d.ts +18 -18
  8. package/dist/approval-deny-reasons.d.ts +1 -1
  9. package/dist/approval-hmac.d.ts +2 -2
  10. package/dist/approval-reconciler.d.ts +14 -14
  11. package/dist/approval.d.ts +2 -2
  12. package/dist/audit.d.ts +4 -4
  13. package/dist/auth-keys.d.ts +6 -6
  14. package/dist/bench/l8/artifact.d.ts +6 -1
  15. package/dist/bench/l8/artifact.js +2 -27
  16. package/dist/bench/l8/escape.d.ts +3 -3
  17. package/dist/bench/l8/index.d.ts +1 -1
  18. package/dist/bench/s1/arms.d.ts +3 -3
  19. package/dist/bench/s1/oracle.d.ts +2 -2
  20. package/dist/bench/s1/reviewer.d.ts +1 -1
  21. package/dist/bench/s1/row.d.ts +5 -5
  22. package/dist/bench/s1/runner-ctx.d.ts +3 -3
  23. package/dist/boot/config-center.d.ts +14 -7
  24. package/dist/boot/config-center.js +2 -0
  25. package/dist/boot/coordinators.d.ts +4 -4
  26. package/dist/boot/crash-last.d.ts +1 -1
  27. package/dist/boot/device-lane.d.ts +3 -3
  28. package/dist/boot/engine-lease.d.ts +4 -4
  29. package/dist/boot/governance-seams.d.ts +5 -5
  30. package/dist/boot/leader.d.ts +5 -5
  31. package/dist/boot/limit-sync.d.ts +1 -1
  32. package/dist/boot/memory-boundary.d.ts +5 -5
  33. package/dist/boot/memory-consolidation.d.ts +8 -2
  34. package/dist/boot/memory-consolidation.js +1 -0
  35. package/dist/boot/org-memory.d.ts +5 -5
  36. package/dist/boot/parked-revive-gate.d.ts +6 -6
  37. package/dist/boot/permission-rules-audit.d.ts +2 -2
  38. package/dist/boot/reapers.d.ts +8 -8
  39. package/dist/boot/resolve-spec.d.ts +4 -4
  40. package/dist/boot/retention-lane.d.ts +1 -1
  41. package/dist/boot/runner-deps.d.ts +33 -27
  42. package/dist/boot/runner-deps.js +2 -1
  43. package/dist/boot/runtime-caps.d.ts +4 -4
  44. package/dist/boot/session-faces.d.ts +1 -1
  45. package/dist/boot/shutdown.d.ts +10 -10
  46. package/dist/boot/side-query-lane.d.ts +14 -14
  47. package/dist/boot/stores.js +5 -0
  48. package/dist/boot/task-list-lane.d.ts +3 -3
  49. package/dist/boot/webfetch-summarize-lane.d.ts +9 -9
  50. package/dist/boot/workflow-orchestration.d.ts +1 -1
  51. package/dist/bounded-session-map.d.ts +1 -1
  52. package/dist/brain.d.ts +3 -3
  53. package/dist/budget.d.ts +3 -3
  54. package/dist/canonical-json.d.ts +53 -0
  55. package/dist/canonical-json.js +48 -0
  56. package/dist/capabilities/center-prompts.d.ts +13 -13
  57. package/dist/capabilities/collab-workflows.d.ts +1 -1
  58. package/dist/capabilities/hands-lane.d.ts +4 -4
  59. package/dist/capabilities/memory-notice.d.ts +4 -4
  60. package/dist/capabilities/prompt.d.ts +2 -2
  61. package/dist/capabilities/sandbox-file-send.d.ts +2 -2
  62. package/dist/capabilities/scenarios.d.ts +16 -16
  63. package/dist/capabilities/skills.d.ts +1 -1
  64. package/dist/capabilities/team.d.ts +3 -3
  65. package/dist/capabilities/tool-defer.d.ts +6 -6
  66. package/dist/config-catalog.d.ts +139 -0
  67. package/dist/config-catalog.js +556 -0
  68. package/dist/config-center/apply-effective.d.ts +20 -7
  69. package/dist/config-center/apply-effective.js +45 -0
  70. package/dist/config-center/apply-ledger.d.ts +6 -6
  71. package/dist/config-center/facade.d.ts +3 -2
  72. package/dist/config-center/hot-keys-registry.d.ts +2 -2
  73. package/dist/config-center/http-client.d.ts +5 -5
  74. package/dist/config-center/mcp-revocation.d.ts +6 -4
  75. package/dist/config-center/mcp-revocation.js +2 -12
  76. package/dist/config-center/restart-signal.d.ts +11 -1
  77. package/dist/config-center/restart-signal.js +1 -1
  78. package/dist/config-center/skills-mcp.d.ts +2 -2
  79. package/dist/config-center/stage-limits.d.ts +3 -3
  80. package/dist/config-center/types.d.ts +23 -19
  81. package/dist/config-invariants.d.ts +1 -1
  82. package/dist/config-provider.d.ts +2 -2
  83. package/dist/config-types.d.ts +140 -132
  84. package/dist/config.d.ts +22 -22
  85. package/dist/config.js +2 -1
  86. package/dist/degenerate-instrument.d.ts +1 -1
  87. package/dist/deployment-governance.d.ts +13 -13
  88. package/dist/device-store.d.ts +2 -2
  89. package/dist/device-ws-hub.d.ts +3 -3
  90. package/dist/device-ws-protocol.d.ts +3 -3
  91. package/dist/digest-form.d.ts +1 -1
  92. package/dist/elicitation.d.ts +1 -1
  93. package/dist/env-facts.d.ts +7 -7
  94. package/dist/execution-lane-caps.d.ts +5 -5
  95. package/dist/fleet/fleet-bus.d.ts +53 -53
  96. package/dist/fleet/fleet-reconciler.d.ts +2 -2
  97. package/dist/fleet/fleet-terminal-window.d.ts +1 -1
  98. package/dist/fleet/subagent-tail-bus.d.ts +3 -3
  99. package/dist/fleet-client.d.ts +3 -3
  100. package/dist/fleet-lease.d.ts +1 -1
  101. package/dist/hooks/branch-transcript.d.ts +2 -2
  102. package/dist/hooks/cc-agent-hook-prompt.d.ts +2 -2
  103. package/dist/hooks/cc-stop-prompt.d.ts +2 -2
  104. package/dist/hooks/hook-llm.d.ts +1 -1
  105. package/dist/hooks/hook-runner.d.ts +5 -5
  106. package/dist/http/active-run-conflict.d.ts +31 -33
  107. package/dist/http/active-run-conflict.js +4 -2
  108. package/dist/http/route-ctx.d.ts +22 -22
  109. package/dist/http/routes/a2a-serve.d.ts +2 -2
  110. package/dist/http/routes/admin-config-refresh.d.ts +1 -1
  111. package/dist/http/routes/admin-drain.d.ts +4 -4
  112. package/dist/http/routes/admin-memory-optout.d.ts +5 -5
  113. package/dist/http/routes/adoption.d.ts +1 -1
  114. package/dist/http/routes/agents-roster.d.ts +1 -1
  115. package/dist/http/routes/approvals-assistant.d.ts +6 -6
  116. package/dist/http/routes/approvals-assistant.js +4 -1
  117. package/dist/http/routes/capabilities.d.ts +1 -1
  118. package/dist/http/routes/capabilities.js +1 -0
  119. package/dist/http/routes/config-catalog.d.ts +28 -0
  120. package/dist/http/routes/config-catalog.js +42 -0
  121. package/dist/http/routes/diagnostics.d.ts +2 -2
  122. package/dist/http/routes/fleet.d.ts +1 -1
  123. package/dist/http/routes/images.d.ts +1 -1
  124. package/dist/http/routes/leader.d.ts +1 -1
  125. package/dist/http/routes/memory-bundle.d.ts +4 -4
  126. package/dist/http/routes/memory-compliance.d.ts +7 -7
  127. package/dist/http/routes/memory-consolidation.d.ts +1 -1
  128. package/dist/http/routes/memory-origin.d.ts +9 -9
  129. package/dist/http/routes/memory-policy.d.ts +3 -3
  130. package/dist/http/routes/notify-wake.d.ts +1 -1
  131. package/dist/http/routes/observability.d.ts +1 -1
  132. package/dist/http/routes/retention-ops.d.ts +1 -1
  133. package/dist/http/routes/rules.d.ts +3 -3
  134. package/dist/http/routes/run-memory-capture.d.ts +1 -1
  135. package/dist/http/routes/runs.d.ts +3 -3
  136. package/dist/http/routes/runs.js +12 -17
  137. package/dist/http/routes/session-sync.d.ts +2 -2
  138. package/dist/http/routes/sessions-list.d.ts +1 -1
  139. package/dist/http/routes/sessions.d.ts +9 -1
  140. package/dist/http/routes/sessions.js +60 -0
  141. package/dist/http/routes/shared-memory.d.ts +1 -1
  142. package/dist/http/routes/side-query.d.ts +1 -1
  143. package/dist/http/routes/tasks.d.ts +1 -1
  144. package/dist/http/routes/trace-usage.d.ts +1 -1
  145. package/dist/http/routes/workflows.d.ts +1 -1
  146. package/dist/http/run-meta.d.ts +1 -1
  147. package/dist/http/send.d.ts +6 -6
  148. package/dist/http/server.d.ts +84 -67
  149. package/dist/http/server.js +20 -10
  150. package/dist/http/sse-lifecycle.d.ts +1 -1
  151. package/dist/http/sse-log.d.ts +6 -6
  152. package/dist/http/verify-rounds.d.ts +3 -3
  153. package/dist/http/wire-gate.d.ts +2 -2
  154. package/dist/http/wire-types.d.ts +38 -38
  155. package/dist/key-resolver.d.ts +1 -1
  156. package/dist/leader/diffout.d.ts +2 -2
  157. package/dist/leader/diffup.d.ts +1 -1
  158. package/dist/leader/endpoint.d.ts +1 -1
  159. package/dist/leader/fanout.d.ts +6 -6
  160. package/dist/leader/grader-env-factory.d.ts +1 -1
  161. package/dist/leader/leader.d.ts +12 -12
  162. package/dist/leader/merge.d.ts +3 -3
  163. package/dist/leader/planner.d.ts +5 -5
  164. package/dist/leader/repair-oracle.d.ts +1 -1
  165. package/dist/leader/wire.d.ts +9 -9
  166. package/dist/lsp/manager.d.ts +2 -2
  167. package/dist/lsp/types.d.ts +1 -1
  168. package/dist/lsp/ws-transport.d.ts +2 -2
  169. package/dist/main.js +12 -2
  170. package/dist/mcp-content-origin.d.ts +1 -1
  171. package/dist/memory-bundle-engine.d.ts +5 -3
  172. package/dist/memory-bundle-engine.js +2 -2
  173. package/dist/memory-operator-faces.d.ts +41 -11
  174. package/dist/memory-operator-faces.js +12 -0
  175. package/dist/memory-origin-fence.d.ts +1 -1
  176. package/dist/memory-origin-fence.js +2 -13
  177. package/dist/memory-posture.d.ts +6 -6
  178. package/dist/memory-scope.d.ts +7 -7
  179. package/dist/model-select.d.ts +5 -5
  180. package/dist/observability/cost-quota.d.ts +6 -6
  181. package/dist/observability/cost-taxonomy.d.ts +2 -2
  182. package/dist/observability/fail-open.d.ts +1 -5
  183. package/dist/observability/fail-open.js +0 -4
  184. package/dist/observability/metrics.d.ts +1 -1
  185. package/dist/observability/prompt-manifest.d.ts +8 -8
  186. package/dist/observability/rate-limit.d.ts +2 -2
  187. package/dist/observability/secret-env-scrub.d.ts +1 -1
  188. package/dist/observability/tool-trace.d.ts +1 -1
  189. package/dist/orchestration/hardened-vm-runner.d.ts +6 -6
  190. package/dist/orchestration/hardened-vm-worker-runner.d.ts +1 -1
  191. package/dist/orchestration/subagent-steer.d.ts +3 -3
  192. package/dist/orchestration/workflow-agent-steer.d.ts +1 -1
  193. package/dist/orchestration/workflow-completion-inbox.d.ts +6 -6
  194. package/dist/orchestration/workflow-notify-journal.d.ts +6 -6
  195. package/dist/parent-watch.d.ts +1 -1
  196. package/dist/parked-decide.d.ts +11 -11
  197. package/dist/plan-cache-probe.d.ts +1 -1
  198. package/dist/plugins/adoption-log-sql.d.ts +4 -4
  199. package/dist/plugins/approval-ask-store-memory.d.ts +1 -1
  200. package/dist/plugins/approval-ask-store-memory.js +12 -0
  201. package/dist/plugins/approval-ask-store-sql.d.ts +39 -17
  202. package/dist/plugins/approval-ask-store-sql.js +23 -6
  203. package/dist/plugins/approval-payload-fingerprint.d.ts +23 -0
  204. package/dist/plugins/approval-payload-fingerprint.js +23 -0
  205. package/dist/plugins/background-agent-store-sql.d.ts +8 -8
  206. package/dist/plugins/background-shell-support.d.ts +12 -12
  207. package/dist/plugins/blob-backend.d.ts +3 -3
  208. package/dist/plugins/breaker-state-sql.d.ts +3 -3
  209. package/dist/plugins/caching-session-store.d.ts +6 -6
  210. package/dist/plugins/checkpoint-store-sql.d.ts +162 -66
  211. package/dist/plugins/checkpoint-store-sql.js +76 -33
  212. package/dist/plugins/device-store-sql.d.ts +4 -3
  213. package/dist/plugins/e2b-orphan-reclaim.d.ts +3 -3
  214. package/dist/plugins/file-history-store-sql.d.ts +9 -8
  215. package/dist/plugins/file-run-store.d.ts +27 -27
  216. package/dist/plugins/fork-routing-session-store.d.ts +9 -9
  217. package/dist/plugins/image-bake-store-sql.d.ts +1 -1
  218. package/dist/plugins/image-index-sql.d.ts +2 -2
  219. package/dist/plugins/k8s-bg-scripts.d.ts +1 -1
  220. package/dist/plugins/k8s-exec-protocol.d.ts +1 -1
  221. package/dist/plugins/leader-run-store-sql.d.ts +1 -1
  222. package/dist/plugins/local-checkpoint-store.d.ts +26 -17
  223. package/dist/plugins/local-checkpoint-store.js +21 -11
  224. package/dist/plugins/local-session-store.d.ts +5 -5
  225. package/dist/plugins/mailbox-store-sql.d.ts +6 -6
  226. package/dist/plugins/memory-embedder-fingerprint.d.ts +2 -2
  227. package/dist/plugins/memory-engine-pg.d.ts +1 -1
  228. package/dist/plugins/memory-engine-tidb.d.ts +1 -1
  229. package/dist/plugins/memory-key-guards.d.ts +3 -3
  230. package/dist/plugins/memory-optout-grant-store-sql.d.ts +10 -10
  231. package/dist/plugins/memory-origin-law.d.ts +13 -13
  232. package/dist/plugins/memory-run-store.d.ts +12 -12
  233. package/dist/plugins/outcome-ledger-sql.d.ts +3 -3
  234. package/dist/plugins/permission-rule-store-file.d.ts +3 -3
  235. package/dist/plugins/permission-rule-store-sql.d.ts +38 -33
  236. package/dist/plugins/permission-rule-store-sql.js +7 -12
  237. package/dist/plugins/pg-cost-quota.d.ts +2 -2
  238. package/dist/plugins/pg-pool.js +5 -0
  239. package/dist/plugins/pg-query.d.ts +1 -1
  240. package/dist/plugins/pg-rate-limiter.d.ts +2 -2
  241. package/dist/plugins/pg-session-storage.d.ts +9 -9
  242. package/dist/plugins/remote-env-adb.d.ts +1 -1
  243. package/dist/plugins/remote-env-device.d.ts +2 -2
  244. package/dist/plugins/remote-env-e2b.d.ts +11 -11
  245. package/dist/plugins/remote-env-file-error.d.ts +2 -2
  246. package/dist/plugins/remote-env-host.d.ts +10 -10
  247. package/dist/plugins/remote-env-k8s.d.ts +7 -7
  248. package/dist/plugins/remote-env-local-docker.d.ts +1 -1
  249. package/dist/plugins/remote-env-ssh.d.ts +9 -9
  250. package/dist/plugins/remote-scratchpad.d.ts +1 -1
  251. package/dist/plugins/resume-anchor-store-sql.d.ts +1 -1
  252. package/dist/plugins/retention-lane-store-sql.d.ts +2 -2
  253. package/dist/plugins/retention-store-sql.d.ts +11 -11
  254. package/dist/plugins/roster-store-sql.d.ts +5 -5
  255. package/dist/plugins/run-store-sql.d.ts +12 -12
  256. package/dist/plugins/scheduler-support.d.ts +1 -1
  257. package/dist/plugins/send-user-file.d.ts +1 -1
  258. package/dist/plugins/session-capture-record-store-sql.d.ts +99 -0
  259. package/dist/plugins/session-capture-record-store-sql.js +110 -0
  260. package/dist/plugins/session-placement.d.ts +1 -1
  261. package/dist/plugins/session-policy-store-sql.d.ts +2 -2
  262. package/dist/plugins/session-store.d.ts +3 -3
  263. package/dist/plugins/shared-memory-store-sql.d.ts +5 -5
  264. package/dist/plugins/sql-driver.d.ts +7 -7
  265. package/dist/plugins/sql-errors.d.ts +2 -2
  266. package/dist/plugins/sql-escape.d.ts +1 -1
  267. package/dist/plugins/sql-row-helpers.d.ts +1 -1
  268. package/dist/plugins/store-backend.d.ts +32 -19
  269. package/dist/plugins/store-backend.js +4 -0
  270. package/dist/plugins/store-contracts.d.ts +9 -9
  271. package/dist/plugins/task-list-store-sql.d.ts +3 -3
  272. package/dist/plugins/tidb-cost-quota.d.ts +3 -3
  273. package/dist/plugins/tidb-pool.js +9 -0
  274. package/dist/plugins/tidb-rate-limiter.d.ts +2 -2
  275. package/dist/plugins/tidb-session-storage.d.ts +2 -2
  276. package/dist/plugins/tidb-session-store.d.ts +11 -11
  277. package/dist/plugins/tool-result-store-sql.d.ts +8 -8
  278. package/dist/plugins/usage-window-store-sql.d.ts +3 -3
  279. package/dist/plugins/web-search.d.ts +7 -7
  280. package/dist/plugins/workflow-journal-store-sql.d.ts +6 -6
  281. package/dist/plugins/workflow-run-store-sql.d.ts +1 -1
  282. package/dist/plugins/write-behind-counter.d.ts +6 -6
  283. package/dist/principal-jwt.d.ts +2 -2
  284. package/dist/project-memory.d.ts +1 -1
  285. package/dist/prompts-domain-validate.d.ts +8 -8
  286. package/dist/question.d.ts +3 -3
  287. package/dist/resource-suspend.d.ts +4 -4
  288. package/dist/resource-window.d.ts +3 -3
  289. package/dist/router/route-orchestration.d.ts +1 -1
  290. package/dist/rules-consent.d.ts +48 -40
  291. package/dist/run-local.d.ts +5 -5
  292. package/dist/runs.d.ts +19 -19
  293. package/dist/runtime-caps-resolver.d.ts +6 -6
  294. package/dist/runtime-governance.d.ts +7 -7
  295. package/dist/security.d.ts +13 -13
  296. package/dist/session-leaf-bus.d.ts +1 -1
  297. package/dist/session-sync-content.d.ts +4 -4
  298. package/dist/session-sync-kernel.d.ts +2 -2
  299. package/dist/session-sync.d.ts +13 -13
  300. package/dist/session-titler.d.ts +1 -1
  301. package/dist/session-watch.d.ts +3 -3
  302. package/dist/shared-memory-scope-authorizer.d.ts +4 -4
  303. package/dist/sighup-idle.d.ts +1 -1
  304. package/dist/spec-fields.d.ts +20 -20
  305. package/dist/ssh-host-key.d.ts +5 -5
  306. package/dist/store-live-probe.d.ts +2 -2
  307. package/dist/task-cwd.d.ts +11 -11
  308. package/dist/task-mcp.d.ts +5 -5
  309. package/dist/task-settings.d.ts +35 -35
  310. package/dist/task-workflow.d.ts +3 -3
  311. package/dist/text-bidi.d.ts +1 -1
  312. package/dist/tool-approval.d.ts +171 -160
  313. package/dist/tool-approval.js +33 -28
  314. package/dist/trace/core-keyset-guard.d.ts +19 -5
  315. package/dist/trace/engine-notice-wire.d.ts +6 -6
  316. package/dist/trace/injection-tier.d.ts +2 -2
  317. package/dist/trace/ledger-events.d.ts +3 -3
  318. package/dist/trace/ledger-sink.d.ts +7 -7
  319. package/dist/trace/project.d.ts +30 -30
  320. package/dist/turn-activity.d.ts +4 -4
  321. package/dist/usage-analytics.d.ts +1 -1
  322. package/dist/wall-clock-jump-guard.d.ts +3 -3
  323. package/package.json +5 -5
@@ -1,12 +1,12 @@
1
1
  import type { TaskNotificationPayload, WorkflowRun } from "@sema-agent/core";
2
2
  import type { RunRecord } from "../plugins/store-contracts.js";
3
- /** [2687-cli] 幽灵行案的单源判别:一条 `task_notification` 只有在 **agent 族 × 终态** 时才允许打
3
+ /** [ref] 幽灵行案的单源判别:一条 `task_notification` 只有在 **agent 族 × 终态** 时才允许打
4
4
  * `onChildTerminal`(fleet「subagent 树」只渲 agent 子代)。`background_bash`/`monitor`/`external`
5
5
  * 不属 agent fleet 树——它们此前每条都打,fleet-bus 的「无 tick 无 claim」臂给 b\* 与 m\* handle 合成
6
6
  * agent 形瞬态终帧,壳终态留存池把这帧渲 60s = footer 幽灵子行;monitor 的 `status:"event"` 还被
7
7
  * 终态映射折成 `failed`。
8
8
  *
9
- * 🔴 A-033.1(#256):判别**本体已换 core 的 {@link isDelegatedAgentTerminal}**。此前这里是一份手写语义
9
+ * 🔴 [ref]([ref]):判别**本体已换 core 的 {@link isDelegatedAgentTerminal}**。此前这里是一份手写语义
10
10
  * 孪生(自己枚举 `completed|failed|killed|cancelled`),头注自陈「与 core 语义同源——core 根导出后换装
11
11
  * import 删本镜像」。core 现已从包根导出(`index.d.ts:109`),且它的终态集与 pending 店的驱逐偏好共用
12
12
  * 同一份 `TERMINAL_STATUSES`(core 原话:「so "terminal" can never mean two things in this module」)——
@@ -31,11 +31,11 @@ export type FleetTaskStatus = "queued" | "running" | "waiting" | "stopping" | "a
31
31
  * shell-local render state the renderer composes; the wire carries the data that TRANSITIONS). */
32
32
  export interface FleetTaskRow {
33
33
  id: string;
34
- /** 显示名。**缺席不铸**([2070]③ cli 定谳,server 3.5.1):没有真名时本键**不发**。
34
+ /** 显示名。**缺席不铸**([ref]③ cli 定谳,server 3.5.1):没有真名时本键**不发**。
35
35
  * ⚠️ 两代语义留档 —— 3.5.0 及以前,三处在无真名时把**行 id** 顶到本位(匿名子代 tick 铸子代 uuid、
36
36
  * `onChildTerminal` 合成终帧铸 a\* handle、`publishTask` 懒铸底座铸行 id),于是人眼看到一串乱码
37
37
  * (clay 亲报的「子代名乱码」形),消费端也**分不清**「它就叫这个」与「我们不知道它叫什么」。
38
- * 3.5.1 起后者 = 键缺席,显示占位归客户端渲(cli 已收敛 `'(unnamed)'`)。同一条纪律见 [2053]
38
+ * 3.5.1 起后者 = 键缺席,显示占位归客户端渲(cli 已收敛 `'(unnamed)'`)。同一条纪律见 [ref]
39
39
  * costUSD:诚实缺席 > 编造。(SDK `FleetTaskRow.name` 同步放宽 —— 见发车工单。) */
40
40
  name?: string;
41
41
  description?: string;
@@ -58,18 +58,18 @@ export interface FleetTaskRow {
58
58
  * scoping field like `scope`. Absent ⇒ the row is visible to any same-principal caller (back-compat, unscoped). */
59
59
  sessionId?: string;
60
60
  parentId?: string;
61
- /** [1832] P1-2(core 1.432 BackgroundChildEvent.parentToolCallId,「出生就在场」语义):发起本子代的
61
+ /** [ref] P1-2(core 1.432 BackgroundChildEvent.parentToolCallId,「出生就在场」语义):发起本子代的
62
62
  * 父 tool_use id **原值**(E2 域,core-mint 不含用户内容)——与 `parentId`(解析后的行链接)是两个域:
63
63
  * 本键给按 tool_use id 建卡树的消费端(cli 卡片树)直接绑定,无需 FIFO 猜/形状嗅探。
64
64
  * ADDITIVE / tolerate-absent(旧 core 不发)。 */
65
65
  parentToolCallId?: string;
66
- /** [1440] design/149:wa\* 行的 workflow 归属附注位(w\* runId)——面板按此分组;footer 树不按此嵌套
67
- * ([1433] CC 锚:wa\* 不进 footer,壳按 taskId 前缀过滤)。ADDITIVE / tolerate-absent。 */
66
+ /** [ref] [ref]:wa\* 行的 workflow 归属附注位(w\* runId)——面板按此分组;footer 树不按此嵌套
67
+ * ([ref] CC 锚:wa\* 不进 footer,壳按 taskId 前缀过滤)。ADDITIVE / tolerate-absent。 */
68
68
  workflowRunId?: string;
69
69
  status: FleetTaskStatus;
70
- /** core 1.367 δ([1514]/[1515]④):launch 时刻 epoch ms(revive 行=本 revive 周期 wake 时刻)——
70
+ /** core 1.367 δ([ref]/[ref]④):launch 时刻 epoch ms(revive 行=本 revive 周期 wake 时刻)——
71
71
  * cli 的 elapsed 锚直出(比 server 端 elapsedMs 快照更稳,消费方自算不漂)。ADDITIVE / tolerate-absent
72
- * (a* 车道 spawn 即带;诚实缺席——回落 server 收帧时刻的臂已随 [2354] 删,floor ^4.0.0 下 startedAt 恒在)。 */
72
+ * (a* 车道 spawn 即带;诚实缺席——回落 server 收帧时刻的臂已随 [ref] 删,floor ^4.0.0 下 startedAt 恒在)。 */
73
73
  startedAt?: number;
74
74
  elapsedMs?: number;
75
75
  tokens?: number;
@@ -80,7 +80,7 @@ export interface FleetTaskRow {
80
80
  * today). UNTRUSTED (tool argument head) → redacted before publish, same discipline as `name`.
81
81
  * ADDITIVE / tolerate-absent. */
82
82
  currentAction?: string;
83
- /** cli [1827]②(core 1.429 `currentTool`):`currentAction` 的**结构化**同源体 —— CC220 详情页
83
+ /** cli [ref]②(core 1.429 `currentTool`):`currentAction` 的**结构化**同源体 —— CC220 详情页
84
84
  * Progress 段消费 `{toolName, target}` 结构(toolName 查工具注册表,自由文本塞不进去)。
85
85
  * `toolName` = core 工具名 verbatim;`target` = UNTRUSTED 自由文本(命令行/路径可能秘密形)→
86
86
  * redactSecrets + bound,与 `currentAction` 同信任边界。与 currentAction 同生命周期(未跑过工具前
@@ -89,27 +89,27 @@ export interface FleetTaskRow {
89
89
  toolName: string;
90
90
  target?: string;
91
91
  };
92
- /** cli [1748]①:该子代**累计**的工具调用次数(bg sink tick 的 `usage.toolUses`)——面板行与详情页的
92
+ /** cli [ref]①:该子代**累计**的工具调用次数(bg sink tick 的 `usage.toolUses`)——面板行与详情页的
93
93
  * tool 计数。⚠️ **累计值,直接上行不累加**(与 `turn_end` 的每轮增量相反);⚠️ **缺席 ≠ 0** ——
94
94
  * 老 core 不发这个数时本位缺席,消费方不得当 0 渲染(那会把「不知道」伪装成「跑了 0 个工具」)。
95
95
  * ADDITIVE / tolerate-absent。 */
96
96
  toolUses?: number;
97
- /** cli [1748]②:该子代的转录 id —— 壳侧据此去转录里取**委派 prompt**(详情页 `Prompt` 段)。
97
+ /** cli [ref]②:该子代的转录 id —— 壳侧据此去转录里取**委派 prompt**(详情页 `Prompt` 段)。
98
98
  * ⚠️ 为什么给的是映射而不是 prompt 本身:`BackgroundChildEvent` 上**没有 prompt**(core `types.d.ts`),
99
99
  * server 收不到的东西不能凭空造 —— 要 prompt 直出需要 core 先发。(旧注还说「也无 parentToolCallId」,
100
100
  * core 1.432 已补该键,见 FleetTaskRow.parentToolCallId——本键的理由只剩 prompt 一半。)
101
101
  * ADDITIVE / tolerate-absent。 */
102
102
  transcriptId?: string;
103
- /** [1839]①/(a) 案:**终态行帧的残局键**——cli 实测裸 durable-run 完成时终态 task 帧键集只有
103
+ /** [ref]①/(a) 案:**终态行帧的残局键**——cli 实测裸 durable-run 完成时终态 task 帧键集只有
104
104
  * [id,name,status,tokens,elapsedMs,description],idle 观察者(web 首屏形)从行卡拿不到终局。
105
105
  * (b) 案(为顶层 run 造 bg_notification)被否:那族语义=观察者眼里的**子代**,自造事件族比丰富行帧
106
- * 更伤([1840]§二)。四键全部 ADDITIVE / tolerate-absent、**只在终态帧出现**:
106
+ * 更伤([ref]§二)。四键全部 ADDITIVE / tolerate-absent、**只在终态帧出现**:
107
107
  * - `stoppedBy`:core open enum verbatim(与 BgNotification 同姿势);顶层 run 仅 cancel 路径有源
108
108
  * (= "user",与 markStopSource 同源值),其余终态诚实缺席。
109
109
  * - `usage`:与 {@link BgNotification.usage} **同形**(消费端一个形状)——bg 子代=terminal 事件的
110
110
  * usage 逐键挑;顶层 run=TaskResult.stats 映射(tokens→totalTokens、toolCalls→toolUses)。
111
111
  * - `resumable`/`editedFiles`:**仅 bg 子代有源**(BackgroundChildEvent.terminal);顶层 TaskResult
112
- * 上没有这两位 ⇒ 顶层行帧永缺席,不造([1840]§二「没有就诚实缺席」)。 */
112
+ * 上没有这两位 ⇒ 顶层行帧永缺席,不造([ref]§二「没有就诚实缺席」)。 */
113
113
  stoppedBy?: string;
114
114
  usage?: {
115
115
  totalTokens?: number;
@@ -124,7 +124,7 @@ export interface FleetTaskRow {
124
124
  path: string;
125
125
  edits: number;
126
126
  }>;
127
- /** [2070]①/[2080] 裁定(server 半场,3.6.0):**产出这一行的车道**。
127
+ /** [ref]①/[ref] 裁定(server 半场,3.6.0):**产出这一行的车道**。
128
128
  * - 缺席 = BCE 车道(`fleetBackgroundChildPublisher`)的 a\* 与 wa\* 真行,或顶层 run 行 —— 单源,常态。
129
129
  * - `"run-leg"` = 由每腿的 `fleetRunPublisher` 从 `task_progress` tick 铸的**复合 id 行**
130
130
  * (`${runId} ${childTaskId}`)。此形只在**没有 BCE 真行**的前台 delegation 上保留(同步腿委派的
@@ -135,7 +135,7 @@ export interface FleetTaskRow {
135
135
  * ADDITIVE / tolerate-absent。 */
136
136
  sourceLane?: "run-leg";
137
137
  /**
138
- * #261 §2①(core 5.36.0 #258 供给,server 白名单透传):这一行的**代际号**。语义 = core 的
138
+ * [ref] §2①(core 5.36.0 [ref] 供给,server 白名单透传):这一行的**代际号**。语义 = core 的
139
139
  * stop-cycle 计数(fresh spawn IS cycle 1,每次复活翻转 +1),与 `bg_notification.seq` /
140
140
  * `task_progress.seq` / `BackgroundChildEvent.seq` **同域同轴**(core 原话:一条轴,不是第三种拼法)。
141
141
  *
@@ -143,14 +143,14 @@ export interface FleetTaskRow {
143
143
  * **更小 ⇒ 前代迟到帧,忽略**(不回退——本仓在 {@link FleetEventBus.publishTask} 里 merge 前就判掉了,
144
144
  * 消费端拿到的流已经是单调的);**缺席 ⇒ 回落现行为**(tolerate-absent)。
145
145
  *
146
- * 🔴 缺席是**事实**不是缺口(core [4043] 逐字定谳,以其措辞为准):没有 `a*` registry 行的 run
146
+ * 🔴 缺席是**事实**不是缺口(core [ref] 逐字定谳,以其措辞为准):没有 `a*` registry 行的 run
147
147
  * ——同步委派子代、workflow `wa*` agent、**顶层 run 行**——根本没有代际概念,「缺席即『无此概念』,
148
148
  * 非『第一代』」。任何把缺席读成 1 的消费端都会把「首帧迟到」误判成「复活」。
149
149
  * ADDITIVE / tolerate-absent。
150
150
  */
151
151
  cycleSeq?: number;
152
152
  /**
153
- * #261 §2②:这一帧的终态**不是发布方亲报**,而是对账腿({@link ../fleet/fleet-reconciler.js})
153
+ * [ref] §2②:这一帧的终态**不是发布方亲报**,而是对账腿({@link ../fleet/fleet-reconciler.js})
154
154
  * 从 durable run 行**投影**出来的 —— 发布方死了(事件环异常中断 / 引擎被壳 reuse 而旧 run 对象已死 /
155
155
  * BCE 终态通知丢失),行本会永久僵在 `tasks` Map 里当幽灵。
156
156
  *
@@ -164,7 +164,7 @@ export interface FleetTaskRow {
164
164
  /** One workflow row (wire subset of contract `FleetWorkflow`). */
165
165
  export interface FleetWorkflowRow {
166
166
  id: string;
167
- /** [2400] FLEET-WORKFLOWS-1([2070]③ 同款,workflow 行此前漏网):缺席=诚实缺席,**不铸 id 冒充名**。
167
+ /** [ref] FLEET-WORKFLOWS-1([ref]③ 同款,workflow 行此前漏网):缺席=诚实缺席,**不铸 id 冒充名**。
168
168
  * 现役唯一发布者(workflow-notify-journal)恒带 redact 后的真名;此可选位只为乱序/部分 delta 诚实。 */
169
169
  name?: string;
170
170
  description?: string;
@@ -177,11 +177,11 @@ export interface FleetWorkflowRow {
177
177
  /** 计划总数(= `run.agents.length`,**含排队中**)—— 注意它**不是**"已启动数",见 {@link FleetWorkflowRow.startedCount}。 */
178
178
  totalCount?: number;
179
179
  failedCount?: number;
180
- /** MF-Fleet additive(cli [1726] 二①):**已启动**(非排队中)的 agent 数 —— CC 2.1.220 `⚠ Large workflow`
180
+ /** MF-Fleet additive(cli [ref] 二①):**已启动**(非排队中)的 agent 数 —— CC 2.1.220 `⚠ Large workflow`
181
181
  * 规模告警的分母。判别用 core 导出的 `deriveAgentDisplayStatus`(`startedAt` 未置 ⇒ 显示态 `queued`),
182
182
  * **不自己重写谓词**:两端各写一遍必然漂移(本仓刚在治理面镜像上吃过同款)。
183
183
  * ADDITIVE / tolerate-absent:缺席时消费方可退回 `doneCount + failedCount` 这个**诚实下界**(告警偏早)。
184
- * 2.1.250 复核(S-11,语料=cc-decoded/cli250.js):告警函数 220↔250 逐字同形——agents 轴比的是
184
+ * 2.1.250 复核([ref],语料=cc-decoded/cli250.js):告警函数 220↔250 逐字同形——agents 轴比的是
185
185
  * `scheduledAgents`,`started` 是 token/agent **投影的分母**(`started>0 ? totalTokens/started : 70k`);
186
186
  * 阈值 25/1.5e6/70k 与 `CLAUDE_CODE_WORKFLOW_SIZE_WARNING_*` 覆盖名两版一致。 */
187
187
  startedCount?: number;
@@ -194,7 +194,7 @@ export interface FleetWorkflowRow {
194
194
  * 从 `JournalingWorkflowRunStore.publishFleet` **原样**抽出,因为它现在有两个调用点,而两处各写一遍
195
195
  * 必然漂移(本仓在 startedCount 口径上已吃过同款):
196
196
  * ① 活写路径 —— put/update 的写观察点(行的唯一写者,见该类注);
197
- * ② `/v1/fleet/stream` 连接时快照的**有界终态行窗**(#189 修方向 1)—— 引擎重启后 boot 扫描把前世
197
+ * ② `/v1/fleet/stream` 连接时快照的**有界终态行窗**([ref] 修方向 1)—— 引擎重启后 boot 扫描把前世
198
198
  * running run 判死,终帧与撤行在同一同步栈内背靠背发出,之后才连上的客户端连快照都看不见那一行。
199
199
  */
200
200
  export declare function buildFleetWorkflowRow(id: string, run: WorkflowRun): FleetWorkflowRow;
@@ -215,17 +215,17 @@ export type FleetFrame = {
215
215
  id: string;
216
216
  ts: number;
217
217
  /**
218
- * #261 §2③:**陈述级退场** —— 行没了,但**没有**结算语义。对照:无此键的 remove = 终态之后的
218
+ * [ref] §2③:**陈述级退场** —— 行没了,但**没有**结算语义。对照:无此键的 remove = 终态之后的
219
219
  * 常规清场(发布方亲报终态、或 `retiredBy:"reconcile"` 的投影退休,两者都先发过终态 `task` 帧)。
220
220
  *
221
221
  * 铸点只有对账腿:durable 说这条 run 还 `running`(reaper 宽限窗内)、或 claim 在他副本、或
222
222
  * durable 行压根不存在 —— 三形共同点是**没有终局可投影**,而本副本的行必然陈旧。此时造一个终态
223
223
  * 就是编:判死的属主始终是 durable 侧的 reaper。所以只陈述「这条行离场了」,不逼消费端结算。
224
- * (cli 侧裁量 [4044]:渲「离场」**不清行** —— 行保留、中性离场形、active 扣除、折叠排后。)
224
+ * (cli 侧裁量 [ref]:渲「离场」**不清行** —— 行保留、中性离场形、active 扣除、折叠排后。)
225
225
  * ADDITIVE / tolerate-absent。
226
226
  */
227
227
  removeReason?: "orphaned";
228
- /** #261 §2 判死×判代合成规则:退场帧带**被退那一代**的 {@link FleetTaskRow.cycleSeq}。
228
+ /** [ref] §2 判死×判代合成规则:退场帧带**被退那一代**的 {@link FleetTaskRow.cycleSeq}。
229
229
  * 消费端因此能把 `retire(gen=N)` 之后的 `frame(gen=N+1)` 读成**复活**(行重生,退休不粘住新代),
230
230
  * 而 `retire(gen=N)` 之后的 `frame(gen=N)` 读成**前代迟到帧,忽略**。缺席同 {@link FleetTaskRow.cycleSeq}
231
231
  * ——「无此概念」,不是「第一代」。 */
@@ -248,7 +248,7 @@ export type FleetFrame = {
248
248
  ts: number;
249
249
  };
250
250
  /**
251
- * **一次 hook 判定「未能完成」**的观测帧(cli 黑板 [1786] 点名的需求;字段名由本仓定)。
251
+ * **一次 hook 判定「未能完成」**的观测帧(cli 黑板 [ref] 点名的需求;字段名由本仓定)。
252
252
  *
253
253
  * ── 它解决什么 ────────────────────────────────────────────────────────────────────────────────
254
254
  * 用户设了 `/goal enforced`,产品对模型承诺「没达成不许停」。某一轮评估者没能给出判词
@@ -267,7 +267,7 @@ export type FleetFrame = {
267
267
  * 的帧只投给能证明是自己的订阅方(`undefined` ⇒ 对 scoped 订阅方**丢弃**)。理由同源:一条关于别人
268
268
  * 会话的通知落到这个壳上,会让用户以为是自己这轮出了问题。
269
269
  *
270
- * ⚠️ `kind` 是**闭集**:第二族(`hook_non_blocking_failure`,#281)见下。加族必须同时在
270
+ * ⚠️ `kind` 是**闭集**:第二族(`hook_non_blocking_failure`,[ref])见下。加族必须同时在
271
271
  * {@link hookNoticeWire} 表态(穷举 switch ⇒ 漏表态=编译红)。
272
272
  */
273
273
  export interface HookDecisionUnavailable {
@@ -280,17 +280,17 @@ export interface HookDecisionUnavailable {
280
280
  detail?: string;
281
281
  }
282
282
  /**
283
- * **一次 hook 自己坏了**(非阻断故障)的观测帧 —— #281,黑板 [4250](test 实测立案)/ [4261](core 定性:
284
- * 翻译层全在 server)/ [4263](CC 锚源码核实)/ [4381](server 裁量②)。
283
+ * **一次 hook 自己坏了**(非阻断故障)的观测帧 —— [ref],黑板 [ref](test 实测立案)/ [ref](core 定性:
284
+ * 翻译层全在 server)/ [ref](CC 锚源码核实)/ [ref](server 裁量②)。
285
285
  *
286
286
  * ── 它解决什么(与上面那族是两件事)──────────────────────────────────────────────────────────
287
287
  * 上面那族说的是「判定没做成」;这一族说的是「**你配的这个 hook 自己坏了**」:退出码非 0 且非 2、
288
- * 超时、起不来、吐了坏 JSON。方向按 [4381] 裁量① **维持 CC parity 不动**(非阻断,绝不误伤任务),
288
+ * 超时、起不来、吐了坏 JSON。方向按 [ref] 裁量① **维持 CC parity 不动**(非阻断,绝不误伤任务),
289
289
  * 但此前故障只进服务端结构化日志 ⇒ **任务视角零可见**:用户以为自己的守卫在跑,其实每次都在坏。
290
290
  * 而 registry-core `hooks.ts:536` 对这一格逐字承诺过 "any other exit = non-blocking error
291
291
  * (**stderr shown to the user**)" —— 承诺与实装的落差,正是本帧要补的那一格。
292
292
  *
293
- * ── CC 锚(cc-decoded/pretty223.js 亲读,[4263] 已独立核实同一段)────────────────────────────
293
+ * ── CC 锚(cc-decoded/pretty223.js 亲读,[ref] 已独立核实同一段)────────────────────────────
294
294
  * CC 的 `hook_non_blocking_error` 附件带 `hookName` / `hookEvent` / `stderr` / `stdout` / `exitCode`,
295
295
  * UI 层对非 `Stop`/`SubagentStop` 事件真实渲染「`<hookName>` hook error」+ stderr(优先 stderr)。
296
296
  * 本帧的键就是照这份形状取的(`hookName` 的取法同 CC 的 `OG`/`AEe`:`statusMessage ?? 命令/URL/提示`)。
@@ -304,13 +304,13 @@ export interface HookNonBlockingFailure {
304
304
  event: string;
305
305
  /**
306
306
  * 机器可判的故障形(闭集,与 server 日志同源):
307
- * · `exit_nonzero` —— 退出码非 0。**exit 2 的归属按「这个位置有没有兑现面」判**(#281 codex R1-F2):
307
+ * · `exit_nonzero` —— 退出码非 0。**exit 2 的归属按「这个位置有没有兑现面」判**([ref] codex R1-F2):
308
308
  * - 有兑现面 —— 阻断面(PreToolUse ⇒ deny / Stop / UserPromptSubmit / PreCompact ⇒ block)或
309
309
  * 反馈面(PostToolUse 族 ⇒ stderr 喂模型)—— ⇒ exit 2 是**表过态的裁决/反馈**,不是故障,
310
310
  * **绝不进本族**;
311
311
  * - 没有兑现面(observe-only 的 StopFailure/PostCompact、以及 fire-and-forget 的纯 async 条目)
312
312
  * ⇒ 作者的 exit 2 无处兑现,**进本族**并由 `detail` 逐字说清那里没有阻断面 —— 静默丢弃正是
313
- * #281 要根除的形,而不说清则会让一次有意表态被渲染成「坏 hook」;
313
+ * [ref] 要根除的形,而不说清则会让一次有意表态被渲染成「坏 hook」;
314
314
  * - `asyncRewake` 的 exit 2 是**契约动作**(唤醒模型),不是故障,不进本族;
315
315
  * · `timeout` —— 条目超时被击杀(无退出码);
316
316
  * · `spawn_failed` —— 起不来 / http 连不上 / LLM 载体失败(无退出码);
@@ -318,7 +318,7 @@ export interface HookNonBlockingFailure {
318
318
  */
319
319
  reason: "exit_nonzero" | "timeout" | "spawn_failed" | "bad_json";
320
320
  /** hook 身份(CC `OG`/`AEe` 锚:`statusMessage` 优先,否则 command / url / prompt),已脱敏+有界。
321
- * ⚠️ http 条目取 URL 时**剥掉 query 与 fragment**(#281 codex R1-F1:端点凭据最常见的挂法是
321
+ * ⚠️ http 条目取 URL 时**剥掉 query 与 fragment**([ref] codex R1-F1:端点凭据最常见的挂法是
322
322
  * `?token=…`,而通用脱敏器只认 `user:pass@` 形)。要更友好的名字,作者有 `statusMessage`。 */
323
323
  hookName: string;
324
324
  /** 条目类型 —— 没有它,`hookName` 是命令还是 URL 还是提示词全靠猜。 */
@@ -358,11 +358,11 @@ export declare function boundedNoticeText(s: string): string;
358
358
  /**
359
359
  * 上 wire 的载荷(归属位**逐 kind 穷举剥离**,不是 rest-spread)。
360
360
  *
361
- * 🔴 穷举 `switch` 而不是 `{...n}`:#157 闭集纪律 —— 新增一个 kind 而不在这里表态 = **编译红**,
361
+ * 🔴 穷举 `switch` 而不是 `{...n}`:[ref] 闭集纪律 —— 新增一个 kind 而不在这里表态 = **编译红**,
362
362
  * 而 spread 会把新 kind 的任意新键(可能带内部归属/密钥)静默推上 wire。
363
363
  */
364
364
  export declare function hookNoticeWire(n: HookNotice): HookNoticeObservation;
365
- /** design/129-B 缺口② (帧契约): a background child's COMPLETION notification pushed on the
365
+ /** [ref]-B 缺口② (帧契约): a background child's COMPLETION notification pushed on the
366
366
  * ALWAYS-OPEN fleet stream — the only server-push lane an idle shell keeps subscribed, so a session-scoped bg
367
367
  * child finishing while the host sits idle notifies IMMEDIATELY (no more "late by one input cycle" durable-drain).
368
368
  * EVENT semantics, not state: never in the snapshot, no dedup key held here (the shell's task_notification
@@ -377,7 +377,7 @@ export interface BgNotification {
377
377
  seq?: number;
378
378
  status: "completed" | "failed" | "killed";
379
379
  summary?: string;
380
- /** Background lifetime scope (design/129), NOT the tenant scope. */
380
+ /** Background lifetime scope ([ref]), NOT the tenant scope. */
381
381
  scope: "task" | "session";
382
382
  parentTaskId?: string;
383
383
  stoppedBy?: string;
@@ -391,7 +391,7 @@ export interface BgNotification {
391
391
  path: string;
392
392
  edits: number;
393
393
  }>;
394
- /** [1543]§二 LOW 补:完成通知的花费/转录锚(core BackgroundChildEvent.terminal 携带,此前被剥——
394
+ /** [ref]§二 LOW 补:完成通知的花费/转录锚(core BackgroundChildEvent.terminal 携带,此前被剥——
395
395
  * 完成卡无花费显示、转录跳转无锚)。数值/id verbatim。 */
396
396
  usage?: {
397
397
  totalTokens?: number;
@@ -402,11 +402,11 @@ export interface BgNotification {
402
402
  costMicroUsd?: number;
403
403
  };
404
404
  transcriptId?: string;
405
- /** P1-3(core 1.452,[1925] 一轮批):子代完成的**幂等锚**——同一完成的多路通知(bg_notification/
405
+ /** P1-3(core 1.452,[ref] 一轮批):子代完成的**幂等锚**——同一完成的多路通知(bg_notification/
406
406
  * task_notification/inbox 重放)带同一 id,消费端按它去重。verbatim;ADDITIVE/tolerate-absent。 */
407
407
  completionId?: string;
408
- /** core 1.367 δ([1514]/[1515]④):委托树 root 宿主会话(固定点语义,嵌套孙代恒锚 root shell)——
409
- * cli 跨壳重启按宿主会话归组([1500]② 台账判别 F2 残余闭环)。ADDITIVE / tolerate-absent。 */
408
+ /** core 1.367 δ([ref]/[ref]④):委托树 root 宿主会话(固定点语义,嵌套孙代恒锚 root shell)——
409
+ * cli 跨壳重启按宿主会话归组([ref]② 台账判别 F2 残余闭环)。ADDITIVE / tolerate-absent。 */
410
410
  rootSessionId?: string;
411
411
  /** Tenant/principal isolation key (same filter as FleetTaskRow.scope). STRIPPED before send. */
412
412
  ownerScope?: string;
@@ -425,7 +425,7 @@ export declare class FleetEventBus {
425
425
  private readonly emitter;
426
426
  private readonly tasks;
427
427
  private readonly workflows;
428
- /** #261 / codex R1-F2:**代际墓碑** —— 已离场行的最后已知 `cycleSeq`(行本身已从 `tasks` 删掉,
428
+ /** [ref] / codex R1-F2:**代际墓碑** —— 已离场行的最后已知 `cycleSeq`(行本身已从 `tasks` 删掉,
429
429
  * 代际状态却必须活得比行久一点,否则前代迟到帧会在空 Map 上把幽灵行重铸出来)。有界 LRU。 */
430
430
  private readonly retiredGen;
431
431
  private static readonly RETIRED_GEN_MAX;
@@ -445,7 +445,7 @@ export declare class FleetEventBus {
445
445
  publishHookNotice(notice: HookNotice): void;
446
446
  /** Drop a task row (terminal + swept) + fan out the removal. Idempotent (a no-op if already gone).
447
447
  *
448
- * `opts`(#261,两键均 ADDITIVE):`removeReason:"orphaned"` = **陈述级退场**(没有结算语义,见
448
+ * `opts`([ref],两键均 ADDITIVE):`removeReason:"orphaned"` = **陈述级退场**(没有结算语义,见
449
449
  * {@link FleetFrame} 的 `task_remove` 臂);`cycleSeq` = 被退那一代的代际号。发布方的常规清场
450
450
  * (`onTerminal`/`onChildTerminal`)不传 opts ⇒ 帧逐字节与本改动之前相同。 */
451
451
  removeTask(id: string, opts?: {
@@ -461,7 +461,7 @@ export declare class FleetEventBus {
461
461
  releaseBackgroundChildLane(scope: string | undefined, childUuid: string): void;
462
462
  /** run-leg 车道:该子代是否已有 BCE 真行(有 ⇒ 让位,不铸复合 id 行)。 */
463
463
  backgroundChildLaneRow(scope: string | undefined, childUuid: string): string | undefined;
464
- /** [2268] 让位迁移料的读面:迁移「只补缺席位」需要看得见存活行现有什么(BCE 是权威车道,不覆盖)。 */
464
+ /** [ref] 让位迁移料的读面:迁移「只补缺席位」需要看得见存活行现有什么(BCE 是权威车道,不覆盖)。 */
465
465
  taskRow(id: string): Readonly<FleetTaskRow> | undefined;
466
466
  /** Upsert a workflow row (MERGE by `id`) + fan out. */
467
467
  publishWorkflow(delta: Partial<FleetWorkflowRow> & {
@@ -469,7 +469,7 @@ export declare class FleetEventBus {
469
469
  }): void;
470
470
  /** Drop a workflow row + fan out the removal. Idempotent. */
471
471
  removeWorkflow(id: string): void;
472
- /** design/129-B 缺口②: fan out a background-child completion notification (EVENT — not stored, never in the
472
+ /** [ref]-B 缺口②: fan out a background-child completion notification (EVENT — not stored, never in the
473
473
  * snapshot; a subscriber that connects later reads the durable inbox instead). */
474
474
  publishBgNotification(notification: BgNotification): void;
475
475
  /** The current full state (the connect-time snapshot frame). */
@@ -479,7 +479,7 @@ export declare class FleetEventBus {
479
479
  /** Subscribe to deltas. Returns an unsubscribe thunk. The caller typically sends `snapshot()` first, then every
480
480
  * delta this delivers — the snapshot+delta sequence is the live fleet view.
481
481
  *
482
- * 每个回调各自隔离(#183 复审 R3 HIGH):扇出是同步的,修前一个抛错的订阅方会把异常传回**发布方**——
482
+ * 每个回调各自隔离([ref] 复审 R3 HIGH):扇出是同步的,修前一个抛错的订阅方会把异常传回**发布方**——
483
483
  * 而发布方是 JournalingWorkflowRunStore.put/update 的投影点,core 持久化对 put 抛错 catch{} 且不推进
484
484
  * storeRev ⇒ durable 行冻在 running 而 notify 已 ack,无恢复路径。投影消费方永远不该能楔死 durable
485
485
  * 写路;抛错记 {@link recordFailOpen}(F 类,登记闸),不上抛、不影响其余订阅方。 */
@@ -532,7 +532,7 @@ export declare function fleetRunPublisher(bus: FleetEventBus | undefined, run: {
532
532
  * release condition watches the viewed cid's terminal) never saw a terminal transition. Returns whether the
533
533
  * row EXISTED (hadRow — the observer logs it; false = the frame was synthesized flip-through). */
534
534
  onChildTerminal: (taskId: string, status: string, altId?: string, toolUseId?: string) => boolean;
535
- /** [1839]①/(a) 案:`residuals` = 顶层 run 的终局残局键(有源才传,见 FleetTaskRow 上的键注)。
535
+ /** [ref]①/(a) 案:`residuals` = 顶层 run 的终局残局键(有源才传,见 FleetTaskRow 上的键注)。
536
536
  * 只有**真终态**(completed/failed/killed)帧带残局——parked(suspended/needs_review)的行还活着,
537
537
  * 没有「终局」可言,误传也不上帧。 */
538
538
  onTerminal: (status: RunStatusForFleet, residuals?: {
@@ -544,10 +544,10 @@ export declare function fleetRunPublisher(bus: FleetEventBus | undefined, run: {
544
544
  /** The run-scoped publisher handle (returned by `fleetRunPublisher`). Threaded into `runInBackground` so a
545
545
  * background run TRANSITIONS its fleet row exactly like the sync POST /v1/runs leg does. */
546
546
  export type FleetRunPublisher = ReturnType<typeof fleetRunPublisher>;
547
- /** [1839]①/(a) 案:TaskResult → 终态行帧残局键映射(sync/background/resume 三条腿各自 settle,共用一处
547
+ /** [ref]①/(a) 案:TaskResult → 终态行帧残局键映射(sync/background/resume 三条腿各自 settle,共用一处
548
548
  * 映射——键名映射写三遍必漂移)。usage 与 {@link BgNotification.usage} 同形:stats.tokens→totalTokens、
549
549
  * stats.toolCalls→toolUses(名对齐,消费端一个形状)。errorCode "cancelled" ⇒ stoppedBy:"user"(与
550
- * markStopSource 的归因值同源);transcriptId 顶层 = run 的 sessionId([1840]§二拍)。缺源的键不铸。 */
550
+ * markStopSource 的归因值同源);transcriptId 顶层 = run 的 sessionId([ref]§二拍)。缺源的键不铸。 */
551
551
  export declare function fleetRunResiduals(result: {
552
552
  sessionId?: string;
553
553
  errorCode?: string;
@@ -563,7 +563,7 @@ export declare function fleetRunResiduals(result: {
563
563
  transcriptId?: string;
564
564
  };
565
565
  /**
566
- * design/129-B (core 1.240.0) — the PROCESS-LEVEL background-child fleet publisher, wired once
566
+ * [ref]-B (core 1.240.0) — the PROCESS-LEVEL background-child fleet publisher, wired once
567
567
  * onto `RunnerDeps.onBackgroundChildEvent`. Unlike {@link fleetRunPublisher} (per-leg: dies at leg settle —
568
568
  * the root cause: a session-scoped bg child outliving its turn had NO forward path, fleet showed zero
569
569
  * child frames), this observer lives as long as the process and covers the child's WHOLE lifecycle:
@@ -590,7 +590,7 @@ export declare function fleetRunLabels(objective: string | undefined): {
590
590
  name: string;
591
591
  };
592
592
  /**
593
- * `runStatusToFleet` 的入参**闭集**(A-032 P1-④)。两段:
593
+ * `runStatusToFleet` 的入参**闭集**([ref] P1-④)。两段:
594
594
  * · `RunRecord["status"]` = `"running" | core.TaskStatus` —— run **行**状态词表,属主
595
595
  * `plugins/store-contracts.ts`(core 加成员 ⇒ 下面那条 switch 的 `never` 臂收不敛 ⇒ tsc 红);
596
596
  * · 四个**非行状态**的结算词:`queued`(未落行的排队态)、`error`(历史别名)、`killed`/`cancelled`
@@ -604,7 +604,7 @@ export type RunStatusForFleet = RunRecord["status"] | "queued" | "killed" | "can
604
604
  /**
605
605
  * fleet 行的**离场**判据(`onTerminal` 的 removal 集)—— `FleetTaskStatus` 的穷举 switch。
606
606
  *
607
- * 与 {@link runStatusToFleet} 同族(A-032 P1-④ 证据段点名):此前是消费点手抄的
607
+ * 与 {@link runStatusToFleet} 同族([ref] P1-④ 证据段点名):此前是消费点手抄的
608
608
  * `=== "completed" || === "failed" || === "killed"` 三词字面比对,fleet 词表加成员时同样没有编译期钉。
609
609
  * park 态(`waiting` / `awaiting approval`)判 false 是承重的:行还活着,必须留在 fleet 上。
610
610
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * #261(docs/DESIGN-261-fleet-liveness-reconcile.md v1.2,四方零驳定稿)—— fleet 总线**存活对账腿**。
2
+ * [ref](docs/DESIGN-261-fleet-liveness-reconcile.md v1.2,四方零驳定稿)—— fleet 总线**存活对账腿**。
3
3
  *
4
4
  * ## 它修什么(§0 病灶机制链)
5
5
  * fleet 总线是进程内纯内存聚合(`fleet-bus.ts` 头注自陈 NOT durable / NOT cross-replica),行的**唯一**
@@ -39,7 +39,7 @@
39
39
  * 按「bus 内滞留超一个对账周期且无新帧」陈述级退场。
40
40
  *
41
41
  * ## workflow 行(§1)
42
- * 只做同款「durable 终局投影」(#189 的 snapshot pull 腿 + reapers 的 workflow recover 腿已在场),
42
+ * 只做同款「durable 终局投影」([ref] 的 snapshot pull 腿 + reapers 的 workflow recover 腿已在场),
43
43
  * **不加新判据**:活行恒不动,没有陈述级退场这一形。
44
44
  *
45
45
  * ## 五条界(任何一条失手都只是幽灵行多活一个周期 ⇒ 整体 F 类 fail-open,登记 tag,不静默)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * #189 修方向 1(黑板 [3112] 定谳)—— `/v1/fleet/stream` 连接时快照要并入的**近期终态 workflow 行窗**。
2
+ * [ref] 修方向 1(黑板 [ref] 定谳)—— `/v1/fleet/stream` 连接时快照要并入的**近期终态 workflow 行窗**。
3
3
  *
4
4
  * ## 它修什么
5
5
  * 引擎重启后 boot 扫描判死前世 `running` run,`publishWorkflow`(终帧)与 `removeWorkflow` 在**同一同步
@@ -12,7 +12,7 @@ export declare function projectTailFrame(e: Record<string, unknown> & {
12
12
  type?: string;
13
13
  }): SubagentTailFrame | null;
14
14
  /**
15
- * 宿主腿的 **content 供给形**(#252 / [3911] 定谳)——本面能不能拿到内容帧,由**宿主 run 的 spec**
15
+ * 宿主腿的 **content 供给形**([ref] / [ref] 定谳)——本面能不能拿到内容帧,由**宿主 run 的 spec**
16
16
  * `forwardSubagentEvents` 决定,而不是由订阅者决定:
17
17
  *
18
18
  * · `"on"` = 宿主 run 提交时带了 `forwardSubagentEvents:true` ⇒ core 的 forward 门
@@ -20,11 +20,11 @@ export declare function projectTailFrame(e: Record<string, unknown> & {
20
20
  * text_delta/reasoning_delta/tool_start/tool_end ⇒ 本面有内容帧;
21
21
  * · `"progress_only"` = 宿主 run 没带 ⇒ 那道门**只**放 task_progress ⇒ 本面恒只有 rollup 帧。
22
22
  *
23
- * 🔴 为什么必须上 wire(#157「不许静默 fail-open」在本接缝的落实):`progress_only` 形下本端点
23
+ * 🔴 为什么必须上 wire([ref]「不许静默 fail-open」在本接缝的落实):`progress_only` 形下本端点
24
24
  * **一切正常**——200、meta 说 running、心跳照发、task_progress 照来——就是永远没有内容帧。消费端
25
25
  * (cli engineSubagentTail 明文「task_progress 不重复消费」)看到的是一个永远空的转录面,与「子代此刻
26
26
  * 恰好没说话」在 wire 上**不可区分**;而订阅方在查看态**没有任何办法**把它打开(那是 run 提交时的
27
- * 一次性表态)。[3911] cli 一手取证的指纹(建连成功 / 75s 零内容帧 / 同期 fleet token 在涨)与本形
27
+ * 一次性表态)。[ref] cli 一手取证的指纹(建连成功 / 75s 零内容帧 / 同期 fleet token 在涨)与本形
28
28
  * 逐条吻合。所以 meta 帧如实声明供给形,让「空」有诚实的来路。
29
29
  *
30
30
  * 缺席(`undefined` ⇒ meta 出 `"unknown"`)= **还不知道**:子代还没产出第一帧,或宿主腿在别的副本
@@ -29,14 +29,14 @@ export declare class FleetUsageAccumulator {
29
29
  private cells;
30
30
  private runsSeen;
31
31
  /**
32
- * 🔴 RB-368(core 2.3.0;registry-core 0.11.0 收口,[2103]):`d.costMicroUsd` **可缺席 = 未知**
32
+ * 🔴 [ref](core 2.3.0;registry-core 0.11.0 收口,[ref]):`d.costMicroUsd` **可缺席 = 未知**
33
33
  * (unpriced 部署,budget.ts 如实不带键)。wire 自 0.11.0 起有缺席位(UsageEntry.costMicroUsd
34
34
  * optional)⇒ 本处**整键透传缺席**,不再折 0 低估。cell 级累加语义与 budget.ts ModelUsageTracker
35
35
  * 同款=**传染**(同为单 producer 累加器:已知+未知=未知);center 聚合面的「下界 + costUnknown
36
- * 标记」语义在 registry-core aggregateUsage(跨 worker 审计总账层,两层判据见 [2103])。
36
+ * 标记」语义在 registry-core aggregateUsage(跨 worker 审计总账层,两层判据见 [ref])。
37
37
  * 配额轴(weightedTokens)不受影响,仍逐笔精确。
38
38
  *
39
- * core 3.0.0([2296] 装车单 S4c)语义注:`d.inputTokens` 在唯一调用点(budget.ts 的
39
+ * core 3.0.0([ref] 装车单 S4c)语义注:`d.inputTokens` 在唯一调用点(budget.ts 的
40
40
  * `fleetUsage.record(...)`,S1 已迁)传的是 `e.totalInputTokens`(归一化总输入含 cache),不是
41
41
  * `e.promptTokens`(3.0.0 起恒 cache-MISS)——上游已切换口径,本函数只是照收不重算,值域/签名零改动。
42
42
  */
@@ -97,7 +97,7 @@ export declare class FleetLeaseManager {
97
97
  * registry-core 0.6.1 双轴:weightedTokens(加权 tokens 配额轴,weight-at-burn 已在调用方固化)
98
98
  * + costMicroUsd($ 轴,轴名沿用 0.5 既定)。任一轴耗尽=leaseExhausted 拒(deny-wins,registry 类型层定死)。
99
99
  *
100
- * 🔴 RB-368(core 2.3.0)已核 undefined 安全:两轴都是 `?? 0`,unpriced 部署下 budget.ts 不带
100
+ * 🔴 [ref](core 2.3.0)已核 undefined 安全:两轴都是 `?? 0`,unpriced 部署下 budget.ts 不带
101
101
  * costMicroUsd 键调进来 ⇒ $ 轴不扣、不产 NaN。**这是有意的 fail-open**:租约是**执行面**,把"未知"
102
102
  * 当"扣满"会让没配价目表的部署一上来就被 leaseExhausted 拒掉所有请求(deny-wins),那是把可观测性
103
103
  * 缺口升级成可用性事故。补偿=配额轴(weightedTokens)不依赖价目表、逐笔精确,治理在 unpriced 部署下
@@ -1,6 +1,6 @@
1
1
  import type { SessionTreeEntry } from "@sema-agent/core";
2
2
  /**
3
- * ── [2092] 渲染臂的判据:**证据面与模型所见同进同出** ─────────────────────────────────────────────
3
+ * ── [ref] 渲染臂的判据:**证据面与模型所见同进同出** ─────────────────────────────────────────────
4
4
  * core 的 `SessionTreeEntry` 是 12 型联合,曾经这里只渲 message/compaction 两支 ⇒ 10 型静默丢弃。
5
5
  * 其中 `custom_message` 正是非标准入口用户内容(steering)的落点:core `convertToLlm` 把它按
6
6
  * `role:"user"` 送模型,而证据面渲没了 ⇒ 评估者如实判「证据不足」⇒ 拦停死循环直到 CAP(cli 带
@@ -17,7 +17,7 @@ export declare const RENDERED_ENTRY_TYPES: readonly ["message", "compaction", "c
17
17
  * announced_listing / workspace_state / git_announcement / reminder_mark —— 控制面元数据,core 折
18
18
  * messages 时不产出内容;
19
19
  * custom —— data-only(session.js 折 messages 只认 message/custom_message 两型),模型看不见它的
20
- * data;把它渲出来反而是把模型没见过的东西冒充成证据,与 [2092] 是同一判据的反方向。
20
+ * data;把它渲出来反而是把模型没见过的东西冒充成证据,与 [ref] 是同一判据的反方向。
21
21
  */
22
22
  export declare const SKIPPED_ENTRY_TYPES: readonly ["thinking_level_change", "model_change", "label", "session_info", "leaf", "prompt_epoch", "announced_listing", "workspace_state", "git_announcement", "reminder_mark", "custom"];
23
23
  /** 渲染结果。**判别式**:证据不足时调用方拿不到 `text`,想用也用不了(见顶注)。 */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CC `hook_agent` 臂(`type:"agent"` 钩子条目)的评估者系统提示 —— **CC 逐字移植**(A-065 P2-5 修:
2
+ * CC `hook_agent` 臂(`type:"agent"` 钩子条目)的评估者系统提示 —— **CC 逐字移植**([ref] P2-5 修:
3
3
  * 此前 agent 臂一个字的系统提示都不发,评估者拿不到「你在判什么/可以用工具去查/少走几步」任何一条,
4
4
  * 判词质量静默劣化且黑盒极难察觉;`cc-stop-prompt.ts` 把孪生的 prompt 臂做到字节级 ALIGNED,本臂却整块
5
5
  * 漏在考据之外=UNANCHORED)。
@@ -9,7 +9,7 @@
9
9
  * CC 该臂与 prompt 臂(`cc-stop-prompt.ts`)**不是同一批文本**:两档头句按事件名选
10
10
  * (`r === "Stop" || r === "SubagentStop"` ⇒ verify 档,其余 ⇒ evaluate 档),尾段共用。
11
11
  *
12
- * ── 登记偏离(载体差异,[1134] 锚定纪律:能逐字的逐字,搬不动的显式登记而非静默改写)──────────
12
+ * ── 登记偏离(载体差异,[ref] 锚定纪律:能逐字的逐字,搬不动的显式登记而非静默改写)──────────
13
13
  * CC 的完整模板还有两段本仓**刻意不搬**:
14
14
  * 1. transcript 文件句("The conversation transcript is available at: ${路径}\nYou can read this
15
15
  * file to analyze the conversation history if needed.")——CC 给评估者落一个转录**文件**并往
@@ -9,12 +9,12 @@
9
9
  * `sema-agent/cc-decoded` 的 `pretty220.js:609309` 起(219/218 同构)。逐字核实的四件:
10
10
  * · 两档判据是 **hook 事件名**:`c = r === "Stop" || r === "SubagentStop"` ⇒ 这两个事件用**完整版**,其余用简版;
11
11
  * · user 消息也被包装(见 {@link wrapCondition}),原文预设**会话就在上文**("transcript **above**");
12
- * · 评估者 `thinkingConfig: { type: "disabled", mechanical: !0 }`(A-065 P4-2:引文补 `mechanical` 键)+
12
+ * · 评估者 `thinkingConfig: { type: "disabled", mechanical: !0 }`([ref] P4-2:引文补 `mechanical` 键)+
13
13
  * **`tools: []`** —— 它是**纯判官**,不能自己去查;
14
14
  * · 会话消息**整段前置**(`s && s.length > 0 ? [...prepend(s), p] : [p]`),不是摘要。
15
15
  * ⚠️ 语料把**正文/标点**非 ASCII 存成 `\uXXXX` 六字符字面量(正文里那两个破折号是 `\u2014`)——**grep 真字符会全假阴**。
16
16
  * 所以下面也用 `\u2014` 转义:源码保持 ASCII,运行时是同一个字符。
17
- * (A-065 P4-5 量词修:locale/语言名表是例外——`日本語`/`русский` 等 127 个字面非 ASCII 字节在语料里
17
+ * ([ref] P4-5 量词修:locale/语言名表是例外——`日本語`/`русский` 等 127 个字面非 ASCII 字节在语料里
18
18
  * 存活;另注 `grep -c` 数行不数次,计数用它会低估。)
19
19
  * ⚠️ **为什么必须自己核**:cli 报过他们移植的那段是**第三种措辞**(与 CC 220 的两个分支都不逐字相同,
20
20
  * 应是从更早版本移植后 CC 改过而没跟)。转述会漂,语料不会。
@@ -5,7 +5,7 @@ import type { HookLlmCall } from "./hook-runner.js";
5
5
  * hookLlm(prompt 条目/session titler 的模型载体)= 直连一次非流式 completion,从 main.ts 抽出成可注入
6
6
  * 单元(fetchImpl/keyResolver 可假),因为这条 wire 在每个默认部署上都活(titler),必须可单测。
7
7
  *
8
- * api 形分派(2026-07-15,黑板 [851]③b 真缺陷修):被选模型按 `Model.api` 分家 ——
8
+ * api 形分派(2026-07-15,黑板 [ref]③b 真缺陷修):被选模型按 `Model.api` 分家 ——
9
9
  * - `openai-completions` ⇒ POST {base}/chat/completions(现状,字节不变);
10
10
  * - `anthropic-messages` ⇒ POST {base}/v1/messages(x-api-key / Authorization: Bearer + anthropic-version
11
11
  * 头,messages 数组,回包取 content[].text)。此前 hookLlm 只会说 openai 形且缺省 baseUrl 恒落
@@ -25,7 +25,7 @@ export declare const MAX_HOOK_OUTPUT_BYTES: number;
25
25
  * 的 tool_result 追加 / `runtask.js` 的 Stop follow-up),不是日志。
26
26
  *
27
27
  * 帽值取 10_000 的依据:模型可见文本在本栈的既有预算量纲就是 10k —— core `truncateError`
28
- * (`src/core/tool-errors.ts`)的 10k 中截,逐字锚 CC 序列化器 `A7e` 的 `1e4`;#181 战役里 core 还要给
28
+ * (`src/core/tool-errors.ts`)的 10k 中截,逐字锚 CC 序列化器 `A7e` 的 `1e4`;[ref] 战役里 core 还要给
29
29
  * `beforeToolCall` block reason 补一道同值兜底闸。取同一量级 = 「一次 hook 注入 ≤ 一份错误文本预算」,
30
30
  * 且 4096 的单条帽保证**前两条**钩子的话仍整段进得去(截断是配置广度的代价,不是常态)。
31
31
  */
@@ -50,7 +50,7 @@ export declare function hookMatcherMatches(matcher: string | undefined, value: s
50
50
  * 非工具事件(payload 无 tool_name)→ "cannot be evaluated" 跳过;解析失败 → 跳过。返回:
51
51
  * true=跑 / "not_matched" / "unevaluable"(调用方分别记账;跳过永不静默)。
52
52
  *
53
- * 2.1.250 复核(S-11,2026-08-30;语料=sema-internal `blueprints/cc-decoded/cli250.js`):求值器与 220
53
+ * 2.1.250 复核([ref],2026-08-30;语料=sema-internal `blueprints/cc-decoded/cli250.js`):求值器与 220
54
54
  * 逐字同构——五种工具事件之外「cannot be evaluated for non-tool event」跳过、「Skipping hook due to if
55
55
  * condition … not matching」跳过,两串日志逐字在场;括号内容经工具 `preparePermissionMatcher` 求值,与
56
56
  * 本实现同向。差异登记(不改行为):①250 证据里名部=**规范化后等值比对**(`vd(toolName)!==o`),
@@ -75,8 +75,8 @@ export interface HookRunnerContext {
75
75
  * · `hook_decision_unavailable` —— 一次判定**未能完成**。方向可以 fail-open,但**不能连
76
76
  * 「我这轮没看住」都不说** —— 否则模型拿到的放行与「已达成」无法区分,而产品刚对它承诺过
77
77
  * 「没达成不许停」;
78
- * · `hook_non_blocking_failure`(#281)—— **hook 自己坏了**(exit≠0∧≠2 / 超时 / 起不来 / 坏 JSON)。
79
- * 裁决面按 [4381] 裁量① 维持 CC parity 不动,坏掉这件事本身必须让人看得见。
78
+ * · `hook_non_blocking_failure`([ref])—— **hook 自己坏了**(exit≠0∧≠2 / 超时 / 起不来 / 坏 JSON)。
79
+ * 裁决面按 [ref] 裁量① 维持 CC parity 不动,坏掉这件事本身必须让人看得见。
80
80
  * ⚠️ 它**必须**是不改变运行的通道:`additionalContext` 不行(那个会让这一轮不结束)。缺席 ⇒ 只进日志。
81
81
  * ⚠️ 回调**抛错不许误伤任务**(见 {@link emitHookNotice}):观察面绝不成为新的失败源。 */
82
82
  onHookNotice?: (n: HookNoticeObservation) => void;
@@ -154,7 +154,7 @@ export declare function buildHookContext(parts: readonly string[]): string | und
154
154
  * 不装 hooks——结构性,见 main.ts);hook-runner 自身不发模型调用,fake 载体即可单测。
155
155
  */
156
156
  /** CC 评估者的额外输入(prompt 臂=Stop×prompt,见 `cc-stop-prompt.ts` / `branch-transcript.ts`;
157
- * agent 臂=每事件,见 `cc-agent-hook-prompt.ts`,A-065 P2-5)。 */
157
+ * agent 臂=每事件,见 `cc-agent-hook-prompt.ts`,[ref] P2-5)。 */
158
158
  export interface LlmHookExtra {
159
159
  /** CC 逐字的系统提示。 */
160
160
  system: string;