@intentius/chant 0.124.54 → 0.124.56
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/__fixtures__/estate-ledger.d.ts +13 -0
- package/dist/__fixtures__/estate-ledger.d.ts.map +1 -0
- package/dist/__fixtures__/estate-ledger.js +67 -0
- package/dist/__fixtures__/oidc-emulator.d.ts +11 -1
- package/dist/__fixtures__/oidc-emulator.d.ts.map +1 -1
- package/dist/__fixtures__/oidc-emulator.js +26 -2
- package/dist/__fixtures__/product-words.d.ts +78 -0
- package/dist/__fixtures__/product-words.d.ts.map +1 -0
- package/dist/__fixtures__/product-words.js +43 -0
- package/dist/__golden__/wave-loop/op-by-apply-after-fails.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-hold.json +20 -4
- package/dist/__golden__/wave-loop/op-by-apply-ignored.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-pass.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-skip.json +10 -2
- package/dist/__golden__/wave-loop/op-discover-rest-stops.json +22 -6
- package/dist/__golden__/wave-loop/op-discover-rest.json +44 -12
- package/dist/__golden__/wave-loop/op-discover-wide.json +12 -3
- package/dist/__golden__/wave-loop/op-held-on.json +28 -7
- package/dist/__golden__/wave-loop/op-hooks-apply-fails.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-fail-after-apply.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-fail-before-apply.json +4 -2
- package/dist/__golden__/wave-loop/op-hooks-held.json +26 -8
- package/dist/__golden__/wave-loop/op-hooks-hold-before-apply.json +18 -4
- package/dist/__golden__/wave-loop/op-hooks-pass.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-share.json +20 -7
- package/dist/__golden__/wave-loop/op-outcome-held.json +12 -3
- package/dist/__golden__/wave-loop/op-outcome-replan-approved.json +16 -5
- package/dist/__golden__/wave-loop/op-outcome-replan-forever.json +48 -21
- package/dist/__golden__/wave-loop/op-outcome-replan.json +16 -5
- package/dist/__golden__/wave-loop/op-outcome-stood-down.json +12 -3
- package/dist/__golden__/wave-loop/op-outcome-unreadable.json +12 -3
- package/dist/__golden__/wave-loop/op-overridden.json +28 -7
- package/dist/__golden__/wave-loop/op-per-run.json +20 -4
- package/dist/__golden__/wave-loop/op-point.json +18 -4
- package/dist/__golden__/wave-loop/op-pr-review.json +10 -2
- package/dist/__golden__/wave-loop/op-spend-change-only.json +10 -2
- package/dist/__golden__/wave-loop/op-spend.json +10 -2
- package/dist/__golden__/wave-loop/op-wave-commands.json +56 -13
- package/dist/__golden__/wave-loop/op-wide.json +20 -4
- package/dist/bucket-check/azure.d.ts +108 -0
- package/dist/bucket-check/azure.d.ts.map +1 -0
- package/dist/bucket-check/azure.js +258 -0
- package/dist/bucket-check/fixtures/azure.json +153 -0
- package/dist/bucket-check/fixtures/gcs.json +148 -0
- package/dist/bucket-check/fixtures/s3.json +277 -0
- package/dist/bucket-check/gcs.d.ts +77 -0
- package/dist/bucket-check/gcs.d.ts.map +1 -0
- package/dist/bucket-check/gcs.js +202 -0
- package/dist/bucket-check/index.d.ts +48 -0
- package/dist/bucket-check/index.d.ts.map +1 -0
- package/dist/bucket-check/index.js +44 -0
- package/dist/bucket-check/s3.d.ts +116 -0
- package/dist/bucket-check/s3.d.ts.map +1 -0
- package/dist/bucket-check/s3.js +362 -0
- package/dist/bucket-check/types.d.ts +66 -0
- package/dist/bucket-check/types.d.ts.map +1 -0
- package/dist/bucket-check/types.js +31 -0
- package/dist/bucket-check/wire.d.ts +27 -0
- package/dist/bucket-check/wire.d.ts.map +1 -0
- package/dist/bucket-check/wire.js +32 -0
- package/dist/bucket-check.d.ts +6 -0
- package/dist/bucket-check.d.ts.map +1 -0
- package/dist/bucket-check.js +5 -0
- package/dist/capabilities/templates.d.ts.map +1 -1
- package/dist/capabilities/templates.js +1 -2
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +2 -3
- package/dist/ci-agent.d.ts +381 -0
- package/dist/ci-agent.d.ts.map +1 -0
- package/dist/ci-agent.js +832 -0
- package/dist/ci-audit/attribution.d.ts +111 -0
- package/dist/ci-audit/attribution.d.ts.map +1 -0
- package/dist/ci-audit/attribution.js +194 -0
- package/dist/ci-audit/audit-log.d.ts +144 -0
- package/dist/ci-audit/audit-log.d.ts.map +1 -0
- package/dist/ci-audit/audit-log.js +149 -0
- package/dist/ci-audit/index.d.ts +12 -0
- package/dist/ci-audit/index.d.ts.map +1 -0
- package/dist/ci-audit/index.js +12 -0
- package/dist/ci-audit/unrecorded.d.ts +74 -0
- package/dist/ci-audit/unrecorded.d.ts.map +1 -0
- package/dist/ci-audit/unrecorded.js +95 -0
- package/dist/ci-audit.d.ts +3 -0
- package/dist/ci-audit.d.ts.map +1 -0
- package/dist/ci-audit.js +2 -0
- package/dist/ci-control.d.ts +42 -0
- package/dist/ci-control.d.ts.map +1 -0
- package/dist/ci-control.js +41 -0
- package/dist/ci-estate/delivery.d.ts +137 -0
- package/dist/ci-estate/delivery.d.ts.map +1 -0
- package/dist/ci-estate/delivery.js +311 -0
- package/dist/ci-estate/overdue.d.ts +34 -0
- package/dist/ci-estate/overdue.d.ts.map +1 -0
- package/dist/ci-estate/overdue.js +58 -0
- package/dist/ci-estate/page.d.ts +134 -0
- package/dist/ci-estate/page.d.ts.map +1 -0
- package/dist/ci-estate/page.js +233 -0
- package/dist/ci-estate/rows.d.ts +118 -0
- package/dist/ci-estate/rows.d.ts.map +1 -0
- package/dist/ci-estate/rows.js +126 -0
- package/dist/ci-estate.d.ts +92 -0
- package/dist/ci-estate.d.ts.map +1 -0
- package/dist/ci-estate.js +82 -0
- package/dist/ci-handover.d.ts +29 -5
- package/dist/ci-handover.d.ts.map +1 -1
- package/dist/ci-handover.js +50 -16
- package/dist/ci-identity.d.ts +82 -7
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +86 -15
- package/dist/ci-job-guard.d.ts +139 -0
- package/dist/ci-job-guard.d.ts.map +1 -0
- package/dist/ci-job-guard.js +287 -0
- package/dist/ci-jobs.d.ts +7 -0
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -0
- package/dist/ci-product-words.d.ts +296 -0
- package/dist/ci-product-words.d.ts.map +1 -0
- package/dist/ci-product-words.js +407 -0
- package/dist/ci-product.d.ts +117 -0
- package/dist/ci-product.d.ts.map +1 -0
- package/dist/ci-product.js +113 -0
- package/dist/ci-respond-run.d.ts +73 -0
- package/dist/ci-respond-run.d.ts.map +1 -0
- package/dist/ci-respond-run.js +247 -0
- package/dist/ci-respond.d.ts +189 -0
- package/dist/ci-respond.d.ts.map +1 -0
- package/dist/ci-respond.js +285 -0
- package/dist/cli/commands/audit.d.ts +2 -2
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +3 -2
- package/dist/cli/commands/carve.js +2 -2
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +1 -1
- package/dist/cli/handlers/agent.d.ts +17 -0
- package/dist/cli/handlers/agent.d.ts.map +1 -0
- package/dist/cli/handlers/agent.js +114 -0
- package/dist/cli/handlers/approve-confirm.d.ts +84 -0
- package/dist/cli/handlers/approve-confirm.d.ts.map +1 -0
- package/dist/cli/handlers/approve-confirm.js +142 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +19 -1
- package/dist/cli/handlers/audit-log.d.ts +12 -0
- package/dist/cli/handlers/audit-log.d.ts.map +1 -0
- package/dist/cli/handlers/audit-log.js +81 -0
- package/dist/cli/handlers/build.d.ts +7 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +124 -1
- package/dist/cli/handlers/ci-check-job.d.ts +11 -0
- package/dist/cli/handlers/ci-check-job.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check-job.js +27 -0
- package/dist/cli/handlers/ci-check.d.ts +3 -0
- package/dist/cli/handlers/ci-check.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check.js +63 -0
- package/dist/cli/handlers/ci-forge-check.d.ts +3 -0
- package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -0
- package/dist/cli/handlers/ci-forge-check.js +89 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts +12 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts.map +1 -0
- package/dist/cli/handlers/e2e-safe-run.js +23 -0
- package/dist/cli/handlers/fan-out.js +4 -0
- package/dist/cli/handlers/gate-pending.d.ts +11 -0
- package/dist/cli/handlers/gate-pending.d.ts.map +1 -0
- package/dist/cli/handlers/gate-pending.js +44 -0
- package/dist/cli/handlers/init.d.ts.map +1 -1
- package/dist/cli/handlers/init.js +1 -0
- package/dist/cli/handlers/ledger.js +1 -1
- package/dist/cli/handlers/lifecycle-drift.d.ts +6 -2
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle-drift.js +7 -2
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +64 -5
- package/dist/cli/handlers/notify-relay.d.ts +15 -0
- package/dist/cli/handlers/notify-relay.d.ts.map +1 -0
- package/dist/cli/handlers/notify-relay.js +130 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +42 -11
- package/dist/cli/handlers/pr.d.ts +43 -3
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +908 -205
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +21 -2
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +3 -0
- package/dist/cli/handlers/run-wave.d.ts +8 -0
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +160 -2
- package/dist/cli/handlers/run.d.ts +6 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +86 -1
- package/dist/cli/handlers/serve.d.ts.map +1 -1
- package/dist/cli/handlers/serve.js +10 -1
- package/dist/cli/main.d.ts +11 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +178 -13
- package/dist/cli/mcp/ledger-tools.d.ts +36 -0
- package/dist/cli/mcp/ledger-tools.d.ts.map +1 -0
- package/dist/cli/mcp/ledger-tools.js +122 -0
- package/dist/cli/mcp/product-tools.d.ts +78 -0
- package/dist/cli/mcp/product-tools.d.ts.map +1 -0
- package/dist/cli/mcp/product-tools.js +93 -0
- package/dist/cli/mcp/read-only.d.ts +34 -0
- package/dist/cli/mcp/read-only.d.ts.map +1 -0
- package/dist/cli/mcp/read-only.js +61 -0
- package/dist/cli/mcp/report-tools.d.ts +48 -0
- package/dist/cli/mcp/report-tools.d.ts.map +1 -0
- package/dist/cli/mcp/report-tools.js +128 -0
- package/dist/cli/mcp/server.d.ts +28 -1
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/server.js +86 -15
- package/dist/cli/mcp-config.d.ts +9 -2
- package/dist/cli/mcp-config.d.ts.map +1 -1
- package/dist/cli/mcp-config.js +8 -3
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +164 -3
- package/dist/cli/registry.d.ts +73 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cloud-lister/sigv4.d.ts +42 -7
- package/dist/cloud-lister/sigv4.d.ts.map +1 -1
- package/dist/cloud-lister/sigv4.js +72 -22
- package/dist/components/adoption.d.ts +69 -0
- package/dist/components/adoption.d.ts.map +1 -0
- package/dist/components/adoption.js +92 -0
- package/dist/components/apply-lease.d.ts +19 -0
- package/dist/components/apply-lease.d.ts.map +1 -0
- package/dist/components/apply-lease.js +41 -0
- package/dist/components/capability.d.ts +159 -5
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +39 -6
- package/dist/components/check-hooks.d.ts +116 -0
- package/dist/components/check-hooks.d.ts.map +1 -0
- package/dist/components/check-hooks.js +192 -0
- package/dist/components/check-steps.d.ts +74 -0
- package/dist/components/check-steps.d.ts.map +1 -0
- package/dist/components/check-steps.js +102 -0
- package/dist/components/ci-services.d.ts +57 -0
- package/dist/components/ci-services.d.ts.map +1 -0
- package/dist/components/ci-services.js +60 -0
- package/dist/components/cli-support.d.ts +13 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +10 -2
- package/dist/components/driver.d.ts +32 -3
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +59 -5
- package/dist/components/fan-out-run.d.ts +12 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +56 -16
- package/dist/components/groups.d.ts.map +1 -1
- package/dist/components/groups.js +23 -5
- package/dist/components/pr-env-ledger.d.ts +32 -0
- package/dist/components/pr-env-ledger.d.ts.map +1 -0
- package/dist/components/pr-env-ledger.js +38 -0
- package/dist/components/pr-env-ports.d.ts +12 -0
- package/dist/components/pr-env-ports.d.ts.map +1 -1
- package/dist/components/pr-env-ports.js +13 -3
- package/dist/components/pr-env-run.d.ts +6 -0
- package/dist/components/pr-env-run.d.ts.map +1 -1
- package/dist/components/pr-env-run.js +3 -2
- package/dist/components/pr-environment.d.ts +32 -4
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +26 -8
- package/dist/components/pr-pipeline.d.ts +297 -5
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +329 -18
- package/dist/components/pr-policy.d.ts +26 -2
- package/dist/components/pr-policy.d.ts.map +1 -1
- package/dist/components/pr-policy.js +41 -7
- package/dist/components/pr-run.d.ts +71 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +91 -7
- package/dist/components/pr-targets.d.ts +24 -0
- package/dist/components/pr-targets.d.ts.map +1 -0
- package/dist/components/pr-targets.js +48 -0
- package/dist/components/product-pipeline.d.ts +250 -0
- package/dist/components/product-pipeline.d.ts.map +1 -0
- package/dist/components/product-pipeline.js +212 -0
- package/dist/components/promote.d.ts +6 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +4 -1
- package/dist/components/release-compile.d.ts +22 -1
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +85 -0
- package/dist/components/release-promote.d.ts +15 -1
- package/dist/components/release-promote.d.ts.map +1 -1
- package/dist/components/release-promote.js +67 -2
- package/dist/components/repo-lock.d.ts +27 -0
- package/dist/components/repo-lock.d.ts.map +1 -0
- package/dist/components/repo-lock.js +49 -0
- package/dist/components/row-lease.d.ts +84 -0
- package/dist/components/row-lease.d.ts.map +1 -0
- package/dist/components/row-lease.js +110 -0
- package/dist/components/wave-plan.d.ts +42 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +72 -4
- package/dist/control/applied.d.ts +89 -0
- package/dist/control/applied.d.ts.map +1 -0
- package/dist/control/applied.js +175 -0
- package/dist/control/consumers.d.ts +78 -0
- package/dist/control/consumers.d.ts.map +1 -0
- package/dist/control/consumers.js +172 -0
- package/dist/control/dispatch.d.ts +334 -0
- package/dist/control/dispatch.d.ts.map +1 -0
- package/dist/control/dispatch.js +519 -0
- package/dist/control/edges.d.ts +75 -0
- package/dist/control/edges.d.ts.map +1 -0
- package/dist/control/edges.js +133 -0
- package/dist/control/reconcile.d.ts +120 -0
- package/dist/control/reconcile.d.ts.map +1 -0
- package/dist/control/reconcile.js +178 -0
- package/dist/control/records.d.ts +187 -0
- package/dist/control/records.d.ts.map +1 -0
- package/dist/control/records.js +307 -0
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.js +25 -1
- package/dist/e2e-harness/bucket.d.ts +21 -0
- package/dist/e2e-harness/bucket.d.ts.map +1 -0
- package/dist/e2e-harness/bucket.js +61 -0
- package/dist/e2e-harness/claim.d.ts +70 -0
- package/dist/e2e-harness/claim.d.ts.map +1 -0
- package/dist/e2e-harness/claim.js +98 -0
- package/dist/e2e-harness/driver.d.ts +64 -0
- package/dist/e2e-harness/driver.d.ts.map +1 -0
- package/dist/e2e-harness/driver.js +243 -0
- package/dist/e2e-harness/forgejo.d.ts +77 -0
- package/dist/e2e-harness/forgejo.d.ts.map +1 -0
- package/dist/e2e-harness/forgejo.js +205 -0
- package/dist/e2e-harness/git.d.ts +32 -0
- package/dist/e2e-harness/git.d.ts.map +1 -0
- package/dist/e2e-harness/git.js +67 -0
- package/dist/e2e-harness/index.d.ts +22 -0
- package/dist/e2e-harness/index.d.ts.map +1 -0
- package/dist/e2e-harness/index.js +48 -0
- package/dist/e2e-harness/jobs.d.ts +8 -0
- package/dist/e2e-harness/jobs.d.ts.map +1 -0
- package/dist/e2e-harness/jobs.js +34 -0
- package/dist/e2e-harness/pins.d.ts +45 -0
- package/dist/e2e-harness/pins.d.ts.map +1 -0
- package/dist/e2e-harness/pins.js +44 -0
- package/dist/e2e-harness/ports.d.ts +113 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -0
- package/dist/e2e-harness/ports.js +4 -0
- package/dist/e2e-harness/reports.d.ts +45 -0
- package/dist/e2e-harness/reports.d.ts.map +1 -0
- package/dist/e2e-harness/reports.js +57 -0
- package/dist/e2e-harness/safe-run-cli.d.ts +17 -0
- package/dist/e2e-harness/safe-run-cli.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run-cli.js +43 -0
- package/dist/e2e-harness/safe-run.d.ts +61 -0
- package/dist/e2e-harness/safe-run.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run.js +172 -0
- package/dist/e2e-harness/scenario.d.ts +11 -0
- package/dist/e2e-harness/scenario.d.ts.map +1 -0
- package/dist/e2e-harness/scenario.js +89 -0
- package/dist/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/dist/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/dist/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/dist/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/dist/e2e-harness/schemas/index.d.ts +191 -0
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -0
- package/dist/e2e-harness/schemas/index.js +62 -0
- package/dist/e2e-harness/stack.d.ts +124 -0
- package/dist/e2e-harness/stack.d.ts.map +1 -0
- package/dist/e2e-harness/stack.js +207 -0
- package/dist/e2e-harness/steps.d.ts +11 -0
- package/dist/e2e-harness/steps.d.ts.map +1 -0
- package/dist/e2e-harness/steps.js +22 -0
- package/dist/e2e-harness.d.ts +3 -0
- package/dist/e2e-harness.d.ts.map +1 -0
- package/dist/e2e-harness.js +2 -0
- package/dist/engine-facts.d.ts.map +1 -1
- package/dist/engine-facts.js +1 -2
- package/dist/exit-codes.d.ts +54 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +55 -0
- package/dist/forge-check/check.d.ts +63 -0
- package/dist/forge-check/check.d.ts.map +1 -0
- package/dist/forge-check/check.js +139 -0
- package/dist/forge-check/contract.d.ts +152 -0
- package/dist/forge-check/contract.d.ts.map +1 -0
- package/dist/forge-check/contract.js +118 -0
- package/dist/forge-check/forge.d.ts +42 -0
- package/dist/forge-check/forge.d.ts.map +1 -0
- package/dist/forge-check/forge.js +338 -0
- package/dist/forge-check/index.d.ts +24 -0
- package/dist/forge-check/index.d.ts.map +1 -0
- package/dist/forge-check/index.js +23 -0
- package/dist/forge-check/pulumi.d.ts +44 -0
- package/dist/forge-check/pulumi.d.ts.map +1 -0
- package/dist/forge-check/pulumi.js +184 -0
- package/dist/forge-check/read-only.d.ts +26 -0
- package/dist/forge-check/read-only.d.ts.map +1 -0
- package/dist/forge-check/read-only.js +53 -0
- package/dist/forge-check/trust.d.ts +94 -0
- package/dist/forge-check/trust.d.ts.map +1 -0
- package/dist/forge-check/trust.js +532 -0
- package/dist/forge-check/types.d.ts +80 -0
- package/dist/forge-check/types.d.ts.map +1 -0
- package/dist/forge-check/types.js +18 -0
- package/dist/forge-check.d.ts +6 -0
- package/dist/forge-check.d.ts.map +1 -0
- package/dist/forge-check.js +5 -0
- package/dist/gate-decision.d.ts +1 -0
- package/dist/gate-decision.d.ts.map +1 -1
- package/dist/gate-decision.js +2 -0
- package/dist/gate-policy.d.ts +47 -1
- package/dist/gate-policy.d.ts.map +1 -1
- package/dist/gate-policy.js +50 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lexicon.d.ts +152 -6
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.d.ts +24 -0
- package/dist/lifecycle/adoption-file.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.js +1 -2
- package/dist/lifecycle/cloud-index.d.ts.map +1 -1
- package/dist/lifecycle/cloud-index.js +1 -2
- package/dist/lifecycle/gate-applied.d.ts +6 -0
- package/dist/lifecycle/gate-applied.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +29 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +10 -1
- package/dist/lifecycle/gate-pending-by-plan.d.ts +75 -0
- package/dist/lifecycle/gate-pending-by-plan.d.ts.map +1 -0
- package/dist/lifecycle/gate-pending-by-plan.js +96 -0
- package/dist/lifecycle/gated-request-digest.d.ts +28 -0
- package/dist/lifecycle/gated-request-digest.d.ts.map +1 -0
- package/dist/lifecycle/gated-request-digest.js +35 -0
- package/dist/lifecycle/gated-request.d.ts +126 -0
- package/dist/lifecycle/gated-request.d.ts.map +1 -0
- package/dist/lifecycle/gated-request.js +204 -0
- package/dist/lifecycle/identity-match.d.ts +15 -0
- package/dist/lifecycle/identity-match.d.ts.map +1 -1
- package/dist/lifecycle/identity-match.js +11 -6
- package/dist/lifecycle/index-diff.d.ts +40 -0
- package/dist/lifecycle/index-diff.d.ts.map +1 -1
- package/dist/lifecycle/index-diff.js +1 -2
- package/dist/lifecycle/index-document.d.ts.map +1 -1
- package/dist/lifecycle/index-document.js +1 -2
- package/dist/lifecycle/index-import.d.ts +4 -1
- package/dist/lifecycle/index-import.d.ts.map +1 -1
- package/dist/lifecycle/index-import.js +29 -32
- package/dist/lifecycle/ledger-read.d.ts.map +1 -1
- package/dist/lifecycle/ledger-read.js +7 -3
- package/dist/lifecycle/lock-rows.d.ts +76 -0
- package/dist/lifecycle/lock-rows.d.ts.map +1 -0
- package/dist/lifecycle/lock-rows.js +140 -0
- package/dist/lifecycle/query.d.ts +50 -3
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +97 -7
- package/dist/lifecycle/release-catalog-site.d.ts +66 -0
- package/dist/lifecycle/release-catalog-site.d.ts.map +1 -0
- package/dist/lifecycle/release-catalog-site.js +232 -0
- package/dist/lifecycle/release-catalog.d.ts +201 -0
- package/dist/lifecycle/release-catalog.d.ts.map +1 -0
- package/dist/lifecycle/release-catalog.js +198 -0
- package/dist/lifecycle/release-changelog.d.ts +41 -0
- package/dist/lifecycle/release-changelog.d.ts.map +1 -0
- package/dist/lifecycle/release-changelog.js +38 -0
- package/dist/lifecycle/release-cut.d.ts +1 -0
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +1 -1
- package/dist/lifecycle/release-ledger.d.ts +16 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +9 -0
- package/dist/lifecycle/release-publish.d.ts +43 -22
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- package/dist/lifecycle/release-read.d.ts.map +1 -1
- package/dist/lifecycle/release-read.js +3 -0
- package/dist/lifecycle/release-status.d.ts +106 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -0
- package/dist/lifecycle/release-status.js +115 -0
- package/dist/lifecycle/resource-lock.d.ts +120 -0
- package/dist/lifecycle/resource-lock.d.ts.map +1 -0
- package/dist/lifecycle/resource-lock.js +317 -0
- package/dist/lifecycle/retention.d.ts.map +1 -1
- package/dist/lifecycle/retention.js +3 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +9 -1
- package/dist/lifecycle/snapshot-store-s3.d.ts +36 -3
- package/dist/lifecycle/snapshot-store-s3.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store-s3.js +9 -44
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store.js +1 -2
- package/dist/lifecycle/target-lock.d.ts +15 -0
- package/dist/lifecycle/target-lock.d.ts.map +1 -1
- package/dist/lifecycle/target-lock.js +25 -10
- package/dist/lifecycle/wave-plans.d.ts +23 -7
- package/dist/lifecycle/wave-plans.d.ts.map +1 -1
- package/dist/lifecycle/wave-plans.js +9 -2
- package/dist/mcp/types.d.ts +7 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/notify-product.d.ts +43 -0
- package/dist/notify-product.d.ts.map +1 -0
- package/dist/notify-product.js +58 -0
- package/dist/notify-relay.d.ts +197 -0
- package/dist/notify-relay.d.ts.map +1 -0
- package/dist/notify-relay.js +321 -0
- package/dist/notify.d.ts +44 -4
- package/dist/notify.d.ts.map +1 -1
- package/dist/notify.js +77 -14
- package/dist/object-store/azure-blob.d.ts +129 -0
- package/dist/object-store/azure-blob.d.ts.map +1 -0
- package/dist/object-store/azure-blob.js +341 -0
- package/dist/object-store/common.d.ts +108 -0
- package/dist/object-store/common.d.ts.map +1 -0
- package/dist/object-store/common.js +80 -0
- package/dist/object-store/errors.d.ts +28 -0
- package/dist/object-store/errors.d.ts.map +1 -0
- package/dist/object-store/errors.js +21 -0
- package/dist/object-store/from-env.d.ts +18 -0
- package/dist/object-store/from-env.d.ts.map +1 -0
- package/dist/object-store/from-env.js +22 -0
- package/dist/object-store/gcs.d.ts +106 -0
- package/dist/object-store/gcs.d.ts.map +1 -0
- package/dist/object-store/gcs.js +393 -0
- package/dist/object-store/index.d.ts +9 -0
- package/dist/object-store/index.d.ts.map +1 -0
- package/dist/object-store/index.js +8 -0
- package/dist/object-store/s3.d.ts +146 -0
- package/dist/object-store/s3.d.ts.map +1 -0
- package/dist/object-store/s3.js +306 -0
- package/dist/op/activities/converge.d.ts.map +1 -1
- package/dist/op/activities/converge.js +2 -1
- package/dist/op/activities/index.d.ts +1 -1
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/index.js +1 -1
- package/dist/op/activities/review-agent.d.ts +55 -2
- package/dist/op/activities/review-agent.d.ts.map +1 -1
- package/dist/op/activities/review-agent.js +65 -5
- package/dist/op/approval-status.d.ts +103 -0
- package/dist/op/approval-status.d.ts.map +1 -0
- package/dist/op/approval-status.js +197 -0
- package/dist/op/gate.d.ts +29 -1
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +59 -23
- package/dist/op/generate-pipeline.d.ts.map +1 -1
- package/dist/op/generate-pipeline.js +7 -1
- package/dist/op/index.d.ts +12 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +7 -1
- package/dist/op/op-waves-after-plan.d.ts +137 -0
- package/dist/op/op-waves-after-plan.d.ts.map +1 -0
- package/dist/op/op-waves-after-plan.js +163 -0
- package/dist/op/op-waves-capability-spec.d.ts +63 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -0
- package/dist/op/op-waves-capability-spec.js +115 -0
- package/dist/op/op-waves-capability.d.ts +197 -0
- package/dist/op/op-waves-capability.d.ts.map +1 -0
- package/dist/op/op-waves-capability.js +311 -0
- package/dist/op/op-waves-events.d.ts +54 -0
- package/dist/op/op-waves-events.d.ts.map +1 -0
- package/dist/op/op-waves-events.js +122 -0
- package/dist/op/op-waves-notify.d.ts +7 -1
- package/dist/op/op-waves-notify.d.ts.map +1 -1
- package/dist/op/op-waves-notify.js +35 -16
- package/dist/op/op-waves-release-port.d.ts +18 -0
- package/dist/op/op-waves-release-port.d.ts.map +1 -0
- package/dist/op/op-waves-release-port.js +61 -0
- package/dist/op/op-waves-release.d.ts +92 -0
- package/dist/op/op-waves-release.d.ts.map +1 -0
- package/dist/op/op-waves-release.js +96 -0
- package/dist/op/op-waves-run.d.ts +182 -6
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +1076 -44
- package/dist/op/op-waves-stand-down.d.ts +60 -0
- package/dist/op/op-waves-stand-down.d.ts.map +1 -0
- package/dist/op/op-waves-stand-down.js +96 -0
- package/dist/op/op-waves.d.ts +187 -8
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +203 -19
- package/dist/op/runtime.d.ts +95 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +18 -0
- package/dist/op/stage-hooks.d.ts +45 -7
- package/dist/op/stage-hooks.d.ts.map +1 -1
- package/dist/op/stage-hooks.js +61 -3
- package/dist/op/steward-beside.d.ts.map +1 -1
- package/dist/op/steward-beside.js +2 -1
- package/dist/op/types.d.ts +2 -2
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/types.js +3 -2
- package/dist/otlp-metrics.d.ts +38 -0
- package/dist/otlp-metrics.d.ts.map +1 -0
- package/dist/otlp-metrics.js +82 -0
- package/dist/otlp.d.ts +249 -0
- package/dist/otlp.d.ts.map +1 -0
- package/dist/otlp.js +425 -0
- package/dist/override-gate.d.ts.map +1 -1
- package/dist/override-gate.js +5 -0
- package/dist/parallelism.d.ts +17 -0
- package/dist/parallelism.d.ts.map +1 -0
- package/dist/parallelism.js +33 -0
- package/dist/policy-packs.d.ts +69 -0
- package/dist/policy-packs.d.ts.map +1 -0
- package/dist/policy-packs.js +205 -0
- package/dist/policy-source.d.ts +51 -0
- package/dist/policy-source.d.ts.map +1 -0
- package/dist/policy-source.js +102 -0
- package/dist/pr-forge.d.ts +40 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +146 -37
- package/dist/pr-loop.d.ts +158 -11
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +302 -44
- package/dist/pr-merge.d.ts +64 -0
- package/dist/pr-merge.d.ts.map +1 -0
- package/dist/pr-merge.js +78 -0
- package/dist/pr-post.d.ts +86 -1
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +141 -5
- package/dist/pr-report-url.d.ts +32 -4
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +45 -5
- package/dist/pr-requires.d.ts +13 -2
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/pr-requires.js +14 -0
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/run-event.d.ts +26 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +3 -1
- package/dist/scheduled-op-cloud.d.ts +32 -0
- package/dist/scheduled-op-cloud.d.ts.map +1 -0
- package/dist/scheduled-op-cloud.js +69 -0
- package/dist/sorted-json.d.ts +10 -0
- package/dist/sorted-json.d.ts.map +1 -0
- package/dist/sorted-json.js +14 -0
- package/dist/terraform/credentials.d.ts +59 -0
- package/dist/terraform/credentials.d.ts.map +1 -0
- package/dist/terraform/credentials.js +149 -0
- package/dist/utils.d.ts +1 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -9
- package/dist/wave-runtime.d.ts +1 -1
- package/dist/wave-runtime.js +2 -2
- package/dist/wave-runtime.mjs +405 -287
- package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -1
- package/dist/workspace/chant-migrations/chud-lexicon-exit.js +4 -1
- package/dist/workspace/ci-lock-grain.d.ts +17 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -0
- package/dist/workspace/ci-lock-grain.js +21 -0
- package/dist/workspace/ci-run.d.ts +2 -1
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +10 -3
- package/dist/workspace/declaration.d.ts +16 -4
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +5 -2
- package/dist/workspace/declaration.schema.json +27 -3
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +8 -3
- package/dist/workspace/exit-cli.d.ts +1 -1
- package/dist/workspace/exit-cli.d.ts.map +1 -1
- package/dist/workspace/exit-cli.js +2 -1
- package/dist/workspace/import-fetch.d.ts +4 -2
- package/dist/workspace/import-fetch.d.ts.map +1 -1
- package/dist/workspace/import-fetch.js +4 -2
- package/dist/workspace/import-init.d.ts.map +1 -1
- package/dist/workspace/import-init.js +4 -2
- package/dist/workspace/ledger.schema.json +7 -3
- package/dist/workspace/lineage-upgrade-cli.d.ts +1 -1
- package/dist/workspace/lineage-upgrade-cli.d.ts.map +1 -1
- package/dist/workspace/lineage-upgrade-cli.js +2 -1
- package/dist/workspace/pr-report.schema.json +79 -3
- package/dist/workspace/promote.d.ts +1 -1
- package/dist/workspace/promote.d.ts.map +1 -1
- package/dist/workspace/promote.js +2 -1
- package/dist/workspace/records-cli.d.ts +2 -2
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-cli.js +3 -2
- package/dist/workspace/release-catalog.schema.json +277 -0
- package/dist/workspace/run-event.schema.json +18 -1
- package/dist/workspace/work-cli.d.ts +3 -1
- package/dist/workspace/work-cli.d.ts.map +1 -1
- package/dist/workspace/work-cli.js +7 -2
- package/dist/workspace/workspace-run.d.ts.map +1 -1
- package/dist/workspace/workspace-run.js +2 -1
- package/package.json +21 -1
- package/src/__fixtures__/estate-ledger.ts +101 -0
- package/src/__fixtures__/oidc-emulator.ts +31 -2
- package/src/__fixtures__/product-words.ts +44 -0
- package/src/__golden__/wave-loop/op-by-apply-after-fails.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-hold.json +20 -4
- package/src/__golden__/wave-loop/op-by-apply-ignored.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-pass.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-skip.json +10 -2
- package/src/__golden__/wave-loop/op-discover-rest-stops.json +22 -6
- package/src/__golden__/wave-loop/op-discover-rest.json +44 -12
- package/src/__golden__/wave-loop/op-discover-wide.json +12 -3
- package/src/__golden__/wave-loop/op-held-on.json +28 -7
- package/src/__golden__/wave-loop/op-hooks-apply-fails.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-fail-after-apply.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-fail-before-apply.json +4 -2
- package/src/__golden__/wave-loop/op-hooks-held.json +26 -8
- package/src/__golden__/wave-loop/op-hooks-hold-before-apply.json +18 -4
- package/src/__golden__/wave-loop/op-hooks-pass.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-share.json +20 -7
- package/src/__golden__/wave-loop/op-outcome-held.json +12 -3
- package/src/__golden__/wave-loop/op-outcome-replan-approved.json +16 -5
- package/src/__golden__/wave-loop/op-outcome-replan-forever.json +48 -21
- package/src/__golden__/wave-loop/op-outcome-replan.json +16 -5
- package/src/__golden__/wave-loop/op-outcome-stood-down.json +12 -3
- package/src/__golden__/wave-loop/op-outcome-unreadable.json +12 -3
- package/src/__golden__/wave-loop/op-overridden.json +28 -7
- package/src/__golden__/wave-loop/op-per-run.json +20 -4
- package/src/__golden__/wave-loop/op-point.json +18 -4
- package/src/__golden__/wave-loop/op-pr-review.json +10 -2
- package/src/__golden__/wave-loop/op-spend-change-only.json +10 -2
- package/src/__golden__/wave-loop/op-spend.json +10 -2
- package/src/__golden__/wave-loop/op-wave-commands.json +56 -13
- package/src/__golden__/wave-loop/op-wide.json +20 -4
- package/src/bucket-check/azure.ts +307 -0
- package/src/bucket-check/bucket-check.test.ts +210 -0
- package/src/bucket-check/fixtures/azure.json +153 -0
- package/src/bucket-check/fixtures/gcs.json +148 -0
- package/src/bucket-check/fixtures/s3.json +277 -0
- package/src/bucket-check/gcs.ts +257 -0
- package/src/bucket-check/index.ts +61 -0
- package/src/bucket-check/s3.ts +433 -0
- package/src/bucket-check/types.ts +75 -0
- package/src/bucket-check/wire.ts +50 -0
- package/src/bucket-check.ts +5 -0
- package/src/capabilities/templates.test.ts +2 -3
- package/src/capabilities/templates.ts +1 -2
- package/src/cdk/advise.test.ts +1 -1
- package/src/change-set-bundle.test.ts +0 -1
- package/src/change-set.ts +2 -3
- package/src/ci-agent.test.ts +348 -0
- package/src/ci-agent.ts +1025 -0
- package/src/ci-audit/__fixtures__/cloudtrail-lookup-bucket.json +37 -0
- package/src/ci-audit/__fixtures__/cloudtrail-writes-window.json +59 -0
- package/src/ci-audit/attribution.ts +260 -0
- package/src/ci-audit/audit-log.ts +220 -0
- package/src/ci-audit/ci-audit.test.ts +175 -0
- package/src/ci-audit/index.ts +15 -0
- package/src/ci-audit/unrecorded.ts +140 -0
- package/src/ci-audit.ts +2 -0
- package/src/ci-control.ts +173 -0
- package/src/ci-estate/delivery.ts +433 -0
- package/src/ci-estate/overdue.ts +81 -0
- package/src/ci-estate/page.ts +343 -0
- package/src/ci-estate/rows.ts +251 -0
- package/src/ci-estate.test.ts +281 -0
- package/src/ci-estate.ts +175 -0
- package/src/ci-handover.ts +67 -16
- package/src/ci-identity-database.test.ts +54 -0
- package/src/ci-identity-pulumi.test.ts +163 -0
- package/src/ci-identity-targets.test.ts +3 -1
- package/src/ci-identity.ts +123 -22
- package/src/ci-job-guard.test.ts +154 -0
- package/src/ci-job-guard.ts +319 -0
- package/src/ci-jobs.ts +8 -0
- package/src/ci-product-comment-targets.test.ts +45 -0
- package/src/ci-product-words.test.ts +101 -0
- package/src/ci-product-words.ts +565 -0
- package/src/ci-product.ts +226 -0
- package/src/ci-respond-run.ts +291 -0
- package/src/ci-respond.test.ts +264 -0
- package/src/ci-respond.ts +412 -0
- package/src/ci-shared-reads.test.ts +145 -0
- package/src/cli/commands/audit.test.ts +1 -1
- package/src/cli/commands/audit.ts +3 -2
- package/src/cli/commands/carve.test.ts +1 -1
- package/src/cli/commands/carve.ts +2 -2
- package/src/cli/commands/init.ts +3 -1
- package/src/cli/component-wave-args.test.ts +16 -0
- package/src/cli/handlers/agent.ts +126 -0
- package/src/cli/handlers/approve-confirm.test.ts +276 -0
- package/src/cli/handlers/approve-confirm.ts +200 -0
- package/src/cli/handlers/approve.ts +18 -1
- package/src/cli/handlers/audit-log.ts +74 -0
- package/src/cli/handlers/build-pr-loop-flags.test.ts +98 -0
- package/src/cli/handlers/build.test.ts +7 -0
- package/src/cli/handlers/build.ts +113 -1
- package/src/cli/handlers/ci-check-job.test.ts +114 -0
- package/src/cli/handlers/ci-check-job.ts +33 -0
- package/src/cli/handlers/ci-check.ts +63 -0
- package/src/cli/handlers/ci-forge-check.ts +91 -0
- package/src/cli/handlers/e2e-safe-run.ts +27 -0
- package/src/cli/handlers/fan-out.test.ts +10 -10
- package/src/cli/handlers/fan-out.ts +5 -0
- package/src/cli/handlers/gate-pending.ts +46 -0
- package/src/cli/handlers/init.ts +1 -0
- package/src/cli/handlers/ledger.ts +1 -1
- package/src/cli/handlers/lifecycle-drift.ts +7 -2
- package/src/cli/handlers/lock.test.ts +29 -2
- package/src/cli/handlers/lock.ts +66 -6
- package/src/cli/handlers/notify-relay.ts +130 -0
- package/src/cli/handlers/pr-before-merge.test.ts +2 -1
- package/src/cli/handlers/pr-deploy-inputs.test.ts +7 -7
- package/src/cli/handlers/pr-env.ts +48 -11
- package/src/cli/handlers/pr-plan-comment-targets.test.ts +166 -0
- package/src/cli/handlers/pr-plan-flags.test.ts +161 -0
- package/src/cli/handlers/pr-plan-targets.test.ts +155 -0
- package/src/cli/handlers/pr-waves-blocked.test.ts +5 -0
- package/src/cli/handlers/pr-waves.test.ts +8 -2
- package/src/cli/handlers/pr.test.ts +8 -8
- package/src/cli/handlers/pr.ts +879 -205
- package/src/cli/handlers/promote.test.ts +5 -5
- package/src/cli/handlers/promote.ts +22 -2
- package/src/cli/handlers/release.ts +2 -0
- package/src/cli/handlers/run-components-exit.test.ts +7 -7
- package/src/cli/handlers/run-wave.ts +144 -2
- package/src/cli/handlers/run.test.ts +6 -4
- package/src/cli/handlers/run.ts +86 -1
- package/src/cli/handlers/serve.ts +10 -1
- package/src/cli/main.test.ts +1 -1
- package/src/cli/main.ts +180 -13
- package/src/cli/mcp/ledger-tools.ts +126 -0
- package/src/cli/mcp/product-tools.test.ts +123 -0
- package/src/cli/mcp/product-tools.ts +129 -0
- package/src/cli/mcp/read-only.test.ts +134 -0
- package/src/cli/mcp/read-only.ts +68 -0
- package/src/cli/mcp/report-tools.ts +135 -0
- package/src/cli/mcp/server.test.ts +5 -4
- package/src/cli/mcp/server.ts +90 -16
- package/src/cli/mcp-config.ts +8 -3
- package/src/cli/parse-args.ts +119 -2
- package/src/cli/registry.ts +73 -0
- package/src/cloud-lister/sigv4.ts +80 -23
- package/src/components/adoption.test.ts +140 -0
- package/src/components/adoption.ts +140 -0
- package/src/components/apply-lease.ts +49 -0
- package/src/components/capability.ts +180 -6
- package/src/components/check-hooks.test.ts +66 -0
- package/src/components/check-hooks.ts +255 -0
- package/src/components/check-steps.test.ts +70 -0
- package/src/components/check-steps.ts +158 -0
- package/src/components/ci-services.test.ts +51 -0
- package/src/components/ci-services.ts +82 -0
- package/src/components/cli-support.ts +23 -2
- package/src/components/driver.test.ts +3 -3
- package/src/components/driver.ts +73 -6
- package/src/components/fan-out-run.ts +68 -18
- package/src/components/groups.ts +21 -4
- package/src/components/plan-flags.test.ts +46 -0
- package/src/components/pr-comment-preview-targets.test.ts +34 -0
- package/src/components/pr-comment-preview.test.ts +54 -0
- package/src/components/pr-env-ledger.test.ts +9 -0
- package/src/components/pr-env-ledger.ts +42 -0
- package/src/components/pr-env-ports.ts +29 -4
- package/src/components/pr-env-run-bundle.test.ts +2 -14
- package/src/components/pr-env-run.test.ts +19 -0
- package/src/components/pr-env-run.ts +12 -2
- package/src/components/pr-environment.test.ts +29 -0
- package/src/components/pr-environment.ts +40 -8
- package/src/components/pr-pipeline-runners.test.ts +80 -0
- package/src/components/pr-pipeline.test.ts +15 -0
- package/src/components/pr-pipeline.ts +498 -18
- package/src/components/pr-policy.ts +45 -7
- package/src/components/pr-run.test.ts +1 -1
- package/src/components/pr-run.ts +138 -11
- package/src/components/pr-stale-job.test.ts +34 -0
- package/src/components/pr-targets.test.ts +35 -0
- package/src/components/pr-targets.ts +45 -0
- package/src/components/product-pipeline.test.ts +200 -0
- package/src/components/product-pipeline.ts +383 -0
- package/src/components/promote.ts +10 -1
- package/src/components/release-compile.ts +87 -1
- package/src/components/release-promote.ts +65 -1
- package/src/components/repo-lock.ts +52 -0
- package/src/components/row-lease.test.ts +490 -0
- package/src/components/row-lease.ts +167 -0
- package/src/components/wave-plan-policy.test.ts +19 -0
- package/src/components/wave-plan.ts +96 -6
- package/src/control/__fixtures__/consumers/apps/consumers.json +15 -0
- package/src/control/__fixtures__/consumers/infra/consumers.json +23 -0
- package/src/control/applied.test.ts +148 -0
- package/src/control/applied.ts +191 -0
- package/src/control/consumers.test.ts +129 -0
- package/src/control/consumers.ts +192 -0
- package/src/control/control.test.ts +302 -0
- package/src/control/dispatch.ts +699 -0
- package/src/control/edges.test.ts +112 -0
- package/src/control/edges.ts +164 -0
- package/src/control/note-checkout.test.ts +91 -0
- package/src/control/reconcile.ts +250 -0
- package/src/control/records.ts +395 -0
- package/src/discovery/sandbox/bundle.ts +25 -1
- package/src/e2e-harness/__project__/chant.config.ts +4 -0
- package/src/e2e-harness/__project__/src/compose.ts +33 -0
- package/src/e2e-harness/bucket.ts +69 -0
- package/src/e2e-harness/claim.test.ts +150 -0
- package/src/e2e-harness/claim.ts +140 -0
- package/src/e2e-harness/driver.test.ts +304 -0
- package/src/e2e-harness/driver.ts +294 -0
- package/src/e2e-harness/forgejo.ts +267 -0
- package/src/e2e-harness/git.ts +96 -0
- package/src/e2e-harness/index.ts +50 -0
- package/src/e2e-harness/jobs.ts +35 -0
- package/src/e2e-harness/pins.ts +52 -0
- package/src/e2e-harness/ports.ts +130 -0
- package/src/e2e-harness/reports.ts +79 -0
- package/src/e2e-harness/safe-run-cli.test.ts +102 -0
- package/src/e2e-harness/safe-run-cli.ts +54 -0
- package/src/e2e-harness/safe-run.ts +198 -0
- package/src/e2e-harness/scenario.ts +89 -0
- package/src/e2e-harness/schemas/README.md +62 -0
- package/src/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/src/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/src/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/src/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/src/e2e-harness/schemas/index.ts +220 -0
- package/src/e2e-harness/schemas.test.ts +145 -0
- package/src/e2e-harness/stack.test.ts +124 -0
- package/src/e2e-harness/stack.ts +306 -0
- package/src/e2e-harness/steps.ts +30 -0
- package/src/e2e-harness.ts +2 -0
- package/src/engine-facts.test.ts +2 -3
- package/src/engine-facts.ts +1 -2
- package/src/exit-codes.test.ts +32 -0
- package/src/exit-codes.ts +61 -0
- package/src/forge-check/check.ts +155 -0
- package/src/forge-check/contract.ts +215 -0
- package/src/forge-check/forge-check.test.ts +427 -0
- package/src/forge-check/forge.ts +318 -0
- package/src/forge-check/index.ts +43 -0
- package/src/forge-check/pulumi.ts +192 -0
- package/src/forge-check/read-only.ts +56 -0
- package/src/forge-check/trust.ts +527 -0
- package/src/forge-check/types.ts +78 -0
- package/src/forge-check.ts +5 -0
- package/src/gate-decision-bundle.test.ts +11 -0
- package/src/gate-decision.ts +3 -0
- package/src/gate-policy.ts +92 -3
- package/src/gated-waves-bundle.test.ts +0 -1
- package/src/index.ts +2 -0
- package/src/lexicon.ts +143 -6
- package/src/lifecycle/adoption-file.ts +1 -2
- package/src/lifecycle/cloud-index.test.ts +2 -3
- package/src/lifecycle/cloud-index.ts +1 -2
- package/src/lifecycle/control-entries-ledger.test.ts +69 -0
- package/src/lifecycle/gate-applied.ts +6 -0
- package/src/lifecycle/gate-ledger.ts +35 -1
- package/src/lifecycle/gate-pending-by-plan.test.ts +69 -0
- package/src/lifecycle/gate-pending-by-plan.ts +133 -0
- package/src/lifecycle/gated-request-digest.ts +49 -0
- package/src/lifecycle/gated-request-ledger.test.ts +53 -0
- package/src/lifecycle/gated-request.ts +279 -0
- package/src/lifecycle/identity-match.ts +25 -6
- package/src/lifecycle/index-diff.ts +1 -2
- package/src/lifecycle/index-document.ts +1 -2
- package/src/lifecycle/index-import.test.ts +14 -0
- package/src/lifecycle/index-import.ts +54 -34
- package/src/lifecycle/ledger-read.ts +7 -3
- package/src/lifecycle/lock-rows.test.ts +109 -0
- package/src/lifecycle/lock-rows.ts +167 -0
- package/src/lifecycle/publish-target-context.test.ts +108 -0
- package/src/lifecycle/query.test.ts +2 -3
- package/src/lifecycle/query.ts +109 -8
- package/src/lifecycle/release-catalog-site.test.ts +142 -0
- package/src/lifecycle/release-catalog-site.ts +291 -0
- package/src/lifecycle/release-catalog.test.ts +192 -0
- package/src/lifecycle/release-catalog.ts +353 -0
- package/src/lifecycle/release-changelog.test.ts +70 -0
- package/src/lifecycle/release-changelog.ts +71 -0
- package/src/lifecycle/release-cut.ts +2 -2
- package/src/lifecycle/release-ledger.ts +19 -0
- package/src/lifecycle/release-publish.ts +45 -22
- package/src/lifecycle/release-read.ts +2 -0
- package/src/lifecycle/release-status.test.ts +185 -0
- package/src/lifecycle/release-status.ts +175 -0
- package/src/lifecycle/resource-lock.test.ts +175 -0
- package/src/lifecycle/resource-lock.ts +354 -0
- package/src/lifecycle/retention.ts +2 -0
- package/src/lifecycle/run-ledger.ts +7 -1
- package/src/lifecycle/snapshot-store-s3.ts +9 -45
- package/src/lifecycle/snapshot-store.ts +1 -2
- package/src/lifecycle/target-lock.ts +24 -9
- package/src/lifecycle/wave-plans.ts +33 -5
- package/src/mcp/types.ts +7 -0
- package/src/notify-product.ts +76 -0
- package/src/notify-relay.test.ts +213 -0
- package/src/notify-relay.ts +407 -0
- package/src/notify.ts +95 -14
- package/src/object-store/azure-blob.ts +374 -0
- package/src/object-store/common.ts +133 -0
- package/src/object-store/errors.ts +26 -0
- package/src/object-store/from-env.ts +36 -0
- package/src/object-store/gcs.ts +436 -0
- package/src/object-store/index.ts +8 -0
- package/src/object-store/object-store.test.ts +130 -0
- package/src/object-store/s3.ts +350 -0
- package/src/op/activities/converge.ts +2 -1
- package/src/op/activities/index.ts +1 -1
- package/src/op/activities/review-agent.open.test.ts +78 -0
- package/src/op/activities/review-agent.test.ts +13 -0
- package/src/op/activities/review-agent.ts +89 -5
- package/src/op/approval-status.test.ts +134 -0
- package/src/op/approval-status.ts +235 -0
- package/src/op/gate-review.test.ts +2 -1
- package/src/op/gate.ts +81 -22
- package/src/op/generate-pipeline.ts +7 -1
- package/src/op/index.ts +23 -0
- package/src/op/op-waves-after-plan.test.ts +288 -0
- package/src/op/op-waves-after-plan.ts +238 -0
- package/src/op/op-waves-capability-spec.ts +133 -0
- package/src/op/op-waves-capability.test.ts +217 -0
- package/src/op/op-waves-capability.ts +370 -0
- package/src/op/op-waves-events.ts +135 -0
- package/src/op/op-waves-notify-words.test.ts +149 -0
- package/src/op/op-waves-notify.ts +41 -16
- package/src/op/op-waves-parallelism.test.ts +89 -0
- package/src/op/op-waves-pull-request.test.ts +219 -0
- package/src/op/op-waves-release-port.ts +64 -0
- package/src/op/op-waves-release.test.ts +209 -0
- package/src/op/op-waves-release.ts +132 -0
- package/src/op/op-waves-run-record.test.ts +32 -0
- package/src/op/op-waves-run.ts +1235 -52
- package/src/op/op-waves-stand-down.test.ts +240 -0
- package/src/op/op-waves-stand-down.ts +107 -0
- package/src/op/op-waves-trace.test.ts +205 -0
- package/src/op/op-waves.test.ts +112 -0
- package/src/op/op-waves.ts +320 -22
- package/src/op/runtime.ts +107 -0
- package/src/op/stage-hooks-hold-record.test.ts +41 -0
- package/src/op/stage-hooks.ts +91 -12
- package/src/op/steward-beside.ts +2 -1
- package/src/op/types.ts +3 -2
- package/src/otlp-metrics.ts +96 -0
- package/src/otlp.test.ts +243 -0
- package/src/otlp.ts +543 -0
- package/src/override-gate-bundle.test.ts +2 -0
- package/src/override-gate.ts +4 -0
- package/src/parallelism.test.ts +38 -0
- package/src/parallelism.ts +33 -0
- package/src/policy-packs.ts +230 -0
- package/src/policy-source.test.ts +256 -0
- package/src/policy-source.ts +111 -0
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +175 -33
- package/src/pr-loop-bundle.test.ts +7 -3
- package/src/pr-loop-narrowed.test.ts +63 -0
- package/src/pr-loop-words.test.ts +155 -0
- package/src/pr-loop.ts +398 -52
- package/src/pr-merge.test.ts +100 -0
- package/src/pr-merge.ts +105 -0
- package/src/pr-post-stale.test.ts +163 -0
- package/src/pr-post.ts +190 -5
- package/src/pr-report-url.ts +61 -6
- package/src/pr-requires.test.ts +37 -1
- package/src/pr-requires.ts +16 -2
- package/src/product-subpaths-plain-node.e2e.test.ts +212 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +28 -1
- package/src/scheduled-op-cloud.ts +68 -0
- package/src/sorted-json.ts +17 -0
- package/src/stage-hooks-bundle.test.ts +6 -0
- package/src/terraform/credentials.test.ts +77 -0
- package/src/terraform/credentials.ts +162 -0
- package/src/utils.ts +2 -11
- package/src/wave-loop-golden.test.ts +2 -1
- package/src/wave-runtime.ts +2 -2
- package/src/workspace/chant-migrations/chud-lexicon-exit.ts +4 -1
- package/src/workspace/ci-lock-grain.test.ts +31 -0
- package/src/workspace/ci-lock-grain.ts +29 -0
- package/src/workspace/ci-report-url.test.ts +1 -1
- package/src/workspace/ci-run.test.ts +1 -1
- package/src/workspace/ci-run.ts +10 -3
- package/src/workspace/declaration.schema.json +27 -3
- package/src/workspace/declaration.test.ts +1 -1
- package/src/workspace/declaration.ts +26 -10
- package/src/workspace/drift-cli.ts +8 -3
- package/src/workspace/exit-cli.ts +2 -1
- package/src/workspace/import-fetch.ts +4 -2
- package/src/workspace/import-init.ts +4 -2
- package/src/workspace/ledger.schema.json +7 -3
- package/src/workspace/lineage-upgrade-cli.ts +2 -1
- package/src/workspace/pr-report.schema.json +79 -3
- package/src/workspace/promote.ts +2 -1
- package/src/workspace/records-cli.ts +3 -2
- package/src/workspace/release-catalog.schema.json +277 -0
- package/src/workspace/run-event.schema.json +18 -1
- package/src/workspace/work-cli.ts +8 -2
- package/src/workspace/workspace-run.ts +2 -1
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
* build, as a chart named from a repository, is not recorded, and the
|
|
25
25
|
* promote leaves it as written.
|
|
26
26
|
*
|
|
27
|
+
* Since #4542 a step whose capability answers `releaseInputs` has its files
|
|
28
|
+
* recorded the same way: `terraform-apply` names a root by key, and the
|
|
29
|
+
* terraform lexicon answers the root's directory, its local modules and its
|
|
30
|
+
* var files ({@link stepReleaseInputs}). Each directory is named in `trees`.
|
|
31
|
+
* A step whose files can't be deployed from a copy is printed and left out.
|
|
32
|
+
*
|
|
27
33
|
* A project with no components (#4046) is compiled the way `chant build --env
|
|
28
34
|
* <env> -o <output>` builds it ({@link compileBuildOutput}): every file that
|
|
29
35
|
* build writes is a template with `component: null`, and the target's params
|
|
@@ -106,6 +112,46 @@ export function recordedInputRefs(component) {
|
|
|
106
112
|
}
|
|
107
113
|
return out;
|
|
108
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* The steps of `component` whose capability answers `releaseInputs` (#4542),
|
|
117
|
+
* build and publish steps left out. Paths are normalised to `/`-separated
|
|
118
|
+
* and relative to `memberDir`; one that leaves it makes the step unbound,
|
|
119
|
+
* since its copy could not sit under the member's directory. A throw is an
|
|
120
|
+
* unbound answer naming the error.
|
|
121
|
+
*/
|
|
122
|
+
export async function stepReleaseInputs(component, registry, memberDir) {
|
|
123
|
+
const out = [];
|
|
124
|
+
for (const { phase, step } of stepsOf(component.deploy)) {
|
|
125
|
+
if (BUILD_STEP_KINDS.includes(step.kind) || PUBLISH_STEP_KINDS.includes(step.kind) || !registry.has(step.kind))
|
|
126
|
+
continue;
|
|
127
|
+
const capability = registry.resolve(step.kind);
|
|
128
|
+
if (!capability.releaseInputs)
|
|
129
|
+
continue;
|
|
130
|
+
const { kind: _kind, ...input } = step;
|
|
131
|
+
let answer;
|
|
132
|
+
try {
|
|
133
|
+
answer = await capability.releaseInputs(input, { memberDir });
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
answer = { unbound: err instanceof Error ? err.message : String(err) };
|
|
137
|
+
}
|
|
138
|
+
if (answer === null)
|
|
139
|
+
continue;
|
|
140
|
+
if ("unbound" in answer) {
|
|
141
|
+
out.push({ phase, step, answer });
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
const norm = (p) => relative(memberDir, resolve(memberDir, p)).split("\\").join("/") || ".";
|
|
145
|
+
const paths = [...new Set(answer.paths.map(norm))].sort();
|
|
146
|
+
const outside = paths.find((p) => p === ".." || p.startsWith("../") || isAbsolute(p));
|
|
147
|
+
if (outside !== undefined) {
|
|
148
|
+
out.push({ phase, step, answer: { unbound: `it reads "${outside}", outside the member's directory, so a recorded copy can't keep its place` } });
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
out.push({ phase, step, answer: { field: answer.field, dir: norm(answer.dir), paths } });
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
109
155
|
/** The fields of a step of `kind` whose paths a cut records and a promote points at the recorded copy. */
|
|
110
156
|
export function recordedFields(kind) {
|
|
111
157
|
return [...TEMPLATE_FIELDS, ...(DEPLOY_INPUT_FIELDS[kind] ?? [])];
|
|
@@ -252,6 +298,45 @@ export async function compileEnvironment(inputs, env) {
|
|
|
252
298
|
trees.push({ component: ref.component, path: dir });
|
|
253
299
|
}
|
|
254
300
|
}
|
|
301
|
+
// #4542: the files a capability names for a step that names them indirectly, as a terraform root by key.
|
|
302
|
+
let registry;
|
|
303
|
+
for (const { component } of components) {
|
|
304
|
+
const candidates = stepsOf(component.deploy).some(({ step }) => !BUILD_STEP_KINDS.includes(step.kind) && !PUBLISH_STEP_KINDS.includes(step.kind));
|
|
305
|
+
if (!candidates)
|
|
306
|
+
continue;
|
|
307
|
+
if (registry === undefined) {
|
|
308
|
+
registry = await fanOutRegistry(inputs.projectDir, config).catch((err) => {
|
|
309
|
+
console.error(`release compile: the capability plugins did not load, so no step's own files are recorded: ${err instanceof Error ? err.message : String(err)}`);
|
|
310
|
+
return null;
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
if (registry === null)
|
|
314
|
+
break;
|
|
315
|
+
for (const { phase, step, answer } of await stepReleaseInputs(component, registry, inputs.projectDir)) {
|
|
316
|
+
if ("unbound" in answer) {
|
|
317
|
+
console.error(`release compile: component "${component.name}": its ${step.kind} step in phase "${phase}" is not recorded for "${env}": ${answer.unbound}`);
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
for (const path of answer.paths) {
|
|
321
|
+
const key = `${component.name}\u0000${path}`;
|
|
322
|
+
if (seen.has(key))
|
|
323
|
+
continue;
|
|
324
|
+
seen.add(key);
|
|
325
|
+
const file = resolve(inputs.projectDir, path);
|
|
326
|
+
if (!existsSync(file))
|
|
327
|
+
continue;
|
|
328
|
+
if (statSync(file).isFile()) {
|
|
329
|
+
templates.push(templateOf(component.name, path, file));
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
for (const f of directoryFiles(inputs.projectDir, path)) {
|
|
333
|
+
const under = relative(resolve(inputs.projectDir, path), resolve(inputs.projectDir, f)).split("\\").join("/");
|
|
334
|
+
templates.push(templateOf(component.name, path === "." ? under : `${path}/${under}`, resolve(inputs.projectDir, f)));
|
|
335
|
+
}
|
|
336
|
+
trees.push({ component: component.name, path });
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
255
340
|
return {
|
|
256
341
|
env,
|
|
257
342
|
params,
|
|
@@ -21,8 +21,19 @@
|
|
|
21
21
|
* chart named from a repository, is left as written. A target cut before
|
|
22
22
|
* #4155 is pinned as it was then: template fields only, other paths read from
|
|
23
23
|
* the checkout.
|
|
24
|
+
*
|
|
25
|
+
* A step whose capability answers `releaseInputs` (#4542), as `terraform-apply`
|
|
26
|
+
* does for its root, is pointed at the component's recorded files as one
|
|
27
|
+
* layout: every file the target records for the component is written under
|
|
28
|
+
* `.chant/release-templates/<digest>/` at its path from the member's
|
|
29
|
+
* directory, so a root's `../modules/x` still resolves, and the step's field
|
|
30
|
+
* names the copy of the directory it runs in. The step then plans the
|
|
31
|
+
* release's files against the environment, and the release gate binds that
|
|
32
|
+
* plan. A step whose directory the release does not record is left as
|
|
33
|
+
* written.
|
|
24
34
|
*/
|
|
25
35
|
import type { DriverComponent } from "./driver.js";
|
|
36
|
+
import type { CapabilityRegistry } from "./capability.js";
|
|
26
37
|
import { type Release, type ReleaseTarget } from "../lifecycle/release-store.js";
|
|
27
38
|
import type { ReleaseRecord } from "../lifecycle/release-ledger.js";
|
|
28
39
|
import type { BuildArchiveManifest } from "./verbs/build-archive.js";
|
|
@@ -61,7 +72,10 @@ export declare function isImplicitRelease(release: Release): boolean;
|
|
|
61
72
|
* the promote is refused: a template the target does not record, one whose
|
|
62
73
|
* bytes are missing, or one whose bytes do not hash to the target's digest.
|
|
63
74
|
*/
|
|
64
|
-
export declare function pinReleaseTemplates(components: readonly DriverComponent[], release: Release, target: ReleaseTarget, readTemplate: TemplateReader
|
|
75
|
+
export declare function pinReleaseTemplates(components: readonly DriverComponent[], release: Release, target: ReleaseTarget, readTemplate: TemplateReader, layout?: {
|
|
76
|
+
registry: CapabilityRegistry;
|
|
77
|
+
memberDir: string;
|
|
78
|
+
}): Promise<{
|
|
65
79
|
components: DriverComponent[];
|
|
66
80
|
files: PinnedTemplate[];
|
|
67
81
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-promote.d.ts","sourceRoot":"","sources":["../../src/components/release-promote.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"release-promote.d.ts","sourceRoot":"","sources":["../../src/components/release-promote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAuC,MAAM,UAAU,CAAC;AAErF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAuB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEnG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGlE,yGAAyG;AACzG,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAEhE,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,iGAAiG;AACjG,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAE7F,kFAAkF;AAClF,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAMtG;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI9F;AAED,sIAAsI;AACtI,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG3D;AAUD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,cAAc,EAC5B,MAAM,CAAC,EAAE;IAAE,QAAQ,EAAE,kBAAkB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC3D,OAAO,CAAC;IAAE,UAAU,EAAE,eAAe,EAAE,CAAC;IAAC,KAAK,EAAE,cAAc,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CA+E5F;AA6ED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,cAAc,GAC3B,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CA2B7D;AAED,sEAAsE;AACtE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,IAAI,CAMxF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,IAAI,CAUzF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC,EACpE,YAAY,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,GAC7E,OAAO,CAAC,MAAM,EAAE,CAAC,CAmBnB"}
|
|
@@ -21,10 +21,20 @@
|
|
|
21
21
|
* chart named from a repository, is left as written. A target cut before
|
|
22
22
|
* #4155 is pinned as it was then: template fields only, other paths read from
|
|
23
23
|
* the checkout.
|
|
24
|
+
*
|
|
25
|
+
* A step whose capability answers `releaseInputs` (#4542), as `terraform-apply`
|
|
26
|
+
* does for its root, is pointed at the component's recorded files as one
|
|
27
|
+
* layout: every file the target records for the component is written under
|
|
28
|
+
* `.chant/release-templates/<digest>/` at its path from the member's
|
|
29
|
+
* directory, so a root's `../modules/x` still resolves, and the step's field
|
|
30
|
+
* names the copy of the directory it runs in. The step then plans the
|
|
31
|
+
* release's files against the environment, and the release gate binds that
|
|
32
|
+
* plan. A step whose directory the release does not record is left as
|
|
33
|
+
* written.
|
|
24
34
|
*/
|
|
25
35
|
import { mkdirSync, readdirSync, rmSync, rmdirSync, writeFileSync } from "node:fs";
|
|
26
36
|
import { basename, dirname, join } from "node:path";
|
|
27
|
-
import { recordedFields, recordedInputRefs, TEMPLATE_FIELDS, templateRefs } from "./release-compile.js";
|
|
37
|
+
import { recordedFields, recordedInputRefs, stepReleaseInputs, TEMPLATE_FIELDS, templateRefs } from "./release-compile.js";
|
|
28
38
|
import { templateBytesDigest } from "../lifecycle/release-store.js";
|
|
29
39
|
import { computePlanDigest } from "../lifecycle/plan-digest.js";
|
|
30
40
|
import { contentDigest } from "../content-digest.js";
|
|
@@ -70,7 +80,7 @@ function isPhase(step) {
|
|
|
70
80
|
* the promote is refused: a template the target does not record, one whose
|
|
71
81
|
* bytes are missing, or one whose bytes do not hash to the target's digest.
|
|
72
82
|
*/
|
|
73
|
-
export async function pinReleaseTemplates(components, release, target, readTemplate) {
|
|
83
|
+
export async function pinReleaseTemplates(components, release, target, readTemplate, layout) {
|
|
74
84
|
const errors = [];
|
|
75
85
|
const files = [];
|
|
76
86
|
const out = [];
|
|
@@ -78,6 +88,30 @@ export async function pinReleaseTemplates(components, release, target, readTempl
|
|
|
78
88
|
const full = target.trees !== undefined;
|
|
79
89
|
for (const component of components) {
|
|
80
90
|
const replace = new Map();
|
|
91
|
+
// #4542: steps whose capability names their files, pointed at the component's recorded layout.
|
|
92
|
+
const stepPins = new Map();
|
|
93
|
+
if (full && layout) {
|
|
94
|
+
let base;
|
|
95
|
+
for (const { step, answer } of await stepReleaseInputs(component, layout.registry, layout.memberDir)) {
|
|
96
|
+
if ("unbound" in answer)
|
|
97
|
+
continue;
|
|
98
|
+
if (!target.trees.some((t) => t.component === component.name && t.path === answer.dir))
|
|
99
|
+
continue;
|
|
100
|
+
if (base === undefined) {
|
|
101
|
+
const pinned = await pinLayout(component.name, target, readTemplate);
|
|
102
|
+
if ("errors" in pinned) {
|
|
103
|
+
errors.push(...pinned.errors);
|
|
104
|
+
base = null;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
files.push(...pinned.files);
|
|
108
|
+
base = pinned.base;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (base !== null)
|
|
112
|
+
stepPins.set(step, { field: answer.field, value: answer.dir === "." ? base : join(base, answer.dir) });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
81
115
|
const refs = full ? recordedInputRefs(component) : templateRefs(component).map((r) => ({ ...r, required: true }));
|
|
82
116
|
for (const ref of refs) {
|
|
83
117
|
if (replace.has(ref.value))
|
|
@@ -119,6 +153,9 @@ export async function pinReleaseTemplates(components, release, target, readTempl
|
|
|
119
153
|
if (isGate(step))
|
|
120
154
|
return step;
|
|
121
155
|
const next = { ...step };
|
|
156
|
+
const pin = stepPins.get(step);
|
|
157
|
+
if (pin)
|
|
158
|
+
next[pin.field] = pin.value;
|
|
122
159
|
for (const field of full ? recordedFields(step.kind) : TEMPLATE_FIELDS) {
|
|
123
160
|
const v = next[field];
|
|
124
161
|
if (typeof v === "string" && replace.has(v))
|
|
@@ -169,6 +206,34 @@ async function pinTree(component, dir, target, readTemplate) {
|
|
|
169
206
|
const path = join(RELEASE_TEMPLATES_DIR, digest.replace(/:/g, "_"), basename(dir));
|
|
170
207
|
return { path, files: read.map((r) => ({ path: join(path, r.rel), content: r.content, ...(r.encoding ? { encoding: r.encoding } : {}) })) };
|
|
171
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Every file the target records for `component`, under
|
|
211
|
+
* `.chant/release-templates/<digest>/` at its path from the member's
|
|
212
|
+
* directory (#4542). The digest is a plan digest over the paths and their
|
|
213
|
+
* digests, so the base names the layout and a gate approval bound to a plan
|
|
214
|
+
* of it still matches on a re-run.
|
|
215
|
+
*/
|
|
216
|
+
async function pinLayout(component, target, readTemplate) {
|
|
217
|
+
const errors = [];
|
|
218
|
+
const read = [];
|
|
219
|
+
for (const e of target.templates.filter((t) => t.component === component)) {
|
|
220
|
+
if (e.path.startsWith("/") || e.path.split("/").includes("..")) {
|
|
221
|
+
errors.push(`component "${component}": "${e.path}" is not a path inside the member's directory; refusing to write it`);
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
const got = await readChecked(component, e.path, e, target, readTemplate);
|
|
225
|
+
if ("error" in got)
|
|
226
|
+
errors.push(got.error);
|
|
227
|
+
else
|
|
228
|
+
read.push({ path: e.path, content: got.content, digest: e.digest, ...(e.encoding ? { encoding: e.encoding } : {}) });
|
|
229
|
+
}
|
|
230
|
+
if (errors.length > 0)
|
|
231
|
+
return { errors };
|
|
232
|
+
read.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
|
|
233
|
+
const digest = computePlanDigest("release-layout", read.map(({ path, digest }) => ({ path, digest })));
|
|
234
|
+
const base = join(RELEASE_TEMPLATES_DIR, digest.replace(/:/g, "_"));
|
|
235
|
+
return { base, files: read.map((r) => ({ path: join(base, r.path), content: r.content, ...(r.encoding ? { encoding: r.encoding } : {}) })) };
|
|
236
|
+
}
|
|
172
237
|
/**
|
|
173
238
|
* The files a release's target records, read back by digest and checked, for
|
|
174
239
|
* `chant release export` (#4046). A project with no components has no deploy
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `repo` lock grain in a generated pipeline (#4552): one apply at a time
|
|
3
|
+
* in the repository. GitHub runs the apply jobs in one concurrency group,
|
|
4
|
+
* GitLab in one resource group, and Forgejo, whose runner does not queue on
|
|
5
|
+
* a concurrency group, through a lock tag on the remote,
|
|
6
|
+
* `refs/tags/chant-apply-lock`, the way terragucci's Forgejo pipelines do
|
|
7
|
+
* (`forgejoLock` in terragucci's `render.ts` at 18f6431).
|
|
8
|
+
*
|
|
9
|
+
* The tag points at an empty commit whose subject is the holder's lease,
|
|
10
|
+
* `run <id> <epoch>`. A runner that kills a job never runs its exit trap, so
|
|
11
|
+
* a waiter takes the lock over, with a lease push, when `chant lock --alive`
|
|
12
|
+
* says the holder's run is gone or its lease is older than
|
|
13
|
+
* `CHANT_LOCK_STALE` seconds (default 7200; `TG_LOCK_STALE` is read as an
|
|
14
|
+
* alias). The step's exit trap lets go of the tag.
|
|
15
|
+
*/
|
|
16
|
+
/** The concurrency or resource group every apply job of a pipeline on the repo grain shares. */
|
|
17
|
+
export declare const REPO_APPLY_GROUP = "chant-apply-repo";
|
|
18
|
+
/** The tag Forgejo applies on the repo grain hold. */
|
|
19
|
+
export declare const REPO_LOCK_REF = "refs/tags/chant-apply-lock";
|
|
20
|
+
/**
|
|
21
|
+
* The shell lines that take the repo lock tag before an apply on Forgejo,
|
|
22
|
+
* and let go of it when the step's shell exits. They run in the apply
|
|
23
|
+
* command's own step, before it, so the trap fires when the apply ends.
|
|
24
|
+
* Waits up to an hour, polling every `CHANT_LOCK_POLL` seconds (default 10).
|
|
25
|
+
*/
|
|
26
|
+
export declare function forgejoRepoLockLines(): string[];
|
|
27
|
+
//# sourceMappingURL=repo-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-lock.d.ts","sourceRoot":"","sources":["../../src/components/repo-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,sDAAsD;AACtD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAuB/C"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `repo` lock grain in a generated pipeline (#4552): one apply at a time
|
|
3
|
+
* in the repository. GitHub runs the apply jobs in one concurrency group,
|
|
4
|
+
* GitLab in one resource group, and Forgejo, whose runner does not queue on
|
|
5
|
+
* a concurrency group, through a lock tag on the remote,
|
|
6
|
+
* `refs/tags/chant-apply-lock`, the way terragucci's Forgejo pipelines do
|
|
7
|
+
* (`forgejoLock` in terragucci's `render.ts` at 18f6431).
|
|
8
|
+
*
|
|
9
|
+
* The tag points at an empty commit whose subject is the holder's lease,
|
|
10
|
+
* `run <id> <epoch>`. A runner that kills a job never runs its exit trap, so
|
|
11
|
+
* a waiter takes the lock over, with a lease push, when `chant lock --alive`
|
|
12
|
+
* says the holder's run is gone or its lease is older than
|
|
13
|
+
* `CHANT_LOCK_STALE` seconds (default 7200; `TG_LOCK_STALE` is read as an
|
|
14
|
+
* alias). The step's exit trap lets go of the tag.
|
|
15
|
+
*/
|
|
16
|
+
/** The concurrency or resource group every apply job of a pipeline on the repo grain shares. */
|
|
17
|
+
export const REPO_APPLY_GROUP = "chant-apply-repo";
|
|
18
|
+
/** The tag Forgejo applies on the repo grain hold. */
|
|
19
|
+
export const REPO_LOCK_REF = "refs/tags/chant-apply-lock";
|
|
20
|
+
/**
|
|
21
|
+
* The shell lines that take the repo lock tag before an apply on Forgejo,
|
|
22
|
+
* and let go of it when the step's shell exits. They run in the apply
|
|
23
|
+
* command's own step, before it, so the trap fires when the apply ends.
|
|
24
|
+
* Waits up to an hour, polling every `CHANT_LOCK_POLL` seconds (default 10).
|
|
25
|
+
*/
|
|
26
|
+
export function forgejoRepoLockLines() {
|
|
27
|
+
const id = "${GITHUB_RUN_ID:-$$}";
|
|
28
|
+
return [
|
|
29
|
+
`lock_ref="${REPO_LOCK_REF}"`,
|
|
30
|
+
'empty="$(git mktree </dev/null)"',
|
|
31
|
+
`mine="$(GIT_AUTHOR_NAME=chant GIT_AUTHOR_EMAIL=chant@localhost GIT_COMMITTER_NAME=chant GIT_COMMITTER_EMAIL=chant@localhost git commit-tree "$empty" -m "run ${id} $(date +%s)")"`,
|
|
32
|
+
'stale="${CHANT_LOCK_STALE:-${TG_LOCK_STALE:-7200}}"',
|
|
33
|
+
"tries=0",
|
|
34
|
+
'until git push -q origin "$mine:$lock_ref" 2>/dev/null; do',
|
|
35
|
+
' held="$(git ls-remote origin "$lock_ref" | cut -f1)"',
|
|
36
|
+
' if [ -n "$held" ] && git fetch -q origin "+$lock_ref:$lock_ref" 2>/dev/null; then',
|
|
37
|
+
' lease="$(git log -1 --format=%s "$lock_ref")"',
|
|
38
|
+
' holder="$(echo "$lease" | cut -d" " -f2)"; since="$(echo "$lease" | cut -d" " -f3)"',
|
|
39
|
+
' if [ "$(chant lock --alive "$holder" 2>/dev/null)" = dead ] || [ $(( $(date +%s) - ${since:-0} )) -ge "$stale" ]; then',
|
|
40
|
+
' echo "the apply lock was held by run $holder, which is gone; taking it over"',
|
|
41
|
+
' git push -q --force-with-lease="$lock_ref:$held" origin "+$mine:$lock_ref" 2>/dev/null && break',
|
|
42
|
+
" fi",
|
|
43
|
+
" fi",
|
|
44
|
+
' if [ "$tries" -ge 360 ]; then echo "another apply has held $lock_ref for an hour" >&2; exit 1; fi',
|
|
45
|
+
' sleep "${CHANT_LOCK_POLL:-10}"; tries=$((tries + 1))',
|
|
46
|
+
"done",
|
|
47
|
+
"trap 'git push -q --force-with-lease=\"$lock_ref:$mine\" origin \":$lock_ref\" || true' EXIT",
|
|
48
|
+
];
|
|
49
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The row lease on the apply paths that plan inside their own steps (#4594):
|
|
3
|
+
* `chant run --components`, `chant components fan-out`, a promote, a
|
|
4
|
+
* rollback and a redeploy. `chant components pr-apply` and op waves lease the
|
|
5
|
+
* rows their plan already knows (#4552); these paths plan only as each step
|
|
6
|
+
* runs, so the lease is taken there, one step or one group at a time.
|
|
7
|
+
*
|
|
8
|
+
* - A step on the resource grain (`lockGrainBeforePlan`: the step's own
|
|
9
|
+
* `lockGrain`, else `ci.lockGrain`, else its lexicon's default) plans
|
|
10
|
+
* first, asks its lexicon for the rows of that plan, leases them, and then
|
|
11
|
+
* applies the plan it leased for, handed back as `DeployContext.plans`. A
|
|
12
|
+
* step on any other grain applies as before and takes no lease.
|
|
13
|
+
* - A group (ws-107) leases the rows of every member's plan in one take
|
|
14
|
+
* before `runGroup` is called, and lets go once it returns.
|
|
15
|
+
* - A held row fails the step, or every member of the group, with a record
|
|
16
|
+
* marked `held`, so the command exits 5 (`CHANT_EXIT.held`) and nothing of
|
|
17
|
+
* that step applied.
|
|
18
|
+
*
|
|
19
|
+
* The port ({@link ledgerRowLease}) writes `_locks/rows/<gate>.json` through
|
|
20
|
+
* ../lifecycle/resource-lock.ts with one holder for the whole run, and
|
|
21
|
+
* counts each row within the process, so two components of one run that
|
|
22
|
+
* change one object let go of its row only once both have ended.
|
|
23
|
+
*/
|
|
24
|
+
import type { LockGrain, LockRow } from "../lifecycle/lock-rows.js";
|
|
25
|
+
import type { LockLiveness, LockRowHolder } from "../lifecycle/resource-lock.js";
|
|
26
|
+
import type { Capability, CapabilityPlan, DeployContext } from "./capability.js";
|
|
27
|
+
/** Rows a step or a group holds while it applies. */
|
|
28
|
+
export interface RowLease {
|
|
29
|
+
/** Let go of the rows. Never throws; false when the rows file could not be written, and the rows stay until a later apply takes them over. */
|
|
30
|
+
release(): Promise<boolean>;
|
|
31
|
+
}
|
|
32
|
+
/** How a run takes its row leases (#4594). */
|
|
33
|
+
export interface RowLeasePort {
|
|
34
|
+
/**
|
|
35
|
+
* Lease `rows` for `label` (a component, or a group's components), all or
|
|
36
|
+
* nothing. Throws {@link LockRowsHeldError} when another live run holds
|
|
37
|
+
* one, and any other error when the rows file cannot be read or written.
|
|
38
|
+
*/
|
|
39
|
+
take(rows: readonly LockRow[], label: string): Promise<RowLease>;
|
|
40
|
+
}
|
|
41
|
+
/** Another live run holds a row this apply changes (#4594), so nothing of it applied. Exit 5. */
|
|
42
|
+
export declare class LockRowsHeldError extends Error {
|
|
43
|
+
readonly lockRowsHeld = true;
|
|
44
|
+
constructor(message: string);
|
|
45
|
+
}
|
|
46
|
+
/** Whether `err` is a held row ({@link LockRowsHeldError}), by its mark, so a copy from another bundle counts too. */
|
|
47
|
+
export declare function isLockRowsHeldError(err: unknown): err is LockRowsHeldError;
|
|
48
|
+
export interface LedgerRowLeaseOptions {
|
|
49
|
+
cwd?: string;
|
|
50
|
+
/** Whether a run holding rows still runs. Default: the forge's answer, with the lease's age. */
|
|
51
|
+
alive?: LockLiveness;
|
|
52
|
+
/** Who the rows name. Default: this CI run, else this host and process. */
|
|
53
|
+
holder?: LockRowHolder;
|
|
54
|
+
/** Where the lease's info lines go. Default stderr. */
|
|
55
|
+
log?: (line: string) => void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The port over `gate`'s rows file on `chant/lifecycle` (#4594), one holder
|
|
59
|
+
* for every take of the run. A row this process already holds for another
|
|
60
|
+
* step is counted, not taken again, and is let go of when its last holder in
|
|
61
|
+
* the process ends.
|
|
62
|
+
*/
|
|
63
|
+
export declare function ledgerRowLease(gate: string, opts?: LedgerRowLeaseOptions): RowLeasePort;
|
|
64
|
+
/**
|
|
65
|
+
* Lease one capability step's rows (#4594) when `ctx.rowLease` is set, the
|
|
66
|
+
* step was handed no plan and its grain is `resource`: plan, read the rows
|
|
67
|
+
* of that plan, lease them, and return the context that applies the leased
|
|
68
|
+
* plan. Otherwise the context as given and no lease. A grain the lexicon
|
|
69
|
+
* refuses throws, as it does at plan in a pull request.
|
|
70
|
+
*/
|
|
71
|
+
export declare function leaseCapabilityStep(capability: Capability<never, unknown>, ctx: DeployContext, input: unknown): Promise<{
|
|
72
|
+
ctx: DeployContext;
|
|
73
|
+
lease: RowLease;
|
|
74
|
+
}>;
|
|
75
|
+
/**
|
|
76
|
+
* The rows of a group's approved plans (#4594), each member's from its
|
|
77
|
+
* lexicon on its grain: what one take holds for the whole group.
|
|
78
|
+
*/
|
|
79
|
+
export declare function groupLockRows(capability: Capability<never, unknown>, members: ReadonlyArray<{
|
|
80
|
+
component: string;
|
|
81
|
+
input?: unknown;
|
|
82
|
+
ctx: DeployContext;
|
|
83
|
+
}>, plans: Readonly<Record<string, CapabilityPlan>>, declared: LockGrain | undefined): Promise<LockRow[]>;
|
|
84
|
+
//# sourceMappingURL=row-lease.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-lease.d.ts","sourceRoot":"","sources":["../../src/components/row-lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE9E,qDAAqD;AACrD,MAAM,WAAW,QAAQ;IACvB,8IAA8I;IAC9I,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED,8CAA8C;AAC9C,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CAClE;AAED,iGAAiG;AACjG,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,YAAY,QAAQ;IAC7B,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,sHAAsH;AACtH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,iBAAiB,CAE1E;AAID,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,uDAAuD;IACvD,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,qBAA0B,GAAG,YAAY,CA+C3F;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,EACtC,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC;IAAE,GAAG,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAC,CAUlD;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,EACtC,OAAO,EAAE,aAAa,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,aAAa,CAAA;CAAE,CAAC,EAClF,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,EAC/C,QAAQ,EAAE,SAAS,GAAG,SAAS,GAC9B,OAAO,CAAC,OAAO,EAAE,CAAC,CASpB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { lockGrainBeforePlan, resolvePlannedLock, sortedLockRows } from "../lifecycle/lock-rows.js";
|
|
2
|
+
/** Another live run holds a row this apply changes (#4594), so nothing of it applied. Exit 5. */
|
|
3
|
+
export class LockRowsHeldError extends Error {
|
|
4
|
+
constructor(message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.lockRowsHeld = true;
|
|
7
|
+
this.name = "LockRowsHeldError";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** Whether `err` is a held row ({@link LockRowsHeldError}), by its mark, so a copy from another bundle counts too. */
|
|
11
|
+
export function isLockRowsHeldError(err) {
|
|
12
|
+
return typeof err === "object" && err !== null && err.lockRowsHeld === true;
|
|
13
|
+
}
|
|
14
|
+
const NO_LEASE = { release: () => Promise.resolve(true) };
|
|
15
|
+
/**
|
|
16
|
+
* The port over `gate`'s rows file on `chant/lifecycle` (#4594), one holder
|
|
17
|
+
* for every take of the run. A row this process already holds for another
|
|
18
|
+
* step is counted, not taken again, and is let go of when its last holder in
|
|
19
|
+
* the process ends.
|
|
20
|
+
*/
|
|
21
|
+
export function ledgerRowLease(gate, opts = {}) {
|
|
22
|
+
const counts = new Map();
|
|
23
|
+
const log = opts.log ?? ((line) => console.error(line));
|
|
24
|
+
let holder = opts.holder;
|
|
25
|
+
const lock = () => import("../lifecycle/resource-lock.js");
|
|
26
|
+
return {
|
|
27
|
+
async take(rows, label) {
|
|
28
|
+
const wanted = sortedLockRows(rows);
|
|
29
|
+
if (wanted.length === 0)
|
|
30
|
+
return NO_LEASE;
|
|
31
|
+
const { leaseLockRows, lockRowHolder, releaseLockRows } = await lock();
|
|
32
|
+
holder ?? (holder = lockRowHolder(process.env));
|
|
33
|
+
const fresh = wanted.filter((r) => (counts.get(r.key) ?? 0) === 0);
|
|
34
|
+
if (fresh.length > 0) {
|
|
35
|
+
const leased = await leaseLockRows(gate, fresh, { holder, ...(opts.cwd ? { cwd: opts.cwd } : {}), ...(opts.alive ? { alive: opts.alive } : {}) });
|
|
36
|
+
if (!leased.ok) {
|
|
37
|
+
throw new LockRowsHeldError(`${label}: ${leased.message}, so nothing of it was applied. Apply again once that run ends; a run that is gone, or whose lease is older than CHANT_LOCK_STALE seconds, is taken over.`);
|
|
38
|
+
}
|
|
39
|
+
for (const h of leased.tookOver)
|
|
40
|
+
log(`${label}: took over the rows of run ${h.run}, which is gone`);
|
|
41
|
+
}
|
|
42
|
+
for (const r of wanted)
|
|
43
|
+
counts.set(r.key, (counts.get(r.key) ?? 0) + 1);
|
|
44
|
+
log(`${label}: holds ${wanted.length} row${wanted.length === 1 ? "" : "s"} of ${gate} while it applies`);
|
|
45
|
+
const me = holder.run;
|
|
46
|
+
let released = false;
|
|
47
|
+
return {
|
|
48
|
+
async release() {
|
|
49
|
+
if (released)
|
|
50
|
+
return true;
|
|
51
|
+
released = true;
|
|
52
|
+
const free = [];
|
|
53
|
+
for (const r of wanted) {
|
|
54
|
+
const n = (counts.get(r.key) ?? 1) - 1;
|
|
55
|
+
if (n <= 0) {
|
|
56
|
+
counts.delete(r.key);
|
|
57
|
+
free.push(r.key);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
counts.set(r.key, n);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (free.length === 0)
|
|
64
|
+
return true;
|
|
65
|
+
const ok = await releaseLockRows(gate, free, me, { ...(opts.cwd ? { cwd: opts.cwd } : {}) });
|
|
66
|
+
if (!ok)
|
|
67
|
+
log(`${label}: could not let go of the rows it held; the next apply takes them over once this run is gone`);
|
|
68
|
+
return ok;
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Lease one capability step's rows (#4594) when `ctx.rowLease` is set, the
|
|
76
|
+
* step was handed no plan and its grain is `resource`: plan, read the rows
|
|
77
|
+
* of that plan, lease them, and return the context that applies the leased
|
|
78
|
+
* plan. Otherwise the context as given and no lease. A grain the lexicon
|
|
79
|
+
* refuses throws, as it does at plan in a pull request.
|
|
80
|
+
*/
|
|
81
|
+
export async function leaseCapabilityStep(capability, ctx, input) {
|
|
82
|
+
const port = ctx.rowLease;
|
|
83
|
+
if (!port || ctx.plans !== undefined || !capability.plan)
|
|
84
|
+
return { ctx, lease: NO_LEASE };
|
|
85
|
+
if ((await lockGrainBeforePlan(capability, input, ctx.lockGrain)) !== "resource")
|
|
86
|
+
return { ctx, lease: NO_LEASE };
|
|
87
|
+
const planned = await capability.plan(ctx, input);
|
|
88
|
+
const lock = await resolvePlannedLock(capability, input, planned, ctx.lockGrain);
|
|
89
|
+
const plans = planned.artifact !== undefined ? { [planned.member]: planned.artifact } : undefined;
|
|
90
|
+
const applies = plans ? { ...ctx, plans } : ctx;
|
|
91
|
+
if (lock.grain !== "resource" || lock.rows.length === 0)
|
|
92
|
+
return { ctx: applies, lease: NO_LEASE };
|
|
93
|
+
return { ctx: applies, lease: await port.take(lock.rows, ctx.component) };
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The rows of a group's approved plans (#4594), each member's from its
|
|
97
|
+
* lexicon on its grain: what one take holds for the whole group.
|
|
98
|
+
*/
|
|
99
|
+
export async function groupLockRows(capability, members, plans, declared) {
|
|
100
|
+
const rows = [];
|
|
101
|
+
for (const m of members) {
|
|
102
|
+
const plan = plans[m.component];
|
|
103
|
+
if (!plan)
|
|
104
|
+
continue;
|
|
105
|
+
const lock = await resolvePlannedLock(capability, m.input, plan, declared);
|
|
106
|
+
if (lock.grain === "resource")
|
|
107
|
+
rows.push(...lock.rows);
|
|
108
|
+
}
|
|
109
|
+
return sortedLockRows(rows);
|
|
110
|
+
}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
* plans as `undefined`. Cross-component wiring (`stackOutput()`,
|
|
27
27
|
* `@<component>.publish.*`) resolves.
|
|
28
28
|
*/
|
|
29
|
+
import { type PlannedLock } from "../lifecycle/lock-rows.js";
|
|
29
30
|
import type { PlanShape } from "./covered-round.js";
|
|
30
31
|
import { type DriverComponent, type DriverPhase, type DriverStep } from "./driver.js";
|
|
31
32
|
import type { CapabilityPlan, CapabilityRegistry, DeployContext, PlannedOutputs } from "./capability.js";
|
|
@@ -46,9 +47,42 @@ export type WaveComponentPlan = {
|
|
|
46
47
|
parts: ChangeSetPart[];
|
|
47
48
|
outputs?: PlannedOutputs;
|
|
48
49
|
shapes?: Record<string, PlanShape>;
|
|
50
|
+
policy?: CapabilityPolicyFindings[];
|
|
51
|
+
/** Each planned member's lock grain and rows (#4552), by member. Absent when no step planned. */
|
|
52
|
+
locks?: Record<string, PlannedLock>;
|
|
53
|
+
/** Each planned member's location in a pull request's environment (#4609), by member. Absent when no step gave one. */
|
|
54
|
+
locations?: Record<string, string>;
|
|
49
55
|
} | {
|
|
50
56
|
component: string;
|
|
51
57
|
error: string;
|
|
58
|
+
policy?: CapabilityPolicyFindings[];
|
|
59
|
+
};
|
|
60
|
+
/** A policy engine's findings a capability's plan carried for one member (#4550): `denied` when the plan threw `policyDenied`. */
|
|
61
|
+
export interface CapabilityPolicyFindings {
|
|
62
|
+
member: string;
|
|
63
|
+
denied: boolean;
|
|
64
|
+
denials: Array<{
|
|
65
|
+
rule: string;
|
|
66
|
+
message: string;
|
|
67
|
+
}>;
|
|
68
|
+
holds: Array<{
|
|
69
|
+
rule: string;
|
|
70
|
+
message: string;
|
|
71
|
+
}>;
|
|
72
|
+
warnings: string[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The findings a capability's plan or its policy error carries (#4550), in
|
|
76
|
+
* the gate-policy shape (`{ denials, holds, warnings }`) that chant#4541's
|
|
77
|
+
* `pulumi-up` puts on its artifact as `policy` and on a
|
|
78
|
+
* `PulumiPolicyDeniedError` as `findings`. Undefined when there are none.
|
|
79
|
+
*/
|
|
80
|
+
export declare function capabilityPolicyOf(member: string, findings: unknown, denied: boolean): CapabilityPolicyFindings | undefined;
|
|
81
|
+
/** Whether `err` is a capability's policy denial (#4550): the `policyDenied: true` mark, as `planMoved` marks a moved plan. */
|
|
82
|
+
export declare function isPolicyDeniedError(err: unknown): err is {
|
|
83
|
+
policyDenied: true;
|
|
84
|
+
member?: unknown;
|
|
85
|
+
findings?: unknown;
|
|
52
86
|
};
|
|
53
87
|
/** The member a planning component's other steps add (#4155): their files, under the component's name. */
|
|
54
88
|
export declare const inputsMemberName: (component: string) => string;
|
|
@@ -74,6 +108,14 @@ export declare function targetedPlanDigest(planDigest: string, targets: readonly
|
|
|
74
108
|
* `ctx.targets`, the plan as it came.
|
|
75
109
|
*/
|
|
76
110
|
export declare function bindTargets(kind: string, ctx: DeployContext, planned: CapabilityPlan): CapabilityPlan;
|
|
111
|
+
/**
|
|
112
|
+
* A step's plan made with `ctx.refresh` or `ctx.targetDependents` (#4627),
|
|
113
|
+
* its digest bound to them: the digest over the plan's own digest and the
|
|
114
|
+
* flags, so an approval of a refreshed or widened plan covers no plain one,
|
|
115
|
+
* as {@link bindTargets} binds targets. Without either flag, the plan as it
|
|
116
|
+
* came.
|
|
117
|
+
*/
|
|
118
|
+
export declare function bindPlanFlags(ctx: Pick<DeployContext, "refresh" | "targetDependents">, planned: CapabilityPlan): CapabilityPlan;
|
|
77
119
|
/**
|
|
78
120
|
* The outputs `component` exposes now, read from each step whose capability
|
|
79
121
|
* has `outputs` (#3183), merged the way the driver merges a run's outputs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave-plan.d.ts","sourceRoot":"","sources":["../../src/components/wave-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"wave-plan.d.ts","sourceRoot":"","sources":["../../src/components/wave-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAA6F,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAI9K,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GACzB;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACpC,iGAAiG;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,uHAAuH;IACvH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC,GACD;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAAE,CAAC;AAE9E,kIAAkI;AAClI,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAKD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,wBAAwB,GAAG,SAAS,CAW3H;AAED,+HAA+H;AAC/H,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI;IAAE,YAAY,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAErH;AAWD,0GAA0G;AAC1G,eAAO,MAAM,gBAAgB,cAAe,MAAM,KAAG,MAA+B,CAAC;AAErF,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,UAAU,EAAE,CAc5E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,aAAa,EAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,aAAa,CAGf;AAED,oHAAoH;AACpH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,EAAE,aAAa,EAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,OAAO,CAAC,iBAAiB,CAAC,CA8E5B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,GAAG,cAAc,CAgBrG;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,kBAAkB,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,cAAc,CAM/H;AAUD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,EAAE,aAAa,EAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAU9C;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,aAAa,EAC3C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC/C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAYnC"}
|