@songsid/agend 2.4.0-beta.23 → 2.4.0-beta.25

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 (499) hide show
  1. package/README.md +1 -1
  2. package/README.zh-TW.md +1 -1
  3. package/dist/agend-home.js +5 -5
  4. package/dist/agend-home.js.map +1 -1
  5. package/dist/agent-cli-instructions.md +4 -3
  6. package/dist/agent-cli.js +32 -2
  7. package/dist/agent-cli.js.map +1 -1
  8. package/dist/agent-endpoint.js +10 -0
  9. package/dist/agent-endpoint.js.map +1 -1
  10. package/dist/agent-file-read.js +2 -2
  11. package/dist/agent-file-read.js.map +1 -1
  12. package/dist/agent-whats-new.js +11 -1
  13. package/dist/agent-whats-new.js.map +1 -1
  14. package/dist/agent-workspace.d.ts +18 -2
  15. package/dist/agent-workspace.js +15 -4
  16. package/dist/agent-workspace.js.map +1 -1
  17. package/dist/backend/antigravity.js +8 -6
  18. package/dist/backend/antigravity.js.map +1 -1
  19. package/dist/backend/claude-code.d.ts +15 -0
  20. package/dist/backend/claude-code.js +25 -3
  21. package/dist/backend/claude-code.js.map +1 -1
  22. package/dist/backend/claude-mcp-carry.d.ts +63 -0
  23. package/dist/backend/claude-mcp-carry.js +242 -0
  24. package/dist/backend/claude-mcp-carry.js.map +1 -0
  25. package/dist/backend/claude-usage-credits.d.ts +8 -0
  26. package/dist/backend/claude-usage-credits.js +121 -0
  27. package/dist/backend/claude-usage-credits.js.map +1 -0
  28. package/dist/backend/types.d.ts +30 -0
  29. package/dist/backend/types.js.map +1 -1
  30. package/dist/build-provenance.json +1 -1
  31. package/dist/channel/adapters/discord.js +7 -1
  32. package/dist/channel/adapters/discord.js.map +1 -1
  33. package/dist/channel/mcp-tools.js +7 -6
  34. package/dist/channel/mcp-tools.js.map +1 -1
  35. package/dist/channel/tool-router.js +1 -0
  36. package/dist/channel/tool-router.js.map +1 -1
  37. package/dist/cli-audited.js +9 -4
  38. package/dist/cli-audited.js.map +1 -1
  39. package/dist/cli.js +184 -21
  40. package/dist/cli.js.map +1 -1
  41. package/dist/config-validator.js +17 -1
  42. package/dist/config-validator.js.map +1 -1
  43. package/dist/config.js +2 -0
  44. package/dist/config.js.map +1 -1
  45. package/dist/contact-auth-store.d.ts +18 -0
  46. package/dist/contact-auth-store.js +55 -8
  47. package/dist/contact-auth-store.js.map +1 -1
  48. package/dist/contact-auth-types.d.ts +3 -0
  49. package/dist/contact-auth-types.js.map +1 -1
  50. package/dist/contact-change-proposals.d.ts +34 -0
  51. package/dist/contact-change-proposals.js +1 -1
  52. package/dist/contact-change-proposals.js.map +1 -1
  53. package/dist/cross-instance-notice.d.ts +1 -0
  54. package/dist/cross-instance-notice.js +9 -8
  55. package/dist/cross-instance-notice.js.map +1 -1
  56. package/dist/daemon.d.ts +46 -0
  57. package/dist/daemon.js +299 -33
  58. package/dist/daemon.js.map +1 -1
  59. package/dist/dashboard-permissions.d.ts +8 -0
  60. package/dist/dashboard-permissions.js +8 -0
  61. package/dist/dashboard-permissions.js.map +1 -1
  62. package/dist/delivery-outbox.d.ts +56 -1
  63. package/dist/delivery-outbox.js +254 -22
  64. package/dist/delivery-outbox.js.map +1 -1
  65. package/dist/fleet-context.d.ts +8 -0
  66. package/dist/fleet-lock.d.ts +67 -2
  67. package/dist/fleet-lock.js +236 -2
  68. package/dist/fleet-lock.js.map +1 -1
  69. package/dist/fleet-manager.d.ts +177 -6
  70. package/dist/fleet-manager.js +1203 -75
  71. package/dist/fleet-manager.js.map +1 -1
  72. package/dist/fleet-windows-runtime.d.ts +20 -1
  73. package/dist/fleet-windows-runtime.js +98 -18
  74. package/dist/fleet-windows-runtime.js.map +1 -1
  75. package/dist/general-knowledge/skills/concepts/SKILL.md +22 -9
  76. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +6 -0
  77. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +7 -0
  78. package/dist/general-knowledge/skills/fleet-config/SKILL.md +3 -3
  79. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -1
  80. package/dist/general-knowledge/skills/task-board/SKILL.md +17 -0
  81. package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -0
  82. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +35 -7
  83. package/dist/home-update-lock.d.ts +35 -0
  84. package/dist/home-update-lock.js +81 -0
  85. package/dist/home-update-lock.js.map +1 -0
  86. package/dist/hub/compose/member.d.ts +5 -1
  87. package/dist/hub/compose/member.js +9 -5
  88. package/dist/hub/compose/member.js.map +1 -1
  89. package/dist/hub/group-policy/resources.d.ts +1 -1
  90. package/dist/hub/member/room-ask.d.ts +5 -0
  91. package/dist/hub/member/room-ask.js +43 -16
  92. package/dist/hub/member/room-ask.js.map +1 -1
  93. package/dist/hub/member/room-mention-feedback.d.ts +2 -0
  94. package/dist/hub/member/room-mention-feedback.js +1 -1
  95. package/dist/hub/member/room-mention-feedback.js.map +1 -1
  96. package/dist/hub/member/room-post-answers.d.ts +2 -0
  97. package/dist/hub/member/room-post-answers.js +1 -1
  98. package/dist/hub/member/room-post-answers.js.map +1 -1
  99. package/dist/hub/member/room-post.d.ts +5 -0
  100. package/dist/hub/member/room-post.js +4 -1
  101. package/dist/hub/member/room-post.js.map +1 -1
  102. package/dist/hub/member/updates.d.ts +7 -1
  103. package/dist/hub/member/updates.js +7 -1
  104. package/dist/hub/member/updates.js.map +1 -1
  105. package/dist/hub/representative.d.ts +7 -0
  106. package/dist/hub/representative.js +38 -5
  107. package/dist/hub/representative.js.map +1 -1
  108. package/dist/install-lock.d.ts +15 -1
  109. package/dist/install-lock.js +16 -8
  110. package/dist/install-lock.js.map +1 -1
  111. package/dist/install-ownership.d.ts +165 -0
  112. package/dist/install-ownership.js +404 -0
  113. package/dist/install-ownership.js.map +1 -0
  114. package/dist/instance-config-impact.js +2 -0
  115. package/dist/instance-config-impact.js.map +1 -1
  116. package/dist/instance-lifecycle.d.ts +2 -0
  117. package/dist/instance-lifecycle.js +29 -1
  118. package/dist/instance-lifecycle.js.map +1 -1
  119. package/dist/instructions.d.ts +4 -0
  120. package/dist/instructions.js +4 -0
  121. package/dist/instructions.js.map +1 -1
  122. package/dist/local-pane-endpoint.d.ts +4 -1
  123. package/dist/local-pane-endpoint.js +12 -2
  124. package/dist/local-pane-endpoint.js.map +1 -1
  125. package/dist/locale.js +170 -4
  126. package/dist/locale.js.map +1 -1
  127. package/dist/native-agent-admission.d.ts +7 -0
  128. package/dist/native-agent-admission.js +46 -3
  129. package/dist/native-agent-admission.js.map +1 -1
  130. package/dist/native-mcp.d.ts +16 -1
  131. package/dist/native-mcp.js +38 -5
  132. package/dist/native-mcp.js.map +1 -1
  133. package/dist/native-pane-lifecycle.d.ts +9 -0
  134. package/dist/native-pane-lifecycle.js +23 -0
  135. package/dist/native-pane-lifecycle.js.map +1 -1
  136. package/dist/native-pane-manager.d.ts +19 -6
  137. package/dist/native-pane-manager.js +79 -4
  138. package/dist/native-pane-manager.js.map +1 -1
  139. package/dist/needs-you-hub.d.ts +3 -0
  140. package/dist/needs-you-hub.js +31 -5
  141. package/dist/needs-you-hub.js.map +1 -1
  142. package/dist/needs-you.d.ts +22 -1
  143. package/dist/needs-you.js +6 -0
  144. package/dist/needs-you.js.map +1 -1
  145. package/dist/office-share-page.js +1 -1
  146. package/dist/office-share-page.js.map +1 -1
  147. package/dist/office-share.js +2 -1
  148. package/dist/office-share.js.map +1 -1
  149. package/dist/outbound-handlers.d.ts +12 -0
  150. package/dist/outbound-handlers.js +59 -8
  151. package/dist/outbound-handlers.js.map +1 -1
  152. package/dist/outbound-schemas.d.ts +3 -0
  153. package/dist/outbound-schemas.js +7 -5
  154. package/dist/outbound-schemas.js.map +1 -1
  155. package/dist/package-preimage.js +4 -0
  156. package/dist/package-preimage.js.map +1 -1
  157. package/dist/pane-port.d.ts +1 -0
  158. package/dist/plist-args.d.ts +9 -0
  159. package/dist/plist-args.js +22 -0
  160. package/dist/plist-args.js.map +1 -0
  161. package/dist/public-preview.d.ts +4 -6
  162. package/dist/public-preview.js +5 -2
  163. package/dist/public-preview.js.map +1 -1
  164. package/dist/public-web-gateway.js +11 -3
  165. package/dist/public-web-gateway.js.map +1 -1
  166. package/dist/public-web-link.d.ts +13 -1
  167. package/dist/public-web-link.js +28 -1
  168. package/dist/public-web-link.js.map +1 -1
  169. package/dist/recover.cjs +2452 -0
  170. package/dist/remote-card-prompt.d.ts +6 -2
  171. package/dist/remote-card-prompt.js +12 -3
  172. package/dist/remote-card-prompt.js.map +1 -1
  173. package/dist/reply-draft.d.ts +12 -0
  174. package/dist/reply-draft.js +81 -0
  175. package/dist/reply-draft.js.map +1 -0
  176. package/dist/request-contact-api.d.ts +15 -0
  177. package/dist/request-contact-api.js +120 -0
  178. package/dist/request-contact-api.js.map +1 -0
  179. package/dist/request-contact-card.d.ts +36 -0
  180. package/dist/request-contact-card.js +206 -0
  181. package/dist/request-contact-card.js.map +1 -0
  182. package/dist/request-contact-gate.d.ts +79 -0
  183. package/dist/request-contact-gate.js +262 -0
  184. package/dist/request-contact-gate.js.map +1 -0
  185. package/dist/request-contact-native.d.ts +52 -0
  186. package/dist/request-contact-native.js +83 -0
  187. package/dist/request-contact-native.js.map +1 -0
  188. package/dist/request-contact-types.d.ts +86 -0
  189. package/dist/request-contact-types.js +7 -0
  190. package/dist/request-contact-types.js.map +1 -0
  191. package/dist/request-context-call-protocol.d.ts +12 -0
  192. package/dist/request-context-call-protocol.js +14 -0
  193. package/dist/request-context-call-protocol.js.map +1 -0
  194. package/dist/request-context-call.d.ts +22 -0
  195. package/dist/request-context-call.js +35 -0
  196. package/dist/request-context-call.js.map +1 -0
  197. package/dist/request-context-compatibility.d.ts +20 -0
  198. package/dist/request-context-compatibility.js +74 -0
  199. package/dist/request-context-compatibility.js.map +1 -0
  200. package/dist/request-context-drain.d.ts +39 -0
  201. package/dist/request-context-drain.js +159 -0
  202. package/dist/request-context-drain.js.map +1 -0
  203. package/dist/request-context-fence.d.ts +28 -0
  204. package/dist/request-context-fence.js +58 -0
  205. package/dist/request-context-fence.js.map +1 -0
  206. package/dist/request-context-migration.d.ts +64 -0
  207. package/dist/request-context-migration.js +158 -0
  208. package/dist/request-context-migration.js.map +1 -0
  209. package/dist/request-context-pane.d.ts +25 -0
  210. package/dist/request-context-pane.js +48 -0
  211. package/dist/request-context-pane.js.map +1 -0
  212. package/dist/request-context-policy.d.ts +74 -0
  213. package/dist/request-context-policy.js +116 -0
  214. package/dist/request-context-policy.js.map +1 -0
  215. package/dist/request-context-protocol.d.ts +137 -0
  216. package/dist/request-context-protocol.js +38 -0
  217. package/dist/request-context-protocol.js.map +1 -0
  218. package/dist/request-context-recovery.d.ts +14 -0
  219. package/dist/request-context-recovery.js +56 -0
  220. package/dist/request-context-recovery.js.map +1 -0
  221. package/dist/request-context-relay.d.ts +19 -0
  222. package/dist/request-context-relay.js +63 -0
  223. package/dist/request-context-relay.js.map +1 -0
  224. package/dist/request-context-returns.d.ts +67 -0
  225. package/dist/request-context-returns.js +211 -0
  226. package/dist/request-context-returns.js.map +1 -0
  227. package/dist/request-context-store.d.ts +26 -0
  228. package/dist/request-context-store.js +144 -0
  229. package/dist/request-context-store.js.map +1 -0
  230. package/dist/request-context-turns.d.ts +99 -0
  231. package/dist/request-context-turns.js +215 -0
  232. package/dist/request-context-turns.js.map +1 -0
  233. package/dist/request-context-view.d.ts +33 -0
  234. package/dist/request-context-view.js +36 -0
  235. package/dist/request-context-view.js.map +1 -0
  236. package/dist/request-hub-context.d.ts +130 -0
  237. package/dist/request-hub-context.js +89 -0
  238. package/dist/request-hub-context.js.map +1 -0
  239. package/dist/request-hub-output.d.ts +11 -0
  240. package/dist/request-hub-output.js +21 -0
  241. package/dist/request-hub-output.js.map +1 -0
  242. package/dist/runtime-cli-install.js +13 -11
  243. package/dist/runtime-cli-install.js.map +1 -1
  244. package/dist/runtime-client.d.ts +2 -0
  245. package/dist/runtime-client.js +17 -4
  246. package/dist/runtime-client.js.map +1 -1
  247. package/dist/runtime-coordinator.d.ts +4 -1
  248. package/dist/runtime-coordinator.js +10 -3
  249. package/dist/runtime-coordinator.js.map +1 -1
  250. package/dist/runtime-pane-assets.d.ts +1 -1
  251. package/dist/runtime-pane-assets.js +1 -1
  252. package/dist/runtime-pane-assets.js.map +1 -1
  253. package/dist/runtime-pane-host.d.ts +3 -0
  254. package/dist/runtime-pane-host.js +39 -21
  255. package/dist/runtime-pane-host.js.map +1 -1
  256. package/dist/runtime-pane-link.d.ts +6 -2
  257. package/dist/runtime-pane-link.js +17 -4
  258. package/dist/runtime-pane-link.js.map +1 -1
  259. package/dist/runtime-pane-mcp-relay.d.ts +11 -1
  260. package/dist/runtime-pane-mcp-relay.js +69 -3
  261. package/dist/runtime-pane-mcp-relay.js.map +1 -1
  262. package/dist/runtime-pane-mcp.d.ts +28 -1
  263. package/dist/runtime-pane-mcp.js +92 -15
  264. package/dist/runtime-pane-mcp.js.map +1 -1
  265. package/dist/runtime-pane-port.d.ts +6 -0
  266. package/dist/runtime-pane-port.js +23 -4
  267. package/dist/runtime-pane-port.js.map +1 -1
  268. package/dist/runtime-pane-protocol.d.ts +4 -0
  269. package/dist/runtime-pane-protocol.js +11 -4
  270. package/dist/runtime-pane-protocol.js.map +1 -1
  271. package/dist/runtime-pane-service.d.ts +1 -0
  272. package/dist/runtime-pane-service.js +25 -9
  273. package/dist/runtime-pane-service.js.map +1 -1
  274. package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
  275. package/dist/runtime-pane-stdio-protocol.js +12 -5
  276. package/dist/runtime-pane-stdio-protocol.js.map +1 -1
  277. package/dist/runtime-pane-stdio.js +5 -5
  278. package/dist/runtime-pane-stdio.js.map +1 -1
  279. package/dist/runtime-protocol.d.ts +3 -0
  280. package/dist/runtime-protocol.js.map +1 -1
  281. package/dist/scheduler/db.js +26 -0
  282. package/dist/scheduler/db.js.map +1 -1
  283. package/dist/scheduler/scheduler.d.ts +6 -0
  284. package/dist/scheduler/scheduler.js +19 -1
  285. package/dist/scheduler/scheduler.js.map +1 -1
  286. package/dist/scheduler/task-board-text.d.ts +2 -0
  287. package/dist/scheduler/task-board-text.js +12 -0
  288. package/dist/scheduler/task-board-text.js.map +1 -1
  289. package/dist/scheduler/task-board.d.ts +106 -2
  290. package/dist/scheduler/task-board.js +248 -24
  291. package/dist/scheduler/task-board.js.map +1 -1
  292. package/dist/scheduler/task-files.d.ts +80 -0
  293. package/dist/scheduler/task-files.js +357 -0
  294. package/dist/scheduler/task-files.js.map +1 -0
  295. package/dist/scheduler/types.d.ts +1 -1
  296. package/dist/service-activation.js +3 -13
  297. package/dist/service-activation.js.map +1 -1
  298. package/dist/service-lock.d.ts +28 -0
  299. package/dist/service-lock.js +85 -0
  300. package/dist/service-lock.js.map +1 -0
  301. package/dist/settings-api.d.ts +8 -0
  302. package/dist/settings-api.js +41 -1
  303. package/dist/settings-api.js.map +1 -1
  304. package/dist/settings-baseline.d.ts +1 -0
  305. package/dist/settings-baseline.js +1 -1
  306. package/dist/settings-baseline.js.map +1 -1
  307. package/dist/settings-change.js +1 -1
  308. package/dist/settings-change.js.map +1 -1
  309. package/dist/settings-effect.d.ts +2 -0
  310. package/dist/settings-effect.js +5 -1
  311. package/dist/settings-effect.js.map +1 -1
  312. package/dist/state-lease.d.ts +24 -0
  313. package/dist/state-lease.js +103 -0
  314. package/dist/state-lease.js.map +1 -0
  315. package/dist/task-attach-client.d.ts +43 -0
  316. package/dist/task-attach-client.js +125 -0
  317. package/dist/task-attach-client.js.map +1 -0
  318. package/dist/task-board-tool.d.ts +12 -0
  319. package/dist/task-board-tool.js +107 -6
  320. package/dist/task-board-tool.js.map +1 -1
  321. package/dist/task-file-limits.d.ts +15 -0
  322. package/dist/task-file-limits.js +21 -0
  323. package/dist/task-file-limits.js.map +1 -0
  324. package/dist/tmux-binary.js +1 -1
  325. package/dist/tmux-binary.js.map +1 -1
  326. package/dist/tool-permissions.d.ts +32 -0
  327. package/dist/tool-permissions.js +63 -0
  328. package/dist/tool-permissions.js.map +1 -1
  329. package/dist/tool-receipt-output.d.ts +2 -0
  330. package/dist/topic-commands.js +21 -1
  331. package/dist/topic-commands.js.map +1 -1
  332. package/dist/transcript-monitor.js +3 -0
  333. package/dist/transcript-monitor.js.map +1 -1
  334. package/dist/tunnel/named-link-test.d.ts +27 -0
  335. package/dist/tunnel/named-link-test.js +41 -0
  336. package/dist/tunnel/named-link-test.js.map +1 -1
  337. package/dist/types.d.ts +13 -0
  338. package/dist/ui/agent-details-settings.js +7 -5
  339. package/dist/ui/agent-who-can-use-strings.js +125 -0
  340. package/dist/ui/agent-who-can-use.js +238 -0
  341. package/dist/ui/chat-store.js +5 -4
  342. package/dist/ui/fleet-office-card.js +37 -6
  343. package/dist/ui/fleet-office-editor.js +5 -5
  344. package/dist/ui/fleet-office-pack.d.ts +10 -0
  345. package/dist/ui/fleet-office-pack.js +65 -2
  346. package/dist/ui/fleet-office-skin.js +75 -17
  347. package/dist/ui/fleet-office-store.js +33 -2
  348. package/dist/ui/fleet-office-vehicles.js +130 -0
  349. package/dist/ui/fleet-office-zones.js +13 -4
  350. package/dist/ui/fleet-office.js +245 -46
  351. package/dist/ui/fleet-task-activity.js +9 -82
  352. package/dist/ui/fleet-task-archive.js +111 -0
  353. package/dist/ui/fleet-task-card.js +6 -4
  354. package/dist/ui/fleet-task-common.js +2 -2
  355. package/dist/ui/fleet-task-edit.js +8 -1
  356. package/dist/ui/fleet-task-files.js +196 -0
  357. package/dist/ui/fleet-task-md.js +98 -0
  358. package/dist/ui/fleet-task-menu.js +1 -1
  359. package/dist/ui/fleet-task-stats.js +2 -2
  360. package/dist/ui/fleet-task-view.js +12 -8
  361. package/dist/ui/fleet-tasks.js +42 -18
  362. package/dist/ui/panel-chat.js +15 -2
  363. package/dist/ui/panel-details.js +3 -1
  364. package/dist/ui/panel-needs.js +25 -5
  365. package/dist/ui/panel-settings.js +37 -9
  366. package/dist/ui/settings-preview-address.js +156 -0
  367. package/dist/ui/settings-registry.js +3 -0
  368. package/dist/ui/settings-shared-strings.js +9 -0
  369. package/dist/ui/settings-shared.js +6 -1
  370. package/dist/ui/settings-strings.js +6 -6
  371. package/dist/ui/shared/app-i18n.js +2 -2
  372. package/dist/ui/shared/app-needs.js +8 -1
  373. package/dist/ui/shared/app.css +131 -5
  374. package/dist/ui/shared/chat-strings.js +10 -6
  375. package/dist/ui/shared/chat-thread.js +7 -1
  376. package/dist/ui/shared/preview-panel.js +1 -1
  377. package/dist/ui/shared/preview.js +11 -2
  378. package/dist/ui/shared/task-board.css +64 -0
  379. package/dist/ui/shared/tokens.css +18 -3
  380. package/dist/ui/shared/ui-confirm.js +5 -4
  381. package/dist/ui/shared/workspace.css +7 -0
  382. package/dist/ui/usage-credits-card.js +84 -0
  383. package/dist/ui/workspace-ignored-strings.js +16 -0
  384. package/dist/ui/workspace-panel.js +15 -6
  385. package/dist/update-card.d.ts +193 -0
  386. package/dist/update-card.js +620 -0
  387. package/dist/update-card.js.map +1 -0
  388. package/dist/update-dispatch.d.ts +16 -1
  389. package/dist/update-dispatch.js +12 -4
  390. package/dist/update-dispatch.js.map +1 -1
  391. package/dist/update-forward.d.ts +73 -0
  392. package/dist/update-forward.js +283 -0
  393. package/dist/update-forward.js.map +1 -0
  394. package/dist/update-idle.d.ts +1 -0
  395. package/dist/update-idle.js +12 -3
  396. package/dist/update-idle.js.map +1 -1
  397. package/dist/update-install.d.ts +2 -1
  398. package/dist/update-install.js +18 -10
  399. package/dist/update-install.js.map +1 -1
  400. package/dist/update-journal.d.ts +351 -0
  401. package/dist/update-journal.js +717 -0
  402. package/dist/update-journal.js.map +1 -0
  403. package/dist/update-launch.js +1 -1
  404. package/dist/update-launch.js.map +1 -1
  405. package/dist/update-npm-env.d.ts +45 -12
  406. package/dist/update-npm-env.js +48 -0
  407. package/dist/update-npm-env.js.map +1 -1
  408. package/dist/update-package-restore.d.ts +75 -0
  409. package/dist/update-package-restore.js +318 -0
  410. package/dist/update-package-restore.js.map +1 -0
  411. package/dist/update-quiescence.d.ts +192 -0
  412. package/dist/update-quiescence.js +330 -0
  413. package/dist/update-quiescence.js.map +1 -0
  414. package/dist/update-readiness-host.d.ts +61 -0
  415. package/dist/update-readiness-host.js +297 -0
  416. package/dist/update-readiness-host.js.map +1 -0
  417. package/dist/update-readiness.d.ts +83 -0
  418. package/dist/update-readiness.js +459 -0
  419. package/dist/update-readiness.js.map +1 -0
  420. package/dist/update-recovery/kit.d.ts +35 -0
  421. package/dist/update-recovery/kit.js +99 -0
  422. package/dist/update-recovery/kit.js.map +1 -0
  423. package/dist/update-recovery/pre-start.d.ts +34 -0
  424. package/dist/update-recovery/pre-start.js +103 -0
  425. package/dist/update-recovery/pre-start.js.map +1 -0
  426. package/dist/update-recovery/recover-main.d.ts +1 -0
  427. package/dist/update-recovery/recover-main.js +4 -0
  428. package/dist/update-recovery/recover-main.js.map +1 -0
  429. package/dist/update-recovery/recover.d.ts +22 -0
  430. package/dist/update-recovery/recover.js +124 -0
  431. package/dist/update-recovery/recover.js.map +1 -0
  432. package/dist/update-recovery/route.d.ts +53 -0
  433. package/dist/update-recovery/route.js +262 -0
  434. package/dist/update-recovery/route.js.map +1 -0
  435. package/dist/update-recovery/runner.d.ts +58 -0
  436. package/dist/update-recovery/runner.js +196 -0
  437. package/dist/update-recovery/runner.js.map +1 -0
  438. package/dist/update-recovery/service-manager.d.ts +39 -0
  439. package/dist/update-recovery/service-manager.js +57 -0
  440. package/dist/update-recovery/service-manager.js.map +1 -0
  441. package/dist/update-restore.d.ts +44 -0
  442. package/dist/update-restore.js +355 -0
  443. package/dist/update-restore.js.map +1 -0
  444. package/dist/update-retained.d.ts +38 -0
  445. package/dist/update-retained.js +91 -0
  446. package/dist/update-retained.js.map +1 -0
  447. package/dist/update-rollback.d.ts +74 -0
  448. package/dist/update-rollback.js +221 -0
  449. package/dist/update-rollback.js.map +1 -0
  450. package/dist/update-settings.d.ts +36 -0
  451. package/dist/update-settings.js +122 -0
  452. package/dist/update-settings.js.map +1 -0
  453. package/dist/update-snapshot-manifest.d.ts +32 -0
  454. package/dist/update-snapshot-manifest.js +65 -0
  455. package/dist/update-snapshot-manifest.js.map +1 -0
  456. package/dist/update-snapshot-scope.d.ts +67 -0
  457. package/dist/update-snapshot-scope.js +172 -0
  458. package/dist/update-snapshot-scope.js.map +1 -0
  459. package/dist/update-snapshot.d.ts +34 -0
  460. package/dist/update-snapshot.js +246 -0
  461. package/dist/update-snapshot.js.map +1 -0
  462. package/dist/update-writers.d.ts +71 -0
  463. package/dist/update-writers.js +235 -0
  464. package/dist/update-writers.js.map +1 -0
  465. package/dist/web-api.d.ts +6 -0
  466. package/dist/web-api.js +140 -22
  467. package/dist/web-api.js.map +1 -1
  468. package/dist/web-chat-history.d.ts +7 -0
  469. package/dist/web-chat-history.js +15 -0
  470. package/dist/web-chat-history.js.map +1 -1
  471. package/dist/web-office-acts.d.ts +16 -0
  472. package/dist/web-office-acts.js +27 -9
  473. package/dist/web-office-acts.js.map +1 -1
  474. package/dist/web-office-pack-read.js +1 -1
  475. package/dist/web-office-pack-read.js.map +1 -1
  476. package/dist/web-office-skins.d.ts +5 -3
  477. package/dist/web-office-skins.js +20 -16
  478. package/dist/web-office-skins.js.map +1 -1
  479. package/dist/web-preview.d.ts +5 -0
  480. package/dist/web-preview.js +1 -1
  481. package/dist/web-preview.js.map +1 -1
  482. package/dist/web-settings-patch.d.ts +27 -0
  483. package/dist/web-settings-patch.js +67 -0
  484. package/dist/web-settings-patch.js.map +1 -1
  485. package/dist/web-update.d.ts +6 -0
  486. package/dist/windows-agents.d.ts +12 -0
  487. package/dist/windows-agents.js +5 -0
  488. package/dist/windows-agents.js.map +1 -1
  489. package/dist/workflow-templates/default.md +1 -0
  490. package/launcher/agend +4 -1
  491. package/launcher/agend-agent +4 -1
  492. package/launcher/agend-install.cjs +16 -8
  493. package/launcher/install-admission.d.cts +8 -0
  494. package/launcher/npm-allow-scripts.cjs +72 -0
  495. package/launcher/npm-global-prefix.cjs +81 -0
  496. package/launcher/postinstall.cjs +9 -8
  497. package/launcher/runtime-select.cjs +8 -2
  498. package/package.json +3 -2
  499. package/scripts/preinstall-guard.cjs +1 -1
@@ -103,6 +103,14 @@ export declare const TASK_CARD_REF_HINT = "In a reply, write a card as #M-3, not
103
103
  /** Where agent-cli-instructions.md says it (a comment line in its Task Board commands). */
104
104
  export declare const TASK_CARD_REF_SLOT = "{{TASK_CARD_REF_HINT}}";
105
105
  export declare function withTaskCardRef(cli: string): string;
106
+ /**
107
+ * how an agent reports on a card. The person reads the CARD (its result, its timeline, its files), not the agent's chat
108
+ * or a path on its machine — an agent once finished with "design document: /data/workspaces/planner/design.md" and the person
109
+ * could open nothing. Written once, told once to an agent already running (agent-whats-new.ts); the rule itself is in the
110
+ * built-in workflow's Progress Tracking, the `task-board` skill and the CLI reference's `attach` line. Not in the tool's
111
+ * description, whose size is pinned (tests/task-card-ref-hint.test.ts).
112
+ */
113
+ export declare const TASK_REPORT_HINT = "Report ON the card, not only in chat: a short Markdown `result` (what was done, how it was checked), the content as a comment (what it is, how to open it), and the finished file (`attach`: the one thing to open, not the source). A path on your machine is not delivery: the person cannot open it.";
106
114
  /** (b) What an agent is told when the person switches the task board on for it (its tool list follows at once). */
107
115
  export declare const TASK_BOARD_ON_NOTICE: string;
108
116
  /** (b) The task board went from switched off to allowed between two resolved configs of one instance. */
@@ -230,6 +230,14 @@ export const TASK_CARD_REF_SLOT = "{{TASK_CARD_REF_HINT}}";
230
230
  export function withTaskCardRef(cli) {
231
231
  return cli.replaceAll(TASK_CARD_REF_SLOT, TASK_CARD_REF_HINT);
232
232
  }
233
+ /**
234
+ * how an agent reports on a card. The person reads the CARD (its result, its timeline, its files), not the agent's chat
235
+ * or a path on its machine — an agent once finished with "design document: /data/workspaces/planner/design.md" and the person
236
+ * could open nothing. Written once, told once to an agent already running (agent-whats-new.ts); the rule itself is in the
237
+ * built-in workflow's Progress Tracking, the `task-board` skill and the CLI reference's `attach` line. Not in the tool's
238
+ * description, whose size is pinned (tests/task-card-ref-hint.test.ts).
239
+ */
240
+ export const TASK_REPORT_HINT = "Report ON the card, not only in chat: a short Markdown `result` (what was done, how it was checked), the content as a comment (what it is, how to open it), and the finished file (`attach`: the one thing to open, not the source). A path on your machine is not delivery: the person cannot open it.";
233
241
  /** (b) What an agent is told when the person switches the task board on for it (its tool list follows at once). */
234
242
  export const TASK_BOARD_ON_NOTICE = "[Task board] The person switched the task board on for you: the `task` tool is in your tool list now. "
235
243
  + "Start with `task mine` (your work on the board); open a main task for multi-step work you are asked for, split it into sub tasks, "
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-permissions.js","sourceRoot":"","sources":["../src/dashboard-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAU,CAAC;AAElH,mGAAmG;AACnG,sHAAsH;AACtH,0HAA0H;AAC1H,MAAM,CAAC,MAAM,aAAa,GAAkC,IAAI,GAAG,CAAmB,CAAC,YAAY,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;AAChI,mHAAmH;AACnH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAe,EAAW,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,OAA2B,CAAC,CAAC;AAIrH,iIAAiI;AACjI,+HAA+H;AAC/H,6HAA6H;AAC7H,wDAAwD;AAExD,yHAAyH;AACzH,MAAM,CAAC,MAAM,uBAAuB,GAA0D;IAC5F,UAAU,EAAE;QACV,eAAe,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB;QAC1E,oBAAoB,EAAE,wBAAwB;QAC9C,gBAAgB,EAAE,mBAAmB;QACrC,iBAAiB,EAAE,mBAAmB;KACvC;IACD,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACtD,MAAM,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;IAC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}
@@ -1,8 +1,18 @@
1
+ import { RequestContextReturns } from "./request-context-returns.js";
2
+ import type { PreparedRequestContextInput, RequestContextRuntimeOwner } from "./request-context-turns.js";
3
+ import type { QuiescenceGate } from "./update-quiescence.js";
4
+ import { RequestContactCards, type RequestContactCardsHost } from "./request-contact-card.js";
5
+ import { RequestContextDrain } from "./request-context-drain.js";
6
+ import { RequestContextMigrationShadow, type RequestMigrationHost } from "./request-context-migration.js";
7
+ import { RequestContactGate, type RequestContactGateHost } from "./request-contact-gate.js";
1
8
  import { WorkingRecoveryStore, type RecoveryEpisode } from "./working-recovery.js";
2
9
  import { type SeenPerson } from "./guest-seen-people.js";
3
10
  import { EventEmitter } from "node:events";
4
11
  import type { QueueResumePolicy } from "./delivery-queue-evidence.js";
5
12
  import { ContactAuthStore } from "./contact-auth-store.js";
13
+ import { RequestContextRecoveryStore } from "./request-context-recovery.js";
14
+ import { type RequestContextV1, type RequestOperationBindingV1 } from "./request-context-protocol.js";
15
+ import { type RequestContextCompatibilityOptions } from "./request-context-compatibility.js";
6
16
  import { type RuntimeTranscriptReference } from "./runtime-pane-transcript-protocol.js";
7
17
  import { type WorkingStateSnapshot, type WorkingStateReference } from "./working-state-journal.js";
8
18
  import { type HumanOrigin, type HumanReceiptRow, type HumanReceiptProof } from "./human-delivery-receipts.js";
@@ -132,6 +142,7 @@ export declare const SYSTEM_NOTICE_KIND = "system_notice";
132
142
  */
133
143
  export declare const SYSTEM_NOTICE_MAX_AGE_MS: number;
134
144
  export interface DeliveryStatusItem {
145
+ request_provenance?: import("./request-context-view.js").RequestProvenanceView;
135
146
  delivery_id: string;
136
147
  operation_id: string;
137
148
  correlation_id: string | null;
@@ -296,6 +307,9 @@ export declare class DeliveryOutbox extends EventEmitter {
296
307
  get workingRecovery(): WorkingRecoveryStore;
297
308
  admitWorkingRecovery(episode: RecoveryEpisode, content: string, advisory?: boolean): boolean;
298
309
  readonly managerBootId: string;
310
+ /** S-244: while the barrier flag is up, claimNext journals references and claims nothing. Unset: today's claim. */
311
+ private quiescence;
312
+ setQuiescence(gate: QuiescenceGate | null): void;
299
313
  /** Observational extension: its failure never participates in delivery admission. */
300
314
  observeWorkingState(instance: string, snapshot: Omit<WorkingStateSnapshot, "managerBootId">): import("./working-state-journal.js").WorkingStateEntry | null;
301
315
  getWorkingState(instance: string): import("./working-state-journal.js").WorkingStateEntry | undefined;
@@ -327,7 +341,14 @@ export declare class DeliveryOutbox extends EventEmitter {
327
341
  /** #3647: when `source` last sent anyone a message through the outbox (epoch ms), or null. */
328
342
  latestSentAt(source: string): number | null;
329
343
  private noteWorkingReferences;
330
- constructor(dbPath: string, managerBootId?: string);
344
+ private readonly requestContextDispatchVersion;
345
+ private readonly requestContextRelayVersion;
346
+ private requestContextReturnsOwner?;
347
+ constructor(dbPath: string, managerBootId?: string, compatibility?: RequestContextCompatibilityOptions & {
348
+ requestContextRelayVersion?: 0 | 1;
349
+ });
350
+ /** Future slice L cutover port; all existing production constructors remain capability 0. */
351
+ activateRequestContextBarrier(): void;
331
352
  private initialize;
332
353
  /** SQLite cannot widen a CHECK with ADD COLUMN; preserve all old rows in one transaction. */
333
354
  private migrateReplyObligationExpiry;
@@ -378,11 +399,37 @@ export declare class DeliveryOutbox extends EventEmitter {
378
399
  /** Rows admitted before #856 get the same message_id / digest a new row would. */
379
400
  private backfillMessageEvidence;
380
401
  private ensureColumn;
402
+ /** Internal same-card service; no production host installs it before L. */
403
+ requestContactCards(host: RequestContactCardsHost): RequestContactCards;
404
+ /** Scratch/cutover assembly only; a certificate is process-bound and never persisted as authority. */
405
+ /** Stable Fleet identity while its exclusive coordinator lease is current; never a boot id. */
406
+ requestContextDrain(owner: () => string | null): RequestContextDrain;
407
+ /** Read-only shadow is safe before activation; never initializes contact/context artifacts. */
408
+ requestContextMigrationShadow(host: RequestMigrationHost): RequestContextMigrationShadow;
409
+ /** Dormant central gate; no production caller until the controlled cutover. */
410
+ requestContactGate(host: RequestContactGateHost): RequestContactGate;
411
+ /** H owner assembly only. The ordinary E factory keeps the pre-H hold semantics. */
412
+ requestHubContactGate(host: RequestContactGateHost): RequestContactGate;
413
+ /** Internal future-dispatch port only; no production ingress calls this before slice L. */
414
+ admitWithRequestContext(input: NewOutboxDelivery, context: RequestContextV1, bindingInput: RequestOperationBindingV1): {
415
+ delivery: OutboxDelivery;
416
+ inserted: boolean;
417
+ };
418
+ private requireRequestContextRelay;
419
+ /** One dormant B-owned return manager, initialized only behind the active barrier and explicit H capability. */
420
+ get requestContextReturns(): RequestContextReturns;
421
+ prepareRequestContextDeliveryInput(deliveryId: string, attemptNo: number, owner: RequestContextRuntimeOwner, wireSha256: string, currentConsumption: () => boolean): PreparedRequestContextInput;
422
+ /** Internal dormant local-turn persistence; the record alone grants no turn or authority. */
423
+ get requestContextRecovery(): RequestContextRecoveryStore;
424
+ requestContextForDelivery(deliveryId: string): import("./request-context-store.js").RequestContextOperationRecord | null;
425
+ requestContext(id: string): RequestContextV1 | null;
426
+ requestContextOperation(source: string, operationId: string): import("./request-context-store.js").RequestContextOperationRecord | null;
381
427
  /** Commit admission before returning success. Duplicate source keys return their original row. */
382
428
  admit(input: NewOutboxDelivery): {
383
429
  delivery: OutboxDelivery;
384
430
  inserted: boolean;
385
431
  };
432
+ private admitInternal;
386
433
  get(deliveryId: string): OutboxDelivery | undefined;
387
434
  createHumanReceipt(input: {
388
435
  targetInstance: string;
@@ -437,6 +484,11 @@ export declare class DeliveryOutbox extends EventEmitter {
437
484
  /** Claim the earliest eligible target row; one caller owns each target lane. */
438
485
  claimNext(managerBootId: string, targetBootIdFor: (target: string) => string | null, blockedTargets: ReadonlySet<string>, eligible?: (delivery: OutboxDelivery) => boolean): ClaimedOutboxDelivery | undefined;
439
486
  private claimNextSync;
487
+ /**
488
+ * Hand-back claims one referenced row and no other (M-3770 §2.6). The update is conditional, so a second claim
489
+ * does not land. A retry still inside its backoff is `ineligible` and is left queued.
490
+ */
491
+ claimExact(deliveryId: string, managerBootId: string, targetBootId: string, now?: string): "claimed" | "ineligible" | "missing" | "settled";
440
492
  /**
441
493
  * #2785 (b): a message still waiting while a newer one from the same sender to the same target on the same thread
442
494
  * (correlation_id) waits behind it is not delivered — the newer one replaces it (a review round for an older PR head, a
@@ -512,6 +564,9 @@ export declare class DeliveryOutbox extends EventEmitter {
512
564
  * `delivery_status` can return "expired" for a pruned row — but only to the
513
565
  * original source or target (ownership check, #1340 P2 🔒).
514
566
  */
567
+ private pruneDeliveryRows;
568
+ /** Dormant lifecycle port: only drained, terminal roots older than 30 days may retire atomically. */
569
+ private retireRequestContextRoot;
515
570
  prune(days: number): Promise<{
516
571
  pruned: number;
517
572
  durationMs: number;
@@ -1,3 +1,9 @@
1
+ import { assertRequestHubContactImage } from "./request-context-policy.js";
2
+ import { RequestContextReturns, requestContextDeliveryChildId, requestContextReturnBlockers, registerRequestContextReturnDispatcher, assertRequestContextReturnsCompatibility, REQUEST_CONTEXT_RETURNS_TABLE } from "./request-context-returns.js";
3
+ import { RequestContactCards } from "./request-contact-card.js";
4
+ import { RequestContextDrain } from "./request-context-drain.js";
5
+ import { RequestContextMigrationShadow } from "./request-context-migration.js";
6
+ import { RequestContactGate } from "./request-contact-gate.js";
1
7
  import { WorkingRecoveryStore, WORKING_RECOVERY_KIND } from "./working-recovery.js";
2
8
  import { initializeSeenPeople, isSeenPerson, listSeenPeople, noteSeenPerson, pruneSeenPeople, SEEN_PEOPLE_KEEP_DAYS } from "./guest-seen-people.js";
3
9
  import { measureSyncWork } from "./sync-work-attribution.js";
@@ -8,6 +14,10 @@ import { chmodSync, mkdirSync } from "node:fs";
8
14
  import { dirname } from "node:path";
9
15
  import { t } from "./locale.js";
10
16
  import { ContactAuthStore } from "./contact-auth-store.js";
17
+ import { RequestContextStore, requestContextDigest, requestContextJson } from "./request-context-store.js";
18
+ import { RequestContextRecoveryStore } from "./request-context-recovery.js";
19
+ import { RequestOperationBindingV1Schema } from "./request-context-protocol.js";
20
+ import { registerRequestContextDispatcher, assertRequestContextCompatibility, activateRequestContextBarrier } from "./request-context-compatibility.js";
11
21
  import { validateRuntimeTranscriptReference } from "./runtime-pane-transcript-protocol.js";
12
22
  import { WorkingStateJournal } from "./working-state-journal.js";
13
23
  import { initializeHumanReceipts, createHumanReceipt, getHumanReceipt, bindHumanReceipt, settleHumanReceipt, queryHumanReceipt, maxWebAuthorityEpoch, deliveredMessageHours, pruneMessageHours } from "./human-delivery-receipts.js";
@@ -354,6 +364,9 @@ export class DeliveryOutbox extends EventEmitter {
354
364
  return inserted;
355
365
  }
356
366
  managerBootId;
367
+ /** S-244: while the barrier flag is up, claimNext journals references and claims nothing. Unset: today's claim. */
368
+ quiescence = null;
369
+ setQuiescence(gate) { this.quiescence = gate; }
357
370
  /** Observational extension: its failure never participates in delivery admission. */
358
371
  observeWorkingState(instance, snapshot) {
359
372
  const timeout = this.db.pragma("busy_timeout", { simple: true });
@@ -450,12 +463,23 @@ export class DeliveryOutbox extends EventEmitter {
450
463
  }
451
464
  catch { /* observation only */ }
452
465
  }
453
- constructor(dbPath, managerBootId = randomUUID()) {
466
+ requestContextDispatchVersion;
467
+ requestContextRelayVersion;
468
+ requestContextReturnsOwner;
469
+ constructor(dbPath, managerBootId = randomUUID(), compatibility = {}) {
454
470
  super();
455
471
  this.managerBootId = managerBootId;
472
+ this.requestContextDispatchVersion = compatibility.requestContextDispatchVersion ?? 0;
473
+ this.requestContextRelayVersion = compatibility.requestContextRelayVersion ?? 0;
456
474
  mkdirSync(dirname(dbPath), { recursive: true, mode: 0o700 });
457
475
  this.db = new Database(dbPath);
458
476
  try {
477
+ registerRequestContextDispatcher(this.db, this.requestContextDispatchVersion);
478
+ assertRequestContextCompatibility(this.db, this.requestContextDispatchVersion);
479
+ registerRequestContextReturnDispatcher(this.db, this.requestContextRelayVersion);
480
+ assertRequestContextReturnsCompatibility(this.db, this.requestContextRelayVersion);
481
+ if (hasTable(this.db, REQUEST_CONTEXT_RETURNS_TABLE))
482
+ this.requestContextReturnsOwner = new RequestContextReturns(this.db, () => this.requireRequestContextRelay());
459
483
  this.initialize(dbPath);
460
484
  }
461
485
  catch (error) {
@@ -466,6 +490,10 @@ export class DeliveryOutbox extends EventEmitter {
466
490
  throw error;
467
491
  }
468
492
  }
493
+ /** Future slice L cutover port; all existing production constructors remain capability 0. */
494
+ activateRequestContextBarrier() {
495
+ activateRequestContextBarrier(this.db, this.requestContextDispatchVersion);
496
+ }
469
497
  initialize(dbPath) {
470
498
  chmodSync(dbPath, 0o600);
471
499
  this.db.pragma("journal_mode = WAL");
@@ -884,8 +912,125 @@ export class DeliveryOutbox extends EventEmitter {
884
912
  return;
885
913
  this.db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
886
914
  }
915
+ /** Internal same-card service; no production host installs it before L. */
916
+ requestContactCards(host) {
917
+ return new RequestContactCards(this.db, this.contactAuthorizations, () => this.requestContactGate(host), host);
918
+ }
919
+ /** Scratch/cutover assembly only; a certificate is process-bound and never persisted as authority. */
920
+ /** Stable Fleet identity while its exclusive coordinator lease is current; never a boot id. */
921
+ requestContextDrain(owner) {
922
+ const ready = () => { if (this.requestContextDispatchVersion !== 1 || assertRequestContextCompatibility(this.db, 1) !== "active")
923
+ throw Error("request-context dispatcher is not ready"); };
924
+ ready();
925
+ return new RequestContextDrain(this.db, ready, owner);
926
+ }
927
+ /** Read-only shadow is safe before activation; never initializes contact/context artifacts. */
928
+ requestContextMigrationShadow(host) {
929
+ return new RequestContextMigrationShadow(this.db, host);
930
+ }
931
+ /** Dormant central gate; no production caller until the controlled cutover. */
932
+ requestContactGate(host) {
933
+ const ready = () => {
934
+ if (this.requestContextDispatchVersion !== 1 || assertRequestContextCompatibility(this.db, 1) !== "active")
935
+ throw Error("request-context dispatcher is not ready");
936
+ };
937
+ ready();
938
+ return new RequestContactGate(this.db, this.contactAuthorizations, { ready,
939
+ admit: (input, context, binding) => this.admitWithRequestContext(input, context, binding),
940
+ retire: (root, proof) => this.retireRequestContextRoot(root, proof) }, host);
941
+ }
942
+ /** H owner assembly only. The ordinary E factory keeps the pre-H hold semantics. */
943
+ requestHubContactGate(host) {
944
+ this.requireRequestContextRelay();
945
+ return this.requestContactGate({ ...host, hubRelayAllowed: (context, binding, delivery) => assertRequestHubContactImage(context, binding, delivery) });
946
+ }
947
+ /** Internal future-dispatch port only; no production ingress calls this before slice L. */
948
+ admitWithRequestContext(input, context, bindingInput) {
949
+ if (this.requestContextDispatchVersion !== 1 || assertRequestContextCompatibility(this.db, 1) !== "active") {
950
+ throw Error("request-context dispatcher is not ready");
951
+ }
952
+ const admitted = this.db.transaction(() => {
953
+ const store = new RequestContextStore(this.db), binding = RequestOperationBindingV1Schema.parse(bindingInput);
954
+ const stored = store.recordContext(context);
955
+ if (this.requestContextRelayVersion === 1)
956
+ assertRequestHubContactImage(stored, binding, input);
957
+ if (binding.operationId !== input.operationId || binding.source.instance !== input.sourceInstance
958
+ || binding.target.instance !== input.targetInstance || binding.contextId !== stored.ref.contextId
959
+ || binding.rootContextId !== stored.ref.rootContextId || binding.source.instance !== stored.source.instance
960
+ || binding.source.incarnation !== stored.source.incarnation || binding.payloadSha256 !== requestContextDigest(input.payload)) {
961
+ throw Error("request-context operation binding conflict");
962
+ }
963
+ const admissionSha256 = requestContextDigest({ ...input, targetSession: input.targetSession ?? null,
964
+ correlationId: input.correlationId ?? null, forwards: input.forwards ?? [], requestedKind: input.requestedKind ?? input.kind });
965
+ const prior = store.operation(input.sourceInstance, input.operationId);
966
+ if (prior) {
967
+ if (prior.sourceKey !== input.sourceKey || prior.admissionSha256 !== admissionSha256
968
+ || requestContextJson(prior.binding) !== requestContextJson(binding))
969
+ throw Error("request-context operation conflict");
970
+ const delivery = this.get(prior.deliveryId);
971
+ if (!delivery || requestContextDigest(delivery.payload) !== binding.payloadSha256)
972
+ throw Error("request-context delivery unavailable");
973
+ if (this.requestContextRelayVersion === 1)
974
+ this.requestContextReturns.admitted(prior, stored, false);
975
+ return { delivery, inserted: false };
976
+ }
977
+ if (this.db.prepare("SELECT 1 FROM deliveries WHERE source_key=? OR (source_instance=? AND operation_id=?) LIMIT 1")
978
+ .get(input.sourceKey, input.sourceInstance, input.operationId))
979
+ throw Error("request-context cannot adopt legacy operation");
980
+ const admitted = this.admitInternal(input, true);
981
+ if (requestContextDigest(admitted.delivery.payload) !== binding.payloadSha256)
982
+ throw Error("request-context admitted payload changed");
983
+ store.recordOperation({ binding, sourceKey: input.sourceKey, deliveryId: admitted.delivery.deliveryId, admissionSha256 });
984
+ if (this.requestContextRelayVersion === 1)
985
+ this.requestContextReturns.admitted(store.operation(input.sourceInstance, input.operationId), stored, admitted.inserted);
986
+ return admitted;
987
+ })();
988
+ if (admitted.inserted)
989
+ this.noteWorkingReferences([input.sourceInstance, input.targetInstance]);
990
+ return admitted;
991
+ }
992
+ requireRequestContextRelay() {
993
+ if (this.requestContextRelayVersion !== 1 || this.requestContextDispatchVersion !== 1 || assertRequestContextCompatibility(this.db, 1) !== "active")
994
+ throw Error("request-context relay dispatcher is not ready");
995
+ }
996
+ /** One dormant B-owned return manager, initialized only behind the active barrier and explicit H capability. */
997
+ get requestContextReturns() { this.requireRequestContextRelay(); return this.requestContextReturnsOwner ??= new RequestContextReturns(this.db, () => this.requireRequestContextRelay()); }
998
+ prepareRequestContextDeliveryInput(deliveryId, attemptNo, owner, wireSha256, currentConsumption) {
999
+ this.requireRequestContextRelay();
1000
+ if (!currentConsumption())
1001
+ throw Error("request-context delivery attempt is no longer current");
1002
+ if (!/^[a-f0-9]{64}$/.test(wireSha256) || !Number.isSafeInteger(attemptNo) || attemptNo < 1)
1003
+ throw Error("request-context delivery attempt unavailable");
1004
+ return this.db.transaction(() => {
1005
+ const store = new RequestContextStore(this.db), operation = store.forDelivery(deliveryId), delivery = this.get(deliveryId);
1006
+ if (!operation || !delivery || operation.binding.target.instance !== owner.instance || operation.binding.target.incarnation !== owner.incarnation || delivery.targetSession && delivery.targetSession !== owner.instance)
1007
+ throw Error("request-context delivery target unavailable");
1008
+ const returned = this.requestContextReturns.parentForResponse(deliveryId), parent = store.context(returned?.requesterContextId ?? operation.binding.contextId);
1009
+ if (!parent || parent.ref.rootContextId !== operation.binding.rootContextId)
1010
+ throw Error("request-context delivery parent unavailable");
1011
+ const context = { ...parent, ref: { version: 1, contextId: requestContextDeliveryChildId(deliveryId, operation.binding.target), rootContextId: parent.ref.rootContextId, parentContextId: parent.ref.contextId }, source: { instance: owner.instance, incarnation: owner.incarnation } };
1012
+ const retained = store.recordContext(context), sender = { kind: "peer", ...operation.binding.source };
1013
+ if (!currentConsumption())
1014
+ throw Error("request-context delivery attempt is no longer current");
1015
+ return { inputId: `delivery:${deliveryId}:${attemptNo}`, wireSha256, owner: structuredClone(owner), context: retained,
1016
+ proof: returned ? { kind: "expected-return", parentContextId: parent.ref.contextId, expectedSender: { kind: "peer", ...returned.responder }, actualSender: sender } : { kind: "admitted-delivery", parentContextId: parent.ref.contextId, deliveryId, sender } };
1017
+ })();
1018
+ }
1019
+ /** Internal dormant local-turn persistence; the record alone grants no turn or authority. */
1020
+ get requestContextRecovery() {
1021
+ return new RequestContextRecoveryStore(this.db, () => {
1022
+ if (this.requestContextDispatchVersion !== 1 || assertRequestContextCompatibility(this.db, 1) !== "active")
1023
+ throw Error("request-context dispatcher is not ready");
1024
+ });
1025
+ }
1026
+ requestContextForDelivery(deliveryId) { return new RequestContextStore(this.db).forDelivery(deliveryId); }
1027
+ requestContext(id) { return new RequestContextStore(this.db).context(id); }
1028
+ requestContextOperation(source, operationId) { return new RequestContextStore(this.db).operation(source, operationId); }
887
1029
  /** Commit admission before returning success. Duplicate source keys return their original row. */
888
1030
  admit(input) {
1031
+ return this.admitInternal(input, false);
1032
+ }
1033
+ admitInternal(input, scoped) {
889
1034
  const now = new Date().toISOString();
890
1035
  const deliveryId = randomUUID();
891
1036
  const insert = this.db.prepare(`
@@ -902,6 +1047,8 @@ export class DeliveryOutbox extends EventEmitter {
902
1047
  `);
903
1048
  const select = this.db.prepare("SELECT * FROM deliveries WHERE source_key = ?");
904
1049
  const transaction = this.db.transaction(() => {
1050
+ if (!scoped)
1051
+ new RequestContextStore(this.db).assertLegacyAdmission(input.sourceInstance, input.operationId, input.sourceKey);
905
1052
  const previous = select.get(input.sourceKey);
906
1053
  const forwards = input.forwards ?? [];
907
1054
  if (forwards.length > 16 || new Set(forwards).size !== forwards.length
@@ -1014,7 +1161,7 @@ export class DeliveryOutbox extends EventEmitter {
1014
1161
  return { delivery: mapRow(row), inserted: result.changes === 1 };
1015
1162
  });
1016
1163
  const admitted = transaction();
1017
- if (admitted.inserted)
1164
+ if (admitted.inserted && !scoped)
1018
1165
  this.noteWorkingReferences([input.sourceInstance, input.targetInstance]);
1019
1166
  return admitted;
1020
1167
  }
@@ -1137,6 +1284,13 @@ export class DeliveryOutbox extends EventEmitter {
1137
1284
  return measureSyncWork("outbox.claimNext", () => this.claimNextSync(managerBootId, targetBootIdFor, blockedTargets, eligible));
1138
1285
  }
1139
1286
  claimNextSync(managerBootId, targetBootIdFor, blockedTargets, eligible) {
1287
+ const gate = this.quiescence;
1288
+ if (gate?.armed()) {
1289
+ const held = this.db.prepare(`SELECT delivery_id, created_seq FROM deliveries WHERE state IN ('queued','retry_wait') ORDER BY created_seq`).all();
1290
+ for (const row of held)
1291
+ gate.holdOutboxClaim(row.delivery_id, row.created_seq);
1292
+ return undefined;
1293
+ }
1140
1294
  const now = new Date().toISOString();
1141
1295
  const pending = this.db.prepare(`
1142
1296
  SELECT * FROM deliveries WHERE state IN ('queued','retry_wait')
@@ -1182,6 +1336,26 @@ export class DeliveryOutbox extends EventEmitter {
1182
1336
  }
1183
1337
  return undefined;
1184
1338
  }
1339
+ /**
1340
+ * Hand-back claims one referenced row and no other (M-3770 §2.6). The update is conditional, so a second claim
1341
+ * does not land. A retry still inside its backoff is `ineligible` and is left queued.
1342
+ */
1343
+ claimExact(deliveryId, managerBootId, targetBootId, now = new Date().toISOString()) {
1344
+ const row = this.get(deliveryId);
1345
+ if (!row)
1346
+ return "missing";
1347
+ if (row.state !== "queued" && row.state !== "retry_wait")
1348
+ return "settled";
1349
+ if (row.state === "retry_wait" && row.nextAttemptAt && row.nextAttemptAt > now)
1350
+ return "ineligible";
1351
+ const result = this.db.prepare(`
1352
+ UPDATE deliveries
1353
+ SET state='delivering', target_daemon_boot_id=?, manager_boot_id=?,
1354
+ attempt_no=attempt_no+1, updated_at=?, last_error=NULL, next_attempt_at=NULL
1355
+ WHERE delivery_id=? AND state IN ('queued','retry_wait')
1356
+ `).run(targetBootId, managerBootId, now, deliveryId);
1357
+ return result.changes === 1 ? "claimed" : "settled";
1358
+ }
1185
1359
  /**
1186
1360
  * #2785 (b): a message still waiting while a newer one from the same sender to the same target on the same thread
1187
1361
  * (correlation_id) waits behind it is not delivered — the newer one replaces it (a review round for an older PR head, a
@@ -1708,6 +1882,82 @@ export class DeliveryOutbox extends EventEmitter {
1708
1882
  * `delivery_status` can return "expired" for a pruned row — but only to the
1709
1883
  * original source or target (ownership check, #1340 P2 🔒).
1710
1884
  */
1885
+ pruneDeliveryRows(rows, now) {
1886
+ const ids = rows.map(row => row.delivery_id);
1887
+ if (!ids.length)
1888
+ return;
1889
+ const placeholders = ids.map(() => "?").join(",");
1890
+ // Record (delivery_id, source, target) so delivery_status can return
1891
+ // "expired" to the row's own source/target (ownership-gated).
1892
+ const insertPruned = this.db.prepare("INSERT OR IGNORE INTO pruned_ids(delivery_id, source_instance, target_instance, pruned_at) VALUES (?, ?, ?, ?)");
1893
+ for (const row of rows)
1894
+ insertPruned.run(row.delivery_id, row.source_instance, row.target_instance, now);
1895
+ // Delete child rows first.
1896
+ this.db.prepare(`DELETE FROM delivery_attempts WHERE delivery_id IN (${placeholders})`).run(...ids);
1897
+ // Only closed reply_obligations (answered/expired): open ones were excluded above.
1898
+ if (hasTable(this.db, "reply_obligations")) {
1899
+ this.db.prepare(`
1900
+ DELETE FROM reply_obligations
1901
+ WHERE request_delivery_id IN (${placeholders}) AND state IN ('answered','expired')
1902
+ `).run(...ids);
1903
+ }
1904
+ this.db.prepare(`DELETE FROM outcome_notices WHERE notice_delivery_id IN (${placeholders})`).run(...ids);
1905
+ this.db.prepare(`DELETE FROM failure_notices WHERE parent_delivery_id IN (${placeholders}) OR notice_delivery_id IN (${placeholders})`).run(...ids, ...ids);
1906
+ this.db.prepare(`DELETE FROM delivery_forward_edges WHERE reference_kind='delivery' AND reference_id IN (${placeholders})`).run(...ids);
1907
+ this.db.prepare(`DELETE FROM deliveries WHERE delivery_id IN (${placeholders})`).run(...ids);
1908
+ }
1909
+ /** Dormant lifecycle port: only drained, terminal roots older than 30 days may retire atomically. */
1910
+ retireRequestContextRoot(root, retired) {
1911
+ if (this.requestContextDispatchVersion !== 1 || assertRequestContextCompatibility(this.db, 1) !== "active")
1912
+ throw Error("request-context dispatcher is not ready");
1913
+ return this.db.transaction(() => {
1914
+ const store = new RequestContextStore(this.db), context = store.context(root);
1915
+ if (!context || context.ref.rootContextId !== root || context.ref.parentContextId || !retired())
1916
+ throw Error("request-context root is not drained");
1917
+ const ids = this.db.prepare("SELECT context_id FROM request_contexts_v1 WHERE json_extract(context_json,'$.ref.rootContextId')=?").all(root).map(row => row.context_id);
1918
+ const slots = "SELECT context_id FROM request_contexts_v1 WHERE json_extract(context_json,'$.ref.rootContextId')=?", cutoff = new Date(Date.now() - 30 * 24 * 60 * 60_000).toISOString();
1919
+ const rows = this.db.prepare(`SELECT d.delivery_id,d.source_instance,d.target_instance,d.state,COALESCE(d.finished_at,d.updated_at) AS at
1920
+ FROM deliveries d JOIN request_context_operations_v1 o ON o.delivery_id=d.delivery_id WHERE o.context_id IN (${slots})`).all(root);
1921
+ if (rows.some(row => !["delivered", "failed", "cancelled"].includes(row.state) || !Number.isFinite(Date.parse(row.at)) || Date.parse(row.at) >= Date.parse(cutoff)))
1922
+ throw Error("request-context root retention not elapsed");
1923
+ if (this.db.prepare(`SELECT 1 FROM reply_obligations WHERE state='open' AND request_delivery_id IN (SELECT delivery_id FROM request_context_operations_v1 WHERE context_id IN (${slots})) LIMIT 1`).get(root))
1924
+ throw Error("request-context root has open reply");
1925
+ if (hasTable(this.db, "request_context_recovery_v1") && this.db.prepare(`SELECT 1 FROM request_context_recovery_v1 WHERE json_extract(pointer_json,'$.contextId') IN (${slots}) LIMIT 1`).get(root))
1926
+ throw Error("request-context root has recovery reference");
1927
+ if (hasTable(this.db, "request_context_contacts_v1")) {
1928
+ const tickets = this.db.prepare("SELECT t.id,t.ticket_json FROM contact_auth_tickets t JOIN request_context_contacts_v1 c ON c.ticket_id=t.id WHERE c.root_id=?").all(root);
1929
+ const resolved = tickets.map(row => this.contactAuthorizations.get(row.id));
1930
+ if (resolved.some(t => { if (!t)
1931
+ return true; const at = Date.parse(t.decidedAt ?? t.expiresAt ?? t.createdAt); return !['approved', 'delivered', 'declined', 'expired'].includes(t.state) || !Number.isFinite(at) || at >= Date.parse(cutoff); }))
1932
+ throw Error("request-context root has retained ticket");
1933
+ for (const ticket of tickets) {
1934
+ this.db.prepare("DELETE FROM contact_auth_outcome_notices WHERE ticket_id=?").run(ticket.id);
1935
+ this.db.prepare("DELETE FROM contact_auth_approval_notices WHERE ticket_id=?").run(ticket.id);
1936
+ }
1937
+ this.db.prepare("DELETE FROM request_context_contacts_v1 WHERE root_id=?").run(root);
1938
+ for (const ticket of tickets)
1939
+ this.db.prepare("DELETE FROM contact_auth_tickets WHERE id=?").run(ticket.id);
1940
+ }
1941
+ if (hasTable(this.db, REQUEST_CONTEXT_RETURNS_TABLE)) {
1942
+ this.requestContextReturns.closeNonDelivery(root);
1943
+ if (requestContextReturnBlockers(this.db, root).length)
1944
+ throw Error("request-context root has expected return");
1945
+ this.db.prepare(`DELETE FROM ${REQUEST_CONTEXT_RETURNS_TABLE} WHERE root_context_id=?`).run(root);
1946
+ }
1947
+ this.db.prepare(`DELETE FROM request_context_operations_v1 WHERE context_id IN (${slots})`).run(root);
1948
+ this.pruneDeliveryRows(rows, new Date().toISOString());
1949
+ // Single-parent contexts are deleted leaves first; no dependent recovery/ledger/work may remain.
1950
+ for (let left = ids.length; left > 0;) {
1951
+ const changed = this.db.prepare(`DELETE FROM request_contexts_v1 WHERE context_id IN (${slots}) AND context_id NOT IN (SELECT parent_id FROM request_contexts_v1 WHERE parent_id IS NOT NULL)`).run(root).changes;
1952
+ if (!changed)
1953
+ throw Error("request-context root has external descendant");
1954
+ left -= changed;
1955
+ }
1956
+ if (!retired())
1957
+ throw Error("request-context root retirement changed");
1958
+ return rows.length;
1959
+ })();
1960
+ }
1711
1961
  async prune(days) {
1712
1962
  const { performance } = await import("node:perf_hooks");
1713
1963
  const t0 = performance.now();
@@ -1729,6 +1979,7 @@ export class DeliveryOutbox extends EventEmitter {
1729
1979
  FROM deliveries
1730
1980
  WHERE state IN ${PRUNABLE}
1731
1981
  AND COALESCE(finished_at, updated_at) < ?
1982
+ ${hasTable(this.db, "request_context_operations_v1") ? "AND delivery_id NOT IN (SELECT delivery_id FROM request_context_operations_v1)" : ""}
1732
1983
  AND (
1733
1984
  NOT EXISTS (SELECT 1 FROM reply_obligations WHERE request_delivery_id = delivery_id AND state = 'open')
1734
1985
  )
@@ -1737,27 +1988,8 @@ export class DeliveryOutbox extends EventEmitter {
1737
1988
  `).all(cutoff);
1738
1989
  if (rows.length === 0)
1739
1990
  break;
1740
- const ids = rows.map(r => r.delivery_id);
1741
- const placeholders = ids.map(() => "?").join(",");
1742
1991
  this.db.transaction(() => {
1743
- // Record (delivery_id, source, target) so delivery_status can return
1744
- // "expired" to the row's own source/target (ownership-gated).
1745
- const insertPruned = this.db.prepare("INSERT OR IGNORE INTO pruned_ids(delivery_id, source_instance, target_instance, pruned_at) VALUES (?, ?, ?, ?)");
1746
- for (const row of rows)
1747
- insertPruned.run(row.delivery_id, row.source_instance, row.target_instance, now);
1748
- // Delete child rows first.
1749
- this.db.prepare(`DELETE FROM delivery_attempts WHERE delivery_id IN (${placeholders})`).run(...ids);
1750
- // Only closed reply_obligations (answered/expired): open ones were excluded above.
1751
- if (hasTable(this.db, "reply_obligations")) {
1752
- this.db.prepare(`
1753
- DELETE FROM reply_obligations
1754
- WHERE request_delivery_id IN (${placeholders}) AND state IN ('answered','expired')
1755
- `).run(...ids);
1756
- }
1757
- this.db.prepare(`DELETE FROM outcome_notices WHERE notice_delivery_id IN (${placeholders})`).run(...ids);
1758
- this.db.prepare(`DELETE FROM failure_notices WHERE parent_delivery_id IN (${placeholders}) OR notice_delivery_id IN (${placeholders})`).run(...ids, ...ids);
1759
- this.db.prepare(`DELETE FROM delivery_forward_edges WHERE reference_kind='delivery' AND reference_id IN (${placeholders})`).run(...ids);
1760
- this.db.prepare(`DELETE FROM deliveries WHERE delivery_id IN (${placeholders})`).run(...ids);
1992
+ this.pruneDeliveryRows(rows, now);
1761
1993
  })();
1762
1994
  total += rows.length;
1763
1995
  if (rows.length < CHUNK)