@intentius/chant 0.124.52 → 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/audit/discover.d.ts.map +1 -1
- package/dist/audit/discover.js +3 -1
- package/dist/behaviour.d.ts +1 -1
- package/dist/behaviour.d.ts.map +1 -1
- 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 +65 -0
- package/dist/capabilities/templates.d.ts.map +1 -0
- package/dist/capabilities/templates.js +192 -0
- package/dist/capabilities/templates.json +145 -0
- package/dist/change-set-graph.d.ts +35 -3
- package/dist/change-set-graph.d.ts.map +1 -1
- package/dist/change-set-graph.js +60 -9
- package/dist/change-set.d.ts +65 -7
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +22 -12
- 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 +89 -9
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +91 -16
- 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/import-index.d.ts +52 -0
- package/dist/cli/commands/import-index.d.ts.map +1 -0
- package/dist/cli/commands/import-index.js +226 -0
- 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/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +4 -2
- 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/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +11 -2
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +20 -3
- 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/graph.d.ts.map +1 -1
- package/dist/cli/handlers/graph.js +22 -4
- package/dist/cli/handlers/index-cloud.d.ts +14 -0
- package/dist/cli/handlers/index-cloud.d.ts.map +1 -0
- package/dist/cli/handlers/index-cloud.js +22 -0
- package/dist/cli/handlers/index-diff.d.ts +18 -0
- package/dist/cli/handlers/index-diff.d.ts.map +1 -0
- package/dist/cli/handlers/index-diff.js +142 -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 +29 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-drift.js +69 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +188 -28
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +64 -5
- package/dist/cli/handlers/misc.d.ts +9 -0
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/misc.js +77 -0
- 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 +668 -207
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +110 -17
- package/dist/cli/handlers/query.d.ts.map +1 -1
- package/dist/cli/handlers/query.js +28 -4
- 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/scenario.d.ts.map +1 -1
- package/dist/cli/handlers/scenario.js +8 -7
- package/dist/cli/handlers/search.d.ts +34 -4
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/handlers/search.js +216 -36
- 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 +179 -14
- 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/lifecycle-tools.d.ts.map +1 -1
- package/dist/cli/mcp/lifecycle-tools.js +3 -2
- 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/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.js +4 -3
- 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/workspace-tools.js +1 -1
- 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 +112 -5
- package/dist/cli/registry.d.ts +54 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cloud-lister/aws.d.ts +35 -0
- package/dist/cloud-lister/aws.d.ts.map +1 -0
- package/dist/cloud-lister/aws.js +203 -0
- package/dist/cloud-lister/azure.d.ts +34 -0
- package/dist/cloud-lister/azure.d.ts.map +1 -0
- package/dist/cloud-lister/azure.js +129 -0
- package/dist/cloud-lister/common.d.ts +40 -0
- package/dist/cloud-lister/common.d.ts.map +1 -0
- package/dist/cloud-lister/common.js +83 -0
- package/dist/cloud-lister/credentials.d.ts +50 -0
- package/dist/cloud-lister/credentials.d.ts.map +1 -0
- package/dist/cloud-lister/credentials.js +86 -0
- package/dist/cloud-lister/fakes.d.ts +27 -0
- package/dist/cloud-lister/fakes.d.ts.map +1 -0
- package/dist/cloud-lister/fakes.js +50 -0
- package/dist/cloud-lister/gcp.d.ts +42 -0
- package/dist/cloud-lister/gcp.d.ts.map +1 -0
- package/dist/cloud-lister/gcp.js +143 -0
- package/dist/cloud-lister/guard.d.ts +49 -0
- package/dist/cloud-lister/guard.d.ts.map +1 -0
- package/dist/cloud-lister/guard.js +103 -0
- package/dist/cloud-lister/ids.d.ts +23 -0
- package/dist/cloud-lister/ids.d.ts.map +1 -0
- package/dist/cloud-lister/ids.js +42 -0
- package/dist/cloud-lister/index.d.ts +67 -0
- package/dist/cloud-lister/index.d.ts.map +1 -0
- package/dist/cloud-lister/index.js +102 -0
- package/dist/cloud-lister/kubernetes.d.ts +64 -0
- package/dist/cloud-lister/kubernetes.d.ts.map +1 -0
- package/dist/cloud-lister/kubernetes.js +276 -0
- package/dist/cloud-lister/markers.d.ts +31 -0
- package/dist/cloud-lister/markers.d.ts.map +1 -0
- package/dist/cloud-lister/markers.js +73 -0
- package/dist/cloud-lister/mask.d.ts +31 -0
- package/dist/cloud-lister/mask.d.ts.map +1 -0
- package/dist/cloud-lister/mask.js +74 -0
- package/dist/cloud-lister/sigv4.d.ts +64 -0
- package/dist/cloud-lister/sigv4.d.ts.map +1 -0
- package/dist/cloud-lister/sigv4.js +104 -0
- package/dist/cloud-lister/transport.d.ts +55 -0
- package/dist/cloud-lister/transport.d.ts.map +1 -0
- package/dist/cloud-lister/transport.js +86 -0
- package/dist/cloud-lister/types.d.ts +121 -0
- package/dist/cloud-lister/types.d.ts.map +1 -0
- package/dist/cloud-lister/types.js +24 -0
- 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-plugin-loader.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.js +6 -0
- package/dist/components/capability-plugin.d.ts +9 -0
- package/dist/components/capability-plugin.d.ts.map +1 -1
- package/dist/components/capability.d.ts +337 -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 +34 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +67 -15
- package/dist/components/declared-reads.d.ts +38 -0
- package/dist/components/declared-reads.d.ts.map +1 -0
- package/dist/components/declared-reads.js +131 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +4 -0
- package/dist/components/driver.d.ts +54 -4
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +90 -7
- package/dist/components/fan-out-run.d.ts +35 -1
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +138 -30
- package/dist/components/fan-out-support.d.ts +6 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out-support.js +4 -1
- package/dist/components/fan-out.d.ts +28 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/groups.d.ts +229 -0
- package/dist/components/groups.d.ts.map +1 -0
- package/dist/components/groups.js +777 -0
- package/dist/components/index.d.ts +6 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/plan-shape-conformance.d.ts +48 -0
- package/dist/components/plan-shape-conformance.d.ts.map +1 -0
- package/dist/components/plan-shape-conformance.js +122 -0
- 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 +104 -4
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +290 -41
- 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-rounds.d.ts +9 -0
- package/dist/components/promote-rounds.d.ts.map +1 -1
- package/dist/components/promote-rounds.js +23 -2
- package/dist/components/promote.d.ts +23 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +39 -6
- 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-gate.d.ts +23 -1
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +97 -33
- 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/run-groups.d.ts +58 -0
- package/dist/components/run-groups.d.ts.map +1 -0
- package/dist/components/run-groups.js +78 -0
- package/dist/components/starter-plugin.d.ts +1 -0
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/starter-plugin.js +6 -1
- package/dist/components/verbs/index.d.ts +1 -0
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/index.js +1 -0
- package/dist/components/verbs/member-outputs.d.ts +187 -0
- package/dist/components/verbs/member-outputs.d.ts.map +1 -0
- package/dist/components/verbs/member-outputs.js +218 -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/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -0
- 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/deep-observation.d.ts +1 -13
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/deep-observation.js +5 -22
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.js +25 -1
- package/dist/drift-record.d.ts +542 -0
- package/dist/drift-record.d.ts.map +1 -0
- package/dist/drift-record.js +886 -0
- package/dist/engine-facts.d.ts +144 -0
- package/dist/engine-facts.d.ts.map +1 -0
- package/dist/engine-facts.js +13 -0
- 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/graph-ir.d.ts +153 -2
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-ir.js +224 -6
- package/dist/graph-refs.d.ts +145 -0
- package/dist/graph-refs.d.ts.map +1 -1
- package/dist/graph-refs.js +305 -0
- package/dist/graph-schema/fixtures/adopt.json +15 -0
- package/dist/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/dist/graph-schema/fixtures/index.json +68 -0
- package/dist/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/dist/graph-schema/fixtures.d.ts +23 -0
- package/dist/graph-schema/fixtures.d.ts.map +1 -0
- package/dist/graph-schema/fixtures.js +246 -0
- package/dist/graph-schema/generate.d.ts +15 -0
- package/dist/graph-schema/generate.d.ts.map +1 -0
- package/dist/graph-schema/generate.js +267 -0
- package/dist/graph-schema/graph.schema.json +1387 -0
- package/dist/health.schema.json +2 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/instance-nodes.d.ts +159 -0
- package/dist/instance-nodes.d.ts.map +1 -0
- package/dist/instance-nodes.js +231 -0
- package/dist/lexicon.d.ts +178 -6
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.d.ts +80 -0
- package/dist/lifecycle/adoption-file.d.ts.map +1 -0
- package/dist/lifecycle/adoption-file.js +122 -0
- package/dist/lifecycle/cloud-index.d.ts +186 -0
- package/dist/lifecycle/cloud-index.d.ts.map +1 -0
- package/dist/lifecycle/cloud-index.js +617 -0
- package/dist/lifecycle/derive-edges.d.ts +59 -0
- package/dist/lifecycle/derive-edges.d.ts.map +1 -0
- package/dist/lifecycle/derive-edges.js +126 -0
- 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/git.d.ts +10 -9
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +7 -1
- package/dist/lifecycle/identity-match.d.ts +148 -0
- package/dist/lifecycle/identity-match.d.ts.map +1 -0
- package/dist/lifecycle/identity-match.js +152 -0
- package/dist/lifecycle/index-diff.d.ts +264 -0
- package/dist/lifecycle/index-diff.d.ts.map +1 -0
- package/dist/lifecycle/index-diff.js +326 -0
- package/dist/lifecycle/index-document.d.ts +130 -0
- package/dist/lifecycle/index-document.d.ts.map +1 -0
- package/dist/lifecycle/index-document.js +188 -0
- package/dist/lifecycle/index-drift.d.ts +121 -0
- package/dist/lifecycle/index-drift.d.ts.map +1 -0
- package/dist/lifecycle/index-drift.js +178 -0
- package/dist/lifecycle/index-import.d.ts +171 -0
- package/dist/lifecycle/index-import.d.ts.map +1 -0
- package/dist/lifecycle/index-import.js +512 -0
- package/dist/lifecycle/index-join.d.ts +129 -0
- package/dist/lifecycle/index-join.d.ts.map +1 -0
- package/dist/lifecycle/index-join.js +248 -0
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +4 -0
- 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/observation-baseline.d.ts +61 -21
- package/dist/lifecycle/observation-baseline.d.ts.map +1 -1
- package/dist/lifecycle/observation-baseline.js +144 -19
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/observe.js +6 -1
- package/dist/lifecycle/query.d.ts +94 -6
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +182 -9
- 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/replay.d.ts +10 -3
- package/dist/lifecycle/replay.d.ts.map +1 -1
- package/dist/lifecycle/replay.js +10 -6
- 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/scenario.d.ts +4 -3
- package/dist/lifecycle/scenario.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store-fake.d.ts +9 -0
- package/dist/lifecycle/snapshot-store-fake.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-fake.js +21 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts +135 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-s3.js +219 -0
- package/dist/lifecycle/snapshot-store.d.ts +170 -0
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store.js +831 -0
- package/dist/lifecycle/snapshot.d.ts +11 -0
- package/dist/lifecycle/snapshot.d.ts.map +1 -1
- package/dist/lifecycle/snapshot.js +18 -5
- package/dist/lifecycle/target-lock.d.ts +15 -0
- package/dist/lifecycle/target-lock.d.ts.map +1 -1
- package/dist/lifecycle/target-lock.js +25 -10
- package/dist/lifecycle/type-listing.d.ts +148 -0
- package/dist/lifecycle/type-listing.d.ts.map +1 -0
- package/dist/lifecycle/type-listing.js +166 -0
- package/dist/lint/component-checks.d.ts +15 -1
- package/dist/lint/component-checks.d.ts.map +1 -1
- package/dist/lint/component-checks.js +1 -0
- package/dist/lint/presets/relaxed.json +2 -1
- package/dist/lint/presets/strict.json +2 -1
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.js +13 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.js +8 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts +33 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.js +123 -0
- package/dist/lint/rules/comp/index.d.ts +2 -1
- package/dist/lint/rules/comp/index.d.ts.map +1 -1
- package/dist/lint/rules/comp/index.js +4 -1
- 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/observation.d.ts +19 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +18 -1
- package/dist/op/activities/activity-contracts.d.ts +1 -1
- package/dist/op/activities/activity-contracts.js +1 -1
- package/dist/op/activities/change-set.d.ts +6 -4
- package/dist/op/activities/change-set.d.ts.map +1 -1
- package/dist/op/activities/change-set.js +4 -2
- 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/activity-failure.d.ts +27 -0
- package/dist/op/activity-failure.d.ts.map +1 -1
- package/dist/op/activity-failure.js +31 -0
- package/dist/op/gate.d.ts +29 -1
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +59 -23
- package/dist/op/generate-pipeline.d.ts.map +1 -1
- package/dist/op/generate-pipeline.js +7 -1
- package/dist/op/index.d.ts +14 -2
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +8 -2
- package/dist/op/local-executor.d.ts +5 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +22 -8
- 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 +205 -12
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +330 -41
- 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/pulumi-urn.d.ts +101 -0
- package/dist/pulumi-urn.d.ts.map +1 -0
- package/dist/pulumi-urn.js +131 -0
- package/dist/release-floors.d.ts +23 -0
- package/dist/release-floors.d.ts.map +1 -0
- package/dist/release-floors.js +22 -0
- 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/sensitive-key.d.ts +23 -0
- package/dist/sensitive-key.d.ts.map +1 -0
- package/dist/sensitive-key.js +31 -0
- package/dist/sorted-json.d.ts +10 -0
- package/dist/sorted-json.d.ts.map +1 -0
- package/dist/sorted-json.js +14 -0
- package/dist/terraform/credentials.d.ts +59 -0
- package/dist/terraform/credentials.d.ts.map +1 -0
- package/dist/terraform/credentials.js +149 -0
- package/dist/utils.d.ts +1 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -9
- package/dist/wave-runtime.d.ts +1 -1
- package/dist/wave-runtime.js +2 -2
- package/dist/wave-runtime.mjs +390 -285
- package/dist/workspace/adoption-report.d.ts +53 -0
- package/dist/workspace/adoption-report.d.ts.map +1 -0
- package/dist/workspace/adoption-report.js +76 -0
- package/dist/workspace/capabilities-contract.d.ts +7 -0
- package/dist/workspace/capabilities-contract.d.ts.map +1 -1
- package/dist/workspace/capabilities-contract.js +2 -1
- package/dist/workspace/capabilities.schema.json +98 -0
- package/dist/workspace/change-set.schema.json +42 -3
- 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-cloud-identity.d.ts +13 -1
- package/dist/workspace/ci-cloud-identity.d.ts.map +1 -1
- package/dist/workspace/ci-cloud-identity.js +30 -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/compose-graph.d.ts +10 -1
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/compose-graph.js +6 -1
- package/dist/workspace/conformance/index.d.ts +1 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/index.js +6 -1
- 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 +81 -0
- package/dist/workspace/drift-cli.d.ts.map +1 -0
- package/dist/workspace/drift-cli.js +322 -0
- package/dist/workspace/drift.schema.json +672 -0
- 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/graph-cli.d.ts +2 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/graph-cli.js +3 -0
- package/dist/workspace/graph.schema.json +72 -0
- 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/init.d.ts +5 -1
- package/dist/workspace/init.d.ts.map +1 -1
- package/dist/workspace/init.js +55 -9
- 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/nested-graph.d.ts.map +1 -1
- package/dist/workspace/nested-graph.js +2 -0
- package/dist/workspace/pr-report.schema.json +125 -5
- package/dist/workspace/promote-waves.d.ts +112 -0
- package/dist/workspace/promote-waves.d.ts.map +1 -0
- package/dist/workspace/promote-waves.js +290 -0
- package/dist/workspace/promote.d.ts +85 -3
- package/dist/workspace/promote.d.ts.map +1 -1
- package/dist/workspace/promote.js +349 -62
- package/dist/workspace/reason-codes.d.ts +12 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +14 -0
- 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/search-contract.d.ts +3 -3
- package/dist/workspace/search-contract.d.ts.map +1 -1
- package/dist/workspace/search-contract.js +2 -0
- package/dist/workspace/search.schema.json +103 -5
- 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 +34 -1
- package/src/__fixtures__/drift-record/README.md +58 -0
- package/src/__fixtures__/drift-record/choudoufu-cone.ndjson +4 -0
- package/src/__fixtures__/drift-record/choudoufu-resource.ndjson +3 -0
- package/src/__fixtures__/drift-record/component-status-ledger.json +65 -0
- package/src/__fixtures__/drift-record/component-status.json +91 -0
- package/src/__fixtures__/drift-record/deep-diff.json +259 -0
- package/src/__fixtures__/drift-record/lifecycle-diff-live.json +825 -0
- package/src/__fixtures__/drift-record/live-diff.json +125 -0
- 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/audit/discover.e2e.test.ts +14 -0
- package/src/audit/discover.ts +3 -1
- package/src/behaviour.ts +1 -1
- 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.json +145 -0
- package/src/capabilities/templates.test.ts +211 -0
- package/src/capabilities/templates.ts +203 -0
- package/src/cdk/advise.test.ts +1 -1
- package/src/change-set-bundle.test.ts +82 -0
- package/src/change-set-graph.ts +80 -9
- package/src/change-set.test.ts +24 -0
- package/src/change-set.ts +76 -14
- 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 +29 -2
- package/src/ci-identity.ts +134 -26
- 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/import-index.test.ts +117 -0
- package/src/cli/commands/import-index.ts +265 -0
- package/src/cli/commands/init.ts +3 -1
- package/src/cli/commands/lint.ts +4 -2
- 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/components.test.ts +9 -0
- package/src/cli/handlers/components.ts +12 -2
- package/src/cli/handlers/fan-out.test.ts +10 -10
- package/src/cli/handlers/fan-out.ts +22 -3
- package/src/cli/handlers/gate-pending.ts +46 -0
- package/src/cli/handlers/graph.test.ts +42 -0
- package/src/cli/handlers/graph.ts +26 -4
- package/src/cli/handlers/index-cloud.ts +32 -0
- package/src/cli/handlers/index-diff.test.ts +68 -0
- package/src/cli/handlers/index-diff.ts +146 -0
- package/src/cli/handlers/init.ts +1 -0
- package/src/cli/handlers/ledger-root-member.test.ts +161 -0
- package/src/cli/handlers/ledger.ts +1 -1
- package/src/cli/handlers/lifecycle-drift.ts +73 -0
- package/src/cli/handlers/lifecycle.test.ts +33 -11
- package/src/cli/handlers/lifecycle.ts +205 -30
- package/src/cli/handlers/lock.test.ts +29 -2
- package/src/cli/handlers/lock.ts +66 -6
- package/src/cli/handlers/misc.ts +73 -0
- 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 +42 -2
- 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 +669 -207
- package/src/cli/handlers/promote.test.ts +69 -5
- package/src/cli/handlers/promote.ts +103 -8
- package/src/cli/handlers/query.ts +27 -4
- package/src/cli/handlers/release.ts +2 -0
- package/src/cli/handlers/run-components-exit.test.ts +7 -7
- package/src/cli/handlers/run-declared-reads-cli.test.ts +187 -0
- package/src/cli/handlers/run-groups-cli.test.ts +229 -0
- 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/scenario.test.ts +13 -0
- package/src/cli/handlers/scenario.ts +8 -7
- package/src/cli/handlers/search-index.test.ts +255 -0
- package/src/cli/handlers/search-json.test.ts +1 -1
- package/src/cli/handlers/search-ownership.test.ts +194 -0
- package/src/cli/handlers/search.ts +271 -38
- package/src/cli/handlers/serve.ts +10 -1
- package/src/cli/main.test.ts +7 -0
- package/src/cli/main.ts +182 -14
- package/src/cli/mcp/ledger-tools.ts +126 -0
- package/src/cli/mcp/lifecycle-tools.ts +3 -2
- 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/resource-handlers.ts +4 -3
- package/src/cli/mcp/server.test.ts +5 -4
- package/src/cli/mcp/server.ts +90 -16
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/cli/mcp-config.ts +8 -3
- package/src/cli/parse-args.ts +82 -4
- package/src/cli/registry.ts +54 -1
- package/src/cloud-lister/aws.test.ts +202 -0
- package/src/cloud-lister/aws.ts +226 -0
- package/src/cloud-lister/azure.test.ts +132 -0
- package/src/cloud-lister/azure.ts +142 -0
- package/src/cloud-lister/common.ts +115 -0
- package/src/cloud-lister/credentials.ts +110 -0
- package/src/cloud-lister/fakes.ts +66 -0
- package/src/cloud-lister/gcp.test.ts +121 -0
- package/src/cloud-lister/gcp.ts +159 -0
- package/src/cloud-lister/guard.test.ts +198 -0
- package/src/cloud-lister/guard.ts +111 -0
- package/src/cloud-lister/ids.ts +54 -0
- package/src/cloud-lister/index.ts +134 -0
- package/src/cloud-lister/kubernetes.test.ts +160 -0
- package/src/cloud-lister/kubernetes.ts +284 -0
- package/src/cloud-lister/markers.ts +74 -0
- package/src/cloud-lister/mask.ts +77 -0
- package/src/cloud-lister/shape.test.ts +81 -0
- package/src/cloud-lister/sigv4.ts +127 -0
- package/src/cloud-lister/transport.ts +118 -0
- package/src/cloud-lister/types.ts +135 -0
- 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-plugin-loader.ts +4 -0
- package/src/components/capability-plugin.ts +10 -0
- package/src/components/capability.ts +359 -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 +92 -15
- package/src/components/declared-reads.test.ts +103 -0
- package/src/components/declared-reads.ts +134 -0
- package/src/components/deploy-units.ts +4 -0
- package/src/components/driver.test.ts +3 -3
- package/src/components/driver.ts +127 -9
- package/src/components/fan-out-run.ts +163 -33
- package/src/components/fan-out-support.ts +10 -1
- package/src/components/fan-out.ts +30 -0
- package/src/components/groups.test.ts +320 -0
- package/src/components/groups.ts +895 -0
- package/src/components/index.ts +42 -0
- package/src/components/plan-shape-conformance.ts +130 -0
- package/src/components/pr-comment-preview.test.ts +54 -0
- package/src/components/pr-env-ledger.test.ts +9 -0
- package/src/components/pr-env-ledger.ts +43 -0
- package/src/components/pr-env-ports.ts +29 -4
- package/src/components/pr-env-run-bundle.test.ts +10 -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 +516 -3
- package/src/components/pr-run.ts +350 -44
- 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-rounds.ts +25 -2
- package/src/components/promote.ts +64 -5
- package/src/components/registry.test.ts +1 -1
- package/src/components/release-compile.ts +87 -1
- package/src/components/release-gate.ts +115 -30
- package/src/components/release-groups.test.ts +362 -0
- 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/run-groups.ts +113 -0
- package/src/components/starter-plugin.ts +6 -0
- package/src/components/verbs/index.ts +1 -0
- package/src/components/verbs/member-outputs.test.ts +205 -0
- package/src/components/verbs/member-outputs.ts +308 -0
- package/src/components/wave-plan-policy.test.ts +19 -0
- package/src/components/wave-plan.ts +78 -4
- package/src/config.ts +44 -0
- 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/deep-observation.ts +5 -23
- package/src/discovery/sandbox/bundle.ts +25 -1
- package/src/drift-record.test.ts +596 -0
- package/src/drift-record.ts +1206 -0
- package/src/engine-facts.guard.test.ts +111 -0
- package/src/engine-facts.test.ts +177 -0
- package/src/engine-facts.ts +153 -0
- 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 +1 -0
- package/src/graph-ir-live.test.ts +92 -0
- package/src/graph-ir.ts +317 -7
- package/src/graph-refs.ts +416 -0
- package/src/graph-schema/fixtures/adopt.json +15 -0
- package/src/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/src/graph-schema/fixtures/index.json +68 -0
- package/src/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/src/graph-schema/fixtures.ts +267 -0
- package/src/graph-schema/generate.ts +263 -0
- package/src/graph-schema/graph-schema.test.ts +153 -0
- package/src/graph-schema/graph.schema.json +1387 -0
- package/src/health.schema.json +2 -1
- package/src/identity.ts +2 -0
- package/src/index.ts +4 -0
- package/src/instance-nodes.ts +288 -0
- package/src/lexicon.ts +171 -6
- package/src/lifecycle/__fixtures__/index-diff/20261026T120000Z-aaaaaaaaaaaa.json +149 -0
- package/src/lifecycle/__fixtures__/index-diff/20261026T130000Z-bbbbbbbbbbbb.json +127 -0
- package/src/lifecycle/adoption-file.test.ts +100 -0
- package/src/lifecycle/adoption-file.ts +153 -0
- package/src/lifecycle/cloud-index.test.ts +516 -0
- package/src/lifecycle/cloud-index.ts +735 -0
- package/src/lifecycle/control-entries-ledger.test.ts +70 -0
- package/src/lifecycle/derive-edges.test.ts +193 -0
- package/src/lifecycle/derive-edges.ts +182 -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/git.ts +10 -4
- package/src/lifecycle/identity-match.test.ts +308 -0
- package/src/lifecycle/identity-match.ts +276 -0
- package/src/lifecycle/index-diff.test.ts +198 -0
- package/src/lifecycle/index-diff.ts +475 -0
- package/src/lifecycle/index-document.test.ts +64 -0
- package/src/lifecycle/index-document.ts +298 -0
- package/src/lifecycle/index-drift.test.ts +191 -0
- package/src/lifecycle/index-drift.ts +304 -0
- package/src/lifecycle/index-import.test.ts +269 -0
- package/src/lifecycle/index-import.ts +654 -0
- package/src/lifecycle/index-join.test.ts +250 -0
- package/src/lifecycle/index-join.ts +304 -0
- package/src/lifecycle/index-store-load-bearing.test.ts +187 -0
- package/src/lifecycle/index.ts +4 -0
- 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/member-ledger.test.ts +25 -7
- package/src/lifecycle/observation-baseline.test.ts +72 -1
- package/src/lifecycle/observation-baseline.ts +190 -27
- package/src/lifecycle/observe.ts +6 -1
- package/src/lifecycle/publish-target-context.test.ts +108 -0
- package/src/lifecycle/query.test.ts +68 -1
- package/src/lifecycle/query.ts +208 -13
- 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/replay.test.ts +9 -5
- package/src/lifecycle/replay.ts +9 -5
- 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/scenario.ts +4 -3
- package/src/lifecycle/snapshot-store-fake.ts +29 -0
- package/src/lifecycle/snapshot-store-s3.ts +280 -0
- package/src/lifecycle/snapshot-store.test.ts +385 -0
- package/src/lifecycle/snapshot-store.ts +980 -0
- package/src/lifecycle/snapshot.test.ts +13 -0
- package/src/lifecycle/snapshot.ts +23 -6
- package/src/lifecycle/target-lock.ts +24 -9
- package/src/lifecycle/type-listing.test.ts +166 -0
- package/src/lifecycle/type-listing.ts +309 -0
- package/src/lint/component-checks.ts +17 -1
- package/src/lint/config.test.ts +3 -0
- package/src/lint/presets/relaxed.json +2 -1
- package/src/lint/presets/strict.json +2 -1
- package/src/lint/rules/__fixtures__/comp/comp008/fail/dns.component.ts +15 -0
- package/src/lint/rules/__fixtures__/comp/comp008/pass/dns.component.ts +10 -0
- package/src/lint/rules/comp/comp.test.ts +2 -1
- package/src/lint/rules/comp/comp008-applies-signal-only-root.ts +121 -0
- package/src/lint/rules/comp/comp008.test.ts +77 -0
- package/src/lint/rules/comp/index.ts +4 -1
- 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/observation-edges.test.ts +33 -0
- package/src/observation.ts +36 -1
- package/src/op/activities/activity-contracts.ts +1 -1
- package/src/op/activities/change-set.ts +8 -5
- 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/activity-failure.ts +36 -0
- package/src/op/gate.ts +81 -22
- package/src/op/generate-pipeline.ts +7 -1
- package/src/op/index.ts +23 -1
- package/src/op/local-executor.test.ts +80 -0
- package/src/op/local-executor.ts +27 -9
- 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 +9 -2
- package/src/pr-loop-words.test.ts +155 -0
- package/src/pr-loop.test.ts +43 -0
- package/src/pr-loop.ts +478 -50
- 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/pulumi-urn.ts +151 -0
- package/src/release-floors.ts +22 -0
- package/src/run-event.ts +29 -1
- package/src/sensitive-key.ts +34 -0
- 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/adoption-report.test.ts +61 -0
- package/src/workspace/adoption-report.ts +103 -0
- package/src/workspace/capabilities-contract.test.ts +4 -0
- package/src/workspace/capabilities-contract.ts +9 -1
- package/src/workspace/capabilities.schema.json +98 -0
- package/src/workspace/change-set.schema.json +42 -3
- package/src/workspace/chant-migrations/chud-lexicon-exit.ts +4 -1
- package/src/workspace/ci-cloud-identity.ts +31 -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/compose-graph.test.ts +12 -0
- package/src/workspace/compose-graph.ts +12 -1
- package/src/workspace/conformance/conformance.e2e.test.ts +2 -1
- package/src/workspace/conformance/index.ts +6 -1
- 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.test.ts +65 -0
- package/src/workspace/drift-cli.ts +370 -0
- package/src/workspace/drift.schema.json +672 -0
- package/src/workspace/exit-cli.ts +2 -1
- package/src/workspace/graph-cli.ts +5 -0
- package/src/workspace/graph.schema.json +72 -0
- package/src/workspace/import-fetch.ts +4 -2
- package/src/workspace/import-init.ts +4 -2
- package/src/workspace/init.test.ts +38 -1
- package/src/workspace/init.ts +50 -8
- package/src/workspace/intent-gaps.test.ts +18 -2
- package/src/workspace/ledger.schema.json +7 -3
- package/src/workspace/lineage-upgrade-cli.ts +2 -1
- package/src/workspace/nested-graph.ts +1 -0
- package/src/workspace/pr-report.schema.json +125 -5
- package/src/workspace/promote-waves.test.ts +296 -0
- package/src/workspace/promote-waves.ts +340 -0
- package/src/workspace/promote.test.ts +158 -4
- package/src/workspace/promote.ts +400 -58
- package/src/workspace/reason-codes.test.ts +4 -1
- package/src/workspace/reason-codes.ts +14 -0
- 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/search-contract.ts +2 -0
- package/src/workspace/search.schema.json +103 -5
- package/src/workspace/work-cli.ts +8 -2
- package/src/workspace/workspace-run.ts +2 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { describe, expect, test } from "vitest";
|
|
5
|
+
import { assertOpWaveHooks, assertPrLoopHooks } from "../op/op-waves";
|
|
6
|
+
import { checkHookEnv, checkHooksOf, runCheckHooks, writeCiHook } from "./check-hooks";
|
|
7
|
+
|
|
8
|
+
describe("the check moment (#4556)", () => {
|
|
9
|
+
test("ci.hooks takes check hooks, and refuses approve and {plan} there", () => {
|
|
10
|
+
expect(() => assertPrLoopHooks("ci.hooks", { check: [{ name: "tflint", command: ["tflint", "--chdir", "{target}"], perRun: true }] })).not.toThrow();
|
|
11
|
+
expect(() => assertPrLoopHooks("ci.hooks", { check: [{ command: ["lint"], onFailure: "approve" }] })).toThrow(/nothing to approve/);
|
|
12
|
+
expect(() => assertPrLoopHooks("ci.hooks", { check: [{ command: ["lint", "{plan}"], perRun: true }] })).toThrow(/no \{plan\}/);
|
|
13
|
+
expect(() => assertPrLoopHooks("ci.hooks", { check: [{ command: ["lint", "{target}"] }] })).toThrow(/perRun/);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test("an Op waves spec has no check moment", () => {
|
|
17
|
+
expect(() => assertOpWaveHooks("Op waves", { check: [{ command: ["lint"] }] } as never)).toThrow(/check job/);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test("a check hook's environment has no forge token or cloud credentials", () => {
|
|
21
|
+
const env = checkHookEnv({ PATH: "/bin", GITHUB_TOKEN: "t", AWS_SECRET_ACCESS_KEY: "s", ACTIONS_ID_TOKEN_REQUEST_URL: "u", TF_TOKEN_app_terraform_io: "x", TF_TOKEN_registry_example_com: "y", PULUMI_ACCESS_TOKEN: "p" });
|
|
22
|
+
expect(env).toEqual({ PATH: "/bin" });
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("the top level's check hooks run before the member's", () => {
|
|
26
|
+
const declaration = { ci: { hooks: { check: [{ name: "a", command: ["a"] }] } }, members: [{ name: "net", ciHooks: { check: [{ name: "b", command: ["b"] }] } }] } as never;
|
|
27
|
+
expect(checkHooksOf(declaration, "net").map((h) => h.name)).toEqual(["a", "b"]);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test("runs each hook once, or once per target, and reports each call", () => {
|
|
31
|
+
const cwd = mkdtempSync(join(tmpdir(), "chant-check-"));
|
|
32
|
+
const calls: string[][] = [];
|
|
33
|
+
const report = runCheckHooks({
|
|
34
|
+
base: "abc123",
|
|
35
|
+
targets: ["roots/a", "roots/b"],
|
|
36
|
+
cwd,
|
|
37
|
+
read: { base: "abc123", hooks: [{ name: "fmt", command: ["fmt"] }, { name: "tflint", command: ["tflint", "{target}"], perRun: true, targets: ["roots/b"] }] },
|
|
38
|
+
exec: (argv, _cwd, env) => {
|
|
39
|
+
calls.push([...argv, env?.CHANT_HOOK ?? ""]);
|
|
40
|
+
return argv[1] === "roots/b" ? 2 : 0;
|
|
41
|
+
},
|
|
42
|
+
log: () => {},
|
|
43
|
+
});
|
|
44
|
+
expect(calls).toEqual([["fmt", "check"], ["tflint", "roots/b", "check"]]);
|
|
45
|
+
expect(report).toMatchObject({ status: "failed", base: "abc123", hooks: [{ name: "fmt", outcome: "passed", exit: 0 }, { name: "tflint", target: "roots/b", outcome: "failed", exit: 2 }] });
|
|
46
|
+
expect(JSON.parse(readFileSync(join(cwd, ".chant/check/check-hooks.json"), "utf8")).status).toBe("failed");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("no check hook at base is status none", () => {
|
|
50
|
+
const cwd = mkdtempSync(join(tmpdir(), "chant-check-"));
|
|
51
|
+
expect(runCheckHooks({ base: "abc", cwd, read: { base: "abc", hooks: [] }, log: () => {} }).status).toBe("none");
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test("writeCiHook adds a check hook, keeps the file's other keys, and replaces one of the same name", () => {
|
|
55
|
+
const root = mkdtempSync(join(tmpdir(), "chant-check-"));
|
|
56
|
+
writeFileSync(join(root, "chant.workspace.json"), JSON.stringify({ version: 1, members: [{ name: "net", path: "net" }] }, null, 2) + "\n");
|
|
57
|
+
expect(writeCiHook(root, "check", { name: "pre-commit", command: ["pre-commit", "run", "--all-files"] }).replaced).toBe(false);
|
|
58
|
+
expect(writeCiHook(root, "check", { name: "pre-commit", command: ["pre-commit", "run", "-a"] }).replaced).toBe(true);
|
|
59
|
+
writeCiHook(root, "check", { name: "tflint", command: ["tflint"] }, { member: "net" });
|
|
60
|
+
const doc = JSON.parse(readFileSync(join(root, "chant.workspace.json"), "utf8"));
|
|
61
|
+
expect(doc.ci.hooks.check).toEqual([{ name: "pre-commit", command: ["pre-commit", "run", "-a"] }]);
|
|
62
|
+
expect(doc.members[0].ci.hooks.check).toEqual([{ name: "tflint", command: ["tflint"] }]);
|
|
63
|
+
expect(doc.version).toBe(1);
|
|
64
|
+
expect(() => writeCiHook(root, "check", { command: ["x"], onFailure: "approve" })).toThrow(/nothing to approve/);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The check moment (#4556): `ci.hooks.check` in the workspace declaration,
|
|
3
|
+
* run by a product's check job, terragucci's and plywood's alike, with the
|
|
4
|
+
* runner the other moments use (`runStageHooks`). Nothing here knows an
|
|
5
|
+
* engine: a hook is the user's own tool (tflint, checkov, trivy,
|
|
6
|
+
* pre-commit), and the product switches it on with a preset.
|
|
7
|
+
*
|
|
8
|
+
* - The hooks are read from the declaration at the base the check measures
|
|
9
|
+
* the change from, never from the change itself, so a change cannot remove
|
|
10
|
+
* a required check. The top level's run first, then the member's.
|
|
11
|
+
* - A hook runs once for the check, or once per target with `perRun`;
|
|
12
|
+
* `{target}` and `CHANT_TARGET` name it, and `targets` match the targets'
|
|
13
|
+
* names. There is no `{plan}`, and `onFailure` is `fail`.
|
|
14
|
+
* - A hook runs with no forge token, no OIDC request variables and no cloud
|
|
15
|
+
* credentials in its environment ({@link checkHookEnv}).
|
|
16
|
+
*
|
|
17
|
+
* {@link writeCiHook} is the writer a product's `init` calls to add a hook to
|
|
18
|
+
* `ci.hooks`, keeping the declaration's formatting.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { spawnSync } from "node:child_process";
|
|
22
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
23
|
+
import { join, relative, resolve } from "node:path";
|
|
24
|
+
import { CHECK_HOOK_MOMENT, assertCheckHooks, type CiHooks, type OpWaveHook } from "../op/op-waves";
|
|
25
|
+
import { runStageHooks, type OpWaveExec, type OpWaveHookRun } from "../op/stage-hooks";
|
|
26
|
+
import { FORGE_TOKEN_VARS } from "../ci-handover";
|
|
27
|
+
import { OIDC_REQUEST_VARS, TRADED_VARS } from "../ci-identity";
|
|
28
|
+
import { DECLARATION_FILES, readDeclaration, WorkspaceReadError, type Declaration } from "../workspace/declaration";
|
|
29
|
+
import { setProperty, valueAt } from "../workspace/json-edit";
|
|
30
|
+
import { parseJsonText } from "../workspace/jsonc";
|
|
31
|
+
import { memberAtCwd } from "../workspace/security";
|
|
32
|
+
import { locateWorkspace } from "../workspace/which-chant";
|
|
33
|
+
|
|
34
|
+
export { CI_CHECK_HOOK_FLOOR } from "../op/op-waves";
|
|
35
|
+
|
|
36
|
+
/** The check hooks a job runs, and where they were read. */
|
|
37
|
+
export interface CheckHooksRead {
|
|
38
|
+
hooks: OpWaveHook[];
|
|
39
|
+
/** The commit they were read at. */
|
|
40
|
+
base: string;
|
|
41
|
+
/** A line for the log when none run because the base has no declaration, or could not be read. */
|
|
42
|
+
note?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The check hooks `declaration` gives a job run in a member (or at the top, `null`): the top level's, then the member's. */
|
|
46
|
+
export function checkHooksOf(declaration: Pick<Declaration, "ci" | "members">, member: string | null): OpWaveHook[] {
|
|
47
|
+
const own = member === null ? null : (declaration.members.find((m) => m.name === member)?.ciHooks ?? null);
|
|
48
|
+
return [...(declaration.ci?.hooks?.check ?? []), ...(own?.check ?? [])];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Whether the working tree's declaration names any check hook. */
|
|
52
|
+
function checkoutNamesCheckHooks(cwd: string): boolean {
|
|
53
|
+
try {
|
|
54
|
+
const located = locateWorkspace(cwd);
|
|
55
|
+
const d = readDeclaration(located.tree);
|
|
56
|
+
return checkHooksOf(d, memberAtCwd({ declaration: d, rootOnDisk: located.rootOnDisk }, cwd)).length > 0;
|
|
57
|
+
} catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The check hooks a job in `cwd` runs, read from the workspace declaration at
|
|
64
|
+
* `base`. Throws when the declaration at base cannot be read and the working
|
|
65
|
+
* tree's names check hooks, as the pull-request jobs do for their hooks.
|
|
66
|
+
*/
|
|
67
|
+
export function checkHooksAt(cwd: string, base: string): CheckHooksRead {
|
|
68
|
+
let declaration: Declaration;
|
|
69
|
+
let rootOnDisk: string;
|
|
70
|
+
try {
|
|
71
|
+
const located = locateWorkspace(cwd, base);
|
|
72
|
+
declaration = readDeclaration(located.tree);
|
|
73
|
+
rootOnDisk = located.rootOnDisk;
|
|
74
|
+
} catch (err) {
|
|
75
|
+
const missing = err instanceof WorkspaceReadError && (err.code === "declaration-missing" || err.code === "not-a-git-repository");
|
|
76
|
+
const why = err instanceof Error ? err.message : String(err);
|
|
77
|
+
if (checkoutNamesCheckHooks(cwd)) {
|
|
78
|
+
if (missing) return { hooks: [], base, note: `ci.hooks.check: the base ${base.slice(0, 12)} has no workspace declaration, so the check hooks this change declares do not run until it merges` };
|
|
79
|
+
throw new Error(`ci.hooks.check is read from the workspace declaration at ${base.slice(0, 12)}, and it could not be read (${why}), so no check hook can be trusted to run`);
|
|
80
|
+
}
|
|
81
|
+
return missing ? { hooks: [], base } : { hooks: [], base, note: `ci.hooks.check: the declaration at ${base.slice(0, 12)} could not be read (${why}); this checkout names no check hooks, so none run` };
|
|
82
|
+
}
|
|
83
|
+
return { hooks: checkHooksOf(declaration, memberAtCwd({ declaration, rootOnDisk }, cwd)), base };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Variables that hold cloud credentials beyond the ones chant's own trade sets. */
|
|
87
|
+
const CLOUD_CREDENTIAL_VARS = [
|
|
88
|
+
"AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_SECURITY_TOKEN", "AWS_WEB_IDENTITY_TOKEN_FILE", "AWS_ROLE_ARN", "AWS_PROFILE", "AWS_CONTAINER_CREDENTIALS_FULL_URI", "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", "AWS_CONTAINER_AUTHORIZATION_TOKEN",
|
|
89
|
+
"GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CREDENTIALS", "GOOGLE_OAUTH_ACCESS_TOKEN", "CLOUDSDK_AUTH_ACCESS_TOKEN", "CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE",
|
|
90
|
+
"AZURE_CLIENT_SECRET", "AZURE_CLIENT_CERTIFICATE_PATH", "AZURE_FEDERATED_TOKEN_FILE", "AZURE_ACCESS_TOKEN", "ARM_CLIENT_SECRET", "ARM_CLIENT_CERTIFICATE_PATH", "ARM_OIDC_TOKEN", "ARM_OIDC_TOKEN_FILE_PATH", "ARM_ACCESS_KEY", "ARM_SAS_TOKEN",
|
|
91
|
+
"PULUMI_ACCESS_TOKEN", "PULUMI_CONFIG_PASSPHRASE", "TFE_TOKEN", "TF_TOKEN_app_terraform_io",
|
|
92
|
+
];
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The environment a check hook runs with (#4556): `env` without a forge
|
|
96
|
+
* token, the OIDC request variables, or cloud credentials, and without any
|
|
97
|
+
* `TF_TOKEN_<host>` registry token. A check reads the change and nothing
|
|
98
|
+
* else.
|
|
99
|
+
*/
|
|
100
|
+
export function checkHookEnv(env: NodeJS.ProcessEnv = process.env): Record<string, string> {
|
|
101
|
+
const drop = new Set<string>([...FORGE_TOKEN_VARS, ...OIDC_REQUEST_VARS, ...Object.values(TRADED_VARS).flat(), ...CLOUD_CREDENTIAL_VARS]);
|
|
102
|
+
const out: Record<string, string> = {};
|
|
103
|
+
for (const [name, value] of Object.entries(env)) {
|
|
104
|
+
if (value === undefined || drop.has(name) || name.startsWith("TF_TOKEN_")) continue;
|
|
105
|
+
out[name] = value;
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** {@link OpWaveExec} with {@link checkHookEnv} in place of the job's environment. */
|
|
111
|
+
export const checkHookExec: OpWaveExec = (argv, cwd, env) => {
|
|
112
|
+
const result = spawnSync(argv[0]!, argv.slice(1), { cwd, stdio: "inherit", env: { ...checkHookEnv(), ...env } });
|
|
113
|
+
if (result.error) throw result.error;
|
|
114
|
+
return result.status ?? 1;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** One check hook's run, as the check report lists it. */
|
|
118
|
+
export interface CheckHookOutcome {
|
|
119
|
+
name: string;
|
|
120
|
+
/** The target, for a `perRun` hook. */
|
|
121
|
+
target?: string;
|
|
122
|
+
exit: number;
|
|
123
|
+
outcome: "passed" | "failed" | "skipped";
|
|
124
|
+
reason?: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** What the check hooks came to, for the product's check report. */
|
|
128
|
+
export interface CheckHooksReport {
|
|
129
|
+
version: 1;
|
|
130
|
+
moment: typeof CHECK_HOOK_MOMENT;
|
|
131
|
+
/** The commit the hooks were read at. */
|
|
132
|
+
base: string;
|
|
133
|
+
targets: string[];
|
|
134
|
+
/** `none`: no check hook is declared at base. */
|
|
135
|
+
status: "passed" | "failed" | "none";
|
|
136
|
+
hooks: CheckHookOutcome[];
|
|
137
|
+
/** The first hook that failed, and why; the hooks after it did not run. */
|
|
138
|
+
failed?: string;
|
|
139
|
+
note?: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Where {@link runCheckHooks} writes its runs file and report unless told: `.chant/check`. */
|
|
143
|
+
export const CHECK_HOOKS_DIR = ".chant/check";
|
|
144
|
+
|
|
145
|
+
/** The report file under the directory. */
|
|
146
|
+
export const CHECK_HOOKS_REPORT_FILE = "check-hooks.json";
|
|
147
|
+
|
|
148
|
+
export interface RunCheckHooksOptions {
|
|
149
|
+
/** The commit to read `ci.hooks.check` at: the base the change is measured from. */
|
|
150
|
+
base: string;
|
|
151
|
+
/** The targets the change touches (roots, stacks or components), for `perRun` hooks and `targets`. */
|
|
152
|
+
targets?: readonly string[];
|
|
153
|
+
/** Default the working directory. */
|
|
154
|
+
cwd?: string;
|
|
155
|
+
/** Where the runs file and the report go, relative to `cwd`. Default {@link CHECK_HOOKS_DIR}. */
|
|
156
|
+
dir?: string;
|
|
157
|
+
/** The hooks, when the caller read them itself. Default {@link checkHooksAt} `base`. */
|
|
158
|
+
read?: CheckHooksRead;
|
|
159
|
+
/** Added to every hook's environment, after {@link checkHookEnv}. */
|
|
160
|
+
env?: Record<string, string>;
|
|
161
|
+
/** Default {@link checkHookExec}. */
|
|
162
|
+
exec?: OpWaveExec;
|
|
163
|
+
log?: (line: string) => void;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Run the check hooks (#4556): each once, or once per target with
|
|
168
|
+
* `perRun`, in order, stopping at the first that fails. Writes the runs file
|
|
169
|
+
* (`{runs}`, `CHANT_RUNS`) and the report under `dir`, and returns the
|
|
170
|
+
* report.
|
|
171
|
+
*/
|
|
172
|
+
export function runCheckHooks(options: RunCheckHooksOptions): CheckHooksReport {
|
|
173
|
+
const cwd = options.cwd ?? process.cwd();
|
|
174
|
+
const log = options.log ?? ((line: string) => console.error(line));
|
|
175
|
+
const read = options.read ?? checkHooksAt(cwd, options.base);
|
|
176
|
+
if (read.note) log(read.note);
|
|
177
|
+
const targets = [...(options.targets ?? [])];
|
|
178
|
+
const dir = relative(cwd, resolve(cwd, options.dir ?? CHECK_HOOKS_DIR)) || ".";
|
|
179
|
+
mkdirSync(join(cwd, dir), { recursive: true });
|
|
180
|
+
const report = (r: Omit<CheckHooksReport, "version" | "moment" | "base" | "targets">): CheckHooksReport => {
|
|
181
|
+
const doc: CheckHooksReport = { version: 1, moment: CHECK_HOOK_MOMENT, base: read.base, targets, ...r, ...(read.note ? { note: read.note } : {}) };
|
|
182
|
+
writeFileSync(join(cwd, dir, CHECK_HOOKS_REPORT_FILE), JSON.stringify(doc, null, 2) + "\n");
|
|
183
|
+
return doc;
|
|
184
|
+
};
|
|
185
|
+
if (read.hooks.length === 0) return report({ status: "none", hooks: [] });
|
|
186
|
+
assertCheckHooks("ci.hooks at base", read.hooks);
|
|
187
|
+
const op = "check";
|
|
188
|
+
const runs: OpWaveHookRun[] = targets.map((target) => ({ target, op }));
|
|
189
|
+
const runsFile = join(dir, "runs.json");
|
|
190
|
+
writeFileSync(join(cwd, runsFile), JSON.stringify({ version: 1, op, stage: "check", base: read.base, hook: CHECK_HOOK_MOMENT, runs }, null, 2) + "\n");
|
|
191
|
+
const ran = runStageHooks(CHECK_HOOK_MOMENT, read.hooks, {
|
|
192
|
+
name: op,
|
|
193
|
+
op,
|
|
194
|
+
wave: op,
|
|
195
|
+
runs,
|
|
196
|
+
runsFile,
|
|
197
|
+
holdFile: join(dir, "hold.json"),
|
|
198
|
+
env: { CHANT_CHECK: "1", CHANT_HOOKS_BASE: read.base, ...options.env },
|
|
199
|
+
cwd,
|
|
200
|
+
exec: options.exec ?? checkHookExec,
|
|
201
|
+
log,
|
|
202
|
+
});
|
|
203
|
+
const hooks = ran.outcomes.map((o): CheckHookOutcome => ({
|
|
204
|
+
name: o.name,
|
|
205
|
+
...(o.target ? { target: o.target } : {}),
|
|
206
|
+
exit: o.exit,
|
|
207
|
+
outcome: o.outcome === "skipped" ? "skipped" : o.outcome === "passed" ? "passed" : "failed",
|
|
208
|
+
...(o.reason ? { reason: o.reason } : {}),
|
|
209
|
+
}));
|
|
210
|
+
const failed = ran.failed ?? (hooks.some((h) => h.outcome === "failed") ? `a check hook failed: ${hooks.filter((h) => h.outcome === "failed").map((h) => h.name).join(", ")}` : undefined);
|
|
211
|
+
return report({ status: failed ? "failed" : "passed", hooks, ...(failed ? { failed } : {}) });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Add `hook` to `ci.hooks.<moment>` of the workspace declaration at `root`
|
|
216
|
+
* (#4556), the top level's or `member`'s, keeping the file's formatting. A
|
|
217
|
+
* hook of the same `name` at that moment is replaced, so a product's `init`
|
|
218
|
+
* can run again. Refuses a check hook the check job could not run. Returns
|
|
219
|
+
* the declaration file it wrote.
|
|
220
|
+
*/
|
|
221
|
+
export function writeCiHook(
|
|
222
|
+
root: string,
|
|
223
|
+
moment: "check",
|
|
224
|
+
hook: OpWaveHook,
|
|
225
|
+
opts: { member?: string } = {},
|
|
226
|
+
): { file: string; replaced: boolean } {
|
|
227
|
+
assertCheckHooks(`ci.hooks.${moment}`, [hook]);
|
|
228
|
+
const file = DECLARATION_FILES.map((f) => join(root, f)).find((f) => existsSync(f));
|
|
229
|
+
if (!file) throw new Error(`no workspace declaration at ${root}; create one before adding ci.hooks`);
|
|
230
|
+
const jsonc = file.endsWith(".jsonc");
|
|
231
|
+
const text = readFileSync(file, "utf-8");
|
|
232
|
+
const parsed = parseJsonText(text, { jsonc });
|
|
233
|
+
if (!parsed.ok) throw new Error(`${file} is not valid JSON${jsonc ? "C" : ""}: ${parsed.message}`);
|
|
234
|
+
const doc = parsed.value as { members?: Array<{ name?: string }> };
|
|
235
|
+
let owner = "";
|
|
236
|
+
if (opts.member !== undefined) {
|
|
237
|
+
const index = (doc.members ?? []).findIndex((m) => m?.name === opts.member);
|
|
238
|
+
if (index < 0) throw new Error(`the workspace declaration names no member ${JSON.stringify(opts.member)}`);
|
|
239
|
+
owner = `/members/${index}`;
|
|
240
|
+
}
|
|
241
|
+
const ci = valueAt(doc, `${owner}/ci`) as { hooks?: CiHooks } | undefined;
|
|
242
|
+
const current: OpWaveHook[] = ci?.hooks?.[moment] ?? [];
|
|
243
|
+
const name = hook.name ?? hook.command.join(" ");
|
|
244
|
+
const at = current.findIndex((h) => (h.name ?? h.command.join(" ")) === name);
|
|
245
|
+
const next = at < 0 ? [...current, hook] : current.map((h, i) => (i === at ? hook : h));
|
|
246
|
+
const written =
|
|
247
|
+
ci === undefined ? setProperty(text, jsonc, owner, "ci", { hooks: { [moment]: next } })
|
|
248
|
+
: ci.hooks === undefined ? setProperty(text, jsonc, `${owner}/ci`, "hooks", { [moment]: next })
|
|
249
|
+
: setProperty(text, jsonc, `${owner}/ci/hooks`, moment, next);
|
|
250
|
+
writeFileSync(file, written);
|
|
251
|
+
return { file, replaced: at >= 0 };
|
|
252
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** #4572: forge-neutral job services, rendered per forge. */
|
|
2
|
+
|
|
3
|
+
import { describe, expect, test } from "vitest";
|
|
4
|
+
import { engineServices, githubServices, gitlabServices, serviceWaitLine, servicesJobEnv, type CiService } from "./ci-services";
|
|
5
|
+
|
|
6
|
+
const PG: CiService = {
|
|
7
|
+
name: "replay-postgres",
|
|
8
|
+
image: "postgres:18.6@sha256:abc",
|
|
9
|
+
port: 5432,
|
|
10
|
+
env: { POSTGRES_PASSWORD: "replay" },
|
|
11
|
+
health: "pg_isready -h 127.0.0.1 -U postgres",
|
|
12
|
+
jobEnv: { REPLAY_POSTGRES_URL: "postgres://replay-postgres:5432/postgres" },
|
|
13
|
+
};
|
|
14
|
+
const CH: CiService = { name: "replay-clickhouse", image: "clickhouse/clickhouse-server:26.8.15.10", port: 8123, env: {}, health: "clickhouse-client --query 'SELECT 1'", jobEnv: { REPLAY_CLICKHOUSE_URL: "http://replay-clickhouse:8123" } };
|
|
15
|
+
|
|
16
|
+
describe("engineServices", () => {
|
|
17
|
+
test("joins each name once, in lexicon order", () => {
|
|
18
|
+
expect(engineServices([[PG], undefined, [CH, PG]]).map((s) => s.name)).toEqual(["replay-postgres", "replay-clickhouse"]);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test("refuses one name with two images", () => {
|
|
22
|
+
expect(() => engineServices([[PG], [{ ...PG, image: "postgres:17" }]])).toThrow(/replay-postgres/);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
describe("rendering", () => {
|
|
27
|
+
test("GitHub and Forgejo: image, env and a health check per service", () => {
|
|
28
|
+
expect(githubServices([PG, CH])).toEqual({
|
|
29
|
+
"replay-postgres": { image: PG.image, env: { POSTGRES_PASSWORD: "replay" }, options: '--health-cmd "pg_isready -h 127.0.0.1 -U postgres" --health-interval 2s --health-timeout 5s --health-retries 45' },
|
|
30
|
+
"replay-clickhouse": { image: CH.image, options: `--health-cmd "clickhouse-client --query 'SELECT 1'" --health-interval 2s --health-timeout 5s --health-retries 45` },
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test("GitLab: the image under its alias", () => {
|
|
35
|
+
expect(gitlabServices([PG, CH])).toEqual([
|
|
36
|
+
{ name: PG.image, alias: "replay-postgres", variables: { POSTGRES_PASSWORD: "replay" } },
|
|
37
|
+
{ name: CH.image, alias: "replay-clickhouse" },
|
|
38
|
+
]);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test("the job's variables merge", () => {
|
|
42
|
+
expect(servicesJobEnv([PG, CH])).toEqual({ ...PG.jobEnv, ...CH.jobEnv });
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("the wait line names the host and port, and refuses a host a shell would read as more", () => {
|
|
46
|
+
const line = serviceWaitLine("replay-postgres", 5432);
|
|
47
|
+
expect(line).toContain('net.connect(5432, "replay-postgres"');
|
|
48
|
+
expect(line).toContain("n > 90");
|
|
49
|
+
expect(() => serviceWaitLine("a'; rm -rf /", 1)).toThrow();
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Job services a lexicon asks for (#4572, `LexiconPlugin.ciServices`): a
|
|
3
|
+
* throwaway server a CI job starts beside it, such as the sql lexicon's
|
|
4
|
+
* replay server per dialect. A service is forge-neutral data here; a
|
|
5
|
+
* product's job renders it for its forge with {@link githubServices} (GitHub
|
|
6
|
+
* and Forgejo) or {@link gitlabServices}, sets {@link servicesJobEnv} on the
|
|
7
|
+
* job, and runs {@link serviceWaitLine} before the step that uses it.
|
|
8
|
+
*
|
|
9
|
+
* The job runs in a container (chant's default image, or the product's), so
|
|
10
|
+
* it reaches each service by its name on the job's own network. A name is
|
|
11
|
+
* prefixed by the lexicon (`replay-postgres`), so two lexicons' services
|
|
12
|
+
* never answer for one host.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { NEXT_RELEASE } from "../release-floors";
|
|
16
|
+
|
|
17
|
+
/** The first chant with `LexiconPlugin.ciServices` and this module (#4572). */
|
|
18
|
+
export const CI_SERVICES_FLOOR = NEXT_RELEASE;
|
|
19
|
+
|
|
20
|
+
/** One service a job starts. */
|
|
21
|
+
export interface CiService {
|
|
22
|
+
/** The host the job reaches it at, and its alias on GitLab. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** The image, pinned by the lexicon (tag, and digest where the lexicon pins one). */
|
|
25
|
+
image: string;
|
|
26
|
+
/** The port the server listens on inside its container. */
|
|
27
|
+
port: number;
|
|
28
|
+
/** The service container's environment. */
|
|
29
|
+
env: Record<string, string>;
|
|
30
|
+
/** A command run inside the service container that exits 0 once the server answers. */
|
|
31
|
+
health: string;
|
|
32
|
+
/** What the job that uses it sets: the server's URL and its throwaway credentials, by variable name. */
|
|
33
|
+
jobEnv: Record<string, string>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Join the services each lexicon gives, each name once, in the order the
|
|
38
|
+
* lexicons come. Two services under one name with different images are
|
|
39
|
+
* refused: a host that answers for two servers would split the job.
|
|
40
|
+
*/
|
|
41
|
+
export function engineServices(perLexicon: ReadonlyArray<readonly CiService[] | undefined>): CiService[] {
|
|
42
|
+
const out = new Map<string, CiService>();
|
|
43
|
+
for (const svc of perLexicon.flatMap((list) => list ?? [])) {
|
|
44
|
+
const seen = out.get(svc.name);
|
|
45
|
+
if (seen && seen.image !== svc.image) throw new Error(`two lexicons give a CI service named ${svc.name}, ${seen.image} and ${svc.image}; a job reaches one server per name`);
|
|
46
|
+
if (!seen) out.set(svc.name, svc);
|
|
47
|
+
}
|
|
48
|
+
return [...out.values()];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** A job's `services:` on GitHub and Forgejo: each image with its environment and a health check the runner waits on. */
|
|
52
|
+
export function githubServices(services: readonly CiService[]): Record<string, { image: string; env?: Record<string, string>; options: string }> {
|
|
53
|
+
return Object.fromEntries(
|
|
54
|
+
services.map((s) => [
|
|
55
|
+
s.name,
|
|
56
|
+
{
|
|
57
|
+
image: s.image,
|
|
58
|
+
...(Object.keys(s.env).length > 0 ? { env: { ...s.env } } : {}),
|
|
59
|
+
options: `--health-cmd "${s.health}" --health-interval 2s --health-timeout 5s --health-retries 45`,
|
|
60
|
+
},
|
|
61
|
+
]),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** A job's `services:` on GitLab: each image under its alias, with its variables. GitLab waits on the port itself. */
|
|
66
|
+
export function gitlabServices(services: readonly CiService[]): Array<{ name: string; alias: string; variables?: Record<string, string> }> {
|
|
67
|
+
return services.map((s) => ({ name: s.image, alias: s.name, ...(Object.keys(s.env).length > 0 ? { variables: { ...s.env } } : {}) }));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The variables a job using `services` sets, merged in order. */
|
|
71
|
+
export function servicesJobEnv(services: readonly CiService[]): Record<string, string> {
|
|
72
|
+
return Object.assign({}, ...services.map((s) => s.jobEnv)) as Record<string, string>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A shell line that waits up to `seconds` for `host:port` to accept a
|
|
77
|
+
* connection, with `node -e`, so every forge and image with node runs it
|
|
78
|
+
* the same. It exits 1 naming the host when nothing answers.
|
|
79
|
+
*/
|
|
80
|
+
export function serviceWaitLine(host: string, port: number, seconds = 90): string {
|
|
81
|
+
if (!/^[A-Za-z0-9.-]+$/.test(host)) throw new Error(`a service host is letters, digits, dots and hyphens, not ${JSON.stringify(host)}`);
|
|
82
|
+
return `node -e 'const net = require("net"); let n = 0; (function t() { const s = net.connect(${String(port)}, "${host}", () => { s.end(); process.exit(0); }); s.on("error", () => { if (++n > ${String(seconds)}) { console.error("${host}:${String(port)} did not answer"); process.exit(1); } setTimeout(t, 1000); }); })()'`;
|
|
83
|
+
}
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
type DriverGate,
|
|
40
40
|
type DriverPhase,
|
|
41
41
|
type DriverRunResult,
|
|
42
|
+
type InterpretGroups,
|
|
42
43
|
} from "./driver";
|
|
43
44
|
import type { PendingGateRecord } from "../lifecycle/gate-ledger";
|
|
44
45
|
import type { GateDigestMismatch, GateLedgerPort } from "../op/gate";
|
|
@@ -51,7 +52,13 @@ import { existsSync, statSync } from "node:fs";
|
|
|
51
52
|
import { getHeadCommit } from "../lifecycle/git";
|
|
52
53
|
import { buildCapabilityRegistry } from "./capability-plugin-loader";
|
|
53
54
|
import type { CapabilityRegistry } from "./capability";
|
|
55
|
+
import type { DeployAdoption } from "./adoption";
|
|
56
|
+
import type { LockGrain } from "../lifecycle/lock-rows";
|
|
57
|
+
import type { RowLeasePort } from "./row-lease";
|
|
58
|
+
import type { FanOutPlan } from "./fan-out";
|
|
59
|
+
import { componentSetFanOut, formRunGroups, planAndRunComponentGroup } from "./groups";
|
|
54
60
|
import { applyConfigDefaults } from "./config-defaults";
|
|
61
|
+
import { withDeclaredReads } from "./declared-reads";
|
|
55
62
|
import { loadChantConfig, type ChantConfig } from "../config";
|
|
56
63
|
|
|
57
64
|
/** One component in `chant list --components` output. */
|
|
@@ -390,12 +397,22 @@ export function findComponentGate(component: DriverComponent): { gate: string }
|
|
|
390
397
|
export interface RunComponentsOptions {
|
|
391
398
|
/** Target environment name, threaded into every capability's `DeployContext.env` (default: "local"). */
|
|
392
399
|
env?: string;
|
|
400
|
+
/** `ci.lockGrain` as declared (#4594), for every step's `DeployContext.lockGrain`. Absent: each step takes its lexicon's default. */
|
|
401
|
+
lockGrain?: LockGrain;
|
|
402
|
+
/** The run's row lease (#4594): a step or group on the resource grain leases its rows through it before it applies. Absent: no lease. */
|
|
403
|
+
rowLease?: RowLeasePort;
|
|
393
404
|
/**
|
|
394
405
|
* The addresses each component's steps narrow to (#4300), by component
|
|
395
406
|
* (`--target <component>:<address>`). A name the run does not run refuses
|
|
396
407
|
* the run before anything starts.
|
|
397
408
|
*/
|
|
398
409
|
targets?: Readonly<Record<string, readonly string[]>>;
|
|
410
|
+
/**
|
|
411
|
+
* `--adopt <adoption-file>` (#4537): adopt the file's resources into the
|
|
412
|
+
* one component this run names, through its deploy step's
|
|
413
|
+
* `DeployContext.adoption`. Refused with `all` or a list.
|
|
414
|
+
*/
|
|
415
|
+
adoption?: DeployAdoption;
|
|
399
416
|
/**
|
|
400
417
|
* chant #1051 — opt-in: discover `*.component.ts` files in a sandboxed
|
|
401
418
|
* child process (`chant run --components <name|all> --sandbox`) instead of
|
|
@@ -510,6 +527,8 @@ export interface RunComponentsResult {
|
|
|
510
527
|
};
|
|
511
528
|
/** This run's resolved build-time parameters (chant #1108) — the component-driver counterpart of `../cli/commands/build.ts`'s `BuildResult.buildParams`. Present only once the run actually reached dispatch (mirrors `BuildResult.buildParams`, which is likewise absent on an early-error return). */
|
|
512
529
|
buildParams?: BuildParamProvenance[];
|
|
530
|
+
/** The grouped fan-out the run applied (ws-107, #4465), when a group formed or a component fell back from one. */
|
|
531
|
+
grouped?: FanOutPlan;
|
|
513
532
|
}
|
|
514
533
|
|
|
515
534
|
/**
|
|
@@ -545,6 +564,13 @@ export interface ResolvedComponentTargets {
|
|
|
545
564
|
targets: DriverComponent[];
|
|
546
565
|
/** For a list selector (#3950): the dependencies the closure added that the list did not name, in discovery order. */
|
|
547
566
|
added?: string[];
|
|
567
|
+
/**
|
|
568
|
+
* For a list selector: the names the list gave, and every enabled component
|
|
569
|
+
* the closure was taken over (#4516). `runComponents` takes the closure again
|
|
570
|
+
* once the declared reads are written in, so a listed importer pulls in the
|
|
571
|
+
* component whose export it reads.
|
|
572
|
+
*/
|
|
573
|
+
list?: { named: string[]; enabled: DriverComponent[] };
|
|
548
574
|
/** Component name to the environments it declares (#3153), for the components that declare any (#4330). */
|
|
549
575
|
sites?: Record<string, ComponentEnvironmentDeclaration[]>;
|
|
550
576
|
error?: string;
|
|
@@ -650,6 +676,14 @@ function resolveComponentList(
|
|
|
650
676
|
}
|
|
651
677
|
|
|
652
678
|
const enabled = withoutDisabled(discovered, all);
|
|
679
|
+
return { success: true, ...dependencyClosure(names, enabled), list: { named: names, enabled } };
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* `names` and every component of `enabled` they depend on, transitively, in
|
|
684
|
+
* `enabled`'s order, and which of those the names did not give (#3950).
|
|
685
|
+
*/
|
|
686
|
+
export function dependencyClosure(names: readonly string[], enabled: readonly DriverComponent[]): { targets: DriverComponent[]; added: string[] } {
|
|
653
687
|
const byName = new Map(enabled.map((c) => [c.name, c]));
|
|
654
688
|
const included = new Set<string>();
|
|
655
689
|
const visit = (name: string): void => {
|
|
@@ -662,7 +696,7 @@ function resolveComponentList(
|
|
|
662
696
|
|
|
663
697
|
const targets = enabled.filter((c) => included.has(c.name));
|
|
664
698
|
const named = new Set(names);
|
|
665
|
-
return {
|
|
699
|
+
return { targets, added: targets.map((c) => c.name).filter((n) => !named.has(n)) };
|
|
666
700
|
}
|
|
667
701
|
|
|
668
702
|
export async function runComponents(
|
|
@@ -674,13 +708,6 @@ export async function runComponents(
|
|
|
674
708
|
if (!resolved.success) {
|
|
675
709
|
return { success: false, selected: [], error: resolved.error };
|
|
676
710
|
}
|
|
677
|
-
const targets = resolved.targets;
|
|
678
|
-
const narrowed = options.targets ?? {};
|
|
679
|
-
const outside = Object.keys(narrowed).filter((name) => !targets.some((c) => c.name === name));
|
|
680
|
-
if (outside.length > 0) {
|
|
681
|
-
return { success: false, selected: [], error: `--target names ${outside.join(", ")}, which this run does not run` };
|
|
682
|
-
}
|
|
683
|
-
const targeted = Object.keys(narrowed).length > 0 ? { targets: narrowed } : {};
|
|
684
711
|
|
|
685
712
|
// (#629) Resolve `chant.config.ts`'s `sbom`/`signing`/`vulnPolicy` sections
|
|
686
713
|
// and fill their defaults into every recognized step (`generate-sbom`,
|
|
@@ -700,8 +727,35 @@ export async function runComponents(
|
|
|
700
727
|
lexicons: lexiconNames(config.lexicons),
|
|
701
728
|
}));
|
|
702
729
|
const env = options.env ?? "local";
|
|
703
|
-
|
|
704
|
-
|
|
730
|
+
// #4516: the reads a capability finds in its steps' files (a template's
|
|
731
|
+
// Fn::ImportValue) order a set run as `deriveFanOut` orders a fan-out, so an
|
|
732
|
+
// importer runs after the component whose export it reads. A list takes its
|
|
733
|
+
// closure again with them written in, so a listed importer pulls in its
|
|
734
|
+
// exporter. A single name runs on its own, against seeded outputs.
|
|
735
|
+
let resolvedTargets: DriverComponent[];
|
|
736
|
+
let added = resolved.added ?? [];
|
|
737
|
+
if (resolved.list) {
|
|
738
|
+
const enabled = await withDeclaredReads(resolved.list.enabled.map((component) => applyConfigDefaults(component, config)), registry, path);
|
|
739
|
+
({ targets: resolvedTargets, added } = dependencyClosure(resolved.list.named, enabled));
|
|
740
|
+
} else {
|
|
741
|
+
const defaulted = resolved.targets.map((component) => applyConfigDefaults(component, config));
|
|
742
|
+
resolvedTargets = selector === "all" ? await withDeclaredReads(defaulted, registry, path) : defaulted;
|
|
743
|
+
}
|
|
744
|
+
const selected = resolvedTargets.map((c) => c.name);
|
|
745
|
+
const narrowed = options.targets ?? {};
|
|
746
|
+
const outside = Object.keys(narrowed).filter((name) => !selected.includes(name));
|
|
747
|
+
if (outside.length > 0) {
|
|
748
|
+
return { success: false, selected: [], error: `--target names ${outside.join(", ")}, which this run does not run` };
|
|
749
|
+
}
|
|
750
|
+
const targeted = {
|
|
751
|
+
...(Object.keys(narrowed).length > 0 ? { targets: narrowed } : {}),
|
|
752
|
+
// #4594: the grain and the lease reach every step through its DeployContext.
|
|
753
|
+
...(options.lockGrain ? { lockGrain: options.lockGrain } : {}),
|
|
754
|
+
...(options.rowLease ? { rowLease: options.rowLease } : {}),
|
|
755
|
+
};
|
|
756
|
+
if (options.adoption && (selector === "all" || isComponentList(selector))) {
|
|
757
|
+
return { success: false, selected: [], error: `--adopt adopts into one component's stack; name one component, not ${selector === "all" ? "all" : "a list"}` };
|
|
758
|
+
}
|
|
705
759
|
// Cross-component/cross-stack outputs to resolve references against. Seeded
|
|
706
760
|
// from a caller (a downstream CI job passing an upstream job's dumped
|
|
707
761
|
// outputs via `--seed-outputs`); grows as this run's components complete.
|
|
@@ -719,16 +773,38 @@ export async function runComponents(
|
|
|
719
773
|
|
|
720
774
|
try {
|
|
721
775
|
if (selector === "all" || isComponentList(selector)) {
|
|
776
|
+
// ws-107 (#4465): the components a capability takes as one plan in their
|
|
777
|
+
// wave and apply as one group, by the rule the pull-request run uses.
|
|
778
|
+
// A cycle or unknown dependency throws here the error the driver would:
|
|
779
|
+
// `componentSetFanOut` drops a dependency outside the set, so the full
|
|
780
|
+
// graph is resolved first.
|
|
781
|
+
resolveComponentGraph(resolvedTargets);
|
|
782
|
+
const grouped = await formRunGroups({ components: resolvedTargets, plan: componentSetFanOut(resolvedTargets), registry, env });
|
|
722
783
|
if (isComponentList(selector) && options.onPlan) {
|
|
723
784
|
// Resolved here, before dispatch, so the order is printed before any
|
|
724
|
-
// component runs.
|
|
725
|
-
|
|
726
|
-
const graph = resolveComponentGraph(resolvedTargets);
|
|
727
|
-
options.onPlan({ order: graph.order, waves: graph.waves, added: resolved.added ?? [] });
|
|
785
|
+
// component runs.
|
|
786
|
+
options.onPlan({ order: grouped.order, waves: grouped.waves.filter((w) => w.length > 0), added });
|
|
728
787
|
}
|
|
788
|
+
const byName = new Map(resolvedTargets.map((c) => [c.name, c]));
|
|
789
|
+
const groups: InterpretGroups | undefined = grouped.groups?.length
|
|
790
|
+
? {
|
|
791
|
+
waves: grouped.waves,
|
|
792
|
+
groups: grouped.groups,
|
|
793
|
+
run: (group, componentOutputs) =>
|
|
794
|
+
planAndRunComponentGroup({
|
|
795
|
+
group,
|
|
796
|
+
components: byName,
|
|
797
|
+
registry,
|
|
798
|
+
env,
|
|
799
|
+
ctxOf: (name) => deployContext({ env, releaseIdentity, ...targeted }, name),
|
|
800
|
+
componentOutputs,
|
|
801
|
+
}),
|
|
802
|
+
}
|
|
803
|
+
: undefined;
|
|
729
804
|
const run = await runInterpretDriver(resolvedTargets, registry, {
|
|
730
805
|
env,
|
|
731
806
|
releaseIdentity,
|
|
807
|
+
...(groups ? { groups } : {}),
|
|
732
808
|
...targeted,
|
|
733
809
|
componentOutputs: seedOutputs,
|
|
734
810
|
...(emit ? { onRunEvent: emit } : {}),
|
|
@@ -740,6 +816,7 @@ export async function runComponents(
|
|
|
740
816
|
selected,
|
|
741
817
|
components: resolvedTargets,
|
|
742
818
|
buildParams: options.buildParams,
|
|
819
|
+
...(grouped.groups?.length || grouped.fallbacks?.length ? { grouped } : {}),
|
|
743
820
|
...(run.status === "gated" && run.gate
|
|
744
821
|
? {
|
|
745
822
|
gated: {
|
|
@@ -773,7 +850,7 @@ export async function runComponents(
|
|
|
773
850
|
emit?.({ type: "component-start", wave: 1, component: componentName });
|
|
774
851
|
const componentResult = await runComponentDeploy(
|
|
775
852
|
resolvedTargets[0],
|
|
776
|
-
deployContext({ env, releaseIdentity, ...targeted }, componentName),
|
|
853
|
+
{ ...deployContext({ env, releaseIdentity, ...targeted }, componentName), ...(options.adoption ? { adoption: options.adoption } : {}) },
|
|
777
854
|
registry,
|
|
778
855
|
componentOutputs,
|
|
779
856
|
undefined,
|