@telora/daemon 0.24.25 → 0.24.29

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 (433) hide show
  1. package/build-info.json +10 -3
  2. package/dist/audit/audit-prompt.d.ts.map +1 -1
  3. package/dist/audit/audit-prompt.js +15 -0
  4. package/dist/audit/audit-prompt.js.map +1 -1
  5. package/dist/completion/completion-event/event.d.ts +4 -3
  6. package/dist/completion/completion-event/event.d.ts.map +1 -1
  7. package/dist/completion/completion-event/event.js.map +1 -1
  8. package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts +19 -11
  9. package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts.map +1 -1
  10. package/dist/completion/review-cycle-budget/review-cycle-cap.js +36 -36
  11. package/dist/completion/review-cycle-budget/review-cycle-cap.js.map +1 -1
  12. package/dist/completion/review-cycle-budget/review-loop-detection.d.ts +101 -0
  13. package/dist/completion/review-cycle-budget/review-loop-detection.d.ts.map +1 -0
  14. package/dist/completion/review-cycle-budget/review-loop-detection.js +105 -0
  15. package/dist/completion/review-cycle-budget/review-loop-detection.js.map +1 -0
  16. package/dist/completion/review-cycle-budget/spent-budget-release.d.ts +70 -0
  17. package/dist/completion/review-cycle-budget/spent-budget-release.d.ts.map +1 -0
  18. package/dist/completion/review-cycle-budget/spent-budget-release.js +98 -0
  19. package/dist/completion/review-cycle-budget/spent-budget-release.js.map +1 -0
  20. package/dist/completion/review-exit/review-defect-detector.d.ts +71 -49
  21. package/dist/completion/review-exit/review-defect-detector.d.ts.map +1 -1
  22. package/dist/completion/review-exit/review-defect-detector.js +75 -69
  23. package/dist/completion/review-exit/review-defect-detector.js.map +1 -1
  24. package/dist/completion/review-exit/review-exit-attribution.d.ts +1 -1
  25. package/dist/completion/review-exit/review-exit-attribution.js +1 -1
  26. package/dist/completion/review-exit/review-exit-deps.d.ts +5 -2
  27. package/dist/completion/review-exit/review-exit-deps.d.ts.map +1 -1
  28. package/dist/completion/review-exit/review-exit-deps.js +1 -1
  29. package/dist/completion/review-exit/review-exit-evidence.d.ts +10 -1
  30. package/dist/completion/review-exit/review-exit-evidence.d.ts.map +1 -1
  31. package/dist/completion/review-exit/review-exit-evidence.js +17 -14
  32. package/dist/completion/review-exit/review-exit-evidence.js.map +1 -1
  33. package/dist/completion/review-exit/review-exit-foreign-findings.d.ts +1 -1
  34. package/dist/completion/review-exit/review-exit-foreign-findings.d.ts.map +1 -1
  35. package/dist/completion/review-exit/review-exit-phase.d.ts.map +1 -1
  36. package/dist/completion/review-exit/review-exit-phase.js +12 -8
  37. package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
  38. package/dist/completion/state-cascade/review-next-step.d.ts +12 -3
  39. package/dist/completion/state-cascade/review-next-step.d.ts.map +1 -1
  40. package/dist/completion/state-cascade/review-next-step.js +10 -1
  41. package/dist/completion/state-cascade/review-next-step.js.map +1 -1
  42. package/dist/completion/state-cascade/standing-approval-convergence.d.ts +1 -1
  43. package/dist/completion/state-cascade/standing-approval-convergence.d.ts.map +1 -1
  44. package/dist/completion/state-cascade/standing-approval-convergence.js +10 -4
  45. package/dist/completion/state-cascade/standing-approval-convergence.js.map +1 -1
  46. package/dist/completion/state-cascade/state-cascade.d.ts +3 -0
  47. package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
  48. package/dist/completion/state-cascade/state-cascade.js +16 -1
  49. package/dist/completion/state-cascade/state-cascade.js.map +1 -1
  50. package/dist/completion/team-exit/status-advance-phase.d.ts +1 -1
  51. package/dist/completion/team-exit/status-advance-phase.d.ts.map +1 -1
  52. package/dist/completion/team-exit/status-advance-phase.js +6 -4
  53. package/dist/completion/team-exit/status-advance-phase.js.map +1 -1
  54. package/dist/completion/team-outcome/apply-turn.d.ts.map +1 -1
  55. package/dist/completion/team-outcome/apply-turn.js +9 -4
  56. package/dist/completion/team-outcome/apply-turn.js.map +1 -1
  57. package/dist/completion/team-outcome/decide-turn-entry-rows.d.ts.map +1 -1
  58. package/dist/completion/team-outcome/decide-turn-entry-rows.js +28 -3
  59. package/dist/completion/team-outcome/decide-turn-entry-rows.js.map +1 -1
  60. package/dist/completion/team-outcome/decide.d.ts.map +1 -1
  61. package/dist/completion/team-outcome/decide.js +1 -0
  62. package/dist/completion/team-outcome/decide.js.map +1 -1
  63. package/dist/completion/team-outcome/exit-limits.d.ts +6 -0
  64. package/dist/completion/team-outcome/exit-limits.d.ts.map +1 -1
  65. package/dist/completion/team-outcome/exit-limits.js +6 -0
  66. package/dist/completion/team-outcome/exit-limits.js.map +1 -1
  67. package/dist/completion/team-outcome/exit-pipeline-state.d.ts +5 -0
  68. package/dist/completion/team-outcome/exit-pipeline-state.d.ts.map +1 -1
  69. package/dist/completion/team-outcome/exit-pipeline-state.js.map +1 -1
  70. package/dist/completion/team-teardown/session-hold-bounds.d.ts +10 -1
  71. package/dist/completion/team-teardown/session-hold-bounds.d.ts.map +1 -1
  72. package/dist/completion/team-teardown/session-hold-bounds.js +11 -0
  73. package/dist/completion/team-teardown/session-hold-bounds.js.map +1 -1
  74. package/dist/completion/team-teardown/session-hold.d.ts.map +1 -1
  75. package/dist/completion/team-teardown/session-hold.js +2 -0
  76. package/dist/completion/team-teardown/session-hold.js.map +1 -1
  77. package/dist/composition/engine-start-context.d.ts.map +1 -1
  78. package/dist/composition/engine-start-context.js +9 -1
  79. package/dist/composition/engine-start-context.js.map +1 -1
  80. package/dist/composition/execution-spawn-context.d.ts.map +1 -1
  81. package/dist/composition/execution-spawn-context.js +2 -0
  82. package/dist/composition/execution-spawn-context.js.map +1 -1
  83. package/dist/composition/judgement-contexts.d.ts.map +1 -1
  84. package/dist/composition/judgement-contexts.js +8 -2
  85. package/dist/composition/judgement-contexts.js.map +1 -1
  86. package/dist/composition/review-exit-context.d.ts.map +1 -1
  87. package/dist/composition/review-exit-context.js +2 -0
  88. package/dist/composition/review-exit-context.js.map +1 -1
  89. package/dist/composition/review-loop-context.d.ts +28 -0
  90. package/dist/composition/review-loop-context.d.ts.map +1 -0
  91. package/dist/composition/review-loop-context.js +147 -0
  92. package/dist/composition/review-loop-context.js.map +1 -0
  93. package/dist/composition/runtime-heartbeat-context.d.ts.map +1 -1
  94. package/dist/composition/runtime-heartbeat-context.js +8 -2
  95. package/dist/composition/runtime-heartbeat-context.js.map +1 -1
  96. package/dist/composition/spawn-pass-deps.d.ts.map +1 -1
  97. package/dist/composition/spawn-pass-deps.js +3 -0
  98. package/dist/composition/spawn-pass-deps.js.map +1 -1
  99. package/dist/composition/state-cascade-context.d.ts.map +1 -1
  100. package/dist/composition/state-cascade-context.js +3 -1
  101. package/dist/composition/state-cascade-context.js.map +1 -1
  102. package/dist/composition/tower-escalation-context.d.ts +12 -0
  103. package/dist/composition/tower-escalation-context.d.ts.map +1 -0
  104. package/dist/composition/tower-escalation-context.js +109 -0
  105. package/dist/composition/tower-escalation-context.js.map +1 -0
  106. package/dist/composition/workstation-intervals-context.d.ts +3 -0
  107. package/dist/composition/workstation-intervals-context.d.ts.map +1 -0
  108. package/dist/composition/workstation-intervals-context.js +33 -0
  109. package/dist/composition/workstation-intervals-context.js.map +1 -0
  110. package/dist/daemon-state/awaiting-slot.d.ts +18 -1
  111. package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
  112. package/dist/daemon-state/awaiting-slot.js +7 -0
  113. package/dist/daemon-state/awaiting-slot.js.map +1 -1
  114. package/dist/delivery/delivery-reconciler.d.ts +7 -7
  115. package/dist/delivery/recorded-concerns.d.ts +63 -28
  116. package/dist/delivery/recorded-concerns.d.ts.map +1 -1
  117. package/dist/delivery/recorded-concerns.js +72 -28
  118. package/dist/delivery/recorded-concerns.js.map +1 -1
  119. package/dist/directive/directive-queue.d.ts +8 -0
  120. package/dist/directive/directive-queue.d.ts.map +1 -1
  121. package/dist/directive/directive-queue.js +1 -1
  122. package/dist/directive/directive-queue.js.map +1 -1
  123. package/dist/focus/control-state.d.ts +6 -4
  124. package/dist/focus/control-state.d.ts.map +1 -1
  125. package/dist/focus/control-state.js +6 -4
  126. package/dist/focus/control-state.js.map +1 -1
  127. package/dist/focus/daemon-contexts-judgement.d.ts +6 -0
  128. package/dist/focus/daemon-contexts-judgement.d.ts.map +1 -1
  129. package/dist/focus/daemon-contexts.d.ts +6 -0
  130. package/dist/focus/daemon-contexts.d.ts.map +1 -1
  131. package/dist/focus/daemon-contexts.js.map +1 -1
  132. package/dist/focus/focus-engine.d.ts.map +1 -1
  133. package/dist/focus/focus-engine.js +3 -1
  134. package/dist/focus/focus-engine.js.map +1 -1
  135. package/dist/focus/focus-executor.d.ts.map +1 -1
  136. package/dist/focus/focus-executor.js +3 -2
  137. package/dist/focus/focus-executor.js.map +1 -1
  138. package/dist/focus/focus-loop-registry.d.ts.map +1 -1
  139. package/dist/focus/focus-loop-registry.js +42 -0
  140. package/dist/focus/focus-loop-registry.js.map +1 -1
  141. package/dist/focus/focus-poller-auto-advance.d.ts +4 -2
  142. package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
  143. package/dist/focus/focus-poller-auto-advance.js +24 -18
  144. package/dist/focus/focus-poller-auto-advance.js.map +1 -1
  145. package/dist/focus/focus-poller-spawn.d.ts.map +1 -1
  146. package/dist/focus/focus-poller-spawn.js +8 -6
  147. package/dist/focus/focus-poller-spawn.js.map +1 -1
  148. package/dist/focus/heartbeat.d.ts +9 -2
  149. package/dist/focus/heartbeat.d.ts.map +1 -1
  150. package/dist/focus/heartbeat.js +9 -1
  151. package/dist/focus/heartbeat.js.map +1 -1
  152. package/dist/focus/pending-directive-gates.d.ts +14 -0
  153. package/dist/focus/pending-directive-gates.d.ts.map +1 -1
  154. package/dist/focus/pending-directive-gates.js +25 -1
  155. package/dist/focus/pending-directive-gates.js.map +1 -1
  156. package/dist/focus/pending-spawn-pass-deps.d.ts +7 -0
  157. package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
  158. package/dist/focus/pending-spawn-review-next-step.d.ts +1 -1
  159. package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
  160. package/dist/focus/pending-spawn-review-next-step.js +2 -0
  161. package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
  162. package/dist/focus/ready-focus-team-work.d.ts +9 -4
  163. package/dist/focus/ready-focus-team-work.d.ts.map +1 -1
  164. package/dist/focus/ready-focus-team-work.js +14 -3
  165. package/dist/focus/ready-focus-team-work.js.map +1 -1
  166. package/dist/focus/verify-open-issues.d.ts +3 -2
  167. package/dist/focus/verify-open-issues.d.ts.map +1 -1
  168. package/dist/focus/verify-open-issues.js +6 -4
  169. package/dist/focus/verify-open-issues.js.map +1 -1
  170. package/dist/focus/workstation-intervals.d.ts +83 -0
  171. package/dist/focus/workstation-intervals.d.ts.map +1 -0
  172. package/dist/focus/workstation-intervals.js +81 -0
  173. package/dist/focus/workstation-intervals.js.map +1 -0
  174. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +5 -2
  175. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
  176. package/dist/focus-stage-lifecycle/wedge-watchdog.js +2 -2
  177. package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
  178. package/dist/nexus/escalation-bridge.d.ts.map +1 -1
  179. package/dist/nexus/escalation-bridge.js +2 -1
  180. package/dist/nexus/escalation-bridge.js.map +1 -1
  181. package/dist/nexus/file-escalation.d.ts.map +1 -1
  182. package/dist/nexus/file-escalation.js +1 -0
  183. package/dist/nexus/file-escalation.js.map +1 -1
  184. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  185. package/dist/prompt-sections/persona-sections.js +4 -1
  186. package/dist/prompt-sections/persona-sections.js.map +1 -1
  187. package/dist/prompt-sections/qa-author-section.d.ts.map +1 -1
  188. package/dist/prompt-sections/qa-author-section.js +18 -1
  189. package/dist/prompt-sections/qa-author-section.js.map +1 -1
  190. package/dist/prompt-sections/scoping-sections.d.ts +0 -12
  191. package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
  192. package/dist/prompt-sections/scoping-sections.js +16 -2
  193. package/dist/prompt-sections/scoping-sections.js.map +1 -1
  194. package/dist/prompts/bounded-universals.d.ts +13 -0
  195. package/dist/prompts/bounded-universals.d.ts.map +1 -0
  196. package/dist/prompts/bounded-universals.js +32 -0
  197. package/dist/prompts/bounded-universals.js.map +1 -0
  198. package/dist/queries/api-client/shared.d.ts +2 -1
  199. package/dist/queries/api-client/shared.d.ts.map +1 -1
  200. package/dist/queries/api-client/shared.js +31 -1
  201. package/dist/queries/api-client/shared.js.map +1 -1
  202. package/dist/queries/deliveries/deliveries.js +1 -1
  203. package/dist/queries/deliveries/issues.d.ts.map +1 -1
  204. package/dist/queries/deliveries/issues.js +1 -0
  205. package/dist/queries/deliveries/issues.js.map +1 -1
  206. package/dist/queries/delivery-gate-state/delivery-gate-state.js +1 -1
  207. package/dist/queries/delivery-gate-state/verify-own-holds.d.ts +24 -2
  208. package/dist/queries/delivery-gate-state/verify-own-holds.d.ts.map +1 -1
  209. package/dist/queries/delivery-gate-state/verify-own-holds.js.map +1 -1
  210. package/dist/queries/escalations/cause-key.d.ts.map +1 -1
  211. package/dist/queries/escalations/cause-key.js +1 -0
  212. package/dist/queries/escalations/cause-key.js.map +1 -1
  213. package/dist/queries/escalations/escalation-consumption.d.ts +13 -0
  214. package/dist/queries/escalations/escalation-consumption.d.ts.map +1 -1
  215. package/dist/queries/escalations/escalation-consumption.js +12 -2
  216. package/dist/queries/escalations/escalation-consumption.js.map +1 -1
  217. package/dist/queries/escalations/escalations.d.ts.map +1 -1
  218. package/dist/queries/escalations/escalations.js +2 -1
  219. package/dist/queries/escalations/escalations.js.map +1 -1
  220. package/dist/queries/escalations/tower-escalations.d.ts +82 -0
  221. package/dist/queries/escalations/tower-escalations.d.ts.map +1 -0
  222. package/dist/queries/escalations/tower-escalations.js +97 -0
  223. package/dist/queries/escalations/tower-escalations.js.map +1 -0
  224. package/dist/queries/focus-review/recorded-concern-ids.d.ts +48 -11
  225. package/dist/queries/focus-review/recorded-concern-ids.d.ts.map +1 -1
  226. package/dist/queries/focus-review/recorded-concern-ids.js +42 -12
  227. package/dist/queries/focus-review/recorded-concern-ids.js.map +1 -1
  228. package/dist/queries/focus-review/review-criterion-verdicts.d.ts +37 -0
  229. package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -0
  230. package/dist/queries/focus-review/review-criterion-verdicts.js +64 -0
  231. package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -0
  232. package/dist/queries/focus-review/review-finding-facts.d.ts +18 -6
  233. package/dist/queries/focus-review/review-finding-facts.d.ts.map +1 -1
  234. package/dist/queries/focus-review/review-finding-facts.js +21 -8
  235. package/dist/queries/focus-review/review-finding-facts.js.map +1 -1
  236. package/dist/queries/focuses/ended-arm.d.ts +56 -13
  237. package/dist/queries/focuses/ended-arm.d.ts.map +1 -1
  238. package/dist/queries/focuses/ended-arm.js +40 -14
  239. package/dist/queries/focuses/ended-arm.js.map +1 -1
  240. package/dist/queries/focuses/focus-criteria-standing.d.ts +12 -0
  241. package/dist/queries/focuses/focus-criteria-standing.d.ts.map +1 -1
  242. package/dist/queries/focuses/focus-criteria-standing.js +13 -0
  243. package/dist/queries/focuses/focus-criteria-standing.js.map +1 -1
  244. package/dist/queries/focuses/focus-discovery.d.ts +14 -3
  245. package/dist/queries/focuses/focus-discovery.d.ts.map +1 -1
  246. package/dist/queries/focuses/focus-discovery.js +2 -19
  247. package/dist/queries/focuses/focus-discovery.js.map +1 -1
  248. package/dist/queries/focuses/focuses.d.ts +15 -12
  249. package/dist/queries/focuses/focuses.d.ts.map +1 -1
  250. package/dist/queries/focuses/focuses.js +15 -13
  251. package/dist/queries/focuses/focuses.js.map +1 -1
  252. package/dist/queries/sessions/sessions.d.ts.map +1 -1
  253. package/dist/queries/sessions/sessions.js +2 -1
  254. package/dist/queries/sessions/sessions.js.map +1 -1
  255. package/dist/queries/tower-decisions/tower-decisions.d.ts +103 -0
  256. package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -0
  257. package/dist/queries/tower-decisions/tower-decisions.js +138 -0
  258. package/dist/queries/tower-decisions/tower-decisions.js.map +1 -0
  259. package/dist/queries/verification/verification.js +1 -1
  260. package/dist/queries/wire-schemas/schemas.d.ts +2 -0
  261. package/dist/queries/wire-schemas/schemas.d.ts.map +1 -1
  262. package/dist/queries/wire-schemas/schemas.js +8 -2
  263. package/dist/queries/wire-schemas/schemas.js.map +1 -1
  264. package/dist/queries/workstation-intervals/workstation-intervals.d.ts +52 -0
  265. package/dist/queries/workstation-intervals/workstation-intervals.d.ts.map +1 -0
  266. package/dist/queries/workstation-intervals/workstation-intervals.js +49 -0
  267. package/dist/queries/workstation-intervals/workstation-intervals.js.map +1 -0
  268. package/dist/resolvers/escalation-answers.d.ts +31 -0
  269. package/dist/resolvers/escalation-answers.d.ts.map +1 -1
  270. package/dist/resolvers/escalation-answers.js +31 -17
  271. package/dist/resolvers/escalation-answers.js.map +1 -1
  272. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
  273. package/dist/resolvers/focus-criteria-standing.js +20 -0
  274. package/dist/resolvers/focus-criteria-standing.js.map +1 -1
  275. package/dist/shell/unified-engine-lifecycle.d.ts +11 -1
  276. package/dist/shell/unified-engine-lifecycle.d.ts.map +1 -1
  277. package/dist/shell/unified-engine-lifecycle.js +10 -1
  278. package/dist/shell/unified-engine-lifecycle.js.map +1 -1
  279. package/dist/spawn/directive-dispatch.d.ts.map +1 -1
  280. package/dist/spawn/directive-dispatch.js +1 -0
  281. package/dist/spawn/directive-dispatch.js.map +1 -1
  282. package/dist/spawn/lead-continuation.d.ts +4 -3
  283. package/dist/spawn/lead-continuation.d.ts.map +1 -1
  284. package/dist/spawn/lead-continuation.js.map +1 -1
  285. package/dist/spawn/live-answer-delivery.d.ts +53 -0
  286. package/dist/spawn/live-answer-delivery.d.ts.map +1 -0
  287. package/dist/spawn/live-answer-delivery.js +26 -0
  288. package/dist/spawn/live-answer-delivery.js.map +1 -0
  289. package/dist/spawn/routing-decider-spawn.d.ts +64 -2
  290. package/dist/spawn/routing-decider-spawn.d.ts.map +1 -1
  291. package/dist/spawn/routing-decider-spawn.js +65 -20
  292. package/dist/spawn/routing-decider-spawn.js.map +1 -1
  293. package/dist/spawn/worktree-session.d.ts +7 -5
  294. package/dist/spawn/worktree-session.d.ts.map +1 -1
  295. package/dist/spawn/worktree-session.js +11 -7
  296. package/dist/spawn/worktree-session.js.map +1 -1
  297. package/dist/supervision/escalation-filing.js +1 -1
  298. package/dist/supervision/incident-correlation.d.ts +4 -1
  299. package/dist/supervision/incident-correlation.d.ts.map +1 -1
  300. package/dist/supervision/incident-correlation.js +7 -2
  301. package/dist/supervision/incident-correlation.js.map +1 -1
  302. package/dist/supervision/review-cycle-cap-hold.d.ts +11 -5
  303. package/dist/supervision/review-cycle-cap-hold.d.ts.map +1 -1
  304. package/dist/supervision/review-cycle-cap-hold.js +29 -11
  305. package/dist/supervision/review-cycle-cap-hold.js.map +1 -1
  306. package/dist/supervision/review-loop-detector.d.ts +48 -0
  307. package/dist/supervision/review-loop-detector.d.ts.map +1 -0
  308. package/dist/supervision/review-loop-detector.js +13 -0
  309. package/dist/supervision/review-loop-detector.js.map +1 -0
  310. package/dist/supervision/review-loop-hold.d.ts +29 -0
  311. package/dist/supervision/review-loop-hold.d.ts.map +1 -0
  312. package/dist/supervision/review-loop-hold.js +99 -0
  313. package/dist/supervision/review-loop-hold.js.map +1 -0
  314. package/dist/supervision/stall-detector-config.d.ts +8 -0
  315. package/dist/supervision/stall-detector-config.d.ts.map +1 -1
  316. package/dist/supervision/stall-detector-config.js +14 -3
  317. package/dist/supervision/stall-detector-config.js.map +1 -1
  318. package/dist/supervision/stop-registry.d.ts +4 -0
  319. package/dist/supervision/stop-registry.d.ts.map +1 -1
  320. package/dist/supervision/stop-registry.js +3 -1
  321. package/dist/supervision/stop-registry.js.map +1 -1
  322. package/dist/supervision/stop-rows-delivery.d.ts +10 -0
  323. package/dist/supervision/stop-rows-delivery.d.ts.map +1 -1
  324. package/dist/supervision/stop-rows-delivery.js +29 -0
  325. package/dist/supervision/stop-rows-delivery.js.map +1 -1
  326. package/dist/supervision/stop-rows-review-loop.d.ts +35 -0
  327. package/dist/supervision/stop-rows-review-loop.d.ts.map +1 -0
  328. package/dist/supervision/stop-rows-review-loop.js +150 -0
  329. package/dist/supervision/stop-rows-review-loop.js.map +1 -0
  330. package/dist/supervision/stop-rows-team-session.d.ts +1 -1
  331. package/dist/supervision/stop-rows-team-session.d.ts.map +1 -1
  332. package/dist/supervision/stop-rows-team-session.js.map +1 -1
  333. package/dist/supervision/unreviewed-settle-detector.d.ts +7 -2
  334. package/dist/supervision/unreviewed-settle-detector.d.ts.map +1 -1
  335. package/dist/supervision/unreviewed-settle-detector.js +15 -2
  336. package/dist/supervision/unreviewed-settle-detector.js.map +1 -1
  337. package/dist/templates/agents-md.d.ts.map +1 -1
  338. package/dist/templates/agents-md.js +1 -0
  339. package/dist/templates/agents-md.js.map +1 -1
  340. package/dist/templates/claude-md.d.ts +1 -1
  341. package/dist/templates/claude-md.d.ts.map +1 -1
  342. package/dist/templates/claude-md.js +12 -0
  343. package/dist/templates/claude-md.js.map +1 -1
  344. package/dist/testing/fixtures/api-client.js +1 -1
  345. package/dist/testing/fixtures/index.js +1 -1
  346. package/dist/testing/fixtures/pending-spawn-world.d.ts +4 -0
  347. package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
  348. package/dist/testing/fixtures/pending-spawn-world.js +15 -2
  349. package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
  350. package/dist/testing/fixtures/recording-api-client.js +1 -1
  351. package/dist/testing/fixtures/review-exit-deps.d.ts.map +1 -1
  352. package/dist/testing/fixtures/review-exit-deps.js +3 -1
  353. package/dist/testing/fixtures/review-exit-deps.js.map +1 -1
  354. package/dist/testing/fixtures/review-loop.d.ts +19 -0
  355. package/dist/testing/fixtures/review-loop.d.ts.map +1 -0
  356. package/dist/testing/fixtures/review-loop.js +30 -0
  357. package/dist/testing/fixtures/review-loop.js.map +1 -0
  358. package/dist/testing/fixtures/shortfall-rework-hold-deps.d.ts.map +1 -1
  359. package/dist/testing/fixtures/shortfall-rework-hold-deps.js +1 -0
  360. package/dist/testing/fixtures/shortfall-rework-hold-deps.js.map +1 -1
  361. package/dist/testing/fixtures/tower-loop.d.ts +28 -0
  362. package/dist/testing/fixtures/tower-loop.d.ts.map +1 -0
  363. package/dist/testing/fixtures/tower-loop.js +83 -0
  364. package/dist/testing/fixtures/tower-loop.js.map +1 -0
  365. package/dist/tower/tower-escalation-gather.d.ts +33 -0
  366. package/dist/tower/tower-escalation-gather.d.ts.map +1 -0
  367. package/dist/tower/tower-escalation-gather.js +38 -0
  368. package/dist/tower/tower-escalation-gather.js.map +1 -0
  369. package/dist/tower/tower-escalation-prompt.d.ts +62 -0
  370. package/dist/tower/tower-escalation-prompt.d.ts.map +1 -0
  371. package/dist/tower/tower-escalation-prompt.js +130 -0
  372. package/dist/tower/tower-escalation-prompt.js.map +1 -0
  373. package/dist/tower/tower-escalation-routing.d.ts +49 -0
  374. package/dist/tower/tower-escalation-routing.d.ts.map +1 -0
  375. package/dist/tower/tower-escalation-routing.js +53 -0
  376. package/dist/tower/tower-escalation-routing.js.map +1 -0
  377. package/dist/tower/tower-escalation-session.d.ts +149 -0
  378. package/dist/tower/tower-escalation-session.d.ts.map +1 -0
  379. package/dist/tower/tower-escalation-session.js +238 -0
  380. package/dist/tower/tower-escalation-session.js.map +1 -0
  381. package/dist/tower/tower-supervisor-history.d.ts +129 -0
  382. package/dist/tower/tower-supervisor-history.d.ts.map +1 -0
  383. package/dist/tower/tower-supervisor-history.js +217 -0
  384. package/dist/tower/tower-supervisor-history.js.map +1 -0
  385. package/dist/tower/tower-supervisor-prompt.d.ts +21 -0
  386. package/dist/tower/tower-supervisor-prompt.d.ts.map +1 -0
  387. package/dist/tower/tower-supervisor-prompt.js +205 -0
  388. package/dist/tower/tower-supervisor-prompt.js.map +1 -0
  389. package/dist/tower/tower-supervisor-session.d.ts +220 -0
  390. package/dist/tower/tower-supervisor-session.d.ts.map +1 -0
  391. package/dist/tower/tower-supervisor-session.js +307 -0
  392. package/dist/tower/tower-supervisor-session.js.map +1 -0
  393. package/dist/tower/tower-supervisor.d.ts +86 -0
  394. package/dist/tower/tower-supervisor.d.ts.map +1 -0
  395. package/dist/tower/tower-supervisor.js +8 -0
  396. package/dist/tower/tower-supervisor.js.map +1 -0
  397. package/dist/types/index.js +1 -1
  398. package/dist/verify/deterministic-gate/verification-deterministic.js +1 -1
  399. package/dist/verify/effect-reconciliation/verify-reconciliation.d.ts +11 -0
  400. package/dist/verify/effect-reconciliation/verify-reconciliation.d.ts.map +1 -1
  401. package/dist/verify/effect-reconciliation/verify-reconciliation.js +35 -2
  402. package/dist/verify/effect-reconciliation/verify-reconciliation.js.map +1 -1
  403. package/dist/verify/effect-reconciliation/verify-restatement.d.ts +4 -0
  404. package/dist/verify/effect-reconciliation/verify-restatement.d.ts.map +1 -1
  405. package/dist/verify/effect-reconciliation/verify-restatement.js +3 -3
  406. package/dist/verify/effect-reconciliation/verify-restatement.js.map +1 -1
  407. package/dist/verify/engine/reconciliation-step.d.ts +9 -2
  408. package/dist/verify/engine/reconciliation-step.d.ts.map +1 -1
  409. package/dist/verify/engine/reconciliation-step.js +26 -3
  410. package/dist/verify/engine/reconciliation-step.js.map +1 -1
  411. package/dist/verify/outcome-routing/incurable-model-hold.d.ts +2 -0
  412. package/dist/verify/outcome-routing/incurable-model-hold.d.ts.map +1 -1
  413. package/dist/verify/outcome-routing/incurable-model-hold.js +21 -6
  414. package/dist/verify/outcome-routing/incurable-model-hold.js.map +1 -1
  415. package/dist/verify/outcome-routing/repeating-model-hold.d.ts.map +1 -1
  416. package/dist/verify/outcome-routing/repeating-model-hold.js +13 -7
  417. package/dist/verify/outcome-routing/repeating-model-hold.js.map +1 -1
  418. package/dist/verify/outcome-routing/unjudged-node-hold.d.ts +31 -0
  419. package/dist/verify/outcome-routing/unjudged-node-hold.d.ts.map +1 -0
  420. package/dist/verify/outcome-routing/unjudged-node-hold.js +134 -0
  421. package/dist/verify/outcome-routing/unjudged-node-hold.js.map +1 -0
  422. package/dist/verify/outcome-routing/verification-model-unavailable-hold.d.ts +4 -0
  423. package/dist/verify/outcome-routing/verification-model-unavailable-hold.d.ts.map +1 -1
  424. package/dist/verify/outcome-routing/verification-model-unavailable-hold.js +25 -8
  425. package/dist/verify/outcome-routing/verification-model-unavailable-hold.js.map +1 -1
  426. package/dist/verify/outcome-routing/verification-rework-issue.d.ts +4 -4
  427. package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
  428. package/dist/verify/outcome-routing/verification-rework-issue.js +16 -6
  429. package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
  430. package/dist/verify/shortfalls/pre-judge-rulings.d.ts.map +1 -1
  431. package/dist/verify/shortfalls/pre-judge-rulings.js +1 -0
  432. package/dist/verify/shortfalls/pre-judge-rulings.js.map +1 -1
  433. package/package.json +3 -3
@@ -1,8 +1,24 @@
1
1
  /**
2
- * The RECORDED CONCERNS of a focus, as pure functions over its review-finding
3
- * facts (queries/focus-review/review-finding-facts.ts): a concern is a
4
- * review-filed finding recorded with class `concern`. It is recorded for the
5
- * human and the next arm and is never the running team's work.
2
+ * THE review-finding rule, daemon side, and the RECORDED CONCERNS of a focus as
3
+ * pure functions over its review-finding facts
4
+ * (queries/focus-review/review-finding-facts.ts).
5
+ *
6
+ * A finding blocks only when a not_met acceptance criterion names it. Every
7
+ * other issue a review files is a CONCERN: recorded for the human and the
8
+ * next arm, never the running team's work, never holding its delivery.
9
+ *
10
+ * findingClassOf is a hand MIRROR of the canonical
11
+ * supabase/functions/_shared/review-finding-class.ts findingClassOf (the daemon
12
+ * cannot import the Deno tree at runtime); review-finding-class-parity.test.ts
13
+ * runs both over one case matrix and fails on the first disagreement. Every
14
+ * daemon reader classifies through it: the live delivery writers
15
+ * (delivery/recorded-concerns.ts), the review exit
16
+ * (completion/review-exit/review-defect-detector.ts isBlockingReviewFinding),
17
+ * the team prompt's listing and the ended-arm summary.
18
+ *
19
+ * A daemon-filed rework Bug (gate or shortfall) is never a review finding,
20
+ * whatever session it was credited to (isDaemonReworkIssue): it is owed work by
21
+ * construction.
6
22
  *
7
23
  * Kept apart from the facts READ so a pure caller (the team prompt's listing,
8
24
  * the reconcile writers) does not import the API client.
@@ -10,17 +26,38 @@
10
26
  * @module queries/focus-review/recorded-concern-ids
11
27
  */
12
28
  import type { ReviewFindingClass } from './review-finding-facts.js';
29
+ /**
30
+ * MIRROR of _shared/review-finding-class.ts findingClassOf. The class of one
31
+ * issue under the rule: null = not a review finding (ordinary owed work);
32
+ * 'blocking' = review-filed and recorded blocking (a not_met criterion names
33
+ * it); 'concern' = review-filed and anything else -- recorded concern, or no
34
+ * class reached the reader (an older edge's link-less review). Pure.
35
+ */
36
+ export declare function findingClassOf(issueId: string, reviewFiledIds: ReadonlySet<string>, findingClasses: ReadonlyMap<string, ReviewFindingClass>): ReviewFindingClass | null;
37
+ /** MIRROR of _shared/review-finding-class.ts isBlockingFinding: only a recorded 'blocking' blocks. Pure. */
38
+ export declare function isBlockingFinding(issueId: string, findingClasses: ReadonlyMap<string, ReviewFindingClass>): boolean;
39
+ /**
40
+ * Whether an issue is a daemon-filed rework Bug -- a failed gate's
41
+ * (isGateReworkIssue) or a verify shortfall's (isShortfallReworkIssue). Such a
42
+ * Bug is owed work by construction and is never a review finding, even when an
43
+ * older edge credited it to a review session that was live when it was filed.
44
+ * An issue whose title is not known is not one. Pure.
45
+ */
46
+ export declare function isDaemonReworkIssue(issue: {
47
+ title?: string | null;
48
+ }): boolean;
13
49
  /** The facts as the pure helpers below read them (a FocusReviewFindingFacts, or the review exit's id set + classes). */
14
50
  export interface ReviewFindingFactsView {
15
51
  issueIds: Iterable<string>;
16
52
  findingClasses: ReadonlyMap<string, ReviewFindingClass>;
17
53
  }
18
54
  /**
19
- * Pure: the ids of the RECORDED CONCERNS among the facts -- review-filed (in
20
- * `issueIds`) AND recorded with class `concern`. An issue with no recorded class
21
- * is NOT a concern: it stays owed work, exactly as before classes were recorded.
22
- * A concern is recorded for the human and the next arm; it is not the running
23
- * team's work (prompt-sections/prompt-listing.ts splitRecordedConcerns).
55
+ * Pure: the ids of the RECORDED CONCERNS among the facts -- every review-filed
56
+ * id (in `issueIds`) findingClassOf calls a concern: anything no not_met
57
+ * criterion names, an id with no class included. A concern is recorded for the
58
+ * human and the next arm; it is not the running team's work
59
+ * (prompt-sections/prompt-listing.ts splitRecordedConcerns). A caller holding
60
+ * the issues' titles also drops daemon rework Bugs (isDaemonReworkIssue).
24
61
  */
25
62
  export declare function recordedConcernIds(facts: ReviewFindingFactsView): Set<string>;
26
63
  /** One open recorded concern, as a human-facing summary names it. */
@@ -34,8 +71,8 @@ export interface OpenConcernSummary {
34
71
  * Pure: every OPEN recorded concern among `issues`, by key and title -- the
35
72
  * "Open concerns (recorded by review, not worked by this arm)" list a human reads
36
73
  * when the armed run ends (queries/focuses/ended-arm.ts `openConcerns`). Closed
37
- * concerns (Done / Verified / In Review / Cancelled ...) are not listed; an issue
38
- * with no recorded class is not a concern.
74
+ * concerns (Done / Verified / In Review / Cancelled ...) are not listed, nor is a
75
+ * daemon rework Bug.
39
76
  */
40
77
  export declare function openRecordedConcerns(issues: ReadonlyArray<{
41
78
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"recorded-concern-ids.d.ts","sourceRoot":"","sources":["../../../src/queries/focus-review/recorded-concern-ids.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,wHAAwH;AACxH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACzD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,MAAM,CAAC,CAM7E;AAED,qEAAqE;AACrE,MAAM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W,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACzD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,MAAM,CAAC,CAO7E;AAED,qEAAqE;AACrE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,EAC7G,KAAK,EAAE,sBAAsB,GAC5B,kBAAkB,EAAE,CAKtB"}
@@ -1,18 +1,48 @@
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/prompt/recorded-concerns-not-owed-work.test.ts
2
+ // Pinned by: packages/daemon/src/prompt/recorded-concerns-not-owed-work.test.ts,
3
+ // packages/daemon/src/queries/focus-review/review-finding-class-parity.test.ts
3
4
  // PINNED-BY-END
4
- import { OPEN_ISSUE_STATUSES } from '../../types/issue-status.js';
5
+ import { OPEN_ISSUE_STATUSES, isGateReworkIssue, isShortfallReworkIssue } from '../../types/issue-status.js';
5
6
  /**
6
- * Pure: the ids of the RECORDED CONCERNS among the facts -- review-filed (in
7
- * `issueIds`) AND recorded with class `concern`. An issue with no recorded class
8
- * is NOT a concern: it stays owed work, exactly as before classes were recorded.
9
- * A concern is recorded for the human and the next arm; it is not the running
10
- * team's work (prompt-sections/prompt-listing.ts splitRecordedConcerns).
7
+ * MIRROR of _shared/review-finding-class.ts findingClassOf. The class of one
8
+ * issue under the rule: null = not a review finding (ordinary owed work);
9
+ * 'blocking' = review-filed and recorded blocking (a not_met criterion names
10
+ * it); 'concern' = review-filed and anything else -- recorded concern, or no
11
+ * class reached the reader (an older edge's link-less review). Pure.
12
+ */
13
+ export function findingClassOf(issueId, reviewFiledIds, findingClasses) {
14
+ if (!reviewFiledIds.has(issueId))
15
+ return null;
16
+ return findingClasses.get(issueId) === 'blocking' ? 'blocking' : 'concern';
17
+ }
18
+ /** MIRROR of _shared/review-finding-class.ts isBlockingFinding: only a recorded 'blocking' blocks. Pure. */
19
+ export function isBlockingFinding(issueId, findingClasses) {
20
+ return findingClasses.get(issueId) === 'blocking';
21
+ }
22
+ /**
23
+ * Whether an issue is a daemon-filed rework Bug -- a failed gate's
24
+ * (isGateReworkIssue) or a verify shortfall's (isShortfallReworkIssue). Such a
25
+ * Bug is owed work by construction and is never a review finding, even when an
26
+ * older edge credited it to a review session that was live when it was filed.
27
+ * An issue whose title is not known is not one. Pure.
28
+ */
29
+ export function isDaemonReworkIssue(issue) {
30
+ const title = issue.title;
31
+ return typeof title === 'string' && (isGateReworkIssue({ title }) || isShortfallReworkIssue({ title }));
32
+ }
33
+ /**
34
+ * Pure: the ids of the RECORDED CONCERNS among the facts -- every review-filed
35
+ * id (in `issueIds`) findingClassOf calls a concern: anything no not_met
36
+ * criterion names, an id with no class included. A concern is recorded for the
37
+ * human and the next arm; it is not the running team's work
38
+ * (prompt-sections/prompt-listing.ts splitRecordedConcerns). A caller holding
39
+ * the issues' titles also drops daemon rework Bugs (isDaemonReworkIssue).
11
40
  */
12
41
  export function recordedConcernIds(facts) {
42
+ const filed = new Set(facts.issueIds);
13
43
  const concerns = new Set();
14
- for (const id of facts.issueIds) {
15
- if (facts.findingClasses.get(id) === 'concern')
44
+ for (const id of filed) {
45
+ if (findingClassOf(id, filed, facts.findingClasses) === 'concern')
16
46
  concerns.add(id);
17
47
  }
18
48
  return concerns;
@@ -21,13 +51,13 @@ export function recordedConcernIds(facts) {
21
51
  * Pure: every OPEN recorded concern among `issues`, by key and title -- the
22
52
  * "Open concerns (recorded by review, not worked by this arm)" list a human reads
23
53
  * when the armed run ends (queries/focuses/ended-arm.ts `openConcerns`). Closed
24
- * concerns (Done / Verified / In Review / Cancelled ...) are not listed; an issue
25
- * with no recorded class is not a concern.
54
+ * concerns (Done / Verified / In Review / Cancelled ...) are not listed, nor is a
55
+ * daemon rework Bug.
26
56
  */
27
57
  export function openRecordedConcerns(issues, facts) {
28
58
  const concernIds = recordedConcernIds(facts);
29
59
  return issues
30
- .filter((i) => concernIds.has(i.id) && OPEN_ISSUE_STATUSES.has(i.status))
60
+ .filter((i) => concernIds.has(i.id) && !isDaemonReworkIssue(i) && OPEN_ISSUE_STATUSES.has(i.status))
31
61
  .map((i) => ({ id: i.id, key: i.key, title: i.title, deliveryId: i.deliveryId ?? null }));
32
62
  }
33
63
  //# sourceMappingURL=recorded-concern-ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recorded-concern-ids.js","sourceRoot":"","sources":["../../../src/queries/focus-review/recorded-concern-ids.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gFAAgF;AAChF,gBAAgB;AAehB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAQlE;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA6B;IAC9D,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,SAAS;YAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAUD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAA6G,EAC7G,KAA6B;IAE7B,MAAM,UAAU,GA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ERION_VERDICTS_ACTION = "daemon_list_review_criterion_verdicts";
3
+ /** A review's verdict on one criterion (one element of focus_reviews.criterion_verdicts). */
4
+ export interface CriterionVerdictRecord {
5
+ /** `node:<uuid>` for a tree criterion, `text:<normalized>` for a declared one. */
6
+ criterionKey: string;
7
+ nodeId: string | null;
8
+ source: 'tree' | 'delivery' | 'focus';
9
+ criterion: string;
10
+ verdict: 'met' | 'not_met' | 'excused';
11
+ /** The issues a not_met verdict names. */
12
+ issueIds: string[];
13
+ }
14
+ /** One completed, verdict-bearing review under the arm. */
15
+ export interface ReviewVerdictRecord {
16
+ reviewId: string;
17
+ completedAt: string;
18
+ outcome: string;
19
+ criterionVerdicts: CriterionVerdictRecord[];
20
+ /**
21
+ * The agreed criteria the review left WITHOUT a verdict, by criterion key (a
22
+ * gaps_found may leave some). [] when it judged every criterion -- and on an
23
+ * older edge or a review stored before the edge recorded them, which
24
+ * therefore read as fully judged.
25
+ */
26
+ unjudgedCriterionKeys?: string[];
27
+ /** The review's stored blocking set; null = its not_met verdicts named no issue (nothing blocks). */
28
+ blockingIssueIds: string[] | null;
29
+ createdIssueIds: string[];
30
+ /** The focus-branch commit the review judged; absent/null when unrecorded or on an older edge. */
31
+ reviewedSha?: string | null;
32
+ /** The review's summary markdown (each verdict's reasoning); absent/null when none or on an older edge. */
33
+ summary?: string | null;
34
+ }
35
+ /** The focus's verdict-bearing reviews since its arm, newest first, at most `limit`. Throws on failure. */
36
+ export declare function listReviewCriterionVerdicts(focusId: string, limit: number): Promise<ReviewVerdictRecord[]>;
37
+ //# sourceMappingURL=review-criterion-verdicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-criterion-verdicts.d.ts","sourceRoot":"","sources":["../../../src/queries/focus-review/review-criterion-verdicts.ts"],"names":[],"mappings":"AA2BA,oCAAoC;AACpC,eAAO,MAAM,qCAAqC,0CAA0C,CAAC;AAE7F,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,kFAAkF;IAClF,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;IACvC,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,qGAAqG;IACrG,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2GAA2G;IAC3G,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAyBD,2GAA2G;AAC3G,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAiBhH"}
@@ -0,0 +1,64 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/completion/review-cycle-budget/review-cycle-cap-regression.test.ts,
3
+ // packages/daemon/src/completion/review-cycle-budget/review-loop-detection.test.ts,
4
+ // packages/daemon/src/queries/focus-review/review-criterion-verdicts.test.ts,
5
+ // packages/daemon/src/supervision/review-loop-detector.test.ts,
6
+ // packages/daemon/src/tower/tower-supervisor.test.ts
7
+ // PINNED-BY-END
8
+ /**
9
+ * The read of a focus's per-criterion review verdicts: product-api
10
+ * `daemon_list_review_criterion_verdicts`, which answers the focus's
11
+ * verdict-bearing reviews completed since the arm instant, NEWEST FIRST, each
12
+ * with focus_reviews.criterion_verdicts and its stored blocking / created
13
+ * issue ids. A focus with no arm stamp answers none (the history starts at the
14
+ * arm, as the criterion-reopening history does).
15
+ *
16
+ * The review-loop detector decides on it
17
+ * (supervision/review-loop-detector.ts). Throws on a failed call or a
18
+ * malformed answer; the caller (completion/review-cycle-budget/review-loop-detection.ts)
19
+ * owns swallowing it.
20
+ *
21
+ * @module queries/focus-review/review-criterion-verdicts
22
+ */
23
+ import { z } from 'zod';
24
+ import { callApiValidated } from '../api-client/shared.js';
25
+ /** The action this module calls. */
26
+ export const LIST_REVIEW_CRITERION_VERDICTS_ACTION = 'daemon_list_review_criterion_verdicts';
27
+ const VerdictSchema = z.object({
28
+ criterionKey: z.string(),
29
+ nodeId: z.string().nullable(),
30
+ source: z.enum(['tree', 'delivery', 'focus']),
31
+ criterion: z.string(),
32
+ verdict: z.enum(['met', 'not_met', 'excused']),
33
+ issueIds: z.array(z.string()),
34
+ }).passthrough();
35
+ const ReviewSchema = z.object({
36
+ reviewId: z.string(),
37
+ completedAt: z.string(),
38
+ outcome: z.string(),
39
+ criterionVerdicts: z.array(VerdictSchema),
40
+ unjudgedCriterionKeys: z.array(z.string()).optional(),
41
+ blockingIssueIds: z.array(z.string()).nullable(),
42
+ createdIssueIds: z.array(z.string()),
43
+ reviewedSha: z.string().nullable().optional(),
44
+ summary: z.string().nullable().optional(),
45
+ }).passthrough();
46
+ const ResponseSchema = z.object({ reviews: z.array(ReviewSchema) }).passthrough();
47
+ /** The focus's verdict-bearing reviews since its arm, newest first, at most `limit`. Throws on failure. */
48
+ export async function listReviewCriterionVerdicts(focusId, limit) {
49
+ const res = await callApiValidated(LIST_REVIEW_CRITERION_VERDICTS_ACTION, ResponseSchema, { focusId, limit });
50
+ return res.reviews.map((r) => ({
51
+ reviewId: r.reviewId,
52
+ completedAt: r.completedAt,
53
+ outcome: r.outcome,
54
+ criterionVerdicts: r.criterionVerdicts.map((v) => ({
55
+ criterionKey: v.criterionKey, nodeId: v.nodeId, source: v.source, criterion: v.criterion, verdict: v.verdict, issueIds: v.issueIds,
56
+ })),
57
+ unjudgedCriterionKeys: r.unjudgedCriterionKeys ?? [],
58
+ blockingIssueIds: r.blockingIssueIds,
59
+ createdIssueIds: r.createdIssueIds,
60
+ reviewedSha: r.reviewedSha ?? null,
61
+ summary: r.summary ?? null,
62
+ }));
63
+ }
64
+ //# sourceMappingURL=review-criterion-verdicts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-criterion-verdicts.js","sourceRoot":"","sources":["../../../src/queries/focus-review/review-criterion-verdicts.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,qGAAqG;AACrG,sFAAsF;AACtF,gFAAgF;AAChF,kEAAkE;AAClE,uDAAuD;AACvD,gBAAgB;AAEhB;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,oCAAoC;AACpC,MAAM,CAAC,MAAM,qCAAqC,GAAG,uCAAuC,CAAC;AAoC7F,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B,C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AE,CAAC,CAAC,OAAO;QAClB,iBAAiB,EAAE,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACjD,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ;SACnI,CAAC,CAAC;QACH,qBAAqB,EAAE,CAAC,CAAC,qBAAqB,IAAI,EAAE;QACpD,gBAAgB,EAAE,CAAC,CAAC,gBAAgB;QACpC,eAAe,EAAE,CAAC,CAAC,eAAe;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,IAAI;QAClC,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -7,12 +7,17 @@
7
7
  * `focus_review_filed_issue_ids` returns `issueIds: string[]` and, from the edge
8
8
  * that records finding classes on, `findingClasses: Record<issueId,
9
9
  * 'blocking' | 'concern'>`. An OLDER edge omits `findingClasses`; that reads as
10
- * an empty map, so every finding falls back to the priority rule
11
- * (completion/review-exit/review-defect-detector.ts isBlockingReviewFinding). An issue
12
- * absent from the map likewise has no recorded fact.
10
+ * an empty map, and under the one rule (recorded-concern-ids.ts findingClassOf)
11
+ * every review-filed issue with no recorded 'blocking' is a concern -- the
12
+ * absence of a naming is never a naming.
13
13
  *
14
- * The response is validated (zod) -- a malformed class value throws, and the
15
- * caller's best-effort read degrades exactly as a failed id read does.
14
+ * The response is validated (zod) -- a malformed class value throws.
15
+ *
16
+ * A READ THAT FAILS THROWS. No earlier answer stands in for it: the facts
17
+ * change whenever a review is recorded, and facts kept from before that review
18
+ * can call a finding it re-judged blocking a concern. Every reader that cannot
19
+ * read the classes DEFERS its decision instead (delivery/recorded-concerns.ts;
20
+ * the review exit's findingFactsUnreadable).
16
21
  *
17
22
  * @module queries/focus-review/review-finding-facts
18
23
  */
@@ -39,6 +44,13 @@ export interface FocusReviewFindingFacts {
39
44
  }
40
45
  /** Pure: normalize a validated response (missing keys -> empty). Exported for tests. */
41
46
  export declare function toReviewFindingFacts(response: z.infer<typeof FocusReviewFindingFactsResponseSchema>): FocusReviewFindingFacts;
42
- /** Read the focus-wide review-filed issue ids AND their recorded finding classes. */
47
+ /** The wire shape of focus_review_filed_issue_ids. */
48
+ export type FocusReviewFindingFactsResponse = z.infer<typeof FocusReviewFindingFactsResponseSchema>;
49
+ /**
50
+ * Read the focus-wide review-filed issue ids AND their recorded finding classes
51
+ * through `read`. Throws when the read fails (module header).
52
+ */
53
+ export declare function readFocusReviewFindingFactsVia(focusId: string, read: (focusId: string) => Promise<FocusReviewFindingFactsResponse>): Promise<FocusReviewFindingFacts>;
54
+ /** Read the focus-wide review-filed issue ids AND their recorded finding classes over the API. */
43
55
  export declare function getFocusReviewFindingFacts(focusId: string): Promise<FocusReviewFindingFacts>;
44
56
  //# sourceMappingURL=review-finding-facts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-finding-facts.d.ts","sourceRoot":"","sources":["../../../src/queries/focus-review/review-finding-facts.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAC;AAIxD,wGAAwG;AACxG,eAAO,MAAM,qCAAqC;;;;;;iBAGlC,CAAC;AAEjB,sFAAsF;AACtF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACjD;AAED,wFAAwF;AACxF,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,GAC9D,uBAAuB,CAKzB;AAED,qFAAqF;AACrF,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAOlG"}
1
+ {"version":3,"file":"review-finding-facts.d.ts","sourceRoot":"","sources":["../../../src/queries/focus-review/review-finding-facts.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAC;AAIxD,wGAAwG;AACxG,eAAO,MAAM,qCAAqC;;;;;;iBAGlC,CAAC;AAEjB,sFAAsF;AACtF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACjD;AAED,wFAAwF;AACxF,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,GAC9D,uBAAuB,CAKzB;AAED,sDAAsD;AACtD,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,+BAA+B,CAAC,GAClE,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED,kGAAkG;AAClG,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAIlG"}
@@ -2,8 +2,10 @@
2
2
  // Pinned by: packages/daemon/src/completion/review-exit/review-finding-blocking-predicate.test.ts,
3
3
  // packages/daemon/src/completion/review-exit/review-finding-class-routing.test.ts,
4
4
  // packages/daemon/src/delivery/recorded-concerns.test.ts,
5
+ // packages/daemon/src/integration/f114-review-concern-never-holds-done-regression.test.ts,
5
6
  // packages/daemon/src/integration/reopening-routing-regression.test.ts,
6
7
  // packages/daemon/src/prompt/recorded-concerns-not-owed-work.test.ts,
8
+ // packages/daemon/src/queries/focus-review/review-finding-class-parity.test.ts,
7
9
  // packages/daemon/src/spawn/resolve-review-context.test.ts
8
10
  // PINNED-BY-END
9
11
  /**
@@ -15,12 +17,17 @@
15
17
  * `focus_review_filed_issue_ids` returns `issueIds: string[]` and, from the edge
16
18
  * that records finding classes on, `findingClasses: Record<issueId,
17
19
  * 'blocking' | 'concern'>`. An OLDER edge omits `findingClasses`; that reads as
18
- * an empty map, so every finding falls back to the priority rule
19
- * (completion/review-exit/review-defect-detector.ts isBlockingReviewFinding). An issue
20
- * absent from the map likewise has no recorded fact.
20
+ * an empty map, and under the one rule (recorded-concern-ids.ts findingClassOf)
21
+ * every review-filed issue with no recorded 'blocking' is a concern -- the
22
+ * absence of a naming is never a naming.
21
23
  *
22
- * The response is validated (zod) -- a malformed class value throws, and the
23
- * caller's best-effort read degrades exactly as a failed id read does.
24
+ * The response is validated (zod) -- a malformed class value throws.
25
+ *
26
+ * A READ THAT FAILS THROWS. No earlier answer stands in for it: the facts
27
+ * change whenever a review is recorded, and facts kept from before that review
28
+ * can call a finding it re-judged blocking a concern. Every reader that cannot
29
+ * read the classes DEFERS its decision instead (delivery/recorded-concerns.ts;
30
+ * the review exit's findingFactsUnreadable).
24
31
  *
25
32
  * @module queries/focus-review/review-finding-facts
26
33
  */
@@ -39,9 +46,15 @@ export function toReviewFindingFacts(response) {
39
46
  findingClasses: new Map(Object.entries(response.findingClasses ?? {})),
40
47
  };
41
48
  }
42
- /** Read the focus-wide review-filed issue ids AND their recorded finding classes. */
49
+ /**
50
+ * Read the focus-wide review-filed issue ids AND their recorded finding classes
51
+ * through `read`. Throws when the read fails (module header).
52
+ */
53
+ export async function readFocusReviewFindingFactsVia(focusId, read) {
54
+ return toReviewFindingFacts(await read(focusId));
55
+ }
56
+ /** Read the focus-wide review-filed issue ids AND their recorded finding classes over the API. */
43
57
  export async function getFocusReviewFindingFacts(focusId) {
44
- const response = await callApiValidated('focus_review_filed_issue_ids', FocusReviewFindingFactsResponseSchema, { focusId });
45
- return toReviewFindingFacts(response);
58
+ return readFocusReviewFindingFactsVia(focusId, (id) => callApiValidated('focus_review_filed_issue_ids', FocusReviewFindingFactsResponseSchema, { focusId: id }));
46
59
  }
47
60
  //# sourceMappingURL=review-finding-facts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-finding-facts.js","sourceRoot":"","sources":["../../../src/queries/focus-review/review-finding-facts.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,mGAAmG;AACnG,qFAAqF;AACrF,4DAA4D;AAC5D,0EAA0E;AAC1E,wEAAwE;AACxE,6DAA6D;AAC7D,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAS3D,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAEjE,wGAAwG;AACxG,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACvC,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,wBAAwB,CAAC,CAAC,OAAO,EAAE;CACzE,CAAC,CAAC,WAAW,EAAE,CAAC;AAQjB,wFAAwF;AACxF,MAAM,UAAU,oBAAoB,CAClC,QAA+D;IAE/D,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,QAAQ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AQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,EAAE;QACjC,cAAc,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;KACvE,CAAC;AACJ,CAAC;AAKD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,OAAe,EACf,IAAmE;IAEnE,OAAO,oBAAoB,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,kGAAkG;AAClG,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,OAAe;IAC9D,OAAO,8BAA8B,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CACpD,gBAAgB,CAAC,8BAA8B,EAAE,qCAAqC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACzG,CAAC;AACJ,CAAC"}
@@ -16,20 +16,37 @@
16
16
  * The ended-arm record that rides a release, stating WHY the daemon ended the
17
17
  * arm and what was still outstanding.
18
18
  *
19
- * The DAEMON writes ONE reason: 'review_budget_spent'. It is sent in the SAME
20
- * call as the release (the edge refuses it otherwise, handlers/focus/arm-ended.ts)
21
- * so the role-less focus is never readable without its reason, and so the record
22
- * can never be mistaken for the operator stop (operator_stopped_at, which this
23
- * path does not write).
19
+ * EVERY daemon release carries one (releaseFocusArm takes it as a required
20
+ * argument): no focus is un-armed by the daemon with a null reason. The daemon
21
+ * writes TWO reasons, 'review_budget_spent' and 'run_finished_unreviewed', each
22
+ * in the SAME call as the release (the edge refuses it otherwise,
23
+ * handlers/focus/arm-ended.ts) so the role-less focus is never readable without
24
+ * its reason, and so the record can never be mistaken for the operator stop
25
+ * (operator_stopped_at, which these paths do not write).
24
26
  *
25
27
  * `detail` carries only what the DAEMON counted. The edge adds the acceptance
26
28
  * criteria the last verdict-bearing review called not_met -- it owns the shape
27
29
  * that record lives in -- so this daemon never parses a review summary.
28
- *
29
- * ARM_ENDED_REVIEW_BUDGET_SPENT is a value the DB CHECK constraint on
30
- * product_focuses.arm_ended_reason allows and the wedge diagnosis reads back.
31
30
  */
32
31
  export declare const ARM_ENDED_REVIEW_BUDGET_SPENT = "review_budget_spent";
32
+ /**
33
+ * The UNREVIEWED SETTLE end: every delivery settled while the review window the
34
+ * focus opened never received a verdict, so the daemon released the stranded
35
+ * arm and kept the window open (supervision/unreviewed-settle-detector.ts). A
36
+ * finish -- the covered work is terminal -- but one whose review is still owed,
37
+ * which a re-arm runs.
38
+ */
39
+ export declare const ARM_ENDED_RUN_FINISHED_UNREVIEWED = "run_finished_unreviewed";
40
+ /**
41
+ * The LIFECYCLE end with nothing left over: every delivery the arm covered is
42
+ * terminal and the clear discounted no recorded work. Written ONLY by SQL -- the
43
+ * lifecycle arm clear (auto_terminate_focus_team /
44
+ * clear_focus_team_on_review_window_close, migration 20261020133821) in the same
45
+ * write that nulls the role, whatever closed the review window (a verdict, a
46
+ * deadline, the hand-off breaker, the spent-budget path) -- and never by this
47
+ * daemon.
48
+ */
49
+ export declare const ARM_ENDED_RUN_FINISHED = "run_finished";
33
50
  /**
34
51
  * The LIFECYCLE end: the run finished every delivery its arm covered while one
35
52
  * or more deliveries recorded as new intent under it still rest at planning.
@@ -45,12 +62,13 @@ export declare const ARM_ENDED_REVIEW_BUDGET_SPENT = "review_budget_spent";
45
62
  */
46
63
  export declare const ARM_ENDED_RUN_FINISHED_RECORDED_WORK_WAITS = "run_finished_recorded_work_waits";
47
64
  /** Every reason product_focuses.arm_ended_reason may hold (the DB CHECK set). */
48
- export type ArmEndedReason = typeof ARM_ENDED_REVIEW_BUDGET_SPENT | typeof ARM_ENDED_RUN_FINISHED_RECORDED_WORK_WAITS;
65
+ export type ArmEndedReason = typeof ARM_ENDED_REVIEW_BUDGET_SPENT | typeof ARM_ENDED_RUN_FINISHED | typeof ARM_ENDED_RUN_FINISHED_RECORDED_WORK_WAITS | typeof ARM_ENDED_RUN_FINISHED_UNREVIEWED;
49
66
  /**
50
- * True when the recorded reason is the LIFECYCLE end -- the run finished its
51
- * covered work and the recorded work waits for the next arm. False for a spent
52
- * budget, for no reason at all, and for any value this daemon does not know
53
- * (an unknown reason is never read as a finish).
67
+ * True when the recorded reason says the run FINISHED its covered work: the
68
+ * lifecycle clear (with or without recorded work waiting for the next arm) or
69
+ * the unreviewed settle. False for a spent budget, for no reason at all, and
70
+ * for any value this daemon does not know (an unknown reason is never read as
71
+ * a finish).
54
72
  */
55
73
  export declare function isRunFinishedArmEnd(reason: string | null | undefined): boolean;
56
74
  /** One delivery recorded as new intent under the arm that ended, as the record names it. */
@@ -76,6 +94,15 @@ export interface RecordedWorkWaitsDetail {
76
94
  * unnamed. A missing or non-numeric count falls back to the parsed list length.
77
95
  */
78
96
  export declare function parseRecordedWorkWaitsDetail(detail: unknown): RecordedWorkWaitsDetail | null;
97
+ /**
98
+ * How the spent-budget record's findings were arrived at. Absent = measured at
99
+ * the review exit that spent the budget. 'not_measured' = the release was
100
+ * re-attempted by the backstop (completion/review-cycle-budget/spent-budget-release.ts)
101
+ * with no exit measurement in hand, so the empty lists are an ABSENCE, not a
102
+ * measurement.
103
+ */
104
+ export type SpentBudgetFindingsBasis = 'not_measured';
105
+ /** The spent-review-budget record (reason 'review_budget_spent'). */
79
106
  export interface EndedArmRecord {
80
107
  reason: typeof ARM_ENDED_REVIEW_BUDGET_SPENT;
81
108
  detail: {
@@ -102,6 +129,22 @@ export interface EndedArmRecord {
102
129
  title: string;
103
130
  deliveryId: string | null;
104
131
  }>;
132
+ /** See SpentBudgetFindingsBasis; absent when the lists were measured at the exit. */
133
+ findingsBasis?: SpentBudgetFindingsBasis;
134
+ };
135
+ }
136
+ /** The unreviewed-settle record (reason 'run_finished_unreviewed'). */
137
+ export interface UnreviewedSettleArmRecord {
138
+ reason: typeof ARM_ENDED_RUN_FINISHED_UNREVIEWED;
139
+ detail: {
140
+ /** The settled deliveries whose review verdict was never rendered. */
141
+ settledDeliveries: Array<{
142
+ id: string;
143
+ name: string;
144
+ executionStatus: string | null;
145
+ }>;
105
146
  };
106
147
  }
148
+ /** Every record a daemon release may carry -- one is REQUIRED (releaseFocusArm). */
149
+ export type DaemonEndedArmRecord = EndedArmRecord | UnreviewedSettleArmRecord;
107
150
  //# sourceMappingURL=ended-arm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ended-arm.d.ts","sourceRoot":"","sources":["../../../src/queries/focuses/ended-arm.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0CAA0C,qCAAqC,CAAC;AAE7F,iFAAiF;AACjF,MAAM,MAAM,cAAc,GACtB,OAAO,6BAA6B,GACpC,OAAO,0CAA0C,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE9E;AAED,4FAA4F;AAC5F,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;IAC1C,gGAAgG;IAChG,KAAK,EAAE,MAAM,CAAC;CACf;AAMD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,CAY5F;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,6BAA6B,CAAC;IAC7C,MAAM,EAAE;QACN,mEAAmE;QACnE,gBAAgB,EAAE,MAAM,CAAC;QACzB,sDAAsD;QACtD,GAAG,EAAE,MAAM,CAAC;QACZ,yFAAyF;QACzF,oBAAoB,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,GAAG,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,uBAAuB,GAAG,IAAI,CAY5F;AAED;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC;AAEtD,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,6BAA6B,CAAC;IAC7C,MAAM,EAAE;QACN,mEAAmE;QACnE,gBAAgB,EAAE,MAAM,CAAC;QACzB,sDAAsD;QACtD,GAAG,EAAE,MAAM,CAAC;QACZ,yFAAyF;QACzF,oBAAoB,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC,CAAC;QACnG;;;;;WAKG;QACH,YAAY,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC,CAAC;QAC3F,qFAAqF;QACrF,aAAa,CAAC,EAAE,wBAAwB,CAAC;KAC1C,CAAC;CACH;AAED,uEAAuE;AACvE,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,OAAO,iCAAiC,CAAC;IACjD,MAAM,EAAE;QACN,sEAAsE;QACtE,iBAAiB,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC,CAAC;KACxF,CAAC;CACH;AAED,oFAAoF;AACpF,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,yBAAyB,CAAC"}
@@ -1,7 +1,9 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
2
  // Pinned by: packages/daemon/src/completion/review-cycle-budget/review-cycle-cap-regression.test.ts,
3
3
  // packages/daemon/src/completion/review-cycle-budget/review-cycle-churn-meter.test.ts,
4
- // packages/daemon/src/focus/disarm-reaper.test.ts, packages/daemon/src/queries/focuses/ended-arm.test.ts
4
+ // packages/daemon/src/completion/review-cycle-budget/spent-budget-release.test.ts,
5
+ // packages/daemon/src/focus/disarm-reaper.test.ts, packages/daemon/src/queries/focuses/ended-arm.test.ts,
6
+ // packages/daemon/src/supervision/unreviewed-settle-detector.test.ts
5
7
  // PINNED-BY-END
6
8
  /**
7
9
  * The ENDED-ARM record: the shape the daemon sends with a release to state WHY
@@ -21,20 +23,37 @@
21
23
  * The ended-arm record that rides a release, stating WHY the daemon ended the
22
24
  * arm and what was still outstanding.
23
25
  *
24
- * The DAEMON writes ONE reason: 'review_budget_spent'. It is sent in the SAME
25
- * call as the release (the edge refuses it otherwise, handlers/focus/arm-ended.ts)
26
- * so the role-less focus is never readable without its reason, and so the record
27
- * can never be mistaken for the operator stop (operator_stopped_at, which this
28
- * path does not write).
26
+ * EVERY daemon release carries one (releaseFocusArm takes it as a required
27
+ * argument): no focus is un-armed by the daemon with a null reason. The daemon
28
+ * writes TWO reasons, 'review_budget_spent' and 'run_finished_unreviewed', each
29
+ * in the SAME call as the release (the edge refuses it otherwise,
30
+ * handlers/focus/arm-ended.ts) so the role-less focus is never readable without
31
+ * its reason, and so the record can never be mistaken for the operator stop
32
+ * (operator_stopped_at, which these paths do not write).
29
33
  *
30
34
  * `detail` carries only what the DAEMON counted. The edge adds the acceptance
31
35
  * criteria the last verdict-bearing review called not_met -- it owns the shape
32
36
  * that record lives in -- so this daemon never parses a review summary.
33
- *
34
- * ARM_ENDED_REVIEW_BUDGET_SPENT is a value the DB CHECK constraint on
35
- * product_focuses.arm_ended_reason allows and the wedge diagnosis reads back.
36
37
  */
37
38
  export const ARM_ENDED_REVIEW_BUDGET_SPENT = 'review_budget_spent';
39
+ /**
40
+ * The UNREVIEWED SETTLE end: every delivery settled while the review window the
41
+ * focus opened never received a verdict, so the daemon released the stranded
42
+ * arm and kept the window open (supervision/unreviewed-settle-detector.ts). A
43
+ * finish -- the covered work is terminal -- but one whose review is still owed,
44
+ * which a re-arm runs.
45
+ */
46
+ export const ARM_ENDED_RUN_FINISHED_UNREVIEWED = 'run_finished_unreviewed';
47
+ /**
48
+ * The LIFECYCLE end with nothing left over: every delivery the arm covered is
49
+ * terminal and the clear discounted no recorded work. Written ONLY by SQL -- the
50
+ * lifecycle arm clear (auto_terminate_focus_team /
51
+ * clear_focus_team_on_review_window_close, migration 20261020133821) in the same
52
+ * write that nulls the role, whatever closed the review window (a verdict, a
53
+ * deadline, the hand-off breaker, the spent-budget path) -- and never by this
54
+ * daemon.
55
+ */
56
+ export const ARM_ENDED_RUN_FINISHED = 'run_finished';
38
57
  /**
39
58
  * The LIFECYCLE end: the run finished every delivery its arm covered while one
40
59
  * or more deliveries recorded as new intent under it still rest at planning.
@@ -49,14 +68,21 @@ export const ARM_ENDED_REVIEW_BUDGET_SPENT = 'review_budget_spent';
49
68
  * constants; never read "any non-null reason" as one meaning.
50
69
  */
51
70
  export const ARM_ENDED_RUN_FINISHED_RECORDED_WORK_WAITS = 'run_finished_recorded_work_waits';
71
+ /** The reasons that say the run FINISHED its covered work (every covered delivery terminal). */
72
+ const RUN_FINISHED_REASONS = new Set([
73
+ ARM_ENDED_RUN_FINISHED,
74
+ ARM_ENDED_RUN_FINISHED_RECORDED_WORK_WAITS,
75
+ ARM_ENDED_RUN_FINISHED_UNREVIEWED,
76
+ ]);
52
77
  /**
53
- * True when the recorded reason is the LIFECYCLE end -- the run finished its
54
- * covered work and the recorded work waits for the next arm. False for a spent
55
- * budget, for no reason at all, and for any value this daemon does not know
56
- * (an unknown reason is never read as a finish).
78
+ * True when the recorded reason says the run FINISHED its covered work: the
79
+ * lifecycle clear (with or without recorded work waiting for the next arm) or
80
+ * the unreviewed settle. False for a spent budget, for no reason at all, and
81
+ * for any value this daemon does not know (an unknown reason is never read as
82
+ * a finish).
57
83
  */
58
84
  export function isRunFinishedArmEnd(reason) {
59
- return reason === ARM_ENDED_RUN_FINISHED_RECORDED_WORK_WAITS;
85
+ return reason != null && RUN_FINISHED_REASONS.has(reason);
60
86
  }
61
87
  function isRecord(value) {
62
88
  return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -1 +1 @@
1
- {"version":3,"file":"ended-arm.js","sourceRoot":"","sources":["../../../src/queries/focuses/ended-arm.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,qGAAqG;AACrG,yFAAyF;AACzF,2GAA2G;AAC3G,gBAAgB;AAEhB;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,kCAAkC,CAAC;AAO7F;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAiC;IACnE,OAAO,MAAM,KAAK,0CAA0C,CAAC;AAC/D,CAAC;AAmBD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAAC,MAAe;IAC1D,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC;QAAE,OAAO,IAAI,CAAC;IAChF,MAAM,kBAAkB,GAA0B,EAAE,CAAC;IACrD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAC;QAC9C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,IAAI,KAAK,CAAC,EAAE,KAAK,EAAE;YAAE,SAAS;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