@telora/daemon 0.21.98 → 0.21.144

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 (416) hide show
  1. package/build-info.json +6 -3
  2. package/dist/audit/audit-hooks.d.ts +120 -5
  3. package/dist/audit/audit-hooks.d.ts.map +1 -1
  4. package/dist/audit/audit-hooks.js +205 -45
  5. package/dist/audit/audit-hooks.js.map +1 -1
  6. package/dist/ci/ci-escalation.js +1 -1
  7. package/dist/ci/ci-escalation.js.map +1 -1
  8. package/dist/ci/ci-sensor-loop.d.ts +30 -0
  9. package/dist/ci/ci-sensor-loop.d.ts.map +1 -1
  10. package/dist/ci/ci-sensor-loop.js +85 -12
  11. package/dist/ci/ci-sensor-loop.js.map +1 -1
  12. package/dist/cli/connect/config-write.d.ts +87 -0
  13. package/dist/cli/connect/config-write.d.ts.map +1 -0
  14. package/dist/cli/connect/config-write.js +255 -0
  15. package/dist/cli/connect/config-write.js.map +1 -0
  16. package/dist/cli/connect/registration.d.ts +76 -0
  17. package/dist/cli/connect/registration.d.ts.map +1 -0
  18. package/dist/cli/connect/registration.js +207 -0
  19. package/dist/cli/connect/registration.js.map +1 -0
  20. package/dist/cli/connect.d.ts +3 -141
  21. package/dist/cli/connect.d.ts.map +1 -1
  22. package/dist/cli/connect.js +9 -441
  23. package/dist/cli/connect.js.map +1 -1
  24. package/dist/completion/coverage-drift-state.d.ts +29 -2
  25. package/dist/completion/coverage-drift-state.d.ts.map +1 -1
  26. package/dist/completion/coverage-drift-state.js +42 -2
  27. package/dist/completion/coverage-drift-state.js.map +1 -1
  28. package/dist/completion/coverage-stabilized.d.ts +58 -0
  29. package/dist/completion/coverage-stabilized.d.ts.map +1 -0
  30. package/dist/completion/coverage-stabilized.js +84 -0
  31. package/dist/completion/coverage-stabilized.js.map +1 -0
  32. package/dist/completion/delivery-advancement-guard.d.ts +21 -0
  33. package/dist/completion/delivery-advancement-guard.d.ts.map +1 -1
  34. package/dist/completion/delivery-advancement-guard.js +31 -3
  35. package/dist/completion/delivery-advancement-guard.js.map +1 -1
  36. package/dist/completion/escalation-provenance.d.ts +2 -1
  37. package/dist/completion/escalation-provenance.d.ts.map +1 -1
  38. package/dist/completion/escalation-provenance.js +2 -1
  39. package/dist/completion/escalation-provenance.js.map +1 -1
  40. package/dist/completion/escalations.js +1 -1
  41. package/dist/completion/escalations.js.map +1 -1
  42. package/dist/completion/event-escalations.d.ts +16 -1
  43. package/dist/completion/event-escalations.d.ts.map +1 -1
  44. package/dist/completion/event-escalations.js +43 -5
  45. package/dist/completion/event-escalations.js.map +1 -1
  46. package/dist/completion/event-phases.d.ts.map +1 -1
  47. package/dist/completion/event-phases.js +5 -2
  48. package/dist/completion/event-phases.js.map +1 -1
  49. package/dist/completion/event.d.ts +1 -1
  50. package/dist/completion/event.d.ts.map +1 -1
  51. package/dist/completion/event.js +2 -2
  52. package/dist/completion/event.js.map +1 -1
  53. package/dist/completion/machine-remediable-demotion.d.ts +74 -0
  54. package/dist/completion/machine-remediable-demotion.d.ts.map +1 -0
  55. package/dist/completion/machine-remediable-demotion.js +148 -0
  56. package/dist/completion/machine-remediable-demotion.js.map +1 -0
  57. package/dist/completion/read-only-pristine.d.ts +1 -1
  58. package/dist/completion/read-only-pristine.d.ts.map +1 -1
  59. package/dist/completion/read-only-pristine.js +1 -1
  60. package/dist/completion/read-only-pristine.js.map +1 -1
  61. package/dist/completion/review-exit-escalations.d.ts +1 -1
  62. package/dist/completion/review-exit-escalations.d.ts.map +1 -1
  63. package/dist/completion/review-exit-phase.d.ts +5 -2
  64. package/dist/completion/review-exit-phase.d.ts.map +1 -1
  65. package/dist/completion/review-exit-phase.js +15 -8
  66. package/dist/completion/review-exit-phase.js.map +1 -1
  67. package/dist/completion/settle-injection-sweep.d.ts +55 -0
  68. package/dist/completion/settle-injection-sweep.d.ts.map +1 -0
  69. package/dist/completion/settle-injection-sweep.js +88 -0
  70. package/dist/completion/settle-injection-sweep.js.map +1 -0
  71. package/dist/completion/state-cascade.d.ts.map +1 -1
  72. package/dist/completion/state-cascade.js +42 -1
  73. package/dist/completion/state-cascade.js.map +1 -1
  74. package/dist/completion/status-advance-phase.d.ts.map +1 -1
  75. package/dist/completion/status-advance-phase.js +18 -0
  76. package/dist/completion/status-advance-phase.js.map +1 -1
  77. package/dist/completion/team-lifecycle.d.ts +42 -0
  78. package/dist/completion/team-lifecycle.d.ts.map +1 -1
  79. package/dist/completion/team-lifecycle.js +73 -1
  80. package/dist/completion/team-lifecycle.js.map +1 -1
  81. package/dist/delivery/delivery-advance-block.d.ts +1 -1
  82. package/dist/delivery/delivery-advance-block.d.ts.map +1 -1
  83. package/dist/delivery/delivery-advance-block.js +1 -1
  84. package/dist/delivery/delivery-advance-block.js.map +1 -1
  85. package/dist/delivery/delivery-lifecycle.d.ts +19 -33
  86. package/dist/delivery/delivery-lifecycle.d.ts.map +1 -1
  87. package/dist/delivery/delivery-lifecycle.js +20 -148
  88. package/dist/delivery/delivery-lifecycle.js.map +1 -1
  89. package/dist/delivery/delivery-merge-ops.d.ts +46 -0
  90. package/dist/delivery/delivery-merge-ops.d.ts.map +1 -0
  91. package/dist/delivery/delivery-merge-ops.js +154 -0
  92. package/dist/delivery/delivery-merge-ops.js.map +1 -0
  93. package/dist/delivery/delivery-reconciler-apply.d.ts +28 -0
  94. package/dist/delivery/delivery-reconciler-apply.d.ts.map +1 -1
  95. package/dist/delivery/delivery-reconciler-apply.js +30 -0
  96. package/dist/delivery/delivery-reconciler-apply.js.map +1 -1
  97. package/dist/delivery/delivery-reconciler-shadow.d.ts +1 -1
  98. package/dist/delivery/delivery-reconciler-shadow.d.ts.map +1 -1
  99. package/dist/delivery/delivery-reconciler-shadow.js +1 -1
  100. package/dist/delivery/delivery-reconciler-shadow.js.map +1 -1
  101. package/dist/delivery/delivery-reconciler.d.ts +7 -2
  102. package/dist/delivery/delivery-reconciler.d.ts.map +1 -1
  103. package/dist/delivery/delivery-reconciler.js +34 -5
  104. package/dist/delivery/delivery-reconciler.js.map +1 -1
  105. package/dist/delivery/external-hold-surface.d.ts +32 -0
  106. package/dist/delivery/external-hold-surface.d.ts.map +1 -0
  107. package/dist/delivery/external-hold-surface.js +67 -0
  108. package/dist/delivery/external-hold-surface.js.map +1 -0
  109. package/dist/delivery/external-hold.d.ts +21 -0
  110. package/dist/delivery/external-hold.d.ts.map +1 -1
  111. package/dist/delivery/external-hold.js +40 -5
  112. package/dist/delivery/external-hold.js.map +1 -1
  113. package/dist/delivery/operator-hold.d.ts +1 -1
  114. package/dist/delivery/operator-hold.d.ts.map +1 -1
  115. package/dist/delivery/paused-revival.d.ts +140 -0
  116. package/dist/delivery/paused-revival.d.ts.map +1 -0
  117. package/dist/delivery/paused-revival.js +230 -0
  118. package/dist/delivery/paused-revival.js.map +1 -0
  119. package/dist/delivery/wait-reachability.d.ts.map +1 -1
  120. package/dist/delivery/wait-reachability.js +11 -0
  121. package/dist/delivery/wait-reachability.js.map +1 -1
  122. package/dist/directive/close-loop-dispatcher.d.ts +16 -263
  123. package/dist/directive/close-loop-dispatcher.d.ts.map +1 -1
  124. package/dist/directive/close-loop-dispatcher.js +21 -259
  125. package/dist/directive/close-loop-dispatcher.js.map +1 -1
  126. package/dist/directive/directive-dispatch.d.ts +20 -1
  127. package/dist/directive/directive-dispatch.d.ts.map +1 -1
  128. package/dist/directive/directive-dispatch.js +19 -1
  129. package/dist/directive/directive-dispatch.js.map +1 -1
  130. package/dist/directive/directive-executor.d.ts +1 -3
  131. package/dist/directive/directive-executor.d.ts.map +1 -1
  132. package/dist/directive/directive-executor.js +24 -22
  133. package/dist/directive/directive-executor.js.map +1 -1
  134. package/dist/directive/phase-sync.d.ts +28 -15
  135. package/dist/directive/phase-sync.d.ts.map +1 -1
  136. package/dist/directive/phase-sync.js +28 -36
  137. package/dist/directive/phase-sync.js.map +1 -1
  138. package/dist/directive/resolver-dispatch.d.ts +19 -92
  139. package/dist/directive/resolver-dispatch.d.ts.map +1 -1
  140. package/dist/directive/resolver-dispatch.js +19 -65
  141. package/dist/directive/resolver-dispatch.js.map +1 -1
  142. package/dist/drift/staleness-sensor.js +1 -1
  143. package/dist/drift/staleness-sensor.js.map +1 -1
  144. package/dist/focus/focus-engine.d.ts.map +1 -1
  145. package/dist/focus/focus-engine.js +29 -2
  146. package/dist/focus/focus-engine.js.map +1 -1
  147. package/dist/focus/focus-executor.d.ts.map +1 -1
  148. package/dist/focus/focus-executor.js +290 -256
  149. package/dist/focus/focus-executor.js.map +1 -1
  150. package/dist/focus/focus-lifecycle.d.ts.map +1 -1
  151. package/dist/focus/focus-lifecycle.js +2 -1
  152. package/dist/focus/focus-lifecycle.js.map +1 -1
  153. package/dist/focus/focus-loop-registry.d.ts.map +1 -1
  154. package/dist/focus/focus-loop-registry.js +43 -1
  155. package/dist/focus/focus-loop-registry.js.map +1 -1
  156. package/dist/focus/focus-respawn-guard.d.ts +1 -1
  157. package/dist/focus/focus-respawn-guard.d.ts.map +1 -1
  158. package/dist/focus/focus-respawn-guard.js +12 -3
  159. package/dist/focus/focus-respawn-guard.js.map +1 -1
  160. package/dist/focus/focus-team-state.d.ts +11 -0
  161. package/dist/focus/focus-team-state.d.ts.map +1 -1
  162. package/dist/focus/focus-team-state.js +17 -0
  163. package/dist/focus/focus-team-state.js.map +1 -1
  164. package/dist/focus/listener-auto-advance.d.ts +17 -46
  165. package/dist/focus/listener-auto-advance.d.ts.map +1 -1
  166. package/dist/focus/listener-auto-advance.js +104 -256
  167. package/dist/focus/listener-auto-advance.js.map +1 -1
  168. package/dist/focus/listener-spawn.d.ts +62 -0
  169. package/dist/focus/listener-spawn.d.ts.map +1 -0
  170. package/dist/focus/listener-spawn.js +418 -0
  171. package/dist/focus/listener-spawn.js.map +1 -0
  172. package/dist/focus/listener-state.d.ts +57 -0
  173. package/dist/focus/listener-state.d.ts.map +1 -0
  174. package/dist/focus/listener-state.js +63 -0
  175. package/dist/focus/listener-state.js.map +1 -0
  176. package/dist/focus/listener.d.ts +0 -58
  177. package/dist/focus/listener.d.ts.map +1 -1
  178. package/dist/focus/listener.js +138 -516
  179. package/dist/focus/listener.js.map +1 -1
  180. package/dist/focus/tick-deadline.d.ts +55 -0
  181. package/dist/focus/tick-deadline.d.ts.map +1 -0
  182. package/dist/focus/tick-deadline.js +91 -0
  183. package/dist/focus/tick-deadline.js.map +1 -0
  184. package/dist/focus/verify-open-issues.d.ts +62 -0
  185. package/dist/focus/verify-open-issues.d.ts.map +1 -0
  186. package/dist/focus/verify-open-issues.js +265 -0
  187. package/dist/focus/verify-open-issues.js.map +1 -0
  188. package/dist/focus-stage-lifecycle/index.d.ts +19 -26
  189. package/dist/focus-stage-lifecycle/index.d.ts.map +1 -1
  190. package/dist/focus-stage-lifecycle/index.js +27 -39
  191. package/dist/focus-stage-lifecycle/index.js.map +1 -1
  192. package/dist/focus-stage-lifecycle/wedge-cause-arbiter.d.ts +52 -0
  193. package/dist/focus-stage-lifecycle/wedge-cause-arbiter.d.ts.map +1 -0
  194. package/dist/focus-stage-lifecycle/wedge-cause-arbiter.js +94 -0
  195. package/dist/focus-stage-lifecycle/wedge-cause-arbiter.js.map +1 -0
  196. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +18 -1
  197. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
  198. package/dist/focus-stage-lifecycle/wedge-watchdog.js +57 -7
  199. package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
  200. package/dist/git/index.d.ts +2 -0
  201. package/dist/git/index.d.ts.map +1 -1
  202. package/dist/git/index.js +2 -0
  203. package/dist/git/index.js.map +1 -1
  204. package/dist/git/merge-strategies.d.ts +80 -0
  205. package/dist/git/merge-strategies.d.ts.map +1 -0
  206. package/dist/git/merge-strategies.js +218 -0
  207. package/dist/git/merge-strategies.js.map +1 -0
  208. package/dist/git/merge-to-main.d.ts +76 -0
  209. package/dist/git/merge-to-main.d.ts.map +1 -0
  210. package/dist/git/merge-to-main.js +256 -0
  211. package/dist/git/merge-to-main.js.map +1 -0
  212. package/dist/git/merge.d.ts +27 -81
  213. package/dist/git/merge.d.ts.map +1 -1
  214. package/dist/git/merge.js +4 -448
  215. package/dist/git/merge.js.map +1 -1
  216. package/dist/git/state-detector.js +1 -1
  217. package/dist/git/state-detector.js.map +1 -1
  218. package/dist/guard/condition-evaluators.d.ts +9 -0
  219. package/dist/guard/condition-evaluators.d.ts.map +1 -1
  220. package/dist/guard/condition-evaluators.js +15 -0
  221. package/dist/guard/condition-evaluators.js.map +1 -1
  222. package/dist/guard/guard-evaluator.d.ts +17 -1
  223. package/dist/guard/guard-evaluator.d.ts.map +1 -1
  224. package/dist/guard/guard-evaluator.js +61 -2
  225. package/dist/guard/guard-evaluator.js.map +1 -1
  226. package/dist/guard/trigger-executor.d.ts +30 -18
  227. package/dist/guard/trigger-executor.d.ts.map +1 -1
  228. package/dist/guard/trigger-executor.js +55 -31
  229. package/dist/guard/trigger-executor.js.map +1 -1
  230. package/dist/loops/engine.js +1 -1
  231. package/dist/loops/engine.js.map +1 -1
  232. package/dist/merge/focus-merge.d.ts +1 -1
  233. package/dist/merge/focus-merge.d.ts.map +1 -1
  234. package/dist/merge/focus-merge.js +1 -1
  235. package/dist/merge/focus-merge.js.map +1 -1
  236. package/dist/merge/merge-back-loop.d.ts +1 -1
  237. package/dist/merge/merge-back-loop.d.ts.map +1 -1
  238. package/dist/merge/merge-back-loop.js +2 -2
  239. package/dist/merge/merge-back-loop.js.map +1 -1
  240. package/dist/merge/merge-detector.js +1 -1
  241. package/dist/merge/merge-detector.js.map +1 -1
  242. package/dist/nexus/return.js +1 -1
  243. package/dist/nexus/return.js.map +1 -1
  244. package/dist/prd/controller-shared.d.ts +223 -0
  245. package/dist/prd/controller-shared.d.ts.map +1 -0
  246. package/dist/prd/controller-shared.js +77 -0
  247. package/dist/prd/controller-shared.js.map +1 -0
  248. package/dist/prd/controller.d.ts +5 -256
  249. package/dist/prd/controller.d.ts.map +1 -1
  250. package/dist/prd/controller.js +9 -166
  251. package/dist/prd/controller.js.map +1 -1
  252. package/dist/prd/done-sweep.d.ts +55 -0
  253. package/dist/prd/done-sweep.d.ts.map +1 -0
  254. package/dist/prd/done-sweep.js +112 -0
  255. package/dist/prd/done-sweep.js.map +1 -0
  256. package/dist/prompt/team-prompt-base.d.ts +1 -1
  257. package/dist/prompt/team-prompt-base.d.ts.map +1 -1
  258. package/dist/prompt/team-prompt-base.js +1 -1
  259. package/dist/prompt/team-prompt-base.js.map +1 -1
  260. package/dist/prompt-sections/execution-sections.d.ts +1 -1
  261. package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
  262. package/dist/prompt-sections/execution-sections.js +12 -2
  263. package/dist/prompt-sections/execution-sections.js.map +1 -1
  264. package/dist/prompt-sections/persona-sections.d.ts +0 -32
  265. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  266. package/dist/prompt-sections/persona-sections.js +19 -88
  267. package/dist/prompt-sections/persona-sections.js.map +1 -1
  268. package/dist/prompt-sections/shared.d.ts +1 -1
  269. package/dist/prompt-sections/shared.d.ts.map +1 -1
  270. package/dist/queries/agent-resolvable-promotion.d.ts +1 -1
  271. package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -1
  272. package/dist/queries/agent-resolvable-promotion.js +2 -1
  273. package/dist/queries/agent-resolvable-promotion.js.map +1 -1
  274. package/dist/queries/deliveries.d.ts +0 -172
  275. package/dist/queries/deliveries.d.ts.map +1 -1
  276. package/dist/queries/deliveries.js +1 -77
  277. package/dist/queries/deliveries.js.map +1 -1
  278. package/dist/queries/escalation-consumption.d.ts +120 -0
  279. package/dist/queries/escalation-consumption.d.ts.map +1 -0
  280. package/dist/queries/escalation-consumption.js +143 -0
  281. package/dist/queries/escalation-consumption.js.map +1 -0
  282. package/dist/queries/escalation-dispositions.d.ts +19 -0
  283. package/dist/queries/escalation-dispositions.d.ts.map +1 -0
  284. package/dist/queries/escalation-dispositions.js +18 -0
  285. package/dist/queries/escalation-dispositions.js.map +1 -0
  286. package/dist/queries/escalation-suppression.d.ts +1 -1
  287. package/dist/queries/escalation-suppression.d.ts.map +1 -1
  288. package/dist/queries/escalation-suppression.js +1 -1
  289. package/dist/queries/escalation-suppression.js.map +1 -1
  290. package/dist/queries/escalations.d.ts +343 -0
  291. package/dist/queries/escalations.d.ts.map +1 -0
  292. package/dist/queries/escalations.js +493 -0
  293. package/dist/queries/escalations.js.map +1 -0
  294. package/dist/queries/focus-discovery.d.ts +204 -0
  295. package/dist/queries/focus-discovery.d.ts.map +1 -0
  296. package/dist/queries/focus-discovery.js +92 -0
  297. package/dist/queries/focus-discovery.js.map +1 -0
  298. package/dist/queries/focuses.d.ts +36 -0
  299. package/dist/queries/focuses.d.ts.map +1 -1
  300. package/dist/queries/focuses.js +45 -0
  301. package/dist/queries/focuses.js.map +1 -1
  302. package/dist/queries/guards.d.ts +10 -0
  303. package/dist/queries/guards.d.ts.map +1 -1
  304. package/dist/queries/guards.js +14 -1
  305. package/dist/queries/guards.js.map +1 -1
  306. package/dist/queries/index.d.ts +4 -2
  307. package/dist/queries/index.d.ts.map +1 -1
  308. package/dist/queries/index.js +4 -2
  309. package/dist/queries/index.js.map +1 -1
  310. package/dist/queries/issues.d.ts +8 -372
  311. package/dist/queries/issues.d.ts.map +1 -1
  312. package/dist/queries/issues.js +7 -482
  313. package/dist/queries/issues.js.map +1 -1
  314. package/dist/queries/schemas.d.ts +51 -0
  315. package/dist/queries/schemas.d.ts.map +1 -1
  316. package/dist/queries/schemas.js +34 -0
  317. package/dist/queries/schemas.js.map +1 -1
  318. package/dist/queries/verification.d.ts +5 -6
  319. package/dist/queries/verification.d.ts.map +1 -1
  320. package/dist/queries/verification.js +5 -6
  321. package/dist/queries/verification.js.map +1 -1
  322. package/dist/resolvers/agent-escalations.d.ts +20 -0
  323. package/dist/resolvers/agent-escalations.d.ts.map +1 -1
  324. package/dist/resolvers/agent-escalations.js +40 -10
  325. package/dist/resolvers/agent-escalations.js.map +1 -1
  326. package/dist/resolvers/index.d.ts +2 -2
  327. package/dist/resolvers/index.d.ts.map +1 -1
  328. package/dist/resolvers/index.js +1 -1
  329. package/dist/resolvers/index.js.map +1 -1
  330. package/dist/resolvers/loop-persona.d.ts +1 -11
  331. package/dist/resolvers/loop-persona.d.ts.map +1 -1
  332. package/dist/resolvers/loop-persona.js +2 -16
  333. package/dist/resolvers/loop-persona.js.map +1 -1
  334. package/dist/resolvers/shared/git-diff.d.ts +99 -18
  335. package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
  336. package/dist/resolvers/shared/git-diff.js +98 -27
  337. package/dist/resolvers/shared/git-diff.js.map +1 -1
  338. package/dist/shell/control-state.d.ts +1 -1
  339. package/dist/shell/control-state.d.ts.map +1 -1
  340. package/dist/shell/control-state.js +1 -1
  341. package/dist/shell/control-state.js.map +1 -1
  342. package/dist/shell/crash-recovery.d.ts +1 -1
  343. package/dist/shell/crash-recovery.d.ts.map +1 -1
  344. package/dist/shell/crash-recovery.js +2 -2
  345. package/dist/shell/crash-recovery.js.map +1 -1
  346. package/dist/shell/install-probe-tick.d.ts +1 -1
  347. package/dist/shell/install-probe-tick.d.ts.map +1 -1
  348. package/dist/shell/install-probe-tick.js +1 -1
  349. package/dist/shell/install-probe-tick.js.map +1 -1
  350. package/dist/shell/unified-shell-provisioning.d.ts +40 -0
  351. package/dist/shell/unified-shell-provisioning.d.ts.map +1 -1
  352. package/dist/shell/unified-shell-provisioning.js +72 -0
  353. package/dist/shell/unified-shell-provisioning.js.map +1 -1
  354. package/dist/shell/unified-shell.d.ts.map +1 -1
  355. package/dist/shell/unified-shell.js +19 -2
  356. package/dist/shell/unified-shell.js.map +1 -1
  357. package/dist/spawn/helpers.d.ts.map +1 -1
  358. package/dist/spawn/helpers.js +6 -1
  359. package/dist/spawn/helpers.js.map +1 -1
  360. package/dist/spawn/model-routing.d.ts +1 -1
  361. package/dist/spawn/model-routing.d.ts.map +1 -1
  362. package/dist/spawn/model-routing.js +1 -1
  363. package/dist/spawn/model-routing.js.map +1 -1
  364. package/dist/spawn/process-spawn.d.ts.map +1 -1
  365. package/dist/spawn/process-spawn.js +7 -0
  366. package/dist/spawn/process-spawn.js.map +1 -1
  367. package/dist/spawn/prompt-assembly.d.ts +1 -1
  368. package/dist/spawn/prompt-assembly.d.ts.map +1 -1
  369. package/dist/spawn/prompt-assembly.js +1 -1
  370. package/dist/spawn/prompt-assembly.js.map +1 -1
  371. package/dist/spawn/spawn-cooldown.d.ts +41 -7
  372. package/dist/spawn/spawn-cooldown.d.ts.map +1 -1
  373. package/dist/spawn/spawn-cooldown.js +47 -0
  374. package/dist/spawn/spawn-cooldown.js.map +1 -1
  375. package/dist/spawn/spawn-decision.d.ts.map +1 -1
  376. package/dist/spawn/spawn-decision.js +34 -2
  377. package/dist/spawn/spawn-decision.js.map +1 -1
  378. package/dist/spawn/worktree-session.d.ts +1 -1
  379. package/dist/spawn/worktree-session.d.ts.map +1 -1
  380. package/dist/spawn/worktree-session.js +1 -1
  381. package/dist/spawn/worktree-session.js.map +1 -1
  382. package/dist/templates/claude-md.d.ts +1 -1
  383. package/dist/templates/claude-md.d.ts.map +1 -1
  384. package/dist/templates/claude-md.js +12 -0
  385. package/dist/templates/claude-md.js.map +1 -1
  386. package/dist/verify/stall-detectors.d.ts +20 -8
  387. package/dist/verify/stall-detectors.d.ts.map +1 -1
  388. package/dist/verify/stall-detectors.js +27 -46
  389. package/dist/verify/stall-detectors.js.map +1 -1
  390. package/dist/verify/verification-default-on.d.ts +1 -1
  391. package/dist/verify/verification-default-on.d.ts.map +1 -1
  392. package/dist/verify/verification-deps.d.ts +1 -1
  393. package/dist/verify/verification-deps.d.ts.map +1 -1
  394. package/dist/verify/verification-engine.d.ts.map +1 -1
  395. package/dist/verify/verification-engine.js +20 -12
  396. package/dist/verify/verification-engine.js.map +1 -1
  397. package/dist/workflow/gate-failure-policy.d.ts +48 -0
  398. package/dist/workflow/gate-failure-policy.d.ts.map +1 -0
  399. package/dist/workflow/gate-failure-policy.js +57 -0
  400. package/dist/workflow/gate-failure-policy.js.map +1 -0
  401. package/dist/workflow/pipeline-config.d.ts +2 -2
  402. package/dist/workflow/pipeline-config.js +2 -2
  403. package/dist/worktree/provision.js +1 -1
  404. package/dist/worktree/provision.js.map +1 -1
  405. package/dist/worktree/scratch-guard.d.ts.map +1 -1
  406. package/dist/worktree/scratch-guard.js +23 -2
  407. package/dist/worktree/scratch-guard.js.map +1 -1
  408. package/package.json +1 -1
  409. package/dist/directive/close-loop-stage.d.ts +0 -50
  410. package/dist/directive/close-loop-stage.d.ts.map +0 -1
  411. package/dist/directive/close-loop-stage.js +0 -210
  412. package/dist/directive/close-loop-stage.js.map +0 -1
  413. package/dist/focus-stage-lifecycle/review-convergence.d.ts +0 -133
  414. package/dist/focus-stage-lifecycle/review-convergence.d.ts.map +0 -1
  415. package/dist/focus-stage-lifecycle/review-convergence.js +0 -237
  416. package/dist/focus-stage-lifecycle/review-convergence.js.map +0 -1
package/build-info.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "commitSha": "f200ca5c0",
3
- "builtAt": "2026-08-19T10:09:45.494Z",
2
+ "commitSha": "ba30420ae",
3
+ "builtAt": "2026-08-20T15:04:43.120Z",
4
4
  "expectedMigrations": [
5
5
  "20250829113330_create_org_nodes_table.sql",
6
6
  "20250829113402_fix_function_security_search_path.sql",
@@ -757,6 +757,9 @@
757
757
  "20260818164401_add_review_handoff_count.sql",
758
758
  "20260818164402_agent_escalations_kind_review_handoff_exhausted.sql",
759
759
  "20260818164403_agent_escalations_kind_respawn_cycle_exhausted.sql",
760
- "20260818201246_agent_escalations_kind_restore_promoted_add_propagation_stale.sql"
760
+ "20260818201246_agent_escalations_kind_restore_promoted_add_propagation_stale.sql",
761
+ "20260819164725_iteration_count_exempt_instrument_fault.sql",
762
+ "20260819183306_add_durable_spawn_cooldown_columns.sql",
763
+ "20260819191559_add_durable_advancement_and_coverage_bounds.sql"
761
764
  ]
762
765
  }
@@ -13,6 +13,111 @@
13
13
  * `installExecutionWorktreeGuards` is the single entry point that applies the
14
14
  * right set for a worktree given its read-only flag.
15
15
  */
16
+ import type { GitResult } from '../git/index.js';
17
+ /**
18
+ * The git-runner seam. Defaults to the real `runGitSync`; tests inject a fake
19
+ * to drive the (otherwise hard-to-provoke) `extensions.worktreeConfig` /
20
+ * `--worktree` write-failure branches deterministically and to observe that no
21
+ * shared `core.hooksPath` write is ever attempted on any path.
22
+ */
23
+ type GitRunner = (args: string[], cwd: string) => GitResult;
24
+ /**
25
+ * Point THIS worktree's git hooks at its own `.telora-hooks/` dir, scoped so it
26
+ * cannot depend on -- or govern -- any OTHER worktree of the same repository.
27
+ *
28
+ * A plain `git config core.hooksPath ...` writes the SHARED `.git/config`
29
+ * (verified 2026-08-18 on git 2.47.3: a value set from a linked worktree reads
30
+ * back from the main checkout), so one focus's ephemeral worktree would govern
31
+ * hook execution for the whole repo -- and when that worktree is removed, git
32
+ * runs NO hooks anywhere and the attribution guard silently disappears. Instead
33
+ * we enable `extensions.worktreeConfig` (repo-global, idempotent) and write
34
+ * core.hooksPath with `git config --worktree`, so each worktree carries its own
35
+ * hooksPath and another worktree's create/reuse/removal cannot touch it.
36
+ *
37
+ * We NEVER write a shared `core.hooksPath` -- not even as a fallback. That write
38
+ * is the exact defect the migration/verification siblings exist to undo, and a
39
+ * fallback here would let the next provisioning cycle re-damage a repo the
40
+ * migration just repaired. So this fails CLOSED: if per-worktree scoping cannot
41
+ * be established (worktreeConfig will not enable, or the `--worktree` write
42
+ * fails), the repo's shared config is left untouched and this worktree simply
43
+ * runs WITHOUT the attribution guard.
44
+ *
45
+ * The enforcement self-check runs on EVERY path (there is no early return before
46
+ * it): on a failed path it finds the guard is not in effect and logs the loud
47
+ * "failing OPEN" WARN, which is how an unguarded worktree is reported.
48
+ */
49
+ export declare function configureWorktreeHooksPath(worktreePath: string, hooksDir: string, runGit?: GitRunner): void;
50
+ /**
51
+ * Migrate away a stale, daemon-written SHARED `core.hooksPath` that a pre-0.21.62
52
+ * daemon wrote pointing into a daemon worktree's `.telora-hooks` dir -- an
53
+ * ephemeral agent worktree under `.telora/worktrees/`, or the persistent merge
54
+ * worktree under `.telora/merge-worktree/`.
55
+ *
56
+ * `f629f3e63` (2026-08-18) switched new writes to per-worktree config
57
+ * (`git config --worktree`, see configureWorktreeHooksPath), fixing the CAUSE but
58
+ * leaving every already-damaged repo damaged: nothing unsets the stale shared
59
+ * value. That value is the single cause of both faces of the defect --
60
+ * - while the worktree it names still exists, the guard is wrongly enforced in
61
+ * the MAIN checkout (where it was never meant to apply); and
62
+ * - once that worktree is deleted, git resolves a dangling hooksPath and runs
63
+ * NO hooks anywhere, so the attribution guard silently disappears.
64
+ * Removing the stale shared value resolves both.
65
+ *
66
+ * Conservative about ownership. We read the SHARED value SPECIFICALLY via
67
+ * `git config --local --get core.hooksPath` (which reads `.git/config` and
68
+ * EXCLUDES the per-worktree `config.worktree` scope) -- NOT the plain
69
+ * `git config --get`, which layers worktree config on top and could report (and
70
+ * then delete) a live per-worktree value. We act only when that shared value
71
+ * carries the daemon's own hooks-dir SIGNATURE -- a `.telora-hooks` directory
72
+ * inside this repo's `.telora/` tree (under `.telora/worktrees/` for an ephemeral
73
+ * agent worktree, or `.telora/merge-worktree/` for the persistent merge worktree).
74
+ * Recognising by that signature, not by an agent-worktree path prefix, is what
75
+ * reaches the persistent merge worktree's value. A `core.hooksPath` pointing
76
+ * anywhere else (husky, lefthook, a hand-rolled setup, or a non-hooks path under
77
+ * `.telora/`) is left strictly alone; we err toward leaving it.
78
+ *
79
+ * The unset applies whether or not the pointed-at directory still exists: an
80
+ * alive-but-stale path is exactly the wrongful-enforcement face and must also be
81
+ * cleared. Per-worktree (`--worktree`) values the current code writes are never
82
+ * touched -- `--local` does not read or write that scope. Idempotent: a repo with
83
+ * no matching shared value is a no-op.
84
+ *
85
+ * Returns the removed value (for logging/tests) or null when nothing was cleared.
86
+ */
87
+ export declare function migrateStaleSharedHooksPath(repoPath: string): {
88
+ removed: string | null;
89
+ };
90
+ /** How a repo's EFFECTIVE core.hooksPath resolves, from the checkout it runs in. */
91
+ export type RepoHookEnforcementState = 'unset' | 'dangling' | 'enforced';
92
+ /**
93
+ * Classify the git-hook enforcement state a repo is actually IN, evaluated from
94
+ * the checkout `repoPath` names -- not the state just written at worktree
95
+ * provisioning (that is `verifyHookEnforcementInEffect`).
96
+ *
97
+ * This closes the blind spot that let a silent fail-open survive the fix written
98
+ * to prevent silent fail-open: `verifyHookEnforcementInEffect` only ever inspects
99
+ * a worktree the daemon just configured, so the one place enforcement is silently
100
+ * absent -- the main checkout that inherited a stale shared value -- is the one
101
+ * place it never looks.
102
+ *
103
+ * Reads the EFFECTIVE value with `git config --get core.hooksPath` (worktree
104
+ * config layered over shared -- what git will actually use in this directory), so
105
+ * it must be run in the directory whose state you want to judge (the main
106
+ * checkout, to see what the main checkout inherits).
107
+ *
108
+ * - unset -> no core.hooksPath configured. This is the CORRECT steady state
109
+ * for a main checkout after the stale-value migration; NOT a
110
+ * fault, no warning.
111
+ * - dangling -> configured but the directory does not exist. git runs NO hooks
112
+ * here: the attribution guard is failing OPEN. Logged as a loud
113
+ * WARN naming the repo, the resolved path, and the consequence.
114
+ * - enforced -> configured and the directory exists (live enforcement). Fine.
115
+ *
116
+ * Files NO escalation for any state: this is observable repo state the daemon
117
+ * resolves itself via migrateStaleSharedHooksPath (config gaps are state, not
118
+ * escalations).
119
+ */
120
+ export declare function checkRepoHookEnforcementState(repoPath: string): RepoHookEnforcementState;
16
121
  /**
17
122
  * Install a pre-commit hook in a worktree that blocks all commits.
18
123
  * Used for read-only audit sessions.
@@ -90,12 +195,21 @@ export declare function installReadOnlyAuditGuards(worktreePath: string): void;
90
195
  * would wrongly PASS such a voided commit; this does not.
91
196
  * - A trailing `Co-Authored-By:` (or any other trailer) in the same block
92
197
  * still parses, so the commit PASSES -- the 2026-08-13 failure mode.
93
- * - The value must be a well-formed UUID (8-4-4-4-12 hex); a malformed or
94
- * truncated id FAILS.
198
+ * - The value must be a well-formed UUID (8-4-4-4-12 hex) OR the explicit
199
+ * non-delivery sentinel `Telora-Delivery: none` (NON_DELIVERY_SENTINEL,
200
+ * matched case-insensitively); a malformed or truncated id FAILS, and a
201
+ * sentinel voided into the body FAILS like any other voided value.
202
+ *
203
+ * The sentinel lets a genuinely delivery-less commit (daemon housekeeping, or
204
+ * any commit an agent cannot attribute to a delivery) declare itself as such
205
+ * rather than being forced to borrow a real delivery id -- which would falsely
206
+ * attribute that work to the borrowed delivery's verify evidence. It is a
207
+ * trailer VALUE, not a bypass: a sentinel commit is still labelled, so the
208
+ * verify gate's partition stays total (see NON_DELIVERY_SENTINEL in git-diff).
95
209
  *
96
- * The failure message names the missing trailer and prints the exact line +
97
- * the mandated `git commit --trailer` form, so an agent self-corrects without
98
- * escalating.
210
+ * The failure message names the missing trailer, the sentinel escape for a
211
+ * non-delivery commit, and the exact `git commit --trailer` forms, so an agent
212
+ * self-corrects without escalating or borrowing an id.
99
213
  *
100
214
  * The hook lives in the SAME `.telora-hooks/` directory as any audit
101
215
  * `pre-commit` hook, because `core.hooksPath` is a single value -- git runs
@@ -124,4 +238,5 @@ export declare function installDeliveryTrailerCommitMsgHook(worktreePath: string
124
238
  * read-only guarantee.
125
239
  */
126
240
  export declare function installExecutionWorktreeGuards(worktreePath: string, readOnly: boolean): void;
241
+ export {};
127
242
  //# sourceMappingURL=audit-hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit-hooks.d.ts","sourceRoot":"","sources":["../../src/audit/audit-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4EH;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAmCpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CA0BnE;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CA8BpE;AAED;;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;;;;;;;GAiCG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CA0BnE;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CA8BpE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAIrE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,mCAAmC,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAyF9E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,8BAA8B,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAK5F"}
@@ -14,8 +14,9 @@
14
14
  * right set for a worktree given its read-only flag.
15
15
  */
16
16
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
17
- import { join } from 'node:path';
17
+ import { basename, isAbsolute, join, resolve } from 'node:path';
18
18
  import { runGitSync } from '../git/index.js';
19
+ import { NON_DELIVERY_SENTINEL } from '../resolvers/shared/git-diff.js';
19
20
  import { buildClaudeSettings, mergeClaudeSettings } from '../templates/claude-settings.js';
20
21
  import { ensureCodexConfigIgnoredInWorktree } from '../worktree/provision.js';
21
22
  import { createLogger } from '../shell/log.js';
@@ -35,27 +36,37 @@ const CODEX_READ_ONLY_BLOCK_END = '# END TELORA CODEX READ-ONLY';
35
36
  * core.hooksPath with `git config --worktree`, so each worktree carries its own
36
37
  * hooksPath and another worktree's create/reuse/removal cannot touch it.
37
38
  *
38
- * After writing, verifies the scoping is actually in effect and logs a loud WARN
39
- * if it is not -- a guard must never fail OPEN in silence.
39
+ * We NEVER write a shared `core.hooksPath` -- not even as a fallback. That write
40
+ * is the exact defect the migration/verification siblings exist to undo, and a
41
+ * fallback here would let the next provisioning cycle re-damage a repo the
42
+ * migration just repaired. So this fails CLOSED: if per-worktree scoping cannot
43
+ * be established (worktreeConfig will not enable, or the `--worktree` write
44
+ * fails), the repo's shared config is left untouched and this worktree simply
45
+ * runs WITHOUT the attribution guard.
46
+ *
47
+ * The enforcement self-check runs on EVERY path (there is no early return before
48
+ * it): on a failed path it finds the guard is not in effect and logs the loud
49
+ * "failing OPEN" WARN, which is how an unguarded worktree is reported.
40
50
  */
41
- function configureWorktreeHooksPath(worktreePath, hooksDir) {
51
+ export function configureWorktreeHooksPath(worktreePath, hooksDir, runGit = runGitSync) {
42
52
  // extensions.worktreeConfig must be enabled before `git config --worktree`
43
53
  // will accept a write; enabling it is repo-global and idempotent.
44
- const enable = runGitSync(['config', 'extensions.worktreeConfig', 'true'], worktreePath);
54
+ const enable = runGit(['config', 'extensions.worktreeConfig', 'true'], worktreePath);
45
55
  if (!enable.success) {
46
56
  log.warn(`[audit-hooks] Could not enable extensions.worktreeConfig for ${worktreePath}: ` +
47
- `${enable.error}. Falling back to shared core.hooksPath (repo-global) -- ` +
48
- `hook enforcement may leak across worktrees.`);
49
- runGitSync(['config', 'core.hooksPath', hooksDir], worktreePath);
50
- return;
57
+ `${enable.error}. NOT writing a shared core.hooksPath (that would leak across ` +
58
+ `worktrees and undo the stale-value migration); this worktree will run WITHOUT ` +
59
+ `the attribution guard. Shared config left untouched.`);
51
60
  }
52
- const set = runGitSync(['config', '--worktree', 'core.hooksPath', hooksDir], worktreePath);
53
- if (!set.success) {
54
- log.warn(`[audit-hooks] Could not set per-worktree core.hooksPath for ${worktreePath}: ` +
55
- `${set.error}. Falling back to shared core.hooksPath.`);
56
- runGitSync(['config', 'core.hooksPath', hooksDir], worktreePath);
61
+ else {
62
+ const set = runGit(['config', '--worktree', 'core.hooksPath', hooksDir], worktreePath);
63
+ if (!set.success) {
64
+ log.warn(`[audit-hooks] Could not set per-worktree core.hooksPath for ${worktreePath}: ` +
65
+ `${set.error}. NOT falling back to a shared core.hooksPath; this worktree will ` +
66
+ `run WITHOUT the attribution guard. Shared config left untouched.`);
67
+ }
57
68
  }
58
- verifyHookEnforcementInEffect(worktreePath, hooksDir);
69
+ verifyHookEnforcementInEffect(worktreePath, hooksDir, runGit);
59
70
  }
60
71
  /**
61
72
  * Confirm the commit-msg guard is actually in force for a worktree: its resolved
@@ -63,8 +74,8 @@ function configureWorktreeHooksPath(worktreePath, hooksDir) {
63
74
  * exists there. When enforcement is EXPECTED but not in effect, log a loud WARN
64
75
  * -- the guard must not fail open unnoticed.
65
76
  */
66
- function verifyHookEnforcementInEffect(worktreePath, hooksDir) {
67
- const resolved = runGitSync(['config', '--get', 'core.hooksPath'], worktreePath);
77
+ function verifyHookEnforcementInEffect(worktreePath, hooksDir, runGit = runGitSync) {
78
+ const resolved = runGit(['config', '--get', 'core.hooksPath'], worktreePath);
68
79
  const resolvedPath = resolved.success ? resolved.output.trim() : '';
69
80
  const hookFile = join(hooksDir, 'commit-msg');
70
81
  const hookPresent = existsSync(hookFile);
@@ -75,6 +86,128 @@ function verifyHookEnforcementInEffect(worktreePath, hooksDir) {
75
86
  `commits in this worktree are not being checked.`);
76
87
  }
77
88
  }
89
+ /**
90
+ * Migrate away a stale, daemon-written SHARED `core.hooksPath` that a pre-0.21.62
91
+ * daemon wrote pointing into a daemon worktree's `.telora-hooks` dir -- an
92
+ * ephemeral agent worktree under `.telora/worktrees/`, or the persistent merge
93
+ * worktree under `.telora/merge-worktree/`.
94
+ *
95
+ * `f629f3e63` (2026-08-18) switched new writes to per-worktree config
96
+ * (`git config --worktree`, see configureWorktreeHooksPath), fixing the CAUSE but
97
+ * leaving every already-damaged repo damaged: nothing unsets the stale shared
98
+ * value. That value is the single cause of both faces of the defect --
99
+ * - while the worktree it names still exists, the guard is wrongly enforced in
100
+ * the MAIN checkout (where it was never meant to apply); and
101
+ * - once that worktree is deleted, git resolves a dangling hooksPath and runs
102
+ * NO hooks anywhere, so the attribution guard silently disappears.
103
+ * Removing the stale shared value resolves both.
104
+ *
105
+ * Conservative about ownership. We read the SHARED value SPECIFICALLY via
106
+ * `git config --local --get core.hooksPath` (which reads `.git/config` and
107
+ * EXCLUDES the per-worktree `config.worktree` scope) -- NOT the plain
108
+ * `git config --get`, which layers worktree config on top and could report (and
109
+ * then delete) a live per-worktree value. We act only when that shared value
110
+ * carries the daemon's own hooks-dir SIGNATURE -- a `.telora-hooks` directory
111
+ * inside this repo's `.telora/` tree (under `.telora/worktrees/` for an ephemeral
112
+ * agent worktree, or `.telora/merge-worktree/` for the persistent merge worktree).
113
+ * Recognising by that signature, not by an agent-worktree path prefix, is what
114
+ * reaches the persistent merge worktree's value. A `core.hooksPath` pointing
115
+ * anywhere else (husky, lefthook, a hand-rolled setup, or a non-hooks path under
116
+ * `.telora/`) is left strictly alone; we err toward leaving it.
117
+ *
118
+ * The unset applies whether or not the pointed-at directory still exists: an
119
+ * alive-but-stale path is exactly the wrongful-enforcement face and must also be
120
+ * cleared. Per-worktree (`--worktree`) values the current code writes are never
121
+ * touched -- `--local` does not read or write that scope. Idempotent: a repo with
122
+ * no matching shared value is a no-op.
123
+ *
124
+ * Returns the removed value (for logging/tests) or null when nothing was cleared.
125
+ */
126
+ export function migrateStaleSharedHooksPath(repoPath) {
127
+ // Read the SHARED value only. `--local` targets `.git/config` and never the
128
+ // per-worktree `config.worktree`, so a live `--worktree` value cannot be seen
129
+ // (or clobbered) here.
130
+ const read = runGitSync(['config', '--local', '--get', 'core.hooksPath'], repoPath);
131
+ if (!read.success) {
132
+ // Not set in the shared scope (git exits non-zero) -- nothing to migrate.
133
+ return { removed: null };
134
+ }
135
+ const value = read.output.trim();
136
+ if (!value)
137
+ return { removed: null };
138
+ // Resolve the value to an absolute path (git may have stored a relative one)
139
+ // and require it to carry the daemon's own hooks-dir SIGNATURE: a `.telora-hooks`
140
+ // directory inside THIS repo's `.telora/` tree. That recognises a daemon write
141
+ // wherever the worktree lives -- an ephemeral agent worktree
142
+ // (`.telora/worktrees/<name>/.telora-hooks`) OR the persistent merge worktree
143
+ // (`.telora/merge-worktree/.telora-hooks`), which the daemon configures the same
144
+ // way. Matching the `.telora-hooks` signature rather than the `.telora/worktrees/`
145
+ // path PREFIX is what reaches the merge-worktree value; because that worktree
146
+ // persists, its stale shared value would otherwise never resolve itself.
147
+ // Anything else is foreign (husky, lefthook, a hand-rolled setup, or a non-hooks
148
+ // path under `.telora/`); leave it alone.
149
+ const resolvedValue = isAbsolute(value) ? resolve(value) : resolve(repoPath, value);
150
+ const teloraRoot = resolve(repoPath, '.telora');
151
+ const underTelora = resolvedValue === teloraRoot || resolvedValue.startsWith(teloraRoot + '/');
152
+ const isDaemonHooksDir = underTelora && basename(resolvedValue) === '.telora-hooks';
153
+ if (!isDaemonHooksDir) {
154
+ return { removed: null };
155
+ }
156
+ const unset = runGitSync(['config', '--local', '--unset', 'core.hooksPath'], repoPath);
157
+ if (!unset.success) {
158
+ log.warn(`[audit-hooks] Failed to unset stale shared core.hooksPath='${value}' in ${repoPath}: ` +
159
+ `${unset.error}. The stale value remains and the guard may still misfire in the main checkout.`);
160
+ return { removed: null };
161
+ }
162
+ log.info(`[audit-hooks] Unset stale shared core.hooksPath='${value}' in ${repoPath}: it pointed inside ` +
163
+ `.telora/worktrees/ (a pre-0.21.62 daemon write). The main checkout no longer inherits a ` +
164
+ `dangling/leaked hooks path.`);
165
+ return { removed: value };
166
+ }
167
+ /**
168
+ * Classify the git-hook enforcement state a repo is actually IN, evaluated from
169
+ * the checkout `repoPath` names -- not the state just written at worktree
170
+ * provisioning (that is `verifyHookEnforcementInEffect`).
171
+ *
172
+ * This closes the blind spot that let a silent fail-open survive the fix written
173
+ * to prevent silent fail-open: `verifyHookEnforcementInEffect` only ever inspects
174
+ * a worktree the daemon just configured, so the one place enforcement is silently
175
+ * absent -- the main checkout that inherited a stale shared value -- is the one
176
+ * place it never looks.
177
+ *
178
+ * Reads the EFFECTIVE value with `git config --get core.hooksPath` (worktree
179
+ * config layered over shared -- what git will actually use in this directory), so
180
+ * it must be run in the directory whose state you want to judge (the main
181
+ * checkout, to see what the main checkout inherits).
182
+ *
183
+ * - unset -> no core.hooksPath configured. This is the CORRECT steady state
184
+ * for a main checkout after the stale-value migration; NOT a
185
+ * fault, no warning.
186
+ * - dangling -> configured but the directory does not exist. git runs NO hooks
187
+ * here: the attribution guard is failing OPEN. Logged as a loud
188
+ * WARN naming the repo, the resolved path, and the consequence.
189
+ * - enforced -> configured and the directory exists (live enforcement). Fine.
190
+ *
191
+ * Files NO escalation for any state: this is observable repo state the daemon
192
+ * resolves itself via migrateStaleSharedHooksPath (config gaps are state, not
193
+ * escalations).
194
+ */
195
+ export function checkRepoHookEnforcementState(repoPath) {
196
+ const resolved = runGitSync(['config', '--get', 'core.hooksPath'], repoPath);
197
+ const resolvedPath = resolved.success ? resolved.output.trim() : '';
198
+ if (!resolvedPath) {
199
+ return 'unset';
200
+ }
201
+ const absPath = isAbsolute(resolvedPath) ? resolvedPath : resolve(repoPath, resolvedPath);
202
+ if (!existsSync(absPath)) {
203
+ log.warn(`[audit-hooks] Hook enforcement is failing OPEN in ${repoPath}: resolved ` +
204
+ `core.hooksPath='${resolvedPath}' points at a directory that does not exist, so git runs ` +
205
+ `NO hooks here and the attribution guard is not running. ` +
206
+ `(The stale-shared-value migration clears this when the value points inside .telora/worktrees/.)`);
207
+ return 'dangling';
208
+ }
209
+ return 'enforced';
210
+ }
78
211
  /**
79
212
  * Install a pre-commit hook in a worktree that blocks all commits.
80
213
  * Used for read-only audit sessions.
@@ -236,12 +369,21 @@ export function installReadOnlyAuditGuards(worktreePath) {
236
369
  * would wrongly PASS such a voided commit; this does not.
237
370
  * - A trailing `Co-Authored-By:` (or any other trailer) in the same block
238
371
  * still parses, so the commit PASSES -- the 2026-08-13 failure mode.
239
- * - The value must be a well-formed UUID (8-4-4-4-12 hex); a malformed or
240
- * truncated id FAILS.
372
+ * - The value must be a well-formed UUID (8-4-4-4-12 hex) OR the explicit
373
+ * non-delivery sentinel `Telora-Delivery: none` (NON_DELIVERY_SENTINEL,
374
+ * matched case-insensitively); a malformed or truncated id FAILS, and a
375
+ * sentinel voided into the body FAILS like any other voided value.
241
376
  *
242
- * The failure message names the missing trailer and prints the exact line +
243
- * the mandated `git commit --trailer` form, so an agent self-corrects without
244
- * escalating.
377
+ * The sentinel lets a genuinely delivery-less commit (daemon housekeeping, or
378
+ * any commit an agent cannot attribute to a delivery) declare itself as such
379
+ * rather than being forced to borrow a real delivery id -- which would falsely
380
+ * attribute that work to the borrowed delivery's verify evidence. It is a
381
+ * trailer VALUE, not a bypass: a sentinel commit is still labelled, so the
382
+ * verify gate's partition stays total (see NON_DELIVERY_SENTINEL in git-diff).
383
+ *
384
+ * The failure message names the missing trailer, the sentinel escape for a
385
+ * non-delivery commit, and the exact `git commit --trailer` forms, so an agent
386
+ * self-corrects without escalating or borrowing an id.
245
387
  *
246
388
  * The hook lives in the SAME `.telora-hooks/` directory as any audit
247
389
  * `pre-commit` hook, because `core.hooksPath` is a single value -- git runs
@@ -282,32 +424,50 @@ export function installDeliveryTrailerCommitMsgHook(worktreePath) {
282
424
  ' | grep -i \'^Telora-Delivery:\' | head -n1 | sed \'s/^[^:]*:[[:space:]]*//\' | tr -d \'[:space:]\')"',
283
425
  '',
284
426
  'uuid_re=\'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\'',
427
+ `sentinel_lc='${NON_DELIVERY_SENTINEL.toLowerCase()}'`,
285
428
  '',
286
- 'if [[ ! "$value" =~ $uuid_re ]]; then',
287
- ' echo "" >&2',
288
- ' echo "========================================================" >&2',
289
- ' echo " COMMIT REFUSED: missing Telora-Delivery trailer" >&2',
290
- ' echo "========================================================" >&2',
291
- ' echo "" >&2',
292
- ' echo " Every commit must carry a well-formed delivery trailer:" >&2',
293
- ' echo "" >&2',
294
- ' echo " Telora-Delivery: <deliveryId>" >&2',
295
- ' echo "" >&2',
296
- ' echo " Add it as a git TRAILER (not a body line) so an appended" >&2',
297
- ' echo " Co-Authored-By cannot void it:" >&2',
298
- ' echo "" >&2',
299
- ' echo " git commit --trailer \\"Telora-Delivery: <deliveryId>\\" -m \\"<subject>\\"" >&2',
300
- ' echo "" >&2',
301
- ' echo " To fix the commit you just attempted:" >&2',
302
- ' echo "" >&2',
303
- ' echo " git commit --amend --no-edit --trailer \\"Telora-Delivery: <deliveryId>\\"" >&2',
304
- ' echo "" >&2',
305
- ' echo "========================================================" >&2',
306
- ' echo "" >&2',
307
- ' exit 1',
429
+ '# Accept either a well-formed delivery UUID or the explicit non-delivery',
430
+ '# sentinel (`Telora-Delivery: none`, matched case-insensitively like the',
431
+ '# trailer key). A sentinel commit declares itself delivery-less but is still',
432
+ "# a LABELLED commit git's trailer parser reads back, so the verify gate's",
433
+ '# partition stays total. Everything else is refused -- including a sentinel',
434
+ '# voided into the commit BODY, which git does not parse, so $value is empty.',
435
+ 'value_lc="$(printf %s "$value" | tr \'[:upper:]\' \'[:lower:]\')"',
436
+ 'if [[ "$value" =~ $uuid_re || "$value_lc" == "$sentinel_lc" ]]; then',
437
+ ' exit 0',
308
438
  'fi',
309
439
  '',
310
- 'exit 0',
440
+ 'echo "" >&2',
441
+ 'echo "========================================================" >&2',
442
+ 'echo " COMMIT REFUSED: missing Telora-Delivery trailer" >&2',
443
+ 'echo "========================================================" >&2',
444
+ 'echo "" >&2',
445
+ 'echo " Every commit must carry a well-formed delivery trailer:" >&2',
446
+ 'echo "" >&2',
447
+ 'echo " Telora-Delivery: <deliveryId>" >&2',
448
+ 'echo "" >&2',
449
+ 'echo " Add it as a git TRAILER (not a body line) so an appended" >&2',
450
+ 'echo " Co-Authored-By cannot void it:" >&2',
451
+ 'echo "" >&2',
452
+ 'echo " git commit --trailer \\"Telora-Delivery: <deliveryId>\\" -m \\"<subject>\\"" >&2',
453
+ 'echo "" >&2',
454
+ 'echo " To fix the commit you just attempted:" >&2',
455
+ 'echo "" >&2',
456
+ 'echo " git commit --amend --no-edit --trailer \\"Telora-Delivery: <deliveryId>\\"" >&2',
457
+ 'echo "" >&2',
458
+ 'echo " If this commit genuinely belongs to NO delivery (daemon" >&2',
459
+ 'echo " housekeeping, or work you cannot attribute to one), do NOT" >&2',
460
+ 'echo " borrow a real delivery id: that FALSELY ATTRIBUTES this work to" >&2',
461
+ 'echo " that delivery, partitioning its verify-gate evidence to include" >&2',
462
+ 'echo " commits that are not its own. Declare it delivery-less instead:" >&2',
463
+ 'echo "" >&2',
464
+ `echo " git commit --trailer \\"Telora-Delivery: ${NON_DELIVERY_SENTINEL}\\" -m \\"<subject>\\"" >&2`,
465
+ 'echo "" >&2',
466
+ 'echo " (Merge commits are exempt by shape and need no trailer.)" >&2',
467
+ 'echo "" >&2',
468
+ 'echo "========================================================" >&2',
469
+ 'echo "" >&2',
470
+ 'exit 1',
311
471
  '',
312
472
  ].join('\n');
313
473
  const hookPath = join(hooksDir, 'commit-msg');
@@ -1 +1 @@
1
- {"version":3,"file":"audit-hooks.js","sourceRoot":"","sources":["../../src/audit/audit-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,kCAAkC,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;AAGpD,MAAM,2BAA2B,GAAG,gCAAgC,CAAC;AACrE,MAAM,yBAAyB,GAAG,8BAA8B,CAAC;AAEjE;;;;;;;;;;;;;;;GAeG;AACH,SAAS,0BAA0B,CAAC,YAAoB,EAAE,QAAg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,IAAI,CAAC,CAAC;IAEb,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC9C,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAErD,4EAA4E;IAC5E,4EAA4E;IAC5E,6EAA6E;IAC7E,mCAAmC;IACnC,0BAA0B,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,8BAA8B,CAAC,YAAoB,EAAE,QAAiB;IACpF,mCAAmC,CAAC,YAAY,CAAC,CAAC;IAClD,IAAI,QAAQ,EAAE,CAAC;QACb,0BAA0B,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -7,7 +7,7 @@
7
7
  * escalation rather than disappearing into the log.
8
8
  */
9
9
  import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS } from '@telora/daemon-core';
10
- import { createEscalation } from '../queries/issues.js';
10
+ import { createEscalation } from '../queries/escalations.js';
11
11
  import { createLogger } from '../shell/log.js';
12
12
  const log = createLogger({ module: 'CD' });
13
13
  export const CD_PUSH_FAILED_KIND = 'cd_push_failed';
@@ -1 +1 @@
1
- {"version":3,"file":"ci-escalation.js","sourceRoot":"","sources":["../../src/ci/ci-escalation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAG3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,MA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C7D,UAAU,EACR,uEAAuE;gBACvE,0DAA0D;YAC5D,cAAc,EAAE,mBAAmB;YACnC,2EAA2E;YAC3E,QAAQ,EAAE;gBACR,kBAAkB,EAAE,iBAAiB;gBACrC,UAAU,EAAE,SAAS;aACtB;SACF,CAAC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,6CAA6C,OAAO,MAAM,SAAS,IAAI,CAAC,CAAC;IACpF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CACN,2DAA2D,OAAO,GAAG,EACpE,GAAa,CAAC,OAAO,CACvB,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -42,8 +42,36 @@
42
42
  */
43
43
  import type { DaemonConfig } from '../types/index.js';
44
44
  import { type CiStatusReader } from './ci-status.js';
45
+ /** Health-event code for a red integration run that has no team to route to. */
46
+ export declare const MERGE_HELD_NO_RECEIVER_CODE = "merge.held_no_receiver";
47
+ /** Test-only: clear the held-gate dedup state. */
48
+ export declare function __resetCiSensorHealthStateForTests(): void;
45
49
  /** escalation_kind for a red CI run on integration. */
46
50
  export declare const CI_RUN_RED_ESCALATION_KIND = "ci_run_red";
51
+ /**
52
+ * The working posture a ci_run_red filing sets ("CI green is priority one until
53
+ * the red clears") and the condition under which that posture ENDS. Recorded as
54
+ * structured metadata on the filing so a team INHERITING the escalation can tell,
55
+ * from the escalation itself and not only its prose, whether the obligation still
56
+ * binds. The exit is the escalation's own resolution: when a later integration
57
+ * run goes green, defaultResolveCiRedEscalations marks the row resolved -- the
58
+ * SAME event that ends the posture. A machine-written obligation with no exit is
59
+ * the defect this carries the fix for (cf. "Every daemon-written state has an
60
+ * exit or names a human act").
61
+ */
62
+ export declare const CI_RUN_RED_POSTURE = "ci_green_priority";
63
+ export declare const CI_RUN_RED_POSTURE_TERMINATES = "escalation_resolved";
64
+ /**
65
+ * Structured metadata for a ci_run_red filing: the cause-key routing fields PLUS
66
+ * the posture it sets and that posture's termination condition. Pure and
67
+ * exported so the metadata contract is unit-testable without mocking createEscalation.
68
+ */
69
+ export declare function ciRunRedEscalationMetadata(params: {
70
+ sha: string;
71
+ branch: string;
72
+ productId: string;
73
+ focusId: string;
74
+ }): Record<string, unknown>;
47
75
  /** Minimal open-escalation row shape the sensor's dedup / resolve reads. */
48
76
  interface CiEscalationRow {
49
77
  id: string;
@@ -134,6 +162,8 @@ export interface CiSensorTickCounts {
134
162
  productsChecked: number;
135
163
  escalationsFiled: number;
136
164
  escalationsResolved: number;
165
+ /** Red integration runs surfaced as a held-merge-gate health event this tick. */
166
+ heldGatesSurfaced: number;
137
167
  }
138
168
  /**
139
169
  * One CI-result sensor tick over every configured product. Per product: resolve
@@ -1 +1 @@
1
- {"version":3,"file":"ci-sensor-loop.d.ts","sourceRoot":"","sources":["../../src/ci/ci-sensor-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAuD,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAa1G,uDAAuD;AACvD,eAAO,MAAM,0BAA0B,eAAe,CAAC;AAEvD,4EAA4E;AAC5E,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC3C;AAaD;;;;;;;;;;;;GAYG;AACH;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,eAAe,EAAE,EAChC,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,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