@telora/daemon 0.22.146 → 0.22.169

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 (408) hide show
  1. package/build-info.json +15 -3
  2. package/dist/audit/audit-phase.d.ts +11 -1
  3. package/dist/audit/audit-phase.d.ts.map +1 -1
  4. package/dist/audit/audit-phase.js +2 -14
  5. package/dist/audit/audit-phase.js.map +1 -1
  6. package/dist/audit/audit-prompt.d.ts +7 -4
  7. package/dist/audit/audit-prompt.d.ts.map +1 -1
  8. package/dist/audit/audit-prompt.js +34 -23
  9. package/dist/audit/audit-prompt.js.map +1 -1
  10. package/dist/backends/codex/codex-mcp-proxy.d.ts +4 -6
  11. package/dist/backends/codex/codex-mcp-proxy.d.ts.map +1 -1
  12. package/dist/backends/codex/codex-mcp-proxy.js.map +1 -1
  13. package/dist/backends/codex/mcp-preflight.d.ts +2 -2
  14. package/dist/backends/codex/mcp-preflight.d.ts.map +1 -1
  15. package/dist/backends/codex/mcp-preflight.js.map +1 -1
  16. package/dist/completion/advancement-stall-watchdog.d.ts +12 -0
  17. package/dist/completion/advancement-stall-watchdog.d.ts.map +1 -0
  18. package/dist/completion/advancement-stall-watchdog.js +79 -0
  19. package/dist/completion/advancement-stall-watchdog.js.map +1 -0
  20. package/dist/completion/arm-visible-progress-inputs.d.ts +51 -0
  21. package/dist/completion/arm-visible-progress-inputs.d.ts.map +1 -0
  22. package/dist/completion/arm-visible-progress-inputs.js +19 -0
  23. package/dist/completion/arm-visible-progress-inputs.js.map +1 -0
  24. package/dist/completion/completion-phase-registry.d.ts +1 -0
  25. package/dist/completion/completion-phase-registry.d.ts.map +1 -1
  26. package/dist/completion/completion-phase-registry.js +7 -5
  27. package/dist/completion/completion-phase-registry.js.map +1 -1
  28. package/dist/completion/delivery-advancement-guard.d.ts.map +1 -1
  29. package/dist/completion/delivery-advancement-guard.js +1 -0
  30. package/dist/completion/delivery-advancement-guard.js.map +1 -1
  31. package/dist/completion/escalation-provenance.d.ts.map +1 -1
  32. package/dist/completion/escalation-provenance.js +5 -2
  33. package/dist/completion/escalation-provenance.js.map +1 -1
  34. package/dist/completion/event-entry-phases.d.ts.map +1 -1
  35. package/dist/completion/event-entry-phases.js +9 -2
  36. package/dist/completion/event-entry-phases.js.map +1 -1
  37. package/dist/completion/event-phases.d.ts +15 -8
  38. package/dist/completion/event-phases.d.ts.map +1 -1
  39. package/dist/completion/event-phases.js +26 -64
  40. package/dist/completion/event-phases.js.map +1 -1
  41. package/dist/completion/event.d.ts.map +1 -1
  42. package/dist/completion/event.js +7 -1
  43. package/dist/completion/event.js.map +1 -1
  44. package/dist/completion/exit-classification.d.ts +1 -1
  45. package/dist/completion/exit-classification.d.ts.map +1 -1
  46. package/dist/completion/exit-classification.js +7 -1
  47. package/dist/completion/exit-classification.js.map +1 -1
  48. package/dist/completion/review-cycle-cap.d.ts +81 -35
  49. package/dist/completion/review-cycle-cap.d.ts.map +1 -1
  50. package/dist/completion/review-cycle-cap.js +60 -132
  51. package/dist/completion/review-cycle-cap.js.map +1 -1
  52. package/dist/completion/review-exit-deps.d.ts +3 -1
  53. package/dist/completion/review-exit-deps.d.ts.map +1 -1
  54. package/dist/completion/review-exit-deps.js +3 -1
  55. package/dist/completion/review-exit-deps.js.map +1 -1
  56. package/dist/completion/review-exit-phase.d.ts.map +1 -1
  57. package/dist/completion/review-exit-phase.js +5 -4
  58. package/dist/completion/review-exit-phase.js.map +1 -1
  59. package/dist/completion/shutdown-attribution.d.ts +107 -0
  60. package/dist/completion/shutdown-attribution.d.ts.map +1 -0
  61. package/dist/completion/shutdown-attribution.js +106 -0
  62. package/dist/completion/shutdown-attribution.js.map +1 -0
  63. package/dist/completion/state-cascade.d.ts.map +1 -1
  64. package/dist/completion/state-cascade.js +3 -7
  65. package/dist/completion/state-cascade.js.map +1 -1
  66. package/dist/completion/team-lifecycle.d.ts.map +1 -1
  67. package/dist/completion/team-lifecycle.js +16 -0
  68. package/dist/completion/team-lifecycle.js.map +1 -1
  69. package/dist/delivery/delivery-lifecycle.d.ts.map +1 -1
  70. package/dist/delivery/delivery-lifecycle.js +1 -0
  71. package/dist/delivery/delivery-lifecycle.js.map +1 -1
  72. package/dist/directive/directive-assembly.d.ts +19 -1
  73. package/dist/directive/directive-assembly.d.ts.map +1 -1
  74. package/dist/directive/directive-assembly.js +15 -3
  75. package/dist/directive/directive-assembly.js.map +1 -1
  76. package/dist/directive/directive-dispatch.d.ts +67 -2
  77. package/dist/directive/directive-dispatch.d.ts.map +1 -1
  78. package/dist/directive/directive-dispatch.js +188 -45
  79. package/dist/directive/directive-dispatch.js.map +1 -1
  80. package/dist/directive/directive-executor.d.ts +2 -2
  81. package/dist/directive/directive-executor.d.ts.map +1 -1
  82. package/dist/directive/directive-executor.js +49 -12
  83. package/dist/directive/directive-executor.js.map +1 -1
  84. package/dist/directive/directive-queue.d.ts.map +1 -1
  85. package/dist/directive/directive-queue.js +1 -0
  86. package/dist/directive/directive-queue.js.map +1 -1
  87. package/dist/directive/stage-tracker.d.ts +20 -0
  88. package/dist/directive/stage-tracker.d.ts.map +1 -1
  89. package/dist/directive/stage-tracker.js +29 -1
  90. package/dist/directive/stage-tracker.js.map +1 -1
  91. package/dist/focus/focus-engine.d.ts +16 -0
  92. package/dist/focus/focus-engine.d.ts.map +1 -1
  93. package/dist/focus/focus-engine.js +42 -18
  94. package/dist/focus/focus-engine.js.map +1 -1
  95. package/dist/focus/focus-executor.d.ts.map +1 -1
  96. package/dist/focus/focus-executor.js +21 -3
  97. package/dist/focus/focus-executor.js.map +1 -1
  98. package/dist/focus/focus-phase.d.ts +11 -1
  99. package/dist/focus/focus-phase.d.ts.map +1 -1
  100. package/dist/focus/focus-phase.js +12 -2
  101. package/dist/focus/focus-phase.js.map +1 -1
  102. package/dist/focus/focus-spawn-decision.d.ts +5 -3
  103. package/dist/focus/focus-spawn-decision.d.ts.map +1 -1
  104. package/dist/focus/focus-spawn-decision.js.map +1 -1
  105. package/dist/focus/focus-team-state.js +1 -1
  106. package/dist/focus/listener-auto-advance.d.ts.map +1 -1
  107. package/dist/focus/listener-auto-advance.js +1 -0
  108. package/dist/focus/listener-auto-advance.js.map +1 -1
  109. package/dist/focus/listener-spawn.d.ts.map +1 -1
  110. package/dist/focus/listener-spawn.js +37 -13
  111. package/dist/focus/listener-spawn.js.map +1 -1
  112. package/dist/focus/listener.d.ts +15 -0
  113. package/dist/focus/listener.d.ts.map +1 -1
  114. package/dist/focus/listener.js +79 -17
  115. package/dist/focus/listener.js.map +1 -1
  116. package/dist/focus/live-arm-facts.d.ts +10 -0
  117. package/dist/focus/live-arm-facts.d.ts.map +1 -0
  118. package/dist/focus/live-arm-facts.js +47 -0
  119. package/dist/focus/live-arm-facts.js.map +1 -0
  120. package/dist/focus/recorded-new-intent.d.ts +81 -0
  121. package/dist/focus/recorded-new-intent.d.ts.map +1 -0
  122. package/dist/focus/recorded-new-intent.js +147 -0
  123. package/dist/focus/recorded-new-intent.js.map +1 -0
  124. package/dist/focus/review-cycle-cap-hold.d.ts +15 -94
  125. package/dist/focus/review-cycle-cap-hold.d.ts.map +1 -1
  126. package/dist/focus/review-cycle-cap-hold.js +54 -112
  127. package/dist/focus/review-cycle-cap-hold.js.map +1 -1
  128. package/dist/focus/session-health.d.ts +22 -1
  129. package/dist/focus/session-health.d.ts.map +1 -1
  130. package/dist/focus/session-health.js +28 -3
  131. package/dist/focus/session-health.js.map +1 -1
  132. package/dist/focus/session-process-reap.d.ts +3 -1
  133. package/dist/focus/session-process-reap.d.ts.map +1 -1
  134. package/dist/focus/session-process-reap.js +20 -0
  135. package/dist/focus/session-process-reap.js.map +1 -1
  136. package/dist/focus/stage-watermark-seeding.d.ts +39 -0
  137. package/dist/focus/stage-watermark-seeding.d.ts.map +1 -0
  138. package/dist/focus/stage-watermark-seeding.js +60 -0
  139. package/dist/focus/stage-watermark-seeding.js.map +1 -0
  140. package/dist/focus-stage-lifecycle/index.d.ts.map +1 -1
  141. package/dist/focus-stage-lifecycle/index.js +1 -0
  142. package/dist/focus-stage-lifecycle/index.js.map +1 -1
  143. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +29 -1
  144. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
  145. package/dist/focus-stage-lifecycle/wedge-watchdog.js +46 -6
  146. package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
  147. package/dist/git/focus-integration-sync.d.ts +42 -3
  148. package/dist/git/focus-integration-sync.d.ts.map +1 -1
  149. package/dist/git/focus-integration-sync.js +38 -2
  150. package/dist/git/focus-integration-sync.js.map +1 -1
  151. package/dist/merge/abandoned-merge-recovery.d.ts.map +1 -1
  152. package/dist/merge/abandoned-merge-recovery.js +10 -0
  153. package/dist/merge/abandoned-merge-recovery.js.map +1 -1
  154. package/dist/merge/merge-back-loop.d.ts +1 -0
  155. package/dist/merge/merge-back-loop.d.ts.map +1 -1
  156. package/dist/merge/merge-back-loop.js +3 -3
  157. package/dist/merge/merge-back-loop.js.map +1 -1
  158. package/dist/prompt/focus-prompt-builder.d.ts +2 -1
  159. package/dist/prompt/focus-prompt-builder.d.ts.map +1 -1
  160. package/dist/prompt/focus-prompt-builder.js +10 -1
  161. package/dist/prompt/focus-prompt-builder.js.map +1 -1
  162. package/dist/prompt/team-prompt-base.d.ts +2 -1
  163. package/dist/prompt/team-prompt-base.d.ts.map +1 -1
  164. package/dist/prompt/team-prompt-base.js +8 -20
  165. package/dist/prompt/team-prompt-base.js.map +1 -1
  166. package/dist/prompt-sections/execution-sections.d.ts +22 -1
  167. package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
  168. package/dist/prompt-sections/execution-sections.js +23 -2
  169. package/dist/prompt-sections/execution-sections.js.map +1 -1
  170. package/dist/prompt-sections/integration-reconcile-section.d.ts +45 -0
  171. package/dist/prompt-sections/integration-reconcile-section.d.ts.map +1 -0
  172. package/dist/prompt-sections/integration-reconcile-section.js +69 -0
  173. package/dist/prompt-sections/integration-reconcile-section.js.map +1 -0
  174. package/dist/prompt-sections/persona-sections.d.ts +0 -20
  175. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  176. package/dist/prompt-sections/persona-sections.js +4 -49
  177. package/dist/prompt-sections/persona-sections.js.map +1 -1
  178. package/dist/prompt-sections/shared.d.ts +9 -0
  179. package/dist/prompt-sections/shared.d.ts.map +1 -1
  180. package/dist/prompt-sections/shared.js +2 -1
  181. package/dist/prompt-sections/shared.js.map +1 -1
  182. package/dist/prompt-sections/testing-standard.d.ts +51 -0
  183. package/dist/prompt-sections/testing-standard.d.ts.map +1 -0
  184. package/dist/prompt-sections/testing-standard.js +132 -0
  185. package/dist/prompt-sections/testing-standard.js.map +1 -0
  186. package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -1
  187. package/dist/queries/agent-resolvable-promotion.js +7 -5
  188. package/dist/queries/agent-resolvable-promotion.js.map +1 -1
  189. package/dist/queries/arm-covered-targets.d.ts +84 -0
  190. package/dist/queries/arm-covered-targets.d.ts.map +1 -0
  191. package/dist/queries/arm-covered-targets.js +129 -0
  192. package/dist/queries/arm-covered-targets.js.map +1 -0
  193. package/dist/queries/deliveries.d.ts +3 -0
  194. package/dist/queries/deliveries.d.ts.map +1 -1
  195. package/dist/queries/deliveries.js +10 -3
  196. package/dist/queries/deliveries.js.map +1 -1
  197. package/dist/queries/delivery-gate-state.d.ts +10 -0
  198. package/dist/queries/delivery-gate-state.d.ts.map +1 -1
  199. package/dist/queries/delivery-gate-state.js +1 -1
  200. package/dist/queries/delivery-gate-state.js.map +1 -1
  201. package/dist/queries/delivery-write-discipline.d.ts.map +1 -1
  202. package/dist/queries/delivery-write-discipline.js +2 -1
  203. package/dist/queries/delivery-write-discipline.js.map +1 -1
  204. package/dist/queries/directive-undelivered.d.ts +104 -0
  205. package/dist/queries/directive-undelivered.d.ts.map +1 -0
  206. package/dist/queries/directive-undelivered.js +162 -0
  207. package/dist/queries/directive-undelivered.js.map +1 -0
  208. package/dist/queries/ended-arm.d.ts +47 -0
  209. package/dist/queries/ended-arm.d.ts.map +1 -0
  210. package/dist/queries/ended-arm.js +35 -0
  211. package/dist/queries/ended-arm.js.map +1 -0
  212. package/dist/queries/escalation-consumption.d.ts.map +1 -1
  213. package/dist/queries/escalation-consumption.js +0 -1
  214. package/dist/queries/escalation-consumption.js.map +1 -1
  215. package/dist/queries/focus-discovery.d.ts +30 -0
  216. package/dist/queries/focus-discovery.d.ts.map +1 -1
  217. package/dist/queries/focus-discovery.js +4 -0
  218. package/dist/queries/focus-discovery.js.map +1 -1
  219. package/dist/queries/focus-integration-conflict.d.ts +78 -0
  220. package/dist/queries/focus-integration-conflict.d.ts.map +1 -0
  221. package/dist/queries/focus-integration-conflict.js +136 -0
  222. package/dist/queries/focus-integration-conflict.js.map +1 -0
  223. package/dist/queries/focuses.d.ts +6 -3
  224. package/dist/queries/focuses.d.ts.map +1 -1
  225. package/dist/queries/focuses.js +14 -5
  226. package/dist/queries/focuses.js.map +1 -1
  227. package/dist/queries/incident-correlation.d.ts +1 -2
  228. package/dist/queries/incident-correlation.d.ts.map +1 -1
  229. package/dist/queries/incident-correlation.js +1 -3
  230. package/dist/queries/incident-correlation.js.map +1 -1
  231. package/dist/queries/issues.d.ts.map +1 -1
  232. package/dist/queries/issues.js +1 -0
  233. package/dist/queries/issues.js.map +1 -1
  234. package/dist/queries/local-models.js +1 -1
  235. package/dist/queries/local-models.js.map +1 -1
  236. package/dist/queries/recorded-targets-record.d.ts +46 -0
  237. package/dist/queries/recorded-targets-record.d.ts.map +1 -0
  238. package/dist/queries/recorded-targets-record.js +29 -0
  239. package/dist/queries/recorded-targets-record.js.map +1 -0
  240. package/dist/queries/schemas-local-model.d.ts +47 -0
  241. package/dist/queries/schemas-local-model.d.ts.map +1 -0
  242. package/dist/queries/schemas-local-model.js +57 -0
  243. package/dist/queries/schemas-local-model.js.map +1 -0
  244. package/dist/queries/schemas.d.ts +14 -32
  245. package/dist/queries/schemas.d.ts.map +1 -1
  246. package/dist/queries/schemas.js +24 -41
  247. package/dist/queries/schemas.js.map +1 -1
  248. package/dist/queries/sessions.d.ts +120 -12
  249. package/dist/queries/sessions.d.ts.map +1 -1
  250. package/dist/queries/sessions.js +104 -11
  251. package/dist/queries/sessions.js.map +1 -1
  252. package/dist/queries/shared.d.ts +1 -0
  253. package/dist/queries/shared.d.ts.map +1 -1
  254. package/dist/queries/shared.js +1 -1
  255. package/dist/queries/shared.js.map +1 -1
  256. package/dist/queries/system-session.d.ts.map +1 -1
  257. package/dist/queries/system-session.js +3 -1
  258. package/dist/queries/system-session.js.map +1 -1
  259. package/dist/queries/verification.js +1 -1
  260. package/dist/queries/workflows.d.ts.map +1 -1
  261. package/dist/queries/workflows.js +1 -0
  262. package/dist/queries/workflows.js.map +1 -1
  263. package/dist/resolvers/assembly-engine.d.ts +33 -1
  264. package/dist/resolvers/assembly-engine.d.ts.map +1 -1
  265. package/dist/resolvers/assembly-engine.js +74 -23
  266. package/dist/resolvers/assembly-engine.js.map +1 -1
  267. package/dist/resolvers/compose/loop-delivery-index-compose.d.ts +23 -3
  268. package/dist/resolvers/compose/loop-delivery-index-compose.d.ts.map +1 -1
  269. package/dist/resolvers/compose/loop-delivery-index-compose.js +90 -43
  270. package/dist/resolvers/compose/loop-delivery-index-compose.js.map +1 -1
  271. package/dist/resolvers/delivery-listing.d.ts +27 -0
  272. package/dist/resolvers/delivery-listing.d.ts.map +1 -1
  273. package/dist/resolvers/delivery-listing.js +52 -36
  274. package/dist/resolvers/delivery-listing.js.map +1 -1
  275. package/dist/resolvers/loop-delivery-index.d.ts +8 -0
  276. package/dist/resolvers/loop-delivery-index.d.ts.map +1 -1
  277. package/dist/resolvers/loop-delivery-index.js +68 -7
  278. package/dist/resolvers/loop-delivery-index.js.map +1 -1
  279. package/dist/resolvers/shared/loop.d.ts +7 -0
  280. package/dist/resolvers/shared/loop.d.ts.map +1 -1
  281. package/dist/resolvers/shared/loop.js.map +1 -1
  282. package/dist/resolvers/wiki-topic.d.ts +6 -5
  283. package/dist/resolvers/wiki-topic.d.ts.map +1 -1
  284. package/dist/resolvers/wiki-topic.js +43 -27
  285. package/dist/resolvers/wiki-topic.js.map +1 -1
  286. package/dist/session/session-lineage.d.ts.map +1 -1
  287. package/dist/session/session-lineage.js +1 -0
  288. package/dist/session/session-lineage.js.map +1 -1
  289. package/dist/shell/crash-recovery.d.ts +4 -2
  290. package/dist/shell/crash-recovery.d.ts.map +1 -1
  291. package/dist/shell/crash-recovery.js +15 -14
  292. package/dist/shell/crash-recovery.js.map +1 -1
  293. package/dist/shell/daemon-instance.d.ts +176 -0
  294. package/dist/shell/daemon-instance.d.ts.map +1 -0
  295. package/dist/shell/daemon-instance.js +281 -0
  296. package/dist/shell/daemon-instance.js.map +1 -0
  297. package/dist/shell/graceful-shutdown.d.ts +12 -1
  298. package/dist/shell/graceful-shutdown.d.ts.map +1 -1
  299. package/dist/shell/graceful-shutdown.js +7 -4
  300. package/dist/shell/graceful-shutdown.js.map +1 -1
  301. package/dist/shell/shutdown-ownership.d.ts +34 -0
  302. package/dist/shell/shutdown-ownership.d.ts.map +1 -0
  303. package/dist/shell/shutdown-ownership.js +51 -0
  304. package/dist/shell/shutdown-ownership.js.map +1 -0
  305. package/dist/shell/unified-shell.d.ts.map +1 -1
  306. package/dist/shell/unified-shell.js +12 -5
  307. package/dist/shell/unified-shell.js.map +1 -1
  308. package/dist/shell/worker-pidfile.d.ts +127 -11
  309. package/dist/shell/worker-pidfile.d.ts.map +1 -1
  310. package/dist/shell/worker-pidfile.js +349 -58
  311. package/dist/shell/worker-pidfile.js.map +1 -1
  312. package/dist/spawn/helpers.d.ts.map +1 -1
  313. package/dist/spawn/helpers.js +4 -2
  314. package/dist/spawn/helpers.js.map +1 -1
  315. package/dist/spawn/lead-continuation.d.ts.map +1 -1
  316. package/dist/spawn/lead-continuation.js +8 -2
  317. package/dist/spawn/lead-continuation.js.map +1 -1
  318. package/dist/spawn/lead-launch.d.ts +17 -1
  319. package/dist/spawn/lead-launch.d.ts.map +1 -1
  320. package/dist/spawn/lead-launch.js +56 -7
  321. package/dist/spawn/lead-launch.js.map +1 -1
  322. package/dist/spawn/lead-process-ownership.d.ts +5 -4
  323. package/dist/spawn/lead-process-ownership.d.ts.map +1 -1
  324. package/dist/spawn/lead-process-ownership.js +7 -4
  325. package/dist/spawn/lead-process-ownership.js.map +1 -1
  326. package/dist/spawn/lead-send.d.ts +97 -0
  327. package/dist/spawn/lead-send.d.ts.map +1 -0
  328. package/dist/spawn/lead-send.js +80 -0
  329. package/dist/spawn/lead-send.js.map +1 -0
  330. package/dist/spawn/lifecycle.d.ts +0 -12
  331. package/dist/spawn/lifecycle.d.ts.map +1 -1
  332. package/dist/spawn/lifecycle.js +76 -19
  333. package/dist/spawn/lifecycle.js.map +1 -1
  334. package/dist/spawn/liveness.d.ts.map +1 -1
  335. package/dist/spawn/liveness.js +3 -1
  336. package/dist/spawn/liveness.js.map +1 -1
  337. package/dist/spawn/one-shot-process-ownership.d.ts +46 -2
  338. package/dist/spawn/one-shot-process-ownership.d.ts.map +1 -1
  339. package/dist/spawn/one-shot-process-ownership.js +78 -3
  340. package/dist/spawn/one-shot-process-ownership.js.map +1 -1
  341. package/dist/spawn/process-group-kill.d.ts.map +1 -1
  342. package/dist/spawn/process-group-kill.js +15 -2
  343. package/dist/spawn/process-group-kill.js.map +1 -1
  344. package/dist/spawn/process-spawn.d.ts +5 -15
  345. package/dist/spawn/process-spawn.d.ts.map +1 -1
  346. package/dist/spawn/process-spawn.js +8 -1
  347. package/dist/spawn/process-spawn.js.map +1 -1
  348. package/dist/spawn/prompt-assembly.d.ts +35 -2
  349. package/dist/spawn/prompt-assembly.d.ts.map +1 -1
  350. package/dist/spawn/prompt-assembly.js +67 -44
  351. package/dist/spawn/prompt-assembly.js.map +1 -1
  352. package/dist/spawn/spawn-decision.d.ts +25 -1
  353. package/dist/spawn/spawn-decision.d.ts.map +1 -1
  354. package/dist/spawn/spawn-decision.js +19 -3
  355. package/dist/spawn/spawn-decision.js.map +1 -1
  356. package/dist/spawn/worktree-session.d.ts +49 -2
  357. package/dist/spawn/worktree-session.d.ts.map +1 -1
  358. package/dist/spawn/worktree-session.js +59 -5
  359. package/dist/spawn/worktree-session.js.map +1 -1
  360. package/dist/testing/fixtures/conflicting-repo.d.ts +30 -0
  361. package/dist/testing/fixtures/conflicting-repo.d.ts.map +1 -0
  362. package/dist/testing/fixtures/conflicting-repo.js +89 -0
  363. package/dist/testing/fixtures/conflicting-repo.js.map +1 -0
  364. package/dist/testing/fixtures/index.d.ts.map +1 -1
  365. package/dist/testing/fixtures/index.js +2 -1
  366. package/dist/testing/fixtures/index.js.map +1 -1
  367. package/dist/testing/fixtures/pending-spawn-world.js +2 -2
  368. package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
  369. package/dist/types/exit-category.d.ts +59 -0
  370. package/dist/types/exit-category.d.ts.map +1 -0
  371. package/dist/types/exit-category.js +133 -0
  372. package/dist/types/exit-category.js.map +1 -0
  373. package/dist/types/focus.d.ts +19 -0
  374. package/dist/types/focus.d.ts.map +1 -1
  375. package/dist/types/index.js +1 -1
  376. package/dist/types/session.d.ts +5 -1
  377. package/dist/types/session.d.ts.map +1 -1
  378. package/dist/types/session.js +1 -1
  379. package/dist/types/session.js.map +1 -1
  380. package/dist/verify/injection-stamp.d.ts +30 -0
  381. package/dist/verify/injection-stamp.d.ts.map +1 -1
  382. package/dist/verify/injection-stamp.js +37 -1
  383. package/dist/verify/injection-stamp.js.map +1 -1
  384. package/dist/verify/recorded-targets.d.ts +103 -0
  385. package/dist/verify/recorded-targets.d.ts.map +1 -0
  386. package/dist/verify/recorded-targets.js +159 -0
  387. package/dist/verify/recorded-targets.js.map +1 -0
  388. package/dist/verify/stall-detector-config.d.ts +5 -1
  389. package/dist/verify/stall-detector-config.d.ts.map +1 -1
  390. package/dist/verify/stall-detector-config.js +5 -1
  391. package/dist/verify/stall-detector-config.js.map +1 -1
  392. package/dist/verify/verification-deps-default.d.ts.map +1 -1
  393. package/dist/verify/verification-deps-default.js +15 -2
  394. package/dist/verify/verification-deps-default.js.map +1 -1
  395. package/dist/verify/verification-deps.d.ts +17 -1
  396. package/dist/verify/verification-deps.d.ts.map +1 -1
  397. package/dist/verify/verification-engine.d.ts.map +1 -1
  398. package/dist/verify/verification-engine.js +51 -47
  399. package/dist/verify/verification-engine.js.map +1 -1
  400. package/dist/verify/verify-restatement.d.ts +27 -33
  401. package/dist/verify/verify-restatement.d.ts.map +1 -1
  402. package/dist/verify/verify-restatement.js +74 -1
  403. package/dist/verify/verify-restatement.js.map +1 -1
  404. package/dist/worktree/state.d.ts +75 -1
  405. package/dist/worktree/state.d.ts.map +1 -1
  406. package/dist/worktree/state.js +89 -17
  407. package/dist/worktree/state.js.map +1 -1
  408. package/package.json +3 -3
@@ -0,0 +1,59 @@
1
+ /**
2
+ * GENERATED FILE -- DO NOT EDIT.
3
+ *
4
+ * Deno edge-function copy of src/lib/vocabulary/exit-category.ts, produced by
5
+ * `npm run gen:shared-mirrors`. The canonical source is the ONLY hand-edited
6
+ * copy of this algorithm; edit it there and regenerate. The drift gate
7
+ * (`npm run lint:shared-mirrors`) fails CI when this file differs from what
8
+ * generation would produce, so the same algorithm runs in both runtimes.
9
+ *
10
+ * @module types/exit-category
11
+ */
12
+ /**
13
+ * Every exit category the system writes to `agent_sessions.exit_category`.
14
+ *
15
+ * The column is unconstrained TEXT, so this list is the ONLY thing that says
16
+ * what the vocabulary is. It used to be said three times -- a daemon union, a
17
+ * hand-retyped frontend union, and a third copy inside the dashboard's
18
+ * exhaustiveness test -- with no list derived from another. The consequences
19
+ * were exactly what three hand-copied lists produce: four categories the daemon
20
+ * wrote were absent from its own union (they compiled because the write field
21
+ * was `string`), one category in the union reached neither the frontend nor the
22
+ * disposition table, and the gate whose stated job was to catch that drift was
23
+ * checking the third copy rather than the union.
24
+ *
25
+ * Runtime members, not just a type, because both consumers need to ENUMERATE
26
+ * the vocabulary: the daemon to validate what it writes, the dashboard to prove
27
+ * every member has a declared toast disposition -- and for
28
+ * `npm run lint:exit-category-writers` to prove every member has a WRITER.
29
+ *
30
+ * Removed for having no writer: `local_model_key_unset`, and `timeout` (the
31
+ * daemon carries a `sessionTimeoutMs` config knob, but nothing closes a session
32
+ * with that category; if wall-clock enforcement is built, add the category back
33
+ * WITH its writer).
34
+ */
35
+ export declare const EXIT_CATEGORIES: readonly ["error", "recovery_cleanup", "backend_unavailable", "sandbox_unavailable", "local_model_swap_failed", "mcp_tools_undelivered", "mcp_preflight_failed", "shutdown_timeout", "health_reap", "governor_denied", "internal", "local_model_swap_deferred", "user_stopped", "deactivated", "handoff", "teardown", "no_actionable_work", "work_complete", "segment_complete"];
36
+ /** An exit category: a member of the declared vocabulary. */
37
+ export type ExitCategory = (typeof EXIT_CATEGORIES)[number];
38
+ /**
39
+ * True when a string is a declared exit category. The guard a reader uses to
40
+ * narrow the unconstrained TEXT column into the vocabulary; a row written by an
41
+ * older daemon can legitimately carry something outside it, so callers decide
42
+ * what to do with a non-member rather than being handed one typed as if valid.
43
+ */
44
+ export declare function isExitCategory(value: string | null | undefined): value is ExitCategory;
45
+ /**
46
+ * Session statuses that CLOSE a session. A write that moves a session into one
47
+ * of these is a close, and a close is the write that must carry a category:
48
+ * without one the dashboard has nothing to decide from and falls back to
49
+ * matching English prose in `exit_reason`.
50
+ *
51
+ * `cancelled` is a frontend-initiated manual cancel, not a daemon close, and is
52
+ * excluded for that reason.
53
+ */
54
+ export declare const TERMINAL_SESSION_STATUSES: readonly ["completed", "failed", "stopped", "escalated"];
55
+ /** A session status that closes the session. */
56
+ export type TerminalSessionStatus = (typeof TERMINAL_SESSION_STATUSES)[number];
57
+ /** True when a status closes the session (and therefore requires a category). */
58
+ export declare function isTerminalSessionStatus(value: string): value is TerminalSessionStatus;
59
+ //# sourceMappingURL=exit-category.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit-category.d.ts","sourceRoot":"","sources":["../../src/types/exit-category.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,eAAe,kXA2ElB,CAAC;AAEX,6DAA6D;AAC7D,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAI5D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,YAAY,CAEtF;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,0DAA2D,CAAC;AAElG,gDAAgD;AAChD,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI/E,iFAAiF;AACjF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,qBAAqB,CAErF"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * GENERATED FILE -- DO NOT EDIT.
3
+ *
4
+ * Deno edge-function copy of src/lib/vocabulary/exit-category.ts, produced by
5
+ * `npm run gen:shared-mirrors`. The canonical source is the ONLY hand-edited
6
+ * copy of this algorithm; edit it there and regenerate. The drift gate
7
+ * (`npm run lint:shared-mirrors`) fails CI when this file differs from what
8
+ * generation would produce, so the same algorithm runs in both runtimes.
9
+ *
10
+ * @module types/exit-category
11
+ */
12
+ /**
13
+ * Every exit category the system writes to `agent_sessions.exit_category`.
14
+ *
15
+ * The column is unconstrained TEXT, so this list is the ONLY thing that says
16
+ * what the vocabulary is. It used to be said three times -- a daemon union, a
17
+ * hand-retyped frontend union, and a third copy inside the dashboard's
18
+ * exhaustiveness test -- with no list derived from another. The consequences
19
+ * were exactly what three hand-copied lists produce: four categories the daemon
20
+ * wrote were absent from its own union (they compiled because the write field
21
+ * was `string`), one category in the union reached neither the frontend nor the
22
+ * disposition table, and the gate whose stated job was to catch that drift was
23
+ * checking the third copy rather than the union.
24
+ *
25
+ * Runtime members, not just a type, because both consumers need to ENUMERATE
26
+ * the vocabulary: the daemon to validate what it writes, the dashboard to prove
27
+ * every member has a declared toast disposition -- and for
28
+ * `npm run lint:exit-category-writers` to prove every member has a WRITER.
29
+ *
30
+ * Removed for having no writer: `local_model_key_unset`, and `timeout` (the
31
+ * daemon carries a `sessionTimeoutMs` config knob, but nothing closes a session
32
+ * with that category; if wall-clock enforcement is built, add the category back
33
+ * WITH its writer).
34
+ */
35
+ export const EXIT_CATEGORIES = [
36
+ // --- Genuine failures (status: failed) ---
37
+ /** Non-zero exit / crash while not shutting down. */
38
+ 'error',
39
+ /** Session was active when the daemon restarted; crash recovery closed it. */
40
+ 'recovery_cleanup',
41
+ /** The backend CLI is missing on the daemon host. */
42
+ 'backend_unavailable',
43
+ /** The sandbox the backend needs is unavailable on the daemon host. */
44
+ 'sandbox_unavailable',
45
+ /** A host-control local-model swap failed, so the spawn was abandoned. */
46
+ 'local_model_swap_failed',
47
+ /**
48
+ * A local-model pass ran without its Telora control surface: required tools
49
+ * were never delivered to the model. Failed durably rather than re-spawned
50
+ * into the same tool-less loop.
51
+ */
52
+ 'mcp_tools_undelivered',
53
+ /**
54
+ * The read-only MCP preflight refused the spawn: the required Telora control
55
+ * tools were not callable on the configured host. Distinct from
56
+ * backend_unavailable (the CLI itself is present).
57
+ */
58
+ 'mcp_preflight_failed',
59
+ // --- Daemon housekeeping closes (status: failed, but not the team's fault) ---
60
+ /**
61
+ * The daemon was shutting down and this team did not exit within the timeout,
62
+ * so the daemon force-closed its session. The status stays `failed` because
63
+ * the team genuinely did not exit cleanly, but the CONDITION is a controlled
64
+ * daemon stop and is announced as one -- never as an operator-facing error.
65
+ */
66
+ 'shutdown_timeout',
67
+ /**
68
+ * The session-health sweep closed a row whose process no live team owned (the
69
+ * per-kind diagnosis -- orphaned team, untracked process, silent-abandoned,
70
+ * system straggler -- stays in exit_reason). Housekeeping, not a condition an
71
+ * operator acts on.
72
+ */
73
+ 'health_reap',
74
+ /** Resource governor refused the slot; the spawn never ran. */
75
+ 'governor_denied',
76
+ /** Daemon-internal bookkeeping close. */
77
+ 'internal',
78
+ /**
79
+ * A host-control model load is running off the poll loop, or the host is held
80
+ * by another focus. Benign and transient: a later tick spawns.
81
+ */
82
+ 'local_model_swap_deferred',
83
+ // --- Controlled lifecycle stops (status: stopped) ---
84
+ /** The operator stopped the team via control state. */
85
+ 'user_stopped',
86
+ /** The focus's agent role was unassigned; the team shut down. */
87
+ 'deactivated',
88
+ /** The daemon stopped the team in order to respawn a fresh one. */
89
+ 'handoff',
90
+ /** The focus was deactivated and its worktree torn down. */
91
+ 'teardown',
92
+ /**
93
+ * The team had nothing actionable while a hold kept a delivery non-terminal;
94
+ * a respawn is coming.
95
+ */
96
+ 'no_actionable_work',
97
+ // --- Completion (status: completed) ---
98
+ /** The daemon stopped the team because all of its work was done. */
99
+ 'work_complete',
100
+ /**
101
+ * A team segment exited cleanly but its PASS continues -- the daemon respawns
102
+ * the same lineage. Deliberately NOT pass-ending: a readiness claim here would
103
+ * be false. This is what used to be written as a NULL category, which is how a
104
+ * close with no category stayed expressible at all.
105
+ */
106
+ 'segment_complete',
107
+ ];
108
+ const EXIT_CATEGORY_SET = new Set(EXIT_CATEGORIES);
109
+ /**
110
+ * True when a string is a declared exit category. The guard a reader uses to
111
+ * narrow the unconstrained TEXT column into the vocabulary; a row written by an
112
+ * older daemon can legitimately carry something outside it, so callers decide
113
+ * what to do with a non-member rather than being handed one typed as if valid.
114
+ */
115
+ export function isExitCategory(value) {
116
+ return typeof value === 'string' && EXIT_CATEGORY_SET.has(value);
117
+ }
118
+ /**
119
+ * Session statuses that CLOSE a session. A write that moves a session into one
120
+ * of these is a close, and a close is the write that must carry a category:
121
+ * without one the dashboard has nothing to decide from and falls back to
122
+ * matching English prose in `exit_reason`.
123
+ *
124
+ * `cancelled` is a frontend-initiated manual cancel, not a daemon close, and is
125
+ * excluded for that reason.
126
+ */
127
+ export const TERMINAL_SESSION_STATUSES = ['completed', 'failed', 'stopped', 'escalated'];
128
+ const TERMINAL_STATUS_SET = new Set(TERMINAL_SESSION_STATUSES);
129
+ /** True when a status closes the session (and therefore requires a category). */
130
+ export function isTerminalSessionStatus(value) {
131
+ return TERMINAL_STATUS_SET.has(value);
132
+ }
133
+ //# sourceMappingURL=exit-category.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit-category.js","sourceRoot":"","sources":["../../src/types/exit-category.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,4CAA4C;IAC5C,qDAAqD;IACrD,OAAO;IACP,8EAA8E;IAC9E,kBAAkB;IAClB,qDAAqD;IACrD,qBAAqB;IACrB,uEAAuE;IACvE,qBAAqB;IACrB,0EAA0E;IAC1E,yBAAyB;IACzB;;;;OAIG;IACH,uBAAuB;IACvB;;;;OAIG;IACH,sBAAsB;IAEtB,gFAAgF;IAChF;;;;;OAKG;IACH,kBAAkB;IAClB;;;;;OAKG;IACH,aAAa;IACb,+DAA+D;IAC/D,iBAAiB;IACjB,yCAAyC;IACzC,UAAU;IACV;;;OAGG;IACH,2BAA2B;IAE3B,uDAAuD;IACvD,uDAAuD;IACvD,cAAc;IACd,iEAAiE;IACjE,aAAa;IACb,mEAAmE;IACnE,SAAS;IACT,4DAA4D;IAC5D,UAAU;IACV;;;OAGG;IACH,oBAAoB;IAEpB,yCAAyC;IACzC,oEAAoE;IACpE,eAAe;IACf;;;;;OAKG;IACH,kBAAkB;CACV,CAAC;AAKX,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC;AAExE;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAgC;IAC7D,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAU,CAAC;AAKlG,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC,yBAAyB,CAAC,CAAC;AAEpF,iFAAiF;AACjF,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACnD,OAAO,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC"}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { z } from 'zod';
5
5
  import type { Writable } from 'node:stream';
6
+ import type { ShutdownAttribution } from '../completion/shutdown-attribution.js';
6
7
  import type { CompletionDetector } from '../completion/index.js';
7
8
  import type { CodexMcpProxyHandle } from '../backends/codex/codex-mcp-proxy.js';
8
9
  import { FocusDeliveryShape, FocusIssueShape } from '../queries/schemas.js';
@@ -195,8 +196,26 @@ export interface FocusTeamState {
195
196
  * `work_complete`.
196
197
  */
197
198
  shutdownReason: 'work_complete' | 'no_actionable_work' | 'deactivated' | 'error' | 'user_stopped' | 'handoff' | 'teardown' | null;
199
+ /**
200
+ * Which daemon path asked for this team's teardown, stamped at the moment of
201
+ * the request -- by terminateTeam, and by the shared kill primitive for the
202
+ * paths that bypass it (completion/shutdown-attribution.ts). Absent
203
+ * means NO daemon path asked -- the lead ended externally or on its own --
204
+ * which is a different statement from a teardown whose reason was not stated,
205
+ * and the exit line keeps the two apart.
206
+ */
207
+ shutdownAttribution?: ShutdownAttribution;
198
208
  /** Whether this is a read-only audit session (no commits allowed). */
199
209
  readOnly: boolean;
210
+ /**
211
+ * The delivery ids the focus HELD when the arm this team runs under was taken
212
+ * (product_focuses.armed_baseline_delivery_ids). Carried on team state so every
213
+ * in-team site can tell a delivery the arm COVERS from one RECORDED as new
214
+ * intent under it, with no extra read -- see focus/recorded-new-intent.ts.
215
+ * Typed `unknown` (a JSONB column); absent on backends predating it, which
216
+ * fails CLOSED to "covered".
217
+ */
218
+ armedBaselineDeliveryIds?: unknown;
200
219
  /**
201
220
  * What kind of work this team was spawned to do. 'review' teams run on
202
221
  * focuses with review_requested_at set; their exit is the positive signal
@@ -1 +1 @@
1
- {"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/types/focus.ts"],"names":[],"mappings":"AAUA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAMhF,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE;QACF,OAAO,EAAE,OAAO,CAAC;QACjB,aAAa,EAAE,cAAc,GAAG,QAAQ,GAAG,cAAc,CAAC;KAC3D,CAAC;IACF,EAAE,EAAE;QACF,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,KAAK,EAAE;QACL,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,MAAM,CAAC,EAAE;QACP;;;;;;WAMG;QACH,OAAO,EAAE,OAAO,CAAC;QACjB;;;;WAIG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;I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,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
- // Pinned by: 199 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/types/index.ts
2
+ // Pinned by: 214 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/types/index.ts
3
3
  // PINNED-BY-END
4
4
  /**
5
5
  * Domain-specific type re-exports.
@@ -3,7 +3,9 @@
3
3
  */
4
4
  import type { WriteStream } from 'node:fs';
5
5
  export type AgentSessionStatus = 'starting' | 'running' | 'completed' | 'failed' | 'cancelled' | 'stopped' | 'escalated';
6
- export type ExitCategory = 'error' | 'recovery_cleanup' | 'timeout' | 'user_stopped' | 'governor_denied' | 'internal' | 'work_complete' | 'no_actionable_work' | 'deactivated' | 'handoff' | 'teardown';
6
+ import type { ExitCategory } from './exit-category.js';
7
+ export type { ExitCategory, TerminalSessionStatus } from './exit-category.js';
8
+ export { EXIT_CATEGORIES, isExitCategory, TERMINAL_SESSION_STATUSES, isTerminalSessionStatus, } from './exit-category.js';
7
9
  /**
8
10
  * Agent role from database
9
11
  */
@@ -48,6 +50,8 @@ export interface AgentSession {
48
50
  pass_id: string | null;
49
51
  claude_session_id: string | null;
50
52
  activity_summary: SessionActivitySummary | null;
53
+ daemon_hostname?: string | null;
54
+ daemon_instance_id?: string | null;
51
55
  }
52
56
  /**
53
57
  * The persisted ActivityTracker snapshot. Only `updatedAt` is consumed by the
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAC1B,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GAER,WAAW,GAKX,SAAS,GACT,WAAW,CAAC;AAKhB,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,kBAAkB,GAClB,SAAS,GACT,cAAc,GACd,iBAAiB,GACjB,UAAU,GACV,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,SAAS,GACT,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,k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 +1,5 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
2
  // Pinned by: none -- no test imports this module directly (baselined; see lint:pinned-by)
3
3
  // PINNED-BY-END
4
- export {};
4
+ export { EXIT_CATEGORIES, isExitCategory, TERMINAL_SESSION_STATUSES, isTerminalSessionStatus, } from './exit-category.js';
5
5
  //# sourceMappingURL=session.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB"}
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB;AAiChB,OAAO,EACL,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
@@ -7,9 +7,39 @@ export declare const MAX_STAMP_RETRIES = 10;
7
7
  export interface InjectionStamp {
8
8
  restatements: TargetRestatement[];
9
9
  evidence: string;
10
+ /**
11
+ * Targets that must NOT flip with the injection: operator-EXCUSED shortfall
12
+ * nodes, AND the post-arm targets the reconciliation RECORDED rather than
13
+ * judged. See `stampWithheldNodeIds`.
14
+ */
10
15
  withheldNodeIds: readonly string[];
11
16
  realityTreeId?: string;
12
17
  }
18
+ /**
19
+ * Everything this stamp must NOT promote: the operator-EXCUSED shortfall nodes
20
+ * PLUS the targets the focus's arm did not cover.
21
+ *
22
+ * Both are the same act for the stamp even though they are different judgements
23
+ * upstream. An EXCUSED node was judged and let go; a RECORDED one was never
24
+ * judged at all -- the arm the human gave did not cover it, so the
25
+ * reconciliation set it aside and it waits for the next arm
26
+ * (verify/verify-restatement.ts narrowToArmCoverage). Neither may be flipped to
27
+ * `desired_effect` by this verify, and the stamp has exactly one way to say so.
28
+ *
29
+ * WHY THE STAMP CARRIES IT AT ALL, given the verify door now reads the arm rule
30
+ * itself (supabase/functions/product-api/handlers/reality-tree/verify-arm-coverage.ts):
31
+ * that read FAILS OPEN. A focus row it cannot read withholds nothing, and the run that DID
32
+ * reconcile is the one that knows which targets it declined to judge. Saying it
33
+ * explicitly costs one array and is the only signal that survives a read the
34
+ * edge could not make.
35
+ *
36
+ * Carried on the ledgered stamp like every other field, so the retries re-send
37
+ * exactly what the run authored rather than a set recomputed later.
38
+ *
39
+ * `recordedTargetNodeIds` is null when NO reconciliation ran -- the run learned
40
+ * nothing about coverage, so it withholds nothing on that account. Pure.
41
+ */
42
+ export declare function stampWithheldNodeIds(excusedNodeIds: readonly string[], recordedTargetNodeIds: readonly string[] | null): string[];
13
43
  type StampDeps = Pick<VerificationDeps, 'verifyInjection' | 'emitInwardDrift' | 'fileEscalation' | 'organizationId'>;
14
44
  /**
15
45
  * Stamp the injection of a delivery whose verify PASSED. Never throws and never
@@ -1 +1 @@
1
- {"version":3,"file":"injection-stamp.d.ts","sourceRoot":"","sources":["../../src/verify/injection-stamp.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK/D,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAWD,KAAK,SAAS,GAAG,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;AA8CrH;;;;GAIG;AACH,wBA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B,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;AA8CrH;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,SAAS,EACf,CAAC,EAAE,mBAAmB,EACtB,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAE7F;AAED,sGAAsG;AACtG,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBxE;AAED,4CAA4C;AAC5C,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAEnD;AAED,mCAAmC;AACnC,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
@@ -1,5 +1,6 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
- // Pinned by: packages/daemon/src/verify/verification-commit-sharing.test.ts,
2
+ // Pinned by: packages/daemon/src/verify/stamp-withholds-recorded-targets.test.ts,
3
+ // packages/daemon/src/verify/verification-commit-sharing.test.ts,
3
4
  // packages/daemon/src/verify/verification-engine.test.ts
4
5
  // PINNED-BY-END
5
6
  /**
@@ -36,6 +37,41 @@ import { createLogger } from '../shell/log.js';
36
37
  const log = createLogger({ module: 'verification' });
37
38
  /** Ticks a ledgered stamp is re-attempted before only the durable safety nets remain. */
38
39
  export const MAX_STAMP_RETRIES = 10;
40
+ /**
41
+ * Everything this stamp must NOT promote: the operator-EXCUSED shortfall nodes
42
+ * PLUS the targets the focus's arm did not cover.
43
+ *
44
+ * Both are the same act for the stamp even though they are different judgements
45
+ * upstream. An EXCUSED node was judged and let go; a RECORDED one was never
46
+ * judged at all -- the arm the human gave did not cover it, so the
47
+ * reconciliation set it aside and it waits for the next arm
48
+ * (verify/verify-restatement.ts narrowToArmCoverage). Neither may be flipped to
49
+ * `desired_effect` by this verify, and the stamp has exactly one way to say so.
50
+ *
51
+ * WHY THE STAMP CARRIES IT AT ALL, given the verify door now reads the arm rule
52
+ * itself (supabase/functions/product-api/handlers/reality-tree/verify-arm-coverage.ts):
53
+ * that read FAILS OPEN. A focus row it cannot read withholds nothing, and the run that DID
54
+ * reconcile is the one that knows which targets it declined to judge. Saying it
55
+ * explicitly costs one array and is the only signal that survives a read the
56
+ * edge could not make.
57
+ *
58
+ * Carried on the ledgered stamp like every other field, so the retries re-send
59
+ * exactly what the run authored rather than a set recomputed later.
60
+ *
61
+ * `recordedTargetNodeIds` is null when NO reconciliation ran -- the run learned
62
+ * nothing about coverage, so it withholds nothing on that account. Pure.
63
+ */
64
+ export function stampWithheldNodeIds(excusedNodeIds, recordedTargetNodeIds) {
65
+ const out = [];
66
+ const seen = new Set();
67
+ for (const id of [...excusedNodeIds, ...(recordedTargetNodeIds ?? [])]) {
68
+ if (id === '' || seen.has(id))
69
+ continue;
70
+ seen.add(id);
71
+ out.push(id);
72
+ }
73
+ return out;
74
+ }
39
75
  /** Failed stamps awaiting a stamp-only retry, by delivery id. */
40
76
  const ledger = new Map();
41
77
  /** Attempt the stamp, then surface inward drift for what it flipped. Throws when the stamp does. */
@@ -1 +1 @@
1
- {"version":3,"file":"injection-stamp.js","sourceRoot":"","sources":["../../src/verify/injection-stamp.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6EAA6E;AAC7E,2DAA2D;AAC3D,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAKlF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAErD,yFAAyF;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAgBpC,iEA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kCAAkC,KAAK,CAAC,QAAQ,CAAC,eAAe,iBAAiB,UAAU,kBAAkB,CAAC,CAAC;QAC1H,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC;YACpB,KAAK,CAAC,SAAS,GAAI,GAAa,CAAC,OAAO,CAAC;YACzC,IAAI,KAAK,CAAC,QAAQ,GAAG,iBAAiB;gBAAE,SAAS;YACjD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC1B,GAAG,CAAC,IAAI,CACN,kCAAkC,KAAK,CAAC,QAAQ,CAAC,eAAe,iBAAiB,UAAU,uBAAuB;gBAClH,GAAG,KAAK,CAAC,QAAQ,aAAa,KAAK,CAAC,SAAS,sEAAsE,CACpH,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,wBAAwB;IACtC,OAAO,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,0BAA0B;IACxC,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Report the targets a verify run did NOT hold its delivery to: named in the
3
+ * daemon log, and RECORDED on the delivery's gate_state, where an operator and a
4
+ * later pass can read them.
5
+ *
6
+ * An arm covers the effects the focus held when the human said go, and the verify
7
+ * reconciliation narrows what it judges to those (verify/verify-restatement.ts
8
+ * narrowToArmCoverage, over queries/arm-covered-targets.ts). A target added after
9
+ * the arm produces no shortfall, no hold and no re-work issue -- it waits for the
10
+ * next arm. That is the intended behaviour, but an intended silence and an
11
+ * accidental one read identically: a gate that sets work aside without recording
12
+ * it is indistinguishable from a gate that never saw the work. So the set is
13
+ * stated at the same altitude as the verdict (the log) AND kept where the verdict
14
+ * is kept (the delivery row), because a log line does not survive the run and
15
+ * cannot be read by the next pass.
16
+ *
17
+ * WHEN THE WRITE HAPPENS. Last, after the run's own gate_state writers have
18
+ * settled (the shortfall hold, the evidence-unavailable re-work, the
19
+ * deterministic failure feedback, and the pass's history reset all rewrite the
20
+ * gate). Writing earlier would hand those writers a gate_state they did not read
21
+ * this record from, and the record would be dropped by the very run that made it.
22
+ * Written last, it stamps ONLY its own key over the FRESH row in the delivery's
23
+ * serialized write turn (queries/deliveries.ts
24
+ * rewriteDeliveryGateStateAtOwnStatus), at the row's own status, so it never
25
+ * moves a delivery and never erases what those writers left.
26
+ *
27
+ * WHAT CHANGES IT. Only a reconciliation's own result: a run that reconciled
28
+ * records what it set aside, or removes a record it no longer sets aside (the
29
+ * next arm covered those targets, so a standing record would lie). A run that
30
+ * never reconciled -- a deterministic failure, a security-gate demotion, a
31
+ * delivery that left verify -- leaves the record exactly as it stands: it learned
32
+ * nothing about coverage, and silence is not an answer.
33
+ *
34
+ * Its lifetime is the gate's. It is a record of THIS gate, so it clears with the
35
+ * rest of gate_state when the delivery finally routes -- the same lifetime as the
36
+ * verdict it qualifies.
37
+ *
38
+ * @module verify/recorded-targets
39
+ */
40
+ import { type DeliveryGateRowIo, type DeliveryGateState } from '../queries/deliveries.js';
41
+ import { type RecordedTargetsRecord } from '../queries/recorded-targets-record.js';
42
+ /** The delivery a verify run is reporting about, and the injection it verified. */
43
+ export interface RecordedTargetsSubject {
44
+ deliveryId: string;
45
+ injectionNodeId: string | null;
46
+ }
47
+ /** Injected row IO for the durable write (the real row read and physical write by default). */
48
+ export interface RecordedTargetsWriteDeps extends DeliveryGateRowIo {
49
+ now: () => string;
50
+ }
51
+ /**
52
+ * Persist a verify run's set-aside targets on its delivery's gate_state
53
+ * (verify/recorded-targets.ts). Bound in defaultDeps; a test may bind its own.
54
+ */
55
+ export type RecordedTargetsPersist = (deliveryId: string, injectionNodeId: string | null, nodeIds: string[]) => Promise<unknown>;
56
+ /** The recorded-targets record `gateState` carries; null when absent or malformed. Pure. */
57
+ export declare function readRecordedTargets(gateState: unknown): RecordedTargetsRecord | null;
58
+ /**
59
+ * `gateState` with its recorded targets REPLACED: set to `recorded` when the run
60
+ * set targets aside, removed when it set none aside, so a stale set never stands
61
+ * for a newer run. Every other key is untouched, and a gate left holding nothing
62
+ * is null. A record stamped on a null gate_state rides beside an EMPTY `blocking`
63
+ * array, like carried history, so it is never read as a live block. Pure.
64
+ */
65
+ export declare function stampRecordedTargets(gateState: unknown, recorded: RecordedTargetsRecord | null): DeliveryGateState | null;
66
+ /**
67
+ * Record on the delivery's gate_state the targets its verify run set aside --
68
+ * `nodeIds`, of the injection `injectionNodeId` -- or REMOVE the standing record
69
+ * when the run set none aside.
70
+ *
71
+ * Reads the row FRESH and writes it at the row's OWN status inside one serialized
72
+ * write turn (see the module header), so the gate-only write never moves the
73
+ * delivery and never carries a stale copy of what another writer left. Nothing is
74
+ * written when the record would not change, when there is no record to remove, or
75
+ * for a delivery that is not found, done or cancelled. Best-effort: never throws
76
+ * -- a record that failed to land holds nothing and is written by the next run.
77
+ * Returns whether a write landed.
78
+ */
79
+ export declare function persistRecordedTargets(deliveryId: string, injectionNodeId: string | null, nodeIds: readonly string[], deps?: Partial<RecordedTargetsWriteDeps>): Promise<boolean>;
80
+ /**
81
+ * Name the targets the arm did NOT cover, so narrowing what verify judges never
82
+ * looks like losing track of it.
83
+ *
84
+ * Targets recorded after the arm produce no shortfall, no hold and no re-work
85
+ * issue -- they wait for the next arm. That is the intended behaviour, but an
86
+ * intended silence and an accidental one read identically in a log, so the
87
+ * reconciliation reports the set and this states it at the same altitude as the
88
+ * verdict.
89
+ */
90
+ export declare function logRecordedTargets(v: RecordedTargetsSubject, recordedTargetNodeIds: readonly string[]): void;
91
+ /**
92
+ * Report a verify run's set-aside targets: state them in the log, then record
93
+ * them on the delivery (see the module header).
94
+ *
95
+ * `recordedTargetNodeIds` is null when NO reconciliation ran, and the record is
96
+ * then left exactly as it stands -- this run learned nothing about coverage. An
97
+ * empty array is an answer: the run reconciled and set nothing aside, so a
98
+ * standing record is removed. `persist` is the durable writer; absent, the set is
99
+ * logged only (defaultDeps binds persistRecordedTargets). Best-effort: never
100
+ * throws, so reporting never demotes a rendered verdict.
101
+ */
102
+ export declare function reportRecordedTargets(v: RecordedTargetsSubject, recordedTargetNodeIds: string[] | null, persist?: RecordedTargetsPersist): Promise<void>;
103
+ //# sourceMappingURL=recorded-targets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorded-targets.d.ts","sourceRoot":"","sources":["../../src/verify/recorded-targets.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAKzG,mFAAmF;AACnF,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,+FAA+F;AAC/F,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,GAAG,EAAE,MAAM,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,OAAO,EAAE,MAAM,EAAE,KACd,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,OAAO,GAAG,qBAAqB,GAAG,IAAI,CAKpF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,qBAAqB,GAAG,IAAI,GACrC,iBAAiB,GAAG,IAAI,CAW1B;AAcD;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,GAAG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