@intentius/chant 0.124.108 → 0.124.110

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 (342) hide show
  1. package/dist/__golden__/wave-loop/fan-out-applied.json +12 -6
  2. package/dist/__golden__/wave-loop/fan-out-apply-fails.json +8 -4
  3. package/dist/__golden__/wave-loop/fan-out-gated.json +4 -2
  4. package/dist/__golden__/wave-loop/fan-out-no-members.json +16 -8
  5. package/dist/__golden__/wave-loop/fan-out-plan-fails.json +8 -4
  6. package/dist/__golden__/wave-loop/fan-out-same-root.json +4 -2
  7. package/dist/agent-facts.d.ts +130 -0
  8. package/dist/agent-facts.js +196 -0
  9. package/dist/change-risk.d.ts +216 -0
  10. package/dist/change-risk.js +304 -0
  11. package/dist/change-set.d.ts +8 -0
  12. package/dist/ci-agent-alert.d.ts +139 -0
  13. package/dist/ci-agent-alert.js +342 -0
  14. package/dist/ci-agent-triggers.d.ts +152 -0
  15. package/dist/ci-agent-triggers.js +232 -0
  16. package/dist/ci-agent-verify-failed.d.ts +149 -0
  17. package/dist/ci-agent-verify-failed.js +191 -0
  18. package/dist/ci-agent.d.ts +136 -8
  19. package/dist/ci-agent.js +353 -26
  20. package/dist/ci-comment-commands.d.ts +8 -0
  21. package/dist/ci-comment-commands.js +17 -1
  22. package/dist/ci-comment-reject.d.ts +70 -0
  23. package/dist/ci-comment-reject.js +135 -0
  24. package/dist/ci-comment-replies.d.ts +3 -1
  25. package/dist/ci-comment-replies.js +6 -0
  26. package/dist/ci-estate/delivery.d.ts +25 -3
  27. package/dist/ci-estate/delivery.js +28 -9
  28. package/dist/ci-estate/page.d.ts +7 -3
  29. package/dist/ci-estate/page.js +19 -4
  30. package/dist/ci-estate/rows.d.ts +14 -2
  31. package/dist/ci-estate/rows.js +9 -1
  32. package/dist/ci-estate.d.ts +5 -2
  33. package/dist/ci-estate.js +3 -2
  34. package/dist/ci-handover.d.ts +2 -7
  35. package/dist/ci-handover.js +3 -20
  36. package/dist/ci-jobs.d.ts +6 -0
  37. package/dist/ci-jobs.js +17 -0
  38. package/dist/ci-note-commands.d.ts +2 -0
  39. package/dist/ci-note-commands.js +12 -1
  40. package/dist/ci-product-words.d.ts +151 -1
  41. package/dist/ci-product-words.js +1390 -3
  42. package/dist/ci-product.d.ts +100 -4
  43. package/dist/ci-product.js +99 -3
  44. package/dist/ci-respond-run.d.ts +9 -0
  45. package/dist/ci-respond-run.js +35 -4
  46. package/dist/ci-respond-summary-env.d.ts +56 -0
  47. package/dist/ci-respond-summary-env.js +81 -0
  48. package/dist/ci-respond-summary.d.ts +103 -0
  49. package/dist/ci-respond-summary.js +243 -0
  50. package/dist/ci-respond.d.ts +4 -2
  51. package/dist/ci-respond.js +4 -2
  52. package/dist/cli/command-group.js +1 -1
  53. package/dist/cli/commands/lint.js +21 -3
  54. package/dist/cli/handlers/agent.js +49 -4
  55. package/dist/cli/handlers/approve.js +3 -1
  56. package/dist/cli/handlers/build.d.ts +97 -1
  57. package/dist/cli/handlers/build.js +251 -3
  58. package/dist/cli/handlers/fan-out.js +55 -0
  59. package/dist/cli/handlers/graph.d.ts +14 -0
  60. package/dist/cli/handlers/graph.js +58 -3
  61. package/dist/cli/handlers/lifecycle-health.d.ts +7 -0
  62. package/dist/cli/handlers/lifecycle-health.js +47 -9
  63. package/dist/cli/handlers/lifecycle.js +4 -1
  64. package/dist/cli/handlers/notify-relay.d.ts +2 -2
  65. package/dist/cli/handlers/notify-relay.js +67 -7
  66. package/dist/cli/handlers/pipeline-agent.d.ts +30 -0
  67. package/dist/cli/handlers/pipeline-agent.js +255 -0
  68. package/dist/cli/handlers/pipeline-artifacts.d.ts +39 -0
  69. package/dist/cli/handlers/pipeline-artifacts.js +203 -0
  70. package/dist/cli/handlers/pipeline.d.ts +16 -0
  71. package/dist/cli/handlers/pipeline.js +112 -0
  72. package/dist/cli/handlers/pr-comment.js +4 -0
  73. package/dist/cli/handlers/pr-notes.js +4 -1
  74. package/dist/cli/handlers/pr.d.ts +20 -0
  75. package/dist/cli/handlers/pr.js +114 -11
  76. package/dist/cli/handlers/promote.js +792 -47
  77. package/dist/cli/handlers/reject.d.ts +84 -0
  78. package/dist/cli/handlers/reject.js +216 -0
  79. package/dist/cli/handlers/release.js +4 -2
  80. package/dist/cli/handlers/replan.d.ts +54 -0
  81. package/dist/cli/handlers/replan.js +177 -0
  82. package/dist/cli/handlers/run-generate.d.ts +5 -0
  83. package/dist/cli/handlers/run-generate.js +31 -4
  84. package/dist/cli/handlers/run-wave.js +15 -2
  85. package/dist/cli/handlers/run.js +4 -2
  86. package/dist/cli/handlers/stage.d.ts +35 -0
  87. package/dist/cli/handlers/stage.js +90 -0
  88. package/dist/cli/lsp/server.js +4 -0
  89. package/dist/cli/main.js +88 -8
  90. package/dist/cli/parse-args.js +35 -2
  91. package/dist/cli/registry.d.ts +12 -0
  92. package/dist/components/auto-release.d.ts +2 -0
  93. package/dist/components/auto-release.js +1 -0
  94. package/dist/components/capability.d.ts +40 -0
  95. package/dist/components/cli-support.d.ts +21 -1
  96. package/dist/components/cli-support.js +28 -6
  97. package/dist/components/component.d.ts +23 -4
  98. package/dist/components/component.schema.json +28 -0
  99. package/dist/components/declared-reads.d.ts +44 -4
  100. package/dist/components/declared-reads.js +80 -3
  101. package/dist/components/discover.d.ts +8 -0
  102. package/dist/components/discover.js +1 -1
  103. package/dist/components/driver.d.ts +13 -0
  104. package/dist/components/driver.js +23 -2
  105. package/dist/components/environment-sets.d.ts +229 -0
  106. package/dist/components/environment-sets.js +338 -0
  107. package/dist/components/fan-out-canary.d.ts +47 -0
  108. package/dist/components/fan-out-canary.js +58 -0
  109. package/dist/components/fan-out-run.d.ts +17 -0
  110. package/dist/components/fan-out-run.js +14 -1
  111. package/dist/components/fan-out-support.d.ts +7 -0
  112. package/dist/components/fan-out-support.js +1 -1
  113. package/dist/components/groups.d.ts +8 -1
  114. package/dist/components/groups.js +19 -1
  115. package/dist/components/index.d.ts +5 -2
  116. package/dist/components/index.js +4 -1
  117. package/dist/components/pr-cost.d.ts +28 -0
  118. package/dist/components/pr-cost.js +53 -0
  119. package/dist/components/pr-pipeline.d.ts +33 -0
  120. package/dist/components/pr-pipeline.js +32 -5
  121. package/dist/components/pr-policy.d.ts +33 -2
  122. package/dist/components/pr-policy.js +5 -2
  123. package/dist/components/pr-risk.d.ts +42 -0
  124. package/dist/components/pr-risk.js +74 -0
  125. package/dist/components/product-pipeline.d.ts +43 -0
  126. package/dist/components/product-pipeline.js +67 -1
  127. package/dist/components/promote.d.ts +6 -0
  128. package/dist/components/promote.js +13 -0
  129. package/dist/components/release-compile.js +3 -1
  130. package/dist/components/release-gate.d.ts +6 -1
  131. package/dist/components/release-gate.js +10 -2
  132. package/dist/components/step-environments.d.ts +236 -0
  133. package/dist/components/step-environments.js +392 -0
  134. package/dist/components/upstream-replan.d.ts +201 -0
  135. package/dist/components/upstream-replan.js +249 -0
  136. package/dist/components/verify-step.d.ts +30 -0
  137. package/dist/components/verify-step.js +27 -0
  138. package/dist/components/wave-plan.js +6 -2
  139. package/dist/config-environments.d.ts +4 -2
  140. package/dist/control/dispatch.d.ts +15 -0
  141. package/dist/control/dispatch.js +28 -4
  142. package/dist/cost-estimate.d.ts +188 -0
  143. package/dist/cost-estimate.js +363 -0
  144. package/dist/drift-record.d.ts +36 -0
  145. package/dist/drift-record.js +44 -0
  146. package/dist/engine-facts.d.ts +105 -0
  147. package/dist/engine-facts.js +111 -0
  148. package/dist/exit-codes.d.ts +4 -3
  149. package/dist/exit-codes.js +4 -3
  150. package/dist/flag-params.d.ts +2 -2
  151. package/dist/flag-params.js +9 -4
  152. package/dist/floor-table.data.js +53 -0
  153. package/dist/forge-token-vars.d.ts +12 -0
  154. package/dist/forge-token-vars.js +25 -0
  155. package/dist/gate-decision.d.ts +3 -1
  156. package/dist/gate-decision.js +3 -1
  157. package/dist/gated-waves.d.ts +2 -0
  158. package/dist/gated-waves.js +1 -0
  159. package/dist/graph-ir.d.ts +30 -0
  160. package/dist/graph-ir.js +33 -1
  161. package/dist/graph-refs.d.ts +26 -0
  162. package/dist/graph-refs.js +34 -3
  163. package/dist/graph-schema/graph.schema.json +136 -0
  164. package/dist/health.d.ts +65 -0
  165. package/dist/health.js +62 -0
  166. package/dist/lexicon.d.ts +188 -1
  167. package/dist/lifecycle/disruption.d.ts +14 -1
  168. package/dist/lifecycle/disruption.js +5 -1
  169. package/dist/lifecycle/gate-change-set.d.ts +8 -0
  170. package/dist/lifecycle/gate-change-set.js +2 -1
  171. package/dist/lifecycle/gate-ledger.d.ts +26 -0
  172. package/dist/lifecycle/gate-rejection.d.ts +82 -0
  173. package/dist/lifecycle/gate-rejection.js +93 -0
  174. package/dist/lifecycle/gate-seal.d.ts +3 -3
  175. package/dist/lifecycle/gate-seal.js +5 -5
  176. package/dist/lifecycle/observe.d.ts +17 -0
  177. package/dist/lifecycle/observe.js +10 -1
  178. package/dist/lifecycle/release-cut.js +4 -0
  179. package/dist/lifecycle/release-ledger.d.ts +8 -0
  180. package/dist/lifecycle/release-risk.d.ts +137 -0
  181. package/dist/lifecycle/release-risk.js +214 -0
  182. package/dist/lifecycle/release-store.d.ts +9 -0
  183. package/dist/lifecycle/release-store.js +4 -0
  184. package/dist/lifecycle/stage-log.d.ts +85 -0
  185. package/dist/lifecycle/stage-log.js +141 -0
  186. package/dist/lint/canary-checks.d.ts +31 -0
  187. package/dist/lint/canary-checks.js +45 -0
  188. package/dist/lint/rule.d.ts +1 -0
  189. package/dist/lint/rules/evl012-pipeline-fold.d.ts +14 -0
  190. package/dist/lint/rules/evl012-pipeline-fold.js +30 -0
  191. package/dist/lint/rules/index.d.ts +1 -0
  192. package/dist/lint/rules/index.js +3 -0
  193. package/dist/notify-relay-repo.d.ts +54 -0
  194. package/dist/notify-relay-repo.js +84 -0
  195. package/dist/notify-relay.d.ts +53 -3
  196. package/dist/notify-relay.js +96 -3
  197. package/dist/notify.d.ts +57 -1
  198. package/dist/notify.js +7 -1
  199. package/dist/notify.schema.json +61 -3
  200. package/dist/observation.d.ts +34 -0
  201. package/dist/observation.js +14 -1
  202. package/dist/op/activities/review-agent.d.ts +39 -2
  203. package/dist/op/activities/review-agent.js +88 -5
  204. package/dist/op/agent-permit.d.ts +88 -0
  205. package/dist/op/agent-permit.js +97 -0
  206. package/dist/op/gate-approval-base.d.ts +8 -0
  207. package/dist/op/gate-approval-base.js +9 -0
  208. package/dist/op/gate-approval.d.ts +30 -1
  209. package/dist/op/gate-approval.js +23 -2
  210. package/dist/op/gate-quorum.d.ts +114 -8
  211. package/dist/op/gate-quorum.js +198 -21
  212. package/dist/op/gate-reject.d.ts +79 -0
  213. package/dist/op/gate-reject.js +96 -0
  214. package/dist/op/gate-summary.js +1 -1
  215. package/dist/op/gate.d.ts +28 -3
  216. package/dist/op/gate.js +55 -13
  217. package/dist/op/generate-pipeline.d.ts +15 -1
  218. package/dist/op/generate-pipeline.js +32 -5
  219. package/dist/op/index.d.ts +11 -6
  220. package/dist/op/index.js +10 -5
  221. package/dist/op/local-executor.d.ts +2 -0
  222. package/dist/op/local-executor.js +23 -4
  223. package/dist/op/op-waves-after-plan.d.ts +23 -0
  224. package/dist/op/op-waves-after-plan.js +12 -1
  225. package/dist/op/op-waves-capability-spec.d.ts +14 -0
  226. package/dist/op/op-waves-capability-spec.js +46 -6
  227. package/dist/op/op-waves-capability.d.ts +21 -13
  228. package/dist/op/op-waves-capability.js +22 -59
  229. package/dist/op/op-waves-environment-sets.d.ts +41 -0
  230. package/dist/op/op-waves-environment-sets.js +82 -0
  231. package/dist/op/op-waves-quorum-warnings.d.ts +53 -0
  232. package/dist/op/op-waves-quorum-warnings.js +90 -0
  233. package/dist/op/op-waves-release-port.d.ts +7 -0
  234. package/dist/op/op-waves-release-port.js +15 -3
  235. package/dist/op/op-waves-release.d.ts +15 -0
  236. package/dist/op/op-waves-release.js +15 -0
  237. package/dist/op/op-waves-run.d.ts +37 -3
  238. package/dist/op/op-waves-run.js +141 -18
  239. package/dist/op/op-waves-soak.d.ts +57 -0
  240. package/dist/op/op-waves-soak.js +111 -0
  241. package/dist/op/op-waves-split.d.ts +4 -0
  242. package/dist/op/op-waves-split.js +4 -0
  243. package/dist/op/op-waves.d.ts +67 -4
  244. package/dist/op/op-waves.js +71 -3
  245. package/dist/pipeline/agent-ajv.d.ts +4 -0
  246. package/dist/pipeline/agent-ajv.js +14 -0
  247. package/dist/pipeline/agent-steps.d.ts +329 -0
  248. package/dist/pipeline/agent-steps.js +602 -0
  249. package/dist/pipeline/artifacts.d.ts +264 -0
  250. package/dist/pipeline/artifacts.js +425 -0
  251. package/dist/pipeline/diff.d.ts +45 -0
  252. package/dist/pipeline/diff.js +177 -0
  253. package/dist/pipeline/fold.d.ts +43 -0
  254. package/dist/pipeline/fold.js +140 -0
  255. package/dist/pipeline/generate.d.ts +52 -0
  256. package/dist/pipeline/generate.js +120 -0
  257. package/dist/pipeline/product.d.ts +225 -0
  258. package/dist/pipeline/product.js +257 -0
  259. package/dist/pipeline/promote.d.ts +404 -0
  260. package/dist/pipeline/promote.js +694 -0
  261. package/dist/pipeline/read.d.ts +37 -0
  262. package/dist/pipeline/read.js +58 -0
  263. package/dist/pipeline/rendered.d.ts +25 -0
  264. package/dist/pipeline/rendered.js +53 -0
  265. package/dist/pipeline/soak-checks.d.ts +80 -0
  266. package/dist/pipeline/soak-checks.js +254 -0
  267. package/dist/pipeline/soak-gate.d.ts +97 -0
  268. package/dist/pipeline/soak-gate.js +176 -0
  269. package/dist/pipeline/soak-sources.d.ts +17 -0
  270. package/dist/pipeline/soak-sources.js +42 -0
  271. package/dist/pipeline/soak.d.ts +260 -0
  272. package/dist/pipeline/soak.js +378 -0
  273. package/dist/pipeline/spec.d.ts +724 -0
  274. package/dist/pipeline/spec.js +567 -0
  275. package/dist/pipeline/stage-ledger.d.ts +187 -0
  276. package/dist/pipeline/stage-ledger.js +185 -0
  277. package/dist/pipeline/stage-waves.d.ts +114 -0
  278. package/dist/pipeline/stage-waves.js +161 -0
  279. package/dist/pipeline/stages.d.ts +64 -0
  280. package/dist/pipeline/stages.js +174 -0
  281. package/dist/pipeline/verify-rollback.d.ts +277 -0
  282. package/dist/pipeline/verify-rollback.js +393 -0
  283. package/dist/pipeline.d.ts +142 -0
  284. package/dist/pipeline.js +143 -0
  285. package/dist/pr-loop.d.ts +22 -0
  286. package/dist/pr-loop.js +8 -0
  287. package/dist/pr-plan-note.d.ts +15 -1
  288. package/dist/pr-plan-note.js +8 -0
  289. package/dist/pr-post.d.ts +31 -0
  290. package/dist/pr-post.js +89 -0
  291. package/dist/release-floors.d.ts +1 -1
  292. package/dist/release-floors.js +1 -1
  293. package/dist/report-store/audit.schema.json +50 -0
  294. package/dist/report-store/dora.schema.json +331 -0
  295. package/dist/report-store/estate.schema.json +96 -0
  296. package/dist/report-store/run.schema.json +14 -0
  297. package/dist/report-store.d.ts +151 -0
  298. package/dist/report-store.js +344 -0
  299. package/dist/run-event.d.ts +7 -2
  300. package/dist/wave-runtime.mjs +458 -404
  301. package/dist/workspace/catalog-edges.js +3 -3
  302. package/dist/workspace/change-set.schema.json +4 -0
  303. package/dist/workspace/ci-cloud-identity.d.ts +4 -0
  304. package/dist/workspace/ci-cloud-identity.js +30 -0
  305. package/dist/workspace/ci-run.js +17 -2
  306. package/dist/workspace/ci-secrets.d.ts +3 -1
  307. package/dist/workspace/ci-secrets.js +7 -1
  308. package/dist/workspace/compose-graph.d.ts +1 -1
  309. package/dist/workspace/compose-graph.js +3 -1
  310. package/dist/workspace/declaration.d.ts +27 -0
  311. package/dist/workspace/declaration.js +35 -0
  312. package/dist/workspace/declaration.schema.json +56 -0
  313. package/dist/workspace/graph-cli.js +26 -0
  314. package/dist/workspace/graph.schema.json +5 -1
  315. package/dist/workspace/identity-gate-rule.d.ts +4 -0
  316. package/dist/workspace/identity-gate-rule.js +2 -2
  317. package/dist/workspace/identity-reject-rule.d.ts +14 -0
  318. package/dist/workspace/identity-reject-rule.js +24 -0
  319. package/dist/workspace/identity.d.ts +3 -0
  320. package/dist/workspace/identity.js +2 -1
  321. package/dist/workspace/nested-graph.js +2 -0
  322. package/dist/workspace/pr-report.schema.json +65 -0
  323. package/dist/workspace/promotion-order.d.ts +19 -4
  324. package/dist/workspace/promotion-order.js +26 -4
  325. package/dist/workspace/release-train.d.ts +14 -0
  326. package/dist/workspace/release-train.js +32 -0
  327. package/dist/workspace/run-event.schema.json +2 -2
  328. package/dist/workspace/stack-read-edges.d.ts +19 -0
  329. package/dist/workspace/stack-read-edges.js +54 -0
  330. package/dist/workspace/status-gates.d.ts +51 -1
  331. package/dist/workspace/status-gates.js +60 -0
  332. package/dist/workspace/status-stages.d.ts +223 -0
  333. package/dist/workspace/status-stages.js +279 -0
  334. package/dist/workspace/status.d.ts +45 -1
  335. package/dist/workspace/status.js +109 -5
  336. package/dist/workspace/status.schema.json +283 -2
  337. package/dist/workspace/train-cut.js +5 -2
  338. package/dist/workspace/train-shell.d.ts +18 -0
  339. package/dist/workspace/train-shell.js +43 -0
  340. package/dist/workspace/trust/seal.d.ts +7 -0
  341. package/dist/workspace/trust/seal.js +9 -0
  342. package/package.json +5 -1
@@ -29,13 +29,8 @@
29
29
  * (../workspace/ci-run.ts).
30
30
  */
31
31
  import type { ForgeKind } from "./pr-forge.js";
32
- /**
33
- * The variables a runner, a job or a secret may hold a forge token in.
34
- * A step that runs the change's code starts without them. The list is
35
- * terragucci's `STEP_TOKEN_VARS` (render.ts:1787) with chant's own names
36
- * (`FORGE_TOKEN_ENV` in ./pr-forge.ts) and GitLab's added.
37
- */
38
- export declare const FORGE_TOKEN_VARS: readonly ["CHANT_FORGE_TOKEN", "CHANT_GITHUB_TOKEN", "CHANT_FORGEJO_TOKEN", "CHANT_GITLAB_TOKEN", "CHANT_CHECKOUT_TOKEN", "GITHUB_TOKEN", "GH_TOKEN", "FORGEJO_TOKEN", "GITEA_TOKEN", "GITLAB_TOKEN", "CI_JOB_TOKEN", "ACTIONS_RUNTIME_TOKEN"];
32
+ import { FORGE_TOKEN_VARS } from "./forge-token-vars.js";
33
+ export { FORGE_TOKEN_VARS };
39
34
  /** `env` without {@link FORGE_TOKEN_VARS}. */
40
35
  export declare function withoutForgeTokens<T extends Record<string, string | undefined>>(env: T): T;
41
36
  /** Whether `env` holds a forge token under one of {@link FORGE_TOKEN_VARS}. */
@@ -28,26 +28,9 @@
28
28
  * forge token, and the runner posts from the report once the steps settle
29
29
  * (../workspace/ci-run.ts).
30
30
  */
31
- /**
32
- * The variables a runner, a job or a secret may hold a forge token in.
33
- * A step that runs the change's code starts without them. The list is
34
- * terragucci's `STEP_TOKEN_VARS` (render.ts:1787) with chant's own names
35
- * (`FORGE_TOKEN_ENV` in ./pr-forge.ts) and GitLab's added.
36
- */
37
- export const FORGE_TOKEN_VARS = [
38
- "CHANT_FORGE_TOKEN",
39
- "CHANT_GITHUB_TOKEN",
40
- "CHANT_FORGEJO_TOKEN",
41
- "CHANT_GITLAB_TOKEN",
42
- "CHANT_CHECKOUT_TOKEN",
43
- "GITHUB_TOKEN",
44
- "GH_TOKEN",
45
- "FORGEJO_TOKEN",
46
- "GITEA_TOKEN",
47
- "GITLAB_TOKEN",
48
- "CI_JOB_TOKEN",
49
- "ACTIONS_RUNTIME_TOKEN",
50
- ];
31
+ import { FORGE_TOKEN_VARS } from "./forge-token-vars.js";
32
+ // The list lives in ./forge-token-vars so the pull-request loop's bundle takes it alone (#5416).
33
+ export { FORGE_TOKEN_VARS };
51
34
  /** `env` without {@link FORGE_TOKEN_VARS}. */
52
35
  export function withoutForgeTokens(env) {
53
36
  const out = { ...env };
package/dist/ci-jobs.d.ts CHANGED
@@ -124,6 +124,12 @@ export declare function assertRunnerLabels(subject: string, field: string, runne
124
124
  * ({@link gitlabIdTokensDoc}).
125
125
  */
126
126
  export declare function idTokenAudienceEnv(idTokens: Readonly<Record<string, string>> | undefined): Record<string, string>;
127
+ /**
128
+ * What is wrong with `idTokens` (#5427), or undefined: it must be `{
129
+ * "<variable>": "<audience>" }` with at least one token, each a variable
130
+ * name and a non-empty audience.
131
+ */
132
+ export declare function idTokensProblem(field: string, idTokens: unknown): string | undefined;
127
133
  /** A job's GitLab `id_tokens:` for `{ <variable>: <audience> }` (#3914), or undefined when there are none. */
128
134
  export declare function gitlabIdTokensDoc(idTokens: Readonly<Record<string, string>> | undefined): Record<string, {
129
135
  aud: string;
package/dist/ci-jobs.js CHANGED
@@ -139,6 +139,23 @@ export function assertRunnerLabels(subject, field, runner, forge) {
139
139
  export function idTokenAudienceEnv(idTokens) {
140
140
  return Object.fromEntries(Object.entries(idTokens ?? {}).map(([name, aud]) => [`${name}_AUDIENCE`, aud]));
141
141
  }
142
+ /**
143
+ * What is wrong with `idTokens` (#5427), or undefined: it must be `{
144
+ * "<variable>": "<audience>" }` with at least one token, each a variable
145
+ * name and a non-empty audience.
146
+ */
147
+ export function idTokensProblem(field, idTokens) {
148
+ if (idTokens === null || typeof idTokens !== "object" || Array.isArray(idTokens) || Object.keys(idTokens).length === 0) {
149
+ return `${field} must be { "<variable>": "<audience>" }, with at least one token.`;
150
+ }
151
+ for (const [name, aud] of Object.entries(idTokens)) {
152
+ if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(name))
153
+ return `${field} names "${name}", which is not a variable name (letters, digits and "_", not starting with a digit).`;
154
+ if (typeof aud !== "string" || aud.trim() === "")
155
+ return `${field}.${name} must be an audience, a non-empty string.`;
156
+ }
157
+ return undefined;
158
+ }
142
159
  /** A job's GitLab `id_tokens:` for `{ <variable>: <audience> }` (#3914), or undefined when there are none. */
143
160
  export function gitlabIdTokensDoc(idTokens) {
144
161
  const entries = Object.entries(idTokens ?? {});
@@ -275,6 +275,8 @@ export interface ChantNoteJobs {
275
275
  export interface ChantNoteRunsOptions {
276
276
  /** With `jobs.wavesBeforeMerge`: what the decision before merge reads and writes with. */
277
277
  beforeMerge?: Pick<DecideBeforeMergeInput, "requires" | "statuses" | "git" | "cwd" | "lock" | "unlock" | "record" | "stop" | "now">;
278
+ /** What a reject note is recorded with (#5354), under the note author's GitLab identity. Absent: the reply names the reject line. */
279
+ reject?: import("./ci-comment-reject.js").CommentReject;
278
280
  }
279
281
  /**
280
282
  * What a command runs in chant's own GitLab pipeline, for the jobs it has.
@@ -29,7 +29,7 @@
29
29
  import { GITLAB_AGENT_ASK_VAR, GITLAB_AGENT_PR_VAR } from "./ci-agent.js";
30
30
  import { GITLAB_COMMIT_ARG_VAR, GITLAB_COMMIT_PR_VAR, GITLAB_COMMIT_WORD_VAR } from "./ci-commit.js";
31
31
  import { parseProductComment, productStatusContext } from "./ci-product-words.js";
32
- import { commandLine, commentTerms, forkReply, memberReply, notRunReply } from "./ci-comment-replies.js";
32
+ import { commandLine, commentTerms, forkReply, memberReply, notRunReply, rejectNotRecorded } from "./ci-comment-replies.js";
33
33
  import { GITLAB_APPLY_PR_VAR, GITLAB_LOCK_PR_VAR, GITLAB_PREVIEW_PR_VAR, GITLAB_UNLOCK_PR_VAR, PREVIEW_COMMENT_ENV } from "./components/pr-pipeline.js";
34
34
  import { ForgeApiError } from "./pr-forge.js";
35
35
  export { GITLAB_NOTE_COMMANDS_VAR } from "./components/pr-pipeline.js";
@@ -402,6 +402,17 @@ export function chantNoteRuns(jobs, opts = {}) {
402
402
  if (!open)
403
403
  return { kind: "reply", text: `${at} is not open, so \`/${words.product} ${parsed.word}\` does not run` };
404
404
  return { kind: "pipeline", ref: base, variables: { [GITLAB_COMMIT_PR_VAR]: iid, [GITLAB_COMMIT_WORD_VAR]: parsed.word, ...(parsed.arg !== undefined ? { [GITLAB_COMMIT_ARG_VAR]: parsed.arg } : {}) }, doing: `run \`${parsed.word}\` on ${at}` };
405
+ case "reject": {
406
+ // #5354: the poll checked the author's role before this; the stage's approval mode decides whether a note's identity counts.
407
+ const reject = opts.reject;
408
+ if (!reject)
409
+ return { kind: "reply", text: rejectNotRecorded(words, "gitlab") };
410
+ const { reason, stage } = parsed;
411
+ return import("./ci-comment-reject.js").then(async ({ decideCommentReject }) => {
412
+ const done = await decideCommentReject({ reject, words, user: note.author ?? "", reason, ...(stage !== undefined ? { stage } : {}) });
413
+ return done.kind === "fail" ? { kind: "fail", reason: done.reason } : { kind: "reply", text: done.text };
414
+ });
415
+ }
405
416
  case "action":
406
417
  return { kind: "reply", text: `${line("action")} does not run from a merge request note on GitLab: run \`${words.bin ?? words.product} action ${parsed.member} ${parsed.address}\` from a checkout of the default branch` };
407
418
  }
@@ -32,7 +32,7 @@ export declare const CI_PRODUCT_STAGES: readonly CiProductStage[];
32
32
  * answers it. `action` (#4653) asks for a day-2 action on one member, which
33
33
  * runs under a gated request.
34
34
  */
35
- export type CiProductCommand = "plan" | "apply" | "lock" | "unlock" | "agent" | "action" | "commit";
35
+ export type CiProductCommand = "plan" | "apply" | "lock" | "unlock" | "agent" | "action" | "commit" | "reject";
36
36
  export declare const CI_PRODUCT_COMMANDS: readonly CiProductCommand[];
37
37
  /**
38
38
  * What an approval of a product's waves binds to (ruling B, 2026-10-27).
@@ -127,6 +127,13 @@ export interface CiProductWordsInput {
127
127
  approve?: string;
128
128
  /** The override line, the same kind of template, with `{rule}` and `{reason}` too. */
129
129
  override?: string;
130
+ /**
131
+ * The reject line (#5354), the same kind of template over `{op}`,
132
+ * `{gate}`, `{digest}`, `{reason}`, `{sign}` and `{target}`: what a
133
+ * reviewer runs to turn a release down at a stage's gate. A comment job
134
+ * answers with it where a comment cannot record the rejection itself.
135
+ */
136
+ reject?: string;
130
137
  /** The op the waves record under. Default: the spec's own. */
131
138
  op?: string;
132
139
  /** The wave gate pattern, over `{gate}` and `{k}`. Default `{gate}-wave-{k}`. */
@@ -198,6 +205,8 @@ export interface CiProductWords {
198
205
  aliases: CiProductAlias[];
199
206
  approve: string;
200
207
  override: string;
208
+ /** The reject line (#5354). Filled by {@link resolveProductWords}; words built before it read chant's grammar under the product's name. */
209
+ reject?: string;
201
210
  op?: string;
202
211
  gateName: string;
203
212
  prGate: string;
@@ -213,6 +222,8 @@ export interface CiProductWords {
213
222
  export declare const CHANT_APPROVE_TEMPLATE = "chant approve {op} {gate} --plan {digest} --approver {approver} {sign}";
214
223
  /** chant's own override line. */
215
224
  export declare const CHANT_OVERRIDE_TEMPLATE = "chant approve {op} {target} --rule {rule} --reason \"<why>\" {sign}";
225
+ /** chant's own reject line (#5354). */
226
+ export declare const CHANT_REJECT_TEMPLATE = "chant reject {op} {gate} --plan {digest} --reason {reason} {sign}";
216
227
  /** chant's words: what every slot defaults to. */
217
228
  export declare const CHANT_WORDS: CiProductWords;
218
229
  /** Fill every slot `input` leaves out with chant's word. */
@@ -294,6 +305,19 @@ export interface OverrideLineInput {
294
305
  }
295
306
  /** The command that overrides a policy denial: the product's template filled. */
296
307
  export declare function overrideLine(words: CiProductWords, input: OverrideLineInput): string;
308
+ /** What {@link rejectLine} fills (#5354). */
309
+ export interface RejectLineInput {
310
+ op: string;
311
+ gate: string;
312
+ digest: string;
313
+ /** Default `<why>`, for the person to write. */
314
+ reason?: string;
315
+ /** Seal it: `--sign` fills `{sign}`. Default true. */
316
+ sign?: boolean;
317
+ target?: string;
318
+ }
319
+ /** The command a reviewer runs to reject a release at a gate (#5354): the product's reject template filled. */
320
+ export declare function rejectLine(words: CiProductWords, input: RejectLineInput): string;
297
321
  /** The typed word for one of chant's commands: the first `commands` entry that maps onto it. */
298
322
  export declare function commandWord(words: CiProductWords, command: CiProductCommand): string | undefined;
299
323
  /** The comment a job answers: `/<product> <word>`, such as `/plywood up`. Undefined when the product has no word for the command. */
@@ -342,6 +366,16 @@ export type ParsedProductComment =
342
366
  kind: "commit";
343
367
  word: string;
344
368
  arg?: string;
369
+ }
370
+ /**
371
+ * A rejection of the release a stage waits on (#5354): `/<product>
372
+ * reject [--stage <stage>] <reason>`. The comment job records it when the
373
+ * stage's approval mode takes the comment author's forge identity.
374
+ */
375
+ | {
376
+ kind: "reject";
377
+ stage?: string;
378
+ reason: string;
345
379
  } | {
346
380
  kind: "refused";
347
381
  reason: string;
@@ -418,3 +452,119 @@ export type ProductActionRequest = {
418
452
  * {@link PRODUCT_ACTION_EVENT_FLAG}.
419
453
  */
420
454
  export declare function productActionFromEnv(words: CiProductWords, env: Record<string, string | undefined>): ProductActionRequest;
455
+ /** How a product spells a key: snake_case (YAML) or camelCase (TypeScript). */
456
+ export type ProductConfigCase = "snake" | "camel";
457
+ /** The page section a word sits in. `stage` holds the words for stages and releases. */
458
+ export type ProductConfigSection = "environments" | "stage" | "apply" | "approval" | "respond" | "reports" | "identity" | "secrets" | "notify" | "agents" | "jobs";
459
+ /**
460
+ * The shape an alias's value has when it reads as the vocabulary key. A key
461
+ * that one product uses with another meaning is an alias only in that shape.
462
+ */
463
+ export type ProductConfigAliasShape = "string" | "map" | "list-or-map" | "storage-url" | "forge-environments";
464
+ /** A spelling one product accepts in place of the vocabulary's. */
465
+ export interface ProductConfigAlias {
466
+ /** The product that accepts it. */
467
+ product: string;
468
+ /** The key it accepts, in the same notation as {@link ProductConfigWord.key}. Absent for a value alias. */
469
+ key?: string;
470
+ /** A value word it accepts: `[alias, word]`. */
471
+ value?: readonly [string, string];
472
+ /** The alias reads as the key only when its value has this shape. */
473
+ shape?: ProductConfigAliasShape;
474
+ }
475
+ /** One concept of product config: its key, its value words, and the chant field it maps to. */
476
+ export interface ProductConfigWord {
477
+ key: string;
478
+ /** What the key sets, in a few words. */
479
+ concept: string;
480
+ section: ProductConfigSection;
481
+ /** The value words, when the value is one word from a list (or a list of them). */
482
+ values?: readonly string[];
483
+ /** A pattern a string value matches, when the value is not a word from a list. */
484
+ pattern?: string;
485
+ /** What the value is, for the page, when `values` does not say. */
486
+ value?: string;
487
+ /** The chant field, type or command the product maps the key onto. */
488
+ chant: string;
489
+ /** Other places the same word is set, such as a per-environment copy. */
490
+ also?: readonly string[];
491
+ /** The products that set the key with this spelling today. */
492
+ products: readonly string[];
493
+ aliases?: readonly ProductConfigAlias[];
494
+ }
495
+ /** The CI products this vocabulary was settled across. */
496
+ export declare const CI_PRODUCTS: readonly string[];
497
+ /** The vocabulary, in page order. */
498
+ export declare const PRODUCT_CONFIG_WORDS: readonly ProductConfigWord[];
499
+ /** The words for a release through the environments: the subcommands and flags a product's bin passes to `chant components`. */
500
+ export declare const PRODUCT_RELEASE_WORDS: Readonly<{
501
+ /** `<product> promote --to <env> [--release <label>]`: `chant components promote`. */
502
+ readonly promote: "promote";
503
+ /** `<product> reject <op> <gate> --plan <digest> --reason <text>`: `chant reject` (#5354), the release turned down at a stage's gate. */
504
+ readonly reject: "reject";
505
+ /** Why a release is rejected, on one line (#5354), and why a pause, a resume or an urgent promote was made (#5355). */
506
+ readonly reason: "--reason";
507
+ /** `<product> rollback <env> --release <label>`: `chant components rollback`, the environment positional. */
508
+ readonly rollback: "rollback";
509
+ /** `<product> redeploy <env>`: `chant components redeploy`. */
510
+ readonly redeploy: "redeploy";
511
+ /** The environment a promote deploys to. */
512
+ readonly to: "--to";
513
+ /** The environment a promote reads from; default the step before `--to` in `promotion`. */
514
+ readonly from: "--from";
515
+ /** A release's label or digest. */
516
+ readonly release: "--release";
517
+ /** Lets a promote skip an environment of `promotion`. */
518
+ readonly allowSkip: "--allow-skip";
519
+ /** Prints the plan and changes nothing. */
520
+ readonly dryRun: "--dry-run";
521
+ /** `<product> pause <env> --reason <text>`: `chant stage pause` (#5355). */
522
+ readonly pause: "pause";
523
+ /** `<product> resume <env> --reason <text>`: `chant stage resume` (#5355). */
524
+ readonly resume: "resume";
525
+ /** Lets a promote pass the stage's gate on its urgent rule (#5355). */
526
+ readonly urgent: "--urgent";
527
+ }>;
528
+ /** Release command spellings a product accepts beside {@link PRODUCT_RELEASE_WORDS}: `rollback --env <env>` for the positional. */
529
+ export declare const PRODUCT_RELEASE_ALIASES: readonly {
530
+ product: string;
531
+ command: string;
532
+ alias: string;
533
+ word: string;
534
+ }[];
535
+ /**
536
+ * The kinds of an audit line, in the words a person reads: the event that
537
+ * happened, each with the spellings a product wrote for it. The gate ledger's
538
+ * entries (`GATE_AUDIT_KINDS`) are the first eight; `refused` and `recorded`
539
+ * hold a product's own records. The report store's audit line
540
+ * (`@intentius/chant/report-store`, #5336) takes its `kind` from here.
541
+ */
542
+ export declare const PRODUCT_AUDIT_KINDS: Readonly<Record<string, readonly string[]>>;
543
+ /** One finding of {@link productConfigProblems}. */
544
+ export interface ProductConfigProblem {
545
+ level: "error" | "warning";
546
+ /** Where in the config, dotted, as the product spells it. */
547
+ path: string;
548
+ /** The vocabulary key the finding is about. */
549
+ key: string;
550
+ message: string;
551
+ }
552
+ export interface ProductConfigOptions {
553
+ /** The product whose aliases are accepted. */
554
+ product: string;
555
+ /** How the product spells keys. Default `snake`. */
556
+ case?: ProductConfigCase;
557
+ /** Maps the vocabulary's keys may also sit under, such as sql-yodeler's `ci`. The top level is always read. An alias whose key starts at a scope is read inside it too, to find the key set beside it. */
558
+ scopes?: readonly string[];
559
+ }
560
+ /**
561
+ * Checks a product's config against the vocabulary: each alias the product
562
+ * accepts is a warning naming the vocabulary key, an alias set beside its key
563
+ * is an error, and a value outside a key's words or pattern is an error.
564
+ * Keys the vocabulary does not hold are the product's own and are not read.
565
+ * `promotion` is checked as a list of distinct environment names, each one a
566
+ * key of `environments` when the config has that map.
567
+ */
568
+ export declare function productConfigProblems(config: unknown, options: ProductConfigOptions): ProductConfigProblem[];
569
+ /** The vocabulary's word for `key` (snake_case notation), or undefined. */
570
+ export declare function productConfigWord(key: string): ProductConfigWord | undefined;