@sema-agent/server 7.146.0 → 7.147.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 (398) hide show
  1. package/MIGRATION.md +384 -0
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/USAGE.md +170 -66
  5. package/deploy/facts/lanes.json +7 -0
  6. package/deploy/sema-up/README.md +2 -2
  7. package/deploy/sema-up/chart/templates/_helpers.tpl +22 -0
  8. package/deploy/sema-up/chart/templates/server-v4pro.yaml +5 -4
  9. package/deploy/sema-up/chart/templates/server.yaml +5 -4
  10. package/deploy/sema-up/chart/values.yaml +1 -1
  11. package/deploy/sema-up/cluster-up.sh +2 -1
  12. package/deploy/sema-up/lib/flagshape.sh +4 -0
  13. package/deploy/sema-up/lib/lanes.json +2 -5
  14. package/deploy/sema-up/sema-up.sh +12 -9
  15. package/deploy/sema-up/stack/compose.yaml +5 -4
  16. package/deploy/sema-up/stack/sema-stack-cluster.yaml +4 -3
  17. package/dist/approval-card.d.ts +4 -4
  18. package/dist/approval.d.ts +3 -3
  19. package/dist/audit.js +2 -2
  20. package/dist/bench/s1/live-deps.js +3 -1
  21. package/dist/boot/crash-last.js +2 -1
  22. package/dist/boot/device-lane.js +5 -5
  23. package/dist/boot/engine-lease.d.ts +12 -11
  24. package/dist/boot/execution-env.d.ts +2 -1
  25. package/dist/boot/execution-env.js +45 -33
  26. package/dist/boot/execution-lane.d.ts +37 -9
  27. package/dist/boot/execution-lane.js +74 -20
  28. package/dist/boot/exit-boundary.d.ts +1 -1
  29. package/dist/boot/exit-last.js +2 -1
  30. package/dist/boot/governance-seams.d.ts +2 -2
  31. package/dist/boot/leader.js +1 -1
  32. package/dist/boot/memory-boundary.d.ts +11 -11
  33. package/dist/boot/memory-boundary.js +3 -3
  34. package/dist/boot/memory-consolidation.d.ts +13 -24
  35. package/dist/boot/memory-consolidation.js +0 -13
  36. package/dist/boot/org-memory.js +3 -2
  37. package/dist/boot/parked-revive-gate.d.ts +1 -1
  38. package/dist/boot/parked-revive-gate.js +1 -1
  39. package/dist/boot/reapers.js +1 -1
  40. package/dist/boot/resolve-spec.js +91 -111
  41. package/dist/boot/retention-lane.d.ts +4 -42
  42. package/dist/boot/session-faces.d.ts +1 -0
  43. package/dist/boot/session-faces.js +8 -2
  44. package/dist/boot/stage-01-config.d.ts +1 -1
  45. package/dist/boot/stage-01-config.js +6 -2
  46. package/dist/boot/stage-02-web-admin-pull.d.ts +1 -1
  47. package/dist/boot/stage-02-web-admin-pull.js +10 -8
  48. package/dist/boot/stage-03-store-backend.d.ts +1 -1
  49. package/dist/boot/stage-04-stores.d.ts +1 -1
  50. package/dist/boot/stage-05-execution-env.d.ts +2 -2
  51. package/dist/boot/stage-05-execution-env.js +3 -3
  52. package/dist/boot/stage-06-runners.d.ts +3 -3
  53. package/dist/boot/stage-06-runners.js +1 -3
  54. package/dist/boot/stage-07-capability-layer.d.ts +3 -3
  55. package/dist/boot/stage-07-capability-layer.js +4 -9
  56. package/dist/boot/stage-08-reapers.d.ts +3 -3
  57. package/dist/boot/stage-09-leader.d.ts +4 -3
  58. package/dist/boot/stage-10-http-server.d.ts +4 -3
  59. package/dist/boot/stage-10-http-server.js +2 -1
  60. package/dist/boot/stores.d.ts +9 -0
  61. package/dist/boot/stores.js +18 -7
  62. package/dist/boot/web-admin.js +3 -3
  63. package/dist/capabilities/center-plugins.d.ts +2 -0
  64. package/dist/capabilities/center-plugins.js +6 -2
  65. package/dist/capabilities/composite-members.d.ts +1 -0
  66. package/dist/capabilities/composite-members.js +1 -0
  67. package/dist/capabilities/execution-lane.d.ts +7 -7
  68. package/dist/capabilities/execution-lane.js +2 -2
  69. package/dist/capabilities/hands-lane.d.ts +1 -1
  70. package/dist/capabilities/scenarios.d.ts +32 -18
  71. package/dist/capabilities/scenarios.js +13 -9
  72. package/dist/capabilities/settings-contract.d.ts +29 -0
  73. package/dist/capabilities/settings-contract.js +14 -0
  74. package/dist/capabilities/skills.d.ts +5 -5
  75. package/dist/capability-facts.d.ts +38 -0
  76. package/dist/capability-facts.js +34 -1
  77. package/dist/center-credential-renewer.js +3 -2
  78. package/dist/config-catalog.js +6 -5
  79. package/dist/config-invariants.d.ts +18 -3
  80. package/dist/config-invariants.js +36 -19
  81. package/dist/config-lkg.d.ts +1 -1
  82. package/dist/config-lkg.js +5 -6
  83. package/dist/config-provider.js +2 -0
  84. package/dist/config-types.d.ts +190 -186
  85. package/dist/config.d.ts +68 -5
  86. package/dist/config.js +80 -54
  87. package/dist/degenerate-instrument.js +1 -1
  88. package/dist/deploy-facts.js +3 -2
  89. package/dist/deployment-shape.d.ts +21 -12
  90. package/dist/deployment-shape.js +24 -6
  91. package/dist/env-facts.d.ts +7 -5
  92. package/dist/env-facts.js +10 -6
  93. package/dist/execution-config-root.d.ts +5 -5
  94. package/dist/execution-config-root.js +5 -5
  95. package/dist/execution-env-purpose.d.ts +14 -0
  96. package/dist/execution-env-purpose.js +29 -0
  97. package/dist/execution-lane-caps.d.ts +49 -86
  98. package/dist/execution-lane-caps.js +52 -62
  99. package/dist/execution-placement.d.ts +18 -2
  100. package/dist/execution-placement.js +19 -0
  101. package/dist/file-history-disclosure.d.ts +2 -2
  102. package/dist/fleet/drain-entry.d.ts +17 -10
  103. package/dist/fleet/drain-entry.js +1 -1
  104. package/dist/fleet/serving-lease.js +3 -4
  105. package/dist/history-anchor.d.ts +22 -0
  106. package/dist/history-anchor.js +14 -0
  107. package/dist/hooks/command-spawn.d.ts +1 -4
  108. package/dist/hooks/command-spawn.js +0 -11
  109. package/dist/hooks/hook-runner.d.ts +52 -8
  110. package/dist/hooks/hook-runner.js +160 -36
  111. package/dist/http/approval-sweeps.d.ts +2 -5
  112. package/dist/http/approval-sweeps.js +3 -2
  113. package/dist/http/checkpoint-ctx.d.ts +17 -0
  114. package/dist/http/checkpoint-ctx.js +6 -0
  115. package/dist/http/claim-latency.d.ts +10 -0
  116. package/dist/http/claim-latency.js +12 -0
  117. package/dist/http/dispatch.js +1 -1
  118. package/dist/http/durable-run-leg.js +2 -1
  119. package/dist/http/execution-context.d.ts +3 -1
  120. package/dist/http/execution-context.js +4 -0
  121. package/dist/http/memory-compliance-failure-reply.d.ts +1 -1
  122. package/dist/http/memory-compliance-failure-reply.js +3 -0
  123. package/dist/http/memory-store-refusal-reply.d.ts +3 -3
  124. package/dist/http/memory-store-refusal-reply.js +3 -0
  125. package/dist/http/owner-access.d.ts +11 -0
  126. package/dist/http/owner-access.js +7 -4
  127. package/dist/http/principal-gate.d.ts +3 -14
  128. package/dist/http/principal-gate.js +0 -13
  129. package/dist/http/request-guards.d.ts +1 -1
  130. package/dist/http/resume-legs.d.ts +7 -10
  131. package/dist/http/resume-legs.js +79 -50
  132. package/dist/http/rewind-files-reply.d.ts +34 -0
  133. package/dist/http/rewind-files-reply.js +36 -0
  134. package/dist/http/route-ctx.d.ts +32 -16
  135. package/dist/http/route-table.js +2 -0
  136. package/dist/http/routes/approvals-assistant.js +5 -25
  137. package/dist/http/routes/capabilities.js +8 -2
  138. package/dist/http/routes/devices.js +1 -1
  139. package/dist/http/routes/memory-origin.d.ts +1 -1
  140. package/dist/http/routes/notify-wake.js +2 -1
  141. package/dist/http/routes/projects.d.ts +70 -0
  142. package/dist/http/routes/projects.js +86 -0
  143. package/dist/http/routes/rules.js +30 -2
  144. package/dist/http/routes/runs.js +8 -8
  145. package/dist/http/routes/session-sync.js +27 -10
  146. package/dist/http/routes/sessions.d.ts +7 -1
  147. package/dist/http/routes/sessions.js +104 -2
  148. package/dist/http/routes/tasks.js +9 -3
  149. package/dist/http/server.d.ts +24 -10
  150. package/dist/http/server.js +17 -6
  151. package/dist/http/stored-body-replay.d.ts +5 -3
  152. package/dist/http/stored-body-replay.js +10 -1
  153. package/dist/http/wire-types.d.ts +19 -10
  154. package/dist/index.d.ts +2 -2
  155. package/dist/index.js +1 -1
  156. package/dist/instruction-source-notice.d.ts +1 -1
  157. package/dist/memory-embedder-reembed.d.ts +38 -0
  158. package/dist/memory-embedder-reembed.js +20 -0
  159. package/dist/memory-incident-sink.d.ts +0 -28
  160. package/dist/memory-incident-sink.js +5 -0
  161. package/dist/memory-scope.d.ts +2 -2
  162. package/dist/memory-scope.js +1 -1
  163. package/dist/memory-store-refusal.d.ts +17 -4
  164. package/dist/memory-store-refusal.js +1 -1
  165. package/dist/memory-sync-client.d.ts +2 -0
  166. package/dist/memory-sync-client.js +13 -11
  167. package/dist/memory-sync.js +1 -1
  168. package/dist/model-compat.d.ts +35 -21
  169. package/dist/model-compat.js +49 -21
  170. package/dist/model-entry-refusal.d.ts +11 -1
  171. package/dist/model-entry-refusal.js +7 -0
  172. package/dist/namespaced-rule-name.d.ts +18 -1
  173. package/dist/namespaced-rule-name.js +12 -0
  174. package/dist/observability/fail-open.d.ts +17 -9
  175. package/dist/observability/fail-open.js +17 -9
  176. package/dist/observability/metrics.d.ts +2 -0
  177. package/dist/observability/metrics.js +2 -0
  178. package/dist/observability/secret-env-scrub.d.ts +30 -4
  179. package/dist/observability/secret-env-scrub.js +15 -3
  180. package/dist/orchestration/workflow-agent-session-index.d.ts +7 -12
  181. package/dist/orchestration/workflow-agent-session-index.js +1 -6
  182. package/dist/orchestration/workflow-completion-inbox.d.ts +26 -6
  183. package/dist/orchestration/workflow-completion-inbox.js +63 -45
  184. package/dist/org-memory-admission.d.ts +5 -2
  185. package/dist/org-memory-admission.js +25 -10
  186. package/dist/parked-decide.d.ts +33 -26
  187. package/dist/parked-decide.js +36 -44
  188. package/dist/plugins/approval-ask-store-file.d.ts +10 -2
  189. package/dist/plugins/approval-ask-store-file.js +37 -4
  190. package/dist/plugins/approval-ask-store-memory.d.ts +5 -3
  191. package/dist/plugins/approval-ask-store-memory.js +11 -2
  192. package/dist/plugins/approval-ask-store-sql.d.ts +3 -0
  193. package/dist/plugins/approval-ask-store-sql.js +3 -1
  194. package/dist/plugins/blob-backend.d.ts +38 -195
  195. package/dist/plugins/blob-backend.js +33 -229
  196. package/dist/plugins/caching-session-store.d.ts +9 -4
  197. package/dist/plugins/checkpoint-index-columns.d.ts +1 -1
  198. package/dist/plugins/checkpoint-index-columns.js +3 -2
  199. package/dist/plugins/checkpoint-store-face.d.ts +1 -1
  200. package/dist/plugins/device-store-sql.d.ts +2 -2
  201. package/dist/plugins/device-store-sql.js +5 -10
  202. package/dist/plugins/execution-lane-rename-m40.d.ts +20 -0
  203. package/dist/plugins/execution-lane-rename-m40.js +10 -0
  204. package/dist/plugins/execution-placement-sql.d.ts +63 -88
  205. package/dist/plugins/execution-placement-sql.js +94 -54
  206. package/dist/plugins/file-run-store.d.ts +26 -12
  207. package/dist/plugins/file-run-store.js +63 -63
  208. package/dist/plugins/imported-layer-root-retirement.d.ts +17 -8
  209. package/dist/plugins/imported-layer-root-retirement.js +4 -8
  210. package/dist/plugins/inbox-payload-column.d.ts +14 -0
  211. package/dist/plugins/inbox-payload-column.js +13 -0
  212. package/dist/plugins/local-checkpoint-store.d.ts +5 -0
  213. package/dist/plugins/local-checkpoint-store.js +11 -7
  214. package/dist/plugins/local-data-dir-modes-m39.d.ts +48 -0
  215. package/dist/plugins/local-data-dir-modes-m39.js +182 -0
  216. package/dist/plugins/local-engine-high-water.d.ts +11 -0
  217. package/dist/plugins/local-engine-high-water.js +59 -0
  218. package/dist/plugins/local-session-store.d.ts +91 -25
  219. package/dist/plugins/local-session-store.js +124 -45
  220. package/dist/plugins/local-task-attachment-store.d.ts +2 -0
  221. package/dist/plugins/local-task-attachment-store.js +10 -11
  222. package/dist/plugins/memory-embedder-fingerprint.d.ts +33 -10
  223. package/dist/plugins/memory-embedder-fingerprint.js +52 -12
  224. package/dist/plugins/memory-embedder.d.ts +1 -1
  225. package/dist/plugins/memory-embedder.js +2 -2
  226. package/dist/plugins/memory-engine-pg.d.ts +4 -3
  227. package/dist/plugins/memory-engine-pg.js +4 -4
  228. package/dist/plugins/memory-engine-sql-apply.d.ts +13 -4
  229. package/dist/plugins/memory-engine-sql-apply.js +1 -1
  230. package/dist/plugins/memory-engine-tidb.d.ts +8 -5
  231. package/dist/plugins/memory-engine-tidb.js +7 -8
  232. package/dist/plugins/one-time-migrations.d.ts +145 -35
  233. package/dist/plugins/one-time-migrations.js +272 -120
  234. package/dist/plugins/owner-only-file-mode.d.ts +29 -0
  235. package/dist/plugins/owner-only-file-mode.js +141 -0
  236. package/dist/plugins/permission-rule-store-file.d.ts +8 -8
  237. package/dist/plugins/permission-rule-store-file.js +14 -2
  238. package/dist/plugins/pg-pool.d.ts +2 -1
  239. package/dist/plugins/pg-pool.js +11 -4
  240. package/dist/plugins/release-version.d.ts +20 -0
  241. package/dist/plugins/release-version.js +28 -0
  242. package/dist/plugins/remote-env-adb.d.ts +20 -4
  243. package/dist/plugins/remote-env-adb.js +39 -11
  244. package/dist/plugins/remote-env-e2b.d.ts +12 -3
  245. package/dist/plugins/remote-env-e2b.js +6 -4
  246. package/dist/plugins/remote-env-host.d.ts +9 -1
  247. package/dist/plugins/remote-env-host.js +6 -5
  248. package/dist/plugins/remote-env-k8s.d.ts +5 -2
  249. package/dist/plugins/remote-env-k8s.js +15 -4
  250. package/dist/plugins/remote-env-local-docker.d.ts +4 -1
  251. package/dist/plugins/remote-env-local-docker.js +3 -3
  252. package/dist/plugins/remote-env-ssh.d.ts +8 -2
  253. package/dist/plugins/remote-env-ssh.js +26 -24
  254. package/dist/plugins/remote-shell.d.ts +59 -30
  255. package/dist/plugins/remote-shell.js +175 -62
  256. package/dist/plugins/retention-declaration.d.ts +37 -0
  257. package/dist/plugins/retention-declaration.js +9 -0
  258. package/dist/plugins/retention-deployment.d.ts +126 -0
  259. package/dist/plugins/retention-deployment.js +88 -0
  260. package/dist/plugins/retention-lane-store-sql.d.ts +74 -4
  261. package/dist/plugins/retention-lane-store-sql.js +103 -1
  262. package/dist/plugins/retention-sql.d.ts +29 -0
  263. package/dist/plugins/retention-sql.js +8 -0
  264. package/dist/plugins/schema-consistency.d.ts +0 -6
  265. package/dist/plugins/schema-consistency.js +1 -2
  266. package/dist/plugins/schema-ensure-legs.d.ts +1 -1
  267. package/dist/plugins/schema-ensure-legs.js +11 -1
  268. package/dist/plugins/session-ext-table.d.ts +74 -0
  269. package/dist/plugins/session-ext-table.js +121 -0
  270. package/dist/plugins/session-fork.d.ts +1 -1
  271. package/dist/plugins/session-row-sql.d.ts +8 -7
  272. package/dist/plugins/session-row-sql.js +15 -7
  273. package/dist/plugins/session-store-sql.d.ts +131 -0
  274. package/dist/plugins/session-store-sql.js +298 -0
  275. package/dist/plugins/session-workspace-cell.d.ts +2 -2
  276. package/dist/plugins/session-workspace-cell.js +2 -2
  277. package/dist/plugins/shared-memory-store-sql.d.ts +10 -0
  278. package/dist/plugins/shared-memory-store-sql.js +13 -13
  279. package/dist/plugins/snapshot-bucket-presence.js +1 -1
  280. package/dist/plugins/sql-driver.d.ts +23 -7
  281. package/dist/plugins/sql-driver.js +41 -8
  282. package/dist/plugins/sql-errors.d.ts +5 -2
  283. package/dist/plugins/sql-errors.js +4 -0
  284. package/dist/plugins/store-backend.d.ts +35 -8
  285. package/dist/plugins/store-backend.js +184 -62
  286. package/dist/plugins/store-contracts.d.ts +9 -2
  287. package/dist/plugins/store-contracts.js +1 -0
  288. package/dist/plugins/task-attachment-store.d.ts +6 -8
  289. package/dist/plugins/task-attachment-store.js +15 -10
  290. package/dist/plugins/task-list-store-sql.d.ts +1 -1
  291. package/dist/plugins/text-column-capacity.d.ts +21 -0
  292. package/dist/plugins/text-column-capacity.js +5 -0
  293. package/dist/plugins/tidb-pool.d.ts +3 -2
  294. package/dist/plugins/tidb-pool.js +19 -31
  295. package/dist/plugins/user-input-ledger-sql.d.ts +1 -1
  296. package/dist/read-face-posture.d.ts +6 -6
  297. package/dist/read-face-posture.js +2 -2
  298. package/dist/request-value-closure.d.ts +5 -5
  299. package/dist/request-value-closure.js +1 -1
  300. package/dist/rules-consent.d.ts +41 -13
  301. package/dist/rules-consent.js +101 -53
  302. package/dist/run-local.js +17 -13
  303. package/dist/runs.d.ts +48 -30
  304. package/dist/runs.js +26 -16
  305. package/dist/runtime-caps-resolver.d.ts +15 -8
  306. package/dist/runtime-caps-resolver.js +14 -10
  307. package/dist/sealed-key-layout.d.ts +2 -3
  308. package/dist/sealed-key-layout.js +0 -1
  309. package/dist/sealed-key.js +7 -5
  310. package/dist/security.d.ts +5 -3
  311. package/dist/sema-config-dir.js +2 -2
  312. package/dist/server-secret-env.d.ts +2 -0
  313. package/dist/service-version.d.ts +2 -1
  314. package/dist/service-version.js +2 -2
  315. package/dist/session-error-wire.d.ts +1 -1
  316. package/dist/session-incarnation.d.ts +8 -5
  317. package/dist/session-resident-background.d.ts +85 -32
  318. package/dist/session-resident-background.js +75 -7
  319. package/dist/session-row.d.ts +1 -1
  320. package/dist/session-sync-kernel.d.ts +1 -1
  321. package/dist/session-workspace.d.ts +11 -2
  322. package/dist/session-workspace.js +5 -0
  323. package/dist/sighup-idle.d.ts +1 -1
  324. package/dist/store-posture.d.ts +2 -1
  325. package/dist/stored-request-hooks-m20.d.ts +3 -2
  326. package/dist/stored-request-hooks-m20.js +19 -14
  327. package/dist/stores-sql/blob-index-sql.d.ts +148 -0
  328. package/dist/stores-sql/blob-index-sql.js +154 -0
  329. package/dist/stores-sql/checkpoint-store-sql.d.ts +1 -1
  330. package/dist/stores-sql/checkpoint-store-sql.js +11 -27
  331. package/dist/{plugins → stores-sql}/file-history-store-sql.d.ts +23 -11
  332. package/dist/{plugins → stores-sql}/file-history-store-sql.js +23 -18
  333. package/dist/{plugins → stores-sql}/pg-session-storage.d.ts +23 -76
  334. package/dist/{plugins → stores-sql}/pg-session-storage.js +80 -209
  335. package/dist/{plugins → stores-sql}/retention-store-sql.d.ts +123 -217
  336. package/dist/{plugins → stores-sql}/retention-store-sql.js +66 -190
  337. package/dist/{plugins → stores-sql}/session-event-payload.d.ts +1 -1
  338. package/dist/{plugins → stores-sql}/session-event-payload.js +1 -1
  339. package/dist/stores-sql/session-policy-store-sql.d.ts +1 -1
  340. package/dist/stores-sql/session-write-hooks.d.ts +59 -0
  341. package/dist/stores-sql/session-write-hooks.js +2 -0
  342. package/dist/{plugins → stores-sql}/tidb-session-storage.d.ts +10 -11
  343. package/dist/{plugins → stores-sql}/tidb-session-storage.js +10 -21
  344. package/dist/{plugins → stores-sql}/tidb-session-store.d.ts +32 -122
  345. package/dist/{plugins → stores-sql}/tidb-session-store.js +71 -171
  346. package/dist/stores-sql/tool-result-store-sql.d.ts +1 -1
  347. package/dist/stores-sql/tool-result-store-sql.js +1 -1
  348. package/dist/stores-sql/windowed-session-storage.d.ts +56 -0
  349. package/dist/stores-sql/windowed-session-storage.js +61 -0
  350. package/dist/task-a2a.d.ts +7 -1
  351. package/dist/task-a2a.js +15 -14
  352. package/dist/task-cwd.d.ts +11 -3
  353. package/dist/task-cwd.js +17 -1
  354. package/dist/task-mcp.d.ts +10 -2
  355. package/dist/task-mcp.js +13 -16
  356. package/dist/task-settings.d.ts +9 -4
  357. package/dist/task-settings.js +17 -6
  358. package/dist/tool-approval.d.ts +21 -8
  359. package/dist/tool-approval.js +10 -6
  360. package/dist/trace/core-keyset-guard.d.ts +9 -3
  361. package/dist/trace/engine-notice-wire.d.ts +1 -1
  362. package/dist/trace/engine-notice-wire.js +2 -0
  363. package/dist/trace/exit-seat.d.ts +23 -1
  364. package/dist/trace/exit-seat.js +3 -0
  365. package/dist/trace/project.d.ts +33 -16
  366. package/dist/trace/project.js +12 -9
  367. package/dist/trace/redact.d.ts +1 -1
  368. package/dist/trace/redact.js +61 -73
  369. package/dist/trace/self-minted-wire.d.ts +263 -10
  370. package/dist/trace/self-minted-wire.js +90 -2
  371. package/dist/trace/sema-provenance.d.ts +45 -41
  372. package/dist/trace/sema-provenance.js +81 -10
  373. package/dist/trace/task-notification-facets.d.ts +70 -2
  374. package/dist/trace/task-notification-facets.js +71 -1
  375. package/dist/trace/wire-projection-faces.d.ts +38 -2
  376. package/dist/trace/wire-projection-faces.js +26 -1
  377. package/dist/unread-request-members.d.ts +66 -0
  378. package/dist/unread-request-members.js +41 -0
  379. package/dist/user-input-ledger.d.ts +2 -2
  380. package/dist/web-admin-client/apply-effective.js +22 -26
  381. package/dist/web-admin-client/candidate-gate.d.ts +35 -3
  382. package/dist/web-admin-client/candidate-gate.js +53 -5
  383. package/dist/web-admin-client/center-request.d.ts +4 -1
  384. package/dist/web-admin-client/center-request.js +2 -1
  385. package/dist/web-admin-client/effective-keys.js +0 -1
  386. package/dist/web-admin-client/facade.d.ts +1 -1
  387. package/dist/web-admin-client/http-client.d.ts +1 -0
  388. package/dist/web-admin-client/http-client.js +17 -9
  389. package/dist/web-admin-client/restart-signal.js +5 -2
  390. package/dist/web-admin-client/skills-mcp.d.ts +20 -6
  391. package/dist/web-admin-client/skills-mcp.js +26 -21
  392. package/dist/web-admin-client/types.d.ts +34 -49
  393. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +2 -2
  394. package/package.json +13 -12
  395. package/scripts/drain-check-local.mjs +2 -28
  396. package/scripts/drain-check.mysql.sql +2 -18
  397. package/scripts/drain-check.pg.sql +2 -18
  398. package/wire-changes/server@7.147.0.json +813 -0
@@ -1,45 +1,49 @@
1
1
  /**
2
- * [ref](a)(core 7.2.0 / [ref] 片6 d1):`task_notification` 帧上 `_sema_provenance` typed 归因侧记的
3
- * **单点**投影判据——live 三腿(`trace/project.ts` 的 `taskNotificationEventData`)与 park 半场
4
- * (`orchestration/workflow-completion-inbox.ts` 的 `taskNotificationInboxEntry`)共用,两腿字节同判。
2
+ * [ref](a)(core 7.2.0 / [ref] 片6 d1)· [ref](会话箱车道三 lane 同批翻):`task_notification` 帧上 `_sema_provenance` typed 归因侧记的
3
+ * **单点**投影判据 —— live 三腿(`trace/project.ts` 的 `taskNotificationEventData`)与 park 半场
4
+ * (`orchestration/workflow-completion-inbox.ts` 的 `taskNotificationInboxEntry`)共用,两腿同判(park 腿的 drain 直接 spread extras 成帧、
5
+ * 不再经 project.ts,判据必须在入库前做,而且只能有一份)。一只 wire 键一个判据文件:同帧三只会话箱载体在 `task-notification-facets.ts`。
5
6
  *
6
- * `kind` 是**闭集**——wire 上只许出现 core 词表里的 lane 词。两向锚([ref]/[ref] 同纪律,与
7
- * routes/notify-wake.ts 的 `NOTIFY_STATUSES` 同形):`satisfies` 保「表内无词表外的词」(core 删/改词 ⇒ 编译红),
8
- * 穷举断言保「词表无表外的词」(core 加 lane ⇒ 编译红,新词必须由人处置——它是 cli 渲染判别键,静默透传一个
9
- * 未知 lane 等于替 core 声明一种渲染形)。运行期闭集外的值(上游漂了 / 载荷被改过)⇒ **丢整键**,与 `priority`
10
- * 的闭集守卫(`trace/injection-tier.ts`)同判:消费端退回老形卡,不按未知 lane 猜;`agentMessage` 不受牵连
11
- * (它是渲染判别,不是 lane 词)。
7
+ * 规则与那三只载体同一条:逐成员挑(绝不 spread)、在场才带、**在场却读不出 ⇒ 整键丢并计一次**(`dropProjectedFace`,NP-5)、缺席不计;
8
+ * 身份 / 地址 / 闭集词 / 计数 / 时刻逐字,展示 / 自由文本成员经出口座(座由腿给:{@link FrameTextSeat})。
9
+ * · `kind` —— **闭集**:wire 上只许出现 core 词表里的 lane 词。两向锚([ref]/[ref] 同纪律):`satisfies` 保「表内无词表外的词」(core 删 / 改词
10
+ * ⇒ 编译红),穷举断言保「词表无表外的词」(core 加 lane ⇒ 编译红 —— 新词必须由人处置:它是渲染判别键,静默透传一个未知 lane 等于替 core 声明一种
11
+ * 渲染形)。运行期词表外的值(上游漂了 / 载荷被改过)⇒ 整键丢并计一次,消费端退回老形卡;同帧载体不受牵连(它们是渲染判别,不是 lane 词)。
12
+ * · `from` / `taskId` / `seq` 必需,`agentType` 可选(本 mount 的 agent_message lane 恒缺席,在场即逐字)。
13
+ * · `peerMeta` —— 两种箱记录 lane 上 store 记录的 typed peer 元数据(core:「the store record's typed peer metadata, verbatim (authority; a notice
14
+ * frame's `peerMeta.notice` is the typed notice, its carrier holds only the rendered line)」)。逐成员:`fromSession` / `fromRoot` / `fromScope`
15
+ * 身份 / 寻址串逐字;`fromMode` / `kind` 闭集取 core 导出的 `MAILBOX_PEER_FROM_MODES` / `MAILBOX_PEER_RECORD_KINDS`(不手抄,[ref]);`urgent` 布尔;
16
+ * `notice` 见下。**`senderKey` / `gateReceiptId` / `occupant` / `fromOccupant` 不读不投**(登记在 `wire-projection-faces.ts` 的
17
+ * `task_notification_peer_meta` 行,一条律:凭据 / 身份令牌类 —— 准入闸的发信方键、跨主体投递闸的回执号、收发两方会话的化身令牌;
18
+ * 与顶层 `peer.senderKey` 同律,安全轴 fail-closed)。
19
+ * · `peerMeta.notice` —— 回执 / idle 通告的 typed 正体:`state` 必需、**开集串逐字**(core 型 `string`;新词原样过境,kind↔state 的配对是 drain 的判,
20
+ * 本服务不复判);`refSeq` / `finishedAt` 非负有限数(与 core 存储校验同界);`recipient` / `target`(展示标签)、`detail`(目标会话的那一行)、
21
+ * `dropReason` 是别处来的文本 ⇒ 经座。
22
+ * 不跨成员判(哪个 lane 带 `peerMeta`、哪个 lane 配哪只载体):那是产生者的律,core 在铸点守;本服务只判每个成员自己的形。
12
23
  */
13
- import type { SemaProvenance } from "@sema-agent/core";
14
- /** wire 放行的 lane 词(PROJECTED)。 */
15
- export declare const SEMA_PROVENANCE_KINDS: readonly ["agent_message"];
16
- /**
17
- * 有意**不**放行的 lane 词(EXCLUDED,逐词记账;运行期落到「丢整键」臂 —— 与闭集外的未知词同臂,但这里的词是
18
- * core 词表**内**的、经人裁定不上 wire 的):
19
- * · `cross_session_message` —— core fc52b4d4 [ref] §4.1(session-box drain 铸;`from` 是对端**地址**、`peerMeta`
20
- * 携 typed peer 记录)。🔴 **7.91.0 订正**:`RunnerDeps.peerDirectory` 座已接线([ref])⇒ 「本仓不可达」那半句作废,
21
- * 有席的部署上这个 lane 词真的会被铸出来;仍不放行的理由只剩**注入帧渲染形候 [ref] @server③ 表态**。
22
- * 与 core-keyset-guard.ts ① 的 `crossSessionMessage` / ①-nested 的 `peerMeta` 同批同判,表态之后三处同翻。
23
- * · `cross_session_notice` —— core 7.4.0 [ref] §4.4/§5.2(片4;本闭集 2026-09-05 真红出它)。**同一条车道的
24
- * 第二个载体**,不是新判据:同一个 session-box drain 铸(`agents/peer-session-drain.js` 的 notice 臂),同一个
25
- * `RunnerDeps.peerDirectory` 座前提(同样自 7.91.0 起在场);渲染形与它的载体 `crossSessionNotice`
26
- * (core-keyset-guard.ts ① 的同名排除键)一同候 [ref] 表态。放进 EXCLUDED 而不是 PROJECTED,是**沿用**上一行的
27
- * 裁定而不是新增特判:表态未出前放行一个 lane 词,等于替它预先声明一种 cli 渲染形。表态落定那天三处(本簿、
28
- * 载体键、①-nested 的 `peerMeta`)同批翻。
29
- * · `inbox_notice` —— core 7.30.0 [ref]([ref] 提货;本闭集当拍真红出它)。**同一条车道的第三个载体**(收件箱通告,
30
- * `crossSessionMessage` / `crossSessionNotice` 之后),同一个 session-box drain 铸;载体键 `inboxNotice` 在
31
- * core-keyset-guard.ts ① 同批进 EXCLUDED。沿用上两行的裁定,不是新判据:[ref] 表态落定那天四处同批翻。
32
- */
33
- export declare const SEMA_PROVENANCE_KINDS_EXCLUDED: readonly ["cross_session_message", "cross_session_notice", "inbox_notice"];
34
- /** 本仓两条腿入参的**形**(不是 core 类型:入参是运行期载荷,`kind` 先当 string 收、经闭集才成 typed)。 */
35
- export interface SemaProvenanceInput {
36
- kind: string;
37
- from: string;
38
- taskId: string;
39
- seq: number;
40
- agentType?: string;
41
- }
42
- /** 逐成员挑取(绝不 spread —— core 给侧记加成员时必须经 keyset 门处置,见 `trace/core-keyset-guard.ts` ①);
43
- * 返回 undefined = 闭集外 / 形不合 ⇒ 调用方丢整键。`agentType` 缺席不编(本 mount 恒缺席,在场即透传)。 */
44
- export declare function semaProvenanceOrAbsent(p: SemaProvenanceInput): SemaProvenance | undefined;
24
+ import { type MailboxPeerMeta, type MailboxPeerNoticeMeta, type SemaProvenance } from "@sema-agent/core";
25
+ import { type SafeText } from "./exit-seat.js";
26
+ import { type FaceExcluded, type FrameTextSeat } from "./task-notification-facets.js";
27
+ /** wire 放行的 lane 词 = core 词表全员(会话箱车道三词自 [ref] 起与 `agent_message` 同簿;不再有「有意不放行」的第二簿)。 */
28
+ export declare const SEMA_PROVENANCE_KINDS: readonly ["agent_message", "cross_session_message", "cross_session_notice", "inbox_notice"];
29
+ type NoticeText = "recipient" | "dropReason" | "detail" | "target";
30
+ /** `peerMeta.notice` 的 wire 形:core 型减登记表排除;展示 / 自由文本成员是出口座铸的 {@link SafeText}。 */
31
+ export type PeerNoticeWire = Omit<MailboxPeerNoticeMeta, NoticeText | FaceExcluded<"task_notification_peer_notice">> & {
32
+ [K in Exclude<NoticeText, FaceExcluded<"task_notification_peer_notice">>]?: SafeText;
33
+ };
34
+ /** `peerMeta` 的 wire 形:core 型减登记表排除(`senderKey` / `gateReceiptId` / `occupant` / `fromOccupant`)。 */
35
+ export type PeerMetaWire = Omit<MailboxPeerMeta, "notice" | FaceExcluded<"task_notification_peer_meta">> & {
36
+ notice?: PeerNoticeWire;
37
+ };
38
+ /** 侧记的 wire 形:core 型减登记表排除(今天零排除)。 */
39
+ export type SemaProvenanceWire = Omit<SemaProvenance, "peerMeta" | FaceExcluded<"task_notification_provenance">> & {
40
+ peerMeta?: PeerMetaWire;
41
+ };
42
+ /** `_sema_provenance` 这一只键(在场才铸;读不出 ⇒ 整键丢并计一次)。两腿入参的形不是 core 类型:运行期载荷先当 `unknown` 收、判过形才成 typed。 */
43
+ export declare function semaProvenanceFields(n: {
44
+ _sema_provenance?: unknown;
45
+ }, seat: FrameTextSeat): {
46
+ _sema_provenance?: SemaProvenanceWire;
47
+ };
48
+ export {};
45
49
  //# sourceMappingURL=sema-provenance.d.ts.map
@@ -1,14 +1,85 @@
1
- export const SEMA_PROVENANCE_KINDS = ["agent_message"];
2
- export const SEMA_PROVENANCE_KINDS_EXCLUDED = ["cross_session_message", "cross_session_notice", "inbox_notice"];
1
+ import { MAILBOX_PEER_FROM_MODES, MAILBOX_PEER_RECORD_KINDS } from "@sema-agent/core";
2
+ import { seatText } from "./exit-seat.js";
3
+ import { dropProjectedFace } from "./projection-drop.js";
4
+ import { isPlainObject, isString, memberOf, optional, settle } from "./task-notification-facets.js";
5
+ export const SEMA_PROVENANCE_KINDS = ["agent_message", "cross_session_message", "cross_session_notice", "inbox_notice"];
3
6
  const _semaProvenanceExhaustive = true;
4
7
  void _semaProvenanceExhaustive;
5
- const _semaProvenanceNoDoubleBook = true;
6
- void _semaProvenanceNoDoubleBook;
7
- export function semaProvenanceOrAbsent(p) {
8
- if (!SEMA_PROVENANCE_KINDS.includes(p.kind))
9
- return undefined;
10
- if (typeof p.from !== "string" || typeof p.taskId !== "string" || typeof p.seq !== "number")
11
- return undefined;
12
- return { kind: p.kind, from: p.from, taskId: p.taskId, seq: p.seq, ...(typeof p.agentType === "string" ? { agentType: p.agentType } : {}) };
8
+ const isKind = memberOf(SEMA_PROVENANCE_KINDS);
9
+ const optString = optional(isString);
10
+ const optFromMode = optional(memberOf(MAILBOX_PEER_FROM_MODES));
11
+ const optRecordKind = optional(memberOf(MAILBOX_PEER_RECORD_KINDS));
12
+ const optBoolean = optional((v) => typeof v === "boolean");
13
+ const optInstant = optional((v) => typeof v === "number" && Number.isFinite(v) && v >= 0);
14
+ export function semaProvenanceFields(n, seat) {
15
+ if (n._sema_provenance === undefined)
16
+ return {};
17
+ const p = settle(provenanceOf(n._sema_provenance, seat), (why) => dropProjectedFace("task_notification._sema_provenance " + why));
18
+ return p !== undefined ? { _sema_provenance: p } : {};
19
+ }
20
+ function provenanceOf(raw, seat) {
21
+ if (!isPlainObject(raw))
22
+ return { why: "is not a plain-data record" };
23
+ const { kind, from, taskId, seq, agentType, peerMeta } = raw;
24
+ if (!isKind(kind))
25
+ return { why: "kind is outside the core lane vocabulary" };
26
+ if (!isString(from) || !isString(taskId) || typeof seq !== "number")
27
+ return { why: "is missing a string from / taskId or a number seq" };
28
+ if (!optString(agentType))
29
+ return { why: "agentType is present but not a string" };
30
+ const meta = peerMeta === undefined ? undefined : peerMetaOf(peerMeta, seat);
31
+ if (meta !== undefined && "why" in meta)
32
+ return { why: `peerMeta ${meta.why}` };
33
+ return { wire: { kind, from, taskId, seq, ...(agentType !== undefined ? { agentType } : {}), ...(meta !== undefined ? { peerMeta: meta.wire } : {}) } };
34
+ }
35
+ function peerMetaOf(raw, seat) {
36
+ if (!isPlainObject(raw))
37
+ return { why: "is not a plain-data record" };
38
+ const { fromSession, fromRoot, fromMode, kind, fromScope, notice, urgent } = raw;
39
+ if (!optString(fromSession) || !optString(fromRoot) || !optString(fromScope)) {
40
+ return { why: "has a present fromSession / fromRoot / fromScope that is not a string" };
41
+ }
42
+ if (!optFromMode(fromMode))
43
+ return { why: "fromMode is outside core MAILBOX_PEER_FROM_MODES" };
44
+ if (!optRecordKind(kind))
45
+ return { why: "kind is outside core MAILBOX_PEER_RECORD_KINDS" };
46
+ if (!optBoolean(urgent))
47
+ return { why: "urgent is present but not a boolean" };
48
+ const typed = notice === undefined ? undefined : noticeOf(notice, seat);
49
+ if (typed !== undefined && "why" in typed)
50
+ return { why: `notice ${typed.why}` };
51
+ return {
52
+ wire: {
53
+ ...(fromSession !== undefined ? { fromSession } : {}),
54
+ ...(fromRoot !== undefined ? { fromRoot } : {}),
55
+ ...(fromMode !== undefined ? { fromMode } : {}),
56
+ ...(kind !== undefined ? { kind } : {}),
57
+ ...(fromScope !== undefined ? { fromScope } : {}),
58
+ ...(typed !== undefined ? { notice: typed.wire } : {}),
59
+ ...(urgent !== undefined ? { urgent } : {}),
60
+ },
61
+ };
62
+ }
63
+ function noticeOf(raw, seat) {
64
+ if (!isPlainObject(raw))
65
+ return { why: "is not a plain-data record" };
66
+ const { state, refSeq, recipient, dropReason, finishedAt, detail, target } = raw;
67
+ if (!isString(state))
68
+ return { why: "is missing a string state" };
69
+ if (!optInstant(refSeq) || !optInstant(finishedAt))
70
+ return { why: "has a present refSeq / finishedAt that is not a non-negative finite number" };
71
+ if (!optString(recipient) || !optString(dropReason) || !optString(detail) || !optString(target))
72
+ return { why: "has a present recipient / dropReason / detail / target that is not a string" };
73
+ return {
74
+ wire: {
75
+ state,
76
+ ...(refSeq !== undefined ? { refSeq } : {}),
77
+ ...(recipient !== undefined ? { recipient: seatText(seat, recipient) } : {}),
78
+ ...(dropReason !== undefined ? { dropReason: seatText(seat, dropReason) } : {}),
79
+ ...(finishedAt !== undefined ? { finishedAt } : {}),
80
+ ...(detail !== undefined ? { detail: seatText(seat, detail) } : {}),
81
+ ...(target !== undefined ? { target: seatText(seat, target) } : {}),
82
+ },
83
+ };
13
84
  }
14
85
  //# sourceMappingURL=sema-provenance.js.map
@@ -9,13 +9,16 @@
9
9
  * `terminalFrameFacets` 统一铸:`spawnName` / `handback` / `compaction`;
10
10
  * · {@link resupplyFields} —— 重供两键([ref]):`resupplied` / `attempt`。
11
11
  * 全部是引擎铸的闭形值(身份键 / 闭集词 / 计数 / 布尔),零模型自由文本 ⇒ 不过 `redactSecrets`;判不过形 ⇒ 那一键
12
- * 缺席(不折默认、不编值)。同一只会话箱车道的**载体** `inboxNotice` 不在这里 —— 它在 EXCLUDED 簿
13
- * (`core-keyset-guard.ts` ①,理由逐字在那里)。
12
+ * 缺席(不折默认、不编值)。
13
+ * [ref] 起第三组:会话箱车道的三只**载体** —— {@link sessionBoxCarrierFields}:`crossSessionMessage` / `crossSessionNotice` /
14
+ * `inboxNotice`(同一条律;载体带别处来的自由文本,经出口座 —— 座由腿给,见 {@link FrameTextSeat})。它们的侧记 `_sema_provenance`
15
+ * (含 typed 的 `peerMeta.notice`)是同帧另一只键,判据在 `sema-provenance.ts`(一只 wire 键一个判据文件,两腿共用)。
14
16
  * 🔴 NP-5(7.100.0 合并复审 [ref] 交叉表 #7):「在场但读不出」经 present-iff 投影脸族的唯一丢弃留痕 `dropProjectedFace`
15
17
  * (`./projection-drop.ts`,`server.trace.projection-input-malformed`)计一次再丢;**缺席从不计数**。此前这里静默丢,
16
18
  * 而同批 `wiring_manifest.teamRole` 走那只计数 —— 同一条规则两种处置。
17
19
  */
18
20
  import { type HandbackState, type TaskNotificationPayload } from "@sema-agent/core";
21
+ import { type ExitSeat, type SafeText } from "./exit-seat.js";
19
22
  /**
20
23
  * 委派终态帧 `compaction` facet 的形 —— **从 core 载荷派生,不手写**(NP-7,7.100.0 合并复审 [ref] 交叉表 #9,opus A5)。
21
24
  * 修前是手写的 `{ passes; breakerOpen; kind? }`:core 给它加成员时 tsc 不红、逐挑处把新成员静默丢(变异探针实测:给 core 的
@@ -61,5 +64,70 @@ export declare function resupplyFields(n: TaskNotificationFacetInput): {
61
64
  resupplied?: true;
62
65
  attempt?: number;
63
66
  };
67
+ /**
68
+ * 一只 `task_notification` 帧的自由文本从哪一行出口座出门 —— **座由腿给,判据不分腿**:
69
+ * · live 三腿(sync SSE / bg·resume 账本行):`trace-frame-text`(不设界,与同帧 `summary` / `result` 同一行);
70
+ * · park 腿(入会话收件、下一次开流 drain):`inbox-frame-text`(界 4000,与 park 条目既有的文本位同额 —— `payload` 列是 TEXT)。
71
+ * 两行同一个脱敏 scope,所以界内的文本两腿逐字节同;非文本成员两腿恒逐字节同。
72
+ */
73
+ export type FrameTextSeat = Extract<ExitSeat, "trace-frame-text" | "inbox-frame-text">;
74
+ type Faces = typeof import("./wire-projection-faces.js").WIRE_PROJECTION_FACES;
75
+ /** 登记表嵌套面那一行的 `excluded`(「哪个成员不投」的单写者)读成联合型 —— 本文件与 `sema-provenance.ts` 的投影型 = core 型减它。 */
76
+ export type FaceExcluded<F extends keyof Faces> = Faces[F]["excluded"][number];
77
+ type CrossSessionMessage = NonNullable<TaskNotificationPayload["crossSessionMessage"]>;
78
+ type CrossSessionNotice = NonNullable<TaskNotificationPayload["crossSessionNotice"]>;
79
+ type InboxNotice = NonNullable<TaskNotificationPayload["inboxNotice"]>;
80
+ /** 消息载体的 wire 形:core 型减登记表排除;`fromName`(发信方原始显示名)与 `body`(对端正文)是出口座铸的 {@link SafeText}。 */
81
+ export type CrossSessionMessageWire = Omit<CrossSessionMessage, "fromName" | "body" | FaceExcluded<"task_notification_cross_session_message">> & {
82
+ fromName?: SafeText;
83
+ body: SafeText;
84
+ };
85
+ /** 通告载体的 wire 形:`kind` 闭二词 + `text`(drain 由 typed notice 渲的句子,句子里嵌着别的会话的标签与那一行 ⇒ 经座)。 */
86
+ export type CrossSessionNoticeWire = Omit<CrossSessionNotice, "text" | FaceExcluded<"task_notification_cross_session_notice">> & {
87
+ text: SafeText;
88
+ };
89
+ /** 收件箱通告载体的 wire 形:四个计数(`box` 登记不投 —— 同帧已有)。 */
90
+ export type InboxNoticeWire = Omit<InboxNotice, FaceExcluded<"task_notification_inbox_notice">>;
91
+ /** 通告载体的 `kind` 闭集。core 只在型上写这两个词、没导出常量 ⇒ 本表 + 两向锚(`satisfies` 保表内无词表外的词;穷举保词表无表外的词 —— core 加 / 删词 ⇒ tsc 红)。 */
92
+ export declare const CROSS_SESSION_NOTICE_KINDS: readonly ["delivery_notice", "idle_notice"];
93
+ /** 一只嵌套键的判决:读得出 ⇒ 要上 wire 的形;读不出 ⇒ 理由(调用方整键丢并计一次)。 */
94
+ export type Verdict<W> = {
95
+ readonly wire: W;
96
+ } | {
97
+ readonly why: string;
98
+ };
99
+ /** 成员读法(本文件与 `sema-provenance.ts` 共用的一组;只判形,不改值)。 */
100
+ /** 纯数据记录:原型是 `Object.prototype` 或 `null`(类实例 / `Date` / `Map` / 数组不算 —— 成员全可选的容器不判原型就会把它们读成 `{}`)。 */
101
+ export declare const isPlainObject: (v: unknown) => v is Record<string, unknown>;
102
+ export declare const isString: (v: unknown) => v is string;
103
+ /** 闭集成员判定 —— 集是 core 导出的常量(不手抄,[ref]),或 core 只在型上写词时本仓经两向锚钉住的词表。 */
104
+ export declare const memberOf: <T extends string>(set: readonly T[]) => (v: unknown) => v is T;
105
+ /** 可选成员:缺席读得出(缺席即缺席,不计数),在场按 `guard` 判。 */
106
+ export declare const optional: <T>(guard: (v: unknown) => v is T) => (v: unknown) => v is T | undefined;
107
+ /** 两条腿入参的形(运行期载荷,先当 `unknown` 收、判过形才成 typed)。 */
108
+ export interface SessionBoxCarrierInput {
109
+ crossSessionMessage?: unknown;
110
+ crossSessionNotice?: unknown;
111
+ inboxNotice?: unknown;
112
+ }
113
+ /**
114
+ * 会话箱车道的三只载体(core 的 session-box drain 唯一铸点;在场 = 渲染判别,core 优先序 agentMessage → crossSessionMessage →
115
+ * crossSessionNotice → inboxNotice,本服务不判跨键优先 —— 那是消费端的渲染律)。规则与本文件其余两组同一条:逐成员挑、在场才带、
116
+ * **在场却读不出 ⇒ 那一只载体整键丢并计一次**(半张卡比没有卡更坏:成员缺席在这些形上是一句正面陈述,读不出若只丢那个成员,
117
+ * 等于替 producer 说了一句它没说的话)、缺席不计。不跨键判(哪个 lane 词配哪只载体是产生者的律,core 在铸点守)。
118
+ * · `crossSessionMessage` —— 对端会话的一条信:`from`(规范编码的发信地址,回信抄进 `to` 的那一串)/ `fromSession` / `fromScope` 身份逐字
119
+ * (遮身份会把两个合法地址塌成一个值,与 `spawnName` 同律);`fromMode` 闭集取 core 的 `PERMISSION_MODE_CLASSES`;`fromName`(原始显示名,
120
+ * core 只在建信封时规范化)与 `body`(对端正文,UNTRUSTED)经座。
121
+ * · `crossSessionNotice` —— `kind` 闭二词({@link CROSS_SESSION_NOTICE_KINDS});`text` 经座。typed 位(`state` / `refSeq` / …)在侧记的
122
+ * `peerMeta.notice`(core:「a host renders a card from there, never by parsing `text`」)—— 不平铺进这里(同一事实只一个读点)。
123
+ * · `inboxNotice` —— `pending` / `delivered` 必需、`urgent` / `resupplied` 可选,全是计数(非负整数)逐字;`box` 不读不投(登记表排除)。
124
+ */
125
+ export declare function sessionBoxCarrierFields(n: SessionBoxCarrierInput, seat: FrameTextSeat): {
126
+ crossSessionMessage?: CrossSessionMessageWire;
127
+ crossSessionNotice?: CrossSessionNoticeWire;
128
+ inboxNotice?: InboxNoticeWire;
129
+ };
130
+ /** 判决落定:读得出 ⇒ 形;读不出 ⇒ 交给调用点的丢弃口(字面面名留在调用点,普查门 GU-2 按它点名)。 */
131
+ export declare const settle: <W>(v: Verdict<W>, drop: (why: string) => undefined) => W | undefined;
64
132
  export {};
65
133
  //# sourceMappingURL=task-notification-facets.d.ts.map
@@ -1,4 +1,5 @@
1
- import { COMPACTION_KINDS, HANDBACK_STATES } from "@sema-agent/core";
1
+ import { COMPACTION_KINDS, HANDBACK_STATES, PERMISSION_MODE_CLASSES } from "@sema-agent/core";
2
+ import { seatText } from "./exit-seat.js";
2
3
  import { dropProjectedFace } from "./projection-drop.js";
3
4
  export function terminalFrameFacetFields(n) {
4
5
  const spawnName = n.spawnName === undefined ? undefined : typeof n.spawnName === "string" ? n.spawnName : dropProjectedFace("task_notification.spawnName is not a string");
@@ -28,4 +29,73 @@ export function resupplyFields(n) {
28
29
  ...(attempt !== undefined ? { attempt } : {}),
29
30
  };
30
31
  }
32
+ export const CROSS_SESSION_NOTICE_KINDS = ["delivery_notice", "idle_notice"];
33
+ const _noticeKindsExhaustive = true;
34
+ void _noticeKindsExhaustive;
35
+ export const isPlainObject = (v) => {
36
+ if (typeof v !== "object" || v === null || Array.isArray(v))
37
+ return false;
38
+ const proto = Object.getPrototypeOf(v);
39
+ return proto === Object.prototype || proto === null;
40
+ };
41
+ export const isString = (v) => typeof v === "string";
42
+ const isCount = (v) => Number.isInteger(v) && v >= 0;
43
+ export const memberOf = (set) => (v) => set.includes(v);
44
+ export const optional = (guard) => (v) => v === undefined || guard(v);
45
+ const optString = optional(isString);
46
+ const optCount = optional(isCount);
47
+ const optModeClass = optional(memberOf(PERMISSION_MODE_CLASSES));
48
+ const isNoticeKind = memberOf(CROSS_SESSION_NOTICE_KINDS);
49
+ export function sessionBoxCarrierFields(n, seat) {
50
+ const message = n.crossSessionMessage === undefined ? undefined : settle(crossSessionMessageOf(n.crossSessionMessage, seat), (why) => dropProjectedFace("task_notification.crossSessionMessage " + why));
51
+ const notice = n.crossSessionNotice === undefined ? undefined : settle(crossSessionNoticeOf(n.crossSessionNotice, seat), (why) => dropProjectedFace("task_notification.crossSessionNotice " + why));
52
+ const inbox = n.inboxNotice === undefined ? undefined : settle(inboxNoticeOf(n.inboxNotice), (why) => dropProjectedFace("task_notification.inboxNotice " + why));
53
+ return {
54
+ ...(message !== undefined ? { crossSessionMessage: message } : {}),
55
+ ...(notice !== undefined ? { crossSessionNotice: notice } : {}),
56
+ ...(inbox !== undefined ? { inboxNotice: inbox } : {}),
57
+ };
58
+ }
59
+ export const settle = (v, drop) => ("why" in v ? drop(v.why) : v.wire);
60
+ function crossSessionMessageOf(raw, seat) {
61
+ if (!isPlainObject(raw))
62
+ return { why: "is not a plain-data record" };
63
+ const { from, fromSession, fromName, fromMode, fromScope, body } = raw;
64
+ if (!isString(from) || !isString(body))
65
+ return { why: "is missing a string from / body" };
66
+ if (!optString(fromSession) || !optString(fromName) || !optString(fromScope))
67
+ return { why: "has a present fromSession / fromName / fromScope that is not a string" };
68
+ if (!optModeClass(fromMode))
69
+ return { why: "fromMode is outside core PERMISSION_MODE_CLASSES" };
70
+ return {
71
+ wire: {
72
+ from,
73
+ ...(fromSession !== undefined ? { fromSession } : {}),
74
+ ...(fromName !== undefined ? { fromName: seatText(seat, fromName) } : {}),
75
+ ...(fromMode !== undefined ? { fromMode } : {}),
76
+ ...(fromScope !== undefined ? { fromScope } : {}),
77
+ body: seatText(seat, body),
78
+ },
79
+ };
80
+ }
81
+ function crossSessionNoticeOf(raw, seat) {
82
+ if (!isPlainObject(raw))
83
+ return { why: "is not a plain-data record" };
84
+ const { kind, text } = raw;
85
+ if (!isNoticeKind(kind))
86
+ return { why: "kind is outside delivery_notice / idle_notice" };
87
+ if (!isString(text))
88
+ return { why: "is missing a string text" };
89
+ return { wire: { kind, text: seatText(seat, text) } };
90
+ }
91
+ function inboxNoticeOf(raw) {
92
+ if (!isPlainObject(raw))
93
+ return { why: "is not a plain-data record" };
94
+ const { pending, delivered, urgent, resupplied } = raw;
95
+ if (!isCount(pending) || !isCount(delivered))
96
+ return { why: "is missing a non-negative integer pending / delivered" };
97
+ if (!optCount(urgent) || !optCount(resupplied))
98
+ return { why: "has a present urgent / resupplied that is not a non-negative integer" };
99
+ return { wire: { pending, delivered, ...(urgent !== undefined ? { urgent } : {}), ...(resupplied !== undefined ? { resupplied } : {}) } };
100
+ }
31
101
  //# sourceMappingURL=task-notification-facets.js.map
@@ -100,7 +100,7 @@ export type DeclaredKey = ManifestShape & {
100
100
  */
101
101
  export declare const FRAME_ENVELOPE_KEYS: readonly ["type", "sourceTaskId", "bgAgentId"];
102
102
  /** 探针文件要从 `@sema-agent/core` 具名导入的类型(`coreType` 表达式里用到的全部名字)。 */
103
- export declare const WIRE_PROJECTION_CORE_IMPORTS: readonly ["TaskEvent", "BrainStatus", "TaskNotificationPayload", "WiringManifest", "EngineNotice", "MemoryImportReport", "OriginClearanceRow", "OriginClearanceEvent", "MemoryEntryOrigin", "TraceEvent", "PromptManifestIdentity", "PromptIdentityLayers", "PromptManifestSelectors", "PromptManifestSection", "PromptChainLink", "SupersededOverlay", "ToolDisclosureManifest"];
103
+ export declare const WIRE_PROJECTION_CORE_IMPORTS: readonly ["TaskEvent", "BrainStatus", "TaskNotificationPayload", "WiringManifest", "EngineNotice", "MemoryImportReport", "OriginClearanceRow", "OriginClearanceEvent", "MemoryEntryOrigin", "TraceEvent", "PromptManifestIdentity", "PromptIdentityLayers", "PromptManifestSelectors", "PromptManifestSection", "PromptChainLink", "SupersededOverlay", "ToolDisclosureManifest", "SemaProvenance", "MailboxPeerMeta", "MailboxPeerNoticeMeta", "CrossSessionEnvelopeFields"];
104
104
  /**
105
105
  * `wiring_manifest` 的 **operator 面多投的那几段**(`wiringManifestOperatorEventData` 在租户形之上加的段)。
106
106
  * operator 行的 `excluded` = 租户行减本常量(派生);四段各自的受众裁定在 `core-keyset-guard.ts` ⑥b。
@@ -219,10 +219,46 @@ export declare const WIRE_PROJECTION_FACES: {
219
219
  readonly task_notification: {
220
220
  readonly projector: "taskNotificationEventData";
221
221
  readonly coreType: `TaskNotificationPayload & ${string}`;
222
- readonly excluded: readonly ["peer", "crossSessionMessage", "crossSessionNotice", "inboxNotice", "received"];
222
+ readonly excluded: readonly ["peer", "received"];
223
223
  readonly unwrapped: readonly ["notification"];
224
224
  readonly minted: readonly ["injected"];
225
225
  };
226
+ readonly task_notification_cross_session_message: {
227
+ readonly projector: "taskNotificationEventData";
228
+ readonly coreType: "CrossSessionEnvelopeFields & NonNullable<TaskNotificationPayload[\"crossSessionMessage\"]>";
229
+ readonly excluded: readonly [];
230
+ readonly minted: readonly [];
231
+ };
232
+ readonly task_notification_cross_session_notice: {
233
+ readonly projector: "taskNotificationEventData";
234
+ readonly coreType: "NonNullable<TaskNotificationPayload[\"crossSessionNotice\"]>";
235
+ readonly excluded: readonly [];
236
+ readonly minted: readonly [];
237
+ };
238
+ readonly task_notification_inbox_notice: {
239
+ readonly projector: "taskNotificationEventData";
240
+ readonly coreType: "NonNullable<TaskNotificationPayload[\"inboxNotice\"]>";
241
+ readonly excluded: readonly ["box"];
242
+ readonly minted: readonly [];
243
+ };
244
+ readonly task_notification_provenance: {
245
+ readonly projector: "taskNotificationEventData";
246
+ readonly coreType: "SemaProvenance";
247
+ readonly excluded: readonly [];
248
+ readonly minted: readonly [];
249
+ };
250
+ readonly task_notification_peer_meta: {
251
+ readonly projector: "taskNotificationEventData";
252
+ readonly coreType: "MailboxPeerMeta";
253
+ readonly excluded: readonly ["senderKey", "gateReceiptId", "occupant", "fromOccupant"];
254
+ readonly minted: readonly [];
255
+ };
256
+ readonly task_notification_peer_notice: {
257
+ readonly projector: "taskNotificationEventData";
258
+ readonly coreType: "MailboxPeerNoticeMeta";
259
+ readonly excluded: readonly [];
260
+ readonly minted: readonly [];
261
+ };
226
262
  readonly wiring_manifest_tenant: {
227
263
  readonly projector: "wiringManifestEventData";
228
264
  readonly coreType: `WiringManifest & ${string}`;
@@ -17,6 +17,10 @@ export const WIRE_PROJECTION_CORE_IMPORTS = [
17
17
  "PromptChainLink",
18
18
  "SupersededOverlay",
19
19
  "ToolDisclosureManifest",
20
+ "SemaProvenance",
21
+ "MailboxPeerMeta",
22
+ "MailboxPeerNoticeMeta",
23
+ "CrossSessionEnvelopeFields",
20
24
  ];
21
25
  const arm = (name) => `Extract<TaskEvent, { type: "${name}" }>`;
22
26
  const MANIFEST_FRAME = `Extract<TraceEvent, { kind: "prompt.assembled" }>`;
@@ -45,10 +49,31 @@ export const WIRE_PROJECTION_FACES = {
45
49
  task_notification: {
46
50
  projector: "taskNotificationEventData",
47
51
  coreType: `TaskNotificationPayload & ${arm("task_notification")}`,
48
- excluded: ["peer", "crossSessionMessage", "crossSessionNotice", "inboxNotice", "received"],
52
+ excluded: ["peer", "received"],
49
53
  unwrapped: ["notification"],
50
54
  minted: ["injected"],
51
55
  },
56
+ task_notification_cross_session_message: {
57
+ projector: "taskNotificationEventData",
58
+ coreType: `CrossSessionEnvelopeFields & NonNullable<TaskNotificationPayload["crossSessionMessage"]>`,
59
+ excluded: [],
60
+ minted: [],
61
+ },
62
+ task_notification_cross_session_notice: {
63
+ projector: "taskNotificationEventData",
64
+ coreType: `NonNullable<TaskNotificationPayload["crossSessionNotice"]>`,
65
+ excluded: [],
66
+ minted: [],
67
+ },
68
+ task_notification_inbox_notice: {
69
+ projector: "taskNotificationEventData",
70
+ coreType: `NonNullable<TaskNotificationPayload["inboxNotice"]>`,
71
+ excluded: ["box"],
72
+ minted: [],
73
+ },
74
+ task_notification_provenance: { projector: "taskNotificationEventData", coreType: "SemaProvenance", excluded: [], minted: [] },
75
+ task_notification_peer_meta: { projector: "taskNotificationEventData", coreType: "MailboxPeerMeta", excluded: ["senderKey", "gateReceiptId", "occupant", "fromOccupant"], minted: [] },
76
+ task_notification_peer_notice: { projector: "taskNotificationEventData", coreType: "MailboxPeerNoticeMeta", excluded: [], minted: [] },
52
77
  wiring_manifest_tenant: {
53
78
  projector: "wiringManifestEventData",
54
79
  coreType: `WiringManifest & ${arm("wiring_manifest")}`,
@@ -0,0 +1,66 @@
1
+ /**
2
+ * 「请求里有本版读者读不出、而这台部署本会采纳的成员」—— **一只**判据,两个调用点:`boot/resolve-spec.ts` 装配腿首(**拒点**;两腿同判)与
3
+ * `http/stored-body-replay.ts` 的存体重放预判(五个续跑问点同调,认领之前答)。
4
+ *
5
+ * ## 律(一条)
6
+ * 请求的某个成员,本版的读者读不出(整只不交,或其中几处不交给引擎),而这台部署对这个成员本会采纳(读得出就会生效)⇒ 这份请求不跑。
7
+ * · 新提交:`settings.env` 有成员不是帽内串 ⇒ 本判据是唯一的拒点(受理门只判形与帽;HTTP 新提交也走到这里)—— 采纳 env 的车道上 400,其余车道零变;
8
+ * 其余成员在受理门 / 腿首按各自的判据已 400(本判据在新提交腿上对它们只接得住绕过受理门直调 `resolveSpec` 的嵌入方);
9
+ * · 续跑重放(盘上的存量请求体,升级前受理时读得出、本版读不出):拒续跑 —— 409 `resume_blocked_by_policy`(`blockedBy` = `request.field_invalid`,
10
+ * `field` = 第一个读不出的坐标,句子点名全部坐标、不回显值),卡仍待决、行不动;出路 = 取消后按本版的形重提。
11
+ * 修前续跑重放腿把读不出的成员丢掉照跑,只留一行运维 warn(`task_settings_deferred` / `mcp_transport_members_dropped` / `a2a_peer_headers_members_dropped`):
12
+ * 丢掉的可能是同一份 hooks 里真在拦的守卫、MCP 服务的鉴权头 —— 调用方只看到续跑成功。三条 warn 与 P-DEBT 计数随本判据删除。
13
+ *
14
+ * ## 成员(三座,闭集)
15
+ * · `settings.<键>`:请求设置解析层(`task-settings.ts` `parseTaskSettings`)报 `deferred` 的键 —— `hooks`(唯一读者拒;续跑重放腿上一次性迁移 M20 的窗开着时先剥键重读,过了就读得出)、
16
+ * `env`(有成员读不出:不是对象 / 过帽 / 值不是帽内的串;空记录不算)、`permissions`(不是对象 / 桶不合法)、「只收紧」座位(座位门不过)。采纳与否按键({@link settingsMemberHonored}):
17
+ * `hooks` 读 `taskHooksHonored`;`env` 的读者有两个 —— 模型的工具 shell(部署形表行 `callerCwd`)与 settings hooks 的子进程 env / http `$NAME` 插值源(`taskHooksHonored` ∧ 这份请求带着读得出的 hooks),
18
+ * 任一在 ⇒ 采纳;其余每条车道都采纳;
19
+ * · `mcpServers[<下标>].transport.<路径>`:请求面 MCP 条目挂得上、名字不被部署占住(部署声明过的名字一律关给请求面,与挂载的合并同一只 `deploymentClosedMcpNames`)、
20
+ * transport 却有几处不交给引擎(`task-mcp.ts` `requestMcpTransportUnread`);采纳 = `mcpInjectionHonored`;
21
+ * · `a2aPeers[<下标>].headers.<成员>`:请求面 A2A 对端挂得上、`headers` 里剔掉的成员(`task-a2a.ts` `requestA2aHeadersUnread`);采纳 = `a2aInjectionHonored`。
22
+ * 坐标只有键路径与下标(成员名只会是读器的保留名),不带值、不带调用方写的名字。
23
+ * A2A 一座不看部署同名占位:A2A 的占位是**按场景**的部署对端(`a2aForScenario`),存体预判在认领之前答、不知道这一跑落在哪个场景 ⇒ 一只读不出的对端若会输给同场景的部署同名对端(不挂),
24
+ * 本判据照样拒 —— 方向是多拒一次(出路同上),不是少拦。MCP 的占位与场景无关(部署声明过的全部名字),所以 MCP 一座按占位判。
25
+ *
26
+ * ## 不在射程内(已披露)
27
+ * 读者把**整条**摘下的条目(MCP / A2A 条目不是对象、硬键坏形:有用户面通告 `mcp.injection_dropped` / 运维 warn `a2a_injection_dropped`)、条目上被丢的软键
28
+ * (`contentOrigin` 降级、`elicitation` / `source` 读不出)不在本判据里。
29
+ */
30
+ import { type LaneAxisInput, type PrincipalAxisInput } from "./deployment-shape.js";
31
+ import { type SettingsEnvLayer } from "./task-settings.js";
32
+ import { mcpInjectionHonored } from "./task-mcp.js";
33
+ import type { CenterMcp } from "./config-types.js";
34
+ import { type A2aGateConfig } from "./task-a2a.js";
35
+ import type { StoredToolAxesRereadM19 } from "./stored-request-tool-axes-m19.js";
36
+ import type { Refusal } from "./http/refusal-body.js";
37
+ /** 判据读的部署事实(`ServiceConfig` 结构上满足):租户轴、已合成的车道、两只注入闸的否决位、部署的 MCP 声明(占住的名字)。 */
38
+ export type UnreadMembersDeployment = PrincipalAxisInput & LaneAxisInput & A2aGateConfig & Parameters<typeof mcpInjectionHonored>[0] & {
39
+ readonly mcpServers?: Pick<CenterMcp, "servers" | "reservedNames"> | undefined;
40
+ };
41
+ /** 请求里本判据读的三座(原样;调用方从请求体取 —— `resolveSpec` 的 A2A 一座递它腿首那一份快照)。 */
42
+ export interface UnreadMembersRequest {
43
+ readonly settings: unknown;
44
+ readonly mcpServers: unknown;
45
+ readonly a2aPeers: unknown;
46
+ }
47
+ /** 读的是哪条腿,与那条腿的读法座:续跑重放腿递 M19 的重读座(调用方求值一次,挂载那一读用同一份)与「今天」(M20 的窗按它问);新提交腿两座都没有。 */
48
+ export type UnreadMembersLeg = {
49
+ readonly replay: false;
50
+ readonly settingsEnv?: SettingsEnvLayer | undefined;
51
+ } | {
52
+ readonly replay: true;
53
+ readonly today: string;
54
+ readonly storedToolAxes: StoredToolAxesRereadM19 | undefined;
55
+ readonly settingsEnv?: SettingsEnvLayer | undefined;
56
+ };
57
+ /** 拒句(与运维行)至多点名的坐标数(余下的报总数)。 */
58
+ export declare const MAX_NAMED_MEMBERS = 8;
59
+ /** 读不出、而本部署会采纳的成员坐标(文档序:设置 → MCP → A2A);空 = 这份请求的每个成员都读得出(或读不出的那几个本部署本来就不采纳)。 */
60
+ export declare function unreadRequestMembers(request: UnreadMembersRequest, deployment: UnreadMembersDeployment, leg: UnreadMembersLeg): readonly string[];
61
+ /**
62
+ * 判据命中的拒:码 `request.field_invalid`(各成员的新提交判据答的同一个码),`field` = 第一个坐标,句子点名全部坐标(至多 {@link MAX_NAMED_MEMBERS} 个,余下报总数)。
63
+ * 拒点(`resolveSpec`)把它抛成 400;续跑口把它折成 409 `resume_blocked_by_policy`(预判与折叠调同一只折法,同码同句)。纯数据。
64
+ */
65
+ export declare function unreadRequestMembersRefusal(members: readonly [string, ...string[]]): Refusal;
66
+ //# sourceMappingURL=unread-request-members.d.ts.map
@@ -0,0 +1,41 @@
1
+ import { DEPLOYMENT_SHAPE_PREDICATES } from "./deployment-shape.js";
2
+ import { parseTaskSettings, taskHooksHonored } from "./task-settings.js";
3
+ import { deploymentClosedMcpNames, mcpInjectionHonored, requestMcpTransportUnread } from "./task-mcp.js";
4
+ import { a2aInjectionHonored, requestA2aHeadersUnread } from "./task-a2a.js";
5
+ import { storedHooksRereadM20 } from "./stored-request-hooks-m20.js";
6
+ export const MAX_NAMED_MEMBERS = 8;
7
+ function settingsMemberHonored(key, deployment, carriesHooks) {
8
+ switch (key) {
9
+ case "hooks":
10
+ return taskHooksHonored(deployment);
11
+ case "env":
12
+ return DEPLOYMENT_SHAPE_PREDICATES.callerCwd.holds(deployment) || (carriesHooks && taskHooksHonored(deployment));
13
+ default:
14
+ return true;
15
+ }
16
+ }
17
+ export function unreadRequestMembers(request, deployment, leg) {
18
+ const hooksReread = leg.replay && taskHooksHonored(deployment) ? storedHooksRereadM20(leg.today) : undefined;
19
+ const settings = parseTaskSettings(request.settings, { ...(hooksReread !== undefined ? { storedHooksReread: hooksReread } : {}), ...(leg.settingsEnv !== undefined ? { settingsEnv: leg.settingsEnv } : {}) });
20
+ const carriesHooks = settings.settings?.hooks !== undefined;
21
+ const out = settings.deferred.filter((key) => settingsMemberHonored(key, deployment, carriesHooks)).map((key) => `settings.${key}`);
22
+ const storedToolAxes = leg.replay ? leg.storedToolAxes : undefined;
23
+ if (mcpInjectionHonored(deployment)) {
24
+ const closed = deploymentClosedMcpNames(deployment.mcpServers?.servers.map((s) => s.spec), deployment.mcpServers?.reservedNames ?? []);
25
+ out.push(...requestMcpTransportUnread(request.mcpServers, closed, storedToolAxes));
26
+ }
27
+ if (a2aInjectionHonored(deployment))
28
+ out.push(...requestA2aHeadersUnread(request.a2aPeers, storedToolAxes));
29
+ return out;
30
+ }
31
+ export function unreadRequestMembersRefusal(members) {
32
+ const named = members.slice(0, MAX_NAMED_MEMBERS);
33
+ const more = members.length > named.length ? ` (and ${members.length - named.length} more)` : "";
34
+ return {
35
+ errorCode: "request.field_invalid",
36
+ message: `this request carries ${members.length === 1 ? "a member" : "members"} this server version's readers cannot take as written, on a deployment that would apply ${members.length === 1 ? "it" : "them"}: ` +
37
+ `${named.join(", ")}${more} — running it would silently leave ${members.length === 1 ? "that member" : "those members"} out (a hook that guards a tool, an MCP server's credentials); submit it again with ${members.length === 1 ? "this member" : "these members"} in the current form`,
38
+ facts: { field: members[0] },
39
+ };
40
+ }
41
+ //# sourceMappingURL=unread-request-members.js.map
@@ -46,7 +46,7 @@
46
46
  * 转移只有四条(open → settled | converged;converged → announced),两只孪生都按 CAS 守它们(File 单进程 = 内存判;SQL = `WHERE state=…`)。
47
47
  * · `erased` —— ([ref])**会话树删除**:该会话此前的每一次受理(不论状态)离开账本。行随会话走 —— 账本行的唯一归属键就是 `sessionId`,
48
48
  * 所以两条删会话树的级联(在线删除协调器 `boot/session-faces.ts` 的 `purgeSession`、托管留存的事务化孪生
49
- * `retention-store-sql.ts` 的 `purgeSessionTrees`)各有一臂删它,谓词同一只(`session_id` 单键,店动词 `deleteBySession`)。
49
+ * `plugins/retention-deployment.ts` 的 `deleteDeploymentSessionRows`)各有一臂删它,谓词同一只(`session_id` 单键,店动词 `deleteBySession`)。
50
50
  * File 孪生的盘上形 = 一行会话级墓碑 `{ kind:"erased", sessionId, at }`(与 workflow 完成信箱 `drain{sessionId}` 同形),
51
51
  * 只擦它**之前**的同会话行 —— 会话 id 删后可被重新登记,之后的受理属于下一位住客;SQL 孪生 = 真删行。被删受理上迟到的转移全输
52
52
  * (行不在了,与「未知 acceptId」同一条守卫)。
@@ -264,7 +264,7 @@ export interface UserInputLedgerStore {
264
264
  /** [ref] —— **会话树删除**:删掉该会话**每一种状态**的受理,回删除条数(没有可删的 ⇒ 0、零写;幂等)。按 `session_id` 单键:行上没有属主列,
265
265
  * 会话所有权由调用方证过(在线删除 = 路由的 DELETE 门;留存 = 候选集本身出自本域加锁读的 `session_meta`),与 anchors / exemptions /
266
266
  * attachments 同律。调用方 = 在线删除协调器(`boot/session-faces.ts` `purgeSession` 的一腿);托管留存的事务化孪生不调店、在自己的事务里
267
- * 发**同一只谓词**(`retention-store-sql.ts` `purgeSessionTrees` ④)。写不进 ⇒ 抛(协调器据此不删会话本体,幂等重试收敛)。 */
267
+ * 发**同一只谓词**(`retention-deployment.ts` `deleteDeploymentSessionRows` ④)。写不进 ⇒ 抛(协调器据此不删会话本体,幂等重试收敛)。 */
268
268
  deleteBySession(sessionId: string): Promise<number>;
269
269
  }
270
270
  /** 收敛判词读的 run 店面(只读一只动词)。 */