@petepetrash/circuit 0.1.0

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 (1993) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +246 -0
  3. package/bin/circuit +44 -0
  4. package/bin/node-version-guard.d.ts +12 -0
  5. package/bin/node-version-guard.js +65 -0
  6. package/dist/app/checkpoints/discover.d.ts +63 -0
  7. package/dist/app/checkpoints/discover.d.ts.map +1 -0
  8. package/dist/app/checkpoints/discover.js +121 -0
  9. package/dist/app/checkpoints/discover.js.map +1 -0
  10. package/dist/app/checkpoints/render.d.ts +4 -0
  11. package/dist/app/checkpoints/render.d.ts.map +1 -0
  12. package/dist/app/checkpoints/render.js +68 -0
  13. package/dist/app/checkpoints/render.js.map +1 -0
  14. package/dist/app/continuity/brief.d.ts +140 -0
  15. package/dist/app/continuity/brief.d.ts.map +1 -0
  16. package/dist/app/continuity/brief.js +557 -0
  17. package/dist/app/continuity/brief.js.map +1 -0
  18. package/dist/app/continuity/harvest.d.ts +65 -0
  19. package/dist/app/continuity/harvest.d.ts.map +1 -0
  20. package/dist/app/continuity/harvest.js +658 -0
  21. package/dist/app/continuity/harvest.js.map +1 -0
  22. package/dist/app/continuity/records.d.ts +39 -0
  23. package/dist/app/continuity/records.d.ts.map +1 -0
  24. package/dist/app/continuity/records.js +210 -0
  25. package/dist/app/continuity/records.js.map +1 -0
  26. package/dist/app/history/extract.d.ts +8 -0
  27. package/dist/app/history/extract.d.ts.map +1 -0
  28. package/dist/app/history/extract.js +716 -0
  29. package/dist/app/history/extract.js.map +1 -0
  30. package/dist/app/history/indexer.d.ts +107 -0
  31. package/dist/app/history/indexer.d.ts.map +1 -0
  32. package/dist/app/history/indexer.js +234 -0
  33. package/dist/app/history/indexer.js.map +1 -0
  34. package/dist/app/history/memory-effect-read.d.ts +8 -0
  35. package/dist/app/history/memory-effect-read.d.ts.map +1 -0
  36. package/dist/app/history/memory-effect-read.js +40 -0
  37. package/dist/app/history/memory-effect-read.js.map +1 -0
  38. package/dist/app/history/memory-effect.d.ts +34 -0
  39. package/dist/app/history/memory-effect.d.ts.map +1 -0
  40. package/dist/app/history/memory-effect.js +234 -0
  41. package/dist/app/history/memory-effect.js.map +1 -0
  42. package/dist/app/history/memory-identity.d.ts +7 -0
  43. package/dist/app/history/memory-identity.d.ts.map +1 -0
  44. package/dist/app/history/memory-identity.js +39 -0
  45. package/dist/app/history/memory-identity.js.map +1 -0
  46. package/dist/app/history/memory-merge.d.ts +16 -0
  47. package/dist/app/history/memory-merge.d.ts.map +1 -0
  48. package/dist/app/history/memory-merge.js +224 -0
  49. package/dist/app/history/memory-merge.js.map +1 -0
  50. package/dist/app/history/memory-preview.d.ts +10 -0
  51. package/dist/app/history/memory-preview.d.ts.map +1 -0
  52. package/dist/app/history/memory-preview.js +103 -0
  53. package/dist/app/history/memory-preview.js.map +1 -0
  54. package/dist/app/history/pull-log.d.ts +13 -0
  55. package/dist/app/history/pull-log.d.ts.map +1 -0
  56. package/dist/app/history/pull-log.js +91 -0
  57. package/dist/app/history/pull-log.js.map +1 -0
  58. package/dist/app/history/pull-suppression.d.ts +12 -0
  59. package/dist/app/history/pull-suppression.d.ts.map +1 -0
  60. package/dist/app/history/pull-suppression.js +40 -0
  61. package/dist/app/history/pull-suppression.js.map +1 -0
  62. package/dist/app/history/query.d.ts +19 -0
  63. package/dist/app/history/query.d.ts.map +1 -0
  64. package/dist/app/history/query.js +342 -0
  65. package/dist/app/history/query.js.map +1 -0
  66. package/dist/app/history/recall-precision.d.ts +15 -0
  67. package/dist/app/history/recall-precision.d.ts.map +1 -0
  68. package/dist/app/history/recall-precision.js +116 -0
  69. package/dist/app/history/recall-precision.js.map +1 -0
  70. package/dist/app/history/run-source-files.d.ts +23 -0
  71. package/dist/app/history/run-source-files.d.ts.map +1 -0
  72. package/dist/app/history/run-source-files.js +82 -0
  73. package/dist/app/history/run-source-files.js.map +1 -0
  74. package/dist/app/history/run-start-recall.d.ts +18 -0
  75. package/dist/app/history/run-start-recall.d.ts.map +1 -0
  76. package/dist/app/history/run-start-recall.js +156 -0
  77. package/dist/app/history/run-start-recall.js.map +1 -0
  78. package/dist/app/inbox/discover.d.ts +63 -0
  79. package/dist/app/inbox/discover.d.ts.map +1 -0
  80. package/dist/app/inbox/discover.js +120 -0
  81. package/dist/app/inbox/discover.js.map +1 -0
  82. package/dist/app/inbox/render.d.ts +4 -0
  83. package/dist/app/inbox/render.d.ts.map +1 -0
  84. package/dist/app/inbox/render.js +66 -0
  85. package/dist/app/inbox/render.js.map +1 -0
  86. package/dist/app/operator-summary/writer.d.ts +41 -0
  87. package/dist/app/operator-summary/writer.d.ts.map +1 -0
  88. package/dist/app/operator-summary/writer.js +1667 -0
  89. package/dist/app/operator-summary/writer.js.map +1 -0
  90. package/dist/app/process-evidence/projection.d.ts +36 -0
  91. package/dist/app/process-evidence/projection.d.ts.map +1 -0
  92. package/dist/app/process-evidence/projection.js +137 -0
  93. package/dist/app/process-evidence/projection.js.map +1 -0
  94. package/dist/app/run-envelope/autonomous-run.d.ts +17 -0
  95. package/dist/app/run-envelope/autonomous-run.d.ts.map +1 -0
  96. package/dist/app/run-envelope/autonomous-run.js +59 -0
  97. package/dist/app/run-envelope/autonomous-run.js.map +1 -0
  98. package/dist/app/run-envelope/continuation-loop.d.ts +24 -0
  99. package/dist/app/run-envelope/continuation-loop.d.ts.map +1 -0
  100. package/dist/app/run-envelope/continuation-loop.js +72 -0
  101. package/dist/app/run-envelope/continuation-loop.js.map +1 -0
  102. package/dist/app/run-envelope/contract-lock.d.ts +15 -0
  103. package/dist/app/run-envelope/contract-lock.d.ts.map +1 -0
  104. package/dist/app/run-envelope/contract-lock.js +44 -0
  105. package/dist/app/run-envelope/contract-lock.js.map +1 -0
  106. package/dist/app/run-envelope/contract-quality.d.ts +15 -0
  107. package/dist/app/run-envelope/contract-quality.d.ts.map +1 -0
  108. package/dist/app/run-envelope/contract-quality.js +48 -0
  109. package/dist/app/run-envelope/contract-quality.js.map +1 -0
  110. package/dist/app/run-envelope/no-progress.d.ts +11 -0
  111. package/dist/app/run-envelope/no-progress.d.ts.map +1 -0
  112. package/dist/app/run-envelope/no-progress.js +40 -0
  113. package/dist/app/run-envelope/no-progress.js.map +1 -0
  114. package/dist/app/run-envelope/shadow-record.d.ts +40 -0
  115. package/dist/app/run-envelope/shadow-record.d.ts.map +1 -0
  116. package/dist/app/run-envelope/shadow-record.js +108 -0
  117. package/dist/app/run-envelope/shadow-record.js.map +1 -0
  118. package/dist/app/run-envelope/source-record.d.ts +62 -0
  119. package/dist/app/run-envelope/source-record.d.ts.map +1 -0
  120. package/dist/app/run-envelope/source-record.js +648 -0
  121. package/dist/app/run-envelope/source-record.js.map +1 -0
  122. package/dist/app/run-status/projection-common.d.ts +57 -0
  123. package/dist/app/run-status/projection-common.d.ts.map +1 -0
  124. package/dist/app/run-status/projection-common.js +90 -0
  125. package/dist/app/run-status/projection-common.js.map +1 -0
  126. package/dist/app/run-status/run-folder-projector.d.ts +9 -0
  127. package/dist/app/run-status/run-folder-projector.d.ts.map +1 -0
  128. package/dist/app/run-status/run-folder-projector.js +68 -0
  129. package/dist/app/run-status/run-folder-projector.js.map +1 -0
  130. package/dist/app/run-status/runtime-run-folder.d.ts +4 -0
  131. package/dist/app/run-status/runtime-run-folder.d.ts.map +1 -0
  132. package/dist/app/run-status/runtime-run-folder.js +461 -0
  133. package/dist/app/run-status/runtime-run-folder.js.map +1 -0
  134. package/dist/cli/checkpoints.d.ts +7 -0
  135. package/dist/cli/checkpoints.d.ts.map +1 -0
  136. package/dist/cli/checkpoints.js +60 -0
  137. package/dist/cli/checkpoints.js.map +1 -0
  138. package/dist/cli/chosen-connectors.d.ts +14 -0
  139. package/dist/cli/chosen-connectors.d.ts.map +1 -0
  140. package/dist/cli/chosen-connectors.js +85 -0
  141. package/dist/cli/chosen-connectors.js.map +1 -0
  142. package/dist/cli/circuit.d.ts +9 -0
  143. package/dist/cli/circuit.d.ts.map +1 -0
  144. package/dist/cli/circuit.js +218 -0
  145. package/dist/cli/circuit.js.map +1 -0
  146. package/dist/cli/command-vocabulary.d.ts +3 -0
  147. package/dist/cli/command-vocabulary.d.ts.map +1 -0
  148. package/dist/cli/command-vocabulary.js +26 -0
  149. package/dist/cli/command-vocabulary.js.map +1 -0
  150. package/dist/cli/commander-support.d.ts +6 -0
  151. package/dist/cli/commander-support.d.ts.map +1 -0
  152. package/dist/cli/commander-support.js +61 -0
  153. package/dist/cli/commander-support.js.map +1 -0
  154. package/dist/cli/compiled-flow-loading.d.ts +21 -0
  155. package/dist/cli/compiled-flow-loading.d.ts.map +1 -0
  156. package/dist/cli/compiled-flow-loading.js +84 -0
  157. package/dist/cli/compiled-flow-loading.js.map +1 -0
  158. package/dist/cli/config-command.d.ts +33 -0
  159. package/dist/cli/config-command.d.ts.map +1 -0
  160. package/dist/cli/config-command.js +367 -0
  161. package/dist/cli/config-command.js.map +1 -0
  162. package/dist/cli/create.d.ts +12 -0
  163. package/dist/cli/create.d.ts.map +1 -0
  164. package/dist/cli/create.js +229 -0
  165. package/dist/cli/create.js.map +1 -0
  166. package/dist/cli/custom-flow-package.d.ts +62 -0
  167. package/dist/cli/custom-flow-package.d.ts.map +1 -0
  168. package/dist/cli/custom-flow-package.js +294 -0
  169. package/dist/cli/custom-flow-package.js.map +1 -0
  170. package/dist/cli/doctor.d.ts +9 -0
  171. package/dist/cli/doctor.d.ts.map +1 -0
  172. package/dist/cli/doctor.js +147 -0
  173. package/dist/cli/doctor.js.map +1 -0
  174. package/dist/cli/flow-selection-preview.d.ts +784 -0
  175. package/dist/cli/flow-selection-preview.d.ts.map +1 -0
  176. package/dist/cli/flow-selection-preview.js +248 -0
  177. package/dist/cli/flow-selection-preview.js.map +1 -0
  178. package/dist/cli/front-door.d.ts +3 -0
  179. package/dist/cli/front-door.d.ts.map +1 -0
  180. package/dist/cli/front-door.js +41 -0
  181. package/dist/cli/front-door.js.map +1 -0
  182. package/dist/cli/generate.d.ts +8 -0
  183. package/dist/cli/generate.d.ts.map +1 -0
  184. package/dist/cli/generate.js +346 -0
  185. package/dist/cli/generate.js.map +1 -0
  186. package/dist/cli/handoff-codex-hooks.d.ts +25 -0
  187. package/dist/cli/handoff-codex-hooks.d.ts.map +1 -0
  188. package/dist/cli/handoff-codex-hooks.js +555 -0
  189. package/dist/cli/handoff-codex-hooks.js.map +1 -0
  190. package/dist/cli/handoff.d.ts +8 -0
  191. package/dist/cli/handoff.d.ts.map +1 -0
  192. package/dist/cli/handoff.js +634 -0
  193. package/dist/cli/handoff.js.map +1 -0
  194. package/dist/cli/help.d.ts +15 -0
  195. package/dist/cli/help.d.ts.map +1 -0
  196. package/dist/cli/help.js +312 -0
  197. package/dist/cli/help.js.map +1 -0
  198. package/dist/cli/history.d.ts +2 -0
  199. package/dist/cli/history.d.ts.map +1 -0
  200. package/dist/cli/history.js +384 -0
  201. package/dist/cli/history.js.map +1 -0
  202. package/dist/cli/inbox.d.ts +7 -0
  203. package/dist/cli/inbox.d.ts.map +1 -0
  204. package/dist/cli/inbox.js +58 -0
  205. package/dist/cli/inbox.js.map +1 -0
  206. package/dist/cli/interactive/app.d.ts +11 -0
  207. package/dist/cli/interactive/app.d.ts.map +1 -0
  208. package/dist/cli/interactive/app.js +220 -0
  209. package/dist/cli/interactive/app.js.map +1 -0
  210. package/dist/cli/interactive/index.d.ts +2 -0
  211. package/dist/cli/interactive/index.d.ts.map +1 -0
  212. package/dist/cli/interactive/index.js +51 -0
  213. package/dist/cli/interactive/index.js.map +1 -0
  214. package/dist/cli/interactive/state.d.ts +122 -0
  215. package/dist/cli/interactive/state.d.ts.map +1 -0
  216. package/dist/cli/interactive/state.js +413 -0
  217. package/dist/cli/interactive/state.js.map +1 -0
  218. package/dist/cli/memory.d.ts +5 -0
  219. package/dist/cli/memory.d.ts.map +1 -0
  220. package/dist/cli/memory.js +327 -0
  221. package/dist/cli/memory.js.map +1 -0
  222. package/dist/cli/post-run-artifacts.d.ts +45 -0
  223. package/dist/cli/post-run-artifacts.d.ts.map +1 -0
  224. package/dist/cli/post-run-artifacts.js +100 -0
  225. package/dist/cli/post-run-artifacts.js.map +1 -0
  226. package/dist/cli/preview.d.ts +9 -0
  227. package/dist/cli/preview.d.ts.map +1 -0
  228. package/dist/cli/preview.js +326 -0
  229. package/dist/cli/preview.js.map +1 -0
  230. package/dist/cli/reclaim.d.ts +2 -0
  231. package/dist/cli/reclaim.d.ts.map +1 -0
  232. package/dist/cli/reclaim.js +67 -0
  233. package/dist/cli/reclaim.js.map +1 -0
  234. package/dist/cli/recovery-attempt-runner.d.ts +25 -0
  235. package/dist/cli/recovery-attempt-runner.d.ts.map +1 -0
  236. package/dist/cli/recovery-attempt-runner.js +98 -0
  237. package/dist/cli/recovery-attempt-runner.js.map +1 -0
  238. package/dist/cli/resume-input.d.ts +27 -0
  239. package/dist/cli/resume-input.d.ts.map +1 -0
  240. package/dist/cli/resume-input.js +58 -0
  241. package/dist/cli/resume-input.js.map +1 -0
  242. package/dist/cli/routed-connectors.d.ts +14 -0
  243. package/dist/cli/routed-connectors.d.ts.map +1 -0
  244. package/dist/cli/routed-connectors.js +85 -0
  245. package/dist/cli/routed-connectors.js.map +1 -0
  246. package/dist/cli/run-flag-vocabulary.d.ts +14 -0
  247. package/dist/cli/run-flag-vocabulary.d.ts.map +1 -0
  248. package/dist/cli/run-flag-vocabulary.js +38 -0
  249. package/dist/cli/run-flag-vocabulary.js.map +1 -0
  250. package/dist/cli/run-output.d.ts +32 -0
  251. package/dist/cli/run-output.d.ts.map +1 -0
  252. package/dist/cli/run-output.js +47 -0
  253. package/dist/cli/run-output.js.map +1 -0
  254. package/dist/cli/run-stdout-envelope.d.ts +47 -0
  255. package/dist/cli/run-stdout-envelope.d.ts.map +1 -0
  256. package/dist/cli/run-stdout-envelope.js +98 -0
  257. package/dist/cli/run-stdout-envelope.js.map +1 -0
  258. package/dist/cli/run.d.ts +59 -0
  259. package/dist/cli/run.d.ts.map +1 -0
  260. package/dist/cli/run.js +1182 -0
  261. package/dist/cli/run.js.map +1 -0
  262. package/dist/cli/runs.d.ts +2 -0
  263. package/dist/cli/runs.d.ts.map +1 -0
  264. package/dist/cli/runs.js +88 -0
  265. package/dist/cli/runs.js.map +1 -0
  266. package/dist/cli/runtime-routing-policy.d.ts +51 -0
  267. package/dist/cli/runtime-routing-policy.d.ts.map +1 -0
  268. package/dist/cli/runtime-routing-policy.js +143 -0
  269. package/dist/cli/runtime-routing-policy.js.map +1 -0
  270. package/dist/cli/styled-table.d.ts +11 -0
  271. package/dist/cli/styled-table.d.ts.map +1 -0
  272. package/dist/cli/styled-table.js +40 -0
  273. package/dist/cli/styled-table.js.map +1 -0
  274. package/dist/cli/terminal-style.d.ts +26 -0
  275. package/dist/cli/terminal-style.d.ts.map +1 -0
  276. package/dist/cli/terminal-style.js +75 -0
  277. package/dist/cli/terminal-style.js.map +1 -0
  278. package/dist/cli/tty-notice.d.ts +21 -0
  279. package/dist/cli/tty-notice.d.ts.map +1 -0
  280. package/dist/cli/tty-notice.js +35 -0
  281. package/dist/cli/tty-notice.js.map +1 -0
  282. package/dist/cli/uninstall.d.ts +22 -0
  283. package/dist/cli/uninstall.d.ts.map +1 -0
  284. package/dist/cli/uninstall.js +277 -0
  285. package/dist/cli/uninstall.js.map +1 -0
  286. package/dist/cli/utility-progress.d.ts +14 -0
  287. package/dist/cli/utility-progress.d.ts.map +1 -0
  288. package/dist/cli/utility-progress.js +23 -0
  289. package/dist/cli/utility-progress.js.map +1 -0
  290. package/dist/cli/version-info.d.ts +2 -0
  291. package/dist/cli/version-info.d.ts.map +1 -0
  292. package/dist/cli/version-info.js +32 -0
  293. package/dist/cli/version-info.js.map +1 -0
  294. package/dist/connectors/claude-code.d.ts +16 -0
  295. package/dist/connectors/claude-code.d.ts.map +1 -0
  296. package/dist/connectors/claude-code.js +492 -0
  297. package/dist/connectors/claude-code.js.map +1 -0
  298. package/dist/connectors/codex-default-model.d.ts +10 -0
  299. package/dist/connectors/codex-default-model.d.ts.map +1 -0
  300. package/dist/connectors/codex-default-model.js +142 -0
  301. package/dist/connectors/codex-default-model.js.map +1 -0
  302. package/dist/connectors/codex.d.ts +21 -0
  303. package/dist/connectors/codex.d.ts.map +1 -0
  304. package/dist/connectors/codex.js +709 -0
  305. package/dist/connectors/codex.js.map +1 -0
  306. package/dist/connectors/connector.d.ts +7 -0
  307. package/dist/connectors/connector.d.ts.map +1 -0
  308. package/dist/connectors/connector.js +2 -0
  309. package/dist/connectors/connector.js.map +1 -0
  310. package/dist/connectors/cursor-agent.d.ts +10 -0
  311. package/dist/connectors/cursor-agent.d.ts.map +1 -0
  312. package/dist/connectors/cursor-agent.js +156 -0
  313. package/dist/connectors/cursor-agent.js.map +1 -0
  314. package/dist/connectors/custom.d.ts +7 -0
  315. package/dist/connectors/custom.d.ts.map +1 -0
  316. package/dist/connectors/custom.js +135 -0
  317. package/dist/connectors/custom.js.map +1 -0
  318. package/dist/connectors/health.d.ts +35 -0
  319. package/dist/connectors/health.d.ts.map +1 -0
  320. package/dist/connectors/health.js +169 -0
  321. package/dist/connectors/health.js.map +1 -0
  322. package/dist/connectors/remediation.d.ts +3 -0
  323. package/dist/connectors/remediation.d.ts.map +1 -0
  324. package/dist/connectors/remediation.js +16 -0
  325. package/dist/connectors/remediation.js.map +1 -0
  326. package/dist/connectors/resolver.d.ts +44 -0
  327. package/dist/connectors/resolver.d.ts.map +1 -0
  328. package/dist/connectors/resolver.js +204 -0
  329. package/dist/connectors/resolver.js.map +1 -0
  330. package/dist/connectors/subprocess.d.ts +59 -0
  331. package/dist/connectors/subprocess.d.ts.map +1 -0
  332. package/dist/connectors/subprocess.js +375 -0
  333. package/dist/connectors/subprocess.js.map +1 -0
  334. package/dist/flows/accommodation-ledger.d.ts +49 -0
  335. package/dist/flows/accommodation-ledger.d.ts.map +1 -0
  336. package/dist/flows/accommodation-ledger.js +277 -0
  337. package/dist/flows/accommodation-ledger.js.map +1 -0
  338. package/dist/flows/assemble-flow-schematic.d.ts +30 -0
  339. package/dist/flows/assemble-flow-schematic.d.ts.map +1 -0
  340. package/dist/flows/assemble-flow-schematic.js +58 -0
  341. package/dist/flows/assemble-flow-schematic.js.map +1 -0
  342. package/dist/flows/axis-selections.d.ts +4 -0
  343. package/dist/flows/axis-selections.d.ts.map +1 -0
  344. package/dist/flows/axis-selections.js +34 -0
  345. package/dist/flows/axis-selections.js.map +1 -0
  346. package/dist/flows/block-step-expansion.d.ts +69 -0
  347. package/dist/flows/block-step-expansion.d.ts.map +1 -0
  348. package/dist/flows/block-step-expansion.js +219 -0
  349. package/dist/flows/block-step-expansion.js.map +1 -0
  350. package/dist/flows/build/assembly-spec.d.ts +5 -0
  351. package/dist/flows/build/assembly-spec.d.ts.map +1 -0
  352. package/dist/flows/build/assembly-spec.js +287 -0
  353. package/dist/flows/build/assembly-spec.js.map +1 -0
  354. package/dist/flows/build/data.d.ts +848 -0
  355. package/dist/flows/build/data.d.ts.map +1 -0
  356. package/dist/flows/build/data.js +163 -0
  357. package/dist/flows/build/data.js.map +1 -0
  358. package/dist/flows/build/flow.d.ts +2 -0
  359. package/dist/flows/build/flow.d.ts.map +1 -0
  360. package/dist/flows/build/flow.js +4 -0
  361. package/dist/flows/build/flow.js.map +1 -0
  362. package/dist/flows/build/index.d.ts +4 -0
  363. package/dist/flows/build/index.d.ts.map +1 -0
  364. package/dist/flows/build/index.js +8 -0
  365. package/dist/flows/build/index.js.map +1 -0
  366. package/dist/flows/build/relay-hints.d.ts +5 -0
  367. package/dist/flows/build/relay-hints.d.ts.map +1 -0
  368. package/dist/flows/build/relay-hints.js +51 -0
  369. package/dist/flows/build/relay-hints.js.map +1 -0
  370. package/dist/flows/build/reports.d.ts +577 -0
  371. package/dist/flows/build/reports.d.ts.map +1 -0
  372. package/dist/flows/build/reports.js +698 -0
  373. package/dist/flows/build/reports.js.map +1 -0
  374. package/dist/flows/build/writers/baseline-snapshot.d.ts +4 -0
  375. package/dist/flows/build/writers/baseline-snapshot.d.ts.map +1 -0
  376. package/dist/flows/build/writers/baseline-snapshot.js +76 -0
  377. package/dist/flows/build/writers/baseline-snapshot.js.map +1 -0
  378. package/dist/flows/build/writers/checkpoint-brief-projection.d.ts +29 -0
  379. package/dist/flows/build/writers/checkpoint-brief-projection.d.ts.map +1 -0
  380. package/dist/flows/build/writers/checkpoint-brief-projection.js +145 -0
  381. package/dist/flows/build/writers/checkpoint-brief-projection.js.map +1 -0
  382. package/dist/flows/build/writers/checkpoint-brief.d.ts +3 -0
  383. package/dist/flows/build/writers/checkpoint-brief.d.ts.map +1 -0
  384. package/dist/flows/build/writers/checkpoint-brief.js +55 -0
  385. package/dist/flows/build/writers/checkpoint-brief.js.map +1 -0
  386. package/dist/flows/build/writers/checkpoint-html.d.ts +3 -0
  387. package/dist/flows/build/writers/checkpoint-html.d.ts.map +1 -0
  388. package/dist/flows/build/writers/checkpoint-html.js +106 -0
  389. package/dist/flows/build/writers/checkpoint-html.js.map +1 -0
  390. package/dist/flows/build/writers/close.d.ts +3 -0
  391. package/dist/flows/build/writers/close.d.ts.map +1 -0
  392. package/dist/flows/build/writers/close.js +72 -0
  393. package/dist/flows/build/writers/close.js.map +1 -0
  394. package/dist/flows/build/writers/plan.d.ts +3 -0
  395. package/dist/flows/build/writers/plan.d.ts.map +1 -0
  396. package/dist/flows/build/writers/plan.js +74 -0
  397. package/dist/flows/build/writers/plan.js.map +1 -0
  398. package/dist/flows/build/writers/result-projection.d.ts +13 -0
  399. package/dist/flows/build/writers/result-projection.d.ts.map +1 -0
  400. package/dist/flows/build/writers/result-projection.js +105 -0
  401. package/dist/flows/build/writers/result-projection.js.map +1 -0
  402. package/dist/flows/build/writers/touch-area-projection.d.ts +9 -0
  403. package/dist/flows/build/writers/touch-area-projection.d.ts.map +1 -0
  404. package/dist/flows/build/writers/touch-area-projection.js +120 -0
  405. package/dist/flows/build/writers/touch-area-projection.js.map +1 -0
  406. package/dist/flows/build/writers/touch-area.d.ts +3 -0
  407. package/dist/flows/build/writers/touch-area.d.ts.map +1 -0
  408. package/dist/flows/build/writers/touch-area.js +130 -0
  409. package/dist/flows/build/writers/touch-area.js.map +1 -0
  410. package/dist/flows/build/writers/verification-projection.d.ts +4 -0
  411. package/dist/flows/build/writers/verification-projection.d.ts.map +1 -0
  412. package/dist/flows/build/writers/verification-projection.js +21 -0
  413. package/dist/flows/build/writers/verification-projection.js.map +1 -0
  414. package/dist/flows/build/writers/verification.d.ts +3 -0
  415. package/dist/flows/build/writers/verification.d.ts.map +1 -0
  416. package/dist/flows/build/writers/verification.js +31 -0
  417. package/dist/flows/build/writers/verification.js.map +1 -0
  418. package/dist/flows/canonical-stage-policy.d.ts +14 -0
  419. package/dist/flows/canonical-stage-policy.d.ts.map +1 -0
  420. package/dist/flows/canonical-stage-policy.js +31 -0
  421. package/dist/flows/canonical-stage-policy.js.map +1 -0
  422. package/dist/flows/catalog-derivations.d.ts +34 -0
  423. package/dist/flows/catalog-derivations.d.ts.map +1 -0
  424. package/dist/flows/catalog-derivations.js +144 -0
  425. package/dist/flows/catalog-derivations.js.map +1 -0
  426. package/dist/flows/catalog.d.ts +16 -0
  427. package/dist/flows/catalog.d.ts.map +1 -0
  428. package/dist/flows/catalog.js +87 -0
  429. package/dist/flows/catalog.js.map +1 -0
  430. package/dist/flows/compile-schematic-to-flow.d.ts +16 -0
  431. package/dist/flows/compile-schematic-to-flow.d.ts.map +1 -0
  432. package/dist/flows/compile-schematic-to-flow.js +651 -0
  433. package/dist/flows/compile-schematic-to-flow.js.map +1 -0
  434. package/dist/flows/compiled-flow-file-plan.d.ts +8 -0
  435. package/dist/flows/compiled-flow-file-plan.d.ts.map +1 -0
  436. package/dist/flows/compiled-flow-file-plan.js +50 -0
  437. package/dist/flows/compiled-flow-file-plan.js.map +1 -0
  438. package/dist/flows/composition/actual-menu.d.ts +30 -0
  439. package/dist/flows/composition/actual-menu.d.ts.map +1 -0
  440. package/dist/flows/composition/actual-menu.js +131 -0
  441. package/dist/flows/composition/actual-menu.js.map +1 -0
  442. package/dist/flows/composition/composer.d.ts +73 -0
  443. package/dist/flows/composition/composer.d.ts.map +1 -0
  444. package/dist/flows/composition/composer.js +1339 -0
  445. package/dist/flows/composition/composer.js.map +1 -0
  446. package/dist/flows/composition/equipment-profiles.d.ts +21 -0
  447. package/dist/flows/composition/equipment-profiles.d.ts.map +1 -0
  448. package/dist/flows/composition/equipment-profiles.js +82 -0
  449. package/dist/flows/composition/equipment-profiles.js.map +1 -0
  450. package/dist/flows/composition/evaluate.d.ts +76 -0
  451. package/dist/flows/composition/evaluate.d.ts.map +1 -0
  452. package/dist/flows/composition/evaluate.js +373 -0
  453. package/dist/flows/composition/evaluate.js.map +1 -0
  454. package/dist/flows/composition/index.d.ts +8 -0
  455. package/dist/flows/composition/index.d.ts.map +1 -0
  456. package/dist/flows/composition/index.js +16 -0
  457. package/dist/flows/composition/index.js.map +1 -0
  458. package/dist/flows/composition/intent.d.ts +10 -0
  459. package/dist/flows/composition/intent.d.ts.map +1 -0
  460. package/dist/flows/composition/intent.js +125 -0
  461. package/dist/flows/composition/intent.js.map +1 -0
  462. package/dist/flows/composition/propose-prompts.d.ts +3 -0
  463. package/dist/flows/composition/propose-prompts.d.ts.map +1 -0
  464. package/dist/flows/composition/propose-prompts.js +196 -0
  465. package/dist/flows/composition/propose-prompts.js.map +1 -0
  466. package/dist/flows/composition/propose.d.ts +36 -0
  467. package/dist/flows/composition/propose.d.ts.map +1 -0
  468. package/dist/flows/composition/propose.js +275 -0
  469. package/dist/flows/composition/propose.js.map +1 -0
  470. package/dist/flows/contract-body-signature.d.ts +4 -0
  471. package/dist/flows/contract-body-signature.d.ts.map +1 -0
  472. package/dist/flows/contract-body-signature.js +166 -0
  473. package/dist/flows/contract-body-signature.js.map +1 -0
  474. package/dist/flows/converge-proof/assembly-spec.d.ts +5 -0
  475. package/dist/flows/converge-proof/assembly-spec.d.ts.map +1 -0
  476. package/dist/flows/converge-proof/assembly-spec.js +115 -0
  477. package/dist/flows/converge-proof/assembly-spec.js.map +1 -0
  478. package/dist/flows/converge-proof/data.d.ts +412 -0
  479. package/dist/flows/converge-proof/data.d.ts.map +1 -0
  480. package/dist/flows/converge-proof/data.js +23 -0
  481. package/dist/flows/converge-proof/data.js.map +1 -0
  482. package/dist/flows/converge-proof/flow.d.ts +2 -0
  483. package/dist/flows/converge-proof/flow.d.ts.map +1 -0
  484. package/dist/flows/converge-proof/flow.js +4 -0
  485. package/dist/flows/converge-proof/flow.js.map +1 -0
  486. package/dist/flows/cross-tool-build/assembly-spec.d.ts +5 -0
  487. package/dist/flows/cross-tool-build/assembly-spec.d.ts.map +1 -0
  488. package/dist/flows/cross-tool-build/assembly-spec.js +183 -0
  489. package/dist/flows/cross-tool-build/assembly-spec.js.map +1 -0
  490. package/dist/flows/cross-tool-build/data.d.ts +570 -0
  491. package/dist/flows/cross-tool-build/data.d.ts.map +1 -0
  492. package/dist/flows/cross-tool-build/data.js +94 -0
  493. package/dist/flows/cross-tool-build/data.js.map +1 -0
  494. package/dist/flows/cross-tool-build/flow.d.ts +2 -0
  495. package/dist/flows/cross-tool-build/flow.d.ts.map +1 -0
  496. package/dist/flows/cross-tool-build/flow.js +4 -0
  497. package/dist/flows/cross-tool-build/flow.js.map +1 -0
  498. package/dist/flows/cross-tool-build/relay-hints.d.ts +7 -0
  499. package/dist/flows/cross-tool-build/relay-hints.d.ts.map +1 -0
  500. package/dist/flows/cross-tool-build/relay-hints.js +76 -0
  501. package/dist/flows/cross-tool-build/relay-hints.js.map +1 -0
  502. package/dist/flows/cross-tool-build/reports.d.ts +161 -0
  503. package/dist/flows/cross-tool-build/reports.d.ts.map +1 -0
  504. package/dist/flows/cross-tool-build/reports.js +196 -0
  505. package/dist/flows/cross-tool-build/reports.js.map +1 -0
  506. package/dist/flows/cross-tool-build/writers/close.d.ts +3 -0
  507. package/dist/flows/cross-tool-build/writers/close.d.ts.map +1 -0
  508. package/dist/flows/cross-tool-build/writers/close.js +49 -0
  509. package/dist/flows/cross-tool-build/writers/close.js.map +1 -0
  510. package/dist/flows/cross-tool-build/writers/plan.d.ts +3 -0
  511. package/dist/flows/cross-tool-build/writers/plan.d.ts.map +1 -0
  512. package/dist/flows/cross-tool-build/writers/plan.js +27 -0
  513. package/dist/flows/cross-tool-build/writers/plan.js.map +1 -0
  514. package/dist/flows/cross-tool-build/writers/verification.d.ts +3 -0
  515. package/dist/flows/cross-tool-build/writers/verification.d.ts.map +1 -0
  516. package/dist/flows/cross-tool-build/writers/verification.js +46 -0
  517. package/dist/flows/cross-tool-build/writers/verification.js.map +1 -0
  518. package/dist/flows/equipment-reshape.d.ts +18 -0
  519. package/dist/flows/equipment-reshape.d.ts.map +1 -0
  520. package/dist/flows/equipment-reshape.js +119 -0
  521. package/dist/flows/equipment-reshape.js.map +1 -0
  522. package/dist/flows/explainer/data.d.ts +1032 -0
  523. package/dist/flows/explainer/data.d.ts.map +1 -0
  524. package/dist/flows/explainer/data.js +712 -0
  525. package/dist/flows/explainer/data.js.map +1 -0
  526. package/dist/flows/explainer/flow.d.ts +2 -0
  527. package/dist/flows/explainer/flow.d.ts.map +1 -0
  528. package/dist/flows/explainer/flow.js +4 -0
  529. package/dist/flows/explainer/flow.js.map +1 -0
  530. package/dist/flows/explainer/relay-hints.d.ts +4 -0
  531. package/dist/flows/explainer/relay-hints.d.ts.map +1 -0
  532. package/dist/flows/explainer/relay-hints.js +28 -0
  533. package/dist/flows/explainer/relay-hints.js.map +1 -0
  534. package/dist/flows/explainer/reports.d.ts +394 -0
  535. package/dist/flows/explainer/reports.d.ts.map +1 -0
  536. package/dist/flows/explainer/reports.js +296 -0
  537. package/dist/flows/explainer/reports.js.map +1 -0
  538. package/dist/flows/explainer/writers/close.d.ts +3 -0
  539. package/dist/flows/explainer/writers/close.d.ts.map +1 -0
  540. package/dist/flows/explainer/writers/close.js +67 -0
  541. package/dist/flows/explainer/writers/close.js.map +1 -0
  542. package/dist/flows/explainer/writers/digest.d.ts +3 -0
  543. package/dist/flows/explainer/writers/digest.d.ts.map +1 -0
  544. package/dist/flows/explainer/writers/digest.js +47 -0
  545. package/dist/flows/explainer/writers/digest.js.map +1 -0
  546. package/dist/flows/explainer/writers/ideas.d.ts +3 -0
  547. package/dist/flows/explainer/writers/ideas.d.ts.map +1 -0
  548. package/dist/flows/explainer/writers/ideas.js +65 -0
  549. package/dist/flows/explainer/writers/ideas.js.map +1 -0
  550. package/dist/flows/explainer/writers/intake.d.ts +3 -0
  551. package/dist/flows/explainer/writers/intake.d.ts.map +1 -0
  552. package/dist/flows/explainer/writers/intake.js +33 -0
  553. package/dist/flows/explainer/writers/intake.js.map +1 -0
  554. package/dist/flows/explainer/writers/spec.d.ts +3 -0
  555. package/dist/flows/explainer/writers/spec.d.ts.map +1 -0
  556. package/dist/flows/explainer/writers/spec.js +77 -0
  557. package/dist/flows/explainer/writers/spec.js.map +1 -0
  558. package/dist/flows/explainer/writers/verification.d.ts +3 -0
  559. package/dist/flows/explainer/writers/verification.d.ts.map +1 -0
  560. package/dist/flows/explainer/writers/verification.js +43 -0
  561. package/dist/flows/explainer/writers/verification.js.map +1 -0
  562. package/dist/flows/explore/assembly-spec.d.ts +5 -0
  563. package/dist/flows/explore/assembly-spec.d.ts.map +1 -0
  564. package/dist/flows/explore/assembly-spec.js +344 -0
  565. package/dist/flows/explore/assembly-spec.js.map +1 -0
  566. package/dist/flows/explore/data.d.ts +734 -0
  567. package/dist/flows/explore/data.d.ts.map +1 -0
  568. package/dist/flows/explore/data.js +174 -0
  569. package/dist/flows/explore/data.js.map +1 -0
  570. package/dist/flows/explore/flow.d.ts +2 -0
  571. package/dist/flows/explore/flow.d.ts.map +1 -0
  572. package/dist/flows/explore/flow.js +4 -0
  573. package/dist/flows/explore/flow.js.map +1 -0
  574. package/dist/flows/explore/index.d.ts +4 -0
  575. package/dist/flows/explore/index.d.ts.map +1 -0
  576. package/dist/flows/explore/index.js +8 -0
  577. package/dist/flows/explore/index.js.map +1 -0
  578. package/dist/flows/explore/relay-hints.d.ts +6 -0
  579. package/dist/flows/explore/relay-hints.d.ts.map +1 -0
  580. package/dist/flows/explore/relay-hints.js +53 -0
  581. package/dist/flows/explore/relay-hints.js.map +1 -0
  582. package/dist/flows/explore/reports.d.ts +483 -0
  583. package/dist/flows/explore/reports.d.ts.map +1 -0
  584. package/dist/flows/explore/reports.js +359 -0
  585. package/dist/flows/explore/reports.js.map +1 -0
  586. package/dist/flows/explore/writers/analysis.d.ts +3 -0
  587. package/dist/flows/explore/writers/analysis.d.ts.map +1 -0
  588. package/dist/flows/explore/writers/analysis.js +55 -0
  589. package/dist/flows/explore/writers/analysis.js.map +1 -0
  590. package/dist/flows/explore/writers/brief.d.ts +3 -0
  591. package/dist/flows/explore/writers/brief.d.ts.map +1 -0
  592. package/dist/flows/explore/writers/brief.js +24 -0
  593. package/dist/flows/explore/writers/brief.js.map +1 -0
  594. package/dist/flows/explore/writers/close.d.ts +3 -0
  595. package/dist/flows/explore/writers/close.d.ts.map +1 -0
  596. package/dist/flows/explore/writers/close.js +86 -0
  597. package/dist/flows/explore/writers/close.js.map +1 -0
  598. package/dist/flows/explore/writers/decision-options-projection.d.ts +10 -0
  599. package/dist/flows/explore/writers/decision-options-projection.d.ts.map +1 -0
  600. package/dist/flows/explore/writers/decision-options-projection.js +108 -0
  601. package/dist/flows/explore/writers/decision-options-projection.js.map +1 -0
  602. package/dist/flows/explore/writers/decision-options.d.ts +3 -0
  603. package/dist/flows/explore/writers/decision-options.d.ts.map +1 -0
  604. package/dist/flows/explore/writers/decision-options.js +25 -0
  605. package/dist/flows/explore/writers/decision-options.js.map +1 -0
  606. package/dist/flows/explore/writers/decision.d.ts +3 -0
  607. package/dist/flows/explore/writers/decision.d.ts.map +1 -0
  608. package/dist/flows/explore/writers/decision.js +80 -0
  609. package/dist/flows/explore/writers/decision.js.map +1 -0
  610. package/dist/flows/explore/writers/result-projection.d.ts +17 -0
  611. package/dist/flows/explore/writers/result-projection.d.ts.map +1 -0
  612. package/dist/flows/explore/writers/result-projection.js +41 -0
  613. package/dist/flows/explore/writers/result-projection.js.map +1 -0
  614. package/dist/flows/explore/writers/tournament-html.d.ts +3 -0
  615. package/dist/flows/explore/writers/tournament-html.d.ts.map +1 -0
  616. package/dist/flows/explore/writers/tournament-html.js +119 -0
  617. package/dist/flows/explore/writers/tournament-html.js.map +1 -0
  618. package/dist/flows/fix/assembly-spec.d.ts +5 -0
  619. package/dist/flows/fix/assembly-spec.d.ts.map +1 -0
  620. package/dist/flows/fix/assembly-spec.js +405 -0
  621. package/dist/flows/fix/assembly-spec.js.map +1 -0
  622. package/dist/flows/fix/data.d.ts +921 -0
  623. package/dist/flows/fix/data.d.ts.map +1 -0
  624. package/dist/flows/fix/data.js +207 -0
  625. package/dist/flows/fix/data.js.map +1 -0
  626. package/dist/flows/fix/flow.d.ts +2 -0
  627. package/dist/flows/fix/flow.d.ts.map +1 -0
  628. package/dist/flows/fix/flow.js +4 -0
  629. package/dist/flows/fix/flow.js.map +1 -0
  630. package/dist/flows/fix/index.d.ts +3 -0
  631. package/dist/flows/fix/index.d.ts.map +1 -0
  632. package/dist/flows/fix/index.js +5 -0
  633. package/dist/flows/fix/index.js.map +1 -0
  634. package/dist/flows/fix/relay-hints.d.ts +6 -0
  635. package/dist/flows/fix/relay-hints.d.ts.map +1 -0
  636. package/dist/flows/fix/relay-hints.js +52 -0
  637. package/dist/flows/fix/relay-hints.js.map +1 -0
  638. package/dist/flows/fix/reports.d.ts +562 -0
  639. package/dist/flows/fix/reports.d.ts.map +1 -0
  640. package/dist/flows/fix/reports.js +822 -0
  641. package/dist/flows/fix/reports.js.map +1 -0
  642. package/dist/flows/fix/writers/baseline-snapshot.d.ts +3 -0
  643. package/dist/flows/fix/writers/baseline-snapshot.d.ts.map +1 -0
  644. package/dist/flows/fix/writers/baseline-snapshot.js +45 -0
  645. package/dist/flows/fix/writers/baseline-snapshot.js.map +1 -0
  646. package/dist/flows/fix/writers/brief-projection.d.ts +8 -0
  647. package/dist/flows/fix/writers/brief-projection.d.ts.map +1 -0
  648. package/dist/flows/fix/writers/brief-projection.js +149 -0
  649. package/dist/flows/fix/writers/brief-projection.js.map +1 -0
  650. package/dist/flows/fix/writers/brief.d.ts +3 -0
  651. package/dist/flows/fix/writers/brief.d.ts.map +1 -0
  652. package/dist/flows/fix/writers/brief.js +29 -0
  653. package/dist/flows/fix/writers/brief.js.map +1 -0
  654. package/dist/flows/fix/writers/change-set-projection.d.ts +10 -0
  655. package/dist/flows/fix/writers/change-set-projection.d.ts.map +1 -0
  656. package/dist/flows/fix/writers/change-set-projection.js +62 -0
  657. package/dist/flows/fix/writers/change-set-projection.js.map +1 -0
  658. package/dist/flows/fix/writers/change-set.d.ts +3 -0
  659. package/dist/flows/fix/writers/change-set.d.ts.map +1 -0
  660. package/dist/flows/fix/writers/change-set.js +93 -0
  661. package/dist/flows/fix/writers/change-set.js.map +1 -0
  662. package/dist/flows/fix/writers/close.d.ts +3 -0
  663. package/dist/flows/fix/writers/close.d.ts.map +1 -0
  664. package/dist/flows/fix/writers/close.js +86 -0
  665. package/dist/flows/fix/writers/close.js.map +1 -0
  666. package/dist/flows/fix/writers/regression-baseline.d.ts +3 -0
  667. package/dist/flows/fix/writers/regression-baseline.d.ts.map +1 -0
  668. package/dist/flows/fix/writers/regression-baseline.js +39 -0
  669. package/dist/flows/fix/writers/regression-baseline.js.map +1 -0
  670. package/dist/flows/fix/writers/regression-projection.d.ts +5 -0
  671. package/dist/flows/fix/writers/regression-projection.d.ts.map +1 -0
  672. package/dist/flows/fix/writers/regression-projection.js +71 -0
  673. package/dist/flows/fix/writers/regression-projection.js.map +1 -0
  674. package/dist/flows/fix/writers/regression-rerun.d.ts +3 -0
  675. package/dist/flows/fix/writers/regression-rerun.d.ts.map +1 -0
  676. package/dist/flows/fix/writers/regression-rerun.js +51 -0
  677. package/dist/flows/fix/writers/regression-rerun.js.map +1 -0
  678. package/dist/flows/fix/writers/result-projection.d.ts +15 -0
  679. package/dist/flows/fix/writers/result-projection.d.ts.map +1 -0
  680. package/dist/flows/fix/writers/result-projection.js +58 -0
  681. package/dist/flows/fix/writers/result-projection.js.map +1 -0
  682. package/dist/flows/fix/writers/verification-projection.d.ts +4 -0
  683. package/dist/flows/fix/writers/verification-projection.d.ts.map +1 -0
  684. package/dist/flows/fix/writers/verification-projection.js +24 -0
  685. package/dist/flows/fix/writers/verification-projection.js.map +1 -0
  686. package/dist/flows/fix/writers/verification.d.ts +3 -0
  687. package/dist/flows/fix/writers/verification.d.ts.map +1 -0
  688. package/dist/flows/fix/writers/verification.js +32 -0
  689. package/dist/flows/fix/writers/verification.js.map +1 -0
  690. package/dist/flows/fix-until-green/assembly-spec.d.ts +5 -0
  691. package/dist/flows/fix-until-green/assembly-spec.d.ts.map +1 -0
  692. package/dist/flows/fix-until-green/assembly-spec.js +141 -0
  693. package/dist/flows/fix-until-green/assembly-spec.js.map +1 -0
  694. package/dist/flows/fix-until-green/data.d.ts +462 -0
  695. package/dist/flows/fix-until-green/data.d.ts.map +1 -0
  696. package/dist/flows/fix-until-green/data.js +49 -0
  697. package/dist/flows/fix-until-green/data.js.map +1 -0
  698. package/dist/flows/fix-until-green/flow.d.ts +2 -0
  699. package/dist/flows/fix-until-green/flow.d.ts.map +1 -0
  700. package/dist/flows/fix-until-green/flow.js +4 -0
  701. package/dist/flows/fix-until-green/flow.js.map +1 -0
  702. package/dist/flows/fix-until-green/relay-hints.d.ts +3 -0
  703. package/dist/flows/fix-until-green/relay-hints.d.ts.map +1 -0
  704. package/dist/flows/fix-until-green/relay-hints.js +37 -0
  705. package/dist/flows/fix-until-green/relay-hints.js.map +1 -0
  706. package/dist/flows/fix-until-green/reports.d.ts +38 -0
  707. package/dist/flows/fix-until-green/reports.d.ts.map +1 -0
  708. package/dist/flows/fix-until-green/reports.js +28 -0
  709. package/dist/flows/fix-until-green/reports.js.map +1 -0
  710. package/dist/flows/fix-until-green/writers/plan.d.ts +3 -0
  711. package/dist/flows/fix-until-green/writers/plan.d.ts.map +1 -0
  712. package/dist/flows/fix-until-green/writers/plan.js +27 -0
  713. package/dist/flows/fix-until-green/writers/plan.js.map +1 -0
  714. package/dist/flows/fix-until-green/writers/verification.d.ts +3 -0
  715. package/dist/flows/fix-until-green/writers/verification.d.ts.map +1 -0
  716. package/dist/flows/fix-until-green/writers/verification.js +46 -0
  717. package/dist/flows/fix-until-green/writers/verification.js.map +1 -0
  718. package/dist/flows/flow-definition.d.ts +81 -0
  719. package/dist/flows/flow-definition.d.ts.map +1 -0
  720. package/dist/flows/flow-definition.js +258 -0
  721. package/dist/flows/flow-definition.js.map +1 -0
  722. package/dist/flows/goal/assembly-spec.d.ts +5 -0
  723. package/dist/flows/goal/assembly-spec.d.ts.map +1 -0
  724. package/dist/flows/goal/assembly-spec.js +352 -0
  725. package/dist/flows/goal/assembly-spec.js.map +1 -0
  726. package/dist/flows/goal/data.d.ts +795 -0
  727. package/dist/flows/goal/data.d.ts.map +1 -0
  728. package/dist/flows/goal/data.js +181 -0
  729. package/dist/flows/goal/data.js.map +1 -0
  730. package/dist/flows/goal/flow.d.ts +2 -0
  731. package/dist/flows/goal/flow.d.ts.map +1 -0
  732. package/dist/flows/goal/flow.js +4 -0
  733. package/dist/flows/goal/flow.js.map +1 -0
  734. package/dist/flows/goal/relay-hints.d.ts +5 -0
  735. package/dist/flows/goal/relay-hints.d.ts.map +1 -0
  736. package/dist/flows/goal/relay-hints.js +48 -0
  737. package/dist/flows/goal/relay-hints.js.map +1 -0
  738. package/dist/flows/goal/reports.d.ts +442 -0
  739. package/dist/flows/goal/reports.d.ts.map +1 -0
  740. package/dist/flows/goal/reports.js +510 -0
  741. package/dist/flows/goal/reports.js.map +1 -0
  742. package/dist/flows/goal/writers/attempt.d.ts +3 -0
  743. package/dist/flows/goal/writers/attempt.d.ts.map +1 -0
  744. package/dist/flows/goal/writers/attempt.js +52 -0
  745. package/dist/flows/goal/writers/attempt.js.map +1 -0
  746. package/dist/flows/goal/writers/close.d.ts +3 -0
  747. package/dist/flows/goal/writers/close.d.ts.map +1 -0
  748. package/dist/flows/goal/writers/close.js +80 -0
  749. package/dist/flows/goal/writers/close.js.map +1 -0
  750. package/dist/flows/goal/writers/contract.d.ts +3 -0
  751. package/dist/flows/goal/writers/contract.d.ts.map +1 -0
  752. package/dist/flows/goal/writers/contract.js +137 -0
  753. package/dist/flows/goal/writers/contract.js.map +1 -0
  754. package/dist/flows/goal/writers/evidence-evaluation.d.ts +3 -0
  755. package/dist/flows/goal/writers/evidence-evaluation.d.ts.map +1 -0
  756. package/dist/flows/goal/writers/evidence-evaluation.js +91 -0
  757. package/dist/flows/goal/writers/evidence-evaluation.js.map +1 -0
  758. package/dist/flows/goal/writers/recovery.d.ts +3 -0
  759. package/dist/flows/goal/writers/recovery.d.ts.map +1 -0
  760. package/dist/flows/goal/writers/recovery.js +67 -0
  761. package/dist/flows/goal/writers/recovery.js.map +1 -0
  762. package/dist/flows/prototype/assembly-spec.d.ts +5 -0
  763. package/dist/flows/prototype/assembly-spec.d.ts.map +1 -0
  764. package/dist/flows/prototype/assembly-spec.js +408 -0
  765. package/dist/flows/prototype/assembly-spec.js.map +1 -0
  766. package/dist/flows/prototype/data.d.ts +947 -0
  767. package/dist/flows/prototype/data.d.ts.map +1 -0
  768. package/dist/flows/prototype/data.js +212 -0
  769. package/dist/flows/prototype/data.js.map +1 -0
  770. package/dist/flows/prototype/flow.d.ts +2 -0
  771. package/dist/flows/prototype/flow.d.ts.map +1 -0
  772. package/dist/flows/prototype/flow.js +4 -0
  773. package/dist/flows/prototype/flow.js.map +1 -0
  774. package/dist/flows/prototype/index.d.ts +4 -0
  775. package/dist/flows/prototype/index.d.ts.map +1 -0
  776. package/dist/flows/prototype/index.js +8 -0
  777. package/dist/flows/prototype/index.js.map +1 -0
  778. package/dist/flows/prototype/relay-hints.d.ts +5 -0
  779. package/dist/flows/prototype/relay-hints.d.ts.map +1 -0
  780. package/dist/flows/prototype/relay-hints.js +46 -0
  781. package/dist/flows/prototype/relay-hints.js.map +1 -0
  782. package/dist/flows/prototype/reports.d.ts +909 -0
  783. package/dist/flows/prototype/reports.d.ts.map +1 -0
  784. package/dist/flows/prototype/reports.js +721 -0
  785. package/dist/flows/prototype/reports.js.map +1 -0
  786. package/dist/flows/prototype/writers/brief.d.ts +3 -0
  787. package/dist/flows/prototype/writers/brief.d.ts.map +1 -0
  788. package/dist/flows/prototype/writers/brief.js +51 -0
  789. package/dist/flows/prototype/writers/brief.js.map +1 -0
  790. package/dist/flows/prototype/writers/checkpoint-html.d.ts +3 -0
  791. package/dist/flows/prototype/writers/checkpoint-html.d.ts.map +1 -0
  792. package/dist/flows/prototype/writers/checkpoint-html.js +247 -0
  793. package/dist/flows/prototype/writers/checkpoint-html.js.map +1 -0
  794. package/dist/flows/prototype/writers/close.d.ts +3 -0
  795. package/dist/flows/prototype/writers/close.d.ts.map +1 -0
  796. package/dist/flows/prototype/writers/close.js +358 -0
  797. package/dist/flows/prototype/writers/close.js.map +1 -0
  798. package/dist/flows/prototype/writers/plan.d.ts +3 -0
  799. package/dist/flows/prototype/writers/plan.d.ts.map +1 -0
  800. package/dist/flows/prototype/writers/plan.js +31 -0
  801. package/dist/flows/prototype/writers/plan.js.map +1 -0
  802. package/dist/flows/prototype/writers/variant-choice-options.d.ts +3 -0
  803. package/dist/flows/prototype/writers/variant-choice-options.d.ts.map +1 -0
  804. package/dist/flows/prototype/writers/variant-choice-options.js +58 -0
  805. package/dist/flows/prototype/writers/variant-choice-options.js.map +1 -0
  806. package/dist/flows/prototype/writers/variant-options.d.ts +3 -0
  807. package/dist/flows/prototype/writers/variant-options.d.ts.map +1 -0
  808. package/dist/flows/prototype/writers/variant-options.js +74 -0
  809. package/dist/flows/prototype/writers/variant-options.js.map +1 -0
  810. package/dist/flows/prototype/writers/variant-provider-evidence.d.ts +3 -0
  811. package/dist/flows/prototype/writers/variant-provider-evidence.d.ts.map +1 -0
  812. package/dist/flows/prototype/writers/variant-provider-evidence.js +79 -0
  813. package/dist/flows/prototype/writers/variant-provider-evidence.js.map +1 -0
  814. package/dist/flows/prototype/writers/variant-verification.d.ts +3 -0
  815. package/dist/flows/prototype/writers/variant-verification.d.ts.map +1 -0
  816. package/dist/flows/prototype/writers/variant-verification.js +149 -0
  817. package/dist/flows/prototype/writers/variant-verification.js.map +1 -0
  818. package/dist/flows/prototype/writers/verification.d.ts +3 -0
  819. package/dist/flows/prototype/writers/verification.d.ts.map +1 -0
  820. package/dist/flows/prototype/writers/verification.js +105 -0
  821. package/dist/flows/prototype/writers/verification.js.map +1 -0
  822. package/dist/flows/pursue/assembly-spec.d.ts +6 -0
  823. package/dist/flows/pursue/assembly-spec.d.ts.map +1 -0
  824. package/dist/flows/pursue/assembly-spec.js +181 -0
  825. package/dist/flows/pursue/assembly-spec.js.map +1 -0
  826. package/dist/flows/pursue/data.d.ts +740 -0
  827. package/dist/flows/pursue/data.d.ts.map +1 -0
  828. package/dist/flows/pursue/data.js +125 -0
  829. package/dist/flows/pursue/data.js.map +1 -0
  830. package/dist/flows/pursue/flow.d.ts +2 -0
  831. package/dist/flows/pursue/flow.d.ts.map +1 -0
  832. package/dist/flows/pursue/flow.js +4 -0
  833. package/dist/flows/pursue/flow.js.map +1 -0
  834. package/dist/flows/pursue/relay-hints.d.ts +4 -0
  835. package/dist/flows/pursue/relay-hints.d.ts.map +1 -0
  836. package/dist/flows/pursue/relay-hints.js +34 -0
  837. package/dist/flows/pursue/relay-hints.js.map +1 -0
  838. package/dist/flows/pursue/reports.d.ts +383 -0
  839. package/dist/flows/pursue/reports.d.ts.map +1 -0
  840. package/dist/flows/pursue/reports.js +404 -0
  841. package/dist/flows/pursue/reports.js.map +1 -0
  842. package/dist/flows/pursue/writers/close.d.ts +3 -0
  843. package/dist/flows/pursue/writers/close.d.ts.map +1 -0
  844. package/dist/flows/pursue/writers/close.js +41 -0
  845. package/dist/flows/pursue/writers/close.js.map +1 -0
  846. package/dist/flows/pursue/writers/contract-projection.d.ts +7 -0
  847. package/dist/flows/pursue/writers/contract-projection.d.ts.map +1 -0
  848. package/dist/flows/pursue/writers/contract-projection.js +125 -0
  849. package/dist/flows/pursue/writers/contract-projection.js.map +1 -0
  850. package/dist/flows/pursue/writers/contract.d.ts +3 -0
  851. package/dist/flows/pursue/writers/contract.d.ts.map +1 -0
  852. package/dist/flows/pursue/writers/contract.js +17 -0
  853. package/dist/flows/pursue/writers/contract.js.map +1 -0
  854. package/dist/flows/pursue/writers/graph.d.ts +3 -0
  855. package/dist/flows/pursue/writers/graph.d.ts.map +1 -0
  856. package/dist/flows/pursue/writers/graph.js +76 -0
  857. package/dist/flows/pursue/writers/graph.js.map +1 -0
  858. package/dist/flows/pursue/writers/result-projection.d.ts +11 -0
  859. package/dist/flows/pursue/writers/result-projection.d.ts.map +1 -0
  860. package/dist/flows/pursue/writers/result-projection.js +85 -0
  861. package/dist/flows/pursue/writers/result-projection.js.map +1 -0
  862. package/dist/flows/pursue/writers/verification-projection.d.ts +4 -0
  863. package/dist/flows/pursue/writers/verification-projection.d.ts.map +1 -0
  864. package/dist/flows/pursue/writers/verification-projection.js +20 -0
  865. package/dist/flows/pursue/writers/verification-projection.js.map +1 -0
  866. package/dist/flows/pursue/writers/verification.d.ts +3 -0
  867. package/dist/flows/pursue/writers/verification.d.ts.map +1 -0
  868. package/dist/flows/pursue/writers/verification.js +24 -0
  869. package/dist/flows/pursue/writers/verification.js.map +1 -0
  870. package/dist/flows/pursue/writers/wave-plan.d.ts +3 -0
  871. package/dist/flows/pursue/writers/wave-plan.d.ts.map +1 -0
  872. package/dist/flows/pursue/writers/wave-plan.js +36 -0
  873. package/dist/flows/pursue/writers/wave-plan.js.map +1 -0
  874. package/dist/flows/registries/checkpoint-writers/registry.d.ts +3 -0
  875. package/dist/flows/registries/checkpoint-writers/registry.d.ts.map +1 -0
  876. package/dist/flows/registries/checkpoint-writers/registry.js +12 -0
  877. package/dist/flows/registries/checkpoint-writers/registry.js.map +1 -0
  878. package/dist/flows/registries/checkpoint-writers/types.d.ts +22 -0
  879. package/dist/flows/registries/checkpoint-writers/types.d.ts.map +1 -0
  880. package/dist/flows/registries/checkpoint-writers/types.js +24 -0
  881. package/dist/flows/registries/checkpoint-writers/types.js.map +1 -0
  882. package/dist/flows/registries/close-writers/generic-close-builder.d.ts +3 -0
  883. package/dist/flows/registries/close-writers/generic-close-builder.d.ts.map +1 -0
  884. package/dist/flows/registries/close-writers/generic-close-builder.js +45 -0
  885. package/dist/flows/registries/close-writers/generic-close-builder.js.map +1 -0
  886. package/dist/flows/registries/close-writers/registry.d.ts +5 -0
  887. package/dist/flows/registries/close-writers/registry.d.ts.map +1 -0
  888. package/dist/flows/registries/close-writers/registry.js +48 -0
  889. package/dist/flows/registries/close-writers/registry.js.map +1 -0
  890. package/dist/flows/registries/close-writers/types.d.ts +19 -0
  891. package/dist/flows/registries/close-writers/types.d.ts.map +1 -0
  892. package/dist/flows/registries/close-writers/types.js +19 -0
  893. package/dist/flows/registries/close-writers/types.js.map +1 -0
  894. package/dist/flows/registries/compose-writers/registry.d.ts +6 -0
  895. package/dist/flows/registries/compose-writers/registry.d.ts.map +1 -0
  896. package/dist/flows/registries/compose-writers/registry.js +46 -0
  897. package/dist/flows/registries/compose-writers/registry.js.map +1 -0
  898. package/dist/flows/registries/compose-writers/types.d.ts +30 -0
  899. package/dist/flows/registries/compose-writers/types.d.ts.map +1 -0
  900. package/dist/flows/registries/compose-writers/types.js +22 -0
  901. package/dist/flows/registries/compose-writers/types.js.map +1 -0
  902. package/dist/flows/registries/cross-report-validators.d.ts +10 -0
  903. package/dist/flows/registries/cross-report-validators.d.ts.map +1 -0
  904. package/dist/flows/registries/cross-report-validators.js +31 -0
  905. package/dist/flows/registries/cross-report-validators.js.map +1 -0
  906. package/dist/flows/registries/report-schemas.d.ts +10 -0
  907. package/dist/flows/registries/report-schemas.d.ts.map +1 -0
  908. package/dist/flows/registries/report-schemas.js +77 -0
  909. package/dist/flows/registries/report-schemas.js.map +1 -0
  910. package/dist/flows/registries/runtime-index.d.ts +100 -0
  911. package/dist/flows/registries/runtime-index.d.ts.map +1 -0
  912. package/dist/flows/registries/runtime-index.js +27 -0
  913. package/dist/flows/registries/runtime-index.js.map +1 -0
  914. package/dist/flows/registries/shape-hints/from-zod.d.ts +6 -0
  915. package/dist/flows/registries/shape-hints/from-zod.d.ts.map +1 -0
  916. package/dist/flows/registries/shape-hints/from-zod.js +354 -0
  917. package/dist/flows/registries/shape-hints/from-zod.js.map +1 -0
  918. package/dist/flows/registries/shape-hints/instruction-helpers.d.ts +3 -0
  919. package/dist/flows/registries/shape-hints/instruction-helpers.d.ts.map +1 -0
  920. package/dist/flows/registries/shape-hints/instruction-helpers.js +28 -0
  921. package/dist/flows/registries/shape-hints/instruction-helpers.js.map +1 -0
  922. package/dist/flows/registries/shape-hints/registry.d.ts +5 -0
  923. package/dist/flows/registries/shape-hints/registry.d.ts.map +1 -0
  924. package/dist/flows/registries/shape-hints/registry.js +33 -0
  925. package/dist/flows/registries/shape-hints/registry.js.map +1 -0
  926. package/dist/flows/registries/shape-hints/types.d.ts +14 -0
  927. package/dist/flows/registries/shape-hints/types.d.ts.map +1 -0
  928. package/dist/flows/registries/shape-hints/types.js +25 -0
  929. package/dist/flows/registries/shape-hints/types.js.map +1 -0
  930. package/dist/flows/registries/verification-writers/registry.d.ts +6 -0
  931. package/dist/flows/registries/verification-writers/registry.d.ts.map +1 -0
  932. package/dist/flows/registries/verification-writers/registry.js +37 -0
  933. package/dist/flows/registries/verification-writers/registry.js.map +1 -0
  934. package/dist/flows/registries/verification-writers/types.d.ts +37 -0
  935. package/dist/flows/registries/verification-writers/types.d.ts.map +1 -0
  936. package/dist/flows/registries/verification-writers/types.js +22 -0
  937. package/dist/flows/registries/verification-writers/types.js.map +1 -0
  938. package/dist/flows/report-declarations.d.ts +23 -0
  939. package/dist/flows/report-declarations.d.ts.map +1 -0
  940. package/dist/flows/report-declarations.js +46 -0
  941. package/dist/flows/report-declarations.js.map +1 -0
  942. package/dist/flows/report-schema-kit.d.ts +22 -0
  943. package/dist/flows/report-schema-kit.d.ts.map +1 -0
  944. package/dist/flows/report-schema-kit.js +59 -0
  945. package/dist/flows/report-schema-kit.js.map +1 -0
  946. package/dist/flows/resolvers/archetype.d.ts +14 -0
  947. package/dist/flows/resolvers/archetype.d.ts.map +1 -0
  948. package/dist/flows/resolvers/archetype.js +125 -0
  949. package/dist/flows/resolvers/archetype.js.map +1 -0
  950. package/dist/flows/resolvers/equipment.d.ts +32 -0
  951. package/dist/flows/resolvers/equipment.d.ts.map +1 -0
  952. package/dist/flows/resolvers/equipment.js +101 -0
  953. package/dist/flows/resolvers/equipment.js.map +1 -0
  954. package/dist/flows/resolvers/signals.d.ts +27 -0
  955. package/dist/flows/resolvers/signals.d.ts.map +1 -0
  956. package/dist/flows/resolvers/signals.js +273 -0
  957. package/dist/flows/resolvers/signals.js.map +1 -0
  958. package/dist/flows/resolvers/structure.d.ts +23 -0
  959. package/dist/flows/resolvers/structure.d.ts.map +1 -0
  960. package/dist/flows/resolvers/structure.js +112 -0
  961. package/dist/flows/resolvers/structure.js.map +1 -0
  962. package/dist/flows/review/assembly-spec.d.ts +5 -0
  963. package/dist/flows/review/assembly-spec.d.ts.map +1 -0
  964. package/dist/flows/review/assembly-spec.js +90 -0
  965. package/dist/flows/review/assembly-spec.js.map +1 -0
  966. package/dist/flows/review/data.d.ts +555 -0
  967. package/dist/flows/review/data.d.ts.map +1 -0
  968. package/dist/flows/review/data.js +75 -0
  969. package/dist/flows/review/data.js.map +1 -0
  970. package/dist/flows/review/flow.d.ts +2 -0
  971. package/dist/flows/review/flow.d.ts.map +1 -0
  972. package/dist/flows/review/flow.js +4 -0
  973. package/dist/flows/review/flow.js.map +1 -0
  974. package/dist/flows/review/index.d.ts +4 -0
  975. package/dist/flows/review/index.d.ts.map +1 -0
  976. package/dist/flows/review/index.js +8 -0
  977. package/dist/flows/review/index.js.map +1 -0
  978. package/dist/flows/review/relay-hints.d.ts +3 -0
  979. package/dist/flows/review/relay-hints.d.ts.map +1 -0
  980. package/dist/flows/review/relay-hints.js +31 -0
  981. package/dist/flows/review/relay-hints.js.map +1 -0
  982. package/dist/flows/review/reports.d.ts +247 -0
  983. package/dist/flows/review/reports.d.ts.map +1 -0
  984. package/dist/flows/review/reports.js +176 -0
  985. package/dist/flows/review/reports.js.map +1 -0
  986. package/dist/flows/review/writers/intake-projection.d.ts +13 -0
  987. package/dist/flows/review/writers/intake-projection.d.ts.map +1 -0
  988. package/dist/flows/review/writers/intake-projection.js +90 -0
  989. package/dist/flows/review/writers/intake-projection.js.map +1 -0
  990. package/dist/flows/review/writers/intake.d.ts +3 -0
  991. package/dist/flows/review/writers/intake.d.ts.map +1 -0
  992. package/dist/flows/review/writers/intake.js +186 -0
  993. package/dist/flows/review/writers/intake.js.map +1 -0
  994. package/dist/flows/review/writers/result-html.d.ts +3 -0
  995. package/dist/flows/review/writers/result-html.d.ts.map +1 -0
  996. package/dist/flows/review/writers/result-html.js +78 -0
  997. package/dist/flows/review/writers/result-html.js.map +1 -0
  998. package/dist/flows/review/writers/result-projection.d.ts +6 -0
  999. package/dist/flows/review/writers/result-projection.d.ts.map +1 -0
  1000. package/dist/flows/review/writers/result-projection.js +29 -0
  1001. package/dist/flows/review/writers/result-projection.js.map +1 -0
  1002. package/dist/flows/review/writers/result.d.ts +3 -0
  1003. package/dist/flows/review/writers/result.d.ts.map +1 -0
  1004. package/dist/flows/review/writers/result.js +50 -0
  1005. package/dist/flows/review/writers/result.js.map +1 -0
  1006. package/dist/flows/runtime-proof/assembly-spec.d.ts +5 -0
  1007. package/dist/flows/runtime-proof/assembly-spec.d.ts.map +1 -0
  1008. package/dist/flows/runtime-proof/assembly-spec.js +54 -0
  1009. package/dist/flows/runtime-proof/assembly-spec.js.map +1 -0
  1010. package/dist/flows/runtime-proof/data.d.ts +423 -0
  1011. package/dist/flows/runtime-proof/data.d.ts.map +1 -0
  1012. package/dist/flows/runtime-proof/data.js +36 -0
  1013. package/dist/flows/runtime-proof/data.js.map +1 -0
  1014. package/dist/flows/runtime-proof/flow.d.ts +2 -0
  1015. package/dist/flows/runtime-proof/flow.d.ts.map +1 -0
  1016. package/dist/flows/runtime-proof/flow.js +4 -0
  1017. package/dist/flows/runtime-proof/flow.js.map +1 -0
  1018. package/dist/flows/runtime-proof/reports.d.ts +6 -0
  1019. package/dist/flows/runtime-proof/reports.d.ts.map +1 -0
  1020. package/dist/flows/runtime-proof/reports.js +7 -0
  1021. package/dist/flows/runtime-proof/reports.js.map +1 -0
  1022. package/dist/flows/runtime-proof/writers/compose.d.ts +3 -0
  1023. package/dist/flows/runtime-proof/writers/compose.d.ts.map +1 -0
  1024. package/dist/flows/runtime-proof/writers/compose.js +10 -0
  1025. package/dist/flows/runtime-proof/writers/compose.js.map +1 -0
  1026. package/dist/flows/schematic-catalog-check.d.ts +3 -0
  1027. package/dist/flows/schematic-catalog-check.d.ts.map +1 -0
  1028. package/dist/flows/schematic-catalog-check.js +73 -0
  1029. package/dist/flows/schematic-catalog-check.js.map +1 -0
  1030. package/dist/flows/stage-policy.d.ts +22 -0
  1031. package/dist/flows/stage-policy.d.ts.map +1 -0
  1032. package/dist/flows/stage-policy.js +27 -0
  1033. package/dist/flows/stage-policy.js.map +1 -0
  1034. package/dist/flows/sweep/assembly-spec.d.ts +5 -0
  1035. package/dist/flows/sweep/assembly-spec.d.ts.map +1 -0
  1036. package/dist/flows/sweep/assembly-spec.js +170 -0
  1037. package/dist/flows/sweep/assembly-spec.js.map +1 -0
  1038. package/dist/flows/sweep/data.d.ts +552 -0
  1039. package/dist/flows/sweep/data.d.ts.map +1 -0
  1040. package/dist/flows/sweep/data.js +70 -0
  1041. package/dist/flows/sweep/data.js.map +1 -0
  1042. package/dist/flows/sweep/flow.d.ts +2 -0
  1043. package/dist/flows/sweep/flow.d.ts.map +1 -0
  1044. package/dist/flows/sweep/flow.js +4 -0
  1045. package/dist/flows/sweep/flow.js.map +1 -0
  1046. package/dist/flows/sweep/paths.d.ts +11 -0
  1047. package/dist/flows/sweep/paths.d.ts.map +1 -0
  1048. package/dist/flows/sweep/paths.js +18 -0
  1049. package/dist/flows/sweep/paths.js.map +1 -0
  1050. package/dist/flows/sweep/relay-hints.d.ts +3 -0
  1051. package/dist/flows/sweep/relay-hints.d.ts.map +1 -0
  1052. package/dist/flows/sweep/relay-hints.js +27 -0
  1053. package/dist/flows/sweep/relay-hints.js.map +1 -0
  1054. package/dist/flows/sweep/reports.d.ts +172 -0
  1055. package/dist/flows/sweep/reports.d.ts.map +1 -0
  1056. package/dist/flows/sweep/reports.js +179 -0
  1057. package/dist/flows/sweep/reports.js.map +1 -0
  1058. package/dist/flows/sweep/writers/census.d.ts +3 -0
  1059. package/dist/flows/sweep/writers/census.d.ts.map +1 -0
  1060. package/dist/flows/sweep/writers/census.js +67 -0
  1061. package/dist/flows/sweep/writers/census.js.map +1 -0
  1062. package/dist/flows/sweep/writers/partition.d.ts +3 -0
  1063. package/dist/flows/sweep/writers/partition.d.ts.map +1 -0
  1064. package/dist/flows/sweep/writers/partition.js +130 -0
  1065. package/dist/flows/sweep/writers/partition.js.map +1 -0
  1066. package/dist/flows/sweep/writers/scan.d.ts +5 -0
  1067. package/dist/flows/sweep/writers/scan.d.ts.map +1 -0
  1068. package/dist/flows/sweep/writers/scan.js +89 -0
  1069. package/dist/flows/sweep/writers/scan.js.map +1 -0
  1070. package/dist/flows/sweep/writers/verification.d.ts +3 -0
  1071. package/dist/flows/sweep/writers/verification.d.ts.map +1 -0
  1072. package/dist/flows/sweep/writers/verification.js +55 -0
  1073. package/dist/flows/sweep/writers/verification.js.map +1 -0
  1074. package/dist/flows/types.d.ts +111 -0
  1075. package/dist/flows/types.d.ts.map +1 -0
  1076. package/dist/flows/types.js +14 -0
  1077. package/dist/flows/types.js.map +1 -0
  1078. package/dist/history/run-corpus.d.ts +16 -0
  1079. package/dist/history/run-corpus.d.ts.map +1 -0
  1080. package/dist/history/run-corpus.js +55 -0
  1081. package/dist/history/run-corpus.js.map +1 -0
  1082. package/dist/index.d.ts +2 -0
  1083. package/dist/index.d.ts.map +1 -0
  1084. package/dist/index.js +2 -0
  1085. package/dist/index.js.map +1 -0
  1086. package/dist/memory/project-distill.d.ts +18 -0
  1087. package/dist/memory/project-distill.d.ts.map +1 -0
  1088. package/dist/memory/project-distill.js +244 -0
  1089. package/dist/memory/project-distill.js.map +1 -0
  1090. package/dist/memory/project-identity.d.ts +25 -0
  1091. package/dist/memory/project-identity.d.ts.map +1 -0
  1092. package/dist/memory/project-identity.js +125 -0
  1093. package/dist/memory/project-identity.js.map +1 -0
  1094. package/dist/memory/project-injection.d.ts +12 -0
  1095. package/dist/memory/project-injection.d.ts.map +1 -0
  1096. package/dist/memory/project-injection.js +56 -0
  1097. package/dist/memory/project-injection.js.map +1 -0
  1098. package/dist/memory/project-store.d.ts +35 -0
  1099. package/dist/memory/project-store.d.ts.map +1 -0
  1100. package/dist/memory/project-store.js +150 -0
  1101. package/dist/memory/project-store.js.map +1 -0
  1102. package/dist/policy/fanout-join-policy.d.ts +26 -0
  1103. package/dist/policy/fanout-join-policy.d.ts.map +1 -0
  1104. package/dist/policy/fanout-join-policy.js +87 -0
  1105. package/dist/policy/fanout-join-policy.js.map +1 -0
  1106. package/dist/policy/flow-kind-policy-core.d.ts +50 -0
  1107. package/dist/policy/flow-kind-policy-core.d.ts.map +1 -0
  1108. package/dist/policy/flow-kind-policy-core.js +250 -0
  1109. package/dist/policy/flow-kind-policy-core.js.map +1 -0
  1110. package/dist/policy/flow-kind-policy.d.ts +19 -0
  1111. package/dist/policy/flow-kind-policy.d.ts.map +1 -0
  1112. package/dist/policy/flow-kind-policy.js +41 -0
  1113. package/dist/policy/flow-kind-policy.js.map +1 -0
  1114. package/dist/policy/policy-envelope.d.ts +28 -0
  1115. package/dist/policy/policy-envelope.d.ts.map +1 -0
  1116. package/dist/policy/policy-envelope.js +317 -0
  1117. package/dist/policy/policy-envelope.js.map +1 -0
  1118. package/dist/policy/recovery-route-policy.d.ts +165 -0
  1119. package/dist/policy/recovery-route-policy.d.ts.map +1 -0
  1120. package/dist/policy/recovery-route-policy.js +112 -0
  1121. package/dist/policy/recovery-route-policy.js.map +1 -0
  1122. package/dist/policy/rubric.d.ts +28 -0
  1123. package/dist/policy/rubric.d.ts.map +1 -0
  1124. package/dist/policy/rubric.js +139 -0
  1125. package/dist/policy/rubric.js.map +1 -0
  1126. package/dist/release/checks.d.ts +45 -0
  1127. package/dist/release/checks.d.ts.map +1 -0
  1128. package/dist/release/checks.js +382 -0
  1129. package/dist/release/checks.js.map +1 -0
  1130. package/dist/release/schemas.d.ts +590 -0
  1131. package/dist/release/schemas.d.ts.map +1 -0
  1132. package/dist/release/schemas.js +369 -0
  1133. package/dist/release/schemas.js.map +1 -0
  1134. package/dist/runtime/acceptance-criteria.d.ts +41 -0
  1135. package/dist/runtime/acceptance-criteria.d.ts.map +1 -0
  1136. package/dist/runtime/acceptance-criteria.js +282 -0
  1137. package/dist/runtime/acceptance-criteria.js.map +1 -0
  1138. package/dist/runtime/domain/flow.d.ts +11 -0
  1139. package/dist/runtime/domain/flow.d.ts.map +1 -0
  1140. package/dist/runtime/domain/flow.js +2 -0
  1141. package/dist/runtime/domain/flow.js.map +1 -0
  1142. package/dist/runtime/domain/route.d.ts +13 -0
  1143. package/dist/runtime/domain/route.d.ts.map +1 -0
  1144. package/dist/runtime/domain/route.js +7 -0
  1145. package/dist/runtime/domain/route.js.map +1 -0
  1146. package/dist/runtime/domain/run-file.d.ts +5 -0
  1147. package/dist/runtime/domain/run-file.d.ts.map +1 -0
  1148. package/dist/runtime/domain/run-file.js +2 -0
  1149. package/dist/runtime/domain/run-file.js.map +1 -0
  1150. package/dist/runtime/domain/run.d.ts +4 -0
  1151. package/dist/runtime/domain/run.d.ts.map +1 -0
  1152. package/dist/runtime/domain/run.js +2 -0
  1153. package/dist/runtime/domain/run.js.map +1 -0
  1154. package/dist/runtime/domain/selection.d.ts +11 -0
  1155. package/dist/runtime/domain/selection.d.ts.map +1 -0
  1156. package/dist/runtime/domain/selection.js +2 -0
  1157. package/dist/runtime/domain/selection.js.map +1 -0
  1158. package/dist/runtime/domain/step.d.ts +19 -0
  1159. package/dist/runtime/domain/step.d.ts.map +1 -0
  1160. package/dist/runtime/domain/step.js +4 -0
  1161. package/dist/runtime/domain/step.js.map +1 -0
  1162. package/dist/runtime/domain/trace.d.ts +21 -0
  1163. package/dist/runtime/domain/trace.d.ts.map +1 -0
  1164. package/dist/runtime/domain/trace.js +2 -0
  1165. package/dist/runtime/domain/trace.js.map +1 -0
  1166. package/dist/runtime/executors/checkpoint.d.ts +18 -0
  1167. package/dist/runtime/executors/checkpoint.d.ts.map +1 -0
  1168. package/dist/runtime/executors/checkpoint.js +463 -0
  1169. package/dist/runtime/executors/checkpoint.js.map +1 -0
  1170. package/dist/runtime/executors/compose.d.ts +11 -0
  1171. package/dist/runtime/executors/compose.d.ts.map +1 -0
  1172. package/dist/runtime/executors/compose.js +124 -0
  1173. package/dist/runtime/executors/compose.js.map +1 -0
  1174. package/dist/runtime/executors/fanout.d.ts +8 -0
  1175. package/dist/runtime/executors/fanout.d.ts.map +1 -0
  1176. package/dist/runtime/executors/fanout.js +312 -0
  1177. package/dist/runtime/executors/fanout.js.map +1 -0
  1178. package/dist/runtime/executors/index.d.ts +11 -0
  1179. package/dist/runtime/executors/index.d.ts.map +1 -0
  1180. package/dist/runtime/executors/index.js +32 -0
  1181. package/dist/runtime/executors/index.js.map +1 -0
  1182. package/dist/runtime/executors/relay.d.ts +73 -0
  1183. package/dist/runtime/executors/relay.d.ts.map +1 -0
  1184. package/dist/runtime/executors/relay.js +788 -0
  1185. package/dist/runtime/executors/relay.js.map +1 -0
  1186. package/dist/runtime/executors/result.d.ts +14 -0
  1187. package/dist/runtime/executors/result.d.ts.map +1 -0
  1188. package/dist/runtime/executors/result.js +19 -0
  1189. package/dist/runtime/executors/result.js.map +1 -0
  1190. package/dist/runtime/executors/shared.d.ts +17 -0
  1191. package/dist/runtime/executors/shared.d.ts.map +1 -0
  1192. package/dist/runtime/executors/shared.js +49 -0
  1193. package/dist/runtime/executors/shared.js.map +1 -0
  1194. package/dist/runtime/executors/sub-run.d.ts +8 -0
  1195. package/dist/runtime/executors/sub-run.d.ts.map +1 -0
  1196. package/dist/runtime/executors/sub-run.js +275 -0
  1197. package/dist/runtime/executors/sub-run.js.map +1 -0
  1198. package/dist/runtime/executors/verification.d.ts +7 -0
  1199. package/dist/runtime/executors/verification.d.ts.map +1 -0
  1200. package/dist/runtime/executors/verification.js +374 -0
  1201. package/dist/runtime/executors/verification.js.map +1 -0
  1202. package/dist/runtime/fanout/branch-execution.d.ts +17 -0
  1203. package/dist/runtime/fanout/branch-execution.d.ts.map +1 -0
  1204. package/dist/runtime/fanout/branch-execution.js +576 -0
  1205. package/dist/runtime/fanout/branch-execution.js.map +1 -0
  1206. package/dist/runtime/fanout/branch-expansion.d.ts +6 -0
  1207. package/dist/runtime/fanout/branch-expansion.d.ts.map +1 -0
  1208. package/dist/runtime/fanout/branch-expansion.js +64 -0
  1209. package/dist/runtime/fanout/branch-expansion.js.map +1 -0
  1210. package/dist/runtime/fanout/run-owner-lock.d.ts +28 -0
  1211. package/dist/runtime/fanout/run-owner-lock.d.ts.map +1 -0
  1212. package/dist/runtime/fanout/run-owner-lock.js +98 -0
  1213. package/dist/runtime/fanout/run-owner-lock.js.map +1 -0
  1214. package/dist/runtime/fanout/types.d.ts +38 -0
  1215. package/dist/runtime/fanout/types.d.ts.map +1 -0
  1216. package/dist/runtime/fanout/types.js +2 -0
  1217. package/dist/runtime/fanout/types.js.map +1 -0
  1218. package/dist/runtime/fanout/worktree-reaper.d.ts +108 -0
  1219. package/dist/runtime/fanout/worktree-reaper.d.ts.map +1 -0
  1220. package/dist/runtime/fanout/worktree-reaper.js +195 -0
  1221. package/dist/runtime/fanout/worktree-reaper.js.map +1 -0
  1222. package/dist/runtime/fanout/worktree.d.ts +3 -0
  1223. package/dist/runtime/fanout/worktree.d.ts.map +1 -0
  1224. package/dist/runtime/fanout/worktree.js +35 -0
  1225. package/dist/runtime/fanout/worktree.js.map +1 -0
  1226. package/dist/runtime/manifest/executable-flow.d.ts +100 -0
  1227. package/dist/runtime/manifest/executable-flow.d.ts.map +1 -0
  1228. package/dist/runtime/manifest/executable-flow.js +2 -0
  1229. package/dist/runtime/manifest/executable-flow.js.map +1 -0
  1230. package/dist/runtime/manifest/from-compiled-flow.d.ts +4 -0
  1231. package/dist/runtime/manifest/from-compiled-flow.d.ts.map +1 -0
  1232. package/dist/runtime/manifest/from-compiled-flow.js +169 -0
  1233. package/dist/runtime/manifest/from-compiled-flow.js.map +1 -0
  1234. package/dist/runtime/manifest/runtime-package-index.d.ts +4 -0
  1235. package/dist/runtime/manifest/runtime-package-index.d.ts.map +1 -0
  1236. package/dist/runtime/manifest/runtime-package-index.js +98 -0
  1237. package/dist/runtime/manifest/runtime-package-index.js.map +1 -0
  1238. package/dist/runtime/manifest/validate-executable-flow.d.ts +8 -0
  1239. package/dist/runtime/manifest/validate-executable-flow.d.ts.map +1 -0
  1240. package/dist/runtime/manifest/validate-executable-flow.js +143 -0
  1241. package/dist/runtime/manifest/validate-executable-flow.js.map +1 -0
  1242. package/dist/runtime/projections/progress.d.ts +16 -0
  1243. package/dist/runtime/projections/progress.d.ts.map +1 -0
  1244. package/dist/runtime/projections/progress.js +679 -0
  1245. package/dist/runtime/projections/progress.js.map +1 -0
  1246. package/dist/runtime/projections/status.d.ts +4 -0
  1247. package/dist/runtime/projections/status.d.ts.map +1 -0
  1248. package/dist/runtime/projections/status.js +14 -0
  1249. package/dist/runtime/projections/status.js.map +1 -0
  1250. package/dist/runtime/projections/tournament-checkpoint-context.d.ts +18 -0
  1251. package/dist/runtime/projections/tournament-checkpoint-context.d.ts.map +1 -0
  1252. package/dist/runtime/projections/tournament-checkpoint-context.js +106 -0
  1253. package/dist/runtime/projections/tournament-checkpoint-context.js.map +1 -0
  1254. package/dist/runtime/run/binding-legibility.d.ts +71 -0
  1255. package/dist/runtime/run/binding-legibility.d.ts.map +1 -0
  1256. package/dist/runtime/run/binding-legibility.js +61 -0
  1257. package/dist/runtime/run/binding-legibility.js.map +1 -0
  1258. package/dist/runtime/run/capabilities.d.ts +34 -0
  1259. package/dist/runtime/run/capabilities.d.ts.map +1 -0
  1260. package/dist/runtime/run/capabilities.js +22 -0
  1261. package/dist/runtime/run/capabilities.js.map +1 -0
  1262. package/dist/runtime/run/carried-notes.d.ts +13 -0
  1263. package/dist/runtime/run/carried-notes.d.ts.map +1 -0
  1264. package/dist/runtime/run/carried-notes.js +53 -0
  1265. package/dist/runtime/run/carried-notes.js.map +1 -0
  1266. package/dist/runtime/run/checkpoint-resume.d.ts +44 -0
  1267. package/dist/runtime/run/checkpoint-resume.d.ts.map +1 -0
  1268. package/dist/runtime/run/checkpoint-resume.js +549 -0
  1269. package/dist/runtime/run/checkpoint-resume.js.map +1 -0
  1270. package/dist/runtime/run/child-runner.d.ts +57 -0
  1271. package/dist/runtime/run/child-runner.d.ts.map +1 -0
  1272. package/dist/runtime/run/child-runner.js +2 -0
  1273. package/dist/runtime/run/child-runner.js.map +1 -0
  1274. package/dist/runtime/run/commit-containment.d.ts +11 -0
  1275. package/dist/runtime/run/commit-containment.d.ts.map +1 -0
  1276. package/dist/runtime/run/commit-containment.js +46 -0
  1277. package/dist/runtime/run/commit-containment.js.map +1 -0
  1278. package/dist/runtime/run/compiled-flow-runner.d.ts +26 -0
  1279. package/dist/runtime/run/compiled-flow-runner.d.ts.map +1 -0
  1280. package/dist/runtime/run/compiled-flow-runner.js +137 -0
  1281. package/dist/runtime/run/compiled-flow-runner.js.map +1 -0
  1282. package/dist/runtime/run/connector-planning.d.ts +3 -0
  1283. package/dist/runtime/run/connector-planning.d.ts.map +1 -0
  1284. package/dist/runtime/run/connector-planning.js +29 -0
  1285. package/dist/runtime/run/connector-planning.js.map +1 -0
  1286. package/dist/runtime/run/context-delivery.d.ts +24 -0
  1287. package/dist/runtime/run/context-delivery.d.ts.map +1 -0
  1288. package/dist/runtime/run/context-delivery.js +92 -0
  1289. package/dist/runtime/run/context-delivery.js.map +1 -0
  1290. package/dist/runtime/run/context-pull.d.ts +22 -0
  1291. package/dist/runtime/run/context-pull.d.ts.map +1 -0
  1292. package/dist/runtime/run/context-pull.js +112 -0
  1293. package/dist/runtime/run/context-pull.js.map +1 -0
  1294. package/dist/runtime/run/engine-flags.d.ts +7 -0
  1295. package/dist/runtime/run/engine-flags.d.ts.map +1 -0
  1296. package/dist/runtime/run/engine-flags.js +89 -0
  1297. package/dist/runtime/run/engine-flags.js.map +1 -0
  1298. package/dist/runtime/run/equipment-reshape.d.ts +24 -0
  1299. package/dist/runtime/run/equipment-reshape.d.ts.map +1 -0
  1300. package/dist/runtime/run/equipment-reshape.js +156 -0
  1301. package/dist/runtime/run/equipment-reshape.js.map +1 -0
  1302. package/dist/runtime/run/external-files.d.ts +5 -0
  1303. package/dist/runtime/run/external-files.d.ts.map +1 -0
  1304. package/dist/runtime/run/external-files.js +7 -0
  1305. package/dist/runtime/run/external-files.js.map +1 -0
  1306. package/dist/runtime/run/frozen-eval.d.ts +8 -0
  1307. package/dist/runtime/run/frozen-eval.d.ts.map +1 -0
  1308. package/dist/runtime/run/frozen-eval.js +60 -0
  1309. package/dist/runtime/run/frozen-eval.js.map +1 -0
  1310. package/dist/runtime/run/graph-runner.d.ts +67 -0
  1311. package/dist/runtime/run/graph-runner.d.ts.map +1 -0
  1312. package/dist/runtime/run/graph-runner.js +1755 -0
  1313. package/dist/runtime/run/graph-runner.js.map +1 -0
  1314. package/dist/runtime/run/guidance.d.ts +49 -0
  1315. package/dist/runtime/run/guidance.d.ts.map +1 -0
  1316. package/dist/runtime/run/guidance.js +227 -0
  1317. package/dist/runtime/run/guidance.js.map +1 -0
  1318. package/dist/runtime/run/honesty-ledger.d.ts +21 -0
  1319. package/dist/runtime/run/honesty-ledger.d.ts.map +1 -0
  1320. package/dist/runtime/run/honesty-ledger.js +75 -0
  1321. package/dist/runtime/run/honesty-ledger.js.map +1 -0
  1322. package/dist/runtime/run/iteration-ledger.d.ts +15 -0
  1323. package/dist/runtime/run/iteration-ledger.d.ts.map +1 -0
  1324. package/dist/runtime/run/iteration-ledger.js +91 -0
  1325. package/dist/runtime/run/iteration-ledger.js.map +1 -0
  1326. package/dist/runtime/run/manifest-snapshot.d.ts +27 -0
  1327. package/dist/runtime/run/manifest-snapshot.d.ts.map +1 -0
  1328. package/dist/runtime/run/manifest-snapshot.js +58 -0
  1329. package/dist/runtime/run/manifest-snapshot.js.map +1 -0
  1330. package/dist/runtime/run/oracle-command-pin.d.ts +20 -0
  1331. package/dist/runtime/run/oracle-command-pin.d.ts.map +1 -0
  1332. package/dist/runtime/run/oracle-command-pin.js +94 -0
  1333. package/dist/runtime/run/oracle-command-pin.js.map +1 -0
  1334. package/dist/runtime/run/recovery-binding-verdict.d.ts +40 -0
  1335. package/dist/runtime/run/recovery-binding-verdict.d.ts.map +1 -0
  1336. package/dist/runtime/run/recovery-binding-verdict.js +70 -0
  1337. package/dist/runtime/run/recovery-binding-verdict.js.map +1 -0
  1338. package/dist/runtime/run/recovery-corridor.d.ts +103 -0
  1339. package/dist/runtime/run/recovery-corridor.d.ts.map +1 -0
  1340. package/dist/runtime/run/recovery-corridor.js +178 -0
  1341. package/dist/runtime/run/recovery-corridor.js.map +1 -0
  1342. package/dist/runtime/run/recovery-selection.d.ts +18 -0
  1343. package/dist/runtime/run/recovery-selection.d.ts.map +1 -0
  1344. package/dist/runtime/run/recovery-selection.js +43 -0
  1345. package/dist/runtime/run/recovery-selection.js.map +1 -0
  1346. package/dist/runtime/run/relay-guidance.d.ts +40 -0
  1347. package/dist/runtime/run/relay-guidance.d.ts.map +1 -0
  1348. package/dist/runtime/run/relay-guidance.js +306 -0
  1349. package/dist/runtime/run/relay-guidance.js.map +1 -0
  1350. package/dist/runtime/run/relay-support.d.ts +29 -0
  1351. package/dist/runtime/run/relay-support.d.ts.map +1 -0
  1352. package/dist/runtime/run/relay-support.js +436 -0
  1353. package/dist/runtime/run/relay-support.js.map +1 -0
  1354. package/dist/runtime/run/result-recovery.d.ts +16 -0
  1355. package/dist/runtime/run/result-recovery.d.ts.map +1 -0
  1356. package/dist/runtime/run/result-recovery.js +73 -0
  1357. package/dist/runtime/run/result-recovery.js.map +1 -0
  1358. package/dist/runtime/run/result-writer.d.ts +17 -0
  1359. package/dist/runtime/run/result-writer.d.ts.map +1 -0
  1360. package/dist/runtime/run/result-writer.js +5 -0
  1361. package/dist/runtime/run/result-writer.js.map +1 -0
  1362. package/dist/runtime/run/resume-lock.d.ts +29 -0
  1363. package/dist/runtime/run/resume-lock.d.ts.map +1 -0
  1364. package/dist/runtime/run/resume-lock.js +166 -0
  1365. package/dist/runtime/run/resume-lock.js.map +1 -0
  1366. package/dist/runtime/run/reuse-children.d.ts +24 -0
  1367. package/dist/runtime/run/reuse-children.d.ts.map +1 -0
  1368. package/dist/runtime/run/reuse-children.js +107 -0
  1369. package/dist/runtime/run/reuse-children.js.map +1 -0
  1370. package/dist/runtime/run/run-boundary.d.ts +30 -0
  1371. package/dist/runtime/run/run-boundary.d.ts.map +1 -0
  1372. package/dist/runtime/run/run-boundary.js +110 -0
  1373. package/dist/runtime/run/run-boundary.js.map +1 -0
  1374. package/dist/runtime/run/run-close.d.ts +22 -0
  1375. package/dist/runtime/run/run-close.d.ts.map +1 -0
  1376. package/dist/runtime/run/run-close.js +228 -0
  1377. package/dist/runtime/run/run-close.js.map +1 -0
  1378. package/dist/runtime/run/run-context.d.ts +59 -0
  1379. package/dist/runtime/run/run-context.d.ts.map +1 -0
  1380. package/dist/runtime/run/run-context.js +2 -0
  1381. package/dist/runtime/run/run-context.js.map +1 -0
  1382. package/dist/runtime/run/run-transition.d.ts +43 -0
  1383. package/dist/runtime/run/run-transition.d.ts.map +1 -0
  1384. package/dist/runtime/run/run-transition.js +52 -0
  1385. package/dist/runtime/run/run-transition.js.map +1 -0
  1386. package/dist/runtime/run/run-values.d.ts +80 -0
  1387. package/dist/runtime/run/run-values.d.ts.map +1 -0
  1388. package/dist/runtime/run/run-values.js +85 -0
  1389. package/dist/runtime/run/run-values.js.map +1 -0
  1390. package/dist/runtime/run/slice-corridor.d.ts +27 -0
  1391. package/dist/runtime/run/slice-corridor.d.ts.map +1 -0
  1392. package/dist/runtime/run/slice-corridor.js +99 -0
  1393. package/dist/runtime/run/slice-corridor.js.map +1 -0
  1394. package/dist/runtime/run/trace-evidence.d.ts +34 -0
  1395. package/dist/runtime/run/trace-evidence.d.ts.map +1 -0
  1396. package/dist/runtime/run/trace-evidence.js +148 -0
  1397. package/dist/runtime/run/trace-evidence.js.map +1 -0
  1398. package/dist/runtime/run/until-budget.d.ts +12 -0
  1399. package/dist/runtime/run/until-budget.d.ts.map +1 -0
  1400. package/dist/runtime/run/until-budget.js +102 -0
  1401. package/dist/runtime/run/until-budget.js.map +1 -0
  1402. package/dist/runtime/run/until-corridor.d.ts +32 -0
  1403. package/dist/runtime/run/until-corridor.d.ts.map +1 -0
  1404. package/dist/runtime/run/until-corridor.js +161 -0
  1405. package/dist/runtime/run/until-corridor.js.map +1 -0
  1406. package/dist/runtime/run-files/report-validator.d.ts +3 -0
  1407. package/dist/runtime/run-files/report-validator.d.ts.map +1 -0
  1408. package/dist/runtime/run-files/report-validator.js +29 -0
  1409. package/dist/runtime/run-files/report-validator.js.map +1 -0
  1410. package/dist/runtime/run-files/run-file-store.d.ts +13 -0
  1411. package/dist/runtime/run-files/run-file-store.d.ts.map +1 -0
  1412. package/dist/runtime/run-files/run-file-store.js +42 -0
  1413. package/dist/runtime/run-files/run-file-store.js.map +1 -0
  1414. package/dist/runtime/trace/trace-fields.d.ts +97 -0
  1415. package/dist/runtime/trace/trace-fields.d.ts.map +1 -0
  1416. package/dist/runtime/trace/trace-fields.js +181 -0
  1417. package/dist/runtime/trace/trace-fields.js.map +1 -0
  1418. package/dist/runtime/trace/trace-store.d.ts +20 -0
  1419. package/dist/runtime/trace/trace-store.d.ts.map +1 -0
  1420. package/dist/runtime/trace/trace-store.js +157 -0
  1421. package/dist/runtime/trace/trace-store.js.map +1 -0
  1422. package/dist/schemas/acceptance-criteria.d.ts +94 -0
  1423. package/dist/schemas/acceptance-criteria.d.ts.map +1 -0
  1424. package/dist/schemas/acceptance-criteria.js +42 -0
  1425. package/dist/schemas/acceptance-criteria.js.map +1 -0
  1426. package/dist/schemas/axes.d.ts +45 -0
  1427. package/dist/schemas/axes.d.ts.map +1 -0
  1428. package/dist/schemas/axes.js +79 -0
  1429. package/dist/schemas/axes.js.map +1 -0
  1430. package/dist/schemas/axis-config-requirement.d.ts +20 -0
  1431. package/dist/schemas/axis-config-requirement.d.ts.map +1 -0
  1432. package/dist/schemas/axis-config-requirement.js +24 -0
  1433. package/dist/schemas/axis-config-requirement.js.map +1 -0
  1434. package/dist/schemas/builtin-report-schemas.d.ts +6 -0
  1435. package/dist/schemas/builtin-report-schemas.d.ts.map +1 -0
  1436. package/dist/schemas/builtin-report-schemas.js +155 -0
  1437. package/dist/schemas/builtin-report-schemas.js.map +1 -0
  1438. package/dist/schemas/change-kind.d.ts +75 -0
  1439. package/dist/schemas/change-kind.d.ts.map +1 -0
  1440. package/dist/schemas/change-kind.js +35 -0
  1441. package/dist/schemas/change-kind.js.map +1 -0
  1442. package/dist/schemas/change-packet.d.ts +42 -0
  1443. package/dist/schemas/change-packet.d.ts.map +1 -0
  1444. package/dist/schemas/change-packet.js +26 -0
  1445. package/dist/schemas/change-packet.js.map +1 -0
  1446. package/dist/schemas/check.d.ts +174 -0
  1447. package/dist/schemas/check.d.ts.map +1 -0
  1448. package/dist/schemas/check.js +162 -0
  1449. package/dist/schemas/check.js.map +1 -0
  1450. package/dist/schemas/checkpoint-boundary.d.ts +605 -0
  1451. package/dist/schemas/checkpoint-boundary.d.ts.map +1 -0
  1452. package/dist/schemas/checkpoint-boundary.js +243 -0
  1453. package/dist/schemas/checkpoint-boundary.js.map +1 -0
  1454. package/dist/schemas/compiled-flow.d.ts +1065 -0
  1455. package/dist/schemas/compiled-flow.d.ts.map +1 -0
  1456. package/dist/schemas/compiled-flow.js +331 -0
  1457. package/dist/schemas/compiled-flow.js.map +1 -0
  1458. package/dist/schemas/config.d.ts +905 -0
  1459. package/dist/schemas/config.d.ts.map +1 -0
  1460. package/dist/schemas/config.js +240 -0
  1461. package/dist/schemas/config.js.map +1 -0
  1462. package/dist/schemas/connector.d.ts +216 -0
  1463. package/dist/schemas/connector.d.ts.map +1 -0
  1464. package/dist/schemas/connector.js +150 -0
  1465. package/dist/schemas/connector.js.map +1 -0
  1466. package/dist/schemas/context-request.d.ts +14 -0
  1467. package/dist/schemas/context-request.d.ts.map +1 -0
  1468. package/dist/schemas/context-request.js +33 -0
  1469. package/dist/schemas/context-request.js.map +1 -0
  1470. package/dist/schemas/continuity.d.ts +362 -0
  1471. package/dist/schemas/continuity.d.ts.map +1 -0
  1472. package/dist/schemas/continuity.js +232 -0
  1473. package/dist/schemas/continuity.js.map +1 -0
  1474. package/dist/schemas/custom-flow-descriptor.d.ts +10 -0
  1475. package/dist/schemas/custom-flow-descriptor.d.ts.map +1 -0
  1476. package/dist/schemas/custom-flow-descriptor.js +12 -0
  1477. package/dist/schemas/custom-flow-descriptor.js.map +1 -0
  1478. package/dist/schemas/depth.d.ts +16 -0
  1479. package/dist/schemas/depth.d.ts.map +1 -0
  1480. package/dist/schemas/depth.js +7 -0
  1481. package/dist/schemas/depth.js.map +1 -0
  1482. package/dist/schemas/engine-flags.d.ts +44 -0
  1483. package/dist/schemas/engine-flags.d.ts.map +1 -0
  1484. package/dist/schemas/engine-flags.js +104 -0
  1485. package/dist/schemas/engine-flags.js.map +1 -0
  1486. package/dist/schemas/equipment-discovery.d.ts +8 -0
  1487. package/dist/schemas/equipment-discovery.d.ts.map +1 -0
  1488. package/dist/schemas/equipment-discovery.js +36 -0
  1489. package/dist/schemas/equipment-discovery.js.map +1 -0
  1490. package/dist/schemas/equipment-scope.d.ts +42 -0
  1491. package/dist/schemas/equipment-scope.d.ts.map +1 -0
  1492. package/dist/schemas/equipment-scope.js +84 -0
  1493. package/dist/schemas/equipment-scope.js.map +1 -0
  1494. package/dist/schemas/flow-block-definitions.d.ts +59 -0
  1495. package/dist/schemas/flow-block-definitions.d.ts.map +1 -0
  1496. package/dist/schemas/flow-block-definitions.js +867 -0
  1497. package/dist/schemas/flow-block-definitions.js.map +1 -0
  1498. package/dist/schemas/flow-blocks.d.ts +301 -0
  1499. package/dist/schemas/flow-blocks.d.ts.map +1 -0
  1500. package/dist/schemas/flow-blocks.js +223 -0
  1501. package/dist/schemas/flow-blocks.js.map +1 -0
  1502. package/dist/schemas/flow-schematic-policy.d.ts +6 -0
  1503. package/dist/schemas/flow-schematic-policy.d.ts.map +1 -0
  1504. package/dist/schemas/flow-schematic-policy.js +8 -0
  1505. package/dist/schemas/flow-schematic-policy.js.map +1 -0
  1506. package/dist/schemas/flow-schematic.d.ts +1407 -0
  1507. package/dist/schemas/flow-schematic.d.ts.map +1 -0
  1508. package/dist/schemas/flow-schematic.js +944 -0
  1509. package/dist/schemas/flow-schematic.js.map +1 -0
  1510. package/dist/schemas/guidance-decision.d.ts +728 -0
  1511. package/dist/schemas/guidance-decision.d.ts.map +1 -0
  1512. package/dist/schemas/guidance-decision.js +527 -0
  1513. package/dist/schemas/guidance-decision.js.map +1 -0
  1514. package/dist/schemas/hashing.d.ts +6 -0
  1515. package/dist/schemas/hashing.d.ts.map +1 -0
  1516. package/dist/schemas/hashing.js +27 -0
  1517. package/dist/schemas/hashing.js.map +1 -0
  1518. package/dist/schemas/history.d.ts +1735 -0
  1519. package/dist/schemas/history.d.ts.map +1 -0
  1520. package/dist/schemas/history.js +662 -0
  1521. package/dist/schemas/history.js.map +1 -0
  1522. package/dist/schemas/host.d.ts +16 -0
  1523. package/dist/schemas/host.d.ts.map +1 -0
  1524. package/dist/schemas/host.js +8 -0
  1525. package/dist/schemas/host.js.map +1 -0
  1526. package/dist/schemas/ids.d.ts +18 -0
  1527. package/dist/schemas/ids.d.ts.map +1 -0
  1528. package/dist/schemas/ids.js +17 -0
  1529. package/dist/schemas/ids.js.map +1 -0
  1530. package/dist/schemas/index.d.ts +60 -0
  1531. package/dist/schemas/index.d.ts.map +1 -0
  1532. package/dist/schemas/index.js +60 -0
  1533. package/dist/schemas/index.js.map +1 -0
  1534. package/dist/schemas/json.d.ts +10 -0
  1535. package/dist/schemas/json.d.ts.map +1 -0
  1536. package/dist/schemas/json.js +12 -0
  1537. package/dist/schemas/json.js.map +1 -0
  1538. package/dist/schemas/manifest.d.ts +15 -0
  1539. package/dist/schemas/manifest.d.ts.map +1 -0
  1540. package/dist/schemas/manifest.js +61 -0
  1541. package/dist/schemas/manifest.js.map +1 -0
  1542. package/dist/schemas/memory-input.d.ts +94 -0
  1543. package/dist/schemas/memory-input.d.ts.map +1 -0
  1544. package/dist/schemas/memory-input.js +119 -0
  1545. package/dist/schemas/memory-input.js.map +1 -0
  1546. package/dist/schemas/operator-summary.d.ts +369 -0
  1547. package/dist/schemas/operator-summary.d.ts.map +1 -0
  1548. package/dist/schemas/operator-summary.js +207 -0
  1549. package/dist/schemas/operator-summary.js.map +1 -0
  1550. package/dist/schemas/policy-envelope.d.ts +1655 -0
  1551. package/dist/schemas/policy-envelope.d.ts.map +1 -0
  1552. package/dist/schemas/policy-envelope.js +330 -0
  1553. package/dist/schemas/policy-envelope.js.map +1 -0
  1554. package/dist/schemas/power.d.ts +26 -0
  1555. package/dist/schemas/power.d.ts.map +1 -0
  1556. package/dist/schemas/power.js +38 -0
  1557. package/dist/schemas/power.js.map +1 -0
  1558. package/dist/schemas/process-evidence.d.ts +156 -0
  1559. package/dist/schemas/process-evidence.d.ts.map +1 -0
  1560. package/dist/schemas/process-evidence.js +142 -0
  1561. package/dist/schemas/process-evidence.js.map +1 -0
  1562. package/dist/schemas/process.d.ts +16 -0
  1563. package/dist/schemas/process.d.ts.map +1 -0
  1564. package/dist/schemas/process.js +7 -0
  1565. package/dist/schemas/process.js.map +1 -0
  1566. package/dist/schemas/progress-event.d.ts +1505 -0
  1567. package/dist/schemas/progress-event.d.ts.map +1 -0
  1568. package/dist/schemas/progress-event.js +246 -0
  1569. package/dist/schemas/progress-event.js.map +1 -0
  1570. package/dist/schemas/proof-assessment.d.ts +542 -0
  1571. package/dist/schemas/proof-assessment.d.ts.map +1 -0
  1572. package/dist/schemas/proof-assessment.js +336 -0
  1573. package/dist/schemas/proof-assessment.js.map +1 -0
  1574. package/dist/schemas/recovery-route-kind.d.ts +229 -0
  1575. package/dist/schemas/recovery-route-kind.d.ts.map +1 -0
  1576. package/dist/schemas/recovery-route-kind.js +242 -0
  1577. package/dist/schemas/recovery-route-kind.js.map +1 -0
  1578. package/dist/schemas/ref.d.ts +51 -0
  1579. package/dist/schemas/ref.d.ts.map +1 -0
  1580. package/dist/schemas/ref.js +96 -0
  1581. package/dist/schemas/ref.js.map +1 -0
  1582. package/dist/schemas/report-file-surface.d.ts +44 -0
  1583. package/dist/schemas/report-file-surface.d.ts.map +1 -0
  1584. package/dist/schemas/report-file-surface.js +22 -0
  1585. package/dist/schemas/report-file-surface.js.map +1 -0
  1586. package/dist/schemas/result.d.ts +23 -0
  1587. package/dist/schemas/result.d.ts.map +1 -0
  1588. package/dist/schemas/result.js +55 -0
  1589. package/dist/schemas/result.js.map +1 -0
  1590. package/dist/schemas/role.d.ts +8 -0
  1591. package/dist/schemas/role.d.ts.map +1 -0
  1592. package/dist/schemas/role.js +5 -0
  1593. package/dist/schemas/role.js.map +1 -0
  1594. package/dist/schemas/route-policy.d.ts +5 -0
  1595. package/dist/schemas/route-policy.d.ts.map +1 -0
  1596. package/dist/schemas/route-policy.js +9 -0
  1597. package/dist/schemas/route-policy.js.map +1 -0
  1598. package/dist/schemas/routing-contract-schemas.d.ts +11 -0
  1599. package/dist/schemas/routing-contract-schemas.d.ts.map +1 -0
  1600. package/dist/schemas/routing-contract-schemas.js +72 -0
  1601. package/dist/schemas/routing-contract-schemas.js.map +1 -0
  1602. package/dist/schemas/rubric.d.ts +74 -0
  1603. package/dist/schemas/rubric.d.ts.map +1 -0
  1604. package/dist/schemas/rubric.js +125 -0
  1605. package/dist/schemas/rubric.js.map +1 -0
  1606. package/dist/schemas/run-envelope.d.ts +1333 -0
  1607. package/dist/schemas/run-envelope.d.ts.map +1 -0
  1608. package/dist/schemas/run-envelope.js +578 -0
  1609. package/dist/schemas/run-envelope.js.map +1 -0
  1610. package/dist/schemas/run-status.d.ts +216 -0
  1611. package/dist/schemas/run-status.d.ts.map +1 -0
  1612. package/dist/schemas/run-status.js +146 -0
  1613. package/dist/schemas/run-status.js.map +1 -0
  1614. package/dist/schemas/run.d.ts +2866 -0
  1615. package/dist/schemas/run.d.ts.map +1 -0
  1616. package/dist/schemas/run.js +647 -0
  1617. package/dist/schemas/run.js.map +1 -0
  1618. package/dist/schemas/runtime-evidence.d.ts +152 -0
  1619. package/dist/schemas/runtime-evidence.d.ts.map +1 -0
  1620. package/dist/schemas/runtime-evidence.js +127 -0
  1621. package/dist/schemas/runtime-evidence.js.map +1 -0
  1622. package/dist/schemas/runtime-source.d.ts +55 -0
  1623. package/dist/schemas/runtime-source.d.ts.map +1 -0
  1624. package/dist/schemas/runtime-source.js +40 -0
  1625. package/dist/schemas/runtime-source.js.map +1 -0
  1626. package/dist/schemas/scalars.d.ts +21 -0
  1627. package/dist/schemas/scalars.d.ts.map +1 -0
  1628. package/dist/schemas/scalars.js +51 -0
  1629. package/dist/schemas/scalars.js.map +1 -0
  1630. package/dist/schemas/selection-policy.d.ts +764 -0
  1631. package/dist/schemas/selection-policy.d.ts.map +1 -0
  1632. package/dist/schemas/selection-policy.js +209 -0
  1633. package/dist/schemas/selection-policy.js.map +1 -0
  1634. package/dist/schemas/skill-hook.d.ts +214 -0
  1635. package/dist/schemas/skill-hook.d.ts.map +1 -0
  1636. package/dist/schemas/skill-hook.js +279 -0
  1637. package/dist/schemas/skill-hook.js.map +1 -0
  1638. package/dist/schemas/skill.d.ts +59 -0
  1639. package/dist/schemas/skill.d.ts.map +1 -0
  1640. package/dist/schemas/skill.js +82 -0
  1641. package/dist/schemas/skill.js.map +1 -0
  1642. package/dist/schemas/snapshot.d.ts +108 -0
  1643. package/dist/schemas/snapshot.d.ts.map +1 -0
  1644. package/dist/schemas/snapshot.js +40 -0
  1645. package/dist/schemas/snapshot.js.map +1 -0
  1646. package/dist/schemas/stage.d.ts +85 -0
  1647. package/dist/schemas/stage.d.ts.map +1 -0
  1648. package/dist/schemas/stage.js +58 -0
  1649. package/dist/schemas/stage.js.map +1 -0
  1650. package/dist/schemas/step.d.ts +2455 -0
  1651. package/dist/schemas/step.d.ts.map +1 -0
  1652. package/dist/schemas/step.js +567 -0
  1653. package/dist/schemas/step.js.map +1 -0
  1654. package/dist/schemas/trace-entry.d.ts +2573 -0
  1655. package/dist/schemas/trace-entry.d.ts.map +1 -0
  1656. package/dist/schemas/trace-entry.js +973 -0
  1657. package/dist/schemas/trace-entry.js.map +1 -0
  1658. package/dist/schemas/verification.d.ts +47 -0
  1659. package/dist/schemas/verification.d.ts.map +1 -0
  1660. package/dist/schemas/verification.js +122 -0
  1661. package/dist/schemas/verification.js.map +1 -0
  1662. package/dist/schemas/work-contract-projection.d.ts +473 -0
  1663. package/dist/schemas/work-contract-projection.d.ts.map +1 -0
  1664. package/dist/schemas/work-contract-projection.js +232 -0
  1665. package/dist/schemas/work-contract-projection.js.map +1 -0
  1666. package/dist/selection/connector-planning.d.ts +23 -0
  1667. package/dist/selection/connector-planning.d.ts.map +1 -0
  1668. package/dist/selection/connector-planning.js +31 -0
  1669. package/dist/selection/connector-planning.js.map +1 -0
  1670. package/dist/selection/power-inference.d.ts +20 -0
  1671. package/dist/selection/power-inference.d.ts.map +1 -0
  1672. package/dist/selection/power-inference.js +74 -0
  1673. package/dist/selection/power-inference.js.map +1 -0
  1674. package/dist/selection/power-tiers.d.ts +24 -0
  1675. package/dist/selection/power-tiers.d.ts.map +1 -0
  1676. package/dist/selection/power-tiers.js +115 -0
  1677. package/dist/selection/power-tiers.js.map +1 -0
  1678. package/dist/selection/relay-selection.d.ts +11 -0
  1679. package/dist/selection/relay-selection.d.ts.map +1 -0
  1680. package/dist/selection/relay-selection.js +57 -0
  1681. package/dist/selection/relay-selection.js.map +1 -0
  1682. package/dist/selection/selection-resolver.d.ts +23 -0
  1683. package/dist/selection/selection-resolver.d.ts.map +1 -0
  1684. package/dist/selection/selection-resolver.js +153 -0
  1685. package/dist/selection/selection-resolver.js.map +1 -0
  1686. package/dist/shared/atomic-io.d.ts +11 -0
  1687. package/dist/shared/atomic-io.d.ts.map +1 -0
  1688. package/dist/shared/atomic-io.js +29 -0
  1689. package/dist/shared/atomic-io.js.map +1 -0
  1690. package/dist/shared/checkpoint-auto-resolution.d.ts +17 -0
  1691. package/dist/shared/checkpoint-auto-resolution.d.ts.map +1 -0
  1692. package/dist/shared/checkpoint-auto-resolution.js +72 -0
  1693. package/dist/shared/checkpoint-auto-resolution.js.map +1 -0
  1694. package/dist/shared/checkpoint-boundary.d.ts +15 -0
  1695. package/dist/shared/checkpoint-boundary.d.ts.map +1 -0
  1696. package/dist/shared/checkpoint-boundary.js +125 -0
  1697. package/dist/shared/checkpoint-boundary.js.map +1 -0
  1698. package/dist/shared/config-loader.d.ts +20 -0
  1699. package/dist/shared/config-loader.d.ts.map +1 -0
  1700. package/dist/shared/config-loader.js +140 -0
  1701. package/dist/shared/config-loader.js.map +1 -0
  1702. package/dist/shared/connector-relay.d.ts +39 -0
  1703. package/dist/shared/connector-relay.d.ts.map +1 -0
  1704. package/dist/shared/connector-relay.js +2 -0
  1705. package/dist/shared/connector-relay.js.map +1 -0
  1706. package/dist/shared/control-plane-gitignore.d.ts +10 -0
  1707. package/dist/shared/control-plane-gitignore.d.ts.map +1 -0
  1708. package/dist/shared/control-plane-gitignore.js +46 -0
  1709. package/dist/shared/control-plane-gitignore.js.map +1 -0
  1710. package/dist/shared/control-plane-paths.d.ts +36 -0
  1711. package/dist/shared/control-plane-paths.d.ts.map +1 -0
  1712. package/dist/shared/control-plane-paths.js +71 -0
  1713. package/dist/shared/control-plane-paths.js.map +1 -0
  1714. package/dist/shared/equipment-enforcement.d.ts +11 -0
  1715. package/dist/shared/equipment-enforcement.d.ts.map +1 -0
  1716. package/dist/shared/equipment-enforcement.js +37 -0
  1717. package/dist/shared/equipment-enforcement.js.map +1 -0
  1718. package/dist/shared/fanout-aggregate-report.d.ts +32 -0
  1719. package/dist/shared/fanout-aggregate-report.d.ts.map +1 -0
  1720. package/dist/shared/fanout-aggregate-report.js +73 -0
  1721. package/dist/shared/fanout-aggregate-report.js.map +1 -0
  1722. package/dist/shared/fanout-branch-template.d.ts +4 -0
  1723. package/dist/shared/fanout-branch-template.d.ts.map +1 -0
  1724. package/dist/shared/fanout-branch-template.js +55 -0
  1725. package/dist/shared/fanout-branch-template.js.map +1 -0
  1726. package/dist/shared/git-state-command.d.ts +19 -0
  1727. package/dist/shared/git-state-command.d.ts.map +1 -0
  1728. package/dist/shared/git-state-command.js +52 -0
  1729. package/dist/shared/git-state-command.js.map +1 -0
  1730. package/dist/shared/git-state.d.ts +3 -0
  1731. package/dist/shared/git-state.d.ts.map +1 -0
  1732. package/dist/shared/git-state.js +163 -0
  1733. package/dist/shared/git-state.js.map +1 -0
  1734. package/dist/shared/git-state.ts +175 -0
  1735. package/dist/shared/html/checkpoint-page.d.ts +41 -0
  1736. package/dist/shared/html/checkpoint-page.d.ts.map +1 -0
  1737. package/dist/shared/html/checkpoint-page.js +108 -0
  1738. package/dist/shared/html/checkpoint-page.js.map +1 -0
  1739. package/dist/shared/html/index.d.ts +6 -0
  1740. package/dist/shared/html/index.d.ts.map +1 -0
  1741. package/dist/shared/html/index.js +16 -0
  1742. package/dist/shared/html/index.js.map +1 -0
  1743. package/dist/shared/html/multi-variant.d.ts +56 -0
  1744. package/dist/shared/html/multi-variant.d.ts.map +1 -0
  1745. package/dist/shared/html/multi-variant.js +183 -0
  1746. package/dist/shared/html/multi-variant.js.map +1 -0
  1747. package/dist/shared/html/page.d.ts +5 -0
  1748. package/dist/shared/html/page.d.ts.map +1 -0
  1749. package/dist/shared/html/page.js +42 -0
  1750. package/dist/shared/html/page.js.map +1 -0
  1751. package/dist/shared/html/projector.d.ts +38 -0
  1752. package/dist/shared/html/projector.d.ts.map +1 -0
  1753. package/dist/shared/html/projector.js +7 -0
  1754. package/dist/shared/html/projector.js.map +1 -0
  1755. package/dist/shared/html/react-page.d.ts +10 -0
  1756. package/dist/shared/html/react-page.d.ts.map +1 -0
  1757. package/dist/shared/html/react-page.js +31 -0
  1758. package/dist/shared/html/react-page.js.map +1 -0
  1759. package/dist/shared/html/report-components.d.ts +57 -0
  1760. package/dist/shared/html/report-components.d.ts.map +1 -0
  1761. package/dist/shared/html/report-components.js +69 -0
  1762. package/dist/shared/html/report-components.js.map +1 -0
  1763. package/dist/shared/html/ui/alert.d.ts +10 -0
  1764. package/dist/shared/html/ui/alert.d.ts.map +1 -0
  1765. package/dist/shared/html/ui/alert.js +28 -0
  1766. package/dist/shared/html/ui/alert.js.map +1 -0
  1767. package/dist/shared/html/ui/badge.d.ts +11 -0
  1768. package/dist/shared/html/ui/badge.d.ts.map +1 -0
  1769. package/dist/shared/html/ui/badge.js +32 -0
  1770. package/dist/shared/html/ui/badge.js.map +1 -0
  1771. package/dist/shared/html/ui/button.d.ts +13 -0
  1772. package/dist/shared/html/ui/button.d.ts.map +1 -0
  1773. package/dist/shared/html/ui/button.js +36 -0
  1774. package/dist/shared/html/ui/button.js.map +1 -0
  1775. package/dist/shared/html/ui/card.d.ts +10 -0
  1776. package/dist/shared/html/ui/card.d.ts.map +1 -0
  1777. package/dist/shared/html/ui/card.js +25 -0
  1778. package/dist/shared/html/ui/card.js.map +1 -0
  1779. package/dist/shared/html/ui/checkbox.d.ts +4 -0
  1780. package/dist/shared/html/ui/checkbox.d.ts.map +1 -0
  1781. package/dist/shared/html/ui/checkbox.js +7 -0
  1782. package/dist/shared/html/ui/checkbox.js.map +1 -0
  1783. package/dist/shared/html/ui/collapsible.d.ts +6 -0
  1784. package/dist/shared/html/ui/collapsible.d.ts.map +1 -0
  1785. package/dist/shared/html/ui/collapsible.js +13 -0
  1786. package/dist/shared/html/ui/collapsible.js.map +1 -0
  1787. package/dist/shared/html/ui/css.generated.d.ts +2 -0
  1788. package/dist/shared/html/ui/css.generated.d.ts.map +1 -0
  1789. package/dist/shared/html/ui/css.generated.js +5 -0
  1790. package/dist/shared/html/ui/css.generated.js.map +1 -0
  1791. package/dist/shared/html/ui/field.d.ts +26 -0
  1792. package/dist/shared/html/ui/field.d.ts.map +1 -0
  1793. package/dist/shared/html/ui/field.js +79 -0
  1794. package/dist/shared/html/ui/field.js.map +1 -0
  1795. package/dist/shared/html/ui/index.d.ts +16 -0
  1796. package/dist/shared/html/ui/index.d.ts.map +1 -0
  1797. package/dist/shared/html/ui/index.js +20 -0
  1798. package/dist/shared/html/ui/index.js.map +1 -0
  1799. package/dist/shared/html/ui/input.d.ts +5 -0
  1800. package/dist/shared/html/ui/input.d.ts.map +1 -0
  1801. package/dist/shared/html/ui/input.js +11 -0
  1802. package/dist/shared/html/ui/input.js.map +1 -0
  1803. package/dist/shared/html/ui/kbd.d.ts +5 -0
  1804. package/dist/shared/html/ui/kbd.d.ts.map +1 -0
  1805. package/dist/shared/html/ui/kbd.js +10 -0
  1806. package/dist/shared/html/ui/kbd.js.map +1 -0
  1807. package/dist/shared/html/ui/label.d.ts +4 -0
  1808. package/dist/shared/html/ui/label.d.ts.map +1 -0
  1809. package/dist/shared/html/ui/label.js +9 -0
  1810. package/dist/shared/html/ui/label.js.map +1 -0
  1811. package/dist/shared/html/ui/radio-group.d.ts +5 -0
  1812. package/dist/shared/html/ui/radio-group.d.ts.map +1 -0
  1813. package/dist/shared/html/ui/radio-group.js +10 -0
  1814. package/dist/shared/html/ui/radio-group.js.map +1 -0
  1815. package/dist/shared/html/ui/separator.d.ts +4 -0
  1816. package/dist/shared/html/ui/separator.d.ts.map +1 -0
  1817. package/dist/shared/html/ui/separator.js +11 -0
  1818. package/dist/shared/html/ui/separator.js.map +1 -0
  1819. package/dist/shared/html/ui/table.d.ts +11 -0
  1820. package/dist/shared/html/ui/table.d.ts.map +1 -0
  1821. package/dist/shared/html/ui/table.js +28 -0
  1822. package/dist/shared/html/ui/table.js.map +1 -0
  1823. package/dist/shared/html/ui/textarea.d.ts +4 -0
  1824. package/dist/shared/html/ui/textarea.d.ts.map +1 -0
  1825. package/dist/shared/html/ui/textarea.js +7 -0
  1826. package/dist/shared/html/ui/textarea.js.map +1 -0
  1827. package/dist/shared/html/ui/utils.d.ts +3 -0
  1828. package/dist/shared/html/ui/utils.d.ts.map +1 -0
  1829. package/dist/shared/html/ui/utils.js +11 -0
  1830. package/dist/shared/html/ui/utils.js.map +1 -0
  1831. package/dist/shared/json-extraction.d.ts +2 -0
  1832. package/dist/shared/json-extraction.d.ts.map +1 -0
  1833. package/dist/shared/json-extraction.js +68 -0
  1834. package/dist/shared/json-extraction.js.map +1 -0
  1835. package/dist/shared/manifest-snapshot.d.ts +13 -0
  1836. package/dist/shared/manifest-snapshot.d.ts.map +1 -0
  1837. package/dist/shared/manifest-snapshot.js +48 -0
  1838. package/dist/shared/manifest-snapshot.js.map +1 -0
  1839. package/dist/shared/operator-summary/explore.d.ts +3 -0
  1840. package/dist/shared/operator-summary/explore.d.ts.map +1 -0
  1841. package/dist/shared/operator-summary/explore.js +208 -0
  1842. package/dist/shared/operator-summary/explore.js.map +1 -0
  1843. package/dist/shared/operator-summary/index.d.ts +6 -0
  1844. package/dist/shared/operator-summary/index.d.ts.map +1 -0
  1845. package/dist/shared/operator-summary/index.js +10 -0
  1846. package/dist/shared/operator-summary/index.js.map +1 -0
  1847. package/dist/shared/operator-summary/json.d.ts +10 -0
  1848. package/dist/shared/operator-summary/json.d.ts.map +1 -0
  1849. package/dist/shared/operator-summary/json.js +63 -0
  1850. package/dist/shared/operator-summary/json.js.map +1 -0
  1851. package/dist/shared/operator-summary/projections.d.ts +4 -0
  1852. package/dist/shared/operator-summary/projections.d.ts.map +1 -0
  1853. package/dist/shared/operator-summary/projections.js +452 -0
  1854. package/dist/shared/operator-summary/projections.js.map +1 -0
  1855. package/dist/shared/operator-summary/projector.d.ts +14 -0
  1856. package/dist/shared/operator-summary/projector.d.ts.map +1 -0
  1857. package/dist/shared/operator-summary/projector.js +12 -0
  1858. package/dist/shared/operator-summary/projector.js.map +1 -0
  1859. package/dist/shared/operator-summary/text.d.ts +11 -0
  1860. package/dist/shared/operator-summary/text.d.ts.map +1 -0
  1861. package/dist/shared/operator-summary/text.js +92 -0
  1862. package/dist/shared/operator-summary/text.js.map +1 -0
  1863. package/dist/shared/outcome.d.ts +13 -0
  1864. package/dist/shared/outcome.d.ts.map +1 -0
  1865. package/dist/shared/outcome.js +76 -0
  1866. package/dist/shared/outcome.js.map +1 -0
  1867. package/dist/shared/progress-output.d.ts +12 -0
  1868. package/dist/shared/progress-output.d.ts.map +1 -0
  1869. package/dist/shared/progress-output.js +50 -0
  1870. package/dist/shared/progress-output.js.map +1 -0
  1871. package/dist/shared/proof-assessment.d.ts +7 -0
  1872. package/dist/shared/proof-assessment.d.ts.map +1 -0
  1873. package/dist/shared/proof-assessment.js +67 -0
  1874. package/dist/shared/proof-assessment.js.map +1 -0
  1875. package/dist/shared/proof-plan.d.ts +26 -0
  1876. package/dist/shared/proof-plan.d.ts.map +1 -0
  1877. package/dist/shared/proof-plan.js +164 -0
  1878. package/dist/shared/proof-plan.js.map +1 -0
  1879. package/dist/shared/relay-runtime-types.d.ts +30 -0
  1880. package/dist/shared/relay-runtime-types.d.ts.map +1 -0
  1881. package/dist/shared/relay-runtime-types.js +2 -0
  1882. package/dist/shared/relay-runtime-types.js.map +1 -0
  1883. package/dist/shared/result-path.d.ts +3 -0
  1884. package/dist/shared/result-path.d.ts.map +1 -0
  1885. package/dist/shared/result-path.js +6 -0
  1886. package/dist/shared/result-path.js.map +1 -0
  1887. package/dist/shared/run-artifact-io.d.ts +3 -0
  1888. package/dist/shared/run-artifact-io.d.ts.map +1 -0
  1889. package/dist/shared/run-artifact-io.js +17 -0
  1890. package/dist/shared/run-artifact-io.js.map +1 -0
  1891. package/dist/shared/run-file-paths.d.ts +3 -0
  1892. package/dist/shared/run-file-paths.d.ts.map +1 -0
  1893. package/dist/shared/run-file-paths.js +72 -0
  1894. package/dist/shared/run-file-paths.js.map +1 -0
  1895. package/dist/shared/run-relative-path.d.ts +2 -0
  1896. package/dist/shared/run-relative-path.d.ts.map +1 -0
  1897. package/dist/shared/run-relative-path.js +43 -0
  1898. package/dist/shared/run-relative-path.js.map +1 -0
  1899. package/dist/shared/runtime-source.d.ts +24 -0
  1900. package/dist/shared/runtime-source.d.ts.map +1 -0
  1901. package/dist/shared/runtime-source.js +75 -0
  1902. package/dist/shared/runtime-source.js.map +1 -0
  1903. package/dist/shared/runtime-touched-files.d.ts +12 -0
  1904. package/dist/shared/runtime-touched-files.d.ts.map +1 -0
  1905. package/dist/shared/runtime-touched-files.js +106 -0
  1906. package/dist/shared/runtime-touched-files.js.map +1 -0
  1907. package/dist/shared/skill-loading.d.ts +22 -0
  1908. package/dist/shared/skill-loading.d.ts.map +1 -0
  1909. package/dist/shared/skill-loading.js +75 -0
  1910. package/dist/shared/skill-loading.js.map +1 -0
  1911. package/dist/shared/status-block-renderer.d.ts +16 -0
  1912. package/dist/shared/status-block-renderer.d.ts.map +1 -0
  1913. package/dist/shared/status-block-renderer.js +67 -0
  1914. package/dist/shared/status-block-renderer.js.map +1 -0
  1915. package/dist/shared/user-skill-registry.d.ts +18 -0
  1916. package/dist/shared/user-skill-registry.d.ts.map +1 -0
  1917. package/dist/shared/user-skill-registry.js +130 -0
  1918. package/dist/shared/user-skill-registry.js.map +1 -0
  1919. package/dist/shared/verification-resolver.d.ts +23 -0
  1920. package/dist/shared/verification-resolver.d.ts.map +1 -0
  1921. package/dist/shared/verification-resolver.js +162 -0
  1922. package/dist/shared/verification-resolver.js.map +1 -0
  1923. package/dist/shared/work-contract-projection.d.ts +15 -0
  1924. package/dist/shared/work-contract-projection.d.ts.map +1 -0
  1925. package/dist/shared/work-contract-projection.js +498 -0
  1926. package/dist/shared/work-contract-projection.js.map +1 -0
  1927. package/dist/shared/working-tree-changes.d.ts +18 -0
  1928. package/dist/shared/working-tree-changes.d.ts.map +1 -0
  1929. package/dist/shared/working-tree-changes.js +94 -0
  1930. package/dist/shared/working-tree-changes.js.map +1 -0
  1931. package/dist/shared/write-capable-worker-disclosure.d.ts +3 -0
  1932. package/dist/shared/write-capable-worker-disclosure.d.ts.map +1 -0
  1933. package/dist/shared/write-capable-worker-disclosure.js +6 -0
  1934. package/dist/shared/write-capable-worker-disclosure.js.map +1 -0
  1935. package/dist/shared/zod-to-response-schema.d.ts +4 -0
  1936. package/dist/shared/zod-to-response-schema.d.ts.map +1 -0
  1937. package/dist/shared/zod-to-response-schema.js +88 -0
  1938. package/dist/shared/zod-to-response-schema.js.map +1 -0
  1939. package/dist/skill-hooks/decision-packet.d.ts +10 -0
  1940. package/dist/skill-hooks/decision-packet.d.ts.map +1 -0
  1941. package/dist/skill-hooks/decision-packet.js +42 -0
  1942. package/dist/skill-hooks/decision-packet.js.map +1 -0
  1943. package/dist/skill-hooks/dispatch.d.ts +27 -0
  1944. package/dist/skill-hooks/dispatch.d.ts.map +1 -0
  1945. package/dist/skill-hooks/dispatch.js +167 -0
  1946. package/dist/skill-hooks/dispatch.js.map +1 -0
  1947. package/dist/skill-hooks/injection.d.ts +7 -0
  1948. package/dist/skill-hooks/injection.d.ts.map +1 -0
  1949. package/dist/skill-hooks/injection.js +50 -0
  1950. package/dist/skill-hooks/injection.js.map +1 -0
  1951. package/dist/skill-hooks/policy.d.ts +32 -0
  1952. package/dist/skill-hooks/policy.d.ts.map +1 -0
  1953. package/dist/skill-hooks/policy.js +104 -0
  1954. package/dist/skill-hooks/policy.js.map +1 -0
  1955. package/dist/skill-hooks/surface-sources.d.ts +8 -0
  1956. package/dist/skill-hooks/surface-sources.d.ts.map +1 -0
  1957. package/dist/skill-hooks/surface-sources.js +55 -0
  1958. package/dist/skill-hooks/surface-sources.js.map +1 -0
  1959. package/generated/flows/build/circuit.json +439 -0
  1960. package/generated/flows/build/circuit.work-contract.v0.json +1283 -0
  1961. package/generated/flows/catalog.json +29 -0
  1962. package/generated/flows/converge-proof/circuit.json +145 -0
  1963. package/generated/flows/converge-proof/circuit.work-contract.v0.json +275 -0
  1964. package/generated/flows/cross-tool-build/circuit.json +321 -0
  1965. package/generated/flows/cross-tool-build/circuit.work-contract.v0.json +1157 -0
  1966. package/generated/flows/explainer/circuit.json +610 -0
  1967. package/generated/flows/explainer/circuit.work-contract.v0.json +1552 -0
  1968. package/generated/flows/explore/circuit.json +217 -0
  1969. package/generated/flows/explore/circuit.work-contract.v0.json +717 -0
  1970. package/generated/flows/explore/tournament.json +412 -0
  1971. package/generated/flows/explore/tournament.work-contract.v0.json +983 -0
  1972. package/generated/flows/fix/circuit.json +563 -0
  1973. package/generated/flows/fix/circuit.work-contract.v0.json +2175 -0
  1974. package/generated/flows/fix/low.json +511 -0
  1975. package/generated/flows/fix/low.work-contract.v0.json +1921 -0
  1976. package/generated/flows/fix-until-green/circuit.json +183 -0
  1977. package/generated/flows/fix-until-green/circuit.work-contract.v0.json +438 -0
  1978. package/generated/flows/goal/circuit.json +638 -0
  1979. package/generated/flows/goal/circuit.work-contract.v0.json +2133 -0
  1980. package/generated/flows/prototype/circuit.json +278 -0
  1981. package/generated/flows/prototype/circuit.work-contract.v0.json +690 -0
  1982. package/generated/flows/prototype/tournament.json +505 -0
  1983. package/generated/flows/prototype/tournament.work-contract.v0.json +1122 -0
  1984. package/generated/flows/pursue/circuit.json +298 -0
  1985. package/generated/flows/pursue/circuit.work-contract.v0.json +944 -0
  1986. package/generated/flows/review/circuit.json +142 -0
  1987. package/generated/flows/review/circuit.work-contract.v0.json +392 -0
  1988. package/generated/flows/runtime-proof/circuit.json +91 -0
  1989. package/generated/flows/runtime-proof/circuit.work-contract.v0.json +183 -0
  1990. package/generated/flows/sweep/circuit.json +239 -0
  1991. package/generated/flows/sweep/circuit.work-contract.v0.json +590 -0
  1992. package/package.json +102 -0
  1993. package/plugins/version.json +3 -0
@@ -0,0 +1,1755 @@
1
+ // Runtime graph execution loop.
2
+ //
3
+ // Owns step advancement for one run folder: bootstrap trace, step attempts,
4
+ // recovery routes, checkpoint waiting, terminal closure, and result.json.
5
+ // Flow-specific behavior belongs in executors and flow registries; the runner
6
+ // only interprets the executable graph and appends durable trace entries.
7
+ import { randomUUID } from 'node:crypto';
8
+ import { join } from 'node:path';
9
+ import { composePolicyHardConstraints } from '../../policy/policy-envelope.js';
10
+ import { computeManifestHash } from '../../schemas/manifest.js';
11
+ import { clampPowerToBounds, createPowerInferenceChannel, extractPowerRecommendation, seedPowerInferenceFromTrace, } from '../../selection/power-inference.js';
12
+ import { resolvePowerDialSetting } from '../../selection/power-tiers.js';
13
+ import { resolveDottedPath } from '../../shared/fanout-branch-template.js';
14
+ import { isProofPlanBlockedError } from '../../shared/proof-plan.js';
15
+ import { createUserSkillRegistry } from '../../shared/user-skill-registry.js';
16
+ import { dispatchSkillHooks } from '../../skill-hooks/dispatch.js';
17
+ import { createSkillHookInjectionChannel } from '../../skill-hooks/injection.js';
18
+ import { surfaceSourcesFromDeclarations } from '../../skill-hooks/surface-sources.js';
19
+ import { isAcceptanceRetryFeedback } from '../acceptance-criteria.js';
20
+ import { isWaitingCheckpointStepOutcome } from '../domain/step.js';
21
+ import { createDefaultExecutors } from '../executors/index.js';
22
+ import { buildRuntimePackageIndex } from '../manifest/runtime-package-index.js';
23
+ import { assertExecutableFlow } from '../manifest/validate-executable-flow.js';
24
+ import { resolveBindingLegibility } from './binding-legibility.js';
25
+ import { appendCarriedNote } from './carried-notes.js';
26
+ import { decideContextDeliveryOutcome, } from './context-delivery.js';
27
+ import { extractContextRequest } from './context-pull.js';
28
+ import { resolveEngineFlags } from './engine-flags.js';
29
+ import { extractEquipmentDiscovery } from './equipment-reshape.js';
30
+ import { FrozenEvalGuard } from './frozen-eval.js';
31
+ import { appendFlowSelectionGuidance, appendRecoveryRouteGuidance } from './guidance.js';
32
+ import { HonestyLedger } from './honesty-ledger.js';
33
+ import { writeRuntimeManifestSnapshot } from './manifest-snapshot.js';
34
+ import { createOracleCommandPinChannel } from './oracle-command-pin.js';
35
+ import { recoveryBindingVerdict, recoveryCauseAllowed } from './recovery-binding-verdict.js';
36
+ import { RecoveryCorridor } from './recovery-corridor.js';
37
+ import { openRunBoundary } from './run-boundary.js';
38
+ import { closeRun, completeCloseProofGap, outcomeForTerminal, } from './run-close.js';
39
+ import { classifyRouteDeclarationTransition, classifyRouteTargetTransition, isCompletedStepReentryAbort, isRouteTargetAbort, } from './run-transition.js';
40
+ import { SliceCorridor } from './slice-corridor.js';
41
+ import { completedStepCountsFromTrace, latestRecoveryFailureEvidence, latestStepReportOrRelayRef, reportSelectedCheckpointBoundaryEvidence, seedSkillHookInjectionsFromTrace, } from './trace-evidence.js';
42
+ import { evaluateUntilBudget } from './until-budget.js';
43
+ import { UntilCorridor } from './until-corridor.js';
44
+ export function isGraphCheckpointWaitingResult(result) {
45
+ return 'kind' in result && result.kind === 'checkpoint_waiting';
46
+ }
47
+ export function isGraphRejectedOutcome(result) {
48
+ return 'kind' in result && result.kind === 'rejected';
49
+ }
50
+ function defaultManifestHash(flow) {
51
+ return `runtime:${flow.id}@${flow.version}`;
52
+ }
53
+ function routeTargetKey(target) {
54
+ return target.kind === 'terminal' ? target.target : target.stepId;
55
+ }
56
+ function recoveryBindingForCompletedRoute(input) {
57
+ return input.bindings?.find((binding) => binding.step_id === input.step.id &&
58
+ binding.route_id === input.route &&
59
+ binding.route_target === routeTargetKey(input.target));
60
+ }
61
+ function hasRecoveryBindingForRoute(input) {
62
+ if (input.route === undefined)
63
+ return false;
64
+ const target = input.step.routes[input.route];
65
+ if (target === undefined)
66
+ return false;
67
+ return (recoveryBindingForCompletedRoute({
68
+ bindings: input.bindings,
69
+ step: input.step,
70
+ route: input.route,
71
+ target,
72
+ }) !== undefined);
73
+ }
74
+ function isRecoveryRouteForMechanics(input) {
75
+ if (input.bindings === undefined)
76
+ return false;
77
+ return hasRecoveryBindingForRoute(input);
78
+ }
79
+ function configuredMaxAttempts(step) {
80
+ const budgets = step.budgets;
81
+ if (budgets === undefined || budgets === null || typeof budgets !== 'object')
82
+ return undefined;
83
+ const maxAttempts = budgets.max_attempts;
84
+ if (typeof maxAttempts !== 'number')
85
+ return undefined;
86
+ if (!Number.isInteger(maxAttempts) || maxAttempts < 1)
87
+ return undefined;
88
+ return maxAttempts;
89
+ }
90
+ function maxAttemptsForRoute(step, recoveryRoute, policyCap) {
91
+ const routeMax = configuredMaxAttempts(step) ?? (recoveryRoute ? 2 : 1);
92
+ // The per-repo policy max_attempts_per_step is an upper bound (a hard
93
+ // constraint). Clamp the route's own ceiling down to it when present.
94
+ return policyCap === undefined ? routeMax : Math.min(routeMax, policyCap);
95
+ }
96
+ function standardChangeKindDeclaration(changeKind) {
97
+ return {
98
+ change_kind: changeKind,
99
+ failure_mode: 'runtime execution cannot produce required reports',
100
+ acceptance_evidence: 'trace entries, reports, and result files satisfy their schemas',
101
+ alternate_framing: 'start a fresh flow with a narrower goal',
102
+ };
103
+ }
104
+ function bootstrapChangeKind(input) {
105
+ const defaultKind = input.flow.entryModes?.find((mode) => mode.name === input.entryModeName)?.defaultChangeKind ??
106
+ 'ratchet-advance';
107
+ if (defaultKind !== 'ratchet-advance' &&
108
+ defaultKind !== 'equivalence-refactor' &&
109
+ defaultKind !== 'discovery' &&
110
+ defaultKind !== 'disposable') {
111
+ return standardChangeKindDeclaration('ratchet-advance');
112
+ }
113
+ return standardChangeKindDeclaration(defaultKind);
114
+ }
115
+ // A slice loop re-enters its body once per slice. The resume path
116
+ // reconstructs slice progress from the trace, which only holds completed
117
+ // steps, so a checkpoint pausing mid-loop would lose the live slice index.
118
+ // Build's only checkpoint sits before the loop; this assertion keeps that
119
+ // true for any flow that opts into iteratesSliceLoop.
120
+ function assertNoCheckpointInSliceLoop(flow, flag) {
121
+ const steps = new Map(flow.steps.map((step) => [step.id, step]));
122
+ const visited = new Set();
123
+ let cursor = flag.headStep;
124
+ while (cursor !== undefined && !visited.has(cursor)) {
125
+ visited.add(cursor);
126
+ const step = steps.get(cursor);
127
+ if (step === undefined)
128
+ break;
129
+ if (step.kind === 'checkpoint') {
130
+ throw new Error(`slice loop body contains checkpoint step '${cursor}'; a checkpoint inside [${flag.headStep}..${flag.tailStep}] is not supported`);
131
+ }
132
+ if (cursor === flag.tailStep)
133
+ break;
134
+ const forward = step.routes.continue ?? step.routes.pass;
135
+ cursor = forward?.kind === 'step' ? forward.stepId : undefined;
136
+ }
137
+ }
138
+ // Reject a malformed until-loop flag up front, before any step runs, so the
139
+ // operator sees a clear flag-config error rather than a misleading mid-loop
140
+ // abort. Two failure modes the engine cannot otherwise diagnose: a body step
141
+ // missing from bodySteps is not iteration-scoped, so it aborts as an illegal
142
+ // re-entry ("route cycle detected") on the second pass; and an undeclared
143
+ // reenterRoute surfaces as "selected undeclared route" only after a full body
144
+ // pass has already consumed worker budget. shouldReenter/advance key off
145
+ // headStep/tailStep directly while count-scoping keys off bodySteps membership,
146
+ // so this also asserts the two cannot disagree.
147
+ function assertUntilFlagCoherent(flow, steps, flag) {
148
+ const { headStep, tailStep, bodySteps, reenterRoute, maxIterations } = flag;
149
+ if (!Number.isInteger(maxIterations) || maxIterations < 1) {
150
+ throw new Error(`until loop on flow '${flow.id}' has maxIterations ${maxIterations}; it must be a positive integer`);
151
+ }
152
+ const body = new Set(bodySteps);
153
+ if (!body.has(headStep)) {
154
+ throw new Error(`until loop on flow '${flow.id}' omits headStep '${headStep}' from bodySteps; the full [head..tail] span must be listed or the head aborts mid-loop as an illegal re-entry`);
155
+ }
156
+ if (!body.has(tailStep)) {
157
+ throw new Error(`until loop on flow '${flow.id}' omits tailStep '${tailStep}' from bodySteps; the full [head..tail] span must be listed or the tail aborts mid-loop as an illegal re-entry`);
158
+ }
159
+ for (const id of bodySteps) {
160
+ if (!steps.has(id)) {
161
+ throw new Error(`until loop on flow '${flow.id}' lists bodyStep '${id}', which is not a declared step in the flow`);
162
+ }
163
+ }
164
+ const reenter = steps.get(tailStep)?.routes[reenterRoute];
165
+ if (reenter === undefined) {
166
+ throw new Error(`until loop on flow '${flow.id}' names reenterRoute '${reenterRoute}', but tail step '${tailStep}' declares no such route`);
167
+ }
168
+ if (reenter.kind !== 'step' || reenter.stepId !== headStep) {
169
+ throw new Error(`until loop on flow '${flow.id}' reenterRoute '${reenterRoute}' must target headStep '${headStep}' as a step route`);
170
+ }
171
+ // Slice 2: a stop-judge loop disposes the tail's goal-met proposal, so it must
172
+ // declare a separate exit for an exhausted run. Without it, the cap would have
173
+ // nowhere honest to route and the loop could only exit through the clean-stop
174
+ // forward route, which is the exact exhaustion-reads-as-success the loop
175
+ // forbids. Require the route, that the tail declares it, and that it does not
176
+ // resolve to @complete.
177
+ if (flag.stopJudge !== undefined) {
178
+ const { needsAttentionRoute } = flag;
179
+ if (needsAttentionRoute === undefined) {
180
+ throw new Error(`until loop on flow '${flow.id}' sets a stopJudge but no needsAttentionRoute; a judge-gated loop must declare where an exhausted run exits so the iteration cap cannot reach @complete`);
181
+ }
182
+ const attention = steps.get(tailStep)?.routes[needsAttentionRoute];
183
+ if (attention === undefined) {
184
+ throw new Error(`until loop on flow '${flow.id}' names needsAttentionRoute '${needsAttentionRoute}', but tail step '${tailStep}' declares no such route`);
185
+ }
186
+ if (attention.kind === 'terminal' && attention.target === '@complete') {
187
+ throw new Error(`until loop on flow '${flow.id}' needsAttentionRoute '${needsAttentionRoute}' targets @complete; an exhausted judge-gated loop must exit to a non-complete terminal so exhaustion can never read as success`);
188
+ }
189
+ }
190
+ // Slices 4-6 (carried notes, the budget cap, the no-progress ceiling) are
191
+ // evaluated only on the stop-judge tail seam; a count-driven loop never reads
192
+ // them. Accepting one without a stopJudge would silently ignore a declared
193
+ // spend cap (a fail-open of a safety bound), so reject the combination up front
194
+ // the same way the needs-attention precondition above is gated.
195
+ // frozenPaths joins this ladder: the guard is consulted only on the stop-judge
196
+ // tail seam, and its latch lands in the honesty ledger, which exists only on a
197
+ // judge-gated loop. A count-driven loop declaring frozenPaths would silently
198
+ // ignore the freeze — a fail-open of a soundness bound — so reject it up front.
199
+ if (flag.stopJudge === undefined) {
200
+ const orphaned = flag.carriedNotes !== undefined
201
+ ? 'carriedNotes'
202
+ : flag.cumulativeUsdCap !== undefined
203
+ ? 'cumulativeUsdCap'
204
+ : flag.cumulativeTokenCap !== undefined
205
+ ? 'cumulativeTokenCap'
206
+ : flag.noProgressCeiling !== undefined
207
+ ? 'noProgressCeiling'
208
+ : flag.frozenPaths !== undefined
209
+ ? 'frozenPaths'
210
+ : undefined;
211
+ if (orphaned !== undefined) {
212
+ throw new Error(`until loop on flow '${flow.id}' sets ${orphaned} but no stopJudge; these bounds are read only on a judge-gated loop, so a count-driven loop would silently ignore them`);
213
+ }
214
+ }
215
+ // The no-progress ceiling counts unchanged progress markers, which only exist
216
+ // when the judge writes one. Without stopJudge.progressPath the marker is never
217
+ // recorded and the ceiling can never trip, so it would be silently unenforced.
218
+ if (flag.noProgressCeiling !== undefined && flag.stopJudge?.progressPath === undefined) {
219
+ throw new Error(`until loop on flow '${flow.id}' sets noProgressCeiling but no stopJudge.progressPath; without a progress marker to compare, the ceiling can never trip`);
220
+ }
221
+ }
222
+ // Slice 2/4/6 stop-judge: read the tail relay's report once and pull the
223
+ // goal-met boolean, the carried lesson, and the opaque progress marker from it.
224
+ // A missing or unreadable judgment reads as "not done" with no lesson and no
225
+ // marker, so the loop re-enters or exhausts rather than stopping on an absent
226
+ // proposal. Reading once keeps the three reads on a single consistent snapshot.
227
+ async function readUntilJudgeReport(context, stopJudge) {
228
+ try {
229
+ const raw = await context.files.readJson(stopJudge.report);
230
+ const goalProposed = resolveDottedPath(raw, stopJudge.goalMetPath) === true;
231
+ const lessonValue = stopJudge.lessonPath === undefined ? undefined : resolveDottedPath(raw, stopJudge.lessonPath);
232
+ const lesson = typeof lessonValue === 'string' ? lessonValue : undefined;
233
+ const progressMarker = stopJudge.progressPath === undefined
234
+ ? undefined
235
+ : resolveDottedPath(raw, stopJudge.progressPath);
236
+ return { goalProposed, lesson, progressMarker };
237
+ }
238
+ catch {
239
+ return { goalProposed: false, lesson: undefined, progressMarker: undefined };
240
+ }
241
+ }
242
+ // True when the most recent proof assessment on the run cannot back a clean
243
+ // close — its overall_status is not `proven` or it does not allow close. This is
244
+ // the until loop's "is the latest evidence red?" signal. The stop-judge consults
245
+ // it at the tail seam right after the iteration's verify step ran, so the latest
246
+ // proof.assessed is exactly this iteration's evidence. It catches the body-verify
247
+ // case that completeCloseProofGap misses: a run-verification body step routes to
248
+ // the judge (not @complete), so its proof_policy carries close_requires_proven:
249
+ // false and never opens a close gap — yet a red verify in the current iteration
250
+ // must still block the judge's goal-met claim. Absent any proof.assessed (a flow
251
+ // with no verification body, e.g. converge-proof) it returns false and the floor
252
+ // is unchanged.
253
+ function latestProofContradictsClose(context) {
254
+ const entries = context.trace.getAll();
255
+ for (let index = entries.length - 1; index >= 0; index -= 1) {
256
+ const entry = entries[index];
257
+ if (entry === undefined || entry.kind !== 'proof.assessed')
258
+ continue;
259
+ return entry.overall_status !== 'proven' || entry.close_allowed !== true;
260
+ }
261
+ return false;
262
+ }
263
+ // The default evidence floor the stop-judge disposes a goal-met claim against:
264
+ // the engine honors the claim only when closing complete right now would have no
265
+ // proof gap, the latest proof assessment is not red, AND the honesty ledger holds
266
+ // no open overclaim latch. A flow that declares no close-proof requirement and
267
+ // runs no verification body has no proof gap and no proof assessment, so a
268
+ // met-claim stands on the judge alone there (converge-proof); the teeth come from
269
+ // flows that declare proof, run a real verification body, or leave an open latch.
270
+ // While a body step's overclaim is unresolved — or the current iteration's verify
271
+ // is red — the judge cannot clean-stop the loop, so it re-enters (or exhausts to
272
+ // needs-attention). The close path's finalize chokepoint is the matching backstop
273
+ // should a clean stop ever be reached with a latch still open.
274
+ function defaultUntilEvidenceFloor(context) {
275
+ if (context.honestyLedger?.hasOpenLatches() === true)
276
+ return false;
277
+ if (latestProofContradictsClose(context))
278
+ return false;
279
+ return completeCloseProofGap(context) === undefined;
280
+ }
281
+ function resolveManifestHash(flow, options) {
282
+ if (options.manifestBytes === undefined) {
283
+ return options.manifestHash ?? defaultManifestHash(flow);
284
+ }
285
+ const computed = computeManifestHash(options.manifestBytes);
286
+ if (options.manifestHash !== undefined && options.manifestHash !== computed) {
287
+ throw new Error('manifest bytes hash differs from run manifest_hash');
288
+ }
289
+ return computed;
290
+ }
291
+ async function executeExecutableFlowOutcomeUnsafe(flow, options) {
292
+ assertExecutableFlow(flow);
293
+ const isResume = options.resumeCheckpoint !== undefined;
294
+ // Slice 1 does not support resuming an until-loop run. completedStepCountsFromTrace
295
+ // rebuilds counts from the slice corridor only, and until-body steps persist no
296
+ // per-iteration index in the trace, so a resumed until run would silently restart
297
+ // from iteration 0 and re-spend a full iteration budget. Fence it loudly here,
298
+ // before the run boundary opens; crash-durable until-loop resume lands with the
299
+ // honesty-ledger slice. resolveEngineFlags(flow) returns flow.engineFlags, so
300
+ // reading the flag directly here is equivalent to the later engineFlags binding.
301
+ if (isResume && flow.engineFlags?.iteratesUntilCondition !== undefined) {
302
+ throw new Error(`flow '${flow.id}' cannot resume an until-loop run: per-iteration counts are not yet persisted, so the loop would restart from iteration 0. Until-loop resume is deferred to the honesty-ledger slice.`);
303
+ }
304
+ const runId = options.runId ?? randomUUID();
305
+ const boundary = await openRunBoundary({
306
+ runDir: options.runDir,
307
+ isResume,
308
+ runId,
309
+ flow,
310
+ ...(options.now === undefined ? {} : { now: options.now }),
311
+ ...(options.progress === undefined ? {} : { progress: options.progress }),
312
+ ...(options.progressSurface === undefined ? {} : { progressSurface: options.progressSurface }),
313
+ });
314
+ const runDir = boundary.runDirectory.path;
315
+ const { existingTrace, files, trace } = boundary;
316
+ const packageIndex = buildRuntimePackageIndex(flow);
317
+ // First-class composition (M4): record which catalog-sourced bindings this run
318
+ // got from its manifest. The by-id package is gone, so the manifest is the sole
319
+ // source; `manifestBackedBindings` reports what the flow declares and the
320
+ // reduced set stays empty until composed flows bring a needs model (M9).
321
+ const bindingLegibility = resolveBindingLegibility(flow);
322
+ // First-class composition (M4): engine-visible flags and the edit-file surface
323
+ // table read off the runtime flow's manifest. A composed flow resolves both the
324
+ // same way a built-in does, with no by-id package in the path.
325
+ const engineFlags = resolveEngineFlags(flow);
326
+ const editFileSurfaceSources = surfaceSourcesFromDeclarations(flow.reportFileSurfaces ?? {});
327
+ // The honesty ledger backs the judge-gated until loop only. A stop-judge loop
328
+ // can recover from a body-step overclaim by latching it and re-entering rather
329
+ // than aborting; the ledger holds those open latches for the evidence floor
330
+ // and the close-path finalize chokepoint. Created (and given a durable
331
+ // run-folder mirror) only when an until flag with a stopJudge is present; the
332
+ // slice-1 count-driven loop and every non-until run carry no ledger and are
333
+ // unaffected. It stays empty until a body step actually overclaims, so a run
334
+ // that never overclaims writes no ledger file.
335
+ const honestyLedger = engineFlags?.iteratesUntilCondition?.stopJudge !== undefined
336
+ ? new HonestyLedger({ path: join(runDir, 'honesty-ledger.json') })
337
+ : undefined;
338
+ // The oracle-command pin shares the honesty ledger's gate: it only matters
339
+ // for a stop-judge until-loop, where a verification step re-reads a
340
+ // worker-editable command list each wave. It snapshots the resolved commands
341
+ // at first resolution and serves them on later waves, refusing a drifted
342
+ // package-script body. In-memory only (no durable mirror): pins are meaningful
343
+ // only within a single live loop, and until-loop resume is already deferred.
344
+ const oracleCommandPins = honestyLedger === undefined ? undefined : createOracleCommandPinChannel();
345
+ const context = {
346
+ flow,
347
+ packageIndex,
348
+ runId,
349
+ runDir,
350
+ goal: options.goal ?? `Run ${flow.id}`,
351
+ ...(options.why === undefined || options.why.length === 0 ? {} : { why: options.why }),
352
+ manifestHash: resolveManifestHash(flow, options),
353
+ ...(options.workContractRef === undefined ? {} : { workContractRef: options.workContractRef }),
354
+ ...(options.recoveryRouteBindings === undefined
355
+ ? {}
356
+ : { recoveryRouteBindings: options.recoveryRouteBindings }),
357
+ ...(options.reuseChildrenFrom === undefined
358
+ ? {}
359
+ : { reuseChildrenFrom: options.reuseChildrenFrom }),
360
+ ...(options.entryModeName === undefined ? {} : { entryModeName: options.entryModeName }),
361
+ ...(options.depth === undefined ? {} : { depth: options.depth }),
362
+ ...(options.axes === undefined ? {} : { axes: options.axes }),
363
+ ...(options.unattended === undefined ? {} : { unattended: options.unattended }),
364
+ // Seed the recursion bound. A top-level run starts at depth 0 with itself as
365
+ // the only ancestor; a child run inherits the forwarded depth and chain. The
366
+ // sub-run executor and the fanout sub-run branch read these to enforce the
367
+ // cap and the cycle guard. Two invariants protect this bound:
368
+ // - The ancestor chain is a Set, forwarded in-process by reference. It must
369
+ // never cross a JSON or disk boundary (a Set stringifies to `{}` and the
370
+ // guard would go dark). It is intentionally absent from every report and
371
+ // trace schema; keep it that way.
372
+ // - Any path that spawns a child run must thread these through, or the
373
+ // child re-seeds to depth 0 and the bound stops accumulating. Recovery
374
+ // attempts and standalone resume deliberately do NOT thread them — each
375
+ // is a fresh top-level run whose own descent is capped independently.
376
+ recursionDepth: options.recursionDepth ?? 0,
377
+ recursionAncestors: options.recursionAncestors ?? new Set([flow.id]),
378
+ now: boundary.clock.now,
379
+ files,
380
+ trace,
381
+ externalFiles: options.externalFiles ?? boundary.externalFiles,
382
+ // Created once for the whole run and shared by every per-step stepContext
383
+ // spread below, so the post-step skill-hook actuator can record an `auto`
384
+ // event's skills and the next relay step picks them up. Empty on runs with
385
+ // no skill_hooks config, so it has no observable effect there.
386
+ skillHookInjections: createSkillHookInjectionChannel(),
387
+ // Run-scoped auto-power resolution, same lifecycle as the injection
388
+ // channel: created once, written at most once by the post-step seam,
389
+ // read by relay planning. Inert when the dial setting is not `auto`.
390
+ powerInference: createPowerInferenceChannel(),
391
+ // One filesystem snapshot of the user skill registry for the whole run,
392
+ // shared by the skill-hook dispatcher and the relay skill loader so they
393
+ // never disagree about which skills resolve (see RunContext.skillRegistry).
394
+ skillRegistry: createUserSkillRegistry(),
395
+ ...(options.childCompiledFlowResolver === undefined
396
+ ? {}
397
+ : { childCompiledFlowResolver: options.childCompiledFlowResolver }),
398
+ ...(options.childRunner === undefined ? {} : { childRunner: options.childRunner }),
399
+ ...(options.childExecutors === undefined ? {} : { childExecutors: options.childExecutors }),
400
+ ...(options.projectRoot === undefined ? {} : { projectRoot: options.projectRoot }),
401
+ ...(options.evidencePolicy === undefined ? {} : { evidencePolicy: options.evidencePolicy }),
402
+ ...(options.worktreeRunner === undefined ? {} : { worktreeRunner: options.worktreeRunner }),
403
+ ...(options.relayConnector === undefined ? {} : { relayConnector: options.relayConnector }),
404
+ ...(options.relayer === undefined ? {} : { relayer: options.relayer }),
405
+ ...(options.hostKind === undefined ? {} : { hostKind: options.hostKind }),
406
+ ...(options.selectionConfigLayers === undefined
407
+ ? {}
408
+ : { selectionConfigLayers: options.selectionConfigLayers }),
409
+ guidanceSelection: {
410
+ bindsExecutionDepthToGuidanceSelection: engineFlags?.bindsExecutionDepthToRelaySelection === true,
411
+ },
412
+ ...(options.policyLayers === undefined ? {} : { policyLayers: options.policyLayers }),
413
+ ...(options.progress === undefined ? {} : { progress: options.progress }),
414
+ ...(options.memoryInputs === undefined ? {} : { memoryInputs: options.memoryInputs }),
415
+ ...(options.historyRecallReport === undefined
416
+ ? {}
417
+ : { historyRecallReport: options.historyRecallReport }),
418
+ ...(options.historyRecallPrecision === undefined
419
+ ? {}
420
+ : { historyRecallPrecision: options.historyRecallPrecision }),
421
+ ...(options.resumeCheckpoint === undefined
422
+ ? {}
423
+ : { resumeCheckpoint: options.resumeCheckpoint }),
424
+ ...(honestyLedger === undefined ? {} : { honestyLedger }),
425
+ ...(oracleCommandPins === undefined ? {} : { oracleCommandPins }),
426
+ };
427
+ // The composed per-repo policy caps how many attempts any one step may take
428
+ // (max_attempts_per_step is a hard upper bound). Compose it once per run and
429
+ // clamp every step's route ceiling to it below. No policy layers means no cap
430
+ // and no behavior change.
431
+ const policyLayersForAttemptCap = context.policyLayers ?? [];
432
+ const policyMaxAttemptsCap = policyLayersForAttemptCap.length === 0
433
+ ? undefined
434
+ : composePolicyHardConstraints(policyLayersForAttemptCap.map((layer) => layer.envelope))
435
+ .limits.max_attempts_per_step;
436
+ const executors = {
437
+ ...createDefaultExecutors({
438
+ ...(options.relayConnector === undefined ? {} : { relayConnector: options.relayConnector }),
439
+ }),
440
+ ...options.executors,
441
+ };
442
+ const steps = new Map(flow.steps.map((step) => [step.id, step]));
443
+ const sliceFlag = engineFlags?.iteratesSliceLoop;
444
+ if (sliceFlag !== undefined) {
445
+ assertNoCheckpointInSliceLoop(flow, sliceFlag);
446
+ }
447
+ const sliceCorridor = new SliceCorridor({
448
+ flag: sliceFlag,
449
+ depth: context.depth,
450
+ readSlices: async () => {
451
+ if (sliceFlag === undefined)
452
+ return [];
453
+ try {
454
+ const raw = await files.readJson(sliceFlag.slicesFrom.report);
455
+ const items = resolveDottedPath(raw, sliceFlag.slicesFrom.itemsPath);
456
+ return Array.isArray(items) ? items : [];
457
+ }
458
+ catch {
459
+ return [];
460
+ }
461
+ },
462
+ });
463
+ const untilFlag = engineFlags?.iteratesUntilCondition;
464
+ if (untilFlag !== undefined && sliceFlag !== undefined) {
465
+ // Both drive a single re-entry counter; a flow opts into at most one loop
466
+ // shape. A nested slice+until loop would need two independent iteration
467
+ // indices, which the completedStepCounts key model does not support.
468
+ throw new Error(`flow '${flow.id}' sets both iteratesSliceLoop and iteratesUntilCondition; a flow may use at most one loop shape`);
469
+ }
470
+ if (untilFlag !== undefined) {
471
+ assertUntilFlagCoherent(flow, steps, untilFlag);
472
+ }
473
+ const untilCorridor = new UntilCorridor({ flag: untilFlag, depth: context.depth });
474
+ // The frozen-eval guard (opt-in, default off). Constructed ONCE here — before
475
+ // the body loop runs its first step — so the baseline fingerprints predate any
476
+ // act edit. Built only when the flow declares a non-empty frozenPaths AND a
477
+ // project root is threaded; absent either, the guard is undefined and the tail
478
+ // seam makes zero fs reads (byte-identical default path). The guard is pure of
479
+ // engine types and resolves every path against this explicit root, never cwd.
480
+ const frozenEvalGuard = untilFlag?.frozenPaths !== undefined &&
481
+ untilFlag.frozenPaths.length > 0 &&
482
+ options.projectRoot !== undefined
483
+ ? new FrozenEvalGuard(options.projectRoot, untilFlag.frozenPaths)
484
+ : undefined;
485
+ // On-demand context-pull delivery is "active" for this run's relays when
486
+ // delivery is opted in AND this run is not a delivery-blind slice corridor.
487
+ // Inside a corridor (deep depth) the delivery seam skips the head step
488
+ // (delivery-in-corridor stays deferred), so a relay there could not recover a
489
+ // withheld slice — a compose writer must NOT thin its envelope in that case.
490
+ // Both operands are run-wide constants, so this is too: a stable signal a
491
+ // compose writer keys its envelope thickness on. False on every run with
492
+ // delivery off (the default), keeping those runs byte-identical.
493
+ const contextDeliveryActive = options.contextDelivery !== undefined && !sliceCorridor.isActive();
494
+ // completedStepCountsFromTrace rebuilds counts for the slice corridor only.
495
+ // Until-body steps persist no per-iteration index in the trace, so their
496
+ // counts cannot be rebuilt here; that is why an until-loop resume is fenced
497
+ // off up front (see the isResume guard near the top of this function) and
498
+ // lands properly with the honesty-ledger slice.
499
+ const completedStepCounts = isResume
500
+ ? completedStepCountsFromTrace(existingTrace, sliceCorridor)
501
+ : new Map();
502
+ // Re-seed skill-hook injections that the prior process recorded, so a resumed
503
+ // implementer step does not silently run without skills an earlier (and now
504
+ // un-re-executed) step injected. No-op on a fresh run (empty existingTrace).
505
+ if (isResume) {
506
+ seedSkillHookInjectionsFromTrace(existingTrace, context.skillHookInjections);
507
+ // Same for the auto-power resolution: a resumed run continues at the tier
508
+ // the prior process recorded instead of re-inferring (or worse, falling
509
+ // back to medium after the researcher step was checkpointed past).
510
+ seedPowerInferenceFromTrace(existingTrace, context.powerInference);
511
+ // A live equipment reshape (Step 2) honored before the checkpoint is the
512
+ // third thing the prior process recorded that a resumed run must re-apply —
513
+ // but unlike the two channels above, it lives in the FLOW, not a runtime
514
+ // channel, so it is reseeded one level up where the flow is rebuilt:
515
+ // checkpoint-resume.ts replays it via seedEquipmentReshapeFromTrace before
516
+ // building the executable this runner walks. By the time we are here the flow
517
+ // already carries the injected equipment, so there is nothing to reseed at
518
+ // this seam. (The reshape is additive — no step id, route, or boundary
519
+ // changes — which is why it can ride on the rebuilt flow without a structural
520
+ // splice; that remains Step 3, out of scope.)
521
+ }
522
+ const defaultMaxSteps = Math.max(flow.steps.length * 4, 8);
523
+ // A slice or until loop runs the body once per iteration, each step with its
524
+ // own retry budget, so the flat step counter needs headroom the single-pass
525
+ // default lacks. The two loop shapes are mutually exclusive, so at most one
526
+ // term is non-zero; a default run adds nothing and keeps defaultMaxSteps.
527
+ // maxSteps is only the runaway backstop here — the until loop's real bound is
528
+ // maxIterations (enforced by the corridor), so generous headroom is harmless.
529
+ const maxSteps = options.maxSteps ??
530
+ defaultMaxSteps +
531
+ (sliceFlag !== undefined && sliceCorridor.isActive() ? sliceFlag.maxSlices * 6 : 0) +
532
+ (untilFlag !== undefined && untilCorridor.isActive()
533
+ ? untilFlag.maxIterations * untilFlag.bodySteps.length * 4
534
+ : 0);
535
+ const bootstrapRecordedAt = context.now().toISOString();
536
+ if (!isResume && options.manifestBytes !== undefined) {
537
+ await writeRuntimeManifestSnapshot({
538
+ runDir,
539
+ runId,
540
+ flowId: flow.id,
541
+ capturedAt: bootstrapRecordedAt,
542
+ bytes: options.manifestBytes,
543
+ });
544
+ }
545
+ if (!isResume) {
546
+ await trace.append({
547
+ run_id: runId,
548
+ kind: 'run.bootstrapped',
549
+ recorded_at: bootstrapRecordedAt,
550
+ flow_id: flow.id,
551
+ goal: context.goal,
552
+ manifest_hash: context.manifestHash,
553
+ depth: context.depth ?? 'medium',
554
+ change_kind: bootstrapChangeKind({
555
+ flow,
556
+ ...(context.entryModeName === undefined ? {} : { entryModeName: context.entryModeName }),
557
+ }),
558
+ // Empty for every built-in (the manifest is the sole authority post-M4);
559
+ // omitted entirely when empty so a run that reduced nothing makes no claim.
560
+ // A composed flow with a needs model (M9) can populate it again.
561
+ ...(bindingLegibility.reducedBindings.length === 0
562
+ ? {}
563
+ : { reduced_bindings: bindingLegibility.reducedBindings }),
564
+ });
565
+ await appendFlowSelectionGuidance(context);
566
+ if (options.historyRecallReport !== undefined) {
567
+ await context.files.writeJson('reports/history/recall.json', options.historyRecallReport);
568
+ }
569
+ // Slice 3: the earned-precision audit sidecar mirrors the recall report on the
570
+ // same runtime write path, so file ownership is not split between CLI and
571
+ // runtime (circuit.ts only threads the data in; the runtime writes it).
572
+ if (options.historyRecallPrecision !== undefined) {
573
+ await context.files.writeJson('reports/history/recall-precision.json', options.historyRecallPrecision);
574
+ }
575
+ }
576
+ let currentStepId = options.resumeCheckpoint?.stepId ?? flow.entry;
577
+ let incomingRouteTaken;
578
+ // Slice 7: tracks whether the throwaway containment branch has been created
579
+ // yet. Lazily begun on the first iteration commit so the branch roots at the
580
+ // pre-loop HEAD. Inert unless the flag and an injected runner are both present.
581
+ let commitContainmentBegun = false;
582
+ // Slice 7 helper: contain one completed iteration as a single commit on the
583
+ // throwaway branch. Begun lazily on the first call so the branch roots at the
584
+ // pre-loop HEAD. Inert (zero git calls) unless the flag AND an injected runner
585
+ // are both present, so the default path stays byte-identical. Called from the
586
+ // tail seam for iterations that converge or re-enter cleanly, AND from the
587
+ // abort-intercept exits so an iteration that ends by retry-exhaustion is
588
+ // contained too — the branch history stays one-to-one with iterations and a
589
+ // stopped run still contains its final pass.
590
+ const containIteration = async (iterationIndex, message) => {
591
+ if (untilFlag?.iterationCommitContainment === undefined ||
592
+ options.commitContainmentRunner === undefined) {
593
+ return;
594
+ }
595
+ if (!commitContainmentBegun) {
596
+ await options.commitContainmentRunner.begin({
597
+ branchName: `${untilFlag.iterationCommitContainment.branchPrefix}-${runId}`,
598
+ });
599
+ commitContainmentBegun = true;
600
+ }
601
+ await options.commitContainmentRunner.commitIteration({ iterationIndex, message });
602
+ };
603
+ const recoveryRouteBindings = options.recoveryRouteBindings ?? (options.workContractRef === undefined ? undefined : []);
604
+ const corridor = new RecoveryCorridor({
605
+ steps,
606
+ bindings: recoveryRouteBindings,
607
+ routeHasRecoveryMechanics: ({ step, route }) => isRecoveryRouteForMechanics({ bindings: recoveryRouteBindings, step, route }),
608
+ latestStepReportOrRelayRef: ({ stepId, attempt }) => latestStepReportOrRelayRef({ context, stepId, attempt }),
609
+ });
610
+ // Reseed the recovery-corridor's structural identity from the durable trace,
611
+ // mirroring the skill-hook / power-inference reseeds above. Inert today: the
612
+ // only resume entrypoint is a checkpoint boundary, which is never inside an
613
+ // open corridor, so `existingTrace` replays to no active corridor. This is
614
+ // plumbing ahead of a Tier-2 cursor that resumes at an arbitrary
615
+ // step.completed; see docs/ideas/durability-tier2-cursor-spec.md (the
616
+ // executor-outcome payload — reason / acceptance feedback — is NOT in the
617
+ // trace and is the spec line for that cursor). No-op on a fresh run.
618
+ if (isResume) {
619
+ corridor.seedFromTrace(existingTrace);
620
+ }
621
+ // Step 2 — the live equipment reshape. A confirmed runtime equipment discovery
622
+ // can re-equip the remaining relay steps mid-run; when that happens the active
623
+ // flow, its package index, and the steps map are swapped for the re-validated
624
+ // executable tail the reshaper returns. These start as the loaded flow and only
625
+ // change on an honored reshape, so a run that never reshapes is byte-identical
626
+ // to before. The reshaper (when present) owns the compiled form and the per-run
627
+ // bound; absent it, the whole reshape is inert.
628
+ let activeFlow = flow;
629
+ let activePackageIndex = packageIndex;
630
+ // Shared resolve-and-record for the typed-lookup channel. Both context-pull
631
+ // seams use it, so a recorded `run.context-pull` entry is identical whether the
632
+ // run only records (delivery off) or goes on to deliver (delivery on). For each
633
+ // query it materializes the named parent's typed report, resolves the one named
634
+ // slice through a fresh per-step puller (which owns the budget and the
635
+ // everything-refusal), records the answer-or-finding, and returns the answered
636
+ // slices for the caller to fold in. A fresh puller per call keeps the budget
637
+ // per-step. Returns [] when no puller is configured.
638
+ const resolveAndRecordContextPull = async (input) => {
639
+ const factory = options.contextPuller;
640
+ if (factory === undefined)
641
+ return [];
642
+ const contextPuller = factory();
643
+ // Materialize the typed surface: parent step id -> that parent's report JSON,
644
+ // read once each. A parent without a readable report is simply absent — the
645
+ // channel parks the query as a finding. The query names a parent that already
646
+ // RAN, so its report is settled; we never read the running step.
647
+ const surface = new Map();
648
+ for (const query of input.request.queries) {
649
+ if (surface.has(query.from_step))
650
+ continue;
651
+ const reportPath = steps.get(query.from_step)?.writes?.report?.path;
652
+ if (reportPath === undefined)
653
+ continue;
654
+ try {
655
+ surface.set(query.from_step, await context.files.readJson(reportPath));
656
+ }
657
+ catch {
658
+ // Unreadable report -> parent off the surface -> the query parks.
659
+ }
660
+ }
661
+ const answered = [];
662
+ for (const query of input.request.queries) {
663
+ const outcome = contextPuller({ fromStepId: input.stepId, query, surface });
664
+ await trace.append({
665
+ run_id: runId,
666
+ kind: 'run.context-pull',
667
+ step_id: input.stepId,
668
+ from_step: query.from_step,
669
+ field_path: query.field_path,
670
+ answered: outcome.answered,
671
+ ...(outcome.answered ? { bytes: outcome.bytes } : {}),
672
+ reason: outcome.answered
673
+ ? `pulled ${outcome.source} (${outcome.bytes} bytes)`
674
+ : outcome.finding,
675
+ });
676
+ if (outcome.answered) {
677
+ answered.push({ source: outcome.source, value: outcome.value, bytes: outcome.bytes });
678
+ }
679
+ }
680
+ return answered;
681
+ };
682
+ for (let index = 0; index < maxSteps; index += 1) {
683
+ const step = steps.get(currentStepId);
684
+ if (step === undefined) {
685
+ return await closeRun(context, 'aborted', undefined, `route target '${currentStepId}' is not a known step id`);
686
+ }
687
+ // Slice loop: load the slice list when first reaching the loop head, then
688
+ // capture this step's slice index (the live index, pre-advance) so its
689
+ // trace, attempt, and completion count are all keyed to the same slice.
690
+ if (sliceCorridor.isActive() && sliceFlag !== undefined && step.id === sliceFlag.headStep) {
691
+ await sliceCorridor.ensureInitialized();
692
+ }
693
+ const isLoopBodyStep = sliceCorridor.isLoopBodyStep(step.id);
694
+ const stepSliceIndex = sliceCorridor.currentSliceIndex();
695
+ // The until loop scopes its own body steps by iteration index, parallel to
696
+ // the slice loop's slice-index scoping. The two are mutually exclusive, so
697
+ // at most one corridor claims this step; whichever does owns its count key.
698
+ const isUntilBodyStep = untilCorridor.isLoopBodyStep(step.id);
699
+ const stepIterationIndex = untilCorridor.currentIterationIndex();
700
+ const stepCountKey = isUntilBodyStep
701
+ ? untilCorridor.countKey(step.id, stepIterationIndex)
702
+ : sliceCorridor.countKey(step.id, stepSliceIndex);
703
+ // The loop-body iteration scope shared by trace stamping (slice_index) and
704
+ // recovery-evidence filtering (sliceIndex): the slice index under a slice
705
+ // loop, the iteration index under an until loop. Both reset a step's attempt
706
+ // counter per iteration, so (step_id, attempt) collides across iterations and
707
+ // the recovery resolver would otherwise attribute an earlier iteration's
708
+ // failed check to a later iteration's clean attempt. activeSlice METADATA
709
+ // stays slice-only below (until loops have no precomputed slice objects), so
710
+ // an until body step carries the index without a slice section in its prompt.
711
+ const loopBodyIndex = isLoopBodyStep
712
+ ? stepSliceIndex
713
+ : isUntilBodyStep
714
+ ? stepIterationIndex
715
+ : undefined;
716
+ const isResumedCheckpoint = options.resumeCheckpoint?.stepId === currentStepId;
717
+ const completedCount = completedStepCounts.get(stepCountKey) ?? 0;
718
+ const incomingIsActiveRecovery = corridor.isActiveRoute(incomingRouteTaken);
719
+ const maxAttempts = maxAttemptsForRoute(step, incomingIsActiveRecovery, policyMaxAttemptsCap);
720
+ const isRecoveryOriginReentry = corridor.isReturnToOrigin({
721
+ stepId: step.id,
722
+ route: incomingRouteTaken,
723
+ });
724
+ // `attempt` is the relay attempt number for this step+slice this iteration.
725
+ // It is `let`, not `const`, because a kept pull-then-retry delivery (below)
726
+ // advances it to the re-run's attempt so the post-step evidence lookups bind
727
+ // to the kept attempt, not the discarded starved one.
728
+ let attempt = isResumedCheckpoint ? options.resumeCheckpoint.attempt : completedCount + 1;
729
+ // A delivery re-run consumes one extra attempt slot (it runs the step a second
730
+ // time at attempt+1). When that happens this records the extra so the step's
731
+ // completion count advances past BOTH attempts and a later recovery re-entry
732
+ // never reuses the re-run's attempt number. Stays 0 on every run without a
733
+ // delivery re-run, so the completion count is unchanged from today.
734
+ let deliveryConsumedAttempts = 0;
735
+ if (!isResumedCheckpoint &&
736
+ isCompletedStepReentryAbort({
737
+ completedCount,
738
+ isRecoveryReturnToOrigin: isRecoveryOriginReentry,
739
+ routeHasRecoveryMechanics: incomingIsActiveRecovery,
740
+ maxAttempts,
741
+ })) {
742
+ const recoverySuffix = corridor.lastReasonSuffix();
743
+ const reason = incomingRouteTaken === undefined
744
+ ? `route cycle detected at step '${step.id}'; aborting before re-entering an already completed step`
745
+ : `route '${incomingRouteTaken}' for step '${step.id}' exhausted max_attempts=${maxAttempts}${recoverySuffix}`;
746
+ // Until loop, in-step retry exhaustion (slice 3). A judge-gated body step
747
+ // that used up its in-step retries does NOT abort the whole run. Instead
748
+ // the engine latches the unresolved overclaim and either re-enters a fresh
749
+ // iteration (the loop's own retry budget is maxIterations, not the step's
750
+ // max_attempts) or, at the iteration cap, exits needs-attention. The open
751
+ // latch keeps the run from ever closing complete while the overclaim is
752
+ // unresolved (the evidence floor blocks a clean stop; the close-path
753
+ // finalize chokepoint is the backstop). Only the max_attempts form is
754
+ // intercepted: an unsanctioned cycle (incomingRouteTaken === undefined)
755
+ // still aborts via the unchanged cycle guard. A slice-1 count loop has no
756
+ // stopJudge and no ledger, so it is unaffected.
757
+ if (untilCorridor.isActive() &&
758
+ untilFlag?.stopJudge !== undefined &&
759
+ isUntilBodyStep &&
760
+ incomingRouteTaken !== undefined) {
761
+ context.honestyLedger?.latchOverclaim({
762
+ stepId: step.id,
763
+ iterationIndex: stepIterationIndex,
764
+ reason,
765
+ });
766
+ // Slice 7: this iteration ended here (it exhausted its in-step retries and
767
+ // never reaches the tail), so contain its partial work as a commit now,
768
+ // before re-entering or stopping. Without this the next iteration's
769
+ // `git add -A` would fold these edits into the wrong commit, and an
770
+ // all-exhausting loop would never begin the branch at all. Inert unless
771
+ // commit containment is configured.
772
+ await containIteration(stepIterationIndex, 'exhausted in-step retries');
773
+ if (untilCorridor.canReenter()) {
774
+ // Clear the recovery corridor for this exhausted origin so the fresh
775
+ // iteration starts clean rather than mid-recovery. The fresh
776
+ // iteration's body steps carry count-0 iteration-scoped keys, so the
777
+ // re-entry is not a cycle. The durable latch lives in the ledger file;
778
+ // the carried-log correction note is slice 4 (carried notes).
779
+ corridor.clearIfExitingOrigin({ stepId: step.id, routeHasRecoveryMechanics: false });
780
+ untilCorridor.advance();
781
+ currentStepId = untilFlag.headStep;
782
+ incomingRouteTaken = untilFlag.reenterRoute;
783
+ continue;
784
+ }
785
+ // Iteration cap reached with the overclaim still open: an honest
786
+ // non-completion. Exit `stopped` (operator-visible "needs attention"),
787
+ // never complete — exhaustion can never read as success.
788
+ const exhaustedReason = `until loop exhausted with an unresolved overclaim on '${step.id}': ${reason}`;
789
+ await trace.append({
790
+ run_id: runId,
791
+ kind: 'step.aborted',
792
+ step_id: step.id,
793
+ attempt,
794
+ reason: exhaustedReason,
795
+ });
796
+ return await closeRun(context, 'stopped', undefined, exhaustedReason);
797
+ }
798
+ await trace.append({
799
+ run_id: runId,
800
+ kind: 'step.aborted',
801
+ step_id: step.id,
802
+ attempt,
803
+ reason,
804
+ });
805
+ return await closeRun(context, 'aborted', undefined, reason);
806
+ }
807
+ if (!isResumedCheckpoint) {
808
+ await trace.append({
809
+ run_id: runId,
810
+ kind: 'step.entered',
811
+ step_id: step.id,
812
+ attempt,
813
+ ...(loopBodyIndex === undefined ? {} : { slice_index: loopBodyIndex }),
814
+ });
815
+ }
816
+ // Mark where this step's trace begins, so skill-hook dispatch can scan only
817
+ // the entries this step appends (its check.evaluated / proof.assessed signals).
818
+ // A kept pull-then-retry delivery advances this past the discarded starved
819
+ // attempt, so the post-step seams read the re-run's signals, not the first
820
+ // attempt's (see the delivery seam below).
821
+ let traceLengthBeforeStep = trace.getAll().length;
822
+ let route;
823
+ let details;
824
+ try {
825
+ const acceptanceRetryFeedback = corridor.acceptanceFeedbackForReentry({
826
+ stepId: step.id,
827
+ incomingRoute: incomingRouteTaken,
828
+ });
829
+ const activeSlice = isLoopBodyStep ? sliceCorridor.currentSlice() : undefined;
830
+ const stepContext = {
831
+ ...context,
832
+ // The active flow and its package index may have been swapped by a prior
833
+ // step's honored equipment reshape; override the run-scoped defaults so a
834
+ // re-equipped step's relay reads its injected skill slots.
835
+ flow: activeFlow,
836
+ packageIndex: activePackageIndex,
837
+ activeStepAttempt: attempt,
838
+ // Assign only when true, so a default run (and every run at deep depth)
839
+ // leaves the key ABSENT on RunContext — keeping the "absent => fat / full
840
+ // provisioning" contract that RunValue, ComposeBuildContext, and plan.ts
841
+ // document literally true end to end, not present-but-false.
842
+ ...(contextDeliveryActive ? { contextDeliveryActive } : {}),
843
+ ...(acceptanceRetryFeedback === undefined ? {} : { acceptanceRetryFeedback }),
844
+ // The iteration scope feeds executors that stamp slice_index on their
845
+ // check.evaluated entries (relay, verification), so an until body step's
846
+ // failure evidence is filed under its iteration and the recovery resolver
847
+ // can tell iteration N's failed check from iteration N+1's clean attempt.
848
+ ...(loopBodyIndex === undefined ? {} : { activeSliceIndex: loopBodyIndex }),
849
+ ...(activeSlice === undefined ? {} : { activeSlice }),
850
+ ...(isResumedCheckpoint && options.resumeCheckpoint !== undefined
851
+ ? { resumeCheckpoint: options.resumeCheckpoint }
852
+ : {}),
853
+ };
854
+ let outcome = await executors[step.kind](step, stepContext);
855
+ if (isWaitingCheckpointStepOutcome(outcome)) {
856
+ return {
857
+ kind: 'checkpoint_waiting',
858
+ outcome: 'checkpoint_waiting',
859
+ runFolder: runDir,
860
+ runId,
861
+ flowId: flow.id,
862
+ traceEntriesObserved: trace.getAll().length,
863
+ checkpoint: outcome.checkpoint,
864
+ };
865
+ }
866
+ // On-demand context-pull DELIVERY — pull-then-retry. The value half of the
867
+ // typed-lookup channel: when delivery is enabled and this relay surfaced a
868
+ // typed `context_request`, resolve the named slices (recording each as
869
+ // run.context-pull — the same record the resolve-and-record seam writes),
870
+ // fold the answered slices into the step's envelope, and RE-RUN the step
871
+ // ONCE on the enriched context. Bounded: the per-step query budget caps the
872
+ // slices, and the per-run guard caps a step to one delivery. Fail-safe: if
873
+ // the re-run errors or its connector fails before producing a result, the
874
+ // starved result is untouched and we keep the original outcome; otherwise we
875
+ // keep the enriched re-run. Additive: it only adds context, never
876
+ // restructures. It runs here, BEFORE route classification, so exactly one
877
+ // chosen outcome flows through the rest of the pipeline. Inert unless the
878
+ // live path injected `contextDelivery` (default off); when off, the
879
+ // resolve-and-record seam further below runs instead, byte-identical to
880
+ // today. Best-effort: any failure leaves the run on the starved outcome.
881
+ const contextDelivery = options.contextDelivery;
882
+ const deliveryRoute = outcome.route;
883
+ if (contextDelivery !== undefined &&
884
+ options.contextPuller !== undefined &&
885
+ step.kind === 'relay' &&
886
+ step.routes[deliveryRoute] !== undefined &&
887
+ step.routes[deliveryRoute]?.kind !== 'terminal' &&
888
+ !sliceCorridor.isActive()) {
889
+ try {
890
+ const starvedEntries = trace.getAll().slice(traceLengthBeforeStep);
891
+ const starvedCompleted = [...starvedEntries]
892
+ .reverse()
893
+ .find((entry) => entry.kind === 'relay.completed');
894
+ if (starvedCompleted !== undefined) {
895
+ const starvedBody = await context.files.readJson(starvedCompleted.result_path);
896
+ const request = extractContextRequest(starvedBody);
897
+ if (request !== undefined) {
898
+ const delivered = await resolveAndRecordContextPull({
899
+ stepId: step.id,
900
+ request,
901
+ });
902
+ if (delivered.length > 0 && contextDelivery.claim(step.id)) {
903
+ const traceLengthBeforeRetry = trace.getAll().length;
904
+ // The re-run is a distinct attempt (attempt + 1), so its relay
905
+ // entries — including a relay.failed if its connector fails — are
906
+ // keyed to their own attempt and never contaminate the starved
907
+ // attempt's recovery evidence on a fall-back. On keep we advance
908
+ // `attempt` to this number so the post-step evidence lookups bind to
909
+ // the kept re-run instead.
910
+ const retryAttempt = attempt + 1;
911
+ let retryEvaluation;
912
+ let retried = false;
913
+ try {
914
+ const enrichedContext = {
915
+ ...stepContext,
916
+ activeStepAttempt: retryAttempt,
917
+ deliveredContextSlices: delivered,
918
+ };
919
+ const retryOutcome = await executors[step.kind](step, enrichedContext);
920
+ retried = true;
921
+ if (isWaitingCheckpointStepOutcome(retryOutcome)) {
922
+ // A relay never parks; treat an impossible checkpoint here as a
923
+ // non-result and keep the starved outcome.
924
+ retryEvaluation = { kind: 'errored' };
925
+ }
926
+ else {
927
+ // The re-run writes to the same fixed result path. If the worker
928
+ // connector failed it wrote nothing (the engine recorded a
929
+ // relay.failed), so the starved result is intact and we keep it;
930
+ // otherwise the enriched result is persisted and we keep it.
931
+ const retryEntries = trace.getAll().slice(traceLengthBeforeRetry);
932
+ const connectorFailed = retryEntries.some((entry) => entry.kind === 'relay.failed');
933
+ retryEvaluation = connectorFailed
934
+ ? { kind: 'connector_failed' }
935
+ : { kind: 'produced' };
936
+ if (retryEvaluation.kind === 'produced') {
937
+ outcome = retryOutcome;
938
+ }
939
+ }
940
+ }
941
+ catch {
942
+ retried = true;
943
+ retryEvaluation = { kind: 'errored' };
944
+ }
945
+ const decision = decideContextDeliveryOutcome(retryEvaluation);
946
+ await trace.append({
947
+ run_id: runId,
948
+ kind: 'run.context-delivery',
949
+ step_id: step.id,
950
+ delivered_slices: delivered.length,
951
+ delivered_bytes: delivered.reduce((sum, slice) => sum + slice.bytes, 0),
952
+ retried,
953
+ kept: decision.keep,
954
+ reason: decision.reason,
955
+ });
956
+ if (retried) {
957
+ // The re-run consumed attempt `retryAttempt`. Record the extra so
958
+ // the step's completion count advances past it and no later
959
+ // recovery re-entry of this step reuses that attempt number,
960
+ // whether we kept the re-run or fell back.
961
+ deliveryConsumedAttempts = retryAttempt - attempt;
962
+ }
963
+ if (decision.keep === 'retry') {
964
+ // The kept outcome is the re-run: bind the rest of the pipeline to
965
+ // its attempt and its trace window. Advancing `attempt` makes the
966
+ // recovery-evidence lookups read the re-run's signals; advancing
967
+ // the trace boundary makes skill-hook dispatch, power inference,
968
+ // reshape, and the close pipeline scan the re-run's entries, not
969
+ // the discarded starved attempt's.
970
+ attempt = retryAttempt;
971
+ traceLengthBeforeStep = traceLengthBeforeRetry;
972
+ }
973
+ // Known bound: if the kept enriched body ITSELF surfaces a new
974
+ // context_request (the worker, now richer, asks for yet more),
975
+ // that second request is neither delivered (the per-step guard is
976
+ // spent — one delivery per step) nor recorded. With delivery off
977
+ // the late resolve-and-record seam would record it; with delivery
978
+ // on that seam is skipped, so this is a minor legibility
979
+ // asymmetry on an uncommon path (the design intent is that one
980
+ // delivery satisfies the need). Honesty, correctness, and
981
+ // durability are unaffected: the kept body is the real result. A
982
+ // cheap fix exists (a record-only resolveAndRecordContextPull on
983
+ // the kept body), deliberately deferred to keep this
984
+ // safety-critical seam minimal.
985
+ }
986
+ }
987
+ }
988
+ }
989
+ catch (deliveryError) {
990
+ // Fail-safe by design: any delivery failure leaves the run on the
991
+ // starved outcome, exactly as if delivery were off. But not silent —
992
+ // without a record, a broken delivery seam reads exactly like a
993
+ // worker that never asked for context. Record the marker (the
994
+ // sibling of run.power-inference-error below); if recording itself
995
+ // fails, stay silent rather than break the run.
996
+ try {
997
+ await trace.append({
998
+ run_id: runId,
999
+ kind: 'run.context-delivery-error',
1000
+ step_id: step.id,
1001
+ message: `context delivery failed at step '${step.id}'; the run continued on the ` +
1002
+ `starved result. Cause: ${deliveryError instanceof Error ? deliveryError.message : String(deliveryError)}`,
1003
+ });
1004
+ }
1005
+ catch {
1006
+ // Last-resort: never let observability break the run.
1007
+ }
1008
+ }
1009
+ }
1010
+ route = outcome.route;
1011
+ details = outcome.details ?? {};
1012
+ }
1013
+ catch (error) {
1014
+ const message = error.message;
1015
+ const reason = isProofPlanBlockedError(error)
1016
+ ? message
1017
+ : `step '${step.id}' handler threw: ${message}`;
1018
+ // Until loop, thrown body-step failure. The slice-3 abort-intercept above
1019
+ // only catches RE-ENTRY exhaustion (max_attempts on an already completed
1020
+ // step); a body step whose handler THROWS — the judge's own verdict check
1021
+ // failing is the live case (relay.ts throws when no recovery route is
1022
+ // bound for a failed_check) — lands here instead, and without this seam
1023
+ // the whole run aborts on iteration 1 of N. Same honest policy as the
1024
+ // slice-3 intercept: latch the unresolved overclaim (the floor blocks a
1025
+ // clean stop while it is open), contain the iteration's partial work, and
1026
+ // either re-enter a fresh iteration (the loop's retry budget is
1027
+ // maxIterations) or, at the cap, exit `stopped` — never complete, and
1028
+ // never an opaque mid-loop abort. The executor already traced the failed
1029
+ // check before throwing, so the failure stays legible per-iteration.
1030
+ if (untilCorridor.isActive() &&
1031
+ untilFlag?.stopJudge !== undefined &&
1032
+ untilCorridor.isLoopBodyStep(step.id)) {
1033
+ context.honestyLedger?.latchOverclaim({
1034
+ stepId: step.id,
1035
+ iterationIndex: stepIterationIndex,
1036
+ reason,
1037
+ });
1038
+ await containIteration(stepIterationIndex, 'body step failed');
1039
+ if (untilCorridor.canReenter()) {
1040
+ corridor.clearIfExitingOrigin({ stepId: step.id, routeHasRecoveryMechanics: false });
1041
+ untilCorridor.advance();
1042
+ currentStepId = untilFlag.headStep;
1043
+ incomingRouteTaken = untilFlag.reenterRoute;
1044
+ continue;
1045
+ }
1046
+ const exhaustedReason = `until loop exhausted with an unresolved overclaim on '${step.id}': ${reason}`;
1047
+ await trace.append({
1048
+ run_id: runId,
1049
+ kind: 'step.aborted',
1050
+ step_id: step.id,
1051
+ attempt,
1052
+ reason: exhaustedReason,
1053
+ });
1054
+ return await closeRun(context, 'stopped', undefined, exhaustedReason);
1055
+ }
1056
+ await trace.append({
1057
+ run_id: runId,
1058
+ kind: 'step.aborted',
1059
+ step_id: step.id,
1060
+ attempt,
1061
+ reason: message,
1062
+ });
1063
+ return await closeRun(context, 'aborted', undefined, reason);
1064
+ }
1065
+ // Slice loop: when the tail step passes its forward route and more slices
1066
+ // remain, redirect to the loop head via the declared advance route instead
1067
+ // of proceeding past the loop. advance() bumps the live slice index so the
1068
+ // re-entered head step is keyed to (and budgeted for) the next slice, while
1069
+ // this completing step keeps its captured stepSliceIndex below.
1070
+ if (sliceCorridor.isActive() && sliceFlag !== undefined && step.id === sliceFlag.tailStep) {
1071
+ const forwardTarget = step.routes[route];
1072
+ const forwardStepId = forwardTarget?.kind === 'step' ? forwardTarget.stepId : undefined;
1073
+ if (sliceCorridor.shouldAdvance({ stepId: step.id, targetStepId: forwardStepId })) {
1074
+ route = sliceFlag.advanceRoute;
1075
+ sliceCorridor.advance();
1076
+ }
1077
+ }
1078
+ // Until loop: when the tail step takes its forward (non-re-enter) route and
1079
+ // the iteration cap has not been reached, redirect to the loop head via the
1080
+ // declared re-enter route instead of letting the forward route exit the
1081
+ // loop. advance() bumps the live iteration index so the re-entered head step
1082
+ // is keyed to (and budgeted for) the next iteration, while this completing
1083
+ // step keeps its captured stepIterationIndex. Unlike the slice loop the
1084
+ // forward route may be terminal (the body's natural end is to exit), so this
1085
+ // does not inspect the target — any non-re-enter route is a forward exit.
1086
+ if (untilCorridor.isActive() && untilFlag !== undefined && step.id === untilFlag.tailStep) {
1087
+ if (untilFlag.stopJudge !== undefined) {
1088
+ // Slice 2: the tail is a stop-judge. Read its goal-met boolean (plus the
1089
+ // slice-4 lesson and slice-6 progress marker, in one snapshot) and dispose
1090
+ // the boolean against the evidence floor; never read the goal text here.
1091
+ // The floor is consulted only on a met-claim (the sole case it can change
1092
+ // the outcome), so a not-done iteration costs no floor read.
1093
+ //
1094
+ // The frozen-eval guard runs first, BEFORE the floor disposes the claim.
1095
+ // If a body iteration changed one of the loop's declared read-only eval
1096
+ // paths, the act gamed the very surface the floor trusts — so we open the
1097
+ // dedicated `frozen-eval-guard` latch. defaultUntilEvidenceFloor returns
1098
+ // false while any latch is open, and nothing ever clears THIS key (the
1099
+ // body's latch-clear seam only clears real step ids), so a tampered run
1100
+ // can re-enter or exhaust but never close complete. Inert (no fs reads)
1101
+ // unless the flow declared frozenPaths and a project root was threaded.
1102
+ if (frozenEvalGuard !== undefined) {
1103
+ const changed = frozenEvalGuard.changedFrozenPaths();
1104
+ if (changed.length > 0) {
1105
+ context.honestyLedger?.latchOverclaim({
1106
+ stepId: 'frozen-eval-guard',
1107
+ iterationIndex: stepIterationIndex,
1108
+ reason: `eval surface modified during iteration ${stepIterationIndex}: ${changed.join(', ')}`,
1109
+ });
1110
+ }
1111
+ }
1112
+ const judgment = await readUntilJudgeReport(context, untilFlag.stopJudge);
1113
+ const evidenceConfirms = judgment.goalProposed &&
1114
+ (options.untilEvidenceFloor ?? defaultUntilEvidenceFloor)(context);
1115
+ let disposition = untilCorridor.disposeIteration({
1116
+ goalProposed: judgment.goalProposed,
1117
+ evidenceConfirms,
1118
+ });
1119
+ // Hoisted out of the re-enter/exhaust block so the experiment-ledger
1120
+ // entry below can read the consecutive no-progress count for EVERY
1121
+ // disposition — it defaults to 0 on a stop-clean pass, which never
1122
+ // touches the slices-4-6 block where the count is computed.
1123
+ let recordedNoProgress = 0;
1124
+ // Slices 4-6 compose only on a loop that is continuing or exhausting, not
1125
+ // on a confirmed clean stop: a goal the evidence backs completes honestly
1126
+ // regardless of budget or progress. A near-budget warning and a first
1127
+ // no-progress nudge are steers for the NEXT pass, so they attach only when
1128
+ // the loop actually re-enters.
1129
+ if (disposition !== 'stop-clean') {
1130
+ // Slice 5: cumulative budget, fail-closed. Evaluated over the whole run
1131
+ // trace (the loop dominates spend). Inert when no cap is set.
1132
+ const budget = evaluateUntilBudget(context.trace.getAll(), {
1133
+ ...(untilFlag.cumulativeUsdCap === undefined
1134
+ ? {}
1135
+ : { usdCap: untilFlag.cumulativeUsdCap }),
1136
+ ...(untilFlag.cumulativeTokenCap === undefined
1137
+ ? {}
1138
+ : { tokenCap: untilFlag.cumulativeTokenCap }),
1139
+ });
1140
+ // Slice 6: record the opaque progress marker and read the consecutive
1141
+ // no-progress count. Inert (count 0) when the flow declares no marker.
1142
+ const noProgressCount = untilFlag.stopJudge.progressPath === undefined
1143
+ ? 0
1144
+ : untilCorridor.recordProgressMarker(judgment.progressMarker);
1145
+ recordedNoProgress = noProgressCount;
1146
+ const ceilingHit = untilFlag.noProgressCeiling !== undefined &&
1147
+ noProgressCount >= untilFlag.noProgressCeiling;
1148
+ // A re-entering pass that is over budget or stalled out is forced to
1149
+ // exhaust instead: stop spending / stop spinning. This routes to the
1150
+ // same non-@complete needs-attention exit, so exhaustion stays honest.
1151
+ if (disposition === 'reenter' && (budget.overCap || ceilingHit)) {
1152
+ disposition = 'needs-attention';
1153
+ }
1154
+ // Slice 4: append this iteration's carried note for the next pass. Only
1155
+ // when still re-entering (an exhausting pass has no next reader). Carries
1156
+ // the judge's lesson plus any soft budget warning or first-stall nudge.
1157
+ if (disposition === 'reenter' && untilFlag.carriedNotes !== undefined) {
1158
+ const steers = [];
1159
+ if (budget.nearCap && budget.reason !== undefined)
1160
+ steers.push(budget.reason);
1161
+ if (noProgressCount === 1) {
1162
+ steers.push('No measurable progress since the last pass. Try a materially different approach.');
1163
+ }
1164
+ if (judgment.lesson !== undefined || steers.length > 0) {
1165
+ await appendCarriedNote({
1166
+ files: context.files,
1167
+ report: untilFlag.carriedNotes.report,
1168
+ note: {
1169
+ iteration: stepIterationIndex,
1170
+ lesson: judgment.lesson ?? '',
1171
+ ...(steers.length === 0 ? {} : { steer: steers.join(' ') }),
1172
+ },
1173
+ ...(untilFlag.carriedNotes.maxEntries === undefined
1174
+ ? {}
1175
+ : { maxEntries: untilFlag.carriedNotes.maxEntries }),
1176
+ });
1177
+ }
1178
+ }
1179
+ }
1180
+ // The experiment-ledger entry: the durable per-iteration record of this
1181
+ // pass's judgment, stamped AFTER the disposition is final (the slices-4-6
1182
+ // block above may flip reenter -> needs-attention) and BEFORE the route
1183
+ // is reassigned below. Stamped only on a judge-gated loop — a count-driven
1184
+ // loop has no judgment and emits nothing, so today's count-loop traces
1185
+ // stay byte-identical. iterationLedgerFromTrace projects these back into
1186
+ // the operator's per-pass ledger. See src/runtime/run/iteration-ledger.ts.
1187
+ await trace.append({
1188
+ run_id: runId,
1189
+ kind: 'run.until-judgment',
1190
+ step_id: step.id,
1191
+ iteration: stepIterationIndex,
1192
+ goal_proposed: judgment.goalProposed,
1193
+ evidence_confirmed: evidenceConfirms,
1194
+ disposition,
1195
+ no_progress_count: recordedNoProgress,
1196
+ open_latch_count: context.honestyLedger?.openLatches().length ?? 0,
1197
+ ...(judgment.lesson === undefined ? {} : { lesson: judgment.lesson }),
1198
+ });
1199
+ if (disposition === 'reenter') {
1200
+ route = untilFlag.reenterRoute;
1201
+ untilCorridor.advance();
1202
+ }
1203
+ else if (disposition === 'needs-attention') {
1204
+ // assertUntilFlagCoherent guarantees a tail-declared needsAttentionRoute
1205
+ // whenever stopJudge is set, so this is defined. Fail loud rather than
1206
+ // silently fall through to the clean-stop forward route (a false-done).
1207
+ const attentionRoute = untilFlag.needsAttentionRoute;
1208
+ if (attentionRoute === undefined) {
1209
+ throw new Error(`until loop on flow '${flow.id}' reached needs-attention with no needsAttentionRoute`);
1210
+ }
1211
+ route = attentionRoute;
1212
+ }
1213
+ // 'stop-clean' leaves the tail's forward route intact (the clean exit).
1214
+ }
1215
+ else if (untilCorridor.shouldReenter({ stepId: step.id, route })) {
1216
+ // Slice 1: count-driven advance, no stop-judge.
1217
+ route = untilFlag.reenterRoute;
1218
+ untilCorridor.advance();
1219
+ }
1220
+ // Slice 7 (opt-in, default off): contain this iteration's work as one
1221
+ // commit on the throwaway branch. Runs for every iteration that reaches the
1222
+ // tail after its route is settled, so the branch history maps one-to-one to
1223
+ // iterations and the operator's branch never moves. Inert unless the flow
1224
+ // declares the flag AND the host injected a runner. Iterations that exhaust
1225
+ // via the abort-intercept never reach here; they are contained at the
1226
+ // intercept instead (see the slice-3 block above).
1227
+ await containIteration(stepIterationIndex, `route ${route}`);
1228
+ }
1229
+ // The honest one-pass floor. Below the loop's activation depth the corridor
1230
+ // is inert (the body runs once, never re-enters) — but a stop-judge tail
1231
+ // still proposed a goal_met, and letting that proposal ride the forward
1232
+ // route to @complete undisposed is exactly the laundering the corridor
1233
+ // exists to prevent (the live surface test caught a bare rubber-stamp
1234
+ // closing @complete at medium depth this way; see
1235
+ // docs/release/proofs/live-runs/LEDGER.md, F13). So the disposition still
1236
+ // runs, once, with the loop's own moves removed: a met claim the evidence
1237
+ // floor confirms keeps the tail's forward route (the clean one-pass exit);
1238
+ // anything else — goal not proposed, or proposed but unconfirmed — exits via
1239
+ // the declared needs-attention route. There is no 'reenter' below the
1240
+ // floor: one pass is the whole budget. The same run.until-judgment entry is
1241
+ // stamped (iteration 0), so a one-pass judgment is as legible in the trace
1242
+ // as a looped one. Byte-identical for every flow without a stop-judge.
1243
+ if (!untilCorridor.isActive() &&
1244
+ untilFlag?.stopJudge !== undefined &&
1245
+ step.id === untilFlag.tailStep) {
1246
+ // Same frozen-eval guard as the active seam: a one-pass body that edited a
1247
+ // declared read-only eval path must not complete on evidence it tampered
1248
+ // with. Inert (no fs reads) unless the flow declared frozenPaths and a
1249
+ // project root was threaded.
1250
+ if (frozenEvalGuard !== undefined) {
1251
+ const changed = frozenEvalGuard.changedFrozenPaths();
1252
+ if (changed.length > 0) {
1253
+ context.honestyLedger?.latchOverclaim({
1254
+ stepId: 'frozen-eval-guard',
1255
+ iterationIndex: stepIterationIndex,
1256
+ reason: `eval surface modified during iteration ${stepIterationIndex}: ${changed.join(', ')}`,
1257
+ });
1258
+ }
1259
+ }
1260
+ const judgment = await readUntilJudgeReport(context, untilFlag.stopJudge);
1261
+ const evidenceConfirms = judgment.goalProposed && (options.untilEvidenceFloor ?? defaultUntilEvidenceFloor)(context);
1262
+ const disposition = evidenceConfirms ? 'stop-clean' : 'needs-attention';
1263
+ await trace.append({
1264
+ run_id: runId,
1265
+ kind: 'run.until-judgment',
1266
+ step_id: step.id,
1267
+ iteration: stepIterationIndex,
1268
+ goal_proposed: judgment.goalProposed,
1269
+ evidence_confirmed: evidenceConfirms,
1270
+ disposition,
1271
+ no_progress_count: 0,
1272
+ open_latch_count: context.honestyLedger?.openLatches().length ?? 0,
1273
+ ...(judgment.lesson === undefined ? {} : { lesson: judgment.lesson }),
1274
+ });
1275
+ if (disposition === 'needs-attention') {
1276
+ // assertUntilFlagCoherent guarantees a tail-declared needsAttentionRoute
1277
+ // whenever stopJudge is set, so this is defined. Fail loud rather than
1278
+ // silently fall through to the clean-stop forward route (a false-done).
1279
+ const attentionRoute = untilFlag.needsAttentionRoute;
1280
+ if (attentionRoute === undefined) {
1281
+ throw new Error(`until loop on flow '${flow.id}' reached needs-attention with no needsAttentionRoute`);
1282
+ }
1283
+ route = attentionRoute;
1284
+ }
1285
+ // 'stop-clean' leaves the tail's forward route intact (the clean exit).
1286
+ }
1287
+ const routeDeclaration = classifyRouteDeclarationTransition({
1288
+ stepId: step.id,
1289
+ route,
1290
+ target: step.routes[route],
1291
+ });
1292
+ if (routeDeclaration.kind === 'undeclared_route_abort') {
1293
+ await trace.append({
1294
+ run_id: runId,
1295
+ kind: 'step.aborted',
1296
+ step_id: step.id,
1297
+ attempt,
1298
+ reason: routeDeclaration.reason,
1299
+ });
1300
+ return await closeRun(context, 'aborted', undefined, routeDeclaration.reason);
1301
+ }
1302
+ const target = routeDeclaration.target;
1303
+ const recoveryBinding = recoveryBindingForCompletedRoute({
1304
+ bindings: recoveryRouteBindings,
1305
+ step,
1306
+ route,
1307
+ target,
1308
+ });
1309
+ const routeHasRecoveryMechanics = isRecoveryRouteForMechanics({
1310
+ bindings: recoveryRouteBindings,
1311
+ step,
1312
+ route,
1313
+ });
1314
+ const directRecoveryFailure = latestRecoveryFailureEvidence({
1315
+ context,
1316
+ stepId: step.id,
1317
+ attempt,
1318
+ details,
1319
+ ...(loopBodyIndex === undefined ? {} : { sliceIndex: loopBodyIndex }),
1320
+ }) ??
1321
+ reportSelectedCheckpointBoundaryEvidence({
1322
+ context,
1323
+ stepId: step.id,
1324
+ attempt,
1325
+ details,
1326
+ binding: recoveryBinding,
1327
+ });
1328
+ const recoveryFailure = directRecoveryFailure ??
1329
+ (routeHasRecoveryMechanics
1330
+ ? corridor.evidenceFor({
1331
+ stepId: step.id,
1332
+ attempt,
1333
+ binding: recoveryBinding,
1334
+ })
1335
+ : undefined);
1336
+ // Until loop, latch-clear (slice 3): a body step that re-runs and completes
1337
+ // its check clean (no recovery failure, no recovery route) clears any
1338
+ // overclaim latch it held from an earlier iteration. The ledger tracks the
1339
+ // step's LATEST state, so a clean pass resolves the latch; only then can the
1340
+ // close-path finalize chokepoint let the run reach complete. Inert on every
1341
+ // run with no judge-gated until ledger.
1342
+ if (untilCorridor.isActive() &&
1343
+ untilFlag?.stopJudge !== undefined &&
1344
+ isUntilBodyStep &&
1345
+ recoveryFailure === undefined &&
1346
+ !routeHasRecoveryMechanics) {
1347
+ context.honestyLedger?.clearLatch(step.id);
1348
+ }
1349
+ const bindingVerdict = recoveryBindingVerdict({
1350
+ workContractRef: context.workContractRef,
1351
+ stepId: step.id,
1352
+ stepKind: step.kind,
1353
+ route,
1354
+ routeHasRecoveryMechanics,
1355
+ recoveryFailure,
1356
+ recoveryBinding,
1357
+ });
1358
+ if (bindingVerdict.kind === 'abort') {
1359
+ await trace.append({
1360
+ run_id: runId,
1361
+ kind: 'step.aborted',
1362
+ step_id: step.id,
1363
+ attempt,
1364
+ reason: bindingVerdict.reason,
1365
+ });
1366
+ return await closeRun(context, 'aborted', undefined, bindingVerdict.reason);
1367
+ }
1368
+ // The live loop index here is post-advance, so a re-enter/advance redirect
1369
+ // to the loop head reads the next iteration's (empty) count rather than the
1370
+ // just-completed one's, and is not flagged as a cycle. Whichever corridor
1371
+ // owns the target step supplies its key; the two are mutually exclusive.
1372
+ const targetCountKey = target.kind === 'step'
1373
+ ? untilCorridor.isLoopBodyStep(target.stepId)
1374
+ ? untilCorridor.countKey(target.stepId, untilCorridor.currentIterationIndex())
1375
+ : sliceCorridor.countKey(target.stepId, sliceCorridor.currentSliceIndex())
1376
+ : undefined;
1377
+ const targetCompletedCount = targetCountKey !== undefined ? (completedStepCounts.get(targetCountKey) ?? 0) : 0;
1378
+ const targetStep = target.kind === 'step' ? steps.get(target.stepId) : undefined;
1379
+ const isRecoveryReturnToOrigin = target.kind === 'step'
1380
+ ? corridor.isReturnToOrigin({
1381
+ stepId: target.stepId,
1382
+ route,
1383
+ })
1384
+ : false;
1385
+ const targetMaxAttempts = target.kind === 'step' && targetStep !== undefined
1386
+ ? maxAttemptsForRoute(targetStep, routeHasRecoveryMechanics, policyMaxAttemptsCap)
1387
+ : maxAttemptsForRoute(step, routeHasRecoveryMechanics, policyMaxAttemptsCap);
1388
+ const targetTransition = classifyRouteTargetTransition({
1389
+ stepId: step.id,
1390
+ route,
1391
+ target,
1392
+ targetCompletedCount,
1393
+ isRecoveryReturnToOrigin,
1394
+ routeHasRecoveryMechanics,
1395
+ targetMaxAttempts,
1396
+ recoveryReasonSuffix: corridor.lastReasonSuffix(),
1397
+ });
1398
+ if (isRouteTargetAbort(targetTransition)) {
1399
+ await trace.append({
1400
+ run_id: runId,
1401
+ kind: 'step.aborted',
1402
+ step_id: step.id,
1403
+ attempt,
1404
+ reason: targetTransition.reason,
1405
+ });
1406
+ return await closeRun(context, 'aborted', undefined, targetTransition.reason);
1407
+ }
1408
+ if (routeHasRecoveryMechanics) {
1409
+ corridor.enter({
1410
+ originStepId: step.id,
1411
+ route,
1412
+ recoveryReason: details.reason,
1413
+ recoveryFailure,
1414
+ acceptanceFeedback: isAcceptanceRetryFeedback(details.acceptance_feedback)
1415
+ ? details.acceptance_feedback
1416
+ : undefined,
1417
+ });
1418
+ }
1419
+ if (recoveryBinding !== undefined) {
1420
+ if (recoveryFailure !== undefined &&
1421
+ recoveryCauseAllowed(recoveryBinding, recoveryFailure.cause)) {
1422
+ await appendRecoveryRouteGuidance(context, {
1423
+ stepId: step.id,
1424
+ attempt,
1425
+ routeId: route,
1426
+ recoveryKind: recoveryBinding.kind,
1427
+ failureCause: recoveryFailure.cause,
1428
+ failureRef: recoveryFailure.ref,
1429
+ bindingRef: recoveryBinding.source_ref,
1430
+ });
1431
+ }
1432
+ }
1433
+ corridor.clearIfExitingOrigin({ stepId: step.id, routeHasRecoveryMechanics });
1434
+ await trace.append({
1435
+ run_id: runId,
1436
+ kind: 'step.completed',
1437
+ step_id: step.id,
1438
+ attempt,
1439
+ route_taken: route,
1440
+ ...(loopBodyIndex === undefined ? {} : { slice_index: loopBodyIndex }),
1441
+ });
1442
+ // Keyed to this step's captured slice index (pre-advance), so a tail step
1443
+ // that just advanced still records its own slice's completion, not the
1444
+ // next slice's. `deliveryConsumedAttempts` (0 unless a pull-then-retry re-run
1445
+ // ran) advances the count past the re-run's attempt slot so a later recovery
1446
+ // re-entry never reuses it.
1447
+ completedStepCounts.set(stepCountKey, completedCount + 1 + deliveryConsumedAttempts);
1448
+ // Skill-hook dispatch: record any hook events this step's signals trigger
1449
+ // under the run's config, then actuate the `auto` ones. Best-effort and
1450
+ // fully isolated — a dispatch failure must never affect the run, and a run
1451
+ // with no skill_hooks config records nothing and injects nothing. File-edit
1452
+ // hooks read the step's reports via the run file store; check-outcome hooks
1453
+ // read the trace.
1454
+ try {
1455
+ const hookEvents = await dispatchSkillHooks({
1456
+ entries: trace.getAll().slice(traceLengthBeforeStep),
1457
+ ...(context.selectionConfigLayers === undefined
1458
+ ? {}
1459
+ : { configLayers: context.selectionConfigLayers }),
1460
+ scope: {
1461
+ flowId: flow.id,
1462
+ stepId: step.id,
1463
+ attemptId: String(attempt),
1464
+ },
1465
+ eventIdBase: `${runId}:${step.id}:${attempt}`,
1466
+ readJson: (ref) => context.files.readJson(ref),
1467
+ editFileSurfaceSources,
1468
+ // Share the run's single registry so the recorded triggered/unavailable
1469
+ // split matches what the relay loader will actually resolve.
1470
+ ...(context.skillRegistry === undefined ? {} : { registry: context.skillRegistry }),
1471
+ });
1472
+ for (const event of hookEvents) {
1473
+ await trace.append({ run_id: runId, kind: 'run.skill-hook', event });
1474
+ // Actuate: an `auto` policy injects its resolved skills into the next
1475
+ // implementer relay. Three guards, all required:
1476
+ // - mode === 'auto': `mute`/`none` never inject (there is no `ask` mode).
1477
+ // - decision_packet_id === undefined: a recorded decision packet blocks
1478
+ // injection. A strict `auto` policy whose configured skill is
1479
+ // unavailable carries a `strict-skill-unavailable` packet; when one is
1480
+ // present we inject NOTHING — not even the skills that did resolve — and
1481
+ // the run still proceeds (the conservative reading of strict mode). The
1482
+ // packet is recorded onto the event for the trace; nothing interactive
1483
+ // consumes it yet, so the run does NOT pause or await an operator choice
1484
+ // (interactive resolution is a later slice).
1485
+ // - triggered_skills non-empty: nothing to inject otherwise.
1486
+ if (event.policy.mode === 'auto' &&
1487
+ event.decision_packet_id === undefined &&
1488
+ event.triggered_skills.length > 0) {
1489
+ context.skillHookInjections?.add(event.triggered_skills.map((skill) => skill.id));
1490
+ }
1491
+ }
1492
+ }
1493
+ catch (err) {
1494
+ // Skill-hook dispatch is non-critical: a failure must never break a run.
1495
+ // But it must not be silent either (the operator otherwise cannot tell
1496
+ // "no hook matched" from "dispatch crashed"). Record a marker the operator
1497
+ // summary surfaces as a `skill_hook_dispatch_failed` warning, mirroring how
1498
+ // an HTML render failure surfaces. If recording the marker itself fails,
1499
+ // stay silent rather than break the run.
1500
+ try {
1501
+ await trace.append({
1502
+ run_id: runId,
1503
+ kind: 'run.skill-hook-error',
1504
+ step_id: step.id,
1505
+ message: err instanceof Error ? err.message : String(err),
1506
+ });
1507
+ }
1508
+ catch {
1509
+ // Last-resort: never let observability break the run.
1510
+ }
1511
+ }
1512
+ // Auto-power inference: when the dial setting is `auto` and this step's
1513
+ // accepted relay was a researcher, read its result body for a
1514
+ // `recommended_power`, clamp it to the operator bounds, record the
1515
+ // resolution durably, and set the run-scoped channel so every later relay
1516
+ // materializes against it. First resolution wins; best-effort like
1517
+ // skill-hook dispatch — a failure here must never affect the run (the dial
1518
+ // just stays at the medium fallback).
1519
+ try {
1520
+ if (context.powerInference !== undefined && context.powerInference.get() === undefined) {
1521
+ const setting = resolvePowerDialSetting(context.selectionConfigLayers ?? []);
1522
+ if (setting.kind === 'auto') {
1523
+ const stepEntries = trace.getAll().slice(traceLengthBeforeStep);
1524
+ const researcherRelayed = stepEntries.some((entry) => entry.kind === 'relay.started' && entry.role === 'researcher');
1525
+ // The step completed, so the last relay.completed in the slice is the
1526
+ // accepted attempt; earlier ones were retried past.
1527
+ const completed = researcherRelayed
1528
+ ? [...stepEntries].reverse().find((entry) => entry.kind === 'relay.completed')
1529
+ : undefined;
1530
+ if (completed !== undefined) {
1531
+ const body = await context.files.readJson(completed.result_path);
1532
+ const recommendation = extractPowerRecommendation(body);
1533
+ if (recommendation !== undefined) {
1534
+ const resolved = clampPowerToBounds(recommendation.value, setting);
1535
+ await trace.append({
1536
+ run_id: runId,
1537
+ kind: 'run.power-inference',
1538
+ step_id: step.id,
1539
+ recommended: recommendation.value,
1540
+ rationale: recommendation.rationale,
1541
+ floor: setting.floor,
1542
+ ceiling: setting.ceiling,
1543
+ resolved,
1544
+ clamped: resolved !== recommendation.value,
1545
+ });
1546
+ context.powerInference.set({
1547
+ recommended: recommendation.value,
1548
+ rationale: recommendation.rationale,
1549
+ resolved,
1550
+ clamped: resolved !== recommendation.value,
1551
+ });
1552
+ }
1553
+ }
1554
+ }
1555
+ }
1556
+ }
1557
+ catch (err) {
1558
+ // Non-critical by design: an unreadable result body or a trace-append
1559
+ // failure leaves the dial at the documented medium fallback. But the
1560
+ // failure must not be silent — without a record, "inference crashed"
1561
+ // reads exactly like "the researcher never recommended a tier". Record
1562
+ // a marker (the sibling of run.skill-hook-error above) naming the
1563
+ // fallback and the remedy. If recording the marker itself fails, stay
1564
+ // silent rather than break the run.
1565
+ try {
1566
+ await trace.append({
1567
+ run_id: runId,
1568
+ kind: 'run.power-inference-error',
1569
+ step_id: step.id,
1570
+ message: `auto power inference failed after step '${step.id}'; the run continued on the medium fallback. To pin the dial instead, set defaults.power to a fixed tier. Cause: ${err instanceof Error ? err.message : String(err)}`,
1571
+ });
1572
+ }
1573
+ catch {
1574
+ // Last-resort: never let observability break the run.
1575
+ }
1576
+ }
1577
+ // Step 2 — the live equipment reshape. The first time the engine adapts a
1578
+ // RUNNING flow. After a step completes, if its relay surfaced a CONFIRMED
1579
+ // equipment discovery (e.g. "this turned out to be a React app"), the
1580
+ // reshaper re-equips the remaining relay steps and returns a re-validated
1581
+ // executable tail to continue on. Additive only: equipment never changes the
1582
+ // step sequence, so there is NO splice seam (structural reshape is Step 3).
1583
+ // Inert unless the live path injected `equipmentReshaper`. Best-effort and
1584
+ // fail-safe — any failure leaves the run on its current, still-valid flow,
1585
+ // which is exactly the finding fallback. Skipped inside a slice loop
1586
+ // (completion-count keys are slice-scoped there) and on the terminal step
1587
+ // (nothing remains to equip). The reshaper owns the bound, the cycle guard,
1588
+ // and the confirmed-only default; this seam reads the signal and swaps the
1589
+ // executable flow — it never touches the compiled form.
1590
+ const equipmentReshaper = options.equipmentReshaper;
1591
+ if (equipmentReshaper !== undefined &&
1592
+ targetTransition.kind !== 'terminal_close' &&
1593
+ !sliceCorridor.isActive()) {
1594
+ try {
1595
+ const stepEntries = trace.getAll().slice(traceLengthBeforeStep);
1596
+ const completed = [...stepEntries]
1597
+ .reverse()
1598
+ .find((entry) => entry.kind === 'relay.completed');
1599
+ if (completed !== undefined) {
1600
+ const body = await context.files.readJson(completed.result_path);
1601
+ const discovery = extractEquipmentDiscovery(body);
1602
+ if (discovery !== undefined) {
1603
+ // The remaining relay steps: relay steps other than the one that
1604
+ // surfaced the discovery, not yet run this pass. A completed step's
1605
+ // equipment is settled — re-equipping the past is meaningless.
1606
+ const remainingRelayStepIds = new Set(activeFlow.steps
1607
+ .filter((candidate) => candidate.kind === 'relay' &&
1608
+ candidate.id !== step.id &&
1609
+ (completedStepCounts.get(candidate.id) ?? 0) === 0)
1610
+ .map((candidate) => candidate.id));
1611
+ const outcome = equipmentReshaper({
1612
+ fromStepId: step.id,
1613
+ remainingRelayStepIds,
1614
+ discovery,
1615
+ });
1616
+ if (outcome.reshaped) {
1617
+ // Record the durable reason BEFORE committing the swap. The append
1618
+ // is the only operator-visible trace of why a later relay gained
1619
+ // skills; writing it first means a record failure aborts into the
1620
+ // catch with the flow still unchanged, rather than leaving skills
1621
+ // that appear mid-run with no recorded cause.
1622
+ await trace.append({
1623
+ run_id: runId,
1624
+ kind: 'run.equipment-reshape',
1625
+ step_id: step.id,
1626
+ confirmed: discovery.confirmed,
1627
+ reshaped: true,
1628
+ domain_tags: discovery.domain_tags,
1629
+ equipped_steps: [...outcome.equippedSteps],
1630
+ reason: outcome.rationale,
1631
+ });
1632
+ // Swap the running flow for the re-validated tail. The step
1633
+ // sequence is unchanged (additive equipment), so the cursor,
1634
+ // routes, and corridor — which read structure, not slots — keep
1635
+ // working; only the steps' skill slots and the package index move.
1636
+ // Build the index into a local FIRST, then assign the three pieces
1637
+ // of run state together: the swap is atomic by construction, so a
1638
+ // throw from buildRuntimePackageIndex can never leave activeFlow
1639
+ // ahead of its index (it cannot throw on an assertExecutableFlow-
1640
+ // validated flow, but we do not lean on that to stay consistent).
1641
+ const nextFlow = outcome.executableFlow;
1642
+ const nextPackageIndex = buildRuntimePackageIndex(nextFlow);
1643
+ activeFlow = nextFlow;
1644
+ activePackageIndex = nextPackageIndex;
1645
+ for (const updated of activeFlow.steps) {
1646
+ steps.set(updated.id, updated);
1647
+ }
1648
+ }
1649
+ else {
1650
+ await trace.append({
1651
+ run_id: runId,
1652
+ kind: 'run.equipment-reshape',
1653
+ step_id: step.id,
1654
+ confirmed: discovery.confirmed,
1655
+ reshaped: false,
1656
+ domain_tags: discovery.domain_tags,
1657
+ reason: outcome.finding,
1658
+ });
1659
+ }
1660
+ }
1661
+ }
1662
+ }
1663
+ catch {
1664
+ // Non-critical by design: a failed reshape attempt leaves the run on its
1665
+ // current, still-valid flow — exactly the finding fallback.
1666
+ }
1667
+ }
1668
+ // On-demand context-pull — the typed-lookup channel, RESOLVE-AND-RECORD seam.
1669
+ // After a relay completes, it may have surfaced a `context_request`: a typed
1670
+ // ask for one more named slice of a parent's report than its thin envelope
1671
+ // carried. The shared helper materializes each named parent's typed report,
1672
+ // resolves the slice through a fresh per-step channel, and records the
1673
+ // answer-or-finding in the trace. Resolve-and-record only: the value is not
1674
+ // delivered back into the step here, so the run is never altered.
1675
+ //
1676
+ // This seam runs when EITHER of two conditions holds:
1677
+ // - delivery is off (`contextDelivery === undefined`): the resolve-and-record
1678
+ // channel is the only one wired, so it handles every request.
1679
+ // - we are inside a slice corridor (`sliceCorridor.isActive()`): the early
1680
+ // delivery seam above is guarded on `!sliceCorridor.isActive()`, so it never
1681
+ // fires for a corridor step. Delivery-in-corridor stays deferred (re-running
1682
+ // a corridor head on enriched context would interact with slice-scoped
1683
+ // completion keys — out of scope here), but the pull must still be made
1684
+ // LEGIBLE: record it as a finding instead of dropping it silently. This is
1685
+ // the lift of the formerly over-conservative slice-loop skip; context-pull
1686
+ // never mutates, so recording inside a corridor is safe.
1687
+ // The combined guard avoids double-recording: with delivery on AND outside a
1688
+ // corridor, the early seam already resolved+recorded+delivered, so both
1689
+ // conditions are false and this seam is skipped.
1690
+ //
1691
+ // Inert unless the live path injected `contextPuller`; always skipped on the
1692
+ // terminal step. Best-effort and fail-safe: any failure leaves the run untouched.
1693
+ if (options.contextPuller !== undefined &&
1694
+ (options.contextDelivery === undefined || sliceCorridor.isActive()) &&
1695
+ targetTransition.kind !== 'terminal_close') {
1696
+ try {
1697
+ const stepEntries = trace.getAll().slice(traceLengthBeforeStep);
1698
+ const completed = [...stepEntries]
1699
+ .reverse()
1700
+ .find((entry) => entry.kind === 'relay.completed');
1701
+ if (completed !== undefined) {
1702
+ const body = await context.files.readJson(completed.result_path);
1703
+ const request = extractContextRequest(body);
1704
+ if (request !== undefined) {
1705
+ await resolveAndRecordContextPull({ stepId: step.id, request });
1706
+ }
1707
+ }
1708
+ }
1709
+ catch {
1710
+ // Non-critical by design: a failed context-pull leaves the run untouched.
1711
+ }
1712
+ }
1713
+ if (targetTransition.kind === 'terminal_close') {
1714
+ return await closeRun(context, outcomeForTerminal(targetTransition.terminalTarget), targetTransition.terminalTarget);
1715
+ }
1716
+ currentStepId = targetTransition.targetStepId;
1717
+ incomingRouteTaken = route;
1718
+ }
1719
+ return await closeRun(context, 'aborted', undefined, `maxSteps exceeded: ${maxSteps}`);
1720
+ }
1721
+ function errorFromUnknown(error) {
1722
+ return error instanceof Error ? error : new Error(String(error));
1723
+ }
1724
+ export async function executeExecutableFlowOutcome(flow, options) {
1725
+ try {
1726
+ return await executeExecutableFlowOutcomeUnsafe(flow, options);
1727
+ }
1728
+ catch (error) {
1729
+ const normalized = errorFromUnknown(error);
1730
+ return {
1731
+ kind: 'rejected',
1732
+ outcome: 'rejected',
1733
+ reason: normalized.message,
1734
+ error: normalized,
1735
+ };
1736
+ }
1737
+ }
1738
+ function graphOutcomeToCompatibilityResult(outcome) {
1739
+ if (outcome.kind === 'closed')
1740
+ return outcome.result;
1741
+ if (outcome.kind === 'rejected')
1742
+ throw outcome.error;
1743
+ return outcome;
1744
+ }
1745
+ export async function executeExecutableFlowWithWaiting(flow, options) {
1746
+ return graphOutcomeToCompatibilityResult(await executeExecutableFlowOutcome(flow, options));
1747
+ }
1748
+ export async function executeExecutableFlow(flow, options) {
1749
+ const result = await executeExecutableFlowWithWaiting(flow, options);
1750
+ if (isGraphCheckpointWaitingResult(result)) {
1751
+ throw new Error(`runtime run '${result.runId}' paused at checkpoint '${result.checkpoint.stepId}', which requires checkpoint-aware resume routing`);
1752
+ }
1753
+ return result;
1754
+ }
1755
+ //# sourceMappingURL=graph-runner.js.map