@telora/daemon 0.22.97 → 0.22.131

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 (503) hide show
  1. package/build-info.json +4 -3
  2. package/dist/cli/verify-setup-config.d.ts +4 -3
  3. package/dist/cli/verify-setup-config.d.ts.map +1 -1
  4. package/dist/cli/verify-setup-config.js.map +1 -1
  5. package/dist/completion/commit-verdict-release.d.ts +49 -0
  6. package/dist/completion/commit-verdict-release.d.ts.map +1 -0
  7. package/dist/completion/commit-verdict-release.js +240 -0
  8. package/dist/completion/commit-verdict-release.js.map +1 -0
  9. package/dist/completion/completion-phase-registry.d.ts +10 -4
  10. package/dist/completion/completion-phase-registry.d.ts.map +1 -1
  11. package/dist/completion/completion-phase-registry.js +19 -7
  12. package/dist/completion/completion-phase-registry.js.map +1 -1
  13. package/dist/completion/detector.d.ts.map +1 -1
  14. package/dist/completion/detector.js +1 -0
  15. package/dist/completion/detector.js.map +1 -1
  16. package/dist/completion/event-entry-phases.d.ts +6 -3
  17. package/dist/completion/event-entry-phases.d.ts.map +1 -1
  18. package/dist/completion/event-entry-phases.js +135 -76
  19. package/dist/completion/event-entry-phases.js.map +1 -1
  20. package/dist/completion/event-phases.d.ts +24 -3
  21. package/dist/completion/event-phases.d.ts.map +1 -1
  22. package/dist/completion/event-phases.js +9 -9
  23. package/dist/completion/event-phases.js.map +1 -1
  24. package/dist/completion/event.d.ts +8 -0
  25. package/dist/completion/event.d.ts.map +1 -1
  26. package/dist/completion/event.js +47 -21
  27. package/dist/completion/event.js.map +1 -1
  28. package/dist/completion/exit-classification.d.ts.map +1 -1
  29. package/dist/completion/exit-classification.js +1 -0
  30. package/dist/completion/exit-classification.js.map +1 -1
  31. package/dist/completion/merge-phase.d.ts +21 -9
  32. package/dist/completion/merge-phase.d.ts.map +1 -1
  33. package/dist/completion/merge-phase.js +35 -10
  34. package/dist/completion/merge-phase.js.map +1 -1
  35. package/dist/completion/review-auto-approval-record.d.ts +19 -0
  36. package/dist/completion/review-auto-approval-record.d.ts.map +1 -0
  37. package/dist/completion/review-auto-approval-record.js +102 -0
  38. package/dist/completion/review-auto-approval-record.js.map +1 -0
  39. package/dist/completion/review-cycle-cap.d.ts +62 -0
  40. package/dist/completion/review-cycle-cap.d.ts.map +1 -0
  41. package/dist/completion/review-cycle-cap.js +180 -0
  42. package/dist/completion/review-cycle-cap.js.map +1 -0
  43. package/dist/completion/review-exit-deps.d.ts +17 -2
  44. package/dist/completion/review-exit-deps.d.ts.map +1 -1
  45. package/dist/completion/review-exit-deps.js +19 -2
  46. package/dist/completion/review-exit-deps.js.map +1 -1
  47. package/dist/completion/review-exit-escalations.d.ts +45 -23
  48. package/dist/completion/review-exit-escalations.d.ts.map +1 -1
  49. package/dist/completion/review-exit-escalations.js +15 -74
  50. package/dist/completion/review-exit-escalations.js.map +1 -1
  51. package/dist/completion/review-exit-evidence.d.ts +9 -0
  52. package/dist/completion/review-exit-evidence.d.ts.map +1 -1
  53. package/dist/completion/review-exit-evidence.js +4 -1
  54. package/dist/completion/review-exit-evidence.js.map +1 -1
  55. package/dist/completion/review-exit-foreign-findings.d.ts +151 -0
  56. package/dist/completion/review-exit-foreign-findings.d.ts.map +1 -0
  57. package/dist/completion/review-exit-foreign-findings.js +474 -0
  58. package/dist/completion/review-exit-foreign-findings.js.map +1 -0
  59. package/dist/completion/review-exit-phase.d.ts.map +1 -1
  60. package/dist/completion/review-exit-phase.js +71 -64
  61. package/dist/completion/review-exit-phase.js.map +1 -1
  62. package/dist/completion/review-exit-progress.d.ts +20 -0
  63. package/dist/completion/review-exit-progress.d.ts.map +1 -1
  64. package/dist/completion/review-exit-progress.js +28 -19
  65. package/dist/completion/review-exit-progress.js.map +1 -1
  66. package/dist/completion/review-exit-rehoming.d.ts +5 -0
  67. package/dist/completion/review-exit-rehoming.d.ts.map +1 -1
  68. package/dist/completion/review-exit-rehoming.js.map +1 -1
  69. package/dist/completion/review-exit-verdict-gate.d.ts +202 -0
  70. package/dist/completion/review-exit-verdict-gate.d.ts.map +1 -0
  71. package/dist/completion/review-exit-verdict-gate.js +228 -0
  72. package/dist/completion/review-exit-verdict-gate.js.map +1 -0
  73. package/dist/completion/review-next-step.d.ts +62 -0
  74. package/dist/completion/review-next-step.d.ts.map +1 -0
  75. package/dist/completion/review-next-step.js +63 -0
  76. package/dist/completion/review-next-step.js.map +1 -0
  77. package/dist/completion/session-hold-sweep-deps.d.ts +17 -0
  78. package/dist/completion/session-hold-sweep-deps.d.ts.map +1 -0
  79. package/dist/completion/session-hold-sweep-deps.js +89 -0
  80. package/dist/completion/session-hold-sweep-deps.js.map +1 -0
  81. package/dist/completion/session-hold.d.ts +180 -0
  82. package/dist/completion/session-hold.d.ts.map +1 -0
  83. package/dist/completion/session-hold.js +238 -0
  84. package/dist/completion/session-hold.js.map +1 -0
  85. package/dist/completion/state-cascade.d.ts +19 -0
  86. package/dist/completion/state-cascade.d.ts.map +1 -1
  87. package/dist/completion/state-cascade.js +85 -31
  88. package/dist/completion/state-cascade.js.map +1 -1
  89. package/dist/completion/team-lifecycle.d.ts +35 -2
  90. package/dist/completion/team-lifecycle.d.ts.map +1 -1
  91. package/dist/completion/team-lifecycle.js +165 -94
  92. package/dist/completion/team-lifecycle.js.map +1 -1
  93. package/dist/completion/team-phase.d.ts +27 -15
  94. package/dist/completion/team-phase.d.ts.map +1 -1
  95. package/dist/completion/team-phase.js +34 -15
  96. package/dist/completion/team-phase.js.map +1 -1
  97. package/dist/delivery/commit-verdict-hold.d.ts +55 -0
  98. package/dist/delivery/commit-verdict-hold.d.ts.map +1 -0
  99. package/dist/delivery/commit-verdict-hold.js +118 -0
  100. package/dist/delivery/commit-verdict-hold.js.map +1 -0
  101. package/dist/directive/directive-dispatch.d.ts.map +1 -1
  102. package/dist/directive/directive-dispatch.js +10 -3
  103. package/dist/directive/directive-dispatch.js.map +1 -1
  104. package/dist/directive/directive-executor.d.ts.map +1 -1
  105. package/dist/directive/directive-executor.js +1 -0
  106. package/dist/directive/directive-executor.js.map +1 -1
  107. package/dist/directive/directive-queue.d.ts.map +1 -1
  108. package/dist/directive/directive-queue.js +6 -1
  109. package/dist/directive/directive-queue.js.map +1 -1
  110. package/dist/directive/phase-sync.d.ts +29 -2
  111. package/dist/directive/phase-sync.d.ts.map +1 -1
  112. package/dist/directive/phase-sync.js +30 -6
  113. package/dist/directive/phase-sync.js.map +1 -1
  114. package/dist/drift/artifact-ref-shape.d.ts +34 -0
  115. package/dist/drift/artifact-ref-shape.d.ts.map +1 -0
  116. package/dist/drift/artifact-ref-shape.js +94 -0
  117. package/dist/drift/artifact-ref-shape.js.map +1 -0
  118. package/dist/drift/drift-eval-loop.d.ts +7 -0
  119. package/dist/drift/drift-eval-loop.d.ts.map +1 -1
  120. package/dist/drift/drift-eval-loop.js +34 -5
  121. package/dist/drift/drift-eval-loop.js.map +1 -1
  122. package/dist/drift/drift-evaluator.d.ts.map +1 -1
  123. package/dist/drift/drift-evaluator.js +8 -3
  124. package/dist/drift/drift-evaluator.js.map +1 -1
  125. package/dist/focus/awaiting-slot.d.ts +34 -0
  126. package/dist/focus/awaiting-slot.d.ts.map +1 -0
  127. package/dist/focus/awaiting-slot.js +26 -0
  128. package/dist/focus/awaiting-slot.js.map +1 -0
  129. package/dist/focus/focus-lifecycle.js +2 -2
  130. package/dist/focus/focus-lifecycle.js.map +1 -1
  131. package/dist/focus/focus-phase.d.ts.map +1 -1
  132. package/dist/focus/focus-phase.js +3 -1
  133. package/dist/focus/focus-phase.js.map +1 -1
  134. package/dist/focus/focus-spawn-decision.d.ts +62 -0
  135. package/dist/focus/focus-spawn-decision.d.ts.map +1 -0
  136. package/dist/focus/focus-spawn-decision.js +41 -0
  137. package/dist/focus/focus-spawn-decision.js.map +1 -0
  138. package/dist/focus/focus-team-state.d.ts.map +1 -1
  139. package/dist/focus/focus-team-state.js +1 -13
  140. package/dist/focus/focus-team-state.js.map +1 -1
  141. package/dist/focus/listener-spawn.d.ts +16 -55
  142. package/dist/focus/listener-spawn.d.ts.map +1 -1
  143. package/dist/focus/listener-spawn.js +102 -64
  144. package/dist/focus/listener-spawn.js.map +1 -1
  145. package/dist/focus/listener-state.d.ts.map +1 -1
  146. package/dist/focus/listener-state.js +4 -1
  147. package/dist/focus/listener-state.js.map +1 -1
  148. package/dist/focus/listener.d.ts +41 -2
  149. package/dist/focus/listener.d.ts.map +1 -1
  150. package/dist/focus/listener.js +135 -83
  151. package/dist/focus/listener.js.map +1 -1
  152. package/dist/focus/pending-spawn-pass-deps.d.ts +69 -0
  153. package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -0
  154. package/dist/focus/pending-spawn-pass-deps.js +34 -0
  155. package/dist/focus/pending-spawn-pass-deps.js.map +1 -0
  156. package/dist/focus/pending-spawn-review-next-step.d.ts +83 -0
  157. package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -0
  158. package/dist/focus/pending-spawn-review-next-step.js +325 -0
  159. package/dist/focus/pending-spawn-review-next-step.js.map +1 -0
  160. package/dist/focus/review-cycle-cap-hold.d.ts +132 -0
  161. package/dist/focus/review-cycle-cap-hold.d.ts.map +1 -0
  162. package/dist/focus/review-cycle-cap-hold.js +178 -0
  163. package/dist/focus/review-cycle-cap-hold.js.map +1 -0
  164. package/dist/focus/team-actionable-work.js +2 -2
  165. package/dist/focus/verify-open-issues.d.ts +22 -0
  166. package/dist/focus/verify-open-issues.d.ts.map +1 -1
  167. package/dist/focus/verify-open-issues.js +118 -57
  168. package/dist/focus/verify-open-issues.js.map +1 -1
  169. package/dist/focus/verify-routing-passes.d.ts +32 -0
  170. package/dist/focus/verify-routing-passes.d.ts.map +1 -0
  171. package/dist/focus/verify-routing-passes.js +18 -0
  172. package/dist/focus/verify-routing-passes.js.map +1 -0
  173. package/dist/git/exec.d.ts.map +1 -1
  174. package/dist/git/exec.js +2 -1
  175. package/dist/git/exec.js.map +1 -1
  176. package/dist/git/index.d.ts.map +1 -1
  177. package/dist/git/index.js +9 -5
  178. package/dist/git/index.js.map +1 -1
  179. package/dist/merge/focus-merge.d.ts +16 -2
  180. package/dist/merge/focus-merge.d.ts.map +1 -1
  181. package/dist/merge/focus-merge.js +53 -30
  182. package/dist/merge/focus-merge.js.map +1 -1
  183. package/dist/merge/merge-back-loop.d.ts +5 -0
  184. package/dist/merge/merge-back-loop.d.ts.map +1 -1
  185. package/dist/merge/merge-back-loop.js +17 -8
  186. package/dist/merge/merge-back-loop.js.map +1 -1
  187. package/dist/merge/merge-gate-coverage.d.ts +94 -0
  188. package/dist/merge/merge-gate-coverage.d.ts.map +1 -0
  189. package/dist/merge/merge-gate-coverage.js +217 -0
  190. package/dist/merge/merge-gate-coverage.js.map +1 -0
  191. package/dist/prompt/focus-prompt-builder.d.ts.map +1 -1
  192. package/dist/prompt/focus-prompt-builder.js +6 -0
  193. package/dist/prompt/focus-prompt-builder.js.map +1 -1
  194. package/dist/prompt/prompt-listing.d.ts.map +1 -1
  195. package/dist/prompt/prompt-listing.js +8 -0
  196. package/dist/prompt/prompt-listing.js.map +1 -1
  197. package/dist/prompt/team-prompt-base.d.ts.map +1 -1
  198. package/dist/prompt/team-prompt-base.js +5 -1
  199. package/dist/prompt/team-prompt-base.js.map +1 -1
  200. package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
  201. package/dist/prompt-sections/execution-sections.js +14 -39
  202. package/dist/prompt-sections/execution-sections.js.map +1 -1
  203. package/dist/prompt-sections/gate-ownership.d.ts +36 -0
  204. package/dist/prompt-sections/gate-ownership.d.ts.map +1 -0
  205. package/dist/prompt-sections/gate-ownership.js +68 -0
  206. package/dist/prompt-sections/gate-ownership.js.map +1 -0
  207. package/dist/prompt-sections/gate-verdict-section.d.ts +58 -0
  208. package/dist/prompt-sections/gate-verdict-section.d.ts.map +1 -0
  209. package/dist/prompt-sections/gate-verdict-section.js +88 -0
  210. package/dist/prompt-sections/gate-verdict-section.js.map +1 -0
  211. package/dist/prompt-sections/persona-sections.d.ts +10 -0
  212. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  213. package/dist/prompt-sections/persona-sections.js +35 -11
  214. package/dist/prompt-sections/persona-sections.js.map +1 -1
  215. package/dist/prompt-sections/shared.js +1 -1
  216. package/dist/prompt-sections/shared.js.map +1 -1
  217. package/dist/queries/agent-resolvable-promotion.d.ts +6 -3
  218. package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -1
  219. package/dist/queries/agent-resolvable-promotion.js +20 -9
  220. package/dist/queries/agent-resolvable-promotion.js.map +1 -1
  221. package/dist/queries/deliveries.d.ts +46 -4
  222. package/dist/queries/deliveries.d.ts.map +1 -1
  223. package/dist/queries/deliveries.js +69 -16
  224. package/dist/queries/deliveries.js.map +1 -1
  225. package/dist/queries/delivery-gate-state.d.ts +159 -1
  226. package/dist/queries/delivery-gate-state.d.ts.map +1 -1
  227. package/dist/queries/delivery-gate-state.js +95 -14
  228. package/dist/queries/delivery-gate-state.js.map +1 -1
  229. package/dist/queries/delivery-write-discipline.d.ts +65 -0
  230. package/dist/queries/delivery-write-discipline.d.ts.map +1 -0
  231. package/dist/queries/delivery-write-discipline.js +101 -0
  232. package/dist/queries/delivery-write-discipline.js.map +1 -0
  233. package/dist/queries/escalation-consumption.d.ts +11 -0
  234. package/dist/queries/escalation-consumption.d.ts.map +1 -1
  235. package/dist/queries/escalation-consumption.js +22 -0
  236. package/dist/queries/escalation-consumption.js.map +1 -1
  237. package/dist/queries/escalation-spool.d.ts +75 -0
  238. package/dist/queries/escalation-spool.d.ts.map +1 -0
  239. package/dist/queries/escalation-spool.js +232 -0
  240. package/dist/queries/escalation-spool.js.map +1 -0
  241. package/dist/queries/escalation-suppression.d.ts.map +1 -1
  242. package/dist/queries/escalation-suppression.js +2 -0
  243. package/dist/queries/escalation-suppression.js.map +1 -1
  244. package/dist/queries/escalations.js +1 -1
  245. package/dist/queries/filing-observation.d.ts.map +1 -1
  246. package/dist/queries/filing-observation.js +2 -0
  247. package/dist/queries/filing-observation.js.map +1 -1
  248. package/dist/queries/focus-discovery.d.ts +4 -4
  249. package/dist/queries/focus-discovery.d.ts.map +1 -1
  250. package/dist/queries/focus-discovery.js +1 -0
  251. package/dist/queries/focus-discovery.js.map +1 -1
  252. package/dist/queries/focus-review-approval.d.ts +84 -0
  253. package/dist/queries/focus-review-approval.d.ts.map +1 -0
  254. package/dist/queries/focus-review-approval.js +158 -0
  255. package/dist/queries/focus-review-approval.js.map +1 -0
  256. package/dist/queries/focuses.d.ts +6 -5
  257. package/dist/queries/focuses.d.ts.map +1 -1
  258. package/dist/queries/focuses.js +9 -5
  259. package/dist/queries/focuses.js.map +1 -1
  260. package/dist/queries/incident-correlation.d.ts +5 -4
  261. package/dist/queries/incident-correlation.d.ts.map +1 -1
  262. package/dist/queries/incident-correlation.js +11 -5
  263. package/dist/queries/incident-correlation.js.map +1 -1
  264. package/dist/queries/issues.d.ts.map +1 -1
  265. package/dist/queries/issues.js +2 -1
  266. package/dist/queries/issues.js.map +1 -1
  267. package/dist/queries/loop-refusal-observation.d.ts +64 -0
  268. package/dist/queries/loop-refusal-observation.d.ts.map +1 -0
  269. package/dist/queries/loop-refusal-observation.js +137 -0
  270. package/dist/queries/loop-refusal-observation.js.map +1 -0
  271. package/dist/queries/schemas.d.ts +9 -0
  272. package/dist/queries/schemas.d.ts.map +1 -1
  273. package/dist/queries/schemas.js +11 -3
  274. package/dist/queries/schemas.js.map +1 -1
  275. package/dist/queries/shared.js +1 -1
  276. package/dist/queries/verification.d.ts +15 -0
  277. package/dist/queries/verification.d.ts.map +1 -1
  278. package/dist/queries/verification.js +1 -14
  279. package/dist/queries/verification.js.map +1 -1
  280. package/dist/queries/wire-contract.generated.d.ts +3 -0
  281. package/dist/queries/wire-contract.generated.d.ts.map +1 -1
  282. package/dist/queries/wire-contract.generated.js +3 -0
  283. package/dist/queries/wire-contract.generated.js.map +1 -1
  284. package/dist/resolvers/assembly-engine.d.ts.map +1 -1
  285. package/dist/resolvers/assembly-engine.js +3 -1
  286. package/dist/resolvers/assembly-engine.js.map +1 -1
  287. package/dist/resolvers/git-diff-against-base.d.ts +5 -2
  288. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  289. package/dist/resolvers/git-diff-against-base.js +121 -39
  290. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  291. package/dist/resolvers/shared/git-diff.d.ts +2 -0
  292. package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
  293. package/dist/resolvers/shared/git-diff.js +5 -1
  294. package/dist/resolvers/shared/git-diff.js.map +1 -1
  295. package/dist/resolvers/shared/review-window-commits.d.ts +96 -0
  296. package/dist/resolvers/shared/review-window-commits.d.ts.map +1 -0
  297. package/dist/resolvers/shared/review-window-commits.js +262 -0
  298. package/dist/resolvers/shared/review-window-commits.js.map +1 -0
  299. package/dist/session/session-lineage.d.ts.map +1 -1
  300. package/dist/session/session-lineage.js +4 -1
  301. package/dist/session/session-lineage.js.map +1 -1
  302. package/dist/shell/config.d.ts.map +1 -1
  303. package/dist/shell/config.js +10 -9
  304. package/dist/shell/config.js.map +1 -1
  305. package/dist/shell/fail-stop.d.ts +18 -0
  306. package/dist/shell/fail-stop.d.ts.map +1 -0
  307. package/dist/shell/fail-stop.js +53 -0
  308. package/dist/shell/fail-stop.js.map +1 -0
  309. package/dist/shell/graceful-shutdown.d.ts +48 -0
  310. package/dist/shell/graceful-shutdown.d.ts.map +1 -0
  311. package/dist/shell/graceful-shutdown.js +152 -0
  312. package/dist/shell/graceful-shutdown.js.map +1 -0
  313. package/dist/shell/heartbeat.d.ts.map +1 -1
  314. package/dist/shell/heartbeat.js +5 -4
  315. package/dist/shell/heartbeat.js.map +1 -1
  316. package/dist/shell/log.d.ts.map +1 -1
  317. package/dist/shell/log.js +4 -1
  318. package/dist/shell/log.js.map +1 -1
  319. package/dist/shell/stop-request.d.ts.map +1 -1
  320. package/dist/shell/stop-request.js +2 -1
  321. package/dist/shell/stop-request.js.map +1 -1
  322. package/dist/shell/unified-shell-status.d.ts +6 -0
  323. package/dist/shell/unified-shell-status.d.ts.map +1 -1
  324. package/dist/shell/unified-shell-status.js +9 -2
  325. package/dist/shell/unified-shell-status.js.map +1 -1
  326. package/dist/shell/unified-shell.d.ts.map +1 -1
  327. package/dist/shell/unified-shell.js +41 -114
  328. package/dist/shell/unified-shell.js.map +1 -1
  329. package/dist/spawn/lifecycle.d.ts +12 -0
  330. package/dist/spawn/lifecycle.d.ts.map +1 -1
  331. package/dist/spawn/lifecycle.js +25 -21
  332. package/dist/spawn/lifecycle.js.map +1 -1
  333. package/dist/spawn/prompt-assembly.d.ts +19 -1
  334. package/dist/spawn/prompt-assembly.d.ts.map +1 -1
  335. package/dist/spawn/prompt-assembly.js +70 -21
  336. package/dist/spawn/prompt-assembly.js.map +1 -1
  337. package/dist/spawn/review-hold-park.d.ts.map +1 -1
  338. package/dist/spawn/review-hold-park.js +18 -8
  339. package/dist/spawn/review-hold-park.js.map +1 -1
  340. package/dist/spawn/spawn-cooldown.d.ts.map +1 -1
  341. package/dist/spawn/spawn-cooldown.js +4 -0
  342. package/dist/spawn/spawn-cooldown.js.map +1 -1
  343. package/dist/spawn/spawn-decision.d.ts.map +1 -1
  344. package/dist/spawn/spawn-decision.js +2 -1
  345. package/dist/spawn/spawn-decision.js.map +1 -1
  346. package/dist/spawn/worktree-session.d.ts +6 -0
  347. package/dist/spawn/worktree-session.d.ts.map +1 -1
  348. package/dist/spawn/worktree-session.js +15 -2
  349. package/dist/spawn/worktree-session.js.map +1 -1
  350. package/dist/testing/fixtures/index.d.ts +10 -1
  351. package/dist/testing/fixtures/index.d.ts.map +1 -1
  352. package/dist/testing/fixtures/index.js +59 -1
  353. package/dist/testing/fixtures/index.js.map +1 -1
  354. package/dist/testing/fixtures/pending-spawn-world.d.ts +34 -0
  355. package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -0
  356. package/dist/testing/fixtures/pending-spawn-world.js +92 -0
  357. package/dist/testing/fixtures/pending-spawn-world.js.map +1 -0
  358. package/dist/types/config.d.ts +9 -6
  359. package/dist/types/config.d.ts.map +1 -1
  360. package/dist/types/index.js +1 -1
  361. package/dist/verify/commit-gate-configured.d.ts +86 -0
  362. package/dist/verify/commit-gate-configured.d.ts.map +1 -0
  363. package/dist/verify/commit-gate-configured.js +234 -0
  364. package/dist/verify/commit-gate-configured.js.map +1 -0
  365. package/dist/verify/commit-verdict-record.d.ts +98 -0
  366. package/dist/verify/commit-verdict-record.d.ts.map +1 -0
  367. package/dist/verify/commit-verdict-record.js +297 -0
  368. package/dist/verify/commit-verdict-record.js.map +1 -0
  369. package/dist/verify/explicit-gate-outcome.d.ts +161 -0
  370. package/dist/verify/explicit-gate-outcome.d.ts.map +1 -0
  371. package/dist/verify/explicit-gate-outcome.js +215 -0
  372. package/dist/verify/explicit-gate-outcome.js.map +1 -0
  373. package/dist/verify/explicit-rearm.d.ts +27 -0
  374. package/dist/verify/explicit-rearm.d.ts.map +1 -0
  375. package/dist/verify/explicit-rearm.js +161 -0
  376. package/dist/verify/explicit-rearm.js.map +1 -0
  377. package/dist/verify/explicit-run-ledger.d.ts +26 -0
  378. package/dist/verify/explicit-run-ledger.d.ts.map +1 -0
  379. package/dist/verify/explicit-run-ledger.js +93 -0
  380. package/dist/verify/explicit-run-ledger.js.map +1 -0
  381. package/dist/verify/failure-signature.d.ts.map +1 -1
  382. package/dist/verify/failure-signature.js +5 -1
  383. package/dist/verify/failure-signature.js.map +1 -1
  384. package/dist/verify/gate-run-registry.d.ts +105 -0
  385. package/dist/verify/gate-run-registry.d.ts.map +1 -0
  386. package/dist/verify/gate-run-registry.js +111 -0
  387. package/dist/verify/gate-run-registry.js.map +1 -0
  388. package/dist/verify/gate-verdict-source.d.ts +68 -0
  389. package/dist/verify/gate-verdict-source.d.ts.map +1 -0
  390. package/dist/verify/gate-verdict-source.js +143 -0
  391. package/dist/verify/gate-verdict-source.js.map +1 -0
  392. package/dist/verify/judged-commit-gate.d.ts +11 -0
  393. package/dist/verify/judged-commit-gate.d.ts.map +1 -0
  394. package/dist/verify/judged-commit-gate.js +48 -0
  395. package/dist/verify/judged-commit-gate.js.map +1 -0
  396. package/dist/verify/rework-judgment.d.ts +58 -0
  397. package/dist/verify/rework-judgment.d.ts.map +1 -0
  398. package/dist/verify/rework-judgment.js +54 -0
  399. package/dist/verify/rework-judgment.js.map +1 -0
  400. package/dist/verify/verification-attribution.d.ts +105 -0
  401. package/dist/verify/verification-attribution.d.ts.map +1 -0
  402. package/dist/verify/verification-attribution.js +322 -0
  403. package/dist/verify/verification-attribution.js.map +1 -0
  404. package/dist/verify/verification-baseline-run.d.ts +123 -0
  405. package/dist/verify/verification-baseline-run.d.ts.map +1 -0
  406. package/dist/verify/verification-baseline-run.js +386 -0
  407. package/dist/verify/verification-baseline-run.js.map +1 -0
  408. package/dist/verify/verification-baseline.d.ts +117 -28
  409. package/dist/verify/verification-baseline.d.ts.map +1 -1
  410. package/dist/verify/verification-baseline.js +147 -120
  411. package/dist/verify/verification-baseline.js.map +1 -1
  412. package/dist/verify/verification-checkout.d.ts +32 -6
  413. package/dist/verify/verification-checkout.d.ts.map +1 -1
  414. package/dist/verify/verification-checkout.js +132 -8
  415. package/dist/verify/verification-checkout.js.map +1 -1
  416. package/dist/verify/verification-commit-sharing.d.ts +84 -0
  417. package/dist/verify/verification-commit-sharing.d.ts.map +1 -0
  418. package/dist/verify/verification-commit-sharing.js +416 -0
  419. package/dist/verify/verification-commit-sharing.js.map +1 -0
  420. package/dist/verify/verification-config.d.ts +76 -0
  421. package/dist/verify/verification-config.d.ts.map +1 -1
  422. package/dist/verify/verification-config.js +112 -14
  423. package/dist/verify/verification-config.js.map +1 -1
  424. package/dist/verify/verification-default-on.d.ts +102 -19
  425. package/dist/verify/verification-default-on.d.ts.map +1 -1
  426. package/dist/verify/verification-default-on.js +307 -38
  427. package/dist/verify/verification-default-on.js.map +1 -1
  428. package/dist/verify/verification-deps-default.d.ts.map +1 -1
  429. package/dist/verify/verification-deps-default.js +50 -43
  430. package/dist/verify/verification-deps-default.js.map +1 -1
  431. package/dist/verify/verification-deps.d.ts +86 -7
  432. package/dist/verify/verification-deps.d.ts.map +1 -1
  433. package/dist/verify/verification-deterministic.d.ts +56 -2
  434. package/dist/verify/verification-deterministic.d.ts.map +1 -1
  435. package/dist/verify/verification-deterministic.js +44 -25
  436. package/dist/verify/verification-deterministic.js.map +1 -1
  437. package/dist/verify/verification-diagnostics.d.ts +16 -0
  438. package/dist/verify/verification-diagnostics.d.ts.map +1 -0
  439. package/dist/verify/verification-diagnostics.js +219 -0
  440. package/dist/verify/verification-diagnostics.js.map +1 -0
  441. package/dist/verify/verification-engine.d.ts +12 -8
  442. package/dist/verify/verification-engine.d.ts.map +1 -1
  443. package/dist/verify/verification-engine.js +118 -102
  444. package/dist/verify/verification-engine.js.map +1 -1
  445. package/dist/verify/verification-evidence-unavailable-feedback.d.ts +2 -1
  446. package/dist/verify/verification-evidence-unavailable-feedback.d.ts.map +1 -1
  447. package/dist/verify/verification-evidence-unavailable-feedback.js +19 -5
  448. package/dist/verify/verification-evidence-unavailable-feedback.js.map +1 -1
  449. package/dist/verify/verification-feedback.d.ts +21 -34
  450. package/dist/verify/verification-feedback.d.ts.map +1 -1
  451. package/dist/verify/verification-feedback.js +37 -88
  452. package/dist/verify/verification-feedback.js.map +1 -1
  453. package/dist/verify/verification-gate-stages.d.ts +110 -0
  454. package/dist/verify/verification-gate-stages.d.ts.map +1 -0
  455. package/dist/verify/verification-gate-stages.js +179 -0
  456. package/dist/verify/verification-gate-stages.js.map +1 -0
  457. package/dist/verify/verification-history-reset.d.ts +61 -0
  458. package/dist/verify/verification-history-reset.d.ts.map +1 -0
  459. package/dist/verify/verification-history-reset.js +90 -0
  460. package/dist/verify/verification-history-reset.js.map +1 -0
  461. package/dist/verify/verification-manifest.d.ts.map +1 -1
  462. package/dist/verify/verification-manifest.js +3 -1
  463. package/dist/verify/verification-manifest.js.map +1 -1
  464. package/dist/verify/verification-rework-messages.d.ts +19 -0
  465. package/dist/verify/verification-rework-messages.d.ts.map +1 -0
  466. package/dist/verify/verification-rework-messages.js +52 -0
  467. package/dist/verify/verification-rework-messages.js.map +1 -0
  468. package/dist/verify/verification-timeout-fault.d.ts +147 -0
  469. package/dist/verify/verification-timeout-fault.d.ts.map +1 -0
  470. package/dist/verify/verification-timeout-fault.js +211 -0
  471. package/dist/verify/verification-timeout-fault.js.map +1 -0
  472. package/dist/verify/verify-gate-stall.d.ts +5 -1
  473. package/dist/verify/verify-gate-stall.d.ts.map +1 -1
  474. package/dist/verify/verify-gate-stall.js +10 -1
  475. package/dist/verify/verify-gate-stall.js.map +1 -1
  476. package/dist/worktree/install-inputs.d.ts +89 -0
  477. package/dist/worktree/install-inputs.d.ts.map +1 -0
  478. package/dist/worktree/install-inputs.js +625 -0
  479. package/dist/worktree/install-inputs.js.map +1 -0
  480. package/dist/worktree/install-script-effects.d.ts +30 -0
  481. package/dist/worktree/install-script-effects.d.ts.map +1 -0
  482. package/dist/worktree/install-script-effects.js +524 -0
  483. package/dist/worktree/install-script-effects.js.map +1 -0
  484. package/dist/worktree/install-script-tokens.d.ts +57 -0
  485. package/dist/worktree/install-script-tokens.d.ts.map +1 -0
  486. package/dist/worktree/install-script-tokens.js +299 -0
  487. package/dist/worktree/install-script-tokens.js.map +1 -0
  488. package/dist/worktree/provision.d.ts +27 -4
  489. package/dist/worktree/provision.d.ts.map +1 -1
  490. package/dist/worktree/provision.js +46 -7
  491. package/dist/worktree/provision.js.map +1 -1
  492. package/dist/worktree/safety.d.ts +11 -0
  493. package/dist/worktree/safety.d.ts.map +1 -1
  494. package/dist/worktree/safety.js +20 -3
  495. package/dist/worktree/safety.js.map +1 -1
  496. package/dist/worktree/verify-interlock.d.ts.map +1 -1
  497. package/dist/worktree/verify-interlock.js +3 -1
  498. package/dist/worktree/verify-interlock.js.map +1 -1
  499. package/dist/worktree/worktree-package-provisioning.d.ts +75 -0
  500. package/dist/worktree/worktree-package-provisioning.d.ts.map +1 -0
  501. package/dist/worktree/worktree-package-provisioning.js +362 -0
  502. package/dist/worktree/worktree-package-provisioning.js.map +1 -0
  503. package/package.json +1 -1
@@ -0,0 +1,52 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/verify/verification-feedback.test.ts
3
+ // PINNED-BY-END
4
+ import { buildGateVerdictLines, HELD_BY_SHORTFALL } from '../prompt-sections/gate-verdict-section.js';
5
+ /** The verdict block followed by a blank line, or nothing when there is no verdict. */
6
+ function verdictBlock(lines) {
7
+ return lines.length > 0 ? [...lines, ''] : [];
8
+ }
9
+ /** Build the failure message injected into a live team session. Pure -- exported for testing. */
10
+ export function buildFailureInjectMessage(deliveryName, detail) {
11
+ const lines = [
12
+ `VERIFICATION FAILED for delivery "${deliveryName}".`,
13
+ '',
14
+ ...verdictBlock(buildGateVerdictLines(detail.gateVerdict)),
15
+ detail.exitCode != null ? `Exit code: ${detail.exitCode}` : 'Exit code: (unknown)',
16
+ detail.logPath ? `Full log: ${detail.logPath}` : 'Full log: (not captured)',
17
+ ];
18
+ if (detail.failingTests.length > 0) {
19
+ lines.push('', `Failing tests (${detail.failingTests.length}):`);
20
+ for (const t of detail.failingTests.slice(0, 50))
21
+ lines.push(`- ${t}`);
22
+ if (detail.failingTests.length > 50) {
23
+ lines.push(`- ... and ${detail.failingTests.length - 50} more (see full log)`);
24
+ }
25
+ }
26
+ else {
27
+ lines.push('', 'Failing tests could not be parsed from the run output -- read the full log.');
28
+ }
29
+ lines.push('', 'Fix the failing tests for the files you changed, then commit. The daemon re-verifies ' +
30
+ 'at the coding -> verify edge -- do NOT run the whole-repo suite yourself.');
31
+ return lines.join('\n');
32
+ }
33
+ /** Build the message injected into a live team for a shortfall hold. Pure -- exported for testing. */
34
+ export function buildShortfallInjectMessage(deliveryName, detail) {
35
+ const lines = [
36
+ `VERIFY HELD for delivery "${deliveryName}": the achieved outcome falls short of the declared desired effect.`,
37
+ '',
38
+ 'This is NOT a failing-test failure -- the deterministic check is not the blocker. The verify ' +
39
+ 'reconciliation compared what your diff delivered against the declared intent for each targeted ' +
40
+ 'node and found a gap. Close the gap in the diff, then commit.',
41
+ '',
42
+ ...verdictBlock(buildGateVerdictLines(detail.gateVerdict, { heldBy: HELD_BY_SHORTFALL })),
43
+ `Declared-vs-achieved gap(s) (${detail.shortfalls.length}):`,
44
+ ];
45
+ for (const s of detail.shortfalls) {
46
+ lines.push(`- node ${s.nodeId}`, ` declared: ${s.declared}`, ` achieved: ${s.achieved}`, ` shortfall: ${s.reason}`);
47
+ if (s.diffCitation)
48
+ lines.push(` diff citation: ${s.diffCitation}`);
49
+ }
50
+ return lines.join('\n');
51
+ }
52
+ //# sourceMappingURL=verification-rework-messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-rework-messages.js","sourceRoot":"","sources":["../../src/verify/verification-rework-messages.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sEAAsE;AACtE,gBAAgB;AAoBhB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAEtG,uFAAuF;AACvF,SAAS,YAAY,CAAC,KAAe;IACnC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,yBAAyB,CAAC,YAAoB,EAAE,MAAiC;IAC/F,MAAM,KAAK,GAAa;QACtB,qCAAqC,YAAY,IAAI;QACrD,EAAE;QACF,GAAG,YAAY,CAAC,qBAAqB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC1D,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,sBAAsB;QAClF,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,0BAA0B;KAC5E,CAAC;IACF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EAAE,EAC3B,eAAe,CAAC,CAAC,QAAQ,EAAE,EAC3B,gBAAgB,CAAC,CAAC,MAAM,EAAE,CAC3B,CAAC;QACF,IAAI,CAAC,CAAC,YAAY;YAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Reads a timed-out deterministic run's captured output for a COMPLETE
3
+ * test-runner summary.
4
+ *
5
+ * Why this exists: when the deterministic verify command outlives its timeout
6
+ * the gate SIGKILLs it, and both the gate rationale and the verification
7
+ * engine's "missing" evidence used to be fixed strings -- "run did not
8
+ * complete" / "killed by timeout before completion" -- that never looked at the
9
+ * output. Observed 2026-09-14: vitest printed `Test Files 441 passed (441)` at
10
+ * 624.49s and the kill landed ~3s later, so a run that had FINISHED its test
11
+ * pass was described as one that never got there. That misdescription sends
12
+ * the reader (human or agent) hunting a slow/hung test that does not exist,
13
+ * when the real fault is the time spent after the tests (teardown, a lingering
14
+ * handle, a post-test stage) or a timeout sized below the suite.
15
+ *
16
+ * This module is the evidence read those descriptions lack: given the stdout /
17
+ * stderr tails, it returns the runner's own totals lines when the runner got as
18
+ * far as printing them, else null. It does NOT decide pass/fail -- a timed-out
19
+ * run still fails the gate; this only lets the wording say what the output
20
+ * shows.
21
+ *
22
+ * The two describers built on it keep that wording in one place:
23
+ * `describeTimeout` (the deterministic strategy's rationale) and
24
+ * `buildTimeoutFaultHold` (the verification engine's instrument-fault hold).
25
+ * Both allow for a multi-stage gate command (`npm run verify:gate` chains lint,
26
+ * typecheck, and tests): a printed summary means THAT RUNNER finished, never that
27
+ * the command did, so they say the command had not exited -- never that it
28
+ * completed. Without a summary both return their legacy strings byte-for-byte.
29
+ *
30
+ * Recognised totals (progress lines such as `✓ src/foo.test.ts (3 tests)`,
31
+ * `ok 4 - name`, `# Subtest: x` are deliberately NOT summaries):
32
+ * - vitest: `Test Files 2 failed | 439 passed (441)` (sufficient
33
+ * alone) with its `Tests N passed (N)` line; a `Tests`
34
+ * totals line alone also counts.
35
+ * - node:test TAP: `# tests N` AND `# pass N` (+ `# fail N` when present).
36
+ * - node:test spec: `ℹ tests N` AND `ℹ pass N` (+ `ℹ fail N` when present).
37
+ *
38
+ * Each tail is the last 4000 chars of a stream, so it may begin mid-line; the
39
+ * matchers are anchored at line start, so a truncated first line simply fails
40
+ * to match rather than matching a fragment. A tail can also have LOST the
41
+ * summary: a gate that keeps printing after its tests evicts it past 4000
42
+ * chars. So the strategy tracks each stream's summary while it streams
43
+ * (createRunnerSummaryTracker, fed before each cut) and hands the latest one to
44
+ * describeTimeout. PURE (no I/O).
45
+ *
46
+ * @module verification-timeout-fault
47
+ */
48
+ import type { StrategyResult } from './verification-deterministic.js';
49
+ import type { EvidenceUnavailableDetail } from '../queries/delivery-gate-state.js';
50
+ /**
51
+ * The complete test-runner summary line(s) in a run's captured output, or null.
52
+ *
53
+ * Searches stdout first, then stderr (each independently -- a summary is never
54
+ * assembled from lines split across the two streams).
55
+ *
56
+ * @param stdoutTail The captured stdout tail (last ~4000 chars) of the run.
57
+ * @param stderrTail The captured stderr tail (last ~4000 chars) of the run.
58
+ * @returns The runner's totals lines, trimmed and in output order; null when no
59
+ * complete summary is present.
60
+ */
61
+ export declare function findRunnerSummary(stdoutTail?: string, stderrTail?: string): string[] | null;
62
+ /** The latest complete runner summary one stream has printed, however much output followed it. */
63
+ export interface RunnerSummaryTracker {
64
+ /**
65
+ * Observe the stream after `chunk` was appended to `buffer`, BEFORE the buffer
66
+ * is cut to its tail: whatever is still in `buffer` has not been evicted yet.
67
+ */
68
+ observe(buffer: string, chunk: string): void;
69
+ /** The most recent complete summary observed, or null. */
70
+ latest(): string[] | null;
71
+ }
72
+ /**
73
+ * Track one stream's runner summary while it streams. The strategy keeps only a
74
+ * 4000-char tail per stream, and a multi-stage gate keeps printing after its
75
+ * tests (the next stage, teardown logs), so by the time the kill lands the
76
+ * summary may be gone from the tail. Each observation scans the not-yet-evicted
77
+ * buffer -- only when the new text could complete a summary -- and remembers the
78
+ * latest found, so a later re-printed summary still supersedes an earlier one.
79
+ */
80
+ export declare function createRunnerSummaryTracker(): RunnerSummaryTracker;
81
+ /**
82
+ * The rationale for a deterministic run killed by its timeout, read from what
83
+ * the run's output shows.
84
+ *
85
+ * With a runner summary the kill landed after the tests had finished, so the
86
+ * rationale quotes it and names what actually ran out: the command had not
87
+ * exited within the limit. Without one it is the legacy "run did not complete"
88
+ * string, byte-identical. Either way the run stays a failed timeout -- this only
89
+ * chooses the words.
90
+ *
91
+ * A `timeoutSource` label is named right after the value (`after 600000ms (from
92
+ * /repo/telora.verify.json)`), because a timeout sized below the suite is fixed
93
+ * in whichever layer supplied it and the reader otherwise has to guess which. With
94
+ * no label both strings are unchanged.
95
+ *
96
+ * @param timeoutMs The timeout the run was killed at.
97
+ * @param stdoutTail The captured stdout tail of the killed run.
98
+ * @param stderrTail The captured stderr tail of the killed run.
99
+ * @param timeoutSource Where `timeoutMs` was read (formatVerifyConfigSource label), when known.
100
+ * @param observedSummary The latest summary tracked while the run streamed, used
101
+ * when later output evicted it from the tails (createRunnerSummaryTracker).
102
+ * @returns The rationale, plus the matched summary lines when one was found.
103
+ */
104
+ export declare function describeTimeout(timeoutMs: number, stdoutTail?: string, stderrTail?: string, timeoutSource?: string, observedSummary?: readonly string[] | null): {
105
+ rationale: string;
106
+ runnerSummary?: string[];
107
+ };
108
+ /**
109
+ * The instrument-fault hold for a timed-out deterministic run, with its
110
+ * `missing` evidence named from the captured output.
111
+ *
112
+ * Routing is the caller's and does not change here: a timeout is never a
113
+ * verdict about the work, so this is always a `deterministicFault` of kind
114
+ * 'timeout'. What a summary changes is the NAME of the missing evidence -- the
115
+ * test output is there; the clean exit is not -- so the hold stops pointing a
116
+ * reader at a hung test that does not exist. Prefers the summary the strategy
117
+ * already matched; falls back to reading the tails (a result built elsewhere).
118
+ *
119
+ * The fault also records the timeout the run applied and where it was read,
120
+ * taken from the run's `appliedConfig`, so the gate state (and every human
121
+ * surface rendered from it) names the value and the layer to change. A result
122
+ * that recorded no applied config leaves both out rather than guessing.
123
+ *
124
+ * @param result The timed-out run's exit code, matched summary, output tails, and applied config.
125
+ * @returns The hold detail, minus the `heldAt` stamp the requeue path adds.
126
+ */
127
+ export declare function buildTimeoutFaultHold(result: Pick<StrategyResult, 'exitCode' | 'runnerSummary' | 'stdoutTail' | 'stderrTail' | 'appliedConfig'>): Omit<EvidenceUnavailableDetail, 'heldAt'>;
128
+ /** A recorded deterministic instrument fault (gate_state.evidenceUnavailable.deterministicFault). */
129
+ type DeterministicFault = NonNullable<EvidenceUnavailableDetail['deterministicFault']>;
130
+ /**
131
+ * The `Timeout applied: <ms>ms from <source>` line for a timeout fault that
132
+ * recorded its applied timeout, else null.
133
+ *
134
+ * One formatter so the team inject message and the verify_gate_unclearable
135
+ * escalation print the identical line: a reader who sees it in one place can grep
136
+ * for it in the other. Null for every other hold, so those bodies stay unchanged.
137
+ */
138
+ export declare function formatTimeoutAppliedLine(fault: DeterministicFault | undefined): string | null;
139
+ /**
140
+ * Read a timeout fault that recorded its applied timeout out of an untyped
141
+ * gate_state (FocusDeliveryInfo.gateState is `unknown`), or undefined. Defensive
142
+ * at every level: a legacy or foreign gate_state shape reads as "no timeout fault",
143
+ * never a throw.
144
+ */
145
+ export declare function readTimeoutFault(gateState: unknown): DeterministicFault | undefined;
146
+ export {};
147
+ //# sourceMappingURL=verification-timeout-fault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-timeout-fault.d.ts","sourceRoot":"","sources":["../../src/verify/verification-timeout-fault.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,yBAAy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,GAAG,kBAAkB,GAAG,SAAS,CAcnF"}
@@ -0,0 +1,211 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/verify/verification-deterministic.test.ts,
3
+ // packages/daemon/src/verify/verification-timeout-fault.test.ts,
4
+ // packages/daemon/src/verify/verify-evidence-unavailable.test.ts
5
+ // PINNED-BY-END
6
+ const ESC = String.fromCharCode(27);
7
+ /** SGR colour/style codes; the ESC byte is optional so an already-stripped `[32m` also goes. */
8
+ const ANSI_SGR = new RegExp(`${ESC}?\\[[0-9;]*m`, 'g');
9
+ /** vitest counts: `2 failed | 439 passed | 1 skipped (442)` -- segments, then a parenthesised total. */
10
+ const VITEST_SEGMENT = String.raw `\d+\s+(?:failed|passed|skipped|todo)`;
11
+ const VITEST_COUNTS = String.raw `${VITEST_SEGMENT}(?:\s*\|\s*${VITEST_SEGMENT})*\s+\(\d+\)`;
12
+ const VITEST_TEST_FILES = new RegExp(String.raw `^\s*Test Files\s+${VITEST_COUNTS}\s*$`);
13
+ const VITEST_TESTS = new RegExp(String.raw `^\s*Tests\s+${VITEST_COUNTS}\s*$`);
14
+ const totalsLine = (prefix, label) => new RegExp(String.raw `^\s*${prefix} ${label} \d+\s*$`);
15
+ /** First matcher that is satisfied wins; order is most-specific first. */
16
+ const SUMMARY_MATCHERS = [
17
+ { required: [VITEST_TEST_FILES], optional: [VITEST_TESTS] },
18
+ { required: [VITEST_TESTS], optional: [] },
19
+ { required: [totalsLine('#', 'tests'), totalsLine('#', 'pass')], optional: [totalsLine('#', 'fail')] },
20
+ { required: [totalsLine('ℹ', 'tests'), totalsLine('ℹ', 'pass')], optional: [totalsLine('ℹ', 'fail')] },
21
+ ];
22
+ /** Index of the LAST line matching `pattern` (a re-printed summary supersedes an earlier one), or -1. */
23
+ function lastMatchIndex(lines, pattern) {
24
+ for (let i = lines.length - 1; i >= 0; i--) {
25
+ if (pattern.test(lines[i] ?? ''))
26
+ return i;
27
+ }
28
+ return -1;
29
+ }
30
+ /** The matcher's lines (trimmed, output order) when all its required lines are present, else null. */
31
+ function applyMatcher(lines, matcher) {
32
+ const indices = [];
33
+ for (const pattern of matcher.required) {
34
+ const idx = lastMatchIndex(lines, pattern);
35
+ if (idx < 0)
36
+ return null;
37
+ indices.push(idx);
38
+ }
39
+ for (const pattern of matcher.optional) {
40
+ const idx = lastMatchIndex(lines, pattern);
41
+ if (idx >= 0)
42
+ indices.push(idx);
43
+ }
44
+ return [...new Set(indices)].sort((a, b) => a - b).map((i) => (lines[i] ?? '').trim());
45
+ }
46
+ function findInStream(tail) {
47
+ if (typeof tail !== 'string' || tail.length === 0)
48
+ return null;
49
+ const lines = tail.replace(ANSI_SGR, '').split(/\r\n|\n|\r/);
50
+ for (const matcher of SUMMARY_MATCHERS) {
51
+ const found = applyMatcher(lines, matcher);
52
+ if (found)
53
+ return found;
54
+ }
55
+ return null;
56
+ }
57
+ /**
58
+ * The complete test-runner summary line(s) in a run's captured output, or null.
59
+ *
60
+ * Searches stdout first, then stderr (each independently -- a summary is never
61
+ * assembled from lines split across the two streams).
62
+ *
63
+ * @param stdoutTail The captured stdout tail (last ~4000 chars) of the run.
64
+ * @param stderrTail The captured stderr tail (last ~4000 chars) of the run.
65
+ * @returns The runner's totals lines, trimmed and in output order; null when no
66
+ * complete summary is present.
67
+ */
68
+ export function findRunnerSummary(stdoutTail, stderrTail) {
69
+ return findInStream(stdoutTail) ?? findInStream(stderrTail);
70
+ }
71
+ /** Text a summary line carries; a window without one cannot hold a new summary, so it is not scanned. */
72
+ const SUMMARY_HINT = /Test Files|Tests|[#ℹ] (?:tests|pass|fail)/;
73
+ /** Chars before a chunk rescanned for the hint, so a summary line split across two chunks is still seen. */
74
+ const HINT_OVERLAP = 200;
75
+ /**
76
+ * Track one stream's runner summary while it streams. The strategy keeps only a
77
+ * 4000-char tail per stream, and a multi-stage gate keeps printing after its
78
+ * tests (the next stage, teardown logs), so by the time the kill lands the
79
+ * summary may be gone from the tail. Each observation scans the not-yet-evicted
80
+ * buffer -- only when the new text could complete a summary -- and remembers the
81
+ * latest found, so a later re-printed summary still supersedes an earlier one.
82
+ */
83
+ export function createRunnerSummaryTracker() {
84
+ let found = null;
85
+ return {
86
+ observe(buffer, chunk) {
87
+ const window = buffer.slice(-(chunk.length + HINT_OVERLAP));
88
+ if (!SUMMARY_HINT.test(window))
89
+ return;
90
+ const summary = findInStream(buffer);
91
+ if (summary)
92
+ found = summary;
93
+ },
94
+ latest: () => found,
95
+ };
96
+ }
97
+ /** A summary's lines as one quotable span. */
98
+ const quoteSummary = (summary) => `"${summary.join(' / ')}"`;
99
+ /**
100
+ * The rationale for a deterministic run killed by its timeout, read from what
101
+ * the run's output shows.
102
+ *
103
+ * With a runner summary the kill landed after the tests had finished, so the
104
+ * rationale quotes it and names what actually ran out: the command had not
105
+ * exited within the limit. Without one it is the legacy "run did not complete"
106
+ * string, byte-identical. Either way the run stays a failed timeout -- this only
107
+ * chooses the words.
108
+ *
109
+ * A `timeoutSource` label is named right after the value (`after 600000ms (from
110
+ * /repo/telora.verify.json)`), because a timeout sized below the suite is fixed
111
+ * in whichever layer supplied it and the reader otherwise has to guess which. With
112
+ * no label both strings are unchanged.
113
+ *
114
+ * @param timeoutMs The timeout the run was killed at.
115
+ * @param stdoutTail The captured stdout tail of the killed run.
116
+ * @param stderrTail The captured stderr tail of the killed run.
117
+ * @param timeoutSource Where `timeoutMs` was read (formatVerifyConfigSource label), when known.
118
+ * @param observedSummary The latest summary tracked while the run streamed, used
119
+ * when later output evicted it from the tails (createRunnerSummaryTracker).
120
+ * @returns The rationale, plus the matched summary lines when one was found.
121
+ */
122
+ export function describeTimeout(timeoutMs, stdoutTail, stderrTail, timeoutSource, observedSummary) {
123
+ const summary = findRunnerSummary(stdoutTail, stderrTail)
124
+ ?? (observedSummary && observedSummary.length > 0 ? [...observedSummary] : null);
125
+ const limit = timeoutSource ? `${timeoutMs}ms (from ${timeoutSource})` : `${timeoutMs}ms`;
126
+ if (!summary) {
127
+ return { rationale: `deterministic check timed out after ${limit} (SIGKILL) -- run did not complete` };
128
+ }
129
+ return {
130
+ rationale: `deterministic check killed by the timeout after ${limit} (SIGKILL) -- the test runner had ` +
131
+ `already printed its summary (${quoteSummary(summary)}), but the command had not exited within the limit`,
132
+ runnerSummary: summary,
133
+ };
134
+ }
135
+ /**
136
+ * The instrument-fault hold for a timed-out deterministic run, with its
137
+ * `missing` evidence named from the captured output.
138
+ *
139
+ * Routing is the caller's and does not change here: a timeout is never a
140
+ * verdict about the work, so this is always a `deterministicFault` of kind
141
+ * 'timeout'. What a summary changes is the NAME of the missing evidence -- the
142
+ * test output is there; the clean exit is not -- so the hold stops pointing a
143
+ * reader at a hung test that does not exist. Prefers the summary the strategy
144
+ * already matched; falls back to reading the tails (a result built elsewhere).
145
+ *
146
+ * The fault also records the timeout the run applied and where it was read,
147
+ * taken from the run's `appliedConfig`, so the gate state (and every human
148
+ * surface rendered from it) names the value and the layer to change. A result
149
+ * that recorded no applied config leaves both out rather than guessing.
150
+ *
151
+ * @param result The timed-out run's exit code, matched summary, output tails, and applied config.
152
+ * @returns The hold detail, minus the `heldAt` stamp the requeue path adds.
153
+ */
154
+ export function buildTimeoutFaultHold(result) {
155
+ const summary = result.runnerSummary && result.runnerSummary.length > 0
156
+ ? result.runnerSummary
157
+ : findRunnerSummary(result.stdoutTail, result.stderrTail);
158
+ const missing = summary
159
+ ? `a clean exit within the timeout (the test runner printed its summary -- ${quoteSummary(summary)} -- ` +
160
+ 'but the command had not exited when it was killed)'
161
+ : 'complete deterministic run output (killed by timeout before completion)';
162
+ const applied = result.appliedConfig;
163
+ return {
164
+ missing: [missing],
165
+ commitsAhead: 0,
166
+ deterministicFault: {
167
+ kind: 'timeout',
168
+ exitCode: result.exitCode ?? null,
169
+ ...(applied ? { timeoutMs: applied.timeoutMs, timeoutSource: applied.timeoutSource } : {}),
170
+ },
171
+ };
172
+ }
173
+ /**
174
+ * The `Timeout applied: <ms>ms from <source>` line for a timeout fault that
175
+ * recorded its applied timeout, else null.
176
+ *
177
+ * One formatter so the team inject message and the verify_gate_unclearable
178
+ * escalation print the identical line: a reader who sees it in one place can grep
179
+ * for it in the other. Null for every other hold, so those bodies stay unchanged.
180
+ */
181
+ export function formatTimeoutAppliedLine(fault) {
182
+ if (fault?.kind !== 'timeout' || typeof fault.timeoutMs !== 'number')
183
+ return null;
184
+ return `Timeout applied: ${fault.timeoutMs}ms from ${fault.timeoutSource ?? 'an unrecorded source'}`;
185
+ }
186
+ /**
187
+ * Read a timeout fault that recorded its applied timeout out of an untyped
188
+ * gate_state (FocusDeliveryInfo.gateState is `unknown`), or undefined. Defensive
189
+ * at every level: a legacy or foreign gate_state shape reads as "no timeout fault",
190
+ * never a throw.
191
+ */
192
+ export function readTimeoutFault(gateState) {
193
+ if (gateState == null || typeof gateState !== 'object')
194
+ return undefined;
195
+ const held = gateState.evidenceUnavailable;
196
+ if (held == null || typeof held !== 'object')
197
+ return undefined;
198
+ const fault = held.deterministicFault;
199
+ if (fault == null || typeof fault !== 'object')
200
+ return undefined;
201
+ const f = fault;
202
+ if (f.kind !== 'timeout' || typeof f.timeoutMs !== 'number')
203
+ return undefined;
204
+ return {
205
+ kind: 'timeout',
206
+ exitCode: typeof f.exitCode === 'number' ? f.exitCode : null,
207
+ timeoutMs: f.timeoutMs,
208
+ ...(typeof f.timeoutSource === 'string' ? { timeoutSource: f.timeoutSource } : {}),
209
+ };
210
+ }
211
+ //# sourceMappingURL=verification-timeout-fault.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-timeout-fault.js","sourceRoot":"","sources":["../../src/verify/verification-timeout-fault.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4EAA4E;AAC5E,mEAAmE;AACnE,mEAAmE;AACnE,gBAAgB;AA6DhB,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AACpC,gGAAgG;AAChG,MAAM,QAAQ,GAAG,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C,IAAI;QAC5D,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,GAAG,CAAC,OAAO,CAAC,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnF,CAAC;AACJ,CAAC"}
@@ -106,7 +106,11 @@ export interface VerifyGateStallEscalationText {
106
106
  * Build the verify_gate_unclearable escalation body for a stalled delivery. It
107
107
  * asserts only what the evidence shows: the repeated signature and its consecutive
108
108
  * count on the signature path; on the iteration-cap fallback, that the stall is
109
- * inferred from a count alone and the delivery may still be converging. Pure.
109
+ * inferred from a count alone and the delivery may still be converging. When the
110
+ * live hold is a timeout that recorded its applied timeout, both bodies name it
111
+ * and its source in an explicit line, rather than leaving it buried in the
112
+ * gate_state JSON -- the reader's first question about a timeout stall is which
113
+ * layer set the limit. Pure.
110
114
  */
111
115
  export declare function buildVerifyGateStallEscalation(focus: {
112
116
  focusId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"verify-gate-stall.d.ts","sourceRoot":"","sources":["../../src/verify/verify-gate-stall.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD,KAAK,YAAY,GAAG,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,WAAW,CAAC,CAAC;AA8BhG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAIhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAInF;AAED,MAAM,MAAM,uBAAuB,GAC/B;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AAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAC7C,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,GAAG,MAAM,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,WAAW,CAAC,EACrG,KAAK,EAAE,eAAe,GACrB,6BAA6B,CA2D/B"}
@@ -5,6 +5,7 @@
5
5
  // PINNED-BY-END
6
6
  import { isStatusTerminal } from '../workflow/stage-classifier.js';
7
7
  import { readRecordedSignatureRun } from './failure-signature.js';
8
+ import { formatTimeoutAppliedLine, readTimeoutFault } from './verification-timeout-fault.js';
8
9
  /**
9
10
  * Consecutive rejections carrying ONE failure signature that mark the verify gate
10
11
  * as stalled rather than converging.
@@ -116,7 +117,11 @@ export function decideVerifyGateStall(delivery, cap, repeatThreshold = VERIFY_GA
116
117
  * Build the verify_gate_unclearable escalation body for a stalled delivery. It
117
118
  * asserts only what the evidence shows: the repeated signature and its consecutive
118
119
  * count on the signature path; on the iteration-cap fallback, that the stall is
119
- * inferred from a count alone and the delivery may still be converging. Pure.
120
+ * inferred from a count alone and the delivery may still be converging. When the
121
+ * live hold is a timeout that recorded its applied timeout, both bodies name it
122
+ * and its source in an explicit line, rather than leaving it buried in the
123
+ * gate_state JSON -- the reader's first question about a timeout stall is which
124
+ * layer set the limit. Pure.
120
125
  */
121
126
  export function buildVerifyGateStallEscalation(focus, delivery, stall) {
122
127
  const guards = blockingGuardNames(delivery.gateState);
@@ -129,6 +134,8 @@ export function buildVerifyGateStallEscalation(focus, delivery, stall) {
129
134
  `**Delivery:** "${delivery.name}" (${delivery.id})\n` +
130
135
  `**Status:** ${delivery.executionStatus ?? 'unknown'}\n` +
131
136
  `**iteration_count:** ${iterationCount}\n`;
137
+ const timeoutLine = formatTimeoutAppliedLine(readTimeoutFault(delivery.gateState));
138
+ const timeoutFact = timeoutLine ? `${timeoutLine}\n` : '';
132
139
  const footer = `**gate_state:** ${formatGateState(delivery.gateState)}\n\n` +
133
140
  `Inspect the gate_state / last failing condition above (gate_state.verification.logPath ` +
134
141
  `holds the full run log). See docs/runbook-verify-gate.md.`;
@@ -143,6 +150,7 @@ export function buildVerifyGateStallEscalation(focus, delivery, stall) {
143
150
  `${stall.signature}. ${guardClause} The re-work between those cycles did not change ` +
144
151
  `what fails, so another automatic cycle is unlikely to clear it.\n\n` +
145
152
  facts +
153
+ timeoutFact +
146
154
  `**failure signature:** ${stall.signature} (${stall.consecutive} consecutive)\n` +
147
155
  footer,
148
156
  whatWasTried: `The delivery was re-queued for re-work after each rejection; its last ${stall.consecutive} ` +
@@ -159,6 +167,7 @@ export function buildVerifyGateStallEscalation(focus, delivery, stall) {
159
167
  `unparseable verification log), so this stall is inferred from the cycle count alone -- the ` +
160
168
  `delivery may still be converging through different failures.\n\n` +
161
169
  facts +
170
+ timeoutFact +
162
171
  footer,
163
172
  whatWasTried: `The delivery re-entered verify_failed ${iterationCount} times; each verify pass was ` +
164
173
  `rejected by the gate and re-queued.`,
@@ -1 +1 @@
1
- {"version":3,"file":"verify-gate-stall.js","sourceRoot":"","sources":["../../src/verify/verify-gate-stall.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oFAAoF;AACpF,6EAA6E;AAC7E,uDAAuD;AACvD,gBAAgB;AA4BhB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC;AAIpD,2DAA2D;AAC3D,SAAS,eAAe,CAAC,SAAkB;IACzC,IAAI,SAAS,IAAI,IAAI;QAAE,OAAO,iBAAiB,CAAC;IAChD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,kBAAkB,CAAC;IAC5B,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,kBAAkB,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cwd: string) => {
3
+ success: boolean;
4
+ output: string;
5
+ error?: string;
6
+ };
7
+ /** The lockfiles that make a directory an install root (npm ci prefers the shrinkwrap). */
8
+ export declare const INSTALL_LOCKFILES: readonly ["npm-shrinkwrap.json", "package-lock.json"];
9
+ /**
10
+ * The package.json scripts an install runs, at any depth. npm documents the
11
+ * `npm ci` / `npm install` order in `npm help scripts` ("Life Cycle Operations":
12
+ * preinstall, install, postinstall, prepublish, preprepare, prepare, postprepare;
13
+ * "Life Cycle Scripts": `dependencies` runs after any operation that modifies
14
+ * node_modules), and npm 10's source runs exactly these:
15
+ * - the root, after the tree is reified (lib/commands/ci.js, install.js):
16
+ * preinstall, install, postinstall, prepublish, preprepare, prepare, postprepare;
17
+ * - the root, whenever node_modules changed -- which `npm ci` always does
18
+ * (@npmcli/arborist reify.js): predependencies, dependencies, postdependencies;
19
+ * - every workspace and in-repo `file:` link (@npmcli/arborist rebuild.js):
20
+ * preinstall, prepare, install, postinstall -- and `prepare` again for a
21
+ * directory dependency packed under install-links (pacote dir.js).
22
+ * The pack scripts (prepack, postpack) are not in it: pacote runs "*only*
23
+ * prepare" when it packs a directory dependency, and the CLI runs them for
24
+ * pack/publish; a git dependency runs them from its remote manifest, which the
25
+ * lockfile pins. Every other script is gate or tool source the checkout pins.
26
+ */
27
+ export declare const INSTALL_LIFECYCLE_SCRIPTS: readonly ["preinstall", "install", "postinstall", "prepublish", "preprepare", "prepare", "postprepare", "predependencies", "dependencies", "postdependencies"];
28
+ /** The fingerprint format; a marker holding any other value (an older format) is never current. */
29
+ export declare const INSTALL_FINGERPRINT_FORMAT = "install-inputs/v2";
30
+ /** A tracked tree an install reads from: a worktree's working tree, or a commit. */
31
+ export interface InstallInputTree {
32
+ /** Whether `path` (repo-relative) is a tracked file. */
33
+ has: (path: string) => boolean;
34
+ /** Every tracked file under `dir` ('' = the whole repo), sorted. */
35
+ filesUnder: (dir: string) => string[];
36
+ /** A tracked file's bytes, or null when it is absent; throws when it cannot be read. */
37
+ read: (path: string) => Buffer | null;
38
+ }
39
+ /** An input the model could not follow, named by the manifest that declares it. */
40
+ export interface UnresolvableInstallInput {
41
+ manifest: string;
42
+ reason: string;
43
+ }
44
+ /** What one install root's install consumes (module doc). */
45
+ export interface InstallInputs {
46
+ /** Lockfiles, .npmrc, and each touched package's package.json and binding.gyp that are tracked. Sorted. */
47
+ manifests: string[];
48
+ /**
49
+ * Every tracked file the install's scripts and native builds read -- a manifest
50
+ * too, when a script names it or a native build reaches it (all of R's files
51
+ * when anything is unresolvable). Compared byte for byte. Sorted.
52
+ */
53
+ consumed: string[];
54
+ /** Empty when every command and input was followed. */
55
+ unresolvable: UnresolvableInstallInput[];
56
+ }
57
+ /**
58
+ * A tree over a tracked path list and a byte reader. Paths under a node_modules
59
+ * segment are not install inputs and are dropped; `read` answers null for an
60
+ * untracked path without calling the reader.
61
+ */
62
+ export declare function trackedInstallTree(paths: readonly string[], read: (path: string) => Buffer | null): InstallInputTree;
63
+ /**
64
+ * A worktree's tracked tree as its installs read it: git's tracked paths, their
65
+ * bytes from the working tree. Null when git cannot list the worktree.
66
+ */
67
+ export declare function readWorktreeInstallTree(worktreePath: string, runGit?: GitRun): InstallInputTree | null;
68
+ /** Every install root of the tree: the directories holding a tracked lockfile ('' = the repo root). Sorted. */
69
+ export declare function listInstallRoots(tree: InstallInputTree): string[];
70
+ /**
71
+ * What an install at `root` consumes (module doc). Throws when a tracked input
72
+ * cannot be read (the caller reports the tree unreadable).
73
+ */
74
+ export declare function readInstallInputs(tree: InstallInputTree, root: string): InstallInputs;
75
+ /**
76
+ * The provisioning fingerprint of an install at `root`: every manifest and
77
+ * consumed file, path and bytes, under {@link INSTALL_FINGERPRINT_FORMAT}. Equal
78
+ * fingerprints mean no input the install reads changed.
79
+ */
80
+ export declare function installInputsFingerprint(tree: InstallInputTree, root: string): string;
81
+ /**
82
+ * Commands that read no tracked file an install's effect depends on, each with why.
83
+ * A command here is admitted with any arguments.
84
+ */
85
+ export declare const READS_NOTHING: ReadonlyMap<string, string>;
86
+ /** Split a command into simple commands of words; null when it uses shell syntax the model does not follow. */
87
+ export declare function splitShellCommands(command: string): string[][] | null;
88
+ export {};
89
+ //# sourceMappingURL=install-inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-inputs.d.ts","sourceRoot":"","sources":["../../src/worktree/install-inputs.ts"],"names":[],"mappings":"AA2FA,4EAA4E;AAC5E,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpG,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,uDAAwD,CAAC;AAEvF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,yBAAyB,gKAG5B,CAAC;AAEX,mGAAmG;AACnG,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAE9D,oFAAoF;AACpF,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/B,oEAAoE;IACpE,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IACtC,wFAAwF;IACxF,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACvC;AAED,mFAAmF;AACnF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,2GAA2G;IAC3G,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uDAAuD;IACvD,YAAY,EAAE,wBAAwB,EAAE,CAAC;CA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