@intentius/chant 0.124.54 → 0.124.55
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 +833 -0
- package/dist/ci-control.d.ts +42 -0
- package/dist/ci-control.d.ts.map +1 -0
- package/dist/ci-control.js +42 -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 +68 -0
- package/dist/ci-estate.d.ts.map +1 -0
- package/dist/ci-estate.js +83 -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 +87 -15
- package/dist/ci-product-words.d.ts +290 -0
- package/dist/ci-product-words.d.ts.map +1 -0
- package/dist/ci-product-words.js +373 -0
- package/dist/ci-product.d.ts +82 -0
- package/dist/ci-product.d.ts.map +1 -0
- package/dist/ci-product.js +78 -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/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +43 -1
- 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 +34 -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/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 +38 -3
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +653 -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 +71 -1
- 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 +124 -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 +57 -3
- package/dist/cli/registry.d.ts +35 -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 +93 -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 +122 -5
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +14 -6
- package/dist/components/check-hooks.d.ts +113 -0
- package/dist/components/check-hooks.d.ts.map +1 -0
- package/dist/components/check-hooks.js +192 -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 +61 -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 +20 -3
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +24 -4
- 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 +19 -2
- 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 +39 -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 +31 -3
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +25 -7
- package/dist/components/pr-pipeline.d.ts +169 -3
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +184 -9
- 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 +63 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +82 -3
- 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 +217 -0
- package/dist/components/product-pipeline.d.ts.map +1 -0
- package/dist/components/product-pipeline.js +193 -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 +34 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +54 -2
- 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/engine-facts.d.ts.map +1 -1
- package/dist/engine-facts.js +1 -2
- package/dist/exit-codes.d.ts +48 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +49 -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 +106 -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 +11 -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 +205 -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 -6
- 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 +10 -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 +86 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -0
- package/dist/lifecycle/release-status.js +136 -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/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/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 +55 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -0
- package/dist/op/op-waves-capability-spec.js +94 -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 +97 -0
- package/dist/op/op-waves-run.d.ts +175 -4
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +981 -41
- 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 +97 -0
- package/dist/op/op-waves.d.ts +152 -8
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +161 -17
- package/dist/op/runtime.d.ts +91 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +19 -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 +426 -0
- package/dist/override-gate.d.ts.map +1 -1
- package/dist/override-gate.js +5 -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 +103 -0
- package/dist/pr-forge.d.ts +40 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +92 -0
- package/dist/pr-loop.d.ts +149 -11
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +283 -44
- package/dist/pr-post.d.ts +16 -0
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +26 -1
- 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 +46 -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 +4 -1
- 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 +390 -285
- 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 +12 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -0
- package/dist/workspace/ci-lock-grain.js +27 -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 +6 -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 +74 -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 +1026 -0
- package/src/ci-control.ts +174 -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 +176 -0
- package/src/ci-handover.ts +67 -16
- package/src/ci-identity-database.test.ts +55 -0
- package/src/ci-identity-pulumi.test.ts +163 -0
- package/src/ci-identity-targets.test.ts +6 -2
- package/src/ci-identity.ts +124 -22
- package/src/ci-product-words.test.ts +101 -0
- package/src/ci-product-words.ts +536 -0
- package/src/ci-product.ts +174 -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/build.test.ts +7 -0
- package/src/cli/handlers/build.ts +44 -1
- package/src/cli/handlers/ci-check.ts +33 -0
- package/src/cli/handlers/ci-forge-check.ts +91 -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-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 +655 -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 +65 -1
- 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.ts +126 -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 +42 -2
- package/src/cli/registry.ts +35 -0
- package/src/cloud-lister/sigv4.ts +80 -23
- package/src/components/adoption.test.ts +140 -0
- package/src/components/adoption.ts +141 -0
- package/src/components/apply-lease.ts +49 -0
- package/src/components/capability.ts +130 -6
- package/src/components/check-hooks.test.ts +66 -0
- package/src/components/check-hooks.ts +252 -0
- package/src/components/ci-services.test.ts +51 -0
- package/src/components/ci-services.ts +83 -0
- package/src/components/cli-support.ts +23 -2
- package/src/components/driver.test.ts +3 -3
- package/src/components/driver.ts +38 -5
- package/src/components/fan-out-run.ts +68 -18
- package/src/components/groups.ts +17 -2
- 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 +43 -0
- package/src/components/pr-env-ports.ts +29 -4
- package/src/components/pr-env-run-bundle.test.ts +8 -0
- 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 +39 -7
- package/src/components/pr-pipeline.test.ts +15 -0
- package/src/components/pr-pipeline.ts +274 -9
- package/src/components/pr-policy.ts +45 -7
- package/src/components/pr-run.test.ts +1 -1
- package/src/components/pr-run.ts +121 -5
- 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 +341 -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 +78 -4
- 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/engine-facts.test.ts +2 -3
- package/src/engine-facts.ts +1 -2
- package/src/exit-codes.test.ts +31 -0
- package/src/exit-codes.ts +55 -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 +13 -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 +95 -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 +70 -0
- package/src/lifecycle/gate-applied.ts +6 -0
- package/src/lifecycle/gate-ledger.ts +36 -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 +280 -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 -7
- 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 +193 -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 +20 -0
- package/src/lifecycle/release-publish.ts +45 -22
- package/src/lifecycle/release-read.ts +2 -0
- package/src/lifecycle/release-status.test.ts +186 -0
- package/src/lifecycle/release-status.ts +176 -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/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/gate.ts +81 -22
- package/src/op/generate-pipeline.ts +7 -1
- package/src/op/index.ts +21 -0
- package/src/op/op-waves-after-plan.test.ts +276 -0
- package/src/op/op-waves-after-plan.ts +238 -0
- package/src/op/op-waves-capability-spec.ts +113 -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-pull-request.test.ts +142 -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 +133 -0
- package/src/op/op-waves-run-record.test.ts +32 -0
- package/src/op/op-waves-run.ts +1142 -49
- package/src/op/op-waves-stand-down.test.ts +240 -0
- package/src/op/op-waves-stand-down.ts +108 -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 +261 -20
- package/src/op/runtime.ts +104 -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 +544 -0
- package/src/override-gate-bundle.test.ts +2 -0
- package/src/override-gate.ts +4 -0
- package/src/policy-packs.ts +230 -0
- package/src/policy-source.test.ts +256 -0
- package/src/policy-source.ts +112 -0
- package/src/pr-forge.ts +123 -0
- package/src/pr-loop-bundle.test.ts +6 -2
- package/src/pr-loop-words.test.ts +155 -0
- package/src/pr-loop.ts +371 -52
- package/src/pr-post.ts +32 -1
- package/src/pr-report-url.ts +62 -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 +211 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +29 -1
- package/src/sorted-json.ts +17 -0
- package/src/stage-hooks-bundle.test.ts +8 -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 +30 -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 +6 -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 +74 -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
package/src/pr-post.ts
CHANGED
|
@@ -28,6 +28,8 @@ import { join } from "node:path";
|
|
|
28
28
|
import { prNoteMarker, prStatusContext, prStatusDescription, prStatusState, renderPrNote, type PrOverdue, type PrReport } from "./pr-loop";
|
|
29
29
|
import { forgePrincipalOf, type PrForge } from "./pr-forge";
|
|
30
30
|
import { GITHUB_COMMENT_LIMIT, GITLAB_NOTE_LIMIT } from "./plan-summary";
|
|
31
|
+
import { activeProductWords, type CiProductWords } from "./ci-product-words";
|
|
32
|
+
import { controlEdgeFactsFromEnv, remarkCrossStackEdges, type ControlEdgeFacts } from "./control/edges";
|
|
31
33
|
|
|
32
34
|
/** The plan report's file under the report directory. */
|
|
33
35
|
export const PR_PLAN_REPORT_FILE = "pr-plan.json";
|
|
@@ -50,6 +52,12 @@ export interface PlanPostInput {
|
|
|
50
52
|
* job held no token to ask with. It replaces any `overdue` in the report.
|
|
51
53
|
*/
|
|
52
54
|
overdue?: () => Promise<PrOverdue[]>;
|
|
55
|
+
/**
|
|
56
|
+
* The control repo's entries and apply records (#4617), which mark the
|
|
57
|
+
* report's cross-stack edges stale, current or unknown. Default: read
|
|
58
|
+
* from the checkout `CHANT_CONTROL_DIR` names, when it names one.
|
|
59
|
+
*/
|
|
60
|
+
controlFacts?: () => Promise<ControlEdgeFacts | undefined>;
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
/** What {@link postPlanReport} did. */
|
|
@@ -133,6 +141,11 @@ export async function postPlanReport(input: PlanPostInput): Promise<PlanPostResu
|
|
|
133
141
|
const found = await input.overdue().catch(() => [] as PrOverdue[]);
|
|
134
142
|
report = (found.length > 0 ? { ...rest, overdue: found } : rest) as PrReport;
|
|
135
143
|
}
|
|
144
|
+
// #4617: the marks come from the control repo, read here; the plan job's never show.
|
|
145
|
+
if (report.crossStackEdges?.length) {
|
|
146
|
+
const facts = await (input.controlFacts ?? (() => controlEdgeFactsFromEnv()))().catch(() => undefined);
|
|
147
|
+
report = remarkCrossStackEdges(report, facts);
|
|
148
|
+
}
|
|
136
149
|
try {
|
|
137
150
|
state = prStatusState(report);
|
|
138
151
|
description = prStatusDescription(report);
|
|
@@ -156,7 +169,7 @@ export async function postPlanReport(input: PlanPostInput): Promise<PlanPostResu
|
|
|
156
169
|
}
|
|
157
170
|
if (note !== undefined) {
|
|
158
171
|
try {
|
|
159
|
-
await input.forge
|
|
172
|
+
await upsertPlanNote(input.forge, input.pr, prNoteMarker(input.env, input.member), note);
|
|
160
173
|
} catch (err) {
|
|
161
174
|
warnings.push(`could not post the note on #${input.pr}: ${err instanceof Error ? err.message : String(err)}`);
|
|
162
175
|
note = undefined;
|
|
@@ -165,6 +178,24 @@ export async function postPlanReport(input: PlanPostInput): Promise<PlanPostResu
|
|
|
165
178
|
return { state, description: cut(description), noted: note !== undefined, ...(refused ? { refused } : {}), warnings };
|
|
166
179
|
}
|
|
167
180
|
|
|
181
|
+
/**
|
|
182
|
+
* Post the plan note, or update it. Under a product's words that carry
|
|
183
|
+
* `adoptMarkers` (#4550), a pull request with no chant note yet but a note the
|
|
184
|
+
* product posted before it moved onto chant's pipeline gets that note
|
|
185
|
+
* updated, with the old marker kept at its end, so the pull request keeps one
|
|
186
|
+
* note across the switch.
|
|
187
|
+
*/
|
|
188
|
+
export async function upsertPlanNote(forge: Pick<PrForge, "upsertNote" | "findComment" | "upsertComment">, pr: number, marker: string, note: string, words: CiProductWords = activeProductWords()): Promise<void> {
|
|
189
|
+
if (words.adoptMarkers.length > 0 && !(await forge.findComment(pr, marker))) {
|
|
190
|
+
for (const old of words.adoptMarkers) {
|
|
191
|
+
if (!(await forge.findComment(pr, old, { match: "anywhere" }))) continue;
|
|
192
|
+
await forge.upsertComment(pr, old, `${note}${note.endsWith("\n") ? "" : "\n"}${old}\n`, { match: "anywhere" });
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
await forge.upsertNote(pr, marker, note);
|
|
197
|
+
}
|
|
198
|
+
|
|
168
199
|
/** What {@link postOpenPlanReports} posts for. */
|
|
169
200
|
export interface OpenPlanPostInput {
|
|
170
201
|
/** A GitLab client with {@link PrForge.mergeRequestJobs}, {@link PrForge.jobArtifact} and {@link PrForge.statusUrl}. */
|
package/src/pr-report-url.ts
CHANGED
|
@@ -32,17 +32,33 @@
|
|
|
32
32
|
* environment the job gives it, the way the aws lexicon's `s3-sync` does.
|
|
33
33
|
* chant passes it no credential and prints none: a failed upload prints the
|
|
34
34
|
* CLI's own error line.
|
|
35
|
+
*
|
|
36
|
+
* Two more (#4554): `gs://<bucket>/<prefix>` and `az://<account>/<container>/
|
|
37
|
+
* <prefix>` go through chant core's object-store clients (./object-store),
|
|
38
|
+
* which read the job's credentials from its environment the way terragucci's
|
|
39
|
+
* report uploads do: GOOGLE_APPLICATION_CREDENTIALS (or a traded
|
|
40
|
+
* GOOGLE_OAUTH_ACCESS_TOKEN) for GCS, and AZURE_STORAGE_KEY or the ARM_
|
|
41
|
+
* OIDC variables for Azure Blob Storage. An older chant refuses either
|
|
42
|
+
* scheme, so a declaration whose `ci.reportUrl` uses one needs
|
|
43
|
+
* {@link REPORT_URL_CLOUDS_FLOOR} as its `minReader`.
|
|
35
44
|
*/
|
|
36
45
|
|
|
37
46
|
import { spawn } from "node:child_process";
|
|
38
47
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
39
48
|
import { dirname, isAbsolute, join } from "node:path";
|
|
40
49
|
import { fileURLToPath } from "node:url";
|
|
50
|
+
import { NEXT_RELEASE } from "./release-floors";
|
|
51
|
+
import type { ObjectStore } from "./object-store/common";
|
|
52
|
+
|
|
53
|
+
/** The first chant that reads a `gs://` or `az://` report URL (#4554). */
|
|
54
|
+
export const REPORT_URL_CLOUDS_FLOOR = NEXT_RELEASE;
|
|
41
55
|
|
|
42
56
|
/** Where `--report-url` points. */
|
|
43
57
|
export type ReportTarget =
|
|
44
58
|
| { scheme: "file"; url: string; dir: string }
|
|
45
|
-
| { scheme: "s3"; url: string; bucket: string; prefix: string }
|
|
59
|
+
| { scheme: "s3"; url: string; bucket: string; prefix: string }
|
|
60
|
+
| { scheme: "gs"; url: string; bucket: string; prefix: string }
|
|
61
|
+
| { scheme: "az"; url: string; account: string; container: string; prefix: string };
|
|
46
62
|
|
|
47
63
|
/** `--report-url` read, or why it can't be. `name` is what the error calls the value: the flag, or `ci.reportUrl` (#4160). */
|
|
48
64
|
export function parseReportUrl(raw: string, name = "--report-url"): ReportTarget | { error: string } {
|
|
@@ -62,7 +78,18 @@ export function parseReportUrl(raw: string, name = "--report-url"): ReportTarget
|
|
|
62
78
|
const prefix = s3[2]!.replace(/\/+$/, "");
|
|
63
79
|
return { scheme: "s3", url: `s3://${s3[1]}${prefix ? `/${prefix}` : ""}`, bucket: s3[1]!, prefix };
|
|
64
80
|
}
|
|
65
|
-
|
|
81
|
+
// #4554: a GCS bucket and an Azure container, named as terragucci's reports.bucket names them.
|
|
82
|
+
const gs = /^gs:\/\/([a-z0-9][a-z0-9._-]{1,221}[a-z0-9])(?:\/(.*))?$/.exec(url);
|
|
83
|
+
if (gs) {
|
|
84
|
+
const prefix = (gs[2] ?? "").replace(/\/+$/, "");
|
|
85
|
+
return { scheme: "gs", url: `gs://${gs[1]}${prefix ? `/${prefix}` : ""}`, bucket: gs[1]!, prefix };
|
|
86
|
+
}
|
|
87
|
+
const az = /^az:\/\/([a-z0-9]{3,24})\/([a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){2,62})(?:\/(.*))?$/.exec(url);
|
|
88
|
+
if (az) {
|
|
89
|
+
const prefix = (az[3] ?? "").replace(/\/+$/, "");
|
|
90
|
+
return { scheme: "az", url: `az://${az[1]}/${az[2]}${prefix ? `/${prefix}` : ""}`, account: az[1]!, container: az[2]!, prefix };
|
|
91
|
+
}
|
|
92
|
+
return { error: `${name} ${url}: takes an s3://<bucket>/<prefix>, gs://<bucket>/<prefix>, az://<account>/<container>/<prefix> or file://<directory> URL` };
|
|
66
93
|
}
|
|
67
94
|
|
|
68
95
|
/** The key a stage's files are kept under, below the URL: `<pr>/<commit>[/<member>]`. */
|
|
@@ -103,8 +130,33 @@ export const realAwsCli: AwsCli = (args, stdin) =>
|
|
|
103
130
|
child.stdin.end(stdin);
|
|
104
131
|
});
|
|
105
132
|
|
|
106
|
-
/**
|
|
107
|
-
|
|
133
|
+
/**
|
|
134
|
+
* The object-store client for a `gs://` or `az://` target (#4554), made once
|
|
135
|
+
* on first use from the job's environment. `store` replaces it in a test.
|
|
136
|
+
*/
|
|
137
|
+
export type ReportStore = () => Promise<ObjectStore>;
|
|
138
|
+
|
|
139
|
+
function cloudStore(target: Extract<ReportTarget, { scheme: "gs" | "az" }>, env: NodeJS.ProcessEnv = process.env): ReportStore {
|
|
140
|
+
let made: Promise<ObjectStore> | undefined;
|
|
141
|
+
return () =>
|
|
142
|
+
(made ??= import("./object-store/index").then((m) =>
|
|
143
|
+
target.scheme === "gs"
|
|
144
|
+
? new m.GcsClient(m.gcsFromEnv({ bucket: target.bucket, setting: "the report URL" }, env))
|
|
145
|
+
: new m.AzureBlobClient(m.azureFromEnv({ account: target.account, container: target.container, setting: "the report URL" }, env)),
|
|
146
|
+
));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** A key below a cloud target's prefix. */
|
|
150
|
+
const cloudKey = (target: { prefix: string }, key: string): string => `${target.prefix ? `${target.prefix}/` : ""}${key}`;
|
|
151
|
+
|
|
152
|
+
/** A put for `target`. `aws` replaces the AWS CLI in a test, and `store` a GCS or Azure client. */
|
|
153
|
+
export function reportPut(target: ReportTarget, aws: AwsCli = realAwsCli, store?: ReportStore): ReportPut {
|
|
154
|
+
if (target.scheme === "gs" || target.scheme === "az") {
|
|
155
|
+
const open = store ?? cloudStore(target);
|
|
156
|
+
return async (key, body, contentType) => {
|
|
157
|
+
await (await open()).put(cloudKey(target, key), body, contentType);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
108
160
|
if (target.scheme === "file") {
|
|
109
161
|
return async (key, body) => {
|
|
110
162
|
const path = join(target.dir, ...key.split("/"));
|
|
@@ -149,8 +201,12 @@ export const realAwsRead: AwsRead = (args) =>
|
|
|
149
201
|
/** What the AWS CLI says about an object that does not exist. */
|
|
150
202
|
const S3_ABSENT = /\(404\)|Not Found|NoSuchKey|does not exist/i;
|
|
151
203
|
|
|
152
|
-
/** A get for `target`. `aws` replaces the AWS CLI in a test. */
|
|
153
|
-
export function reportGet(target: ReportTarget, aws: AwsRead = realAwsRead): ReportGet {
|
|
204
|
+
/** A get for `target`. `aws` replaces the AWS CLI in a test, and `store` a GCS or Azure client. */
|
|
205
|
+
export function reportGet(target: ReportTarget, aws: AwsRead = realAwsRead, store?: ReportStore): ReportGet {
|
|
206
|
+
if (target.scheme === "gs" || target.scheme === "az") {
|
|
207
|
+
const open = store ?? cloudStore(target);
|
|
208
|
+
return async (key) => (await (await open()).get(cloudKey(target, key))) ?? null;
|
|
209
|
+
}
|
|
154
210
|
if (target.scheme === "file") {
|
|
155
211
|
return async (key) => {
|
|
156
212
|
try {
|
package/src/pr-requires.test.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { describe, expect, test } from "vitest";
|
|
8
8
|
import { forgejoForge, githubForge, gitlabForge, type ForgeFetch, type PrForge } from "./pr-forge";
|
|
9
|
-
import { checkPrRequires, PR_APPLY_REQUIRES, unmetRequires } from "./pr-requires";
|
|
9
|
+
import { checkPrRequires, parseRequiresList, PR_APPLY_REQUIRES, unmetRequires } from "./pr-requires";
|
|
10
|
+
import { parseArgs } from "./cli/parse-args";
|
|
10
11
|
|
|
11
12
|
/** A fake forge: `routes` maps `METHOD path-without-query` to a body, a status, or a function of the query. */
|
|
12
13
|
function fakeFetch(routes: Record<string, unknown | ((q: URLSearchParams) => unknown)>): ForgeFetch {
|
|
@@ -283,3 +284,38 @@ describe("checkPrRequires", () => {
|
|
|
283
284
|
expect(unmetRequires(out)).toBe("approved: could not ask gitlab: 401; mergeable: this gitlab client cannot say; undiverged: this gitlab client cannot say; checks: this gitlab client cannot say");
|
|
284
285
|
});
|
|
285
286
|
});
|
|
287
|
+
|
|
288
|
+
describe("--requires (#4607)", () => {
|
|
289
|
+
test("names the checks in the four's order, comma lists and repeats folded", () => {
|
|
290
|
+
expect(parseRequiresList(["checks,approved"])).toEqual({ checks: ["approved", "checks"] });
|
|
291
|
+
expect(parseRequiresList(["mergeable", "mergeable, undiverged"])).toEqual({ checks: ["mergeable", "undiverged"] });
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
test("an unknown check, or none, is an error naming the four", () => {
|
|
295
|
+
const unknown = parseRequiresList(["approved,green"]);
|
|
296
|
+
expect("error" in unknown && unknown.error).toContain('"green" is not one of them');
|
|
297
|
+
expect("error" in unknown && unknown.error).toContain("approved, mergeable, undiverged, checks");
|
|
298
|
+
expect("error" in parseRequiresList([","])).toBe(true);
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
test("pr-apply parses the flag into args.requires", () => {
|
|
302
|
+
expect(parseArgs(["components", "pr-apply", "--before-merge", "--pr", "7", "--requires", "approved,checks"]).requires).toEqual(["approved", "checks"]);
|
|
303
|
+
expect(() => parseArgs(["components", "pr-apply", "--requires", "--json"])).toThrow(/--requires needs a list/);
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
test("a product's subset asks only those checks", async () => {
|
|
307
|
+
const calls: string[] = [];
|
|
308
|
+
const forge = {
|
|
309
|
+
kind: "github",
|
|
310
|
+
prApproved: async () => (calls.push("approved"), { passed: true, reason: "ok" }),
|
|
311
|
+
prMergeable: async () => (calls.push("mergeable"), { passed: false, reason: "conflict" }),
|
|
312
|
+
prUndiverged: async () => (calls.push("undiverged"), { passed: false, reason: "behind" }),
|
|
313
|
+
prChecksPassed: async () => (calls.push("checks"), { passed: true, reason: "green" }),
|
|
314
|
+
} as unknown as PrForge;
|
|
315
|
+
const parsed = parseRequiresList(["approved,checks"]);
|
|
316
|
+
if ("error" in parsed) throw new Error(parsed.error);
|
|
317
|
+
const out = await checkPrRequires(forge, 7, HEAD, { only: parsed.checks, reads: 1 });
|
|
318
|
+
expect(calls).toEqual(["approved", "checks"]);
|
|
319
|
+
expect(unmetRequires(out)).toBeNull();
|
|
320
|
+
});
|
|
321
|
+
});
|
package/src/pr-requires.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The checks are terragucci's `apply.requires` (comment-apply.ts:781-860 at
|
|
7
7
|
* INTENTIUS/terragucci e6cb431). A product may leave one out with `only`
|
|
8
|
-
* (#4336)
|
|
9
|
-
*
|
|
8
|
+
* (#4336). `pr-apply --before-merge` asks all four, as ws-106 requires,
|
|
9
|
+
* unless `--requires <list>` names fewer (#4607), which is how a product's
|
|
10
|
+
* `apply.requires` reaches it. A check the
|
|
10
11
|
* forge has not settled, such as GitHub working out whether a pull request
|
|
11
12
|
* can merge, is asked again a few times before it counts as unmet.
|
|
12
13
|
*
|
|
@@ -89,6 +90,19 @@ export async function checkPrRequires(forge: PrForge, pr: number, head: string,
|
|
|
89
90
|
return out;
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
/**
|
|
94
|
+
* The checks a `--requires` list names (#4607), in {@link PR_APPLY_REQUIRES}
|
|
95
|
+
* order: comma lists are split, repeats dropped. An unknown name, or a list
|
|
96
|
+
* that names none, is an error naming the four.
|
|
97
|
+
*/
|
|
98
|
+
export function parseRequiresList(values: readonly string[]): { checks: PrApplyRequire[] } | { error: string } {
|
|
99
|
+
const names = values.flatMap((v) => v.split(",")).map((v) => v.trim()).filter(Boolean);
|
|
100
|
+
const unknown = names.filter((n) => !(PR_APPLY_REQUIRES as readonly string[]).includes(n));
|
|
101
|
+
if (unknown.length > 0) return { error: `--requires takes ${PR_APPLY_REQUIRES.join(", ")}; ${unknown.map((u) => JSON.stringify(u)).join(", ")} is not one of them` };
|
|
102
|
+
if (names.length === 0) return { error: `--requires names at least one of ${PR_APPLY_REQUIRES.join(", ")}` };
|
|
103
|
+
return { checks: PR_APPLY_REQUIRES.filter((n) => names.includes(n)) };
|
|
104
|
+
}
|
|
105
|
+
|
|
92
106
|
/** The unmet checks as one line, or null when all four passed. */
|
|
93
107
|
export function unmetRequires(outcomes: readonly PrRequireOutcome[]): string | null {
|
|
94
108
|
const unmet = outcomes.filter((o) => !o.passed);
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The products import the installed, pinned chant at run time (chant#4591).
|
|
3
|
+
* plywood and terragucci mark `@intentius/chant*` external in their CLI
|
|
4
|
+
* bundles, so every subpath they load must resolve, under plain Node and no
|
|
5
|
+
* TypeScript loader, to compiled JS. Node does not strip types under
|
|
6
|
+
* node_modules, so the core exports carry an `import` condition on `dist/*.js`
|
|
7
|
+
* beside `development` and `default`, as `./notify` did first (#3803).
|
|
8
|
+
*
|
|
9
|
+
* This packs core and the terraform lexicon the way a release does (each
|
|
10
|
+
* prepack builds dist/), unpacks both into a scratch project's node_modules,
|
|
11
|
+
* links the rest of the repository's installed dependencies beside them, and
|
|
12
|
+
* imports each subpath with `node` and nothing else. A compiled lexicon
|
|
13
|
+
* imports core too, so the lexicon rows also prove core's root and subpaths
|
|
14
|
+
* reach dist/.
|
|
15
|
+
*
|
|
16
|
+
* End to end because `npm pack` runs both package builds.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { execFileSync } from "node:child_process";
|
|
20
|
+
import { mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync, symlinkSync } from "node:fs";
|
|
21
|
+
import { tmpdir } from "node:os";
|
|
22
|
+
import { join, resolve } from "node:path";
|
|
23
|
+
import { transformSync } from "esbuild";
|
|
24
|
+
import { afterAll, beforeAll, describe, expect, test } from "vitest";
|
|
25
|
+
|
|
26
|
+
const coreRoot = resolve(import.meta.dirname, "..");
|
|
27
|
+
const repoRoot = resolve(coreRoot, "..", "..");
|
|
28
|
+
const terraformRoot = join(repoRoot, "lexicons", "terraform");
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Every `@intentius/chant` subpath plywood or terragucci loads at run time
|
|
32
|
+
* (type-only imports left out), from packages/plywood/src and
|
|
33
|
+
* packages/terragucci/src at integration/ci-products, plus the ones chant#4591
|
|
34
|
+
* names. A product that starts importing another one adds it here.
|
|
35
|
+
*/
|
|
36
|
+
const CORE_SUBPATHS = [
|
|
37
|
+
"",
|
|
38
|
+
"bucket-check",
|
|
39
|
+
"change-set",
|
|
40
|
+
"ci-control",
|
|
41
|
+
"ci-estate",
|
|
42
|
+
"ci-handover",
|
|
43
|
+
"ci-identity",
|
|
44
|
+
"ci-product",
|
|
45
|
+
"components",
|
|
46
|
+
"components/capability",
|
|
47
|
+
"components/check-hooks",
|
|
48
|
+
"components/component",
|
|
49
|
+
"components/pr-env-run",
|
|
50
|
+
"components/pr-environment",
|
|
51
|
+
"components/verbs/sign",
|
|
52
|
+
"exit-codes",
|
|
53
|
+
"forge-check",
|
|
54
|
+
"gate-decision",
|
|
55
|
+
"gate-policy",
|
|
56
|
+
"gate-resume-run",
|
|
57
|
+
"gated-waves",
|
|
58
|
+
"lifecycle/gate-audit",
|
|
59
|
+
"lifecycle/git",
|
|
60
|
+
"lifecycle/ledger-read",
|
|
61
|
+
"lifecycle/plan-digest",
|
|
62
|
+
"lifecycle/query",
|
|
63
|
+
"lifecycle/release-ledger",
|
|
64
|
+
"lifecycle/target-lock",
|
|
65
|
+
"lint/post-synth",
|
|
66
|
+
"notify",
|
|
67
|
+
"object-store",
|
|
68
|
+
"op",
|
|
69
|
+
"op/activities",
|
|
70
|
+
"op/activities/review-agent",
|
|
71
|
+
"op/gate-resume-plan",
|
|
72
|
+
"op/op-waves",
|
|
73
|
+
"op/schedule-overdue",
|
|
74
|
+
"op/stage-hooks",
|
|
75
|
+
"override-gate",
|
|
76
|
+
"plan-summary",
|
|
77
|
+
"point-decision",
|
|
78
|
+
"pr-forge",
|
|
79
|
+
"pr-requires",
|
|
80
|
+
"read-filter",
|
|
81
|
+
"terraform/credentials",
|
|
82
|
+
"terraform/parse",
|
|
83
|
+
"wave-blocked",
|
|
84
|
+
"workspace/ci-branches",
|
|
85
|
+
"workspace/declaration",
|
|
86
|
+
"workspace/which-chant",
|
|
87
|
+
"yaml",
|
|
88
|
+
] as const;
|
|
89
|
+
|
|
90
|
+
/** The terraform lexicon subpaths the products load (and chant#4591 names). */
|
|
91
|
+
const TERRAFORM_SUBPATHS = [
|
|
92
|
+
"change-set",
|
|
93
|
+
"changed-roots",
|
|
94
|
+
"compose",
|
|
95
|
+
"compose/estate",
|
|
96
|
+
"compose/root",
|
|
97
|
+
"compose/run",
|
|
98
|
+
"compose/slice",
|
|
99
|
+
"config",
|
|
100
|
+
"drift-rows",
|
|
101
|
+
"hcl/parse",
|
|
102
|
+
"lint/post-synth/tf046",
|
|
103
|
+
"pin",
|
|
104
|
+
"plan-digest",
|
|
105
|
+
"plan-shape",
|
|
106
|
+
"registry",
|
|
107
|
+
"registry/edge",
|
|
108
|
+
"state",
|
|
109
|
+
"terragrunt/affected",
|
|
110
|
+
"terragrunt/mocks",
|
|
111
|
+
"terragrunt/run",
|
|
112
|
+
"terragrunt/units",
|
|
113
|
+
"terragrunt/wave",
|
|
114
|
+
] as const;
|
|
115
|
+
|
|
116
|
+
let scratch: string;
|
|
117
|
+
let consumer: string;
|
|
118
|
+
|
|
119
|
+
/** Packs `dir` into `scratch` and unpacks it at `consumer/node_modules/<name>`. */
|
|
120
|
+
function packInto(dir: string, name: string): void {
|
|
121
|
+
const packed = JSON.parse(
|
|
122
|
+
execFileSync("npm", ["pack", "--json", "--pack-destination", scratch], { cwd: dir, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }),
|
|
123
|
+
) as { filename: string }[];
|
|
124
|
+
const into = join(consumer, "node_modules", name);
|
|
125
|
+
mkdirSync(into, { recursive: true });
|
|
126
|
+
execFileSync("tar", ["-xzf", join(scratch, packed[0].filename), "-C", into, "--strip-components=1"]);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
beforeAll(() => {
|
|
130
|
+
scratch = mkdtempSync(join(tmpdir(), "chant-product-subpaths-"));
|
|
131
|
+
consumer = join(scratch, "consumer");
|
|
132
|
+
mkdirSync(join(consumer, "node_modules", "@intentius"), { recursive: true });
|
|
133
|
+
packInto(coreRoot, "@intentius/chant");
|
|
134
|
+
packInto(terraformRoot, "@intentius/chant-lexicon-terraform");
|
|
135
|
+
// Third-party dependencies come from the repository's install: the
|
|
136
|
+
// hoisted ones beside the packages, core's nested ones under core.
|
|
137
|
+
for (const name of readdirSync(join(repoRoot, "node_modules"))) {
|
|
138
|
+
if (name === "@intentius" || name.startsWith(".")) continue;
|
|
139
|
+
symlinkSync(join(repoRoot, "node_modules", name), join(consumer, "node_modules", name), "dir");
|
|
140
|
+
}
|
|
141
|
+
symlinkSync(join(coreRoot, "node_modules"), join(consumer, "node_modules", "@intentius", "chant", "node_modules"), "dir");
|
|
142
|
+
}, 900_000);
|
|
143
|
+
|
|
144
|
+
afterAll(() => {
|
|
145
|
+
if (scratch) rmSync(scratch, { recursive: true, force: true });
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
/** Imports each specifier under plain node in the consumer project, with no loader. */
|
|
149
|
+
function importEach(specifiers: readonly string[]): { specifier: string; from?: string; exports?: number; error?: string }[] {
|
|
150
|
+
const env = { ...process.env };
|
|
151
|
+
delete env.NODE_OPTIONS;
|
|
152
|
+
const source = `
|
|
153
|
+
const out = [];
|
|
154
|
+
for (const specifier of ${JSON.stringify(specifiers)}) {
|
|
155
|
+
try {
|
|
156
|
+
const m = await import(specifier);
|
|
157
|
+
out.push({ specifier, from: import.meta.resolve(specifier), exports: Object.keys(m).length });
|
|
158
|
+
} catch (e) {
|
|
159
|
+
out.push({ specifier, error: String(e?.message ?? e).split("\\n")[0] });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
console.log(JSON.stringify(out));
|
|
163
|
+
`;
|
|
164
|
+
return JSON.parse(execFileSync(process.execPath, ["--input-type=module", "-e", source], { cwd: consumer, env, encoding: "utf-8" }));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** Every .js and .mjs file under `dir`. */
|
|
168
|
+
function compiledFiles(dir: string): string[] {
|
|
169
|
+
return readdirSync(dir).flatMap((name) => {
|
|
170
|
+
const path = join(dir, name);
|
|
171
|
+
if (statSync(path).isDirectory()) return name === "node_modules" ? [] : compiledFiles(path);
|
|
172
|
+
return /\.m?js$/.test(name) ? [path] : [];
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
describe("product subpaths under plain Node (chant#4591)", () => {
|
|
177
|
+
test("every compiled module in both tarballs parses", () => {
|
|
178
|
+
// A product's bundler parses every module an import reaches, dynamic ones
|
|
179
|
+
// too. tsc-alias once rewrote a regex shaped like an import and left a
|
|
180
|
+
// file Node could not parse (chud-lexicon-exit.js).
|
|
181
|
+
const unparsed: string[] = [];
|
|
182
|
+
for (const pkg of ["@intentius/chant", "@intentius/chant-lexicon-terraform"]) {
|
|
183
|
+
for (const file of compiledFiles(join(consumer, "node_modules", pkg, "dist"))) {
|
|
184
|
+
try {
|
|
185
|
+
transformSync(readFileSync(file, "utf-8"), { format: "esm", loader: "js", logLevel: "silent" });
|
|
186
|
+
} catch (e) {
|
|
187
|
+
unparsed.push(`${file}: ${(e as { errors?: { text: string }[] }).errors?.[0]?.text ?? String(e)}`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
expect(unparsed).toEqual([]);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
test("every core subpath a product loads imports from dist/", () => {
|
|
196
|
+
const results = importEach(CORE_SUBPATHS.map((s) => (s ? `@intentius/chant/${s}` : "@intentius/chant")));
|
|
197
|
+
expect(results.filter((r) => r.error)).toEqual([]);
|
|
198
|
+
for (const r of results) {
|
|
199
|
+
expect(r.from, r.specifier).toMatch(/\/node_modules\/@intentius\/chant\/dist\/.+\.js$/);
|
|
200
|
+
expect(r.exports, r.specifier).toBeGreaterThan(0);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
test("every terraform lexicon subpath a product loads imports from dist/, with core from dist/ under it", () => {
|
|
205
|
+
const results = importEach(TERRAFORM_SUBPATHS.map((s) => `@intentius/chant-lexicon-terraform/${s}`));
|
|
206
|
+
expect(results.filter((r) => r.error)).toEqual([]);
|
|
207
|
+
for (const r of results) {
|
|
208
|
+
expect(r.from, r.specifier).toMatch(/\/node_modules\/@intentius\/chant-lexicon-terraform\/dist\/.+\.js$/);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
});
|
package/src/release-floors.ts
CHANGED
package/src/run-event.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* {@link runEventOfProgress} and {@link runEventsOfStepRecord} say how each
|
|
20
20
|
* maps onto this contract.
|
|
21
21
|
*
|
|
22
|
-
* This module imports no runtime code beyond the chant version (`./chant-version.ts`), so a consumer
|
|
22
|
+
* This module imports no runtime code beyond the chant version (`./chant-version.ts`) and the release floors (`./release-floors.ts`), so a consumer
|
|
23
23
|
* can import the types and the writer without loading the rest of chant. It
|
|
24
24
|
* lives outside `workspace/` so that a level-0 import of `@intentius/chant`
|
|
25
25
|
* loads no workspace module (#2526).
|
|
@@ -29,6 +29,7 @@ import type { RunProgressEvent } from "./components/run-progress";
|
|
|
29
29
|
import type { RunOrigin } from "./lifecycle/release-ledger";
|
|
30
30
|
import type { StepRecord } from "./op/local-executor";
|
|
31
31
|
import { CHANT_VERSION } from "./chant-version";
|
|
32
|
+
import { NEXT_RELEASE } from "./release-floors";
|
|
32
33
|
|
|
33
34
|
/** The schema's `$id`, which every event carries as `$schema`. */
|
|
34
35
|
export const RUN_EVENT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/run-event/v1/run-event.schema.json";
|
|
@@ -215,8 +216,35 @@ export interface RunEventStepSettle {
|
|
|
215
216
|
error?: string;
|
|
216
217
|
/** Why the step skipped, gated or waited, for a person. */
|
|
217
218
|
message?: string;
|
|
219
|
+
/**
|
|
220
|
+
* What the step did to each resource, when its engine reported it (#4615),
|
|
221
|
+
* such as plunge's per-resource timings on a `pulumi-up` step. Optional,
|
|
222
|
+
* added within contract 1 by chant {@link RUN_EVENT_RESOURCES_FLOOR}; a
|
|
223
|
+
* reader that does not know it ignores it.
|
|
224
|
+
*/
|
|
225
|
+
resources?: RunEventResource[];
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** One resource a step changed or tried to (#4615). */
|
|
229
|
+
export interface RunEventResource {
|
|
230
|
+
/** The engine's id for it: a URN, an address. */
|
|
231
|
+
resource: string;
|
|
232
|
+
/** Its type, when the engine names one. */
|
|
233
|
+
type?: string;
|
|
234
|
+
/** Its name, when the engine names one apart from the id. */
|
|
235
|
+
name?: string;
|
|
236
|
+
status: "ok" | "failed";
|
|
237
|
+
/** When the engine started on it, ISO-8601, when it says. */
|
|
238
|
+
startedAt?: string;
|
|
239
|
+
/** How long the engine spent on it, or null when it did not time it. */
|
|
240
|
+
durationMs: number | null;
|
|
241
|
+
/** How many engine calls it took (provider calls, record writes), when the engine counts them. */
|
|
242
|
+
calls?: number;
|
|
218
243
|
}
|
|
219
244
|
|
|
245
|
+
/** The first chant that writes `resources` on `step-settle` (#4615). */
|
|
246
|
+
export const RUN_EVENT_RESOURCES_FLOOR = NEXT_RELEASE;
|
|
247
|
+
|
|
220
248
|
/** The run stopped at a gate nobody has approved, or a decision point nobody has answered. */
|
|
221
249
|
export interface RunEventGateWaiting {
|
|
222
250
|
type: "gate-waiting";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The JSON replacer that sorts object keys, alone in a leaf module so a small
|
|
3
|
+
* bundle that digests JSON (the gate decision's gated-request digest, #4551)
|
|
4
|
+
* takes it without `./utils.ts` and its AttrRef import.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* JSON.stringify replacer that sorts object keys for deterministic output.
|
|
9
|
+
*/
|
|
10
|
+
export function sortedJsonReplacer(_key: string, value: unknown): unknown {
|
|
11
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
12
|
+
return Object.fromEntries(
|
|
13
|
+
Object.entries(value as Record<string, unknown>).sort(([a], [b]) => a.localeCompare(b))
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
@@ -24,13 +24,21 @@ describe("the stage-hooks bundle", () => {
|
|
|
24
24
|
logLevel: "silent",
|
|
25
25
|
});
|
|
26
26
|
expect(Object.keys(result.metafile.inputs).map((i) => i.replace(/^.*?packages\//, "packages/")).sort()).toEqual([
|
|
27
|
+
// The product's words (#4550): gate and status names, no imports.
|
|
28
|
+
"packages/core/src/ci-product-words.ts",
|
|
29
|
+
// The control repo's settings check (#4568, #4617), which the spec checks.
|
|
30
|
+
"packages/core/src/control/dispatch.ts",
|
|
27
31
|
"packages/core/src/lifecycle/gate-seal.ts",
|
|
28
32
|
"packages/core/src/notify-verify.ts",
|
|
29
33
|
"packages/core/src/notify.ts",
|
|
30
34
|
"packages/core/src/op/gate-point.ts",
|
|
31
35
|
"packages/core/src/op/gate-quorum.ts",
|
|
36
|
+
"packages/core/src/op/op-waves-capability-spec.ts",
|
|
37
|
+
"packages/core/src/op/op-waves-release.ts",
|
|
32
38
|
"packages/core/src/op/op-waves.ts",
|
|
33
39
|
"packages/core/src/op/stage-hooks.ts",
|
|
40
|
+
// The next-release floor constant (#4480): no imports.
|
|
41
|
+
"packages/core/src/release-floors.ts",
|
|
34
42
|
"packages/core/src/wave-blocked.ts",
|
|
35
43
|
"packages/core/src/wave-layout.ts",
|
|
36
44
|
]);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// The token lookup Terraform and OpenTofu use (chant#4563): TF_TOKEN_<host> first, then the CLI config
|
|
2
|
+
// file and credentials.tfrc.json.
|
|
3
|
+
import { describe, expect, it } from "vitest";
|
|
4
|
+
import { authorizationFor, credentialsHost, credentialsFilePath, terraformCredential, terraformToken, tokenVariable } from "./credentials";
|
|
5
|
+
|
|
6
|
+
const files = (map: Record<string, string>) => (path: string) => map[path];
|
|
7
|
+
|
|
8
|
+
describe("tokenVariable", () => {
|
|
9
|
+
it("writes dots as _ and dashes as __, lower case", () => {
|
|
10
|
+
expect(tokenVariable("app.terraform.io")).toBe("TF_TOKEN_app_terraform_io");
|
|
11
|
+
expect(tokenVariable("My-Registry.Example.com")).toBe("TF_TOKEN_my__registry_example_com");
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("uses punycode for an internationalised host", () => {
|
|
15
|
+
expect(tokenVariable("bücher.example")).toBe("TF_TOKEN_xn____bcher__kva_example");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("drops port 443 and has no variable for another port", () => {
|
|
19
|
+
expect(credentialsHost("registry.example.com:443")).toBe("registry.example.com");
|
|
20
|
+
expect(tokenVariable("127.0.0.1:8443")).toBeUndefined();
|
|
21
|
+
expect(credentialsHost("https://Registry.Example.com/v1/modules/")).toBe("registry.example.com");
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe("terraformCredential", () => {
|
|
26
|
+
const home = "/home/u";
|
|
27
|
+
const tfrc = "/home/u/.terraform.d/credentials.tfrc.json";
|
|
28
|
+
|
|
29
|
+
it("reads TF_TOKEN_<host>", () => {
|
|
30
|
+
expect(terraformCredential("app.terraform.io", { env: { TF_TOKEN_app_terraform_io: "t1" }, readFile: files({}) })).toEqual({ token: "t1", from: "TF_TOKEN_app_terraform_io" });
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it("matches a variable whose name decodes to the host in another case", () => {
|
|
34
|
+
expect(terraformToken("app.terraform.io", { env: { TF_TOKEN_App_Terraform_Io: "t2" }, readFile: files({}) })).toBe("t2");
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("reads credentials.tfrc.json under HOME", () => {
|
|
38
|
+
const c = terraformCredential("registry.example.com", { env: { HOME: home }, platform: "linux", readFile: files({ [tfrc]: JSON.stringify({ credentials: { "registry.example.com": { token: "f1" } } }) }) });
|
|
39
|
+
expect(c).toEqual({ token: "f1", from: tfrc });
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("reads a host with a port from the file only", () => {
|
|
43
|
+
const readFile = files({ [tfrc]: JSON.stringify({ credentials: { "127.0.0.1:8443": { token: "p1" } } }) });
|
|
44
|
+
expect(terraformToken("127.0.0.1:8443", { env: { HOME: home }, platform: "linux", readFile })).toBe("p1");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("reads a credentials block from the HCL file TF_CLI_CONFIG_FILE names", () => {
|
|
48
|
+
const cli = "/etc/tf/cli.tfrc";
|
|
49
|
+
const text = `# comment\nplugin_cache_dir = "/tmp"\ncredentials "registry.example.com" {\n token = "h1"\n}\n`;
|
|
50
|
+
expect(terraformCredential("registry.example.com", { env: { TF_CLI_CONFIG_FILE: cli }, readFile: files({ [cli]: text }) })).toEqual({ token: "h1", from: cli });
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("lets the variable win over both files", () => {
|
|
54
|
+
const cli = "/etc/tf/cli.tfrc";
|
|
55
|
+
const readFile = files({
|
|
56
|
+
[cli]: `credentials "registry.example.com" { token = "h1" }`,
|
|
57
|
+
[tfrc]: JSON.stringify({ credentials: { "registry.example.com": { token: "f1" } } }),
|
|
58
|
+
});
|
|
59
|
+
expect(terraformToken("registry.example.com", { env: { HOME: home, TF_CLI_CONFIG_FILE: cli, TF_TOKEN_registry_example_com: "e1" }, platform: "linux", readFile })).toBe("e1");
|
|
60
|
+
expect(terraformToken("registry.example.com", { env: { HOME: home, TF_CLI_CONFIG_FILE: cli }, platform: "linux", readFile })).toBe("h1");
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("finds nothing without a variable, a home or a config file", () => {
|
|
64
|
+
expect(terraformCredential("registry.example.com", { env: {}, readFile: files({}) })).toBeUndefined();
|
|
65
|
+
expect(credentialsFilePath({ env: {}, platform: "linux" })).toBeUndefined();
|
|
66
|
+
expect(credentialsFilePath({ env: { APPDATA: "C:\\Users\\u\\AppData\\Roaming" }, platform: "win32" })).toContain("terraform.d");
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it("skips a file that is neither JSON nor holds a block for the host", () => {
|
|
70
|
+
expect(terraformToken("registry.example.com", { env: { HOME: home }, platform: "linux", readFile: files({ [tfrc]: "{not json" }) })).toBeUndefined();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("builds the Authorization header, or none", () => {
|
|
74
|
+
expect(authorizationFor("app.terraform.io", { env: { TF_TOKEN_app_terraform_io: "t1" }, readFile: files({}) })).toEqual({ Authorization: "Bearer t1" });
|
|
75
|
+
expect(authorizationFor("app.terraform.io", { env: {}, readFile: files({}) })).toEqual({});
|
|
76
|
+
});
|
|
77
|
+
});
|