@intentius/chant 0.124.26 → 0.124.28

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 (459) hide show
  1. package/README.md +1 -1
  2. package/dist/__golden__/wave-loop/fan-out-gated.json +8 -0
  3. package/dist/__golden__/wave-loop/fan-out-no-members.json +4 -0
  4. package/dist/__golden__/wave-loop/fan-out-only.json +6 -0
  5. package/dist/__golden__/wave-loop/op-by-apply-hold.json +2 -0
  6. package/dist/__golden__/wave-loop/op-cost-member.json +3 -0
  7. package/dist/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
  8. package/dist/__golden__/wave-loop/op-held-on.json +2 -0
  9. package/dist/__golden__/wave-loop/op-hooks-held.json +2 -0
  10. package/dist/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
  11. package/dist/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
  12. package/dist/__golden__/wave-loop/op-hooks-share.json +3 -0
  13. package/dist/__golden__/wave-loop/op-per-run.json +7 -0
  14. package/dist/__golden__/wave-loop/op-pr-review.json +7 -0
  15. package/dist/__golden__/wave-loop/op-sealed.json +3 -0
  16. package/dist/__golden__/wave-loop/op-spend.json +3 -0
  17. package/dist/__golden__/wave-loop/op-wave-commands.json +7 -0
  18. package/dist/__golden__/wave-loop/op-wide-waiting.json +4 -0
  19. package/dist/change-set-graph.d.ts +56 -0
  20. package/dist/change-set-graph.d.ts.map +1 -0
  21. package/dist/change-set-graph.js +128 -0
  22. package/dist/change-set.d.ts +52 -3
  23. package/dist/change-set.d.ts.map +1 -1
  24. package/dist/change-set.js +35 -4
  25. package/dist/chant-version.d.ts +9 -0
  26. package/dist/chant-version.d.ts.map +1 -0
  27. package/dist/chant-version.js +16 -0
  28. package/dist/cli/commands/build.d.ts +8 -0
  29. package/dist/cli/commands/build.d.ts.map +1 -1
  30. package/dist/cli/commands/build.js +9 -8
  31. package/dist/cli/commands/check-lexicon-docs.d.ts.map +1 -1
  32. package/dist/cli/commands/check-lexicon-docs.js +30 -2
  33. package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
  34. package/dist/cli/commands/check-lexicon.js +13 -2
  35. package/dist/cli/commands/init-lexicon/templates/docs.d.ts +4 -1
  36. package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -1
  37. package/dist/cli/commands/init-lexicon/templates/docs.js +6 -6
  38. package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
  39. package/dist/cli/commands/init-lexicon.js +17 -8
  40. package/dist/cli/handlers/approve.d.ts.map +1 -1
  41. package/dist/cli/handlers/approve.js +19 -4
  42. package/dist/cli/handlers/build.d.ts.map +1 -1
  43. package/dist/cli/handlers/build.js +28 -0
  44. package/dist/cli/handlers/change-set.d.ts +10 -0
  45. package/dist/cli/handlers/change-set.d.ts.map +1 -1
  46. package/dist/cli/handlers/change-set.js +51 -1
  47. package/dist/cli/handlers/fan-out.d.ts +1 -1
  48. package/dist/cli/handlers/fan-out.d.ts.map +1 -1
  49. package/dist/cli/handlers/fan-out.js +14 -3
  50. package/dist/cli/handlers/pr.d.ts +8 -2
  51. package/dist/cli/handlers/pr.d.ts.map +1 -1
  52. package/dist/cli/handlers/pr.js +148 -24
  53. package/dist/cli/handlers/promote.d.ts.map +1 -1
  54. package/dist/cli/handlers/promote.js +256 -21
  55. package/dist/cli/handlers/release.d.ts +34 -0
  56. package/dist/cli/handlers/release.d.ts.map +1 -0
  57. package/dist/cli/handlers/release.js +203 -0
  58. package/dist/cli/handlers/run.d.ts +28 -2
  59. package/dist/cli/handlers/run.d.ts.map +1 -1
  60. package/dist/cli/handlers/run.js +170 -13
  61. package/dist/cli/main.d.ts.map +1 -1
  62. package/dist/cli/main.js +88 -13
  63. package/dist/cli/mcp/workspace-tools.js +1 -1
  64. package/dist/cli/parse-args.d.ts.map +1 -1
  65. package/dist/cli/parse-args.js +49 -3
  66. package/dist/cli/registry.d.ts +29 -3
  67. package/dist/cli/registry.d.ts.map +1 -1
  68. package/dist/cli/run-events.d.ts +29 -0
  69. package/dist/cli/run-events.d.ts.map +1 -0
  70. package/dist/cli/run-events.js +47 -0
  71. package/dist/cli/version.d.ts +3 -5
  72. package/dist/cli/version.d.ts.map +1 -1
  73. package/dist/cli/version.js +3 -13
  74. package/dist/codegen/docs-in-site.d.ts +71 -0
  75. package/dist/codegen/docs-in-site.d.ts.map +1 -0
  76. package/dist/codegen/docs-in-site.js +177 -0
  77. package/dist/codegen/docs-types.d.ts +14 -1
  78. package/dist/codegen/docs-types.d.ts.map +1 -1
  79. package/dist/codegen/docs.d.ts +18 -1
  80. package/dist/codegen/docs.d.ts.map +1 -1
  81. package/dist/codegen/docs.js +40 -7
  82. package/dist/codegen/rehype-base-url.mjs +15 -9
  83. package/dist/components/auto-release.d.ts +4 -1
  84. package/dist/components/auto-release.d.ts.map +1 -1
  85. package/dist/components/auto-release.js +2 -0
  86. package/dist/components/cli-support.d.ts +6 -0
  87. package/dist/components/cli-support.d.ts.map +1 -1
  88. package/dist/components/cli-support.js +10 -9
  89. package/dist/components/driver.d.ts +42 -9
  90. package/dist/components/driver.d.ts.map +1 -1
  91. package/dist/components/driver.js +81 -54
  92. package/dist/components/fan-out-run.d.ts +7 -0
  93. package/dist/components/fan-out-run.d.ts.map +1 -1
  94. package/dist/components/fan-out-run.js +35 -26
  95. package/dist/components/pr-run.d.ts +11 -0
  96. package/dist/components/pr-run.d.ts.map +1 -1
  97. package/dist/components/pr-run.js +20 -1
  98. package/dist/components/promote-order.d.ts +38 -0
  99. package/dist/components/promote-order.d.ts.map +1 -0
  100. package/dist/components/promote-order.js +62 -0
  101. package/dist/components/promote.d.ts +15 -2
  102. package/dist/components/promote.d.ts.map +1 -1
  103. package/dist/components/promote.js +17 -0
  104. package/dist/components/release-compile.d.ts +133 -0
  105. package/dist/components/release-compile.d.ts.map +1 -0
  106. package/dist/components/release-compile.js +376 -0
  107. package/dist/components/release-gate.d.ts +125 -0
  108. package/dist/components/release-gate.d.ts.map +1 -0
  109. package/dist/components/release-gate.js +282 -0
  110. package/dist/components/release-promote.d.ts +96 -0
  111. package/dist/components/release-promote.d.ts.map +1 -0
  112. package/dist/components/release-promote.js +204 -0
  113. package/dist/components/run-progress.d.ts +7 -0
  114. package/dist/components/run-progress.d.ts.map +1 -1
  115. package/dist/components/wave-plan.d.ts +3 -1
  116. package/dist/components/wave-plan.d.ts.map +1 -1
  117. package/dist/components/wave-plan.js +1 -1
  118. package/dist/config.d.ts +7 -0
  119. package/dist/config.d.ts.map +1 -1
  120. package/dist/config.js +1 -0
  121. package/dist/index.d.ts +1 -0
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +2 -0
  124. package/dist/lifecycle/change-set-store.d.ts +67 -0
  125. package/dist/lifecycle/change-set-store.d.ts.map +1 -0
  126. package/dist/lifecycle/change-set-store.js +96 -0
  127. package/dist/lifecycle/commit-sha.d.ts +13 -0
  128. package/dist/lifecycle/commit-sha.d.ts.map +1 -0
  129. package/dist/lifecycle/commit-sha.js +21 -0
  130. package/dist/lifecycle/gate-change-set.d.ts +69 -0
  131. package/dist/lifecycle/gate-change-set.d.ts.map +1 -0
  132. package/dist/lifecycle/gate-change-set.js +106 -0
  133. package/dist/lifecycle/gate-ledger.d.ts +49 -1
  134. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  135. package/dist/lifecycle/gate-ledger.js +18 -0
  136. package/dist/lifecycle/release-cut.d.ts +107 -0
  137. package/dist/lifecycle/release-cut.d.ts.map +1 -0
  138. package/dist/lifecycle/release-cut.js +273 -0
  139. package/dist/lifecycle/release-ledger.d.ts +54 -0
  140. package/dist/lifecycle/release-ledger.d.ts.map +1 -1
  141. package/dist/lifecycle/release-ledger.js +53 -20
  142. package/dist/lifecycle/release-store.d.ts +190 -0
  143. package/dist/lifecycle/release-store.d.ts.map +1 -0
  144. package/dist/lifecycle/release-store.js +318 -0
  145. package/dist/lifecycle/run-ledger.d.ts +4 -0
  146. package/dist/lifecycle/run-ledger.d.ts.map +1 -1
  147. package/dist/lifecycle/run-ledger.js +2 -0
  148. package/dist/op/activities/change-coverage.d.ts.map +1 -1
  149. package/dist/op/activities/change-coverage.js +4 -2
  150. package/dist/op/activities/source-release.d.ts.map +1 -1
  151. package/dist/op/activities/source-release.js +7 -3
  152. package/dist/op/activities/source-rollback.d.ts.map +1 -1
  153. package/dist/op/activities/source-rollback.js +7 -3
  154. package/dist/op/activity-registry.d.ts +6 -3
  155. package/dist/op/activity-registry.d.ts.map +1 -1
  156. package/dist/op/activity-registry.js +7 -5
  157. package/dist/op/discover.d.ts.map +1 -1
  158. package/dist/op/discover.js +14 -7
  159. package/dist/op/gate-name.d.ts +11 -2
  160. package/dist/op/gate-name.d.ts.map +1 -1
  161. package/dist/op/gate-name.js +12 -3
  162. package/dist/op/gate-run-locator.d.ts +22 -0
  163. package/dist/op/gate-run-locator.d.ts.map +1 -1
  164. package/dist/op/gate-run-locator.js +31 -0
  165. package/dist/op/gate.d.ts +27 -3
  166. package/dist/op/gate.d.ts.map +1 -1
  167. package/dist/op/gate.js +57 -3
  168. package/dist/op/local-executor.d.ts +36 -1
  169. package/dist/op/local-executor.d.ts.map +1 -1
  170. package/dist/op/local-executor.js +158 -52
  171. package/dist/op/op-waves-run.d.ts.map +1 -1
  172. package/dist/op/op-waves-run.js +4 -0
  173. package/dist/op/run-live.d.ts +2 -0
  174. package/dist/op/run-live.d.ts.map +1 -1
  175. package/dist/op/run-live.js +1 -1
  176. package/dist/op/runtime.d.ts +46 -0
  177. package/dist/op/runtime.d.ts.map +1 -1
  178. package/dist/op/runtimes/local.d.ts.map +1 -1
  179. package/dist/op/runtimes/local.js +12 -2
  180. package/dist/point-decision.d.ts +2 -0
  181. package/dist/point-decision.d.ts.map +1 -1
  182. package/dist/point-decision.js +9 -2
  183. package/dist/run-event-store.d.ts +77 -0
  184. package/dist/run-event-store.d.ts.map +1 -0
  185. package/dist/run-event-store.js +204 -0
  186. package/dist/run-event-stream.d.ts +132 -0
  187. package/dist/run-event-stream.d.ts.map +1 -0
  188. package/dist/run-event-stream.js +238 -0
  189. package/dist/run-event.d.ts +267 -0
  190. package/dist/run-event.d.ts.map +1 -0
  191. package/dist/run-event.js +207 -0
  192. package/dist/wave-runtime.mjs +225 -242
  193. package/dist/workspace/__fixtures__/run-event-check.d.ts +19 -0
  194. package/dist/workspace/__fixtures__/run-event-check.d.ts.map +1 -0
  195. package/dist/workspace/__fixtures__/run-event-check.js +59 -0
  196. package/dist/workspace/change-set-show.d.ts +56 -0
  197. package/dist/workspace/change-set-show.d.ts.map +1 -0
  198. package/dist/workspace/change-set-show.js +54 -0
  199. package/dist/workspace/change-set-show.schema.json +102 -0
  200. package/dist/workspace/change-set.schema.json +28 -1
  201. package/dist/workspace/changes-cli.d.ts.map +1 -1
  202. package/dist/workspace/changes-cli.js +10 -1
  203. package/dist/workspace/changes.d.ts +37 -0
  204. package/dist/workspace/changes.d.ts.map +1 -1
  205. package/dist/workspace/changes.js +49 -2
  206. package/dist/workspace/changes.schema.json +135 -0
  207. package/dist/workspace/ci-green-cli.d.ts +19 -4
  208. package/dist/workspace/ci-green-cli.d.ts.map +1 -1
  209. package/dist/workspace/ci-green-cli.js +75 -12
  210. package/dist/workspace/ci-green-forge.d.ts +20 -3
  211. package/dist/workspace/ci-green-forge.d.ts.map +1 -1
  212. package/dist/workspace/ci-green-forge.js +6 -4
  213. package/dist/workspace/ci-green-workflow.d.ts +11 -0
  214. package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
  215. package/dist/workspace/ci-green-workflow.js +6 -0
  216. package/dist/workspace/ci-green.d.ts +273 -13
  217. package/dist/workspace/ci-green.d.ts.map +1 -1
  218. package/dist/workspace/ci-green.js +449 -38
  219. package/dist/workspace/ci-last-green.schema.json +32 -2
  220. package/dist/workspace/ci-list.schema.json +525 -0
  221. package/dist/workspace/commit-links.d.ts +85 -0
  222. package/dist/workspace/commit-links.d.ts.map +1 -0
  223. package/dist/workspace/commit-links.js +163 -0
  224. package/dist/workspace/declaration.d.ts +19 -0
  225. package/dist/workspace/declaration.d.ts.map +1 -1
  226. package/dist/workspace/declaration.js +1 -1
  227. package/dist/workspace/declaration.schema.json +12 -0
  228. package/dist/workspace/identity-gate-rule.d.ts +37 -0
  229. package/dist/workspace/identity-gate-rule.d.ts.map +1 -1
  230. package/dist/workspace/identity-gate-rule.js +72 -7
  231. package/dist/workspace/identity.d.ts +12 -0
  232. package/dist/workspace/identity.d.ts.map +1 -1
  233. package/dist/workspace/identity.js +13 -1
  234. package/dist/workspace/intent.d.ts +6 -1
  235. package/dist/workspace/intent.d.ts.map +1 -1
  236. package/dist/workspace/intent.js +51 -1
  237. package/dist/workspace/ls.d.ts +4 -0
  238. package/dist/workspace/ls.d.ts.map +1 -1
  239. package/dist/workspace/ls.js +2 -0
  240. package/dist/workspace/ls.schema.json +3 -1
  241. package/dist/workspace/member-pipeline.d.ts +6 -0
  242. package/dist/workspace/member-pipeline.d.ts.map +1 -1
  243. package/dist/workspace/member-pipeline.js +6 -0
  244. package/dist/workspace/promotion-order.d.ts +41 -0
  245. package/dist/workspace/promotion-order.d.ts.map +1 -0
  246. package/dist/workspace/promotion-order.js +95 -0
  247. package/dist/workspace/reason-codes.d.ts +2 -0
  248. package/dist/workspace/reason-codes.d.ts.map +1 -1
  249. package/dist/workspace/reason-codes.js +4 -1
  250. package/dist/workspace/releases.d.ts +72 -0
  251. package/dist/workspace/releases.d.ts.map +1 -0
  252. package/dist/workspace/releases.js +94 -0
  253. package/dist/workspace/releases.schema.json +391 -0
  254. package/dist/workspace/run-event.schema.json +288 -0
  255. package/dist/workspace/status-gates.d.ts +26 -1
  256. package/dist/workspace/status-gates.d.ts.map +1 -1
  257. package/dist/workspace/status-gates.js +31 -2
  258. package/dist/workspace/status-stewards.d.ts +4 -0
  259. package/dist/workspace/status-stewards.d.ts.map +1 -1
  260. package/dist/workspace/status-stewards.js +2 -0
  261. package/dist/workspace/status.d.ts +39 -0
  262. package/dist/workspace/status.d.ts.map +1 -1
  263. package/dist/workspace/status.js +48 -1
  264. package/dist/workspace/status.schema.json +70 -1
  265. package/dist/workspace/trust/ci-tag-statement.d.ts +102 -0
  266. package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -0
  267. package/dist/workspace/trust/ci-tag-statement.js +123 -0
  268. package/dist/workspace/trust/op-run-statement.d.ts +91 -0
  269. package/dist/workspace/trust/op-run-statement.d.ts.map +1 -0
  270. package/dist/workspace/trust/op-run-statement.js +143 -0
  271. package/dist/workspace/trust/rotation.d.ts +18 -2
  272. package/dist/workspace/trust/rotation.d.ts.map +1 -1
  273. package/dist/workspace/trust/rotation.js +65 -16
  274. package/dist/workspace/trust/seal.d.ts +11 -0
  275. package/dist/workspace/trust/seal.d.ts.map +1 -1
  276. package/dist/workspace/trust/seal.js +9 -0
  277. package/dist/workspace/trust/ssh-commit.d.ts.map +1 -1
  278. package/dist/workspace/trust/ssh-commit.js +10 -10
  279. package/package.json +1 -1
  280. package/src/__golden__/wave-loop/fan-out-gated.json +8 -0
  281. package/src/__golden__/wave-loop/fan-out-no-members.json +4 -0
  282. package/src/__golden__/wave-loop/fan-out-only.json +6 -0
  283. package/src/__golden__/wave-loop/op-by-apply-hold.json +2 -0
  284. package/src/__golden__/wave-loop/op-cost-member.json +3 -0
  285. package/src/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
  286. package/src/__golden__/wave-loop/op-held-on.json +2 -0
  287. package/src/__golden__/wave-loop/op-hooks-held.json +2 -0
  288. package/src/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
  289. package/src/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
  290. package/src/__golden__/wave-loop/op-hooks-share.json +3 -0
  291. package/src/__golden__/wave-loop/op-per-run.json +7 -0
  292. package/src/__golden__/wave-loop/op-pr-review.json +7 -0
  293. package/src/__golden__/wave-loop/op-sealed.json +3 -0
  294. package/src/__golden__/wave-loop/op-spend.json +3 -0
  295. package/src/__golden__/wave-loop/op-wave-commands.json +7 -0
  296. package/src/__golden__/wave-loop/op-wide-waiting.json +4 -0
  297. package/src/change-set-graph.test.ts +72 -0
  298. package/src/change-set-graph.ts +133 -0
  299. package/src/change-set.ts +76 -6
  300. package/src/chant-version.ts +16 -0
  301. package/src/cli/commands/build.ts +19 -8
  302. package/src/cli/commands/check-lexicon-docs.test.ts +51 -0
  303. package/src/cli/commands/check-lexicon-docs.ts +39 -2
  304. package/src/cli/commands/check-lexicon.ts +14 -2
  305. package/src/cli/commands/init-lexicon/templates/docs.ts +7 -6
  306. package/src/cli/commands/init-lexicon.test.ts +25 -0
  307. package/src/cli/commands/init-lexicon.ts +18 -8
  308. package/src/cli/compiled-cli.e2e.test.ts +31 -6
  309. package/src/cli/handlers/approve-release.test.ts +80 -0
  310. package/src/cli/handlers/approve.ts +18 -2
  311. package/src/cli/handlers/build.test.ts +52 -0
  312. package/src/cli/handlers/build.ts +29 -0
  313. package/src/cli/handlers/change-set.ts +49 -1
  314. package/src/cli/handlers/fan-out.test.ts +48 -0
  315. package/src/cli/handlers/fan-out.ts +15 -3
  316. package/src/cli/handlers/operator.test.ts +37 -0
  317. package/src/cli/handlers/pr.test.ts +194 -0
  318. package/src/cli/handlers/pr.ts +168 -34
  319. package/src/cli/handlers/promote.test.ts +389 -5
  320. package/src/cli/handlers/promote.ts +279 -20
  321. package/src/cli/handlers/release-implicit.e2e.test.ts +153 -0
  322. package/src/cli/handlers/release.e2e.test.ts +85 -0
  323. package/src/cli/handlers/release.ts +206 -0
  324. package/src/cli/handlers/run-auto-release.test.ts +71 -0
  325. package/src/cli/handlers/run-events-cmd.test.ts +92 -0
  326. package/src/cli/handlers/run.test.ts +30 -0
  327. package/src/cli/handlers/run.ts +176 -15
  328. package/src/cli/main.test.ts +7 -0
  329. package/src/cli/main.ts +88 -13
  330. package/src/cli/mcp/never-over-mcp.test.ts +2 -0
  331. package/src/cli/mcp/workspace-tools.ts +1 -1
  332. package/src/cli/parse-args.ts +37 -3
  333. package/src/cli/registry.ts +29 -3
  334. package/src/cli/run-events.ts +54 -0
  335. package/src/cli/version.ts +3 -13
  336. package/src/codegen/docs-in-site.test.ts +166 -0
  337. package/src/codegen/docs-in-site.ts +182 -0
  338. package/src/codegen/docs-site/AgentPrompt.astro +26 -1
  339. package/src/codegen/docs-types.ts +14 -1
  340. package/src/codegen/docs.ts +60 -7
  341. package/src/codegen/rehype-base-url.d.mts +3 -1
  342. package/src/codegen/rehype-base-url.mjs +15 -9
  343. package/src/codegen/rehype-base-url.test.ts +34 -0
  344. package/src/components/auto-release.test.ts +21 -0
  345. package/src/components/auto-release.ts +6 -1
  346. package/src/components/cli-support.test.ts +82 -0
  347. package/src/components/cli-support.ts +16 -9
  348. package/src/components/driver.ts +129 -56
  349. package/src/components/fan-out-run.ts +56 -35
  350. package/src/components/pr-run.ts +30 -1
  351. package/src/components/promote-order.test.ts +90 -0
  352. package/src/components/promote-order.ts +75 -0
  353. package/src/components/promote.test.ts +10 -1
  354. package/src/components/promote.ts +26 -1
  355. package/src/components/release-compile.test.ts +147 -0
  356. package/src/components/release-compile.ts +445 -0
  357. package/src/components/release-gate.test.ts +215 -0
  358. package/src/components/release-gate.ts +341 -0
  359. package/src/components/release-promote.test.ts +159 -0
  360. package/src/components/release-promote.ts +232 -0
  361. package/src/components/run-progress.ts +7 -0
  362. package/src/components/wave-plan.ts +1 -1
  363. package/src/config.ts +7 -1
  364. package/src/index.ts +2 -0
  365. package/src/lifecycle/change-set-store.test.ts +217 -0
  366. package/src/lifecycle/change-set-store.ts +112 -0
  367. package/src/lifecycle/commit-sha.ts +23 -0
  368. package/src/lifecycle/gate-change-set.e2e.test.ts +122 -0
  369. package/src/lifecycle/gate-change-set.ts +133 -0
  370. package/src/lifecycle/gate-ledger.test.ts +33 -0
  371. package/src/lifecycle/gate-ledger.ts +66 -1
  372. package/src/lifecycle/release-cut-signed.test.ts +180 -0
  373. package/src/lifecycle/release-cut.test.ts +411 -0
  374. package/src/lifecycle/release-cut.ts +367 -0
  375. package/src/lifecycle/release-ledger.test.ts +14 -0
  376. package/src/lifecycle/release-ledger.ts +85 -17
  377. package/src/lifecycle/release-store.ts +423 -0
  378. package/src/lifecycle/run-ledger.test.ts +10 -0
  379. package/src/lifecycle/run-ledger.ts +6 -0
  380. package/src/op/activities/change-coverage.ts +4 -1
  381. package/src/op/activities/source-release.ts +8 -3
  382. package/src/op/activities/source-rollback.ts +8 -4
  383. package/src/op/activity-registry.ts +7 -5
  384. package/src/op/commit-run-gate-deploy-join.test.ts +117 -0
  385. package/src/op/discover-root.test.ts +39 -0
  386. package/src/op/discover.ts +15 -8
  387. package/src/op/gate-name.ts +13 -3
  388. package/src/op/gate-release.test.ts +126 -0
  389. package/src/op/gate-run-locator.test.ts +110 -0
  390. package/src/op/gate-run-locator.ts +35 -0
  391. package/src/op/gate.ts +88 -6
  392. package/src/op/local-executor.ts +207 -52
  393. package/src/op/op-waves-run.ts +4 -0
  394. package/src/op/run-events.test.ts +166 -0
  395. package/src/op/run-live.ts +1 -1
  396. package/src/op/runtime.ts +39 -0
  397. package/src/op/runtimes/local.test.ts +16 -0
  398. package/src/op/runtimes/local.ts +13 -2
  399. package/src/point-decision.ts +12 -2
  400. package/src/run-event-store.test.ts +144 -0
  401. package/src/run-event-store.ts +213 -0
  402. package/src/run-event-stream.test.ts +175 -0
  403. package/src/run-event-stream.ts +306 -0
  404. package/src/run-event.test.ts +277 -0
  405. package/src/run-event.ts +451 -0
  406. package/src/wave-loop-golden.test.ts +9 -0
  407. package/src/workspace/__fixtures__/run-event-check.ts +58 -0
  408. package/src/workspace/ancestry-index.test.ts +93 -0
  409. package/src/workspace/change-set-show.schema.json +102 -0
  410. package/src/workspace/change-set-show.ts +72 -0
  411. package/src/workspace/change-set.schema.json +28 -1
  412. package/src/workspace/changes-cli.ts +10 -1
  413. package/src/workspace/changes.schema.json +135 -0
  414. package/src/workspace/changes.test.ts +1 -1
  415. package/src/workspace/changes.ts +84 -2
  416. package/src/workspace/ci-green-cli.ts +75 -13
  417. package/src/workspace/ci-green-forge.ts +24 -4
  418. package/src/workspace/ci-green-runs.test.ts +242 -0
  419. package/src/workspace/ci-green-signed.test.ts +302 -0
  420. package/src/workspace/ci-green-workflow.test.ts +16 -0
  421. package/src/workspace/ci-green-workflow.ts +12 -0
  422. package/src/workspace/ci-green.test.ts +131 -2
  423. package/src/workspace/ci-green.ts +624 -42
  424. package/src/workspace/ci-last-green.schema.json +32 -2
  425. package/src/workspace/ci-list.schema.json +525 -0
  426. package/src/workspace/commit-links.test.ts +279 -0
  427. package/src/workspace/commit-links.ts +183 -0
  428. package/src/workspace/declaration.schema.json +12 -0
  429. package/src/workspace/declaration.ts +22 -2
  430. package/src/workspace/identity-gate-rule.ts +91 -7
  431. package/src/workspace/identity.ts +14 -1
  432. package/src/workspace/intent.ts +48 -1
  433. package/src/workspace/ls.schema.json +3 -1
  434. package/src/workspace/ls.ts +6 -0
  435. package/src/workspace/member-pipeline.test.ts +17 -0
  436. package/src/workspace/member-pipeline.ts +9 -0
  437. package/src/workspace/promotion-order.ts +97 -0
  438. package/src/workspace/read-contract.e2e.test.ts +4 -1
  439. package/src/workspace/reason-codes.test.ts +2 -1
  440. package/src/workspace/reason-codes.ts +4 -1
  441. package/src/workspace/releases.schema.json +391 -0
  442. package/src/workspace/releases.test.ts +108 -0
  443. package/src/workspace/releases.ts +122 -0
  444. package/src/workspace/run-event.schema.json +288 -0
  445. package/src/workspace/status-contract.test.ts +52 -1
  446. package/src/workspace/status-gates.ts +56 -1
  447. package/src/workspace/status-stewards.ts +6 -0
  448. package/src/workspace/status.schema.json +70 -1
  449. package/src/workspace/status.ts +80 -1
  450. package/src/workspace/trust/ci-tag-statement.ts +151 -0
  451. package/src/workspace/trust/op-run-statement.ts +148 -0
  452. package/src/workspace/trust/rotation.ts +61 -14
  453. package/src/workspace/trust/seal.ts +10 -0
  454. package/src/workspace/trust/ssh-commit.ts +10 -9
  455. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/astro.config.mjs +0 -14
  456. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/package.json +0 -16
  457. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content/docs/index.mdx +0 -8
  458. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content.config.ts +0 -15
  459. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/tsconfig.json +0 -10
@@ -41,9 +41,27 @@ export interface StatusGate {
41
41
  env: string | null;
42
42
  /** The plan the run reached the gate with, or null for a gate that binds no plan. */
43
43
  planDigest: string | null;
44
+ /**
45
+ * The release the gate binds (#4045), from the pending fact: on a release
46
+ * gate, the one `chant components promote --release` passes, recorded
47
+ * under the op `release`. Absent on every other gate and on a fact written
48
+ * before chant 0.124.28.
49
+ */
50
+ releaseDigest?: string;
44
51
  state: GateState;
45
52
  /** When the run recorded the pending fact the state is read against. */
46
53
  recordedAt: string;
54
+ /** The commit the run reached the gate at (#4020), from the pending fact. Absent on a fact written before chant 0.124.28. */
55
+ gitSha?: string;
56
+ /** The run that reached the gate (#4020), from the pending fact: an Op run id, or the CI run id. Absent when the run had none. */
57
+ runId?: string;
58
+ /**
59
+ * The change set the gate binds (#4022): `planDigest`, when a change-set
60
+ * document is stored under it in the member's `_change-sets/`, read with
61
+ * `chant change-set show <digest>`. Absent when none is stored, as for a
62
+ * component gate, which binds a lifecycle-plan digest.
63
+ */
64
+ changeSet?: string;
47
65
  expiresAt: string;
48
66
  /** The approvals that count toward the gate for this plan, oldest first. */
49
67
  approvals: StatusGateApproval[];
@@ -97,6 +115,13 @@ export interface StatusGateLedger {
97
115
  * when it can't be read.
98
116
  */
99
117
  export type GateLedgerReader = (dir: string, commit: string, cwd: string) => Promise<Map<string, string> | null>;
118
+ /**
119
+ * Lists the file names in a stored change-set directory on the branch at
120
+ * `commit`, or an empty set when it doesn't exist or can't be read: a gate
121
+ * then shows no link, and its state is read the same.
122
+ */
123
+ export type ChangeSetLister = (dir: string, commit: string, cwd: string) => Promise<Set<string>>;
124
+ export declare const defaultChangeSetLister: ChangeSetLister;
100
125
  export declare const defaultGateLedgerReader: GateLedgerReader;
101
126
  /**
102
127
  * The exact `chant approve` line for a gate. A gate bound to a plan (#2300)
@@ -117,7 +142,7 @@ export declare function gatesInLedger(component: string, content: string, envs:
117
142
  malformed: number;
118
143
  };
119
144
  /** Read one member's gate ledger directory at `commit` and list its gates. */
120
- export declare function readMemberGates(dir: string, layout: "members" | "flat", commit: string | null, envs: readonly string[], cwd: string, now: string, read?: GateLedgerReader, rules?: GateRuleLookup): Promise<{
145
+ export declare function readMemberGates(dir: string, layout: "members" | "flat", commit: string | null, envs: readonly string[], cwd: string, now: string, read?: GateLedgerReader, rules?: GateRuleLookup, listChangeSets?: ChangeSetLister): Promise<{
121
146
  gates: StatusGate[];
122
147
  ledger: StatusGateLedger;
123
148
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"status-gates.d.ts","sourceRoot":"","sources":["../../src/workspace/status-gates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,EAAwC,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGzF,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,iFAOY,CAAC;AAC3C,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,CAAC;AAE1E,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,wGAAwG;IACxG,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,qGAAqG;IACrG,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,UAAU;IACzB,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,kGAAkG;IAClG,GAAG,EAAE,MAAM,GAAG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MAAM,CAAA;CAAE,CAmBtL;AAED,8EAA8E;AAC9E,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,SAAS,GAAG,MAAM,EAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,gBAA0C,EAChD,KAAK,GAAE,cAA2B,EAClC,cAAc,GAAE,eAAwC,GACvD,OAAO,CAAC;IAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAC,CA8B5D"}
@@ -22,6 +22,12 @@ import { execFileSync } from "node:child_process";
22
22
  import { samePlanDigest } from "../lifecycle/plan-digest.js";
23
23
  import { isPendingGateExpired, latestPendingGate, latestResolutionForPlan, parseGateLedger } from "../lifecycle/gate-ledger.js";
24
24
  import { humanQuorumSince, tallyGateApprovals } from "../op/gate.js";
25
+ import { CHANGE_SETS_DIR, changeSetFile } from "../lifecycle/change-set-store.js";
26
+ /** The stored change-set directory beside a gate ledger directory: `<prefix>_change-sets`. */
27
+ function changeSetDirFor(gatesDir) {
28
+ const at = gatesDir.lastIndexOf("/");
29
+ return at < 0 ? CHANGE_SETS_DIR : `${gatesDir.slice(0, at)}/${CHANGE_SETS_DIR}`;
30
+ }
25
31
  /** Why a member's gates can't be listed. Closed: a new code is a contract change. */
26
32
  export const GATE_REASON_CODES = [
27
33
  /** The checkout has no `chant/lifecycle` branch, so there is no ledger to read gates from. */
@@ -34,6 +40,14 @@ export const GATE_REASON_CODES = [
34
40
  function git(cwd, args) {
35
41
  return execFileSync("git", args, { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"], maxBuffer: 64 * 1024 * 1024 });
36
42
  }
43
+ export const defaultChangeSetLister = async (dir, commit, cwd) => {
44
+ try {
45
+ return new Set(git(cwd, ["ls-tree", "--name-only", `${commit}:${dir}`]).split("\n").filter(Boolean));
46
+ }
47
+ catch {
48
+ return new Set();
49
+ }
50
+ };
37
51
  export const defaultGateLedgerReader = async (dir, commit, cwd) => {
38
52
  try {
39
53
  git(cwd, ["rev-parse", "--verify", "--quiet", `${commit}:${dir}`]);
@@ -63,7 +77,10 @@ const approvalOf = (r) => ({ principal: r.resolvedBy, channel: r.origin ?? null,
63
77
  function decide(component, standing, facts, all, now, rule) {
64
78
  const gate = standing.gate;
65
79
  // #3163: under identity.gates, an unsigned approval, or one from outside the class, doesn't count, as a run reads it.
66
- const resolutions = rule === null ? all : all.filter((r) => r.gate !== gate || rule.refuses(r) === null);
80
+ // #4045: nor does an approval for another release, and an `empty` pass is never an approval.
81
+ const resolutions = all
82
+ .filter((r) => r.gate !== gate || (r.empty !== true && r.releaseDigest === standing.releaseDigest))
83
+ .filter((r) => rule === null || r.gate !== gate || rule.refuses(r) === null);
67
84
  const env = standing.environment ?? null;
68
85
  const since = standing.timestamp;
69
86
  const planDigest = standing.planDigest;
@@ -96,8 +113,11 @@ function decide(component, standing, facts, all, now, rule) {
96
113
  name: gate,
97
114
  env,
98
115
  planDigest: planDigest ?? null,
116
+ ...(standing.releaseDigest !== undefined ? { releaseDigest: standing.releaseDigest } : {}),
99
117
  state,
100
118
  recordedAt: standing.timestamp,
119
+ ...(standing.gitSha ? { gitSha: standing.gitSha } : {}),
120
+ ...(standing.runId ? { runId: standing.runId } : {}),
101
121
  expiresAt: standing.expiresAt,
102
122
  approvals: approvals.map(approvalOf),
103
123
  needed,
@@ -136,7 +156,7 @@ export function gatesInLedger(component, content, envs, now, rules = () => null)
136
156
  return { gates, malformed };
137
157
  }
138
158
  /** Read one member's gate ledger directory at `commit` and list its gates. */
139
- export async function readMemberGates(dir, layout, commit, envs, cwd, now, read = defaultGateLedgerReader, rules = () => null) {
159
+ export async function readMemberGates(dir, layout, commit, envs, cwd, now, read = defaultGateLedgerReader, rules = () => null, listChangeSets = defaultChangeSetLister) {
140
160
  const ledger = { layout, path: dir, shared: false, malformed: 0, reason: null };
141
161
  if (commit === null) {
142
162
  return { gates: [], ledger: { ...ledger, reason: { code: "gates-no-ledger", message: "the checkout has no chant/lifecycle branch, so no gate is recorded in it" } } };
@@ -158,5 +178,14 @@ export async function readMemberGates(dir, layout, commit, envs, cwd, now, read
158
178
  gates.push(...read.gates);
159
179
  ledger.malformed += read.malformed;
160
180
  }
181
+ // #4022: link each gate to the change set stored under its plan digest,
182
+ // in the same member's `_change-sets/` beside `_gates/`.
183
+ if (gates.some((g) => g.planDigest !== null)) {
184
+ const stored = await listChangeSets(changeSetDirFor(dir), commit, cwd);
185
+ for (const g of gates) {
186
+ if (g.planDigest !== null && stored.has(changeSetFile(g.planDigest)))
187
+ g.changeSet = g.planDigest;
188
+ }
189
+ }
161
190
  return { gates, ledger };
162
191
  }
@@ -57,6 +57,10 @@ export interface StatusStewardRun {
57
57
  status: OpRunRecord["status"];
58
58
  started: string;
59
59
  ended: string;
60
+ /** The commit the run built from (#4020). Absent on a record written before chant 0.124.28. */
61
+ gitSha?: string;
62
+ /** The CI run the Op ran in (#4020), when it ran in CI: the shape a release's `runOrigin` has. */
63
+ runOrigin?: OpRunRecord["runOrigin"];
60
64
  /**
61
65
  * The gate the run stopped at, for a `gated` run: its name, when the run
62
66
  * stopped there, the op it is recorded under (the Op's own, or the
@@ -1 +1 @@
1
- {"version":3,"file":"status-stewards.d.ts","sourceRoot":"","sources":["../../src/workspace/status-stewards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAIH,OAAO,EAAoC,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAM3F,OAAO,EAAyD,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC3G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjD,8FAA8F;AAC9F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AAC;IACvB;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,iBAAiB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CAC9D;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,OAAO,EAAE;QAAE,IAAI,EAAE,iBAAiB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACzD;AAED,0FAA0F;AAC1F,MAAM,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;AA2HtF;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,SAAU,EACd,GAAG,GAAE;IAAE,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,CAAA;CAAE,GAAG,IAAW,EAC9E,IAAI,GAAE;IAAE,aAAa,CAAC,EAAE,kBAAkB,CAAC;IAAC,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;CAAO,GAC1G,OAAO,CAAC,cAAc,CAAC,CAwGzB"}
@@ -228,6 +228,8 @@ export async function readMemberStewards(memberDir, env, now, kind = "chant", bo
228
228
  status: newest.status,
229
229
  started: newest.started,
230
230
  ended: newest.ended,
231
+ ...(newest.gitSha ? { gitSha: newest.gitSha } : {}),
232
+ ...(newest.runOrigin ? { runOrigin: newest.runOrigin } : {}),
231
233
  gate: newest.gate ? gateOf(newest.gate, op.name) : null,
232
234
  point: point?.wait ?? null,
233
235
  phases: newest.phases.map((p) => ({
@@ -41,6 +41,8 @@ import { type BoxIntent } from "./box-intent.js";
41
41
  import { type MemberFields } from "./kinds.js";
42
42
  import { type FactoryView, type ListingView, type Plantable } from "./box-factory.js";
43
43
  import { type ErrorLocation } from "./declaration.js";
44
+ import { type PromotionStep } from "./promotion-order.js";
45
+ import { type ReleaseSignatureCheck } from "./identity-gate-rule.js";
44
46
  import { type GateLedgerReader, type StatusGate, type StatusGateLedger } from "./status-gates.js";
45
47
  import { readMemberStewards, type StatusSteward, type StewardReasonCode } from "./status-stewards.js";
46
48
  /** The version of the `status` output this chant writes. */
@@ -78,6 +80,14 @@ export interface StatusRelease {
78
80
  runId: string;
79
81
  timestamp: string;
80
82
  actor: string;
83
+ /** Who approved the change at its gate (#1035), when it had one. Null for an ungated release. */
84
+ approver: string | null;
85
+ /** The gate resolution that admitted the release (#4020): the gate and when it was resolved. Null for an ungated release and for one recorded before chant 0.124.28. */
86
+ admission: {
87
+ op: string;
88
+ gate: string;
89
+ resolvedAt: string;
90
+ } | null;
81
91
  /** Read flags, such as `legacy-digest` (#2514). */
82
92
  flags: string[];
83
93
  /**
@@ -149,6 +159,33 @@ export interface StatusMember {
149
159
  code: StewardReasonCode;
150
160
  message: string;
151
161
  }[];
162
+ /**
163
+ * The member's promotion order (#4030): the literal entries of the
164
+ * `environments` array in its chant.config.ts, in order, each with whether
165
+ * it is marked canary. A release moves from each step to the next. `[]`
166
+ * when the config declares no environments, null when it could not be read.
167
+ * Added in contract 1 by chant 0.124.28.
168
+ */
169
+ promotionOrder: PromotionStep[] | null;
170
+ /**
171
+ * The member's release cuts (#4026, ws-104), oldest first, each with
172
+ * whether its signature verifies for its actor against the signers at
173
+ * base and, when the declaration names a `release` gate with a class,
174
+ * whether the actor is in it (#4031). `[]` when none is cut, null when the
175
+ * cuts could not be read. Added in contract 1 by chant 0.124.28.
176
+ */
177
+ releaseCuts: StatusReleaseCut[] | null;
178
+ }
179
+ /** One cut of a member's release (#4031), as `status --json` lists it. */
180
+ export interface StatusReleaseCut {
181
+ releaseDigest: string;
182
+ label: string | null;
183
+ /** The release's commit, or null when its release file can't be read. */
184
+ commit: string | null;
185
+ actor: string;
186
+ timestamp: string;
187
+ signature: string | null;
188
+ signatureCheck: ReleaseSignatureCheck;
152
189
  }
153
190
  /** The most paths `ship.pending.paths` lists; `files` still counts them all. */
154
191
  export declare const SHIP_PENDING_PATHS_MAX = 200;
@@ -308,6 +345,8 @@ export interface StatusQuery {
308
345
  now?: string;
309
346
  /** Reads one member's stewards; the declaration and ledger reader unless a test swaps it. */
310
347
  readStewards?: typeof readMemberStewards;
348
+ /** Reads one member's promotion order from its directory; its chant.config.ts unless a test swaps it. */
349
+ readPromotionOrder?: (dir: string) => Promise<PromotionStep[] | null>;
311
350
  }
312
351
  export declare function compareEnvironments(a: StatusEnvironment, b: StatusEnvironment): StatusCompare;
313
352
  /** Find the workspace, read every member's ledger and build the document `--json` prints. */
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/workspace/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAyC,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACxG,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAgC,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAyC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAqD,KAAK,WAAW,EAAE,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C,EAAE,gBAAgB,CAAC;IAC7B,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,YAAY,CAAC,EAAE,OAAO,kBAAkB,CAAC;IACzC,yGAAyG;IACzG,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,CAAC;CACvE;AAiJD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAW7F;AAED,6FAA6F;AAC7F,wBAAsB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAyHjF;AAwDD,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuC7E;AAeD,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,MAAM,CAoEvF"}
@@ -47,7 +47,9 @@ import { resolveBoxIntents, unresolvedIntent } from "./box-intent.js";
47
47
  import { loadKindRegistry, resolveMemberFields } from "./kinds.js";
48
48
  import { factoryView, listingView, plantability, treeBytes } from "./box-factory.js";
49
49
  import { declaredRecordKinds, extensionsAt, readDeclaration, readerVersion, WorkspaceReadError } from "./declaration.js";
50
- import { gateAdmissionFrom } from "./identity.js";
50
+ import { readMemberPromotionOrder } from "./promotion-order.js";
51
+ import { gateAdmissionFrom, releaseRuleFrom } from "./identity.js";
52
+ import { checkReleaseSignature } from "./identity-gate-rule.js";
51
53
  import { scopeSource } from "./write-scope.js";
52
54
  import { GATE_REASON_CODES, readMemberGates } from "./status-gates.js";
53
55
  import { STEWARD_REASON_CODES, readMemberStewards } from "./status-stewards.js";
@@ -216,6 +218,8 @@ async function readEnvironment(member, env, cwd, read) {
216
218
  runId: r.runId,
217
219
  timestamp: r.timestamp,
218
220
  actor: r.actor,
221
+ approver: r.approver ?? null,
222
+ admission: r.admission ? { op: r.admission.op, gate: r.admission.gate, resolvedAt: r.admission.resolvedAt } : null,
219
223
  flags: [...(r.flags ?? [])],
220
224
  plan: await readReleasePlan(r.digest, { cwd, prefix: planPrefix }),
221
225
  })));
@@ -271,6 +275,7 @@ export async function workspaceStatus(query) {
271
275
  // #3163: the declaration's identity.gates at base, read once for every member's gates.
272
276
  const ruleSource = scopeSource(found.dir);
273
277
  const rules = (gate) => gateAdmissionFrom(ruleSource, gate);
278
+ const releaseRule = releaseRuleFrom(ruleSource).rule;
274
279
  const members = [];
275
280
  for (const m of declaration.members) {
276
281
  const environments = [];
@@ -318,6 +323,8 @@ export async function workspaceStatus(query) {
318
323
  },
319
324
  stewards: stewards.stewards,
320
325
  stewardReasons: stewards.reasons,
326
+ promotionOrder: await (query.readPromotionOrder ?? readMemberPromotionOrder)(resolve(found.dir, m.dir)),
327
+ releaseCuts: await readReleaseCuts(resolve(found.dir, m.dir), releaseRule),
321
328
  ...x(m.pointer),
322
329
  });
323
330
  }
@@ -365,6 +372,36 @@ export async function workspaceStatus(query) {
365
372
  throw err;
366
373
  }
367
374
  }
375
+ /**
376
+ * A member's release cuts with their signatures judged (#4031), read from
377
+ * its ledger on the local `chant/lifecycle`. Null when they can't be read.
378
+ */
379
+ async function readReleaseCuts(memberDir, rule) {
380
+ try {
381
+ const { readCuts, readRelease } = await import("../lifecycle/release-store.js");
382
+ const loc = { cwd: memberDir };
383
+ const { cuts } = await readCuts(loc);
384
+ const commits = new Map();
385
+ const out = [];
386
+ for (const c of cuts) {
387
+ if (!commits.has(c.releaseDigest))
388
+ commits.set(c.releaseDigest, (await readRelease(c.releaseDigest, loc))?.commit ?? null);
389
+ out.push({
390
+ releaseDigest: c.releaseDigest,
391
+ label: c.label,
392
+ commit: commits.get(c.releaseDigest) ?? null,
393
+ actor: c.actor,
394
+ timestamp: c.timestamp,
395
+ signature: c.signature,
396
+ signatureCheck: checkReleaseSignature(rule, c),
397
+ });
398
+ }
399
+ return out;
400
+ }
401
+ catch {
402
+ return null;
403
+ }
404
+ }
368
405
  /**
369
406
  * The work leases of the flat ledger and of each member's (#2732). Leases are
370
407
  * env-independent, so the environment asked for doesn't narrow them. Never
@@ -491,6 +528,16 @@ export function formatStatus(doc) {
491
528
  rows.push([a.member ? `${a.member}/${a.item}` : a.item, a.state ?? "-", `${a.met}/${a.total}`]);
492
529
  lines.push(...table(rows));
493
530
  }
531
+ const cut = doc.members.filter((m) => (m.releaseCuts ?? []).length > 0);
532
+ if (cut.length > 0) {
533
+ lines.push("");
534
+ const rows = [["MEMBER", "RELEASE", "COMMIT", "CUT BY", "SIGNATURE"]];
535
+ for (const m of cut) {
536
+ for (const c of m.releaseCuts)
537
+ rows.push([m.name, c.label ?? c.releaseDigest.slice(0, 24), c.commit?.slice(0, 12) ?? "-", c.actor, c.signatureCheck.status]);
538
+ }
539
+ lines.push(...table(rows));
540
+ }
494
541
  const boxes = doc.members.filter((m) => m.box?.isolation);
495
542
  if (boxes.length > 0) {
496
543
  lines.push("");
@@ -228,6 +228,44 @@
228
228
  "message": { "type": "string" }
229
229
  }
230
230
  }
231
+ },
232
+ "promotionOrder": {
233
+ "description": "The member's promotion order (#4030): the literal entries of the environments array in its chant.config.ts, in order, with a pattern entry such as pr-* left out. A release moves from each step to the next, and components promote --to defaults --from to the step before. Empty when the config declares no environments, and null when it could not be read. canary is declared and shown only; no chant command acts on it yet. Optional: written from chant 0.124.28, absent from older output.",
234
+ "type": ["array", "null"],
235
+ "items": {
236
+ "type": "object",
237
+ "required": ["name", "canary"],
238
+ "properties": {
239
+ "name": { "type": "string" },
240
+ "canary": { "type": "boolean", "description": "True when the entry sets canary: true." }
241
+ }
242
+ }
243
+ },
244
+ "releaseCuts": {
245
+ "description": "The member's release cuts (#4026, ws-104), oldest first, from _releases/cuts.jsonl on the local chant/lifecycle, each with whether its signature verifies (#4031). Empty when none is cut, null when the cuts could not be read. Optional: written from chant 0.124.28, absent from older output.",
246
+ "type": ["array", "null"],
247
+ "items": {
248
+ "type": "object",
249
+ "required": ["releaseDigest", "label", "commit", "actor", "timestamp", "signature", "signatureCheck"],
250
+ "properties": {
251
+ "releaseDigest": { "type": "string", "pattern": "^(jcs1-)?sha256:[0-9a-f]{64}$" },
252
+ "label": { "type": ["string", "null"] },
253
+ "commit": { "type": ["string", "null"], "description": "The release's commit, or null when its release file can't be read." },
254
+ "actor": { "type": "string", "description": "Who cut it." },
255
+ "timestamp": { "type": "string", "description": "ISO 8601." },
256
+ "signature": { "type": ["string", "null"], "description": "The cut's armored ssh signature in the chant-release namespace over the release digest, the label (empty for none), the actor and the timestamp, joined by LF. Null for an unsigned cut." },
257
+ "signatureCheck": {
258
+ "type": "object",
259
+ "description": "Whether signature verifies for actor against the signers file at base and, when the declaration at base names a release gate in identity.gates with a class, whether .chant/trust.json at base puts actor in it. Judged on every read.",
260
+ "required": ["status", "key", "reason"],
261
+ "properties": {
262
+ "status": { "enum": ["verified", "unsigned", "unverified"] },
263
+ "key": { "type": ["string", "null"], "description": "The fingerprint of the key in the signature. Reported, never trusted." },
264
+ "reason": { "type": "string" }
265
+ }
266
+ }
267
+ }
268
+ }
231
269
  }
232
270
  }
233
271
  },
@@ -313,6 +351,17 @@
313
351
  "status": { "enum": ["ok", "fail", "gated", "waiting"], "description": "waiting: an activity asked a decision point that is still open (#2749), and the run stopped there." },
314
352
  "started": { "type": "string" },
315
353
  "ended": { "type": "string" },
354
+ "gitSha": { "type": "string", "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The commit the run built from. Absent on a record written by an older chant, and when the run knew no commit." },
355
+ "runOrigin": {
356
+ "type": "object",
357
+ "required": ["forge"],
358
+ "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The CI run the Op ran in, the shape a release's runOrigin has: the forge (github for GitHub and Forgejo, gitlab), the repo or project, and a link to the run. Absent outside CI.",
359
+ "properties": {
360
+ "forge": { "enum": ["github", "gitlab", "op", "local"] },
361
+ "repo": { "type": "string" },
362
+ "url": { "type": "string" }
363
+ }
364
+ },
316
365
  "gate": {
317
366
  "oneOf": [
318
367
  { "type": "null" },
@@ -828,6 +877,10 @@
828
877
  "description": "Read from the newest pending fact for the gate in env, as a run reads it. approved: the approvals recorded since it, for its plan, pass the gate (its quorum, or a policy permit in enforce mode). expired: not approved, and the pending fact is past expiresAt, so the next run records a fresh one. superseded: not approved, and an approval recorded since it names a different plan, so it doesn't count. pending: none of these."
829
878
  },
830
879
  "recordedAt": { "type": "string", "description": "When the run recorded the pending fact." },
880
+ "gitSha": { "type": "string", "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The commit the run reached the gate at, from the pending fact. Absent on a fact recorded by an older chant, and when the run knew no commit. It joins the gate to a release's gitSha and to a run's." },
881
+ "runId": { "type": "string", "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The run that reached the gate: an Op run id, or the CI run id for a component gate that ran in CI. Absent when the run had none." },
882
+ "changeSet": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4022, written by chant 0.124.28 and newer. The change set the gate binds: planDigest, when a change-set document is stored under it in the member's _change-sets/ on chant/lifecycle, as a pull-request gate's apply and a release gate (#4045) store it. chant change-set show <changeSet> --json prints it, each entry with its graph node. Absent when none is stored, as for a component gate, which binds a lifecycle-plan digest." },
883
+ "releaseDigest": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4045, written by chant 0.124.28 and newer. The release the gate binds, from the pending fact: set on a release gate, the gate chant components promote --release passes for an environment, whose component is the op release. An approval counts toward it only when it was recorded for this release, environment and planDigest. Absent on every other gate." },
831
884
  "expiresAt": { "type": "string" },
832
885
  "approvals": {
833
886
  "description": "The approvals that count toward the gate for its plan, oldest first.",
@@ -912,12 +965,28 @@
912
965
  "required": ["component", "digest", "gitSha", "inputDigest", "runId", "timestamp", "actor", "flags", "plan"],
913
966
  "properties": {
914
967
  "component": { "type": "string" },
915
- "digest": { "type": "string", "description": "The artifact digest the release deployed." },
968
+ "digest": { "type": "string", "description": "What the deploy record names, as its producer writes it: an artifact digest, a release-plan digest for a runner that records plans (_plans/<digest>.json, ws-055), or a product's own digest such as a schema digest (ws-104 question 3)." },
916
969
  "gitSha": { "type": "string", "description": "The commit the artifact was built from." },
917
970
  "inputDigest": { "type": ["string", "null"], "description": "The input-side digest when digest is a rendered one. Compare joins on it when present." },
918
971
  "runId": { "type": "string" },
919
972
  "timestamp": { "type": "string" },
920
973
  "actor": { "type": "string" },
974
+ "approver": { "type": ["string", "null"], "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer; the ledger has carried it since #1035. Who approved the change at its gate, or null for an ungated release." },
975
+ "admission": {
976
+ "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The gate resolution that admitted the release, or null for an ungated release and for one recorded by an older chant. With approver it names the line in the gate ledger.",
977
+ "oneOf": [
978
+ { "type": "null" },
979
+ {
980
+ "type": "object",
981
+ "required": ["op", "gate", "resolvedAt"],
982
+ "properties": {
983
+ "op": { "type": "string", "description": "The op, or for a component gate the component, whose gate ledger (_gates/<op>.jsonl) holds the resolution." },
984
+ "gate": { "type": "string", "description": "The gate's name." },
985
+ "resolvedAt": { "type": "string", "description": "When the resolution was recorded. The newest one, when several approvals counted." }
986
+ }
987
+ }
988
+ ]
989
+ },
921
990
  "flags": { "type": "array", "items": { "enum": ["legacy-digest"] } },
922
991
  "plan": {
923
992
  "type": ["object", "null"],
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The statement a ci tag carries (#4031): a runner's signed word that a
3
+ * commit went green, or went red after it was green.
4
+ *
5
+ * `ci/green/<sha>` and `ci/revoked/<sha>` are plain git tags (ws-103), so
6
+ * anyone who may push a tag could make one by hand and go around CI. When the
7
+ * declaration sets `ci.green.signedSince` to a commit, a tag on any commit
8
+ * that is not a strict first-parent ancestor of it counts only when its
9
+ * annotation holds a statement signed by a runner key, and readers ignore
10
+ * and report a tag without a valid one.
11
+ *
12
+ * The statement reuses what runner evidence (#2553, ws-069) and the agent-run
13
+ * statement (#3192, ws-090) already use: an in-toto Statement v1 in a DSSE
14
+ * envelope (./dsse.ts), signed with an Ed25519 key that `.chant/trust.json`
15
+ * at base lists under `runners`. The key's principal must also hold the
16
+ * `runner` role there, since a tag says CI ran. A key the signers file lists
17
+ * is never a runner key (./policy.ts).
18
+ *
19
+ * - `subject`: the tagged commit, by `digest.gitCommit`.
20
+ * - `predicate`: the signer's principal and the tag's JSON record as the
21
+ * annotation holds it (`tag`, `commit`, `branch`, `at`, and the phases'
22
+ * runs for a green tag or the failed phase and run for a revoked one).
23
+ *
24
+ * The envelope sits in the annotation's JSON record as `statement`, beside
25
+ * the fields it signs, so a reader that does not know it reads the record as
26
+ * before. Verifying needs the tag, the envelope and the runner keys at base,
27
+ * so it works offline, and every read verifies again.
28
+ */
29
+ import { z } from "zod";
30
+ import { type DsseEnvelope } from "./dsse.js";
31
+ import type { KeyObject } from "node:crypto";
32
+ import type { RunnerKey } from "./policy.js";
33
+ export declare const CI_TAG_PREDICATE = "https://intentius.io/chant/ci-tag/v1";
34
+ /** The role a tag's signer must hold in `.chant/trust.json` (#4031): the core class `runner`. */
35
+ export declare const CI_TAG_SIGNER_ROLE = "runner";
36
+ /** The statement a ci tag carries. Strict at the top, so a verifier never acts on a field it does not know. */
37
+ export declare const ciTagStatementSchema: z.ZodObject<{
38
+ _type: z.ZodLiteral<"https://in-toto.io/Statement/v1">;
39
+ subject: z.ZodArray<z.ZodObject<{
40
+ name: z.ZodString;
41
+ digest: z.ZodObject<{
42
+ gitCommit: z.ZodString;
43
+ }, z.core.$strict>;
44
+ }, z.core.$strict>>;
45
+ predicateType: z.ZodLiteral<"https://intentius.io/chant/ci-tag/v1">;
46
+ predicate: z.ZodObject<{
47
+ signer: z.ZodString;
48
+ record: z.ZodObject<{
49
+ schema: z.ZodLiteral<1>;
50
+ tag: z.ZodEnum<{
51
+ green: "green";
52
+ revoked: "revoked";
53
+ }>;
54
+ commit: z.ZodString;
55
+ branch: z.ZodString;
56
+ at: z.ZodString;
57
+ }, z.core.$loose>;
58
+ }, z.core.$strict>;
59
+ }, z.core.$strict>;
60
+ export type CiTagStatement = z.infer<typeof ciTagStatementSchema>;
61
+ /** A tag's JSON record, without the statement. */
62
+ export type CiTagRecord = Record<string, unknown> & {
63
+ tag: "green" | "revoked";
64
+ commit: string;
65
+ branch: string;
66
+ };
67
+ /** Whoever signs the tags a tick makes: a runner key and the principal `.chant/trust.json` lists it for. */
68
+ export interface CiTagSigner {
69
+ principal: string;
70
+ key: KeyObject;
71
+ publicKey: string;
72
+ }
73
+ export declare function buildCiTagStatement(record: CiTagRecord, signer: string): CiTagStatement;
74
+ /** The envelope a tag's record carries as `statement`, signed by `signer`. */
75
+ export declare function signCiTagRecord(record: CiTagRecord, signer: CiTagSigner): DsseEnvelope;
76
+ /**
77
+ * Why a tag is ignored: it has no statement, the statement is not one, no
78
+ * runner key at base signed it, or it signs another tag's facts. The same
79
+ * words a run's attestation uses (`./run-statement.ts`).
80
+ */
81
+ export type CiTagFailure = "unsigned" | "invalid" | "untrusted" | "mismatch";
82
+ export type CiTagVerdict = {
83
+ status: "signed";
84
+ signer: string;
85
+ keyid: string;
86
+ reason: string;
87
+ } | {
88
+ status: CiTagFailure;
89
+ reason: string;
90
+ };
91
+ /**
92
+ * Verify the statement in a tag's record. `expect` is what the tag itself
93
+ * says: the commit its name gives, its kind and the declared branch. The
94
+ * signer's key must be a runner key at base and its principal must hold the
95
+ * `runner` role in `roles`. Never throws.
96
+ */
97
+ export declare function verifyCiTagStatement(record: Record<string, unknown> | null, expect: {
98
+ sha: string;
99
+ kind: "green" | "revoked";
100
+ branch: string;
101
+ }, runners: readonly RunnerKey[], roles: Readonly<Record<string, readonly string[]>>): CiTagVerdict;
102
+ //# sourceMappingURL=ci-tag-statement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-tag-statement.d.ts","sourceRoot":"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