@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
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The delivery pipeline's declaration and the spec it folds to (#5324).
|
|
3
|
+
*
|
|
4
|
+
* A pipeline is the whole path from merge to the last environment: its
|
|
5
|
+
* stages in promotion order, the waves inside each stage, a gate per stage,
|
|
6
|
+
* the stage's hooks, and its holds. "Stage" means an environment in
|
|
7
|
+
* promotion order, not a CI step.
|
|
8
|
+
*
|
|
9
|
+
* The declaration is written in `.chant/pipeline.ts` inside the
|
|
10
|
+
* TypeScript-as-data subset (`./fold.ts`), and `chant build` folds it to
|
|
11
|
+
* this spec without running it. The spec is plain data, so a reviewer, the
|
|
12
|
+
* gates and the plan note read it before anything runs. Each stage becomes
|
|
13
|
+
* an op-waves spec (`./stages.ts`) that `chant run wave` runs, and the stage
|
|
14
|
+
* order is the promotion order `chant components promote` follows.
|
|
15
|
+
*
|
|
16
|
+
* The shape stays open: a key a later pass adds to a stage, its gate or the
|
|
17
|
+
* pipeline is one line in {@link STAGE_KEYS}, {@link GATE_KEYS} or
|
|
18
|
+
* {@link PIPELINE_KEYS} and its own check. An unknown key is refused, so a
|
|
19
|
+
* folded spec never carries a setting no chant reads.
|
|
20
|
+
*/
|
|
21
|
+
import { type GateApprovalSource, type OpWave, type OpWaveGatePolicy, type OpWaveHooks, type OpWavePoint, type OpWavesControl, type OpWavesSpec } from "../op/op-waves.js";
|
|
22
|
+
import { type OpWaveHolds } from "../op/op-waves-capability-spec.js";
|
|
23
|
+
import { type GateQuorumNode } from "../op/gate-quorum.js";
|
|
24
|
+
import type { OpEnvironment } from "../lexicon.js";
|
|
25
|
+
import { type StageArtifactRead, type StageArtifactSource } from "./artifacts.js";
|
|
26
|
+
import { type Soak } from "./soak.js";
|
|
27
|
+
import { type PipelineAgentStep } from "./agent-steps.js";
|
|
28
|
+
/** The `kind` a folded pipeline carries. A reader refuses any other. */
|
|
29
|
+
export declare const PIPELINE_SPEC_KIND = "chant.pipeline/v1";
|
|
30
|
+
/** Where a member keeps its pipeline declaration, from the member's directory (beside `chant.config.ts`). */
|
|
31
|
+
export declare const PIPELINE_FILE = ".chant/pipeline.ts";
|
|
32
|
+
/** Where `chant build` writes the folded spec, from the member's directory. */
|
|
33
|
+
export declare const PIPELINE_SPEC_FILE = ".chant/pipeline.json";
|
|
34
|
+
/**
|
|
35
|
+
* A run count a wave of many targets may fail and still let the stage go on:
|
|
36
|
+
* a whole number of runs, or a share of the wave's runs as `"<n>%"`.
|
|
37
|
+
*/
|
|
38
|
+
export type PipelineFailureTolerance = number | `${number}%`;
|
|
39
|
+
/**
|
|
40
|
+
* A manual hold. `true` holds the stage until a change to the pipeline lifts
|
|
41
|
+
* it; `until` lifts it at that time by itself. `description` (#5354) is
|
|
42
|
+
* what the person who lifts the hold reads first, such as what to check
|
|
43
|
+
* before the stage goes on: the plan note of the change that lifts it, the
|
|
44
|
+
* promote it refuses and `workspace status` show it.
|
|
45
|
+
*/
|
|
46
|
+
export type PipelineHold = true | {
|
|
47
|
+
reason?: string;
|
|
48
|
+
until?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
};
|
|
51
|
+
/** A freeze window: no promotion into the stage from `from` until `until` (ISO 8601 times). */
|
|
52
|
+
export interface PipelineFreezeWindow {
|
|
53
|
+
from: string;
|
|
54
|
+
until: string;
|
|
55
|
+
reason?: string;
|
|
56
|
+
}
|
|
57
|
+
/** The gate a stage's waves and its promotion pass through. Read at the base commit. */
|
|
58
|
+
export interface PipelineGate {
|
|
59
|
+
/** When the stage waits for an approval. Default `"always"`. */
|
|
60
|
+
policy?: OpWaveGatePolicy;
|
|
61
|
+
/** Which approvals of the stage's digest count. Default `"ledger"`. */
|
|
62
|
+
approval?: GateApprovalSource;
|
|
63
|
+
/**
|
|
64
|
+
* Approval rules: distinct approvers, from roles, one not the author. All
|
|
65
|
+
* must be met. Rules combine in `{ all: [...] }` and `{ any: [...] }`
|
|
66
|
+
* groups, nested up to three deep, and each rule and group may take a
|
|
67
|
+
* `name` (#5354).
|
|
68
|
+
*/
|
|
69
|
+
quorum?: GateQuorumNode[];
|
|
70
|
+
/** A decision point the gate asks in place of the ledger. */
|
|
71
|
+
point?: string | OpWavePoint;
|
|
72
|
+
/** The policy, cost and risk holds the stage's waves run over their plans. `risk` (#5325) holds a wave over its threshold and adds its `quorum` rules. */
|
|
73
|
+
holds?: OpWaveHolds;
|
|
74
|
+
/**
|
|
75
|
+
* The urgent rule (#5355): `chant components promote --urgent` passes the
|
|
76
|
+
* stage's gate on one proven approval from `role`, in place of its quorum.
|
|
77
|
+
* Absent: a promote has no urgent path into the stage.
|
|
78
|
+
*/
|
|
79
|
+
urgent?: PipelineUrgentRule;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A stage's urgent rule (#5355). One approval passes it, from an approver
|
|
83
|
+
* who holds `role` in `.chant/trust.json` at base and whose approval is
|
|
84
|
+
* proven by a seal against the signers at base. A plain `chant approve`
|
|
85
|
+
* line never counts, under any approval mode.
|
|
86
|
+
*/
|
|
87
|
+
export interface PipelineUrgentRule {
|
|
88
|
+
/** The role the one approver holds. */
|
|
89
|
+
role: string;
|
|
90
|
+
}
|
|
91
|
+
/** A wave inside a stage: an op wave, with the stage's failure tolerance on it unless it names its own. */
|
|
92
|
+
export interface PipelineWave extends OpWave {
|
|
93
|
+
failureTolerance?: PipelineFailureTolerance;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The scheduled re-run of pending promotions (#5326): a promote held by a
|
|
97
|
+
* soak exits 3 and records its pending fact, and a job on this schedule
|
|
98
|
+
* runs each stage's pending promotion again. Absent: no scheduled job.
|
|
99
|
+
*/
|
|
100
|
+
export interface PipelineRecheck {
|
|
101
|
+
/** A five-field cron line, such as `"0 * * * *"` (every hour). */
|
|
102
|
+
schedule: string;
|
|
103
|
+
}
|
|
104
|
+
/** One stage: an environment in promotion order. */
|
|
105
|
+
export interface PipelineStage {
|
|
106
|
+
/**
|
|
107
|
+
* The environment's name. It is the name `chant components promote --to`
|
|
108
|
+
* takes, the release ledger the stage records on, and the key a step's
|
|
109
|
+
* per-environment inputs are read by. Lowercase letters, digits, `-` and `_`.
|
|
110
|
+
*/
|
|
111
|
+
name: string;
|
|
112
|
+
/**
|
|
113
|
+
* The canary stage (#5327): its soak holds every stage after it. A
|
|
114
|
+
* promote into any stage downstream of the canary reads the canary's
|
|
115
|
+
* soak, through its gate `<canary>-soak`, before that stage's gate, so a
|
|
116
|
+
* promote from a later stage or one that skips the canary waits for it
|
|
117
|
+
* too. A canary stage takes a `soak` with at least one check.
|
|
118
|
+
*/
|
|
119
|
+
canary?: boolean;
|
|
120
|
+
/** The waves the stage applies, in order. */
|
|
121
|
+
waves: PipelineWave[];
|
|
122
|
+
/** The stage's gate. Absent: every wave waits for an approval, as an op wave does. */
|
|
123
|
+
gate?: PipelineGate;
|
|
124
|
+
/** Hooks around the stage's waves, after the pipeline's own. */
|
|
125
|
+
hooks?: OpWaveHooks;
|
|
126
|
+
/** A manual hold. A held stage refuses promotion with exit 3. */
|
|
127
|
+
hold?: PipelineHold;
|
|
128
|
+
/** Freeze windows. A stage in one refuses promotion with exit 3 until it ends. */
|
|
129
|
+
freeze?: PipelineFreezeWindow[];
|
|
130
|
+
/**
|
|
131
|
+
* A rollback of the stage pauses it (#5355), so the next release waits for
|
|
132
|
+
* `chant stage resume`. Default false.
|
|
133
|
+
*/
|
|
134
|
+
pauseAfterRollback?: boolean;
|
|
135
|
+
/** Failed runs a wave of many targets tolerates before the stage stops. Default 0. A wave's own wins. */
|
|
136
|
+
failureTolerance?: PipelineFailureTolerance;
|
|
137
|
+
/** The forge deployment environment the stage's jobs run in, unless a wave names its own. */
|
|
138
|
+
forgeEnvironment?: OpEnvironment;
|
|
139
|
+
/**
|
|
140
|
+
* The members whose dependents are planned again when one of their
|
|
141
|
+
* outputs changes in this stage (#5345): member names, or patterns where
|
|
142
|
+
* `*` matches within one path segment and `**` across. In place of the
|
|
143
|
+
* pipeline's `defaults.replanDependents`. Absent: none. A re-plan only
|
|
144
|
+
* plans; the plan waits at its gate.
|
|
145
|
+
*/
|
|
146
|
+
replanDependents?: string[];
|
|
147
|
+
/**
|
|
148
|
+
* The release artifacts the stage publishes once it applied (#5356), by
|
|
149
|
+
* name: a member's output, or where a secret is kept. Recorded on
|
|
150
|
+
* `<stage>/artifacts.jsonl` with the release digest. Absent: none.
|
|
151
|
+
*/
|
|
152
|
+
publish?: Record<string, StageArtifactSource>;
|
|
153
|
+
/**
|
|
154
|
+
* The artifacts of upstream stages the stage reads, of the release it takes
|
|
155
|
+
* (#5356), keyed by the variable its deploy gets each in. `chant build`
|
|
156
|
+
* refuses a read of a stage that is not upstream (an ancestor through
|
|
157
|
+
* `after`, else earlier in `stages`) or that does not publish it (#5385).
|
|
158
|
+
* Absent: none.
|
|
159
|
+
*/
|
|
160
|
+
reads?: Record<string, StageArtifactRead>;
|
|
161
|
+
/**
|
|
162
|
+
* The stages a release succeeds in before this one opens (#5353), by
|
|
163
|
+
* name: a release fans out to the stages that name one stage, and joins
|
|
164
|
+
* again at a stage that names several. The stage opens for a release only
|
|
165
|
+
* once that same release applied in each of them, and then through its
|
|
166
|
+
* own gate. Absent: the stage before it in `stages`. The first stage is
|
|
167
|
+
* the one a merge applies, and takes none.
|
|
168
|
+
*/
|
|
169
|
+
after?: string[];
|
|
170
|
+
/**
|
|
171
|
+
* How the stage takes releases (#5353). `"replace"`: one release at a
|
|
172
|
+
* time. A newer release waiting for the stage replaces an older one still
|
|
173
|
+
* waiting, and a release already in the stage finishes before the next
|
|
174
|
+
* one enters. Absent: each promote goes through on its own.
|
|
175
|
+
*/
|
|
176
|
+
queue?: PipelineStageQueue;
|
|
177
|
+
/**
|
|
178
|
+
* The soak (#5326): checks that must keep passing for `duration` after
|
|
179
|
+
* the stage's last apply before a promotion into the next stage passes
|
|
180
|
+
* its gate. A promotion during the soak exits 3 with the time left.
|
|
181
|
+
*/
|
|
182
|
+
soak?: Soak;
|
|
183
|
+
/**
|
|
184
|
+
* The stage's agent steps (#5358), by name, run in declared order for the
|
|
185
|
+
* release the stage takes: each a prompt, what it reads, and the JSON
|
|
186
|
+
* Schema its answer must match. A step reads, never approves and never
|
|
187
|
+
* applies. Refused on the first stage. Absent: none.
|
|
188
|
+
*/
|
|
189
|
+
agentSteps?: Record<string, PipelineAgentStep>;
|
|
190
|
+
/**
|
|
191
|
+
* What a failed verify after a promote into the stage, or a failed check
|
|
192
|
+
* of its soak, does (#5328). `"hold"`: the stage stays as applied and
|
|
193
|
+
* `workspace status` prints the rollback line for a person to run.
|
|
194
|
+
* `"rollback"`: chant records the failure and a rollback request bound to
|
|
195
|
+
* the stage's previous release, which waits at the stage's rollback gate
|
|
196
|
+
* for an approval (`./verify-rollback.ts`). Default `"hold"`.
|
|
197
|
+
*/
|
|
198
|
+
onVerifyFail?: PipelineOnVerifyFail;
|
|
199
|
+
}
|
|
200
|
+
/** The values a stage's `onVerifyFail` takes (#5328). */
|
|
201
|
+
export declare const PIPELINE_ON_VERIFY_FAIL: readonly ["hold", "rollback"];
|
|
202
|
+
export type PipelineOnVerifyFail = (typeof PIPELINE_ON_VERIFY_FAIL)[number];
|
|
203
|
+
/** The values a stage's `queue` takes (#5353). */
|
|
204
|
+
export declare const PIPELINE_STAGE_QUEUES: readonly ["replace"];
|
|
205
|
+
export type PipelineStageQueue = (typeof PIPELINE_STAGE_QUEUES)[number];
|
|
206
|
+
/**
|
|
207
|
+
* The op-waves settings every stage shares: the Op, the plan and apply
|
|
208
|
+
* commands or the capability step, the runner, the notify and responses.
|
|
209
|
+
* A stage's gate, hooks and waves are its own.
|
|
210
|
+
*/
|
|
211
|
+
export type PipelineDefaults = Partial<Omit<OpWavesSpec, "name" | "waves" | "control">>;
|
|
212
|
+
/** What a merge does once the first stage applied. */
|
|
213
|
+
export interface PipelineRelease {
|
|
214
|
+
/** Cut a release from the applied commit. Default true. */
|
|
215
|
+
cut?: boolean;
|
|
216
|
+
/** The cut's label. Default `auto`, the next version `release next` computes. */
|
|
217
|
+
label?: string;
|
|
218
|
+
/** The command the cut runs as, in place of `chant`: a product's bin, such as `["npx", "--no-install", "plywood"]`. */
|
|
219
|
+
bin?: string[];
|
|
220
|
+
}
|
|
221
|
+
/** The declaration a member's `.chant/pipeline.ts` writes. */
|
|
222
|
+
export interface PipelineDeclaration {
|
|
223
|
+
/** The pipeline's name, and the op its stage gates and skips are recorded under. */
|
|
224
|
+
name: string;
|
|
225
|
+
/** Stages in promotion order, first to last. The merge applies the first. */
|
|
226
|
+
stages: PipelineStage[];
|
|
227
|
+
/** Op-waves settings every stage shares. */
|
|
228
|
+
defaults?: PipelineDefaults;
|
|
229
|
+
/** What the merge does after the first stage applies. */
|
|
230
|
+
release?: PipelineRelease;
|
|
231
|
+
/** The control repo told once the first stage applied: the `<product>-applied` dispatch. */
|
|
232
|
+
control?: OpWavesControl;
|
|
233
|
+
/** The scheduled re-run of promotions a soak holds (#5326). */
|
|
234
|
+
recheck?: PipelineRecheck;
|
|
235
|
+
}
|
|
236
|
+
/** The folded spec: the declaration as data, with its kind. */
|
|
237
|
+
export interface PipelineSpec extends PipelineDeclaration {
|
|
238
|
+
kind: typeof PIPELINE_SPEC_KIND;
|
|
239
|
+
}
|
|
240
|
+
/** The keys a pipeline takes. A later pass adds its key here with its check. */
|
|
241
|
+
export declare const PIPELINE_KEYS: readonly string[];
|
|
242
|
+
/** The keys a stage takes. */
|
|
243
|
+
export declare const STAGE_KEYS: readonly string[];
|
|
244
|
+
/** The keys a stage's gate takes. */
|
|
245
|
+
export declare const GATE_KEYS: readonly string[];
|
|
246
|
+
/** What is wrong with a failure tolerance, or undefined. */
|
|
247
|
+
export declare function failureToleranceProblem(value: unknown, where: string): string | undefined;
|
|
248
|
+
/** What is wrong with a `replanDependents` list, or undefined (#5345). */
|
|
249
|
+
export declare function replanDependentsProblem(value: unknown, where: string): string | undefined;
|
|
250
|
+
/** The members a stage plans the dependents of when their outputs change (#5345): the stage's list, else the pipeline's default, else none. */
|
|
251
|
+
export declare function stageReplanDependents(spec: Pick<PipelineSpec, "stages" | "defaults">, stage: string): string[];
|
|
252
|
+
/**
|
|
253
|
+
* The canary stages a promote into `to` waits on (#5327), in pipeline
|
|
254
|
+
* order: each stage marked `canary` that `to` follows, directly or through
|
|
255
|
+
* the stages between ({@link stageUpstreams}). `to` itself is not one.
|
|
256
|
+
*/
|
|
257
|
+
export declare function canaryStagesBefore(spec: Pick<PipelineDeclaration, "stages">, to: string): PipelineStage[];
|
|
258
|
+
/**
|
|
259
|
+
* The stages each stage follows (#5353): its `after`, else the stage before
|
|
260
|
+
* it in the list, else none for the first.
|
|
261
|
+
*/
|
|
262
|
+
export declare function stageUpstreams(spec: Pick<PipelineDeclaration, "stages">, name: string): string[];
|
|
263
|
+
/**
|
|
264
|
+
* A cycle among the stages, as the stage names around it with the first
|
|
265
|
+
* repeated at the end, or undefined when there is none. Each stage follows
|
|
266
|
+
* {@link stageUpstreams}.
|
|
267
|
+
*/
|
|
268
|
+
export declare function stageCycle(spec: Pick<PipelineDeclaration, "stages">): string[] | undefined;
|
|
269
|
+
/** Whether a promote records its stages in the stage log (#5353): some stage declares `after` or `queue`. */
|
|
270
|
+
export declare function pipelineTracksStages(spec: Pick<PipelineDeclaration, "stages">): boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Everything wrong with a folded pipeline, one line each; empty when it
|
|
273
|
+
* reads. The stage-level checks are here; each stage's op-waves spec is
|
|
274
|
+
* checked again by `assertOpWavesSpec` when it is derived (`./stages.ts`).
|
|
275
|
+
*/
|
|
276
|
+
export declare function pipelineSpecProblems(value: unknown): string[];
|
|
277
|
+
/** The spec, checked, with its kind. Throws naming every problem. */
|
|
278
|
+
export declare function asPipelineSpec(value: unknown, where?: string): PipelineSpec;
|
|
279
|
+
/** Whether a parsed JSON document is a folded pipeline, by its kind. */
|
|
280
|
+
export declare function isPipelineSpecDocument(value: unknown): value is PipelineSpec;
|
|
281
|
+
/**
|
|
282
|
+
* The folded spec's JSON Schema, for an editor or a reader in another
|
|
283
|
+
* language. The stage's waves are op waves, checked in full when each
|
|
284
|
+
* stage's op-waves spec is derived.
|
|
285
|
+
*/
|
|
286
|
+
export declare const PIPELINE_SPEC_SCHEMA: {
|
|
287
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
288
|
+
readonly $id: "https://intentius.io/chant/schemas/pipeline-v1.json";
|
|
289
|
+
readonly title: "chant pipeline";
|
|
290
|
+
readonly type: "object";
|
|
291
|
+
readonly required: readonly ["kind", "name", "stages"];
|
|
292
|
+
readonly additionalProperties: false;
|
|
293
|
+
readonly properties: {
|
|
294
|
+
readonly kind: {
|
|
295
|
+
readonly const: "chant.pipeline/v1";
|
|
296
|
+
};
|
|
297
|
+
readonly name: {
|
|
298
|
+
readonly type: "string";
|
|
299
|
+
readonly pattern: string;
|
|
300
|
+
};
|
|
301
|
+
readonly defaults: {
|
|
302
|
+
readonly type: "object";
|
|
303
|
+
readonly not: {
|
|
304
|
+
readonly anyOf: {
|
|
305
|
+
required: string[];
|
|
306
|
+
}[];
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
readonly release: {
|
|
310
|
+
readonly type: "object";
|
|
311
|
+
readonly additionalProperties: false;
|
|
312
|
+
readonly properties: {
|
|
313
|
+
readonly cut: {
|
|
314
|
+
readonly type: "boolean";
|
|
315
|
+
};
|
|
316
|
+
readonly label: {
|
|
317
|
+
readonly type: "string";
|
|
318
|
+
readonly minLength: 1;
|
|
319
|
+
};
|
|
320
|
+
readonly bin: {
|
|
321
|
+
readonly type: "array";
|
|
322
|
+
readonly minItems: 1;
|
|
323
|
+
readonly items: {
|
|
324
|
+
readonly type: "string";
|
|
325
|
+
readonly minLength: 1;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
readonly control: {
|
|
331
|
+
readonly type: "object";
|
|
332
|
+
};
|
|
333
|
+
readonly recheck: {
|
|
334
|
+
readonly type: "object";
|
|
335
|
+
readonly required: readonly ["schedule"];
|
|
336
|
+
readonly additionalProperties: false;
|
|
337
|
+
readonly properties: {
|
|
338
|
+
readonly schedule: {
|
|
339
|
+
readonly type: "string";
|
|
340
|
+
readonly pattern: string;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
readonly stages: {
|
|
345
|
+
readonly type: "array";
|
|
346
|
+
readonly minItems: 1;
|
|
347
|
+
readonly items: {
|
|
348
|
+
readonly type: "object";
|
|
349
|
+
readonly required: readonly ["name", "waves"];
|
|
350
|
+
readonly additionalProperties: false;
|
|
351
|
+
readonly properties: {
|
|
352
|
+
readonly name: {
|
|
353
|
+
readonly type: "string";
|
|
354
|
+
readonly pattern: string;
|
|
355
|
+
};
|
|
356
|
+
readonly canary: {
|
|
357
|
+
readonly type: "boolean";
|
|
358
|
+
};
|
|
359
|
+
readonly waves: {
|
|
360
|
+
readonly type: "array";
|
|
361
|
+
readonly minItems: 1;
|
|
362
|
+
readonly items: {
|
|
363
|
+
readonly type: "object";
|
|
364
|
+
readonly required: readonly ["name"];
|
|
365
|
+
readonly properties: {
|
|
366
|
+
readonly name: {
|
|
367
|
+
readonly type: "string";
|
|
368
|
+
readonly pattern: string;
|
|
369
|
+
};
|
|
370
|
+
readonly failureTolerance: {
|
|
371
|
+
readonly $ref: "#/$defs/tolerance";
|
|
372
|
+
};
|
|
373
|
+
readonly soak: {
|
|
374
|
+
readonly $ref: "#/$defs/soak";
|
|
375
|
+
};
|
|
376
|
+
readonly canary: {
|
|
377
|
+
readonly type: "boolean";
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
readonly gate: {
|
|
383
|
+
readonly type: "object";
|
|
384
|
+
readonly additionalProperties: false;
|
|
385
|
+
readonly properties: {
|
|
386
|
+
readonly policy: {
|
|
387
|
+
readonly enum: readonly ["always", "on-destructive", "never"];
|
|
388
|
+
};
|
|
389
|
+
readonly approval: {
|
|
390
|
+
readonly enum: readonly ["ledger", "pr-review", "sealed", "pull-request"];
|
|
391
|
+
};
|
|
392
|
+
readonly quorum: {
|
|
393
|
+
readonly type: "array";
|
|
394
|
+
readonly minItems: 1;
|
|
395
|
+
readonly items: {
|
|
396
|
+
readonly $ref: "#/$defs/quorumNode";
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
readonly point: {
|
|
400
|
+
readonly type: readonly ["string", "object"];
|
|
401
|
+
};
|
|
402
|
+
readonly holds: {
|
|
403
|
+
readonly type: "object";
|
|
404
|
+
};
|
|
405
|
+
readonly urgent: {
|
|
406
|
+
readonly type: "object";
|
|
407
|
+
readonly required: readonly ["role"];
|
|
408
|
+
readonly additionalProperties: false;
|
|
409
|
+
readonly properties: {
|
|
410
|
+
readonly role: {
|
|
411
|
+
readonly type: "string";
|
|
412
|
+
readonly minLength: 1;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
readonly hooks: {
|
|
419
|
+
readonly type: "object";
|
|
420
|
+
};
|
|
421
|
+
readonly hold: {
|
|
422
|
+
readonly oneOf: readonly [{
|
|
423
|
+
readonly const: true;
|
|
424
|
+
}, {
|
|
425
|
+
readonly type: "object";
|
|
426
|
+
readonly additionalProperties: false;
|
|
427
|
+
readonly properties: {
|
|
428
|
+
readonly reason: {
|
|
429
|
+
readonly type: "string";
|
|
430
|
+
};
|
|
431
|
+
readonly until: {
|
|
432
|
+
readonly type: "string";
|
|
433
|
+
readonly format: "date-time";
|
|
434
|
+
};
|
|
435
|
+
readonly description: {
|
|
436
|
+
readonly type: "string";
|
|
437
|
+
readonly minLength: 1;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
}];
|
|
441
|
+
};
|
|
442
|
+
readonly freeze: {
|
|
443
|
+
readonly type: "array";
|
|
444
|
+
readonly items: {
|
|
445
|
+
readonly type: "object";
|
|
446
|
+
readonly required: readonly ["from", "until"];
|
|
447
|
+
readonly additionalProperties: false;
|
|
448
|
+
readonly properties: {
|
|
449
|
+
readonly from: {
|
|
450
|
+
readonly type: "string";
|
|
451
|
+
readonly format: "date-time";
|
|
452
|
+
};
|
|
453
|
+
readonly until: {
|
|
454
|
+
readonly type: "string";
|
|
455
|
+
readonly format: "date-time";
|
|
456
|
+
};
|
|
457
|
+
readonly reason: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
readonly failureTolerance: {
|
|
464
|
+
readonly $ref: "#/$defs/tolerance";
|
|
465
|
+
};
|
|
466
|
+
readonly forgeEnvironment: {
|
|
467
|
+
readonly type: "object";
|
|
468
|
+
readonly required: readonly ["name"];
|
|
469
|
+
readonly properties: {
|
|
470
|
+
readonly name: {
|
|
471
|
+
readonly type: "string";
|
|
472
|
+
readonly minLength: 1;
|
|
473
|
+
};
|
|
474
|
+
readonly url: {
|
|
475
|
+
readonly type: "string";
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
readonly replanDependents: {
|
|
480
|
+
readonly type: "array";
|
|
481
|
+
readonly items: {
|
|
482
|
+
readonly type: "string";
|
|
483
|
+
readonly minLength: 1;
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
readonly publish: {
|
|
487
|
+
readonly type: "object";
|
|
488
|
+
readonly additionalProperties: {
|
|
489
|
+
readonly oneOf: readonly [{
|
|
490
|
+
readonly type: "object";
|
|
491
|
+
readonly required: readonly ["member", "output"];
|
|
492
|
+
readonly additionalProperties: false;
|
|
493
|
+
readonly properties: {
|
|
494
|
+
readonly member: {
|
|
495
|
+
readonly type: "string";
|
|
496
|
+
readonly minLength: 1;
|
|
497
|
+
};
|
|
498
|
+
readonly output: {
|
|
499
|
+
readonly type: "string";
|
|
500
|
+
readonly minLength: 1;
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
}, {
|
|
504
|
+
readonly type: "object";
|
|
505
|
+
readonly required: readonly ["secret"];
|
|
506
|
+
readonly additionalProperties: false;
|
|
507
|
+
readonly properties: {
|
|
508
|
+
readonly secret: {
|
|
509
|
+
readonly type: readonly ["string", "object"];
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
}];
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
readonly reads: {
|
|
516
|
+
readonly type: "object";
|
|
517
|
+
readonly additionalProperties: {
|
|
518
|
+
readonly type: "object";
|
|
519
|
+
readonly required: readonly ["stage", "artifact"];
|
|
520
|
+
readonly additionalProperties: false;
|
|
521
|
+
readonly properties: {
|
|
522
|
+
readonly stage: {
|
|
523
|
+
readonly type: "string";
|
|
524
|
+
readonly pattern: string;
|
|
525
|
+
};
|
|
526
|
+
readonly artifact: {
|
|
527
|
+
readonly type: "string";
|
|
528
|
+
readonly minLength: 1;
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
readonly after: {
|
|
534
|
+
readonly type: "array";
|
|
535
|
+
readonly minItems: 1;
|
|
536
|
+
readonly uniqueItems: true;
|
|
537
|
+
readonly items: {
|
|
538
|
+
readonly type: "string";
|
|
539
|
+
readonly pattern: string;
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
readonly queue: {
|
|
543
|
+
readonly enum: readonly ["replace"];
|
|
544
|
+
};
|
|
545
|
+
readonly pauseAfterRollback: {
|
|
546
|
+
readonly type: "boolean";
|
|
547
|
+
};
|
|
548
|
+
readonly soak: {
|
|
549
|
+
readonly $ref: "#/$defs/soak";
|
|
550
|
+
};
|
|
551
|
+
readonly agentSteps: {
|
|
552
|
+
readonly type: "object";
|
|
553
|
+
readonly additionalProperties: {
|
|
554
|
+
readonly type: "object";
|
|
555
|
+
readonly required: readonly ["prompt", "schema"];
|
|
556
|
+
readonly additionalProperties: false;
|
|
557
|
+
readonly properties: {
|
|
558
|
+
readonly prompt: {
|
|
559
|
+
readonly type: "string";
|
|
560
|
+
readonly minLength: 1;
|
|
561
|
+
};
|
|
562
|
+
readonly schema: {
|
|
563
|
+
readonly type: "object";
|
|
564
|
+
};
|
|
565
|
+
readonly reads: {
|
|
566
|
+
readonly type: "object";
|
|
567
|
+
readonly additionalProperties: {
|
|
568
|
+
readonly oneOf: readonly [{
|
|
569
|
+
readonly type: "object";
|
|
570
|
+
readonly required: readonly ["stage", "artifact"];
|
|
571
|
+
readonly additionalProperties: false;
|
|
572
|
+
readonly properties: {
|
|
573
|
+
readonly stage: {
|
|
574
|
+
readonly type: "string";
|
|
575
|
+
readonly pattern: string;
|
|
576
|
+
};
|
|
577
|
+
readonly artifact: {
|
|
578
|
+
readonly type: "string";
|
|
579
|
+
readonly minLength: 1;
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
}, {
|
|
583
|
+
readonly type: "object";
|
|
584
|
+
readonly required: readonly ["step"];
|
|
585
|
+
readonly additionalProperties: false;
|
|
586
|
+
readonly properties: {
|
|
587
|
+
readonly step: {
|
|
588
|
+
readonly type: "string";
|
|
589
|
+
readonly minLength: 1;
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
}];
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
readonly command: {
|
|
596
|
+
readonly type: "string";
|
|
597
|
+
readonly minLength: 1;
|
|
598
|
+
};
|
|
599
|
+
readonly keyEnv: {
|
|
600
|
+
readonly type: "string";
|
|
601
|
+
readonly pattern: "^[A-Za-z_][A-Za-z0-9_]*$";
|
|
602
|
+
};
|
|
603
|
+
readonly timeout: {
|
|
604
|
+
readonly type: "integer";
|
|
605
|
+
readonly minimum: 1;
|
|
606
|
+
readonly maximum: 360;
|
|
607
|
+
};
|
|
608
|
+
readonly maxRuns: {
|
|
609
|
+
readonly type: "integer";
|
|
610
|
+
readonly minimum: 1;
|
|
611
|
+
};
|
|
612
|
+
readonly maxCostUsd: {
|
|
613
|
+
readonly type: "number";
|
|
614
|
+
readonly exclusiveMinimum: 0;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
readonly onVerifyFail: {
|
|
620
|
+
readonly enum: readonly ["hold", "rollback"];
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
readonly $defs: {
|
|
627
|
+
readonly quorumNode: {
|
|
628
|
+
readonly type: "object";
|
|
629
|
+
readonly properties: {
|
|
630
|
+
readonly name: {
|
|
631
|
+
readonly type: "string";
|
|
632
|
+
readonly pattern: "^[a-z0-9][a-z0-9_-]*$";
|
|
633
|
+
};
|
|
634
|
+
readonly all: {
|
|
635
|
+
readonly type: "array";
|
|
636
|
+
readonly minItems: 1;
|
|
637
|
+
readonly items: {
|
|
638
|
+
readonly $ref: "#/$defs/quorumNode";
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
readonly any: {
|
|
642
|
+
readonly type: "array";
|
|
643
|
+
readonly minItems: 1;
|
|
644
|
+
readonly items: {
|
|
645
|
+
readonly $ref: "#/$defs/quorumNode";
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
readonly description: "a rule { name?, targets?, count, roles?, notAuthor?, proven? }, or a group { name?, all | any }, nested up to 3 groups deep";
|
|
650
|
+
};
|
|
651
|
+
readonly tolerance: {
|
|
652
|
+
readonly oneOf: readonly [{
|
|
653
|
+
readonly type: "integer";
|
|
654
|
+
readonly minimum: 0;
|
|
655
|
+
}, {
|
|
656
|
+
readonly type: "string";
|
|
657
|
+
readonly pattern: string;
|
|
658
|
+
}];
|
|
659
|
+
};
|
|
660
|
+
readonly duration: {
|
|
661
|
+
readonly type: "string";
|
|
662
|
+
readonly pattern: "^(0|\\d+[mhd])$";
|
|
663
|
+
};
|
|
664
|
+
readonly check: {
|
|
665
|
+
readonly type: "object";
|
|
666
|
+
readonly required: readonly ["kind"];
|
|
667
|
+
readonly properties: {
|
|
668
|
+
readonly kind: {
|
|
669
|
+
readonly enum: readonly ["drift", "apply", "policy", "http", "prometheus", "cloudwatch-alarm", "command", "health"];
|
|
670
|
+
};
|
|
671
|
+
readonly name: {
|
|
672
|
+
readonly type: "string";
|
|
673
|
+
readonly minLength: 1;
|
|
674
|
+
};
|
|
675
|
+
readonly onFail: {
|
|
676
|
+
readonly enum: readonly ["restart", "hold"];
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
readonly soak: {
|
|
681
|
+
readonly type: "object";
|
|
682
|
+
readonly required: readonly ["duration"];
|
|
683
|
+
readonly additionalProperties: false;
|
|
684
|
+
readonly properties: {
|
|
685
|
+
readonly duration: {
|
|
686
|
+
readonly $ref: "#/$defs/duration";
|
|
687
|
+
};
|
|
688
|
+
readonly checks: {
|
|
689
|
+
readonly type: "array";
|
|
690
|
+
readonly items: {
|
|
691
|
+
readonly $ref: "#/$defs/check";
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
readonly overrides: {
|
|
695
|
+
readonly type: "array";
|
|
696
|
+
readonly items: {
|
|
697
|
+
readonly type: "object";
|
|
698
|
+
readonly required: readonly ["members"];
|
|
699
|
+
readonly additionalProperties: false;
|
|
700
|
+
readonly properties: {
|
|
701
|
+
readonly members: {
|
|
702
|
+
readonly type: "array";
|
|
703
|
+
readonly minItems: 1;
|
|
704
|
+
readonly items: {
|
|
705
|
+
readonly type: "string";
|
|
706
|
+
readonly minLength: 1;
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
readonly duration: {
|
|
710
|
+
readonly $ref: "#/$defs/duration";
|
|
711
|
+
};
|
|
712
|
+
readonly checks: {
|
|
713
|
+
readonly type: "array";
|
|
714
|
+
readonly items: {
|
|
715
|
+
readonly $ref: "#/$defs/check";
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
};
|