@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.
- package/dist/__golden__/wave-loop/fan-out-applied.json +12 -6
- package/dist/__golden__/wave-loop/fan-out-apply-fails.json +8 -4
- package/dist/__golden__/wave-loop/fan-out-gated.json +4 -2
- package/dist/__golden__/wave-loop/fan-out-no-members.json +16 -8
- package/dist/__golden__/wave-loop/fan-out-plan-fails.json +8 -4
- package/dist/__golden__/wave-loop/fan-out-same-root.json +4 -2
- package/dist/agent-facts.d.ts +130 -0
- package/dist/agent-facts.js +196 -0
- package/dist/change-risk.d.ts +216 -0
- package/dist/change-risk.js +304 -0
- package/dist/change-set.d.ts +8 -0
- package/dist/ci-agent-alert.d.ts +139 -0
- package/dist/ci-agent-alert.js +342 -0
- package/dist/ci-agent-triggers.d.ts +152 -0
- package/dist/ci-agent-triggers.js +232 -0
- package/dist/ci-agent-verify-failed.d.ts +149 -0
- package/dist/ci-agent-verify-failed.js +191 -0
- package/dist/ci-agent.d.ts +136 -8
- package/dist/ci-agent.js +353 -26
- package/dist/ci-comment-commands.d.ts +8 -0
- package/dist/ci-comment-commands.js +17 -1
- package/dist/ci-comment-reject.d.ts +70 -0
- package/dist/ci-comment-reject.js +135 -0
- package/dist/ci-comment-replies.d.ts +3 -1
- package/dist/ci-comment-replies.js +6 -0
- package/dist/ci-estate/delivery.d.ts +25 -3
- package/dist/ci-estate/delivery.js +28 -9
- package/dist/ci-estate/page.d.ts +7 -3
- package/dist/ci-estate/page.js +19 -4
- package/dist/ci-estate/rows.d.ts +14 -2
- package/dist/ci-estate/rows.js +9 -1
- package/dist/ci-estate.d.ts +5 -2
- package/dist/ci-estate.js +3 -2
- package/dist/ci-handover.d.ts +2 -7
- package/dist/ci-handover.js +3 -20
- package/dist/ci-jobs.d.ts +6 -0
- package/dist/ci-jobs.js +17 -0
- package/dist/ci-note-commands.d.ts +2 -0
- package/dist/ci-note-commands.js +12 -1
- package/dist/ci-product-words.d.ts +151 -1
- package/dist/ci-product-words.js +1390 -3
- package/dist/ci-product.d.ts +100 -4
- package/dist/ci-product.js +99 -3
- package/dist/ci-respond-run.d.ts +9 -0
- package/dist/ci-respond-run.js +35 -4
- package/dist/ci-respond-summary-env.d.ts +56 -0
- package/dist/ci-respond-summary-env.js +81 -0
- package/dist/ci-respond-summary.d.ts +103 -0
- package/dist/ci-respond-summary.js +243 -0
- package/dist/ci-respond.d.ts +4 -2
- package/dist/ci-respond.js +4 -2
- package/dist/cli/command-group.js +1 -1
- package/dist/cli/commands/lint.js +21 -3
- package/dist/cli/handlers/agent.js +49 -4
- package/dist/cli/handlers/approve.js +3 -1
- package/dist/cli/handlers/build.d.ts +97 -1
- package/dist/cli/handlers/build.js +251 -3
- package/dist/cli/handlers/fan-out.js +55 -0
- package/dist/cli/handlers/graph.d.ts +14 -0
- package/dist/cli/handlers/graph.js +58 -3
- package/dist/cli/handlers/lifecycle-health.d.ts +7 -0
- package/dist/cli/handlers/lifecycle-health.js +47 -9
- package/dist/cli/handlers/lifecycle.js +4 -1
- package/dist/cli/handlers/notify-relay.d.ts +2 -2
- package/dist/cli/handlers/notify-relay.js +67 -7
- package/dist/cli/handlers/pipeline-agent.d.ts +30 -0
- package/dist/cli/handlers/pipeline-agent.js +255 -0
- package/dist/cli/handlers/pipeline-artifacts.d.ts +39 -0
- package/dist/cli/handlers/pipeline-artifacts.js +203 -0
- package/dist/cli/handlers/pipeline.d.ts +16 -0
- package/dist/cli/handlers/pipeline.js +112 -0
- package/dist/cli/handlers/pr-comment.js +4 -0
- package/dist/cli/handlers/pr-notes.js +4 -1
- package/dist/cli/handlers/pr.d.ts +20 -0
- package/dist/cli/handlers/pr.js +114 -11
- package/dist/cli/handlers/promote.js +792 -47
- package/dist/cli/handlers/reject.d.ts +84 -0
- package/dist/cli/handlers/reject.js +216 -0
- package/dist/cli/handlers/release.js +4 -2
- package/dist/cli/handlers/replan.d.ts +54 -0
- package/dist/cli/handlers/replan.js +177 -0
- package/dist/cli/handlers/run-generate.d.ts +5 -0
- package/dist/cli/handlers/run-generate.js +31 -4
- package/dist/cli/handlers/run-wave.js +15 -2
- package/dist/cli/handlers/run.js +4 -2
- package/dist/cli/handlers/stage.d.ts +35 -0
- package/dist/cli/handlers/stage.js +90 -0
- package/dist/cli/lsp/server.js +4 -0
- package/dist/cli/main.js +88 -8
- package/dist/cli/parse-args.js +35 -2
- package/dist/cli/registry.d.ts +12 -0
- package/dist/components/auto-release.d.ts +2 -0
- package/dist/components/auto-release.js +1 -0
- package/dist/components/capability.d.ts +40 -0
- package/dist/components/cli-support.d.ts +21 -1
- package/dist/components/cli-support.js +28 -6
- package/dist/components/component.d.ts +23 -4
- package/dist/components/component.schema.json +28 -0
- package/dist/components/declared-reads.d.ts +44 -4
- package/dist/components/declared-reads.js +80 -3
- package/dist/components/discover.d.ts +8 -0
- package/dist/components/discover.js +1 -1
- package/dist/components/driver.d.ts +13 -0
- package/dist/components/driver.js +23 -2
- package/dist/components/environment-sets.d.ts +229 -0
- package/dist/components/environment-sets.js +338 -0
- package/dist/components/fan-out-canary.d.ts +47 -0
- package/dist/components/fan-out-canary.js +58 -0
- package/dist/components/fan-out-run.d.ts +17 -0
- package/dist/components/fan-out-run.js +14 -1
- package/dist/components/fan-out-support.d.ts +7 -0
- package/dist/components/fan-out-support.js +1 -1
- package/dist/components/groups.d.ts +8 -1
- package/dist/components/groups.js +19 -1
- package/dist/components/index.d.ts +5 -2
- package/dist/components/index.js +4 -1
- package/dist/components/pr-cost.d.ts +28 -0
- package/dist/components/pr-cost.js +53 -0
- package/dist/components/pr-pipeline.d.ts +33 -0
- package/dist/components/pr-pipeline.js +32 -5
- package/dist/components/pr-policy.d.ts +33 -2
- package/dist/components/pr-policy.js +5 -2
- package/dist/components/pr-risk.d.ts +42 -0
- package/dist/components/pr-risk.js +74 -0
- package/dist/components/product-pipeline.d.ts +43 -0
- package/dist/components/product-pipeline.js +67 -1
- package/dist/components/promote.d.ts +6 -0
- package/dist/components/promote.js +13 -0
- package/dist/components/release-compile.js +3 -1
- package/dist/components/release-gate.d.ts +6 -1
- package/dist/components/release-gate.js +10 -2
- package/dist/components/step-environments.d.ts +236 -0
- package/dist/components/step-environments.js +392 -0
- package/dist/components/upstream-replan.d.ts +201 -0
- package/dist/components/upstream-replan.js +249 -0
- package/dist/components/verify-step.d.ts +30 -0
- package/dist/components/verify-step.js +27 -0
- package/dist/components/wave-plan.js +6 -2
- package/dist/config-environments.d.ts +4 -2
- package/dist/control/dispatch.d.ts +15 -0
- package/dist/control/dispatch.js +28 -4
- package/dist/cost-estimate.d.ts +188 -0
- package/dist/cost-estimate.js +363 -0
- package/dist/drift-record.d.ts +36 -0
- package/dist/drift-record.js +44 -0
- package/dist/engine-facts.d.ts +105 -0
- package/dist/engine-facts.js +111 -0
- package/dist/exit-codes.d.ts +4 -3
- package/dist/exit-codes.js +4 -3
- package/dist/flag-params.d.ts +2 -2
- package/dist/flag-params.js +9 -4
- package/dist/floor-table.data.js +53 -0
- package/dist/forge-token-vars.d.ts +12 -0
- package/dist/forge-token-vars.js +25 -0
- package/dist/gate-decision.d.ts +3 -1
- package/dist/gate-decision.js +3 -1
- package/dist/gated-waves.d.ts +2 -0
- package/dist/gated-waves.js +1 -0
- package/dist/graph-ir.d.ts +30 -0
- package/dist/graph-ir.js +33 -1
- package/dist/graph-refs.d.ts +26 -0
- package/dist/graph-refs.js +34 -3
- package/dist/graph-schema/graph.schema.json +136 -0
- package/dist/health.d.ts +65 -0
- package/dist/health.js +62 -0
- package/dist/lexicon.d.ts +188 -1
- package/dist/lifecycle/disruption.d.ts +14 -1
- package/dist/lifecycle/disruption.js +5 -1
- package/dist/lifecycle/gate-change-set.d.ts +8 -0
- package/dist/lifecycle/gate-change-set.js +2 -1
- package/dist/lifecycle/gate-ledger.d.ts +26 -0
- package/dist/lifecycle/gate-rejection.d.ts +82 -0
- package/dist/lifecycle/gate-rejection.js +93 -0
- package/dist/lifecycle/gate-seal.d.ts +3 -3
- package/dist/lifecycle/gate-seal.js +5 -5
- package/dist/lifecycle/observe.d.ts +17 -0
- package/dist/lifecycle/observe.js +10 -1
- package/dist/lifecycle/release-cut.js +4 -0
- package/dist/lifecycle/release-ledger.d.ts +8 -0
- package/dist/lifecycle/release-risk.d.ts +137 -0
- package/dist/lifecycle/release-risk.js +214 -0
- package/dist/lifecycle/release-store.d.ts +9 -0
- package/dist/lifecycle/release-store.js +4 -0
- package/dist/lifecycle/stage-log.d.ts +85 -0
- package/dist/lifecycle/stage-log.js +141 -0
- package/dist/lint/canary-checks.d.ts +31 -0
- package/dist/lint/canary-checks.js +45 -0
- package/dist/lint/rule.d.ts +1 -0
- package/dist/lint/rules/evl012-pipeline-fold.d.ts +14 -0
- package/dist/lint/rules/evl012-pipeline-fold.js +30 -0
- package/dist/lint/rules/index.d.ts +1 -0
- package/dist/lint/rules/index.js +3 -0
- package/dist/notify-relay-repo.d.ts +54 -0
- package/dist/notify-relay-repo.js +84 -0
- package/dist/notify-relay.d.ts +53 -3
- package/dist/notify-relay.js +96 -3
- package/dist/notify.d.ts +57 -1
- package/dist/notify.js +7 -1
- package/dist/notify.schema.json +61 -3
- package/dist/observation.d.ts +34 -0
- package/dist/observation.js +14 -1
- package/dist/op/activities/review-agent.d.ts +39 -2
- package/dist/op/activities/review-agent.js +88 -5
- package/dist/op/agent-permit.d.ts +88 -0
- package/dist/op/agent-permit.js +97 -0
- package/dist/op/gate-approval-base.d.ts +8 -0
- package/dist/op/gate-approval-base.js +9 -0
- package/dist/op/gate-approval.d.ts +30 -1
- package/dist/op/gate-approval.js +23 -2
- package/dist/op/gate-quorum.d.ts +114 -8
- package/dist/op/gate-quorum.js +198 -21
- package/dist/op/gate-reject.d.ts +79 -0
- package/dist/op/gate-reject.js +96 -0
- package/dist/op/gate-summary.js +1 -1
- package/dist/op/gate.d.ts +28 -3
- package/dist/op/gate.js +55 -13
- package/dist/op/generate-pipeline.d.ts +15 -1
- package/dist/op/generate-pipeline.js +32 -5
- package/dist/op/index.d.ts +11 -6
- package/dist/op/index.js +10 -5
- package/dist/op/local-executor.d.ts +2 -0
- package/dist/op/local-executor.js +23 -4
- package/dist/op/op-waves-after-plan.d.ts +23 -0
- package/dist/op/op-waves-after-plan.js +12 -1
- package/dist/op/op-waves-capability-spec.d.ts +14 -0
- package/dist/op/op-waves-capability-spec.js +46 -6
- package/dist/op/op-waves-capability.d.ts +21 -13
- package/dist/op/op-waves-capability.js +22 -59
- package/dist/op/op-waves-environment-sets.d.ts +41 -0
- package/dist/op/op-waves-environment-sets.js +82 -0
- package/dist/op/op-waves-quorum-warnings.d.ts +53 -0
- package/dist/op/op-waves-quorum-warnings.js +90 -0
- package/dist/op/op-waves-release-port.d.ts +7 -0
- package/dist/op/op-waves-release-port.js +15 -3
- package/dist/op/op-waves-release.d.ts +15 -0
- package/dist/op/op-waves-release.js +15 -0
- package/dist/op/op-waves-run.d.ts +37 -3
- package/dist/op/op-waves-run.js +141 -18
- package/dist/op/op-waves-soak.d.ts +57 -0
- package/dist/op/op-waves-soak.js +111 -0
- package/dist/op/op-waves-split.d.ts +4 -0
- package/dist/op/op-waves-split.js +4 -0
- package/dist/op/op-waves.d.ts +67 -4
- package/dist/op/op-waves.js +71 -3
- package/dist/pipeline/agent-ajv.d.ts +4 -0
- package/dist/pipeline/agent-ajv.js +14 -0
- package/dist/pipeline/agent-steps.d.ts +329 -0
- package/dist/pipeline/agent-steps.js +602 -0
- package/dist/pipeline/artifacts.d.ts +264 -0
- package/dist/pipeline/artifacts.js +425 -0
- package/dist/pipeline/diff.d.ts +45 -0
- package/dist/pipeline/diff.js +177 -0
- package/dist/pipeline/fold.d.ts +43 -0
- package/dist/pipeline/fold.js +140 -0
- package/dist/pipeline/generate.d.ts +52 -0
- package/dist/pipeline/generate.js +120 -0
- package/dist/pipeline/product.d.ts +225 -0
- package/dist/pipeline/product.js +257 -0
- package/dist/pipeline/promote.d.ts +404 -0
- package/dist/pipeline/promote.js +694 -0
- package/dist/pipeline/read.d.ts +37 -0
- package/dist/pipeline/read.js +58 -0
- package/dist/pipeline/rendered.d.ts +25 -0
- package/dist/pipeline/rendered.js +53 -0
- package/dist/pipeline/soak-checks.d.ts +80 -0
- package/dist/pipeline/soak-checks.js +254 -0
- package/dist/pipeline/soak-gate.d.ts +97 -0
- package/dist/pipeline/soak-gate.js +176 -0
- package/dist/pipeline/soak-sources.d.ts +17 -0
- package/dist/pipeline/soak-sources.js +42 -0
- package/dist/pipeline/soak.d.ts +260 -0
- package/dist/pipeline/soak.js +378 -0
- package/dist/pipeline/spec.d.ts +724 -0
- package/dist/pipeline/spec.js +567 -0
- package/dist/pipeline/stage-ledger.d.ts +187 -0
- package/dist/pipeline/stage-ledger.js +185 -0
- package/dist/pipeline/stage-waves.d.ts +114 -0
- package/dist/pipeline/stage-waves.js +161 -0
- package/dist/pipeline/stages.d.ts +64 -0
- package/dist/pipeline/stages.js +174 -0
- package/dist/pipeline/verify-rollback.d.ts +277 -0
- package/dist/pipeline/verify-rollback.js +393 -0
- package/dist/pipeline.d.ts +142 -0
- package/dist/pipeline.js +143 -0
- package/dist/pr-loop.d.ts +22 -0
- package/dist/pr-loop.js +8 -0
- package/dist/pr-plan-note.d.ts +15 -1
- package/dist/pr-plan-note.js +8 -0
- package/dist/pr-post.d.ts +31 -0
- package/dist/pr-post.js +89 -0
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/report-store/audit.schema.json +50 -0
- package/dist/report-store/dora.schema.json +331 -0
- package/dist/report-store/estate.schema.json +96 -0
- package/dist/report-store/run.schema.json +14 -0
- package/dist/report-store.d.ts +151 -0
- package/dist/report-store.js +344 -0
- package/dist/run-event.d.ts +7 -2
- package/dist/wave-runtime.mjs +458 -404
- package/dist/workspace/catalog-edges.js +3 -3
- package/dist/workspace/change-set.schema.json +4 -0
- package/dist/workspace/ci-cloud-identity.d.ts +4 -0
- package/dist/workspace/ci-cloud-identity.js +30 -0
- package/dist/workspace/ci-run.js +17 -2
- package/dist/workspace/ci-secrets.d.ts +3 -1
- package/dist/workspace/ci-secrets.js +7 -1
- package/dist/workspace/compose-graph.d.ts +1 -1
- package/dist/workspace/compose-graph.js +3 -1
- package/dist/workspace/declaration.d.ts +27 -0
- package/dist/workspace/declaration.js +35 -0
- package/dist/workspace/declaration.schema.json +56 -0
- package/dist/workspace/graph-cli.js +26 -0
- package/dist/workspace/graph.schema.json +5 -1
- package/dist/workspace/identity-gate-rule.d.ts +4 -0
- package/dist/workspace/identity-gate-rule.js +2 -2
- package/dist/workspace/identity-reject-rule.d.ts +14 -0
- package/dist/workspace/identity-reject-rule.js +24 -0
- package/dist/workspace/identity.d.ts +3 -0
- package/dist/workspace/identity.js +2 -1
- package/dist/workspace/nested-graph.js +2 -0
- package/dist/workspace/pr-report.schema.json +65 -0
- package/dist/workspace/promotion-order.d.ts +19 -4
- package/dist/workspace/promotion-order.js +26 -4
- package/dist/workspace/release-train.d.ts +14 -0
- package/dist/workspace/release-train.js +32 -0
- package/dist/workspace/run-event.schema.json +2 -2
- package/dist/workspace/stack-read-edges.d.ts +19 -0
- package/dist/workspace/stack-read-edges.js +54 -0
- package/dist/workspace/status-gates.d.ts +51 -1
- package/dist/workspace/status-gates.js +60 -0
- package/dist/workspace/status-stages.d.ts +223 -0
- package/dist/workspace/status-stages.js +279 -0
- package/dist/workspace/status.d.ts +45 -1
- package/dist/workspace/status.js +109 -5
- package/dist/workspace/status.schema.json +283 -2
- package/dist/workspace/train-cut.js +5 -2
- package/dist/workspace/train-shell.d.ts +18 -0
- package/dist/workspace/train-shell.js +43 -0
- package/dist/workspace/trust/seal.d.ts +7 -0
- package/dist/workspace/trust/seal.js +9 -0
- package/package.json +5 -1
package/dist/ci-product.d.ts
CHANGED
|
@@ -18,7 +18,74 @@ import type { ProductWaveHook } from "./op/op-waves-after-plan.js";
|
|
|
18
18
|
* note (#4573).
|
|
19
19
|
*/
|
|
20
20
|
export declare const CI_PRODUCT_FLOOR = "0.124.55";
|
|
21
|
-
export { activeProductWords, approveLine, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, commitWordOf, isChantWords, notifyWaveLabel, overrideLine, parseProductComment, productActionFromEnv, PRODUCT_ACTION_ENV, PRODUCT_ACTION_EVENT_FLAG, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, type ApproveLineInput, type CiProductAlias, type CiProductApplyMode, type CiProductApproval, type CiProductCommand, type CiProductNotifyWords, type CiProductNotifyWordsInput, type CiProductStage, type CiProductWords, type CiProductWordsInput, type OverrideLineInput, type ParsedProductComment, type ProductCommentOptions, type ProductActionRequest, } from "./ci-product-words.js";
|
|
21
|
+
export { activeProductWords, approveLine, CI_PRODUCTS, PRODUCT_AUDIT_KINDS, PRODUCT_CONFIG_WORDS, PRODUCT_RELEASE_ALIASES, PRODUCT_RELEASE_WORDS, productConfigProblems, productConfigWord, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_REJECT_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, commitWordOf, isChantWords, notifyWaveLabel, overrideLine, rejectLine, parseProductComment, productActionFromEnv, PRODUCT_ACTION_ENV, PRODUCT_ACTION_EVENT_FLAG, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, type ApproveLineInput, type RejectLineInput, type ProductConfigAlias, type ProductConfigAliasShape, type ProductConfigCase, type ProductConfigOptions, type ProductConfigProblem, type ProductConfigSection, type ProductConfigWord, type CiProductAlias, type CiProductApplyMode, type CiProductApproval, type CiProductCommand, type CiProductNotifyWords, type CiProductNotifyWordsInput, type CiProductStage, type CiProductWords, type CiProductWordsInput, type OverrideLineInput, type ParsedProductComment, type ProductCommentOptions, type ProductActionRequest, } from "./ci-product-words.js";
|
|
22
|
+
/**
|
|
23
|
+
* The first chant with the product config vocabulary (#5343):
|
|
24
|
+
* `PRODUCT_CONFIG_WORDS`, one key and one set of value words per concept a
|
|
25
|
+
* product sets, with the chant field each maps to and the aliases each
|
|
26
|
+
* product accepts; `productConfigProblems`, which checks a product's config
|
|
27
|
+
* against it; `PRODUCT_RELEASE_WORDS` for promote, rollback and redeploy;
|
|
28
|
+
* and `PRODUCT_AUDIT_KINDS`. The reference page is
|
|
29
|
+
* /chant/reference/ci-product-config/.
|
|
30
|
+
*/
|
|
31
|
+
export declare const PRODUCT_CONFIG_WORDS_FLOOR = "0.124.110";
|
|
32
|
+
/**
|
|
33
|
+
* The first chant where `productConfigProblems` reads an alias inside a scope
|
|
34
|
+
* the caller passes: sql-yodeler's `ci.login` set beside `ci.identity` is an
|
|
35
|
+
* error naming both, as `oidc` beside `identity` is at the top level.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PRODUCT_CONFIG_SCOPED_ALIASES_FLOOR = "0.124.110";
|
|
38
|
+
/**
|
|
39
|
+
* The first chant with the plan's cost estimate (#5334): `ci.cost` in the
|
|
40
|
+
* workspace declaration, read at base, which `pr-plan` and `pr-apply` run
|
|
41
|
+
* over each member's plan document (`artifact.planJson` of `terraform-apply`
|
|
42
|
+
* and `pulumi-up`), with the estimate as the report's and the note's `cost`
|
|
43
|
+
* and the policy's `input.cost`; `PrPlanNote.cost` for a product's own plan
|
|
44
|
+
* note; a wave's `holds.policy` reading `input.cost` beside `holds.cost`;
|
|
45
|
+
* and `estimateCosts`, `costEstimateLines` and `policyCost`, which build the
|
|
46
|
+
* same record for a product that plans by itself. The estimate only adds
|
|
47
|
+
* approvals, and it is off until `ci.cost` or `holds.cost` is set.
|
|
48
|
+
*/
|
|
49
|
+
export declare const COST_ESTIMATE_FLOOR = "0.124.110";
|
|
50
|
+
/**
|
|
51
|
+
* The first chant whose cost estimate runs on a redacted plan without the forge tokens (#5416):
|
|
52
|
+
* `priceRuns`, and so `estimateCosts`, the plan note's `ci.cost`, an op wave's `holds.cost` and the
|
|
53
|
+
* pulumi cost hold, hand the command a copy of the plan document with its sensitive values replaced
|
|
54
|
+
* (`redactPlanJson`) and run it with the forge tokens left out of its environment (`costEnv`). A
|
|
55
|
+
* product's `run wave` job uses `holds.cost` and needs no after-plan hook of its own. `redactEnv` and
|
|
56
|
+
* `dropEnv` on a wave's `holds.cost` (and the terraform and pulumi presets) name more variables to
|
|
57
|
+
* redact and to drop; they hold names, never values.
|
|
58
|
+
*/
|
|
59
|
+
export declare const COST_REDACTED_FLOOR = "0.124.110";
|
|
60
|
+
/**
|
|
61
|
+
* The first chant whose cost estimate reads `redactEnv`, `dropEnv` and the forge tokens in a run's own
|
|
62
|
+
* environment as well as the job's (#5433): `CostRun.env` on `priceRuns`, and an op wave's `holds.cost`
|
|
63
|
+
* passes each run the `env` its product's `runHooks.beforePlan` gave it, so a value a product sets per
|
|
64
|
+
* run is replaced in the plan copy and left out of the command's environment. A product whose run hooks
|
|
65
|
+
* give no `env` gets the hold it had.
|
|
66
|
+
*/
|
|
67
|
+
export declare const COST_RUN_ENV_FLOOR = "0.124.110";
|
|
68
|
+
export { COST_ESTIMATE_FORMATS, COST_REDACTED, costEnv, redactPlanJson, costEstimateLines, costEstimateOf, costEstimateProblems, estimateCosts, planJsonOf, policyCost, priceRuns, readCostEstimate, signedAmount, type CostEstimate, type CostEstimateExec, type CostEstimateFormat, type CostEnvOptions, type CostEstimateSettings, type CostFigures, type CostRun, type MemberCost, type PolicyCost, } from "./cost-estimate.js";
|
|
69
|
+
export { estimatePrSet, prCostRuns, prLoopCostAt, type PrLoopCost } from "./components/pr-cost.js";
|
|
70
|
+
/**
|
|
71
|
+
* The first chant with the scored change risk (#5325): `ci.risk` in the
|
|
72
|
+
* workspace declaration, read at base, which `pr-plan` and `pr-apply` score
|
|
73
|
+
* over the change set from its deletes, replacements, disruption classes,
|
|
74
|
+
* destructive migration classes, members and environments reached, graph
|
|
75
|
+
* dependents, the review's level and the answers to `ci.risk.questions`,
|
|
76
|
+
* with the record as the report's and the note's `risk`, the stored change
|
|
77
|
+
* set's `risk` and the policy's `input.risk`; a wave's and a stage gate's
|
|
78
|
+
* `holds.risk`, which over `approveAbove` holds the wave and adds its
|
|
79
|
+
* `quorum` rules; an Op gate's `approval.risk`, which puts the record in
|
|
80
|
+
* Cedar's `context.changeRisk` and counts a permit only from a proven human;
|
|
81
|
+
* the review agent's `questions` and answers; and `scoreChangeRisk`,
|
|
82
|
+
* `changeRiskLines` and `CHANGE_RISK_WEIGHTS` for a product that plans by
|
|
83
|
+
* itself. The score only adds approvals, and it is off until `ci.risk`,
|
|
84
|
+
* `holds.risk` or `approval.risk` is set.
|
|
85
|
+
*/
|
|
86
|
+
export declare const CHANGE_RISK_FLOOR = "0.124.110";
|
|
87
|
+
export { CHANGE_RISK_CONTEXT_KEY, CHANGE_RISK_HALF, CHANGE_RISK_LEVEL_FROM, CHANGE_RISK_REVIEW_VALUES, CHANGE_RISK_VERSION, CHANGE_RISK_WEIGHTS, changeRiskContext, changeRiskLevel, changeRiskLines, changeRiskProblems, changeRiskQuorum, destructiveMigrationClasses, graphDependents, scoreChangeRisk, type ChangeRisk, type ChangeRiskContext, type ChangeRiskFacts, type ChangeRiskLevel, type ChangeRiskQuestion, type ChangeRiskReason, type ChangeRiskSettings, } from "./change-risk.js";
|
|
88
|
+
export { prLoopRiskAt, prRiskDependents, scorePrSet, type PrLoopRisk } from "./components/pr-risk.js";
|
|
22
89
|
export { driftNotifyFields, NOTIFY_MESSAGE_WORDS_FLOOR, productNotifySource, productNotifyWords, productSendOptions, type DriftNotifyInput } from "./notify-product.js";
|
|
23
90
|
/** The first chant with `chant notify relay` and the notify relay buttons (#4611). */
|
|
24
91
|
export declare const NOTIFY_RELAY_FLOOR = "0.124.55";
|
|
@@ -30,7 +97,7 @@ export declare const NOTIFY_RELAY_FLOOR = "0.124.55";
|
|
|
30
97
|
*/
|
|
31
98
|
export declare const PR_PREVIEW_FLOOR = "0.124.55";
|
|
32
99
|
export { decideRelayClick, handleRelayRequest, NOTIFY_RELAY_POINTS_FLOOR, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, type RelayAnswer, type RelayClick, type RelayDeps, type RelayPending, type RelayRequest, type RelayResponse, type RelaySettings, } from "./notify-relay.js";
|
|
33
|
-
export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productCommand, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, type ComponentWaveStepOptions, type ComponentWaveSteps, type ComponentWavesSpecOptions, type ProductAgentOptions, type ProductPipelineJobs, type ProductPipelineOptions, } from "./components/product-pipeline.js";
|
|
100
|
+
export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productAlertAgent, productApplyFailedAgent, productCommand, productScheduleAgent, productVerifyFailedAgent, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, type ComponentWaveStepOptions, type ComponentWaveSteps, type ComponentWavesSpecOptions, type ProductAgentOptions, type ProductPipelineJobs, type ProductPipelineOptions, } from "./components/product-pipeline.js";
|
|
34
101
|
export { prActionJob, PR_ACTION_JOB, prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin, type PrActionJob, type PrActionJobOptions, type PrCommentLockJob, type PrCommentPreviewJob } from "./components/pr-pipeline.js";
|
|
35
102
|
/**
|
|
36
103
|
* The product plan (#4799): `productPipelineJobs(forge, env, { words,
|
|
@@ -281,7 +348,8 @@ export { RUN_GROUP_KEYS, type RunGroupKey } from "./lexicon.js";
|
|
|
281
348
|
*/
|
|
282
349
|
export declare const PR_LOOP_CONTROL_FLOOR = "0.124.77";
|
|
283
350
|
export { CI_RESPOND_DEFAULTS, CI_RESPOND_ENV, CI_RESPONSES, parseRespondList, renderRefusedDiff, renderTriage, respondList, resolveResponses, type CiRespondEvent, type CiResponses, type DescriptionFinding, type FailedApply, type RefusedDiff, } from "./ci-respond.js";
|
|
284
|
-
export { respondDescription, respondOpWave, respondPrApply, triageOfOpWave, triageOfPrReport, refusedOfOpWave, refusedOfPrReport } from "./ci-respond-run.js";
|
|
351
|
+
export { refusedNote, respondDescription, respondOpWave, respondPrApply, triageOfOpWave, triageOfPrReport, refusedOfOpWave, refusedOfPrReport } from "./ci-respond-run.js";
|
|
352
|
+
export { WAVE_REFUSED_SUMMARY_FLOOR, WAVE_SUMMARY_COMMAND, WAVE_SUMMARY_ENV, WAVE_SUMMARY_TIMEOUT_MINUTES, WAVE_SUMMARY_TRIGGER, renderRefusedSummary, resolveWaveSummarySpec, summarizeRefusedWave, waveSummaryEnv, waveSummaryPrompt, waveSummarySettingsFromEnv, type WaveSummaryDeps, type WaveSummaryOutcome, type WaveSummarySettings, type WaveSummarySpec, } from "./ci-respond-summary.js";
|
|
285
353
|
/**
|
|
286
354
|
* Run one chant command line in this process with the product's words
|
|
287
355
|
* (ruling C): what a product's bin calls for every command its verbs map
|
|
@@ -299,6 +367,32 @@ export declare function runChantInProcess(argv: string[], words: CiProductWordsI
|
|
|
299
367
|
* `CI_AGENT_FLOOR`.
|
|
300
368
|
*/
|
|
301
369
|
export { CI_AGENT_FLOOR, agentForbiddenPaths, type AgentSettings, type OpAgentSpec } from "./ci-agent.js";
|
|
370
|
+
/**
|
|
371
|
+
* Agent jobs from a production alert (#5329): `productAlertAgent` returns the
|
|
372
|
+
* alert agent's Op spec, and the relay (`chant notify relay`) reads the
|
|
373
|
+
* alert sources and records the facts. Feature-detect on `AGENT_ALERT_FLOOR`.
|
|
374
|
+
*/
|
|
375
|
+
export { AGENT_ALERT_FLOOR, ALERT_SOURCES, DATADOG_PAYLOAD_TEMPLATE, HONEYCOMB_PAYLOAD_TEMPLATE, type AlertRecord, type AlertSource } from "./ci-agent-alert.js";
|
|
376
|
+
export { AGENT_JOIN_WINDOW_MINUTES } from "./agent-facts.js";
|
|
377
|
+
/**
|
|
378
|
+
* Agent jobs from a failed apply and on a schedule (#5357):
|
|
379
|
+
* `productApplyFailedAgent` and `productScheduleAgent` return the agents'
|
|
380
|
+
* Op specs; an apply job records its failure for the agent with
|
|
381
|
+
* `CHANT_AGENT_FACTS=apply-failed` and the relay key (chant's own wave and
|
|
382
|
+
* `pr-apply` jobs, or `chant agent apply-failed` in a product's own job),
|
|
383
|
+
* and `opWavesAgentFactsEnv` gives a product's wave jobs those variables.
|
|
384
|
+
* Every agent's settings are checked against the default branch. Feature-
|
|
385
|
+
* detect on `AGENT_FACT_TRIGGERS_FLOOR`.
|
|
386
|
+
*/
|
|
387
|
+
export { AGENT_FACT_TRIGGERS_FLOOR, AGENT_FACTS_ENV, AGENT_FACTS_TRIGGERS, APPLY_FAILED_ERROR_MAX, agentFactsOn, opWavesAgentFactsEnv, recordApplyFailed, type AgentFactsOption, type AgentFactsTrigger, type ApplyFailedRecord } from "./ci-agent-triggers.js";
|
|
388
|
+
/**
|
|
389
|
+
* Agent jobs from a failed verify or soak (#5339): `productVerifyFailedAgent`
|
|
390
|
+
* returns the agent's Op spec. A pipeline's promote jobs and wave jobs record
|
|
391
|
+
* the facts with `agentFacts: { triggers: ["verify-failed"] }` (a failing soak
|
|
392
|
+
* check, a failed verify step), and a rollback the stage requested stands.
|
|
393
|
+
* Feature-detect on `VERIFY_FAILED_AGENT_FLOOR`.
|
|
394
|
+
*/
|
|
395
|
+
export { VERIFY_FAILED_AGENT_FLOOR, VERIFY_FAILED_OUTPUT_MAX, VERIFY_STEP_KINDS, isVerifyStep, recordVerifyFailed, type VerifyFailedRecord } from "./ci-agent-verify-failed.js";
|
|
302
396
|
/**
|
|
303
397
|
* The agent guard (#4770): a Claude Code PreToolUse hook on Bash and a
|
|
304
398
|
* wrapper per engine binary that refuse an agent's apply, approve or
|
|
@@ -315,7 +409,9 @@ export { AGENT_GUARD_FLOOR, agentGuard, agentGuardScript, agentGuardWrapper, CLA
|
|
|
315
409
|
* `OP_WAVE_AFTER_PLAN_FLOOR`.
|
|
316
410
|
*/
|
|
317
411
|
export { OP_WAVE_AFTER_PLAN_FLOOR } from "./op/runtime.js";
|
|
318
|
-
|
|
412
|
+
/** The first chant whose after-plan hooks get the wave's change risk as `risk` (#5422), the shape `input.risk` has. */
|
|
413
|
+
export { OP_WAVE_AFTER_PLAN_RISK_FLOOR } from "./op/op-waves-after-plan.js";
|
|
414
|
+
export type { OpWaveAfterPlanHook, OpWaveAfterPlanResult, OpWaveAfterPlanRun, OpWaveAfterPlanWave, ProductWaveHook } from "./op/op-waves-after-plan.js";
|
|
319
415
|
/**
|
|
320
416
|
* The standing pending gates waiting on a plan digest, with the pull request
|
|
321
417
|
* a `pr-<n>` gate belongs to (#4607): what a product's approve verb reads so
|
package/dist/ci-product.js
CHANGED
|
@@ -16,7 +16,74 @@ import { OTLP_EXPORTER_FLOOR } from "./otlp.js";
|
|
|
16
16
|
* note (#4573).
|
|
17
17
|
*/
|
|
18
18
|
export const CI_PRODUCT_FLOOR = "0.124.55";
|
|
19
|
-
export { activeProductWords, approveLine, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, commitWordOf, isChantWords, notifyWaveLabel, overrideLine, parseProductComment, productActionFromEnv, PRODUCT_ACTION_ENV, PRODUCT_ACTION_EVENT_FLAG, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, } from "./ci-product-words.js";
|
|
19
|
+
export { activeProductWords, approveLine, CI_PRODUCTS, PRODUCT_AUDIT_KINDS, PRODUCT_CONFIG_WORDS, PRODUCT_RELEASE_ALIASES, PRODUCT_RELEASE_WORDS, productConfigProblems, productConfigWord, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_REJECT_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, commitWordOf, isChantWords, notifyWaveLabel, overrideLine, rejectLine, parseProductComment, productActionFromEnv, PRODUCT_ACTION_ENV, PRODUCT_ACTION_EVENT_FLAG, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, } from "./ci-product-words.js";
|
|
20
|
+
/**
|
|
21
|
+
* The first chant with the product config vocabulary (#5343):
|
|
22
|
+
* `PRODUCT_CONFIG_WORDS`, one key and one set of value words per concept a
|
|
23
|
+
* product sets, with the chant field each maps to and the aliases each
|
|
24
|
+
* product accepts; `productConfigProblems`, which checks a product's config
|
|
25
|
+
* against it; `PRODUCT_RELEASE_WORDS` for promote, rollback and redeploy;
|
|
26
|
+
* and `PRODUCT_AUDIT_KINDS`. The reference page is
|
|
27
|
+
* /chant/reference/ci-product-config/.
|
|
28
|
+
*/
|
|
29
|
+
export const PRODUCT_CONFIG_WORDS_FLOOR = "0.124.110";
|
|
30
|
+
/**
|
|
31
|
+
* The first chant where `productConfigProblems` reads an alias inside a scope
|
|
32
|
+
* the caller passes: sql-yodeler's `ci.login` set beside `ci.identity` is an
|
|
33
|
+
* error naming both, as `oidc` beside `identity` is at the top level.
|
|
34
|
+
*/
|
|
35
|
+
export const PRODUCT_CONFIG_SCOPED_ALIASES_FLOOR = "0.124.110";
|
|
36
|
+
/**
|
|
37
|
+
* The first chant with the plan's cost estimate (#5334): `ci.cost` in the
|
|
38
|
+
* workspace declaration, read at base, which `pr-plan` and `pr-apply` run
|
|
39
|
+
* over each member's plan document (`artifact.planJson` of `terraform-apply`
|
|
40
|
+
* and `pulumi-up`), with the estimate as the report's and the note's `cost`
|
|
41
|
+
* and the policy's `input.cost`; `PrPlanNote.cost` for a product's own plan
|
|
42
|
+
* note; a wave's `holds.policy` reading `input.cost` beside `holds.cost`;
|
|
43
|
+
* and `estimateCosts`, `costEstimateLines` and `policyCost`, which build the
|
|
44
|
+
* same record for a product that plans by itself. The estimate only adds
|
|
45
|
+
* approvals, and it is off until `ci.cost` or `holds.cost` is set.
|
|
46
|
+
*/
|
|
47
|
+
export const COST_ESTIMATE_FLOOR = "0.124.110";
|
|
48
|
+
/**
|
|
49
|
+
* The first chant whose cost estimate runs on a redacted plan without the forge tokens (#5416):
|
|
50
|
+
* `priceRuns`, and so `estimateCosts`, the plan note's `ci.cost`, an op wave's `holds.cost` and the
|
|
51
|
+
* pulumi cost hold, hand the command a copy of the plan document with its sensitive values replaced
|
|
52
|
+
* (`redactPlanJson`) and run it with the forge tokens left out of its environment (`costEnv`). A
|
|
53
|
+
* product's `run wave` job uses `holds.cost` and needs no after-plan hook of its own. `redactEnv` and
|
|
54
|
+
* `dropEnv` on a wave's `holds.cost` (and the terraform and pulumi presets) name more variables to
|
|
55
|
+
* redact and to drop; they hold names, never values.
|
|
56
|
+
*/
|
|
57
|
+
export const COST_REDACTED_FLOOR = "0.124.110";
|
|
58
|
+
/**
|
|
59
|
+
* The first chant whose cost estimate reads `redactEnv`, `dropEnv` and the forge tokens in a run's own
|
|
60
|
+
* environment as well as the job's (#5433): `CostRun.env` on `priceRuns`, and an op wave's `holds.cost`
|
|
61
|
+
* passes each run the `env` its product's `runHooks.beforePlan` gave it, so a value a product sets per
|
|
62
|
+
* run is replaced in the plan copy and left out of the command's environment. A product whose run hooks
|
|
63
|
+
* give no `env` gets the hold it had.
|
|
64
|
+
*/
|
|
65
|
+
export const COST_RUN_ENV_FLOOR = "0.124.110";
|
|
66
|
+
export { COST_ESTIMATE_FORMATS, COST_REDACTED, costEnv, redactPlanJson, costEstimateLines, costEstimateOf, costEstimateProblems, estimateCosts, planJsonOf, policyCost, priceRuns, readCostEstimate, signedAmount, } from "./cost-estimate.js";
|
|
67
|
+
export { estimatePrSet, prCostRuns, prLoopCostAt } from "./components/pr-cost.js";
|
|
68
|
+
/**
|
|
69
|
+
* The first chant with the scored change risk (#5325): `ci.risk` in the
|
|
70
|
+
* workspace declaration, read at base, which `pr-plan` and `pr-apply` score
|
|
71
|
+
* over the change set from its deletes, replacements, disruption classes,
|
|
72
|
+
* destructive migration classes, members and environments reached, graph
|
|
73
|
+
* dependents, the review's level and the answers to `ci.risk.questions`,
|
|
74
|
+
* with the record as the report's and the note's `risk`, the stored change
|
|
75
|
+
* set's `risk` and the policy's `input.risk`; a wave's and a stage gate's
|
|
76
|
+
* `holds.risk`, which over `approveAbove` holds the wave and adds its
|
|
77
|
+
* `quorum` rules; an Op gate's `approval.risk`, which puts the record in
|
|
78
|
+
* Cedar's `context.changeRisk` and counts a permit only from a proven human;
|
|
79
|
+
* the review agent's `questions` and answers; and `scoreChangeRisk`,
|
|
80
|
+
* `changeRiskLines` and `CHANGE_RISK_WEIGHTS` for a product that plans by
|
|
81
|
+
* itself. The score only adds approvals, and it is off until `ci.risk`,
|
|
82
|
+
* `holds.risk` or `approval.risk` is set.
|
|
83
|
+
*/
|
|
84
|
+
export const CHANGE_RISK_FLOOR = "0.124.110";
|
|
85
|
+
export { CHANGE_RISK_CONTEXT_KEY, CHANGE_RISK_HALF, CHANGE_RISK_LEVEL_FROM, CHANGE_RISK_REVIEW_VALUES, CHANGE_RISK_VERSION, CHANGE_RISK_WEIGHTS, changeRiskContext, changeRiskLevel, changeRiskLines, changeRiskProblems, changeRiskQuorum, destructiveMigrationClasses, graphDependents, scoreChangeRisk, } from "./change-risk.js";
|
|
86
|
+
export { prLoopRiskAt, prRiskDependents, scorePrSet } from "./components/pr-risk.js";
|
|
20
87
|
export { driftNotifyFields, NOTIFY_MESSAGE_WORDS_FLOOR, productNotifySource, productNotifyWords, productSendOptions } from "./notify-product.js";
|
|
21
88
|
/** The first chant with `chant notify relay` and the notify relay buttons (#4611). */
|
|
22
89
|
export const NOTIFY_RELAY_FLOOR = "0.124.55";
|
|
@@ -28,7 +95,7 @@ export const NOTIFY_RELAY_FLOOR = "0.124.55";
|
|
|
28
95
|
*/
|
|
29
96
|
export const PR_PREVIEW_FLOOR = "0.124.55";
|
|
30
97
|
export { decideRelayClick, handleRelayRequest, NOTIFY_RELAY_POINTS_FLOOR, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, } from "./notify-relay.js";
|
|
31
|
-
export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productCommand, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, } from "./components/product-pipeline.js";
|
|
98
|
+
export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productAlertAgent, productApplyFailedAgent, productCommand, productScheduleAgent, productVerifyFailedAgent, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, } from "./components/product-pipeline.js";
|
|
32
99
|
export { prActionJob, PR_ACTION_JOB, prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin } from "./components/pr-pipeline.js";
|
|
33
100
|
/**
|
|
34
101
|
* The product plan (#4799): `productPipelineJobs(forge, env, { words,
|
|
@@ -275,7 +342,8 @@ export { RUN_GROUP_KEYS } from "./lexicon.js";
|
|
|
275
342
|
*/
|
|
276
343
|
export const PR_LOOP_CONTROL_FLOOR = "0.124.77";
|
|
277
344
|
export { CI_RESPOND_DEFAULTS, CI_RESPOND_ENV, CI_RESPONSES, parseRespondList, renderRefusedDiff, renderTriage, respondList, resolveResponses, } from "./ci-respond.js";
|
|
278
|
-
export { respondDescription, respondOpWave, respondPrApply, triageOfOpWave, triageOfPrReport, refusedOfOpWave, refusedOfPrReport } from "./ci-respond-run.js";
|
|
345
|
+
export { refusedNote, respondDescription, respondOpWave, respondPrApply, triageOfOpWave, triageOfPrReport, refusedOfOpWave, refusedOfPrReport } from "./ci-respond-run.js";
|
|
346
|
+
export { WAVE_REFUSED_SUMMARY_FLOOR, WAVE_SUMMARY_COMMAND, WAVE_SUMMARY_ENV, WAVE_SUMMARY_TIMEOUT_MINUTES, WAVE_SUMMARY_TRIGGER, renderRefusedSummary, resolveWaveSummarySpec, summarizeRefusedWave, waveSummaryEnv, waveSummaryPrompt, waveSummarySettingsFromEnv, } from "./ci-respond-summary.js";
|
|
279
347
|
/**
|
|
280
348
|
* Run one chant command line in this process with the product's words
|
|
281
349
|
* (ruling C): what a product's bin calls for every command its verbs map
|
|
@@ -293,6 +361,32 @@ export async function runChantInProcess(argv, words, options = {}) {
|
|
|
293
361
|
* `CI_AGENT_FLOOR`.
|
|
294
362
|
*/
|
|
295
363
|
export { CI_AGENT_FLOOR, agentForbiddenPaths } from "./ci-agent.js";
|
|
364
|
+
/**
|
|
365
|
+
* Agent jobs from a production alert (#5329): `productAlertAgent` returns the
|
|
366
|
+
* alert agent's Op spec, and the relay (`chant notify relay`) reads the
|
|
367
|
+
* alert sources and records the facts. Feature-detect on `AGENT_ALERT_FLOOR`.
|
|
368
|
+
*/
|
|
369
|
+
export { AGENT_ALERT_FLOOR, ALERT_SOURCES, DATADOG_PAYLOAD_TEMPLATE, HONEYCOMB_PAYLOAD_TEMPLATE } from "./ci-agent-alert.js";
|
|
370
|
+
export { AGENT_JOIN_WINDOW_MINUTES } from "./agent-facts.js";
|
|
371
|
+
/**
|
|
372
|
+
* Agent jobs from a failed apply and on a schedule (#5357):
|
|
373
|
+
* `productApplyFailedAgent` and `productScheduleAgent` return the agents'
|
|
374
|
+
* Op specs; an apply job records its failure for the agent with
|
|
375
|
+
* `CHANT_AGENT_FACTS=apply-failed` and the relay key (chant's own wave and
|
|
376
|
+
* `pr-apply` jobs, or `chant agent apply-failed` in a product's own job),
|
|
377
|
+
* and `opWavesAgentFactsEnv` gives a product's wave jobs those variables.
|
|
378
|
+
* Every agent's settings are checked against the default branch. Feature-
|
|
379
|
+
* detect on `AGENT_FACT_TRIGGERS_FLOOR`.
|
|
380
|
+
*/
|
|
381
|
+
export { AGENT_FACT_TRIGGERS_FLOOR, AGENT_FACTS_ENV, AGENT_FACTS_TRIGGERS, APPLY_FAILED_ERROR_MAX, agentFactsOn, opWavesAgentFactsEnv, recordApplyFailed } from "./ci-agent-triggers.js";
|
|
382
|
+
/**
|
|
383
|
+
* Agent jobs from a failed verify or soak (#5339): `productVerifyFailedAgent`
|
|
384
|
+
* returns the agent's Op spec. A pipeline's promote jobs and wave jobs record
|
|
385
|
+
* the facts with `agentFacts: { triggers: ["verify-failed"] }` (a failing soak
|
|
386
|
+
* check, a failed verify step), and a rollback the stage requested stands.
|
|
387
|
+
* Feature-detect on `VERIFY_FAILED_AGENT_FLOOR`.
|
|
388
|
+
*/
|
|
389
|
+
export { VERIFY_FAILED_AGENT_FLOOR, VERIFY_FAILED_OUTPUT_MAX, VERIFY_STEP_KINDS, isVerifyStep, recordVerifyFailed } from "./ci-agent-verify-failed.js";
|
|
296
390
|
/**
|
|
297
391
|
* The agent guard (#4770): a Claude Code PreToolUse hook on Bash and a
|
|
298
392
|
* wrapper per engine binary that refuse an agent's apply, approve or
|
|
@@ -309,6 +403,8 @@ export { AGENT_GUARD_FLOOR, agentGuard, agentGuardScript, agentGuardWrapper, CLA
|
|
|
309
403
|
* `OP_WAVE_AFTER_PLAN_FLOOR`.
|
|
310
404
|
*/
|
|
311
405
|
export { OP_WAVE_AFTER_PLAN_FLOOR } from "./op/runtime.js";
|
|
406
|
+
/** The first chant whose after-plan hooks get the wave's change risk as `risk` (#5422), the shape `input.risk` has. */
|
|
407
|
+
export { OP_WAVE_AFTER_PLAN_RISK_FLOOR } from "./op/op-waves-after-plan.js";
|
|
312
408
|
/**
|
|
313
409
|
* The standing pending gates waiting on a plan digest, with the pull request
|
|
314
410
|
* a `pr-<n>` gate belongs to (#4607): what a product's approve verb reads so
|
package/dist/ci-respond-run.d.ts
CHANGED
|
@@ -12,11 +12,18 @@ import type { PrReport } from "./pr-loop.js";
|
|
|
12
12
|
import type { OpWavesSpec } from "./op/op-waves.js";
|
|
13
13
|
import type { RunOpWaveResult } from "./op/op-waves-run.js";
|
|
14
14
|
import type { OpWaveOutcome } from "./op/op-waves-notify.js";
|
|
15
|
+
import { type WaveSummaryDeps } from "./ci-respond-summary.js";
|
|
15
16
|
import { type CiResponses, type DescriptionAsk, type DescriptionFinding, type FailedApply, type RefusedDiff, type RespondPlace, type RespondPost } from "./ci-respond.js";
|
|
16
17
|
/** Reads a change set stored under its digest; undefined when none is stored or it cannot be read. */
|
|
17
18
|
export type ChangeSetReader = (digest: string) => Promise<ChangeSetDocument | undefined>;
|
|
18
19
|
/** The ledger's reader: `chant/lifecycle`'s `_change-sets`, loaded on first call. */
|
|
19
20
|
export declare const ledgerChangeSetReader: ChangeSetReader;
|
|
21
|
+
/**
|
|
22
|
+
* The `wave-refused` note: the diff, and with `summary` (#5335) a model's
|
|
23
|
+
* summary above it, or the diff alone saying why the summary was skipped.
|
|
24
|
+
* Never throws.
|
|
25
|
+
*/
|
|
26
|
+
export declare function refusedNote(refused: RefusedDiff, mode: CiResponses["wave-refused"], words: CiProductWords, summary?: WaveSummaryDeps): Promise<string>;
|
|
20
27
|
/** A failed `pr-apply` report as a triage, or undefined when it did not fail. */
|
|
21
28
|
export declare function triageOfPrReport(report: PrReport, words?: CiProductWords): FailedApply | undefined;
|
|
22
29
|
/** A refused `pr-apply` report as a refused diff, or undefined when it was not refused for a moved plan or a holder. */
|
|
@@ -26,6 +33,7 @@ export declare function respondPrApply(forge: Pick<PrForge, "upsertComment" | "t
|
|
|
26
33
|
read?: ChangeSetReader;
|
|
27
34
|
env?: Record<string, string | undefined>;
|
|
28
35
|
words?: CiProductWords;
|
|
36
|
+
summary?: WaveSummaryDeps;
|
|
29
37
|
}): Promise<RespondPost[]>;
|
|
30
38
|
/** What a failed op wave job's run record says failed, or undefined when it did not fail. */
|
|
31
39
|
export declare function triageOfOpWave(spec: OpWavesSpec, k: number, outcome: OpWaveOutcome, words?: CiProductWords): FailedApply | undefined;
|
|
@@ -45,6 +53,7 @@ export declare function respondOpWave(spec: OpWavesSpec, k: number, outcome: OpW
|
|
|
45
53
|
read?: ChangeSetReader;
|
|
46
54
|
env?: Record<string, string | undefined>;
|
|
47
55
|
words?: CiProductWords;
|
|
56
|
+
summary?: WaveSummaryDeps;
|
|
48
57
|
}): Promise<RespondPost[]>;
|
|
49
58
|
/** The description check's settings: the decide backend and model, and the threshold. */
|
|
50
59
|
export interface DescriptionCheckSettings {
|
package/dist/ci-respond-run.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { activeProductWords, notifyWaveLabel } from "./ci-product-words.js";
|
|
9
9
|
import { CHANT_EXIT } from "./exit-codes.js";
|
|
10
|
+
import { renderRefusedSummary, summarizeRefusedWave } from "./ci-respond-summary.js";
|
|
10
11
|
import { changeSetDiff, checkDescription, DESCRIPTION_QUESTION, digestDiff, postResponse, renderRefusedDiff, renderTriage, resolveResponses, respondMarker, } from "./ci-respond.js";
|
|
11
12
|
/** The ledger's reader: `chant/lifecycle`'s `_change-sets`, loaded on first call. */
|
|
12
13
|
export const ledgerChangeSetReader = async (digest) => {
|
|
@@ -22,6 +23,30 @@ export const ledgerChangeSetReader = async (digest) => {
|
|
|
22
23
|
const log = (line) => {
|
|
23
24
|
process.stderr.write(line + "\n");
|
|
24
25
|
};
|
|
26
|
+
/** Whether the `wave-refused` response posts anything: `diff` or `summary`. */
|
|
27
|
+
const refusedOn = (mode) => mode === "diff" || mode === "summary";
|
|
28
|
+
/**
|
|
29
|
+
* The `wave-refused` note: the diff, and with `summary` (#5335) a model's
|
|
30
|
+
* summary above it, or the diff alone saying why the summary was skipped.
|
|
31
|
+
* Never throws.
|
|
32
|
+
*/
|
|
33
|
+
export async function refusedNote(refused, mode, words, summary) {
|
|
34
|
+
const diff = renderRefusedDiff(refused, words);
|
|
35
|
+
if (mode !== "summary")
|
|
36
|
+
return diff;
|
|
37
|
+
// Held and declined waves carry no diff: the note is the diff's text alone.
|
|
38
|
+
if (refused.reason !== "moved" || refused.members.length === 0)
|
|
39
|
+
return diff;
|
|
40
|
+
try {
|
|
41
|
+
const outcome = await summarizeRefusedWave(refused, words, summary);
|
|
42
|
+
if (outcome.status === "skipped")
|
|
43
|
+
log(`${words.product}: the refused wave's summary was skipped: ${outcome.reason}`);
|
|
44
|
+
return renderRefusedSummary(diff, outcome);
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
return renderRefusedSummary(diff, { status: "skipped", reason: err instanceof Error ? err.message : String(err) });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
25
50
|
// ---------------------------------------------------------------------------
|
|
26
51
|
// pr-apply
|
|
27
52
|
// ---------------------------------------------------------------------------
|
|
@@ -70,10 +95,10 @@ export async function respondPrApply(forge, report, given, opts = {}) {
|
|
|
70
95
|
if (triage)
|
|
71
96
|
posts.push(await postResponse(forge, "apply-failed", place, { pr: report.pr }, renderTriage(triage, words)));
|
|
72
97
|
}
|
|
73
|
-
if (responses["wave-refused"]
|
|
98
|
+
if (refusedOn(responses["wave-refused"])) {
|
|
74
99
|
const refused = await refusedOfPrReport(report, opts.read, words);
|
|
75
100
|
if (refused)
|
|
76
|
-
posts.push(await postResponse(forge, "wave-refused", place, { pr: report.pr },
|
|
101
|
+
posts.push(await postResponse(forge, "wave-refused", place, { pr: report.pr }, await refusedNote(refused, responses["wave-refused"], words, summaryDeps(opts))));
|
|
77
102
|
}
|
|
78
103
|
}
|
|
79
104
|
catch (err) {
|
|
@@ -169,7 +194,7 @@ export async function respondOpWave(spec, k, outcome, opts = {}) {
|
|
|
169
194
|
const posts = [];
|
|
170
195
|
try {
|
|
171
196
|
const triage = responses["apply-failed"] === "triage" ? triageOfOpWave(spec, k, outcome, words) : undefined;
|
|
172
|
-
const refused = responses["wave-refused"]
|
|
197
|
+
const refused = refusedOn(responses["wave-refused"]) && outcome.result ? await refusedOfOpWave(spec, k, outcome.result, opts.read, words) : undefined;
|
|
173
198
|
if (!triage && !refused)
|
|
174
199
|
return [];
|
|
175
200
|
const place = `${spec.name}:wave-${k}`;
|
|
@@ -177,7 +202,7 @@ export async function respondOpWave(spec, k, outcome, opts = {}) {
|
|
|
177
202
|
if (triage)
|
|
178
203
|
posts.push(await postResponse(forge, "apply-failed", place, where, renderTriage(triage, words)));
|
|
179
204
|
if (refused)
|
|
180
|
-
posts.push(await postResponse(forge, "wave-refused", place, where,
|
|
205
|
+
posts.push(await postResponse(forge, "wave-refused", place, where, await refusedNote(refused, responses["wave-refused"], words, summaryDeps(opts))));
|
|
181
206
|
}
|
|
182
207
|
catch (err) {
|
|
183
208
|
posts.push({ posted: false, warning: `the responses were not posted: ${err instanceof Error ? err.message : String(err)}` });
|
|
@@ -242,6 +267,12 @@ export function backendDescriptionAsk(backend, opts) {
|
|
|
242
267
|
}
|
|
243
268
|
const DESCRIPTION_INSTRUCTIONS = DESCRIPTION_QUESTION.instructions;
|
|
244
269
|
const DESCRIPTION_CRITERIA = DESCRIPTION_QUESTION.criteria;
|
|
270
|
+
/** The summary's ports: the caller's, reading the same variables the responses were read from. */
|
|
271
|
+
function summaryDeps(opts) {
|
|
272
|
+
if (opts.summary)
|
|
273
|
+
return opts.env && !opts.summary.env ? { ...opts.summary, env: opts.env } : opts.summary;
|
|
274
|
+
return opts.env ? { env: opts.env } : undefined;
|
|
275
|
+
}
|
|
245
276
|
function firstLine(text) {
|
|
246
277
|
return text.split("\n")[0].trim();
|
|
247
278
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The settings of `wave-refused: summary` (#5335) as a spec and as a job's
|
|
3
|
+
* variables, apart from the model run in `./ci-respond-summary.ts`, so a
|
|
4
|
+
* waves spec and the pipeline generators read them without loading the run.
|
|
5
|
+
*
|
|
6
|
+
* A generated job that posts `wave-refused` carries the settings as
|
|
7
|
+
* `CHANT_WAVE_SUMMARY_*` variables and the model's key under its own name
|
|
8
|
+
* ({@link waveSummaryJobEnv}), only when the mode is `summary`. With `diff`
|
|
9
|
+
* or `off` the job carries none of them.
|
|
10
|
+
*/
|
|
11
|
+
/** The summary's settings as a product sets them. Every field is optional. */
|
|
12
|
+
export interface WaveSummarySpec {
|
|
13
|
+
/** The model command, run through the shell with the prompt on stdin. Default: the review command with `--output-format json`. */
|
|
14
|
+
command?: string;
|
|
15
|
+
/** The variable holding the model's key, the one secret the command sees; on GitHub and Forgejo the secret of the same name. Default {@link WAVE_SUMMARY_KEY_ENV}. */
|
|
16
|
+
keyEnv?: string;
|
|
17
|
+
/** Minutes the command may run. Default {@link WAVE_SUMMARY_TIMEOUT_MINUTES}. */
|
|
18
|
+
timeout?: number;
|
|
19
|
+
/** The most summaries per day, counted on the ledger. Absent: no count limit. */
|
|
20
|
+
maxRuns?: number;
|
|
21
|
+
/** The most US dollars the summaries may cost per day, summed from their records. Absent: no money limit. */
|
|
22
|
+
maxCostUsd?: number;
|
|
23
|
+
/** The op the runs are recorded under. Default `<product>-refused-wave`. */
|
|
24
|
+
name?: string;
|
|
25
|
+
/** The ledger environment the runs are recorded under. Default `local`, as every agent's. */
|
|
26
|
+
env?: string;
|
|
27
|
+
}
|
|
28
|
+
/** The variable holding the model's key unless `keyEnv` names another. */
|
|
29
|
+
export declare const WAVE_SUMMARY_KEY_ENV = "ANTHROPIC_API_KEY";
|
|
30
|
+
/** Minutes the command may run unless `timeout` says otherwise. */
|
|
31
|
+
export declare const WAVE_SUMMARY_TIMEOUT_MINUTES = 10;
|
|
32
|
+
/** The variables a job carries the settings in. */
|
|
33
|
+
export declare const WAVE_SUMMARY_ENV: {
|
|
34
|
+
readonly command: "CHANT_WAVE_SUMMARY_COMMAND";
|
|
35
|
+
readonly keyEnv: "CHANT_WAVE_SUMMARY_KEY_ENV";
|
|
36
|
+
readonly timeout: "CHANT_WAVE_SUMMARY_TIMEOUT";
|
|
37
|
+
readonly maxRuns: "CHANT_WAVE_SUMMARY_MAX_RUNS";
|
|
38
|
+
readonly maxCostUsd: "CHANT_WAVE_SUMMARY_MAX_COST_USD";
|
|
39
|
+
readonly name: "CHANT_WAVE_SUMMARY_NAME";
|
|
40
|
+
readonly env: "CHANT_WAVE_SUMMARY_ENV";
|
|
41
|
+
};
|
|
42
|
+
/** An op or ledger environment name. */
|
|
43
|
+
export declare const OP_NAME: RegExp;
|
|
44
|
+
/** Why `spec` is not the summary's settings, or undefined when it is. */
|
|
45
|
+
export declare function waveSummarySpecProblem(spec: unknown): string | undefined;
|
|
46
|
+
/** The variables that carry `spec` to a job. Only the fields set. */
|
|
47
|
+
export declare function waveSummaryEnv(spec: WaveSummarySpec): Record<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* What a generated job that posts `wave-refused` carries for the summary:
|
|
50
|
+
* nothing unless `mode` is `summary`. Then the settings' variables
|
|
51
|
+
* ({@link waveSummaryEnv}, always naming the key's variable) and, on GitHub and Forgejo, the model's key from
|
|
52
|
+
* the secret of its name. A GitLab job reads the key as the CI/CD variable of
|
|
53
|
+
* that name, which every job of the pipeline already has. Throws on settings
|
|
54
|
+
* that are not settings.
|
|
55
|
+
*/
|
|
56
|
+
export declare function waveSummaryJobEnv(forge: "github" | "gitlab" | "forgejo", mode: string | undefined, spec?: WaveSummarySpec): Record<string, string>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The settings of `wave-refused: summary` (#5335) as a spec and as a job's
|
|
3
|
+
* variables, apart from the model run in `./ci-respond-summary.ts`, so a
|
|
4
|
+
* waves spec and the pipeline generators read them without loading the run.
|
|
5
|
+
*
|
|
6
|
+
* A generated job that posts `wave-refused` carries the settings as
|
|
7
|
+
* `CHANT_WAVE_SUMMARY_*` variables and the model's key under its own name
|
|
8
|
+
* ({@link waveSummaryJobEnv}), only when the mode is `summary`. With `diff`
|
|
9
|
+
* or `off` the job carries none of them.
|
|
10
|
+
*/
|
|
11
|
+
/** The variable holding the model's key unless `keyEnv` names another. */
|
|
12
|
+
export const WAVE_SUMMARY_KEY_ENV = "ANTHROPIC_API_KEY";
|
|
13
|
+
/** Minutes the command may run unless `timeout` says otherwise. */
|
|
14
|
+
export const WAVE_SUMMARY_TIMEOUT_MINUTES = 10;
|
|
15
|
+
/** The variables a job carries the settings in. */
|
|
16
|
+
export const WAVE_SUMMARY_ENV = {
|
|
17
|
+
command: "CHANT_WAVE_SUMMARY_COMMAND",
|
|
18
|
+
keyEnv: "CHANT_WAVE_SUMMARY_KEY_ENV",
|
|
19
|
+
timeout: "CHANT_WAVE_SUMMARY_TIMEOUT",
|
|
20
|
+
maxRuns: "CHANT_WAVE_SUMMARY_MAX_RUNS",
|
|
21
|
+
maxCostUsd: "CHANT_WAVE_SUMMARY_MAX_COST_USD",
|
|
22
|
+
name: "CHANT_WAVE_SUMMARY_NAME",
|
|
23
|
+
env: "CHANT_WAVE_SUMMARY_ENV",
|
|
24
|
+
};
|
|
25
|
+
const VAR_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
26
|
+
/** An op or ledger environment name. */
|
|
27
|
+
export const OP_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/;
|
|
28
|
+
/** Why `spec` is not the summary's settings, or undefined when it is. */
|
|
29
|
+
export function waveSummarySpecProblem(spec) {
|
|
30
|
+
if (spec === null || typeof spec !== "object" || Array.isArray(spec))
|
|
31
|
+
return "the summary's settings are an object";
|
|
32
|
+
const s = spec;
|
|
33
|
+
for (const key of Object.keys(s))
|
|
34
|
+
if (!(key in WAVE_SUMMARY_ENV))
|
|
35
|
+
return `the summary's settings name no field ${JSON.stringify(key)}; the fields are ${Object.keys(WAVE_SUMMARY_ENV).join(", ")}`;
|
|
36
|
+
for (const key of ["command", "keyEnv", "name", "env"])
|
|
37
|
+
if (s[key] !== undefined && typeof s[key] !== "string")
|
|
38
|
+
return `the summary's ${key} is a string`;
|
|
39
|
+
if (s.name !== undefined && !OP_NAME.test(s.name))
|
|
40
|
+
return `the summary's name ${JSON.stringify(s.name)} is not an op name`;
|
|
41
|
+
if (s.env !== undefined && !OP_NAME.test(s.env))
|
|
42
|
+
return `the summary's ledger environment ${JSON.stringify(s.env)} is not an environment name`;
|
|
43
|
+
if (s.command !== undefined && (s.command.trim() === "" || /[\r\n]/.test(s.command)))
|
|
44
|
+
return "the summary's command is one line";
|
|
45
|
+
if (s.keyEnv !== undefined && !VAR_NAME.test(s.keyEnv))
|
|
46
|
+
return `the summary's key variable ${JSON.stringify(s.keyEnv)} is not a variable name`;
|
|
47
|
+
if (s.timeout !== undefined && !(Number.isInteger(s.timeout) && s.timeout >= 1 && s.timeout <= 360))
|
|
48
|
+
return "the summary's timeout is a whole number of minutes from 1 to 360";
|
|
49
|
+
if (s.maxRuns !== undefined && !(Number.isInteger(s.maxRuns) && s.maxRuns >= 1))
|
|
50
|
+
return "the summary's maxRuns is a whole number of at least 1";
|
|
51
|
+
if (s.maxCostUsd !== undefined && !(typeof s.maxCostUsd === "number" && Number.isFinite(s.maxCostUsd) && s.maxCostUsd > 0))
|
|
52
|
+
return "the summary's maxCostUsd is a number of US dollars above 0";
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
/** The variables that carry `spec` to a job. Only the fields set. */
|
|
56
|
+
export function waveSummaryEnv(spec) {
|
|
57
|
+
const out = {};
|
|
58
|
+
for (const field of Object.keys(WAVE_SUMMARY_ENV)) {
|
|
59
|
+
const v = spec[field];
|
|
60
|
+
if (v !== undefined)
|
|
61
|
+
out[WAVE_SUMMARY_ENV[field]] = String(v);
|
|
62
|
+
}
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* What a generated job that posts `wave-refused` carries for the summary:
|
|
67
|
+
* nothing unless `mode` is `summary`. Then the settings' variables
|
|
68
|
+
* ({@link waveSummaryEnv}, always naming the key's variable) and, on GitHub and Forgejo, the model's key from
|
|
69
|
+
* the secret of its name. A GitLab job reads the key as the CI/CD variable of
|
|
70
|
+
* that name, which every job of the pipeline already has. Throws on settings
|
|
71
|
+
* that are not settings.
|
|
72
|
+
*/
|
|
73
|
+
export function waveSummaryJobEnv(forge, mode, spec = {}) {
|
|
74
|
+
if (mode !== "summary")
|
|
75
|
+
return {};
|
|
76
|
+
const problem = waveSummarySpecProblem(spec);
|
|
77
|
+
if (problem)
|
|
78
|
+
throw new Error(`waveSummary: ${problem}`);
|
|
79
|
+
const key = spec.keyEnv ?? WAVE_SUMMARY_KEY_ENV;
|
|
80
|
+
return { ...(forge === "gitlab" ? {} : { [key]: `\${{ secrets.${key} }}` }), ...waveSummaryEnv({ ...spec, keyEnv: key }) };
|
|
81
|
+
}
|