@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/cli/mcp/server.ts
CHANGED
|
@@ -16,6 +16,10 @@ import { createSnapshotTool, createDiffTool } from "./lifecycle-tools";
|
|
|
16
16
|
import { setGateOrigin } from "../../lifecycle/gate-origin";
|
|
17
17
|
import { createOpListTool, createOpRunTool, createOpStatusTool, createOpApproveTool, createOpReportTool } from "./op-tools";
|
|
18
18
|
import { buildResourcesList, handleResourcesRead } from "./resource-handlers";
|
|
19
|
+
import { createLedgerTools } from "./ledger-tools";
|
|
20
|
+
import { createReportTools } from "./report-tools";
|
|
21
|
+
import { activeProductMcpHook, productMcpContext, productToolsServed, type ProductMcpHook } from "./product-tools";
|
|
22
|
+
import { MUTATING_CORE_TOOLS, READ_ONLY_CORE_TOOLS, ReadOnlyRegistrationError, servesContributedTool } from "./read-only";
|
|
19
23
|
import { CHANT_VERSION } from "../version";
|
|
20
24
|
|
|
21
25
|
/**
|
|
@@ -94,6 +98,22 @@ export function namespacedResourceUri(lexicon: string, uri: string): string {
|
|
|
94
98
|
return `${base}${uri}`;
|
|
95
99
|
}
|
|
96
100
|
|
|
101
|
+
/** What a read-only server says about itself in `initialize`'s `instructions` (chant#4543). */
|
|
102
|
+
export const READ_ONLY_INSTRUCTIONS =
|
|
103
|
+
"This chant server is read-only: it serves the ledger, the workspace graph, runs, gates and snapshots, and no tool here runs an Op, resolves a gate or writes anything.";
|
|
104
|
+
|
|
105
|
+
/** The `lint` a read-only server serves: the same tool with no `fix` (chant#4543). */
|
|
106
|
+
const readOnlyLintTool: ToolDefinition = {
|
|
107
|
+
...lintTool,
|
|
108
|
+
description: `${lintTool.description}. This server is read-only: it reports issues and fixes none.`,
|
|
109
|
+
inputSchema: { ...lintTool.inputSchema, properties: { path: lintTool.inputSchema.properties.path } },
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
async function handleReadOnlyLint(params: Record<string, unknown>): Promise<unknown> {
|
|
113
|
+
if (params.fix === true) throw new Error("fix is not available on a read-only server: run chant lint --fix at a shell");
|
|
114
|
+
return handleLint({ ...params, fix: false });
|
|
115
|
+
}
|
|
116
|
+
|
|
97
117
|
/**
|
|
98
118
|
* MCP Server implementation
|
|
99
119
|
*/
|
|
@@ -105,6 +125,8 @@ export class McpServer {
|
|
|
105
125
|
private instructions: string | undefined;
|
|
106
126
|
/** The `clientInfo` the client gave on `initialize`, for a request that carries none in `_meta` (#2707). */
|
|
107
127
|
private clientInfo: McpClientInfo | undefined;
|
|
128
|
+
/** `chant serve mcp --read-only` (chant#4543): only tools that change nothing are registered. */
|
|
129
|
+
readonly readOnly: boolean;
|
|
108
130
|
|
|
109
131
|
/**
|
|
110
132
|
* `options.instructions` is sent as the `initialize` result's
|
|
@@ -115,37 +137,62 @@ export class McpServer {
|
|
|
115
137
|
* `options.workspace` names the directory the server serves (#2707). When
|
|
116
138
|
* it is at or inside a declared workspace, the workspace read-contract and
|
|
117
139
|
* record-write tools are served too.
|
|
140
|
+
*
|
|
141
|
+
* `options.readOnly` (`chant serve mcp --read-only`, chant#4543) serves
|
|
142
|
+
* only the tools that change nothing: the core tools in
|
|
143
|
+
* `READ_ONLY_CORE_TOOLS` (./read-only.ts), `lint` without `fix`, the
|
|
144
|
+
* workspace reads without the writes, and the plugin tools that declare
|
|
145
|
+
* `readOnly: true`.
|
|
146
|
+
*
|
|
147
|
+
* `options.product` (chant#4555) is a CI product's tool hook
|
|
148
|
+
* (./product-tools.ts): its tools are registered as `<product>:<name>`,
|
|
149
|
+
* under the same read-only rule as a plugin's, and a read-only server
|
|
150
|
+
* refuses to start with one named as a write. With a hook and no
|
|
151
|
+
* `readOnly`, the server is read-only unless the hook says otherwise.
|
|
118
152
|
*/
|
|
119
|
-
constructor(plugins?: LexiconPlugin[], options: { instructions?: string; workspace?: WorkspaceToolsOptions } = {}) {
|
|
153
|
+
constructor(plugins?: LexiconPlugin[], options: { instructions?: string; workspace?: WorkspaceToolsOptions; readOnly?: boolean; product?: ProductMcpHook } = {}) {
|
|
120
154
|
this.plugins = plugins ?? [];
|
|
121
|
-
|
|
155
|
+
const product = options.product;
|
|
156
|
+
this.readOnly = options.readOnly ?? (product ? product.readOnly !== false : false);
|
|
157
|
+
const said = [options.instructions, product?.instructions].filter((s): s is string => s !== undefined);
|
|
158
|
+
this.instructions = this.readOnly
|
|
159
|
+
? [...said, READ_ONLY_INSTRUCTIONS].join("\n\n")
|
|
160
|
+
: said.length > 0 ? said.join("\n\n") : undefined;
|
|
161
|
+
const cwd = options.workspace?.cwd ?? process.cwd();
|
|
122
162
|
// Register core tools
|
|
123
|
-
this.
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
127
|
-
this.
|
|
128
|
-
this.
|
|
129
|
-
this.
|
|
163
|
+
this.registerCoreTool(buildTool, handleBuild);
|
|
164
|
+
if (this.readOnly) this.registerCoreTool(readOnlyLintTool, handleReadOnlyLint);
|
|
165
|
+
else this.registerCoreTool(lintTool, handleLint);
|
|
166
|
+
this.registerCoreTool(importTool, handleImport);
|
|
167
|
+
this.registerCoreTool(explainTool, handleExplain);
|
|
168
|
+
this.registerCoreTool(scaffoldTool, createScaffoldHandler(plugins ?? []));
|
|
169
|
+
this.registerCoreTool(searchTool, createSearchHandler(plugins ?? []));
|
|
170
|
+
this.registerCoreTool(compositesTool, createCompositesHandler(plugins ?? []));
|
|
130
171
|
// The capability catalog (#4375), the read contract's capabilities document.
|
|
131
|
-
this.
|
|
172
|
+
this.registerCoreTool(capabilitiesTool, createCapabilitiesHandler(cwd, options.workspace?.chantCommand));
|
|
132
173
|
|
|
133
174
|
// Register state tools
|
|
134
175
|
const snapshot = createSnapshotTool(plugins ?? []);
|
|
135
|
-
this.
|
|
176
|
+
this.registerCoreTool(snapshot.definition, snapshot.handler);
|
|
136
177
|
|
|
137
178
|
const diff = createDiffTool(plugins ?? []);
|
|
138
|
-
this.
|
|
179
|
+
this.registerCoreTool(diff.definition, diff.handler);
|
|
139
180
|
|
|
140
181
|
// Register Op tools
|
|
141
182
|
for (const factory of [createOpListTool, createOpRunTool, createOpStatusTool, createOpApproveTool, createOpReportTool]) {
|
|
142
183
|
const t = factory();
|
|
143
|
-
this.
|
|
184
|
+
this.registerCoreTool(t.definition, t.handler);
|
|
144
185
|
}
|
|
145
186
|
|
|
187
|
+
// The ledger read contract and chant query (chant#4543), in both modes.
|
|
188
|
+
for (const t of createLedgerTools({ cwd, chantCommand: options.workspace?.chantCommand })) this.registerCoreTool(t.definition, t.handler);
|
|
189
|
+
|
|
190
|
+
// The report store (chant#4555), in both modes: the product hook's store, else ci.reportUrl.
|
|
191
|
+
for (const t of createReportTools({ cwd, ...(product?.reportUrl ? { reportUrl: product.reportUrl } : {}) })) this.registerCoreTool(t.definition, t.handler);
|
|
192
|
+
|
|
146
193
|
// Workspace reads and record writes (#2707), inside a declared workspace only.
|
|
147
194
|
if (options.workspace && findWorkspaceRoot(options.workspace.cwd)) {
|
|
148
|
-
for (const t of createWorkspaceTools(options.workspace)) this.
|
|
195
|
+
for (const t of createWorkspaceTools(options.workspace)) this.registerCoreTool(t.definition, t.handler);
|
|
149
196
|
}
|
|
150
197
|
|
|
151
198
|
// Register plugin contributions
|
|
@@ -155,6 +202,13 @@ export class McpServer {
|
|
|
155
202
|
this.registerPluginResources(plugin);
|
|
156
203
|
}
|
|
157
204
|
}
|
|
205
|
+
|
|
206
|
+
// A CI product's tools (chant#4555), read-only by default as chant#4543 rules for contributed tools.
|
|
207
|
+
if (product) {
|
|
208
|
+
for (const tool of productToolsServed(product, productMcpContext(product, cwd, this.readOnly))) {
|
|
209
|
+
this.registerTool({ name: namespacedToolName(product.product, tool.name), description: tool.description, inputSchema: tool.inputSchema }, tool.handler);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
158
212
|
}
|
|
159
213
|
|
|
160
214
|
/**
|
|
@@ -171,6 +225,8 @@ export class McpServer {
|
|
|
171
225
|
private registerPluginTools(plugin: LexiconPlugin): void {
|
|
172
226
|
const tools = plugin.mcpTools?.() ?? [];
|
|
173
227
|
for (const tool of tools) {
|
|
228
|
+
// A read-only server serves a plugin tool only when it says it changes nothing (chant#4543).
|
|
229
|
+
if (!servesContributedTool(tool, this.readOnly)) continue;
|
|
174
230
|
this.registerTool(
|
|
175
231
|
{
|
|
176
232
|
name: namespacedToolName(plugin.name, tool.name),
|
|
@@ -202,6 +258,19 @@ export class McpServer {
|
|
|
202
258
|
}
|
|
203
259
|
}
|
|
204
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Register a core tool. On a read-only server a mutating core tool is
|
|
263
|
+
* left out, and a core tool on neither list of ./read-only.ts is refused
|
|
264
|
+
* with an error, so a new tool cannot reach a read-only server unsorted.
|
|
265
|
+
*/
|
|
266
|
+
private registerCoreTool(definition: ToolDefinition, handler: ToolHandler): void {
|
|
267
|
+
if (this.readOnly && !READ_ONLY_CORE_TOOLS.has(definition.name)) {
|
|
268
|
+
if (MUTATING_CORE_TOOLS.has(definition.name)) return;
|
|
269
|
+
throw new ReadOnlyRegistrationError(definition.name);
|
|
270
|
+
}
|
|
271
|
+
this.registerTool(definition, handler);
|
|
272
|
+
}
|
|
273
|
+
|
|
205
274
|
/**
|
|
206
275
|
* Register a tool with its handler
|
|
207
276
|
*/
|
|
@@ -390,7 +459,7 @@ export class McpServer {
|
|
|
390
459
|
/**
|
|
391
460
|
* Start MCP server, loading plugins from the project
|
|
392
461
|
*/
|
|
393
|
-
export async function startMcpServer(): Promise<void> {
|
|
462
|
+
export async function startMcpServer(options: { readOnly?: boolean } = {}): Promise<void> {
|
|
394
463
|
let plugins: LexiconPlugin[] = [];
|
|
395
464
|
try {
|
|
396
465
|
const { resolveProjectLexicons, loadPlugins } = await import("../plugins");
|
|
@@ -400,6 +469,11 @@ export async function startMcpServer(): Promise<void> {
|
|
|
400
469
|
// Start without plugins if resolution fails
|
|
401
470
|
}
|
|
402
471
|
|
|
403
|
-
const
|
|
472
|
+
const product = activeProductMcpHook();
|
|
473
|
+
const server = new McpServer(plugins, {
|
|
474
|
+
workspace: { cwd: process.cwd() },
|
|
475
|
+
...(options.readOnly ? { readOnly: true } : {}),
|
|
476
|
+
...(product ? { product } : {}),
|
|
477
|
+
});
|
|
404
478
|
server.start();
|
|
405
479
|
}
|
package/src/cli/mcp-config.ts
CHANGED
|
@@ -49,13 +49,18 @@ export function detectPackageManager(dir?: string): "bun" | "npm" {
|
|
|
49
49
|
return "npm";
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
|
|
52
|
+
/**
|
|
53
|
+
* The MCP registration chant writes: one stdio server named `chant`. With
|
|
54
|
+
* `readOnly` (`chant init --mcp-read-only`, chant#4543) it registers
|
|
55
|
+
* `chant serve mcp --read-only`, which serves only the tools that change
|
|
56
|
+
* nothing.
|
|
57
|
+
*/
|
|
58
|
+
export function generateMcpConfig(pm: "bun" | "npm", options: { readOnly?: boolean } = {}): string {
|
|
54
59
|
const config = {
|
|
55
60
|
mcpServers: {
|
|
56
61
|
chant: {
|
|
57
62
|
command: pm === "bun" ? "bunx" : "npx",
|
|
58
|
-
args: ["chant", "serve", "mcp"],
|
|
63
|
+
args: ["chant", "serve", "mcp", ...(options.readOnly ? ["--read-only"] : [])],
|
|
59
64
|
},
|
|
60
65
|
},
|
|
61
66
|
};
|
package/src/cli/parse-args.ts
CHANGED
|
@@ -74,6 +74,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
74
74
|
"--unsigned",
|
|
75
75
|
"--in-place",
|
|
76
76
|
"--require-runner-start",
|
|
77
|
+
"--require-clouds",
|
|
77
78
|
"--no-push",
|
|
78
79
|
"--list",
|
|
79
80
|
"--no-require-review",
|
|
@@ -84,6 +85,8 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
84
85
|
"--fail-on-drift",
|
|
85
86
|
"--durable-requests",
|
|
86
87
|
"--skip-mcp",
|
|
88
|
+
"--read-only",
|
|
89
|
+
"--mcp-read-only",
|
|
87
90
|
"--current",
|
|
88
91
|
"--uncommitted",
|
|
89
92
|
"--allow-code",
|
|
@@ -94,6 +97,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
94
97
|
"--generated",
|
|
95
98
|
"--decide",
|
|
96
99
|
"--record-plans",
|
|
100
|
+
"--waves-outcome",
|
|
97
101
|
"--loopback",
|
|
98
102
|
"--artifacts",
|
|
99
103
|
"--push",
|
|
@@ -139,6 +143,8 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
139
143
|
reportFile: undefined,
|
|
140
144
|
skill: undefined,
|
|
141
145
|
skipMcp: undefined,
|
|
146
|
+
readOnly: undefined,
|
|
147
|
+
mcpReadOnly: undefined,
|
|
142
148
|
src: undefined,
|
|
143
149
|
env: undefined,
|
|
144
150
|
};
|
|
@@ -325,6 +331,10 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
325
331
|
result.skill = args[++i];
|
|
326
332
|
} else if (arg === "--skip-mcp") {
|
|
327
333
|
result.skipMcp = true;
|
|
334
|
+
} else if (arg === "--read-only") {
|
|
335
|
+
result.readOnly = true;
|
|
336
|
+
} else if (arg === "--mcp-read-only") {
|
|
337
|
+
result.mcpReadOnly = true;
|
|
328
338
|
} else if (arg === "--src") {
|
|
329
339
|
result.src = args[++i];
|
|
330
340
|
} else if (arg === "--env") {
|
|
@@ -379,6 +389,14 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
379
389
|
result.digestFile = args[++i];
|
|
380
390
|
} else if (arg === "--seed-outputs") {
|
|
381
391
|
(result.seedOutputs ??= []).push(args[++i]);
|
|
392
|
+
} else if (arg === "--keep") {
|
|
393
|
+
// `chant lock --keep --pr <n>` (#4588): keep the locks the pull request's plan took, as `/<product> lock` asks.
|
|
394
|
+
result.keepLocks = true;
|
|
395
|
+
} else if (arg === "--runs" || arg === "--plans" || arg === "--wave-outputs") {
|
|
396
|
+
// `chant components plan-wave|apply-wave` (#4588): the op-waves runs and plans files, and the outputs the waves hand on.
|
|
397
|
+
const value = args[++i];
|
|
398
|
+
if (value === undefined || value.startsWith("-")) throw new Error(`${arg} needs a file`);
|
|
399
|
+
result[({ "--runs": "runsFile", "--plans": "plansFile", "--wave-outputs": "waveOutputs" } as const)[arg]] = value;
|
|
382
400
|
} else if (arg === "--detail") {
|
|
383
401
|
result.detail = Number(args[++i]);
|
|
384
402
|
} else if (arg === "--lens") {
|
|
@@ -434,6 +452,8 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
434
452
|
result.decide = true;
|
|
435
453
|
} else if (arg === "--record-plans") {
|
|
436
454
|
result.recordPlans = true;
|
|
455
|
+
} else if (arg === "--waves-outcome") {
|
|
456
|
+
result.wavesOutcome = true;
|
|
437
457
|
} else if (arg === "--group") {
|
|
438
458
|
const raw = args[++i];
|
|
439
459
|
if (!raw || raw.startsWith("-")) throw new Error("--group needs a job group's name: --group <name>");
|
|
@@ -445,8 +465,9 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
445
465
|
result.share = share;
|
|
446
466
|
} else if (arg === "--target") {
|
|
447
467
|
// `chant components fan-out|run --components --target <component>:<address>` (#4300), repeatable.
|
|
468
|
+
// `chant components pr-plan --target <address>` (#4620) also takes a bare address; fan-out and run refuse one.
|
|
448
469
|
const raw = args[++i];
|
|
449
|
-
if (!raw || raw.startsWith("-")
|
|
470
|
+
if (!raw || raw.startsWith("-")) throw new Error("--target needs an address: --target <component>:<address>, or on pr-plan --target <address>");
|
|
450
471
|
(result.targets ??= []).push(raw);
|
|
451
472
|
} else if (arg === "--canary") {
|
|
452
473
|
const raw = args[++i];
|
|
@@ -466,6 +487,9 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
466
487
|
} else if (arg === "--forge") {
|
|
467
488
|
result.forge = args[++i];
|
|
468
489
|
if (!result.forge || result.forge.startsWith("-")) throw new Error("--forge needs a forge: --forge github|gitlab|forgejo");
|
|
490
|
+
} else if (arg === "--require-clouds") {
|
|
491
|
+
// `chant ci forge-check --require-clouds` (#4608).
|
|
492
|
+
result.requireClouds = true;
|
|
469
493
|
} else if (arg === "--require-review") {
|
|
470
494
|
result.requireReview = true;
|
|
471
495
|
} else if (arg === "--list") {
|
|
@@ -475,6 +499,10 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
475
499
|
// `chant lock --stage plan|apply|lock` (#4293): how the lock was taken.
|
|
476
500
|
result.lockStage = args[++i];
|
|
477
501
|
if (!result.lockStage || result.lockStage.startsWith("-")) throw new Error("--stage needs plan, apply or lock: --stage <stage>");
|
|
502
|
+
} else if (arg === "--alive") {
|
|
503
|
+
// `chant lock --alive <run>` (#4552): print whether a run holding rows or the repo lock tag still runs.
|
|
504
|
+
result.aliveRun = args[++i];
|
|
505
|
+
if (!result.aliveRun || result.aliveRun.startsWith("-")) throw new Error("--alive needs a run id: --alive <run>");
|
|
478
506
|
} else if (arg === "--from-report") {
|
|
479
507
|
// `chant lock --from-report <pr-plan.json>` (#4293): lock the components a pull-request report lists.
|
|
480
508
|
result.fromReport = args[++i];
|
|
@@ -482,7 +510,7 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
482
510
|
} else if (arg === "--report-url") {
|
|
483
511
|
// `chant components pr-plan|pr-apply --report-url <url>` (#4007).
|
|
484
512
|
const url = args[++i];
|
|
485
|
-
if (!url || url.startsWith("-")) throw new Error("--report-url needs a URL: --report-url s3://<bucket>/<prefix> or file://<directory>");
|
|
513
|
+
if (!url || url.startsWith("-")) throw new Error("--report-url needs a URL: --report-url s3://<bucket>/<prefix>, gs://<bucket>/<prefix>, az://<account>/<container>/<prefix> or file://<directory>");
|
|
486
514
|
result.reportUrl = url;
|
|
487
515
|
} else if (arg === "--result") {
|
|
488
516
|
// `chant components pr-post --result <result>` (#4295): the plan job's own result, which fails the status when it failed.
|
|
@@ -509,12 +537,20 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
509
537
|
} else if (arg === "--before-merge") {
|
|
510
538
|
// `chant components pr-apply --before-merge` (#4301, ws-106): apply an open pull request's plan from its head.
|
|
511
539
|
result.beforeMerge = true;
|
|
540
|
+
} else if (arg === "--requires") {
|
|
541
|
+
// `chant components pr-apply --before-merge --requires approved,checks` (#4607): the checks a product's `apply.requires` names.
|
|
542
|
+
const value = args[++i];
|
|
543
|
+
if (value === undefined || value.startsWith("-")) throw new Error("--requires needs a list of checks: --requires approved,mergeable,undiverged,checks");
|
|
544
|
+
result.requires = value.split(",").map((v) => v.trim()).filter(Boolean);
|
|
512
545
|
} else if (arg === "--apply-before-merge") {
|
|
513
546
|
// `chant build --pr-loop --apply-before-merge` and `chant ci run apply --apply-before-merge` (#4301): the job that applies before merge.
|
|
514
547
|
result.applyBeforeMerge = true;
|
|
515
548
|
} else if (arg === "--apply-on-merge") {
|
|
516
549
|
// `chant build --pr-loop --apply-on-merge` and `chant ci serve --apply-on-merge` (#4168): opt into applying on merge.
|
|
517
550
|
result.applyOnMerge = true;
|
|
551
|
+
} else if (arg === "--preview-comment") {
|
|
552
|
+
// `chant build --pr-loop --preview-comment` (#4620): the job that answers `/<product> <plan word>` with a preview.
|
|
553
|
+
result.previewComment = true;
|
|
518
554
|
} else if (arg === "--pr-env") {
|
|
519
555
|
// `chant build --pr-loop --pr-env` (#4298): add the pull request environment's jobs.
|
|
520
556
|
result.prEnv = true;
|
|
@@ -1005,6 +1041,10 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
1005
1041
|
// #4526 — `chant lifecycle diff <env> --index <ref>`.
|
|
1006
1042
|
result.index = args[++i];
|
|
1007
1043
|
if (!result.index || result.index.startsWith("-")) throw new Error("--index needs a value: --index <file> for workspace adopt-lineage, --index <scope key>[@<version>] for search and lifecycle diff");
|
|
1044
|
+
} else if (arg === "--adopt") {
|
|
1045
|
+
// #4537 — `chant run --components <name> --env <env> --adopt <file>`: adopt the adoption file's resources into the component's stack.
|
|
1046
|
+
result.adopt = args[++i];
|
|
1047
|
+
if (!result.adopt || result.adopt.startsWith("-")) throw new Error("--adopt needs an adoption file: --adopt <file>");
|
|
1008
1048
|
} else if (arg === "--adopt-out") {
|
|
1009
1049
|
// #4536 — `chant import --index <ref> --adopt-out <file>`: write the adoption file (`adopt: v1`) for what was imported.
|
|
1010
1050
|
result.adoptOut = args[++i];
|
package/src/cli/registry.ts
CHANGED
|
@@ -131,6 +131,10 @@ export interface ParsedArgs {
|
|
|
131
131
|
* before anything parsed it, so there was no way to decline the write.
|
|
132
132
|
*/
|
|
133
133
|
skipMcp?: boolean;
|
|
134
|
+
/** `chant serve mcp --read-only` (chant#4543): serve only the tools that change nothing. */
|
|
135
|
+
readOnly?: boolean;
|
|
136
|
+
/** `chant init --mcp-read-only` (chant#4543): write `.mcp.json` registering `chant serve mcp --read-only`. */
|
|
137
|
+
mcpReadOnly?: boolean;
|
|
134
138
|
/** `chant import --type <ResourceType>` selector */
|
|
135
139
|
selectType?: string;
|
|
136
140
|
/** `chant import --name <name>` selector */
|
|
@@ -170,6 +174,8 @@ export interface ParsedArgs {
|
|
|
170
174
|
/** `chant workspace adopt-lineage --index <file>` (#2551): a cached hash index. `chant search --index <ref>` (#4525) and `chant lifecycle diff <env> --index <ref>` (#4526): an index version. */
|
|
171
175
|
/** `chant import --index <ref> --adopt-out <file>` (#4536): where to write the adoption file. */
|
|
172
176
|
adoptOut?: string;
|
|
177
|
+
/** `chant run --components <name> --env <env> --adopt <file>` (#4537): the adoption file whose resources the component's deploy step adopts into its stack. */
|
|
178
|
+
adopt?: string;
|
|
173
179
|
index?: string;
|
|
174
180
|
/** `chant workspace versions --available` (#2551): list each git template's version tags. */
|
|
175
181
|
available?: boolean;
|
|
@@ -312,6 +318,8 @@ export interface ParsedArgs {
|
|
|
312
318
|
decide?: boolean;
|
|
313
319
|
/** `chant run wave --record-plans` (#3684) — plan every wave at a pull request's head and record the digests for a `pr-review` gate. */
|
|
314
320
|
recordPlans?: boolean;
|
|
321
|
+
/** `chant run wave --waves-outcome` (#4617) — print how every wave job's outcome file adds up: the outcome a control dispatch carries. */
|
|
322
|
+
wavesOutcome?: boolean;
|
|
315
323
|
/** `chant run wave --share <i>` (#3679) — apply share `i` of a decided wide wave. */
|
|
316
324
|
share?: number;
|
|
317
325
|
/** `chant run wave --group <name>` (#3914) — apply one job group's runs of a decided wave. */
|
|
@@ -320,6 +328,9 @@ export interface ParsedArgs {
|
|
|
320
328
|
* `chant components fan-out --target <component>:<address>` and `chant run
|
|
321
329
|
* --components --target ...` (#4300), repeatable: the addresses a
|
|
322
330
|
* component's steps narrow to. Raw values; `parseComponentTargets` groups them.
|
|
331
|
+
* `chant components pr-plan --target <address>` (#4620) takes a bare
|
|
332
|
+
* address too, for every member the pull request plans
|
|
333
|
+
* (`prPlanTargets`).
|
|
323
334
|
*/
|
|
324
335
|
targets?: string[];
|
|
325
336
|
/** `chant components fan-out --canary <component>` (#3049), repeatable — components that form wave 1. */
|
|
@@ -336,6 +347,8 @@ export interface ParsedArgs {
|
|
|
336
347
|
lockStage?: string;
|
|
337
348
|
/** `chant lock --from-report <file>` (#4293): lock the components a `pr-plan.json` lists. */
|
|
338
349
|
fromReport?: string;
|
|
350
|
+
/** `chant lock --alive <run>` (#4552): print `alive` or `dead` for a run that holds rows or the repo lock tag. */
|
|
351
|
+
aliveRun?: string;
|
|
339
352
|
/** Every `--pr <n>`, in order: `chant release compose` (#4168 4.3) takes several. */
|
|
340
353
|
prs?: number[];
|
|
341
354
|
/** `chant release cut --channel <tag>` (#4168 4.3): the tag a publish of the release moves in place of `latest`. */
|
|
@@ -346,6 +359,8 @@ export interface ParsedArgs {
|
|
|
346
359
|
* read from the CI job's environment.
|
|
347
360
|
*/
|
|
348
361
|
forge?: string;
|
|
362
|
+
/** `chant ci forge-check --require-clouds` (#4608): fail a cloud left unchecked for want of credentials too. */
|
|
363
|
+
requireClouds?: boolean;
|
|
349
364
|
/**
|
|
350
365
|
* `chant components pr-apply --require-review` (#3183) — count an approval
|
|
351
366
|
* only when its approver has a standing approving review on the pull
|
|
@@ -388,12 +403,20 @@ export interface ParsedArgs {
|
|
|
388
403
|
* mergeable, undiverged and green.
|
|
389
404
|
*/
|
|
390
405
|
beforeMerge?: boolean;
|
|
406
|
+
/**
|
|
407
|
+
* `chant components pr-apply --before-merge --requires <list>` (#4607): the
|
|
408
|
+
* requires checks to ask, a comma list of approved, mergeable, undiverged
|
|
409
|
+
* and checks. Absent: all four. A check left out passes as "not required".
|
|
410
|
+
*/
|
|
411
|
+
requires?: string[];
|
|
391
412
|
/**
|
|
392
413
|
* `chant build --pr-loop --apply-before-merge` and `chant ci run apply
|
|
393
414
|
* --apply-before-merge` (#4301): the pipeline's apply job applies an open
|
|
394
415
|
* pull request before it merges, and a merge records.
|
|
395
416
|
*/
|
|
396
417
|
applyBeforeMerge?: boolean;
|
|
418
|
+
/** `chant build --pr-loop --preview-comment` (#4620): a job answers `/<product> <plan word>` by previewing the pull request's head again. */
|
|
419
|
+
previewComment?: boolean;
|
|
397
420
|
/** `chant build --pr-loop --pr-build` (#4088) — build and lint before pr-plan and pr-apply. */
|
|
398
421
|
prBuild?: boolean;
|
|
399
422
|
/** `chant ci serve --build-command <line>` (#4169) — the line that builds a commit a `ci/build/<sha>` tag asks for, in a worktree of it. */
|
|
@@ -759,6 +782,18 @@ export interface ParsedArgs {
|
|
|
759
782
|
digestFile?: string;
|
|
760
783
|
/** `chant run --components <name> --seed-outputs <file>` (repeatable) — before the run, load each JSON outputs file (as written by `--dump-outputs`) and seed cross-component/cross-stack resolution with it, so a `stackOutput()`/`@<dep>.publish.*` reference to a component that ran in an earlier job resolves. */
|
|
761
784
|
seedOutputs?: string[];
|
|
785
|
+
/**
|
|
786
|
+
* `chant lock --keep --pr <n>` (#4588): take again, at stage `lock`, every
|
|
787
|
+
* target lock the pull request holds now, so the locks its plan took stay
|
|
788
|
+
* until it closes or `chant unlock`. What `/<product> lock` runs.
|
|
789
|
+
*/
|
|
790
|
+
keepLocks?: boolean;
|
|
791
|
+
/** `chant components plan-wave|apply-wave --runs <file>` (#4588): the runs file `chant run wave` writes, `{runs}`. */
|
|
792
|
+
runsFile?: string;
|
|
793
|
+
/** `chant components plan-wave|apply-wave --plans <file>` (#4588): the wave's plans file, `{plans}`. */
|
|
794
|
+
plansFile?: string;
|
|
795
|
+
/** `chant components plan-wave|apply-wave --wave-outputs <file>` (#4588): the outputs earlier waves' components left; apply-wave adds its own. */
|
|
796
|
+
waveOutputs?: string;
|
|
762
797
|
/** `chant build --fold` (#1022/#1023, epic #1019) — opt-in: fold source modules statically instead of importing/running them; folds resource constructors and composite factory calls, falling back to run per-file for anything the folder can't represent (a cross-file-only reference, a re-export, `export default`, …). Also settable project-wide via `chant.config.ts`'s `build.fold: true`; the flag always wins when set. Default (flag omitted): the existing run path, unchanged. */
|
|
763
798
|
fold?: boolean;
|
|
764
799
|
/** `chant build --sandbox` (#1045 Phase 2) — opt-in: run-fallback source files (or every file, without `--fold`) execute together, isolated, in one sandboxed child process instead of in-process. Also settable project-wide via `chant.config.ts`'s `build.sandbox: true`; the flag always wins when set. Default (flag omitted): in-process execution, unchanged. */
|
|
@@ -1,70 +1,127 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* AWS Signature Version 4, chant's one AWS signer (behold#1029, #4554).
|
|
3
3
|
*
|
|
4
|
-
* Signed by hand with node:crypto rather than through the AWS SDK, so
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Signed by hand with node:crypto rather than through the AWS SDK, so no
|
|
5
|
+
* SDK client is built (no client to hold a mutating command, no default
|
|
6
|
+
* provider chain) and no dependency is added. The cloud lister's Cloud
|
|
7
|
+
* Control calls, the object-store S3 client (../object-store/s3.ts), the
|
|
8
|
+
* snapshot store's S3 medium (../lifecycle/snapshot-store-s3.ts), the
|
|
9
|
+
* terraform lexicon's state client and the aws lexicon's Cloud Control and
|
|
10
|
+
* CloudFormation reads (#4583) all sign through {@link signV4}, and S3's
|
|
11
|
+
* presigned links through {@link presignV4}.
|
|
8
12
|
*/
|
|
9
13
|
|
|
10
14
|
import { createHash, createHmac } from "node:crypto";
|
|
11
15
|
import type { AwsStaticCredentials } from "./credentials";
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
/** The SHA-256 of an empty body, hex. */
|
|
18
|
+
export const EMPTY_PAYLOAD_SHA256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
19
|
+
|
|
20
|
+
/** A body's SHA-256, hex. */
|
|
21
|
+
export function sha256Hex(data: string | Uint8Array): string {
|
|
22
|
+
return typeof data === "string" ? createHash("sha256").update(data, "utf8").digest("hex") : createHash("sha256").update(data).digest("hex");
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
function hmac(key: Buffer | string, data: string): Buffer {
|
|
18
26
|
return createHmac("sha256", key).update(data, "utf8").digest();
|
|
19
27
|
}
|
|
20
28
|
|
|
29
|
+
/** RFC 3986 percent-encoding, as SigV4 signs a query and S3 a key. */
|
|
30
|
+
export function encodeRfc3986(value: string): string {
|
|
31
|
+
return encodeURIComponent(value).replace(/[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
21
34
|
/** `20261026T120000Z` and `20261026` for a date. */
|
|
22
35
|
export function amzDates(now: Date): { amzDate: string; dateStamp: string } {
|
|
23
36
|
const iso = now.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, "");
|
|
24
37
|
return { amzDate: iso, dateStamp: iso.slice(0, 8) };
|
|
25
38
|
}
|
|
26
39
|
|
|
40
|
+
/** The key a day's signatures for one region and service are made with. */
|
|
41
|
+
function signingKey(secret: string, dateStamp: string, region: string, service: string): Buffer {
|
|
42
|
+
return hmac(hmac(hmac(hmac(`AWS4${secret}`, dateStamp), region), service), "aws4_request");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** A URL's query in canonical order, each name and value RFC 3986 encoded. */
|
|
46
|
+
function canonicalQuery(url: URL): string {
|
|
47
|
+
const pairs: Array<[string, string]> = [];
|
|
48
|
+
url.searchParams.forEach((v, k) => pairs.push([encodeRfc3986(k), encodeRfc3986(v)]));
|
|
49
|
+
pairs.sort((a, b) => (a[0] === b[0] ? (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0) : a[0] < b[0] ? -1 : 1));
|
|
50
|
+
return pairs.map(([k, v]) => `${k}=${v}`).join("&");
|
|
51
|
+
}
|
|
52
|
+
|
|
27
53
|
/**
|
|
28
54
|
* The headers to send, `Authorization` included. `headers` must not already
|
|
29
|
-
* hold `host` or `x-amz-date`; they are added here
|
|
55
|
+
* hold `host` or `x-amz-date`; they are added here, and `host` is kept in
|
|
56
|
+
* the answer unless `omitHost`. The URL's pathname is the canonical URI as
|
|
57
|
+
* it stands, so a caller encodes a key once (S3's rule) before it signs.
|
|
58
|
+
* `payloadHash` stands in for hashing `body`; `contentSha256` sends it as
|
|
59
|
+
* `x-amz-content-sha256`, which S3 requires. A header named (any case) in
|
|
60
|
+
* `unsignedHeaders` is sent but left out of the signature, for headers a
|
|
61
|
+
* proxy or agent may rewrite in transit, such as `user-agent` (#4583).
|
|
30
62
|
*/
|
|
31
63
|
export function signV4(input: {
|
|
32
64
|
method: string;
|
|
33
65
|
url: string;
|
|
34
66
|
headers: Record<string, string>;
|
|
35
|
-
body: string;
|
|
67
|
+
body: string | Uint8Array;
|
|
36
68
|
region: string;
|
|
37
69
|
service: string;
|
|
38
70
|
credentials: AwsStaticCredentials;
|
|
39
71
|
now: Date;
|
|
72
|
+
payloadHash?: string;
|
|
73
|
+
contentSha256?: boolean;
|
|
74
|
+
omitHost?: boolean;
|
|
75
|
+
unsignedHeaders?: Iterable<string>;
|
|
40
76
|
}): Record<string, string> {
|
|
41
77
|
const url = new URL(input.url);
|
|
42
78
|
const { amzDate, dateStamp } = amzDates(input.now);
|
|
79
|
+
const payloadHash = input.payloadHash ?? (input.body.length === 0 ? EMPTY_PAYLOAD_SHA256 : sha256Hex(input.body));
|
|
43
80
|
const headers: Record<string, string> = {};
|
|
44
|
-
for (const [k, v] of Object.entries(input.headers)) headers[k.toLowerCase()] = v.trim();
|
|
81
|
+
for (const [k, v] of Object.entries(input.headers)) headers[k.toLowerCase()] = v.trim().replace(/\s+/g, " ");
|
|
45
82
|
headers.host = url.host;
|
|
46
83
|
headers["x-amz-date"] = amzDate;
|
|
84
|
+
if (input.contentSha256) headers["x-amz-content-sha256"] = payloadHash;
|
|
47
85
|
if (input.credentials.sessionToken) headers["x-amz-security-token"] = input.credentials.sessionToken;
|
|
48
|
-
const payloadHash = sha256Hex(input.body);
|
|
49
86
|
|
|
50
|
-
const
|
|
87
|
+
const unsigned = new Set([...(input.unsignedHeaders ?? [])].map((n) => n.toLowerCase()));
|
|
88
|
+
const names = Object.keys(headers).filter((n) => !unsigned.has(n)).sort();
|
|
51
89
|
const canonicalHeaders = names.map((n) => `${n}:${headers[n]}\n`).join("");
|
|
52
90
|
const signedHeaders = names.join(";");
|
|
53
|
-
const
|
|
54
|
-
.map(([k, v]) => [encodeURIComponent(k), encodeURIComponent(v)])
|
|
55
|
-
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
|
|
56
|
-
.map(([k, v]) => `${k}=${v}`)
|
|
57
|
-
.join("&");
|
|
58
|
-
const canonicalRequest = [input.method, url.pathname || "/", canonicalQuery, canonicalHeaders, signedHeaders, payloadHash].join("\n");
|
|
91
|
+
const canonicalRequest = [input.method.toUpperCase(), url.pathname || "/", canonicalQuery(url), canonicalHeaders, signedHeaders, payloadHash].join("\n");
|
|
59
92
|
|
|
60
93
|
const scope = `${dateStamp}/${input.region}/${input.service}/aws4_request`;
|
|
61
94
|
const stringToSign = ["AWS4-HMAC-SHA256", amzDate, scope, sha256Hex(canonicalRequest)].join("\n");
|
|
62
|
-
const
|
|
63
|
-
const kRegion = hmac(kDate, input.region);
|
|
64
|
-
const kService = hmac(kRegion, input.service);
|
|
65
|
-
const kSigning = hmac(kService, "aws4_request");
|
|
66
|
-
const signature = createHmac("sha256", kSigning).update(stringToSign, "utf8").digest("hex");
|
|
95
|
+
const signature = createHmac("sha256", signingKey(input.credentials.secretAccessKey, dateStamp, input.region, input.service)).update(stringToSign, "utf8").digest("hex");
|
|
67
96
|
|
|
68
97
|
headers.authorization = `AWS4-HMAC-SHA256 Credential=${input.credentials.accessKeyId}/${scope}, SignedHeaders=${signedHeaders}, Signature=${signature}`;
|
|
98
|
+
if (input.omitHost) delete headers.host;
|
|
69
99
|
return headers;
|
|
70
100
|
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A presigned GET (Signature Version 4 in the query string, #4554): whoever
|
|
104
|
+
* holds the URL reads that one object for `seconds`. Only `host` is signed,
|
|
105
|
+
* and the payload is UNSIGNED-PAYLOAD. A query the URL already carries is
|
|
106
|
+
* signed with the rest (#4572): an RDS IAM token is the presigned
|
|
107
|
+
* `?Action=connect&DBUser=<user>` of the database's host and port.
|
|
108
|
+
*/
|
|
109
|
+
export function presignV4(input: { url: string; region: string; service: string; credentials: AwsStaticCredentials; seconds: number; now: Date }): string {
|
|
110
|
+
const url = new URL(input.url);
|
|
111
|
+
const { amzDate, dateStamp } = amzDates(input.now);
|
|
112
|
+
const scope = `${dateStamp}/${input.region}/${input.service}/aws4_request`;
|
|
113
|
+
const params: Record<string, string> = {
|
|
114
|
+
...Object.fromEntries(url.searchParams),
|
|
115
|
+
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
|
|
116
|
+
"X-Amz-Credential": `${input.credentials.accessKeyId}/${scope}`,
|
|
117
|
+
"X-Amz-Date": amzDate,
|
|
118
|
+
"X-Amz-Expires": String(input.seconds),
|
|
119
|
+
...(input.credentials.sessionToken ? { "X-Amz-Security-Token": input.credentials.sessionToken } : {}),
|
|
120
|
+
"X-Amz-SignedHeaders": "host",
|
|
121
|
+
};
|
|
122
|
+
const query = Object.keys(params).sort().map((k) => `${encodeRfc3986(k)}=${encodeRfc3986(params[k]!)}`).join("&");
|
|
123
|
+
const canonical = ["GET", url.pathname, query, `host:${url.host}`, "", "host", "UNSIGNED-PAYLOAD"].join("\n");
|
|
124
|
+
const toSign = ["AWS4-HMAC-SHA256", amzDate, scope, sha256Hex(canonical)].join("\n");
|
|
125
|
+
const signature = createHmac("sha256", signingKey(input.credentials.secretAccessKey, dateStamp, input.region, input.service)).update(toSign).digest("hex");
|
|
126
|
+
return `${url.origin}${url.pathname}?${query}&X-Amz-Signature=${signature}`;
|
|
127
|
+
}
|