@intentius/chant 0.124.54 → 0.124.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__fixtures__/estate-ledger.d.ts +13 -0
- package/dist/__fixtures__/estate-ledger.d.ts.map +1 -0
- package/dist/__fixtures__/estate-ledger.js +67 -0
- package/dist/__fixtures__/oidc-emulator.d.ts +11 -1
- package/dist/__fixtures__/oidc-emulator.d.ts.map +1 -1
- package/dist/__fixtures__/oidc-emulator.js +26 -2
- package/dist/__fixtures__/product-words.d.ts +78 -0
- package/dist/__fixtures__/product-words.d.ts.map +1 -0
- package/dist/__fixtures__/product-words.js +43 -0
- package/dist/__golden__/wave-loop/op-by-apply-after-fails.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-hold.json +20 -4
- package/dist/__golden__/wave-loop/op-by-apply-ignored.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-pass.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-skip.json +10 -2
- package/dist/__golden__/wave-loop/op-discover-rest-stops.json +22 -6
- package/dist/__golden__/wave-loop/op-discover-rest.json +44 -12
- package/dist/__golden__/wave-loop/op-discover-wide.json +12 -3
- package/dist/__golden__/wave-loop/op-held-on.json +28 -7
- package/dist/__golden__/wave-loop/op-hooks-apply-fails.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-fail-after-apply.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-fail-before-apply.json +4 -2
- package/dist/__golden__/wave-loop/op-hooks-held.json +26 -8
- package/dist/__golden__/wave-loop/op-hooks-hold-before-apply.json +18 -4
- package/dist/__golden__/wave-loop/op-hooks-pass.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-share.json +20 -7
- package/dist/__golden__/wave-loop/op-outcome-held.json +12 -3
- package/dist/__golden__/wave-loop/op-outcome-replan-approved.json +16 -5
- package/dist/__golden__/wave-loop/op-outcome-replan-forever.json +48 -21
- package/dist/__golden__/wave-loop/op-outcome-replan.json +16 -5
- package/dist/__golden__/wave-loop/op-outcome-stood-down.json +12 -3
- package/dist/__golden__/wave-loop/op-outcome-unreadable.json +12 -3
- package/dist/__golden__/wave-loop/op-overridden.json +28 -7
- package/dist/__golden__/wave-loop/op-per-run.json +20 -4
- package/dist/__golden__/wave-loop/op-point.json +18 -4
- package/dist/__golden__/wave-loop/op-pr-review.json +10 -2
- package/dist/__golden__/wave-loop/op-spend-change-only.json +10 -2
- package/dist/__golden__/wave-loop/op-spend.json +10 -2
- package/dist/__golden__/wave-loop/op-wave-commands.json +56 -13
- package/dist/__golden__/wave-loop/op-wide.json +20 -4
- package/dist/bucket-check/azure.d.ts +108 -0
- package/dist/bucket-check/azure.d.ts.map +1 -0
- package/dist/bucket-check/azure.js +258 -0
- package/dist/bucket-check/fixtures/azure.json +153 -0
- package/dist/bucket-check/fixtures/gcs.json +148 -0
- package/dist/bucket-check/fixtures/s3.json +277 -0
- package/dist/bucket-check/gcs.d.ts +77 -0
- package/dist/bucket-check/gcs.d.ts.map +1 -0
- package/dist/bucket-check/gcs.js +202 -0
- package/dist/bucket-check/index.d.ts +48 -0
- package/dist/bucket-check/index.d.ts.map +1 -0
- package/dist/bucket-check/index.js +44 -0
- package/dist/bucket-check/s3.d.ts +116 -0
- package/dist/bucket-check/s3.d.ts.map +1 -0
- package/dist/bucket-check/s3.js +362 -0
- package/dist/bucket-check/types.d.ts +66 -0
- package/dist/bucket-check/types.d.ts.map +1 -0
- package/dist/bucket-check/types.js +31 -0
- package/dist/bucket-check/wire.d.ts +27 -0
- package/dist/bucket-check/wire.d.ts.map +1 -0
- package/dist/bucket-check/wire.js +32 -0
- package/dist/bucket-check.d.ts +6 -0
- package/dist/bucket-check.d.ts.map +1 -0
- package/dist/bucket-check.js +5 -0
- package/dist/capabilities/templates.d.ts.map +1 -1
- package/dist/capabilities/templates.js +1 -2
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +2 -3
- package/dist/ci-agent.d.ts +381 -0
- package/dist/ci-agent.d.ts.map +1 -0
- package/dist/ci-agent.js +832 -0
- package/dist/ci-audit/attribution.d.ts +111 -0
- package/dist/ci-audit/attribution.d.ts.map +1 -0
- package/dist/ci-audit/attribution.js +194 -0
- package/dist/ci-audit/audit-log.d.ts +144 -0
- package/dist/ci-audit/audit-log.d.ts.map +1 -0
- package/dist/ci-audit/audit-log.js +149 -0
- package/dist/ci-audit/index.d.ts +12 -0
- package/dist/ci-audit/index.d.ts.map +1 -0
- package/dist/ci-audit/index.js +12 -0
- package/dist/ci-audit/unrecorded.d.ts +74 -0
- package/dist/ci-audit/unrecorded.d.ts.map +1 -0
- package/dist/ci-audit/unrecorded.js +95 -0
- package/dist/ci-audit.d.ts +3 -0
- package/dist/ci-audit.d.ts.map +1 -0
- package/dist/ci-audit.js +2 -0
- package/dist/ci-control.d.ts +42 -0
- package/dist/ci-control.d.ts.map +1 -0
- package/dist/ci-control.js +41 -0
- package/dist/ci-estate/delivery.d.ts +137 -0
- package/dist/ci-estate/delivery.d.ts.map +1 -0
- package/dist/ci-estate/delivery.js +311 -0
- package/dist/ci-estate/overdue.d.ts +34 -0
- package/dist/ci-estate/overdue.d.ts.map +1 -0
- package/dist/ci-estate/overdue.js +58 -0
- package/dist/ci-estate/page.d.ts +134 -0
- package/dist/ci-estate/page.d.ts.map +1 -0
- package/dist/ci-estate/page.js +233 -0
- package/dist/ci-estate/rows.d.ts +118 -0
- package/dist/ci-estate/rows.d.ts.map +1 -0
- package/dist/ci-estate/rows.js +126 -0
- package/dist/ci-estate.d.ts +92 -0
- package/dist/ci-estate.d.ts.map +1 -0
- package/dist/ci-estate.js +82 -0
- package/dist/ci-handover.d.ts +29 -5
- package/dist/ci-handover.d.ts.map +1 -1
- package/dist/ci-handover.js +50 -16
- package/dist/ci-identity.d.ts +82 -7
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +86 -15
- package/dist/ci-job-guard.d.ts +139 -0
- package/dist/ci-job-guard.d.ts.map +1 -0
- package/dist/ci-job-guard.js +287 -0
- package/dist/ci-jobs.d.ts +7 -0
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -0
- package/dist/ci-product-words.d.ts +296 -0
- package/dist/ci-product-words.d.ts.map +1 -0
- package/dist/ci-product-words.js +407 -0
- package/dist/ci-product.d.ts +117 -0
- package/dist/ci-product.d.ts.map +1 -0
- package/dist/ci-product.js +113 -0
- package/dist/ci-respond-run.d.ts +73 -0
- package/dist/ci-respond-run.d.ts.map +1 -0
- package/dist/ci-respond-run.js +247 -0
- package/dist/ci-respond.d.ts +189 -0
- package/dist/ci-respond.d.ts.map +1 -0
- package/dist/ci-respond.js +285 -0
- package/dist/cli/commands/audit.d.ts +2 -2
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +3 -2
- package/dist/cli/commands/carve.js +2 -2
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +1 -1
- package/dist/cli/handlers/agent.d.ts +17 -0
- package/dist/cli/handlers/agent.d.ts.map +1 -0
- package/dist/cli/handlers/agent.js +114 -0
- package/dist/cli/handlers/approve-confirm.d.ts +84 -0
- package/dist/cli/handlers/approve-confirm.d.ts.map +1 -0
- package/dist/cli/handlers/approve-confirm.js +142 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +19 -1
- package/dist/cli/handlers/audit-log.d.ts +12 -0
- package/dist/cli/handlers/audit-log.d.ts.map +1 -0
- package/dist/cli/handlers/audit-log.js +81 -0
- package/dist/cli/handlers/build.d.ts +7 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +124 -1
- package/dist/cli/handlers/ci-check-job.d.ts +11 -0
- package/dist/cli/handlers/ci-check-job.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check-job.js +27 -0
- package/dist/cli/handlers/ci-check.d.ts +3 -0
- package/dist/cli/handlers/ci-check.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check.js +63 -0
- package/dist/cli/handlers/ci-forge-check.d.ts +3 -0
- package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -0
- package/dist/cli/handlers/ci-forge-check.js +89 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts +12 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts.map +1 -0
- package/dist/cli/handlers/e2e-safe-run.js +23 -0
- package/dist/cli/handlers/fan-out.js +4 -0
- package/dist/cli/handlers/gate-pending.d.ts +11 -0
- package/dist/cli/handlers/gate-pending.d.ts.map +1 -0
- package/dist/cli/handlers/gate-pending.js +44 -0
- package/dist/cli/handlers/init.d.ts.map +1 -1
- package/dist/cli/handlers/init.js +1 -0
- package/dist/cli/handlers/ledger.js +1 -1
- package/dist/cli/handlers/lifecycle-drift.d.ts +6 -2
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle-drift.js +7 -2
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +64 -5
- package/dist/cli/handlers/notify-relay.d.ts +15 -0
- package/dist/cli/handlers/notify-relay.d.ts.map +1 -0
- package/dist/cli/handlers/notify-relay.js +130 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +42 -11
- package/dist/cli/handlers/pr.d.ts +43 -3
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +908 -205
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +21 -2
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +3 -0
- package/dist/cli/handlers/run-wave.d.ts +8 -0
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +160 -2
- package/dist/cli/handlers/run.d.ts +6 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +86 -1
- package/dist/cli/handlers/serve.d.ts.map +1 -1
- package/dist/cli/handlers/serve.js +10 -1
- package/dist/cli/main.d.ts +11 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +178 -13
- package/dist/cli/mcp/ledger-tools.d.ts +36 -0
- package/dist/cli/mcp/ledger-tools.d.ts.map +1 -0
- package/dist/cli/mcp/ledger-tools.js +122 -0
- package/dist/cli/mcp/product-tools.d.ts +78 -0
- package/dist/cli/mcp/product-tools.d.ts.map +1 -0
- package/dist/cli/mcp/product-tools.js +93 -0
- package/dist/cli/mcp/read-only.d.ts +34 -0
- package/dist/cli/mcp/read-only.d.ts.map +1 -0
- package/dist/cli/mcp/read-only.js +61 -0
- package/dist/cli/mcp/report-tools.d.ts +48 -0
- package/dist/cli/mcp/report-tools.d.ts.map +1 -0
- package/dist/cli/mcp/report-tools.js +128 -0
- package/dist/cli/mcp/server.d.ts +28 -1
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/server.js +86 -15
- package/dist/cli/mcp-config.d.ts +9 -2
- package/dist/cli/mcp-config.d.ts.map +1 -1
- package/dist/cli/mcp-config.js +8 -3
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +164 -3
- package/dist/cli/registry.d.ts +73 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cloud-lister/sigv4.d.ts +42 -7
- package/dist/cloud-lister/sigv4.d.ts.map +1 -1
- package/dist/cloud-lister/sigv4.js +72 -22
- package/dist/components/adoption.d.ts +69 -0
- package/dist/components/adoption.d.ts.map +1 -0
- package/dist/components/adoption.js +92 -0
- package/dist/components/apply-lease.d.ts +19 -0
- package/dist/components/apply-lease.d.ts.map +1 -0
- package/dist/components/apply-lease.js +41 -0
- package/dist/components/capability.d.ts +159 -5
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +39 -6
- package/dist/components/check-hooks.d.ts +116 -0
- package/dist/components/check-hooks.d.ts.map +1 -0
- package/dist/components/check-hooks.js +192 -0
- package/dist/components/check-steps.d.ts +74 -0
- package/dist/components/check-steps.d.ts.map +1 -0
- package/dist/components/check-steps.js +102 -0
- package/dist/components/ci-services.d.ts +57 -0
- package/dist/components/ci-services.d.ts.map +1 -0
- package/dist/components/ci-services.js +60 -0
- package/dist/components/cli-support.d.ts +13 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +10 -2
- package/dist/components/driver.d.ts +32 -3
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +59 -5
- package/dist/components/fan-out-run.d.ts +12 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +56 -16
- package/dist/components/groups.d.ts.map +1 -1
- package/dist/components/groups.js +23 -5
- package/dist/components/pr-env-ledger.d.ts +32 -0
- package/dist/components/pr-env-ledger.d.ts.map +1 -0
- package/dist/components/pr-env-ledger.js +38 -0
- package/dist/components/pr-env-ports.d.ts +12 -0
- package/dist/components/pr-env-ports.d.ts.map +1 -1
- package/dist/components/pr-env-ports.js +13 -3
- package/dist/components/pr-env-run.d.ts +6 -0
- package/dist/components/pr-env-run.d.ts.map +1 -1
- package/dist/components/pr-env-run.js +3 -2
- package/dist/components/pr-environment.d.ts +32 -4
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +26 -8
- package/dist/components/pr-pipeline.d.ts +297 -5
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +329 -18
- package/dist/components/pr-policy.d.ts +26 -2
- package/dist/components/pr-policy.d.ts.map +1 -1
- package/dist/components/pr-policy.js +41 -7
- package/dist/components/pr-run.d.ts +71 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +91 -7
- package/dist/components/pr-targets.d.ts +24 -0
- package/dist/components/pr-targets.d.ts.map +1 -0
- package/dist/components/pr-targets.js +48 -0
- package/dist/components/product-pipeline.d.ts +250 -0
- package/dist/components/product-pipeline.d.ts.map +1 -0
- package/dist/components/product-pipeline.js +212 -0
- package/dist/components/promote.d.ts +6 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +4 -1
- package/dist/components/release-compile.d.ts +22 -1
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +85 -0
- package/dist/components/release-promote.d.ts +15 -1
- package/dist/components/release-promote.d.ts.map +1 -1
- package/dist/components/release-promote.js +67 -2
- package/dist/components/repo-lock.d.ts +27 -0
- package/dist/components/repo-lock.d.ts.map +1 -0
- package/dist/components/repo-lock.js +49 -0
- package/dist/components/row-lease.d.ts +84 -0
- package/dist/components/row-lease.d.ts.map +1 -0
- package/dist/components/row-lease.js +110 -0
- package/dist/components/wave-plan.d.ts +42 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +72 -4
- package/dist/control/applied.d.ts +89 -0
- package/dist/control/applied.d.ts.map +1 -0
- package/dist/control/applied.js +175 -0
- package/dist/control/consumers.d.ts +78 -0
- package/dist/control/consumers.d.ts.map +1 -0
- package/dist/control/consumers.js +172 -0
- package/dist/control/dispatch.d.ts +334 -0
- package/dist/control/dispatch.d.ts.map +1 -0
- package/dist/control/dispatch.js +519 -0
- package/dist/control/edges.d.ts +75 -0
- package/dist/control/edges.d.ts.map +1 -0
- package/dist/control/edges.js +133 -0
- package/dist/control/reconcile.d.ts +120 -0
- package/dist/control/reconcile.d.ts.map +1 -0
- package/dist/control/reconcile.js +178 -0
- package/dist/control/records.d.ts +187 -0
- package/dist/control/records.d.ts.map +1 -0
- package/dist/control/records.js +307 -0
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.js +25 -1
- package/dist/e2e-harness/bucket.d.ts +21 -0
- package/dist/e2e-harness/bucket.d.ts.map +1 -0
- package/dist/e2e-harness/bucket.js +61 -0
- package/dist/e2e-harness/claim.d.ts +70 -0
- package/dist/e2e-harness/claim.d.ts.map +1 -0
- package/dist/e2e-harness/claim.js +98 -0
- package/dist/e2e-harness/driver.d.ts +64 -0
- package/dist/e2e-harness/driver.d.ts.map +1 -0
- package/dist/e2e-harness/driver.js +243 -0
- package/dist/e2e-harness/forgejo.d.ts +77 -0
- package/dist/e2e-harness/forgejo.d.ts.map +1 -0
- package/dist/e2e-harness/forgejo.js +205 -0
- package/dist/e2e-harness/git.d.ts +32 -0
- package/dist/e2e-harness/git.d.ts.map +1 -0
- package/dist/e2e-harness/git.js +67 -0
- package/dist/e2e-harness/index.d.ts +22 -0
- package/dist/e2e-harness/index.d.ts.map +1 -0
- package/dist/e2e-harness/index.js +48 -0
- package/dist/e2e-harness/jobs.d.ts +8 -0
- package/dist/e2e-harness/jobs.d.ts.map +1 -0
- package/dist/e2e-harness/jobs.js +34 -0
- package/dist/e2e-harness/pins.d.ts +45 -0
- package/dist/e2e-harness/pins.d.ts.map +1 -0
- package/dist/e2e-harness/pins.js +44 -0
- package/dist/e2e-harness/ports.d.ts +113 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -0
- package/dist/e2e-harness/ports.js +4 -0
- package/dist/e2e-harness/reports.d.ts +45 -0
- package/dist/e2e-harness/reports.d.ts.map +1 -0
- package/dist/e2e-harness/reports.js +57 -0
- package/dist/e2e-harness/safe-run-cli.d.ts +17 -0
- package/dist/e2e-harness/safe-run-cli.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run-cli.js +43 -0
- package/dist/e2e-harness/safe-run.d.ts +61 -0
- package/dist/e2e-harness/safe-run.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run.js +172 -0
- package/dist/e2e-harness/scenario.d.ts +11 -0
- package/dist/e2e-harness/scenario.d.ts.map +1 -0
- package/dist/e2e-harness/scenario.js +89 -0
- package/dist/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/dist/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/dist/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/dist/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/dist/e2e-harness/schemas/index.d.ts +191 -0
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -0
- package/dist/e2e-harness/schemas/index.js +62 -0
- package/dist/e2e-harness/stack.d.ts +124 -0
- package/dist/e2e-harness/stack.d.ts.map +1 -0
- package/dist/e2e-harness/stack.js +207 -0
- package/dist/e2e-harness/steps.d.ts +11 -0
- package/dist/e2e-harness/steps.d.ts.map +1 -0
- package/dist/e2e-harness/steps.js +22 -0
- package/dist/e2e-harness.d.ts +3 -0
- package/dist/e2e-harness.d.ts.map +1 -0
- package/dist/e2e-harness.js +2 -0
- package/dist/engine-facts.d.ts.map +1 -1
- package/dist/engine-facts.js +1 -2
- package/dist/exit-codes.d.ts +54 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +55 -0
- package/dist/forge-check/check.d.ts +63 -0
- package/dist/forge-check/check.d.ts.map +1 -0
- package/dist/forge-check/check.js +139 -0
- package/dist/forge-check/contract.d.ts +152 -0
- package/dist/forge-check/contract.d.ts.map +1 -0
- package/dist/forge-check/contract.js +118 -0
- package/dist/forge-check/forge.d.ts +42 -0
- package/dist/forge-check/forge.d.ts.map +1 -0
- package/dist/forge-check/forge.js +338 -0
- package/dist/forge-check/index.d.ts +24 -0
- package/dist/forge-check/index.d.ts.map +1 -0
- package/dist/forge-check/index.js +23 -0
- package/dist/forge-check/pulumi.d.ts +44 -0
- package/dist/forge-check/pulumi.d.ts.map +1 -0
- package/dist/forge-check/pulumi.js +184 -0
- package/dist/forge-check/read-only.d.ts +26 -0
- package/dist/forge-check/read-only.d.ts.map +1 -0
- package/dist/forge-check/read-only.js +53 -0
- package/dist/forge-check/trust.d.ts +94 -0
- package/dist/forge-check/trust.d.ts.map +1 -0
- package/dist/forge-check/trust.js +532 -0
- package/dist/forge-check/types.d.ts +80 -0
- package/dist/forge-check/types.d.ts.map +1 -0
- package/dist/forge-check/types.js +18 -0
- package/dist/forge-check.d.ts +6 -0
- package/dist/forge-check.d.ts.map +1 -0
- package/dist/forge-check.js +5 -0
- package/dist/gate-decision.d.ts +1 -0
- package/dist/gate-decision.d.ts.map +1 -1
- package/dist/gate-decision.js +2 -0
- package/dist/gate-policy.d.ts +47 -1
- package/dist/gate-policy.d.ts.map +1 -1
- package/dist/gate-policy.js +50 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lexicon.d.ts +152 -6
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.d.ts +24 -0
- package/dist/lifecycle/adoption-file.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.js +1 -2
- package/dist/lifecycle/cloud-index.d.ts.map +1 -1
- package/dist/lifecycle/cloud-index.js +1 -2
- package/dist/lifecycle/gate-applied.d.ts +6 -0
- package/dist/lifecycle/gate-applied.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +29 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +10 -1
- package/dist/lifecycle/gate-pending-by-plan.d.ts +75 -0
- package/dist/lifecycle/gate-pending-by-plan.d.ts.map +1 -0
- package/dist/lifecycle/gate-pending-by-plan.js +96 -0
- package/dist/lifecycle/gated-request-digest.d.ts +28 -0
- package/dist/lifecycle/gated-request-digest.d.ts.map +1 -0
- package/dist/lifecycle/gated-request-digest.js +35 -0
- package/dist/lifecycle/gated-request.d.ts +126 -0
- package/dist/lifecycle/gated-request.d.ts.map +1 -0
- package/dist/lifecycle/gated-request.js +204 -0
- package/dist/lifecycle/identity-match.d.ts +15 -0
- package/dist/lifecycle/identity-match.d.ts.map +1 -1
- package/dist/lifecycle/identity-match.js +11 -6
- package/dist/lifecycle/index-diff.d.ts +40 -0
- package/dist/lifecycle/index-diff.d.ts.map +1 -1
- package/dist/lifecycle/index-diff.js +1 -2
- package/dist/lifecycle/index-document.d.ts.map +1 -1
- package/dist/lifecycle/index-document.js +1 -2
- package/dist/lifecycle/index-import.d.ts +4 -1
- package/dist/lifecycle/index-import.d.ts.map +1 -1
- package/dist/lifecycle/index-import.js +29 -32
- package/dist/lifecycle/ledger-read.d.ts.map +1 -1
- package/dist/lifecycle/ledger-read.js +7 -3
- package/dist/lifecycle/lock-rows.d.ts +76 -0
- package/dist/lifecycle/lock-rows.d.ts.map +1 -0
- package/dist/lifecycle/lock-rows.js +140 -0
- package/dist/lifecycle/query.d.ts +50 -3
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +97 -7
- package/dist/lifecycle/release-catalog-site.d.ts +66 -0
- package/dist/lifecycle/release-catalog-site.d.ts.map +1 -0
- package/dist/lifecycle/release-catalog-site.js +232 -0
- package/dist/lifecycle/release-catalog.d.ts +201 -0
- package/dist/lifecycle/release-catalog.d.ts.map +1 -0
- package/dist/lifecycle/release-catalog.js +198 -0
- package/dist/lifecycle/release-changelog.d.ts +41 -0
- package/dist/lifecycle/release-changelog.d.ts.map +1 -0
- package/dist/lifecycle/release-changelog.js +38 -0
- package/dist/lifecycle/release-cut.d.ts +1 -0
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +1 -1
- package/dist/lifecycle/release-ledger.d.ts +16 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +9 -0
- package/dist/lifecycle/release-publish.d.ts +43 -22
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- package/dist/lifecycle/release-read.d.ts.map +1 -1
- package/dist/lifecycle/release-read.js +3 -0
- package/dist/lifecycle/release-status.d.ts +106 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -0
- package/dist/lifecycle/release-status.js +115 -0
- package/dist/lifecycle/resource-lock.d.ts +120 -0
- package/dist/lifecycle/resource-lock.d.ts.map +1 -0
- package/dist/lifecycle/resource-lock.js +317 -0
- package/dist/lifecycle/retention.d.ts.map +1 -1
- package/dist/lifecycle/retention.js +3 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +9 -1
- package/dist/lifecycle/snapshot-store-s3.d.ts +36 -3
- package/dist/lifecycle/snapshot-store-s3.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store-s3.js +9 -44
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store.js +1 -2
- package/dist/lifecycle/target-lock.d.ts +15 -0
- package/dist/lifecycle/target-lock.d.ts.map +1 -1
- package/dist/lifecycle/target-lock.js +25 -10
- package/dist/lifecycle/wave-plans.d.ts +23 -7
- package/dist/lifecycle/wave-plans.d.ts.map +1 -1
- package/dist/lifecycle/wave-plans.js +9 -2
- package/dist/mcp/types.d.ts +7 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/notify-product.d.ts +43 -0
- package/dist/notify-product.d.ts.map +1 -0
- package/dist/notify-product.js +58 -0
- package/dist/notify-relay.d.ts +197 -0
- package/dist/notify-relay.d.ts.map +1 -0
- package/dist/notify-relay.js +321 -0
- package/dist/notify.d.ts +44 -4
- package/dist/notify.d.ts.map +1 -1
- package/dist/notify.js +77 -14
- package/dist/object-store/azure-blob.d.ts +129 -0
- package/dist/object-store/azure-blob.d.ts.map +1 -0
- package/dist/object-store/azure-blob.js +341 -0
- package/dist/object-store/common.d.ts +108 -0
- package/dist/object-store/common.d.ts.map +1 -0
- package/dist/object-store/common.js +80 -0
- package/dist/object-store/errors.d.ts +28 -0
- package/dist/object-store/errors.d.ts.map +1 -0
- package/dist/object-store/errors.js +21 -0
- package/dist/object-store/from-env.d.ts +18 -0
- package/dist/object-store/from-env.d.ts.map +1 -0
- package/dist/object-store/from-env.js +22 -0
- package/dist/object-store/gcs.d.ts +106 -0
- package/dist/object-store/gcs.d.ts.map +1 -0
- package/dist/object-store/gcs.js +393 -0
- package/dist/object-store/index.d.ts +9 -0
- package/dist/object-store/index.d.ts.map +1 -0
- package/dist/object-store/index.js +8 -0
- package/dist/object-store/s3.d.ts +146 -0
- package/dist/object-store/s3.d.ts.map +1 -0
- package/dist/object-store/s3.js +306 -0
- package/dist/op/activities/converge.d.ts.map +1 -1
- package/dist/op/activities/converge.js +2 -1
- package/dist/op/activities/index.d.ts +1 -1
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/index.js +1 -1
- package/dist/op/activities/review-agent.d.ts +55 -2
- package/dist/op/activities/review-agent.d.ts.map +1 -1
- package/dist/op/activities/review-agent.js +65 -5
- package/dist/op/approval-status.d.ts +103 -0
- package/dist/op/approval-status.d.ts.map +1 -0
- package/dist/op/approval-status.js +197 -0
- package/dist/op/gate.d.ts +29 -1
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +59 -23
- package/dist/op/generate-pipeline.d.ts.map +1 -1
- package/dist/op/generate-pipeline.js +7 -1
- package/dist/op/index.d.ts +12 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +7 -1
- package/dist/op/op-waves-after-plan.d.ts +137 -0
- package/dist/op/op-waves-after-plan.d.ts.map +1 -0
- package/dist/op/op-waves-after-plan.js +163 -0
- package/dist/op/op-waves-capability-spec.d.ts +63 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -0
- package/dist/op/op-waves-capability-spec.js +115 -0
- package/dist/op/op-waves-capability.d.ts +197 -0
- package/dist/op/op-waves-capability.d.ts.map +1 -0
- package/dist/op/op-waves-capability.js +311 -0
- package/dist/op/op-waves-events.d.ts +54 -0
- package/dist/op/op-waves-events.d.ts.map +1 -0
- package/dist/op/op-waves-events.js +122 -0
- package/dist/op/op-waves-notify.d.ts +7 -1
- package/dist/op/op-waves-notify.d.ts.map +1 -1
- package/dist/op/op-waves-notify.js +35 -16
- package/dist/op/op-waves-release-port.d.ts +18 -0
- package/dist/op/op-waves-release-port.d.ts.map +1 -0
- package/dist/op/op-waves-release-port.js +61 -0
- package/dist/op/op-waves-release.d.ts +92 -0
- package/dist/op/op-waves-release.d.ts.map +1 -0
- package/dist/op/op-waves-release.js +96 -0
- package/dist/op/op-waves-run.d.ts +182 -6
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +1076 -44
- package/dist/op/op-waves-stand-down.d.ts +60 -0
- package/dist/op/op-waves-stand-down.d.ts.map +1 -0
- package/dist/op/op-waves-stand-down.js +96 -0
- package/dist/op/op-waves.d.ts +187 -8
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +203 -19
- package/dist/op/runtime.d.ts +95 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +18 -0
- package/dist/op/stage-hooks.d.ts +45 -7
- package/dist/op/stage-hooks.d.ts.map +1 -1
- package/dist/op/stage-hooks.js +61 -3
- package/dist/op/steward-beside.d.ts.map +1 -1
- package/dist/op/steward-beside.js +2 -1
- package/dist/op/types.d.ts +2 -2
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/types.js +3 -2
- package/dist/otlp-metrics.d.ts +38 -0
- package/dist/otlp-metrics.d.ts.map +1 -0
- package/dist/otlp-metrics.js +82 -0
- package/dist/otlp.d.ts +249 -0
- package/dist/otlp.d.ts.map +1 -0
- package/dist/otlp.js +425 -0
- package/dist/override-gate.d.ts.map +1 -1
- package/dist/override-gate.js +5 -0
- package/dist/parallelism.d.ts +17 -0
- package/dist/parallelism.d.ts.map +1 -0
- package/dist/parallelism.js +33 -0
- package/dist/policy-packs.d.ts +69 -0
- package/dist/policy-packs.d.ts.map +1 -0
- package/dist/policy-packs.js +205 -0
- package/dist/policy-source.d.ts +51 -0
- package/dist/policy-source.d.ts.map +1 -0
- package/dist/policy-source.js +102 -0
- package/dist/pr-forge.d.ts +40 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +146 -37
- package/dist/pr-loop.d.ts +158 -11
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +302 -44
- package/dist/pr-merge.d.ts +64 -0
- package/dist/pr-merge.d.ts.map +1 -0
- package/dist/pr-merge.js +78 -0
- package/dist/pr-post.d.ts +86 -1
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +141 -5
- package/dist/pr-report-url.d.ts +32 -4
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +45 -5
- package/dist/pr-requires.d.ts +13 -2
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/pr-requires.js +14 -0
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/run-event.d.ts +26 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +3 -1
- package/dist/scheduled-op-cloud.d.ts +32 -0
- package/dist/scheduled-op-cloud.d.ts.map +1 -0
- package/dist/scheduled-op-cloud.js +69 -0
- package/dist/sorted-json.d.ts +10 -0
- package/dist/sorted-json.d.ts.map +1 -0
- package/dist/sorted-json.js +14 -0
- package/dist/terraform/credentials.d.ts +59 -0
- package/dist/terraform/credentials.d.ts.map +1 -0
- package/dist/terraform/credentials.js +149 -0
- package/dist/utils.d.ts +1 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -9
- package/dist/wave-runtime.d.ts +1 -1
- package/dist/wave-runtime.js +2 -2
- package/dist/wave-runtime.mjs +405 -287
- package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -1
- package/dist/workspace/chant-migrations/chud-lexicon-exit.js +4 -1
- package/dist/workspace/ci-lock-grain.d.ts +17 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -0
- package/dist/workspace/ci-lock-grain.js +21 -0
- package/dist/workspace/ci-run.d.ts +2 -1
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +10 -3
- package/dist/workspace/declaration.d.ts +16 -4
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +5 -2
- package/dist/workspace/declaration.schema.json +27 -3
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +8 -3
- package/dist/workspace/exit-cli.d.ts +1 -1
- package/dist/workspace/exit-cli.d.ts.map +1 -1
- package/dist/workspace/exit-cli.js +2 -1
- package/dist/workspace/import-fetch.d.ts +4 -2
- package/dist/workspace/import-fetch.d.ts.map +1 -1
- package/dist/workspace/import-fetch.js +4 -2
- package/dist/workspace/import-init.d.ts.map +1 -1
- package/dist/workspace/import-init.js +4 -2
- package/dist/workspace/ledger.schema.json +7 -3
- package/dist/workspace/lineage-upgrade-cli.d.ts +1 -1
- package/dist/workspace/lineage-upgrade-cli.d.ts.map +1 -1
- package/dist/workspace/lineage-upgrade-cli.js +2 -1
- package/dist/workspace/pr-report.schema.json +79 -3
- package/dist/workspace/promote.d.ts +1 -1
- package/dist/workspace/promote.d.ts.map +1 -1
- package/dist/workspace/promote.js +2 -1
- package/dist/workspace/records-cli.d.ts +2 -2
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-cli.js +3 -2
- package/dist/workspace/release-catalog.schema.json +277 -0
- package/dist/workspace/run-event.schema.json +18 -1
- package/dist/workspace/work-cli.d.ts +3 -1
- package/dist/workspace/work-cli.d.ts.map +1 -1
- package/dist/workspace/work-cli.js +7 -2
- package/dist/workspace/workspace-run.d.ts.map +1 -1
- package/dist/workspace/workspace-run.js +2 -1
- package/package.json +21 -1
- package/src/__fixtures__/estate-ledger.ts +101 -0
- package/src/__fixtures__/oidc-emulator.ts +31 -2
- package/src/__fixtures__/product-words.ts +44 -0
- package/src/__golden__/wave-loop/op-by-apply-after-fails.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-hold.json +20 -4
- package/src/__golden__/wave-loop/op-by-apply-ignored.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-pass.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-skip.json +10 -2
- package/src/__golden__/wave-loop/op-discover-rest-stops.json +22 -6
- package/src/__golden__/wave-loop/op-discover-rest.json +44 -12
- package/src/__golden__/wave-loop/op-discover-wide.json +12 -3
- package/src/__golden__/wave-loop/op-held-on.json +28 -7
- package/src/__golden__/wave-loop/op-hooks-apply-fails.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-fail-after-apply.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-fail-before-apply.json +4 -2
- package/src/__golden__/wave-loop/op-hooks-held.json +26 -8
- package/src/__golden__/wave-loop/op-hooks-hold-before-apply.json +18 -4
- package/src/__golden__/wave-loop/op-hooks-pass.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-share.json +20 -7
- package/src/__golden__/wave-loop/op-outcome-held.json +12 -3
- package/src/__golden__/wave-loop/op-outcome-replan-approved.json +16 -5
- package/src/__golden__/wave-loop/op-outcome-replan-forever.json +48 -21
- package/src/__golden__/wave-loop/op-outcome-replan.json +16 -5
- package/src/__golden__/wave-loop/op-outcome-stood-down.json +12 -3
- package/src/__golden__/wave-loop/op-outcome-unreadable.json +12 -3
- package/src/__golden__/wave-loop/op-overridden.json +28 -7
- package/src/__golden__/wave-loop/op-per-run.json +20 -4
- package/src/__golden__/wave-loop/op-point.json +18 -4
- package/src/__golden__/wave-loop/op-pr-review.json +10 -2
- package/src/__golden__/wave-loop/op-spend-change-only.json +10 -2
- package/src/__golden__/wave-loop/op-spend.json +10 -2
- package/src/__golden__/wave-loop/op-wave-commands.json +56 -13
- package/src/__golden__/wave-loop/op-wide.json +20 -4
- package/src/bucket-check/azure.ts +307 -0
- package/src/bucket-check/bucket-check.test.ts +210 -0
- package/src/bucket-check/fixtures/azure.json +153 -0
- package/src/bucket-check/fixtures/gcs.json +148 -0
- package/src/bucket-check/fixtures/s3.json +277 -0
- package/src/bucket-check/gcs.ts +257 -0
- package/src/bucket-check/index.ts +61 -0
- package/src/bucket-check/s3.ts +433 -0
- package/src/bucket-check/types.ts +75 -0
- package/src/bucket-check/wire.ts +50 -0
- package/src/bucket-check.ts +5 -0
- package/src/capabilities/templates.test.ts +2 -3
- package/src/capabilities/templates.ts +1 -2
- package/src/cdk/advise.test.ts +1 -1
- package/src/change-set-bundle.test.ts +0 -1
- package/src/change-set.ts +2 -3
- package/src/ci-agent.test.ts +348 -0
- package/src/ci-agent.ts +1025 -0
- package/src/ci-audit/__fixtures__/cloudtrail-lookup-bucket.json +37 -0
- package/src/ci-audit/__fixtures__/cloudtrail-writes-window.json +59 -0
- package/src/ci-audit/attribution.ts +260 -0
- package/src/ci-audit/audit-log.ts +220 -0
- package/src/ci-audit/ci-audit.test.ts +175 -0
- package/src/ci-audit/index.ts +15 -0
- package/src/ci-audit/unrecorded.ts +140 -0
- package/src/ci-audit.ts +2 -0
- package/src/ci-control.ts +173 -0
- package/src/ci-estate/delivery.ts +433 -0
- package/src/ci-estate/overdue.ts +81 -0
- package/src/ci-estate/page.ts +343 -0
- package/src/ci-estate/rows.ts +251 -0
- package/src/ci-estate.test.ts +281 -0
- package/src/ci-estate.ts +175 -0
- package/src/ci-handover.ts +67 -16
- package/src/ci-identity-database.test.ts +54 -0
- package/src/ci-identity-pulumi.test.ts +163 -0
- package/src/ci-identity-targets.test.ts +3 -1
- package/src/ci-identity.ts +123 -22
- package/src/ci-job-guard.test.ts +154 -0
- package/src/ci-job-guard.ts +319 -0
- package/src/ci-jobs.ts +8 -0
- package/src/ci-product-comment-targets.test.ts +45 -0
- package/src/ci-product-words.test.ts +101 -0
- package/src/ci-product-words.ts +565 -0
- package/src/ci-product.ts +226 -0
- package/src/ci-respond-run.ts +291 -0
- package/src/ci-respond.test.ts +264 -0
- package/src/ci-respond.ts +412 -0
- package/src/ci-shared-reads.test.ts +145 -0
- package/src/cli/commands/audit.test.ts +1 -1
- package/src/cli/commands/audit.ts +3 -2
- package/src/cli/commands/carve.test.ts +1 -1
- package/src/cli/commands/carve.ts +2 -2
- package/src/cli/commands/init.ts +3 -1
- package/src/cli/component-wave-args.test.ts +16 -0
- package/src/cli/handlers/agent.ts +126 -0
- package/src/cli/handlers/approve-confirm.test.ts +276 -0
- package/src/cli/handlers/approve-confirm.ts +200 -0
- package/src/cli/handlers/approve.ts +18 -1
- package/src/cli/handlers/audit-log.ts +74 -0
- package/src/cli/handlers/build-pr-loop-flags.test.ts +98 -0
- package/src/cli/handlers/build.test.ts +7 -0
- package/src/cli/handlers/build.ts +113 -1
- package/src/cli/handlers/ci-check-job.test.ts +114 -0
- package/src/cli/handlers/ci-check-job.ts +33 -0
- package/src/cli/handlers/ci-check.ts +63 -0
- package/src/cli/handlers/ci-forge-check.ts +91 -0
- package/src/cli/handlers/e2e-safe-run.ts +27 -0
- package/src/cli/handlers/fan-out.test.ts +10 -10
- package/src/cli/handlers/fan-out.ts +5 -0
- package/src/cli/handlers/gate-pending.ts +46 -0
- package/src/cli/handlers/init.ts +1 -0
- package/src/cli/handlers/ledger.ts +1 -1
- package/src/cli/handlers/lifecycle-drift.ts +7 -2
- package/src/cli/handlers/lock.test.ts +29 -2
- package/src/cli/handlers/lock.ts +66 -6
- package/src/cli/handlers/notify-relay.ts +130 -0
- package/src/cli/handlers/pr-before-merge.test.ts +2 -1
- package/src/cli/handlers/pr-deploy-inputs.test.ts +7 -7
- package/src/cli/handlers/pr-env.ts +48 -11
- package/src/cli/handlers/pr-plan-comment-targets.test.ts +166 -0
- package/src/cli/handlers/pr-plan-flags.test.ts +161 -0
- package/src/cli/handlers/pr-plan-targets.test.ts +155 -0
- package/src/cli/handlers/pr-waves-blocked.test.ts +5 -0
- package/src/cli/handlers/pr-waves.test.ts +8 -2
- package/src/cli/handlers/pr.test.ts +8 -8
- package/src/cli/handlers/pr.ts +879 -205
- package/src/cli/handlers/promote.test.ts +5 -5
- package/src/cli/handlers/promote.ts +22 -2
- package/src/cli/handlers/release.ts +2 -0
- package/src/cli/handlers/run-components-exit.test.ts +7 -7
- package/src/cli/handlers/run-wave.ts +144 -2
- package/src/cli/handlers/run.test.ts +6 -4
- package/src/cli/handlers/run.ts +86 -1
- package/src/cli/handlers/serve.ts +10 -1
- package/src/cli/main.test.ts +1 -1
- package/src/cli/main.ts +180 -13
- package/src/cli/mcp/ledger-tools.ts +126 -0
- package/src/cli/mcp/product-tools.test.ts +123 -0
- package/src/cli/mcp/product-tools.ts +129 -0
- package/src/cli/mcp/read-only.test.ts +134 -0
- package/src/cli/mcp/read-only.ts +68 -0
- package/src/cli/mcp/report-tools.ts +135 -0
- package/src/cli/mcp/server.test.ts +5 -4
- package/src/cli/mcp/server.ts +90 -16
- package/src/cli/mcp-config.ts +8 -3
- package/src/cli/parse-args.ts +119 -2
- package/src/cli/registry.ts +73 -0
- package/src/cloud-lister/sigv4.ts +80 -23
- package/src/components/adoption.test.ts +140 -0
- package/src/components/adoption.ts +140 -0
- package/src/components/apply-lease.ts +49 -0
- package/src/components/capability.ts +180 -6
- package/src/components/check-hooks.test.ts +66 -0
- package/src/components/check-hooks.ts +255 -0
- package/src/components/check-steps.test.ts +70 -0
- package/src/components/check-steps.ts +158 -0
- package/src/components/ci-services.test.ts +51 -0
- package/src/components/ci-services.ts +82 -0
- package/src/components/cli-support.ts +23 -2
- package/src/components/driver.test.ts +3 -3
- package/src/components/driver.ts +73 -6
- package/src/components/fan-out-run.ts +68 -18
- package/src/components/groups.ts +21 -4
- package/src/components/plan-flags.test.ts +46 -0
- package/src/components/pr-comment-preview-targets.test.ts +34 -0
- package/src/components/pr-comment-preview.test.ts +54 -0
- package/src/components/pr-env-ledger.test.ts +9 -0
- package/src/components/pr-env-ledger.ts +42 -0
- package/src/components/pr-env-ports.ts +29 -4
- package/src/components/pr-env-run-bundle.test.ts +2 -14
- package/src/components/pr-env-run.test.ts +19 -0
- package/src/components/pr-env-run.ts +12 -2
- package/src/components/pr-environment.test.ts +29 -0
- package/src/components/pr-environment.ts +40 -8
- package/src/components/pr-pipeline-runners.test.ts +80 -0
- package/src/components/pr-pipeline.test.ts +15 -0
- package/src/components/pr-pipeline.ts +498 -18
- package/src/components/pr-policy.ts +45 -7
- package/src/components/pr-run.test.ts +1 -1
- package/src/components/pr-run.ts +138 -11
- package/src/components/pr-stale-job.test.ts +34 -0
- package/src/components/pr-targets.test.ts +35 -0
- package/src/components/pr-targets.ts +45 -0
- package/src/components/product-pipeline.test.ts +200 -0
- package/src/components/product-pipeline.ts +383 -0
- package/src/components/promote.ts +10 -1
- package/src/components/release-compile.ts +87 -1
- package/src/components/release-promote.ts +65 -1
- package/src/components/repo-lock.ts +52 -0
- package/src/components/row-lease.test.ts +490 -0
- package/src/components/row-lease.ts +167 -0
- package/src/components/wave-plan-policy.test.ts +19 -0
- package/src/components/wave-plan.ts +96 -6
- package/src/control/__fixtures__/consumers/apps/consumers.json +15 -0
- package/src/control/__fixtures__/consumers/infra/consumers.json +23 -0
- package/src/control/applied.test.ts +148 -0
- package/src/control/applied.ts +191 -0
- package/src/control/consumers.test.ts +129 -0
- package/src/control/consumers.ts +192 -0
- package/src/control/control.test.ts +302 -0
- package/src/control/dispatch.ts +699 -0
- package/src/control/edges.test.ts +112 -0
- package/src/control/edges.ts +164 -0
- package/src/control/note-checkout.test.ts +91 -0
- package/src/control/reconcile.ts +250 -0
- package/src/control/records.ts +395 -0
- package/src/discovery/sandbox/bundle.ts +25 -1
- package/src/e2e-harness/__project__/chant.config.ts +4 -0
- package/src/e2e-harness/__project__/src/compose.ts +33 -0
- package/src/e2e-harness/bucket.ts +69 -0
- package/src/e2e-harness/claim.test.ts +150 -0
- package/src/e2e-harness/claim.ts +140 -0
- package/src/e2e-harness/driver.test.ts +304 -0
- package/src/e2e-harness/driver.ts +294 -0
- package/src/e2e-harness/forgejo.ts +267 -0
- package/src/e2e-harness/git.ts +96 -0
- package/src/e2e-harness/index.ts +50 -0
- package/src/e2e-harness/jobs.ts +35 -0
- package/src/e2e-harness/pins.ts +52 -0
- package/src/e2e-harness/ports.ts +130 -0
- package/src/e2e-harness/reports.ts +79 -0
- package/src/e2e-harness/safe-run-cli.test.ts +102 -0
- package/src/e2e-harness/safe-run-cli.ts +54 -0
- package/src/e2e-harness/safe-run.ts +198 -0
- package/src/e2e-harness/scenario.ts +89 -0
- package/src/e2e-harness/schemas/README.md +62 -0
- package/src/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/src/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/src/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/src/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/src/e2e-harness/schemas/index.ts +220 -0
- package/src/e2e-harness/schemas.test.ts +145 -0
- package/src/e2e-harness/stack.test.ts +124 -0
- package/src/e2e-harness/stack.ts +306 -0
- package/src/e2e-harness/steps.ts +30 -0
- package/src/e2e-harness.ts +2 -0
- package/src/engine-facts.test.ts +2 -3
- package/src/engine-facts.ts +1 -2
- package/src/exit-codes.test.ts +32 -0
- package/src/exit-codes.ts +61 -0
- package/src/forge-check/check.ts +155 -0
- package/src/forge-check/contract.ts +215 -0
- package/src/forge-check/forge-check.test.ts +427 -0
- package/src/forge-check/forge.ts +318 -0
- package/src/forge-check/index.ts +43 -0
- package/src/forge-check/pulumi.ts +192 -0
- package/src/forge-check/read-only.ts +56 -0
- package/src/forge-check/trust.ts +527 -0
- package/src/forge-check/types.ts +78 -0
- package/src/forge-check.ts +5 -0
- package/src/gate-decision-bundle.test.ts +11 -0
- package/src/gate-decision.ts +3 -0
- package/src/gate-policy.ts +92 -3
- package/src/gated-waves-bundle.test.ts +0 -1
- package/src/index.ts +2 -0
- package/src/lexicon.ts +143 -6
- package/src/lifecycle/adoption-file.ts +1 -2
- package/src/lifecycle/cloud-index.test.ts +2 -3
- package/src/lifecycle/cloud-index.ts +1 -2
- package/src/lifecycle/control-entries-ledger.test.ts +69 -0
- package/src/lifecycle/gate-applied.ts +6 -0
- package/src/lifecycle/gate-ledger.ts +35 -1
- package/src/lifecycle/gate-pending-by-plan.test.ts +69 -0
- package/src/lifecycle/gate-pending-by-plan.ts +133 -0
- package/src/lifecycle/gated-request-digest.ts +49 -0
- package/src/lifecycle/gated-request-ledger.test.ts +53 -0
- package/src/lifecycle/gated-request.ts +279 -0
- package/src/lifecycle/identity-match.ts +25 -6
- package/src/lifecycle/index-diff.ts +1 -2
- package/src/lifecycle/index-document.ts +1 -2
- package/src/lifecycle/index-import.test.ts +14 -0
- package/src/lifecycle/index-import.ts +54 -34
- package/src/lifecycle/ledger-read.ts +7 -3
- package/src/lifecycle/lock-rows.test.ts +109 -0
- package/src/lifecycle/lock-rows.ts +167 -0
- package/src/lifecycle/publish-target-context.test.ts +108 -0
- package/src/lifecycle/query.test.ts +2 -3
- package/src/lifecycle/query.ts +109 -8
- package/src/lifecycle/release-catalog-site.test.ts +142 -0
- package/src/lifecycle/release-catalog-site.ts +291 -0
- package/src/lifecycle/release-catalog.test.ts +192 -0
- package/src/lifecycle/release-catalog.ts +353 -0
- package/src/lifecycle/release-changelog.test.ts +70 -0
- package/src/lifecycle/release-changelog.ts +71 -0
- package/src/lifecycle/release-cut.ts +2 -2
- package/src/lifecycle/release-ledger.ts +19 -0
- package/src/lifecycle/release-publish.ts +45 -22
- package/src/lifecycle/release-read.ts +2 -0
- package/src/lifecycle/release-status.test.ts +185 -0
- package/src/lifecycle/release-status.ts +175 -0
- package/src/lifecycle/resource-lock.test.ts +175 -0
- package/src/lifecycle/resource-lock.ts +354 -0
- package/src/lifecycle/retention.ts +2 -0
- package/src/lifecycle/run-ledger.ts +7 -1
- package/src/lifecycle/snapshot-store-s3.ts +9 -45
- package/src/lifecycle/snapshot-store.ts +1 -2
- package/src/lifecycle/target-lock.ts +24 -9
- package/src/lifecycle/wave-plans.ts +33 -5
- package/src/mcp/types.ts +7 -0
- package/src/notify-product.ts +76 -0
- package/src/notify-relay.test.ts +213 -0
- package/src/notify-relay.ts +407 -0
- package/src/notify.ts +95 -14
- package/src/object-store/azure-blob.ts +374 -0
- package/src/object-store/common.ts +133 -0
- package/src/object-store/errors.ts +26 -0
- package/src/object-store/from-env.ts +36 -0
- package/src/object-store/gcs.ts +436 -0
- package/src/object-store/index.ts +8 -0
- package/src/object-store/object-store.test.ts +130 -0
- package/src/object-store/s3.ts +350 -0
- package/src/op/activities/converge.ts +2 -1
- package/src/op/activities/index.ts +1 -1
- package/src/op/activities/review-agent.open.test.ts +78 -0
- package/src/op/activities/review-agent.test.ts +13 -0
- package/src/op/activities/review-agent.ts +89 -5
- package/src/op/approval-status.test.ts +134 -0
- package/src/op/approval-status.ts +235 -0
- package/src/op/gate-review.test.ts +2 -1
- package/src/op/gate.ts +81 -22
- package/src/op/generate-pipeline.ts +7 -1
- package/src/op/index.ts +23 -0
- package/src/op/op-waves-after-plan.test.ts +288 -0
- package/src/op/op-waves-after-plan.ts +238 -0
- package/src/op/op-waves-capability-spec.ts +133 -0
- package/src/op/op-waves-capability.test.ts +217 -0
- package/src/op/op-waves-capability.ts +370 -0
- package/src/op/op-waves-events.ts +135 -0
- package/src/op/op-waves-notify-words.test.ts +149 -0
- package/src/op/op-waves-notify.ts +41 -16
- package/src/op/op-waves-parallelism.test.ts +89 -0
- package/src/op/op-waves-pull-request.test.ts +219 -0
- package/src/op/op-waves-release-port.ts +64 -0
- package/src/op/op-waves-release.test.ts +209 -0
- package/src/op/op-waves-release.ts +132 -0
- package/src/op/op-waves-run-record.test.ts +32 -0
- package/src/op/op-waves-run.ts +1235 -52
- package/src/op/op-waves-stand-down.test.ts +240 -0
- package/src/op/op-waves-stand-down.ts +107 -0
- package/src/op/op-waves-trace.test.ts +205 -0
- package/src/op/op-waves.test.ts +112 -0
- package/src/op/op-waves.ts +320 -22
- package/src/op/runtime.ts +107 -0
- package/src/op/stage-hooks-hold-record.test.ts +41 -0
- package/src/op/stage-hooks.ts +91 -12
- package/src/op/steward-beside.ts +2 -1
- package/src/op/types.ts +3 -2
- package/src/otlp-metrics.ts +96 -0
- package/src/otlp.test.ts +243 -0
- package/src/otlp.ts +543 -0
- package/src/override-gate-bundle.test.ts +2 -0
- package/src/override-gate.ts +4 -0
- package/src/parallelism.test.ts +38 -0
- package/src/parallelism.ts +33 -0
- package/src/policy-packs.ts +230 -0
- package/src/policy-source.test.ts +256 -0
- package/src/policy-source.ts +111 -0
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +175 -33
- package/src/pr-loop-bundle.test.ts +7 -3
- package/src/pr-loop-narrowed.test.ts +63 -0
- package/src/pr-loop-words.test.ts +155 -0
- package/src/pr-loop.ts +398 -52
- package/src/pr-merge.test.ts +100 -0
- package/src/pr-merge.ts +105 -0
- package/src/pr-post-stale.test.ts +163 -0
- package/src/pr-post.ts +190 -5
- package/src/pr-report-url.ts +61 -6
- package/src/pr-requires.test.ts +37 -1
- package/src/pr-requires.ts +16 -2
- package/src/product-subpaths-plain-node.e2e.test.ts +212 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +28 -1
- package/src/scheduled-op-cloud.ts +68 -0
- package/src/sorted-json.ts +17 -0
- package/src/stage-hooks-bundle.test.ts +6 -0
- package/src/terraform/credentials.test.ts +77 -0
- package/src/terraform/credentials.ts +162 -0
- package/src/utils.ts +2 -11
- package/src/wave-loop-golden.test.ts +2 -1
- package/src/wave-runtime.ts +2 -2
- package/src/workspace/chant-migrations/chud-lexicon-exit.ts +4 -1
- package/src/workspace/ci-lock-grain.test.ts +31 -0
- package/src/workspace/ci-lock-grain.ts +29 -0
- package/src/workspace/ci-report-url.test.ts +1 -1
- package/src/workspace/ci-run.test.ts +1 -1
- package/src/workspace/ci-run.ts +10 -3
- package/src/workspace/declaration.schema.json +27 -3
- package/src/workspace/declaration.test.ts +1 -1
- package/src/workspace/declaration.ts +26 -10
- package/src/workspace/drift-cli.ts +8 -3
- package/src/workspace/exit-cli.ts +2 -1
- package/src/workspace/import-fetch.ts +4 -2
- package/src/workspace/import-init.ts +4 -2
- package/src/workspace/ledger.schema.json +7 -3
- package/src/workspace/lineage-upgrade-cli.ts +2 -1
- package/src/workspace/pr-report.schema.json +79 -3
- package/src/workspace/promote.ts +2 -1
- package/src/workspace/records-cli.ts +3 -2
- package/src/workspace/release-catalog.schema.json +277 -0
- package/src/workspace/run-event.schema.json +18 -1
- package/src/workspace/work-cli.ts +8 -2
- package/src/workspace/workspace-run.ts +2 -1
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Responses to pipeline events (#4629), in CI core so terragucci and plywood
|
|
3
|
+
* answer the same events the same way, each in its own words.
|
|
4
|
+
*
|
|
5
|
+
* - `wave-refused: diff`: a wave that applied nothing because its plan moved
|
|
6
|
+
* since the approval, another run held it, or its decision point declined
|
|
7
|
+
* it posts which members moved and what moved in them, from the approved
|
|
8
|
+
* change set and the current one.
|
|
9
|
+
* - `apply-failed: triage`: a failed apply posts the members and resources
|
|
10
|
+
* that failed with the engine's error, from the run record (an op wave's)
|
|
11
|
+
* or the apply report (`pr-apply`'s).
|
|
12
|
+
* - `description: check`: with a decide service set, the plan-note job asks
|
|
13
|
+
* whether the pull request's title and description leave out what its
|
|
14
|
+
* change set destroys or replaces, and posts the finding. It never
|
|
15
|
+
* approves, gates or blocks anything.
|
|
16
|
+
*
|
|
17
|
+
* The first two are on by default and the third is off. Each one is turned
|
|
18
|
+
* off (or on) with a list such as `wave-refused=off,description=check`: the
|
|
19
|
+
* `--respond` flag, the `CHANT_RESPOND` variable a generated job sets, or an
|
|
20
|
+
* op waves spec's `respond`.
|
|
21
|
+
*
|
|
22
|
+
* Every post is one comment per event and place, found again by its marker,
|
|
23
|
+
* so a job that runs twice edits its comment. Delivery never throws and never
|
|
24
|
+
* changes a job's exit code.
|
|
25
|
+
*/
|
|
26
|
+
import { activeProductWords } from "./ci-product-words.js";
|
|
27
|
+
/** Each event's modes; the first is its default. */
|
|
28
|
+
export const CI_RESPONSES = {
|
|
29
|
+
"wave-refused": ["diff", "off"],
|
|
30
|
+
"apply-failed": ["triage", "off"],
|
|
31
|
+
description: ["off", "check"],
|
|
32
|
+
};
|
|
33
|
+
/** The variable a generated job carries its responses in. */
|
|
34
|
+
export const CI_RESPOND_ENV = "CHANT_RESPOND";
|
|
35
|
+
/** Every event at its default. */
|
|
36
|
+
export const CI_RESPOND_DEFAULTS = { "wave-refused": "diff", "apply-failed": "triage", description: "off" };
|
|
37
|
+
/** `wave-refused=off,description=check` as responses, or why it is not a list of them. */
|
|
38
|
+
export function parseRespondList(text) {
|
|
39
|
+
const parts = (typeof text === "string" ? text.split(",") : text.flatMap((t) => t.split(","))).map((p) => p.trim()).filter(Boolean);
|
|
40
|
+
const out = {};
|
|
41
|
+
for (const part of parts) {
|
|
42
|
+
const eq = part.indexOf("=");
|
|
43
|
+
const event = eq < 0 ? part : part.slice(0, eq);
|
|
44
|
+
const mode = eq < 0 ? "" : part.slice(eq + 1);
|
|
45
|
+
if (!(event in CI_RESPONSES))
|
|
46
|
+
return { error: `--respond names no event ${JSON.stringify(event)}; the events are ${Object.keys(CI_RESPONSES).join(", ")}` };
|
|
47
|
+
const modes = CI_RESPONSES[event];
|
|
48
|
+
if (!modes.includes(mode))
|
|
49
|
+
return { error: `--respond ${event} takes ${modes.join(" or ")}, not ${JSON.stringify(mode)}` };
|
|
50
|
+
out[event] = mode;
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
/** The list form of `responses`, for `--respond` and {@link CI_RESPOND_ENV}. Empty when every event is at its default. */
|
|
55
|
+
export function respondList(responses) {
|
|
56
|
+
return Object.keys(CI_RESPONSES)
|
|
57
|
+
.filter((e) => responses[e] !== undefined && responses[e] !== CI_RESPOND_DEFAULTS[e])
|
|
58
|
+
.map((e) => `${e}=${responses[e]}`)
|
|
59
|
+
.join(",");
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The responses in force: the defaults, then `CHANT_RESPOND`, then the
|
|
63
|
+
* spec's or the flag's. A malformed variable is ignored with a warning,
|
|
64
|
+
* since a response never stops a job.
|
|
65
|
+
*/
|
|
66
|
+
export function resolveResponses(given, env = process.env, warn = () => { }) {
|
|
67
|
+
let fromEnv = {};
|
|
68
|
+
const raw = env[CI_RESPOND_ENV];
|
|
69
|
+
if (raw) {
|
|
70
|
+
const parsed = parseRespondList(raw);
|
|
71
|
+
if ("error" in parsed)
|
|
72
|
+
warn(`${CI_RESPOND_ENV} is ignored: ${parsed.error}`);
|
|
73
|
+
else
|
|
74
|
+
fromEnv = parsed;
|
|
75
|
+
}
|
|
76
|
+
return { ...CI_RESPOND_DEFAULTS, ...fromEnv, ...(given ?? {}) };
|
|
77
|
+
}
|
|
78
|
+
/** The hidden marker of one response's comment. */
|
|
79
|
+
export function respondMarker(event, place) {
|
|
80
|
+
return `<!-- chant:respond:${event}:${place.replace(/[^A-Za-z0-9._/-]/g, "_")} -->`;
|
|
81
|
+
}
|
|
82
|
+
const shown = (a) => a === undefined ? undefined : a.sensitive ? "(sensitive)" : a.unknown ? "(known after apply)" : JSON.stringify(a.after ?? null);
|
|
83
|
+
function entryDiffs(was, now) {
|
|
84
|
+
const key = (e) => `${e.address}\u0000${e.deposed ?? ""}`;
|
|
85
|
+
const before = new Map(was.map((e) => [key(e), e]));
|
|
86
|
+
const after = new Map(now.map((e) => [key(e), e]));
|
|
87
|
+
const out = [];
|
|
88
|
+
for (const k of [...new Set([...before.keys(), ...after.keys()])].sort()) {
|
|
89
|
+
const b = before.get(k);
|
|
90
|
+
const a = after.get(k);
|
|
91
|
+
const paths = new Set([...(b?.attributes ?? []).map((x) => x.path), ...(a?.attributes ?? []).map((x) => x.path)]);
|
|
92
|
+
const moved = [...paths].filter((p) => shown(b?.attributes.find((x) => x.path === p)) !== shown(a?.attributes.find((x) => x.path === p))).sort();
|
|
93
|
+
if (b?.action === a?.action && moved.length === 0)
|
|
94
|
+
continue;
|
|
95
|
+
out.push({ address: (a ?? b).address, ...(b ? { was: b.action } : {}), ...(a ? { now: a.action } : {}), attributes: moved });
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The members whose plan digest differs between the approved change set and
|
|
101
|
+
* the current one, entry by entry. `only` narrows to the members a wave
|
|
102
|
+
* holds. A member that planned the same in both is left out.
|
|
103
|
+
*/
|
|
104
|
+
export function changeSetDiff(approved, current, only) {
|
|
105
|
+
const names = new Set([...(approved?.members ?? []).map((m) => m.member), ...(current?.members ?? []).map((m) => m.member)]);
|
|
106
|
+
const keep = only ? new Set(only) : undefined;
|
|
107
|
+
const out = [];
|
|
108
|
+
for (const member of [...names].sort()) {
|
|
109
|
+
if (keep && !keep.has(member))
|
|
110
|
+
continue;
|
|
111
|
+
const was = approved?.members.find((m) => m.member === member)?.planDigest ?? null;
|
|
112
|
+
const now = current?.members.find((m) => m.member === member)?.planDigest ?? null;
|
|
113
|
+
if (was === now && was !== null)
|
|
114
|
+
continue;
|
|
115
|
+
const changes = approved && current ? entryDiffs(approved.entries.filter((e) => e.member === member), current.entries.filter((e) => e.member === member)) : [];
|
|
116
|
+
out.push({ member, approved: was, current: now, changes });
|
|
117
|
+
}
|
|
118
|
+
return out;
|
|
119
|
+
}
|
|
120
|
+
/** The members whose plan digest differs, when only the digests are known (an op wave's decision against its share job's plans). */
|
|
121
|
+
export function digestDiff(approved, current) {
|
|
122
|
+
return [...new Set([...Object.keys(approved), ...Object.keys(current)])]
|
|
123
|
+
.sort()
|
|
124
|
+
.filter((m) => approved[m] !== current[m] || approved[m] == null)
|
|
125
|
+
.map((member) => ({ member, approved: approved[member] ?? null, current: current[member] ?? null, changes: [] }));
|
|
126
|
+
}
|
|
127
|
+
/** A digest's first 12 hex characters past its scheme; `none` when there is none. */
|
|
128
|
+
export const shortDigest = (d) => (d ? d.slice(d.lastIndexOf(":") + 1).slice(0, 12) : "none");
|
|
129
|
+
/** The post for a refused wave or apply, in the product's words. */
|
|
130
|
+
export function renderRefusedDiff(d, words = activeProductWords()) {
|
|
131
|
+
const [, applied] = words.verbs.apply;
|
|
132
|
+
const [nounOne, nounMany] = words.noun;
|
|
133
|
+
const lines = [];
|
|
134
|
+
if (d.reason === "moved") {
|
|
135
|
+
lines.push(`${capital(d.label)} ${applied} nothing: its plans changed after the approval (approved ${shortDigest(d.approved)}, now ${shortDigest(d.current)}).`);
|
|
136
|
+
}
|
|
137
|
+
else if (d.reason === "held") {
|
|
138
|
+
lines.push(`${capital(d.label)} ${applied} nothing: another run holds what it changes${d.detail ? ` (${d.detail})` : ""}.`);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
lines.push(`${capital(d.label)} ${applied} nothing: its decision point declined it${d.detail ? ` (${d.detail})` : ""}.`);
|
|
142
|
+
}
|
|
143
|
+
if (d.members.length === 0) {
|
|
144
|
+
if (d.reason === "moved")
|
|
145
|
+
lines.push("", `No ${nounOne}'s plan differs from the approved change set that could be read.`);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
lines.push("", `${d.members.length === 1 ? capital(nounOne) : capital(nounMany)} whose plan differs from the approved one:`, "");
|
|
149
|
+
for (const m of d.members) {
|
|
150
|
+
lines.push(`- \`${m.member}\`: plan ${shortDigest(m.approved)} -> ${shortDigest(m.current)}`);
|
|
151
|
+
for (const c of m.changes) {
|
|
152
|
+
const action = c.was === c.now ? c.now : `${c.was ?? "none"} -> ${c.now ?? "none"}`;
|
|
153
|
+
lines.push(` - \`${c.address}\` ${action}${c.attributes.length ? `: ${c.attributes.join(", ")}` : ""}`);
|
|
154
|
+
}
|
|
155
|
+
if (m.current === null)
|
|
156
|
+
lines.push(` - it did not ${words.verbs.plan[0]} this time`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (d.reason === "moved")
|
|
160
|
+
lines.push("", "Approve again only once the new plan is the one you want.");
|
|
161
|
+
else if (d.reason === "held")
|
|
162
|
+
lines.push("", `Run it again once the other run is done; the approval still stands.`);
|
|
163
|
+
return lines.join("\n");
|
|
164
|
+
}
|
|
165
|
+
/** The longest error kept per member, so one engine's dump cannot fill the comment. */
|
|
166
|
+
const ERROR_LIMIT = 2000;
|
|
167
|
+
const clip = (text) => (text.length > ERROR_LIMIT ? `${text.slice(0, ERROR_LIMIT)}\n... (cut at ${ERROR_LIMIT} characters; the job's log has the rest)` : text);
|
|
168
|
+
/** The post for a failed apply, in the product's words. */
|
|
169
|
+
export function renderTriage(f, words = activeProductWords()) {
|
|
170
|
+
const [apply] = words.verbs.apply;
|
|
171
|
+
const [nounOne, nounMany] = words.noun;
|
|
172
|
+
const lines = [`${capital(f.label)} failed (exit ${f.exitCode}).`];
|
|
173
|
+
if (f.members.length > 0) {
|
|
174
|
+
lines.push("", `${f.members.length === 1 ? capital(nounOne) : capital(nounMany)} that did not ${apply}:`);
|
|
175
|
+
for (const m of f.members) {
|
|
176
|
+
lines.push("", `- \`${m.member}\``);
|
|
177
|
+
if (m.resources?.length)
|
|
178
|
+
lines.push(` - failed resources: ${m.resources.map((r) => `\`${r}\``).join(", ")}`);
|
|
179
|
+
if (m.error)
|
|
180
|
+
lines.push("", "```", clip(m.error).replaceAll("```", "'''"), "```");
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (f.error)
|
|
184
|
+
lines.push("", "```", clip(f.error).replaceAll("```", "'''"), "```");
|
|
185
|
+
lines.push("", `What applied before the failure stays applied. Fix the cause and ${apply} again; the run record keeps every ${nounOne}'s outcome.`);
|
|
186
|
+
return lines.join("\n");
|
|
187
|
+
}
|
|
188
|
+
const MAX_TEXT = 4000;
|
|
189
|
+
const MAX_LISTED = 50;
|
|
190
|
+
const named = (e) => `${e.member}: ${e.address}`;
|
|
191
|
+
/** The destroys and replacements of a change set. */
|
|
192
|
+
export function destructiveEntries(doc) {
|
|
193
|
+
return { destroys: doc.entries.filter((e) => e.action === "delete"), replacements: doc.entries.filter((e) => e.action === "replace") };
|
|
194
|
+
}
|
|
195
|
+
export function descriptionState(doc, title, description) {
|
|
196
|
+
const { destroys, replacements } = destructiveEntries(doc);
|
|
197
|
+
const a = doc.summary.actions;
|
|
198
|
+
return {
|
|
199
|
+
title: title.slice(0, MAX_TEXT),
|
|
200
|
+
description: description.slice(0, MAX_TEXT),
|
|
201
|
+
plan: {
|
|
202
|
+
counts: { create: a.create ?? 0, update: a.update ?? 0, replace: a.replace ?? 0, delete: a.delete ?? 0 },
|
|
203
|
+
destroys: destroys.slice(0, MAX_LISTED).map(named),
|
|
204
|
+
replacements: replacements.slice(0, MAX_LISTED).map(named),
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/** Whether the text names an entry by its address, its type or its member. */
|
|
209
|
+
function mentions(text, e) {
|
|
210
|
+
const hay = text.toLowerCase();
|
|
211
|
+
return [e.address, e.address.replace(/\[.*$/, ""), e.name, e.type].some((s) => typeof s === "string" && s.length > 2 && hay.includes(s.toLowerCase()));
|
|
212
|
+
}
|
|
213
|
+
/** The destroys and replacements the text does not mention; every one when it names them all, since the model found the text leaves something out. */
|
|
214
|
+
export function unmentioned(doc, text) {
|
|
215
|
+
const { destroys, replacements } = destructiveEntries(doc);
|
|
216
|
+
const all = [...destroys, ...replacements];
|
|
217
|
+
const left = all.filter((e) => !mentions(text, e));
|
|
218
|
+
return left.length > 0 ? left : all;
|
|
219
|
+
}
|
|
220
|
+
/** The question asked. A Noul: the probability the answer is yes. */
|
|
221
|
+
export const DESCRIPTION_QUESTION = {
|
|
222
|
+
type: "noul",
|
|
223
|
+
instructions: "Read the pull request's title and description and the summary of its plan. Answer true when the plan destroys or replaces resources that the title and description do not mention or that they contradict. Answer false when the text covers every destroy and replacement, or the plan has none.",
|
|
224
|
+
criteria: {
|
|
225
|
+
true: "the plan destroys or replaces something the text leaves out or contradicts",
|
|
226
|
+
false: "the text describes every destroy and replacement, or there are none",
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
/** The default probability a yes needs before the finding is posted. */
|
|
230
|
+
export const DESCRIPTION_THRESHOLD = 0.8;
|
|
231
|
+
/** Ask whether the description leaves out a destroy or replacement. Never throws. */
|
|
232
|
+
export async function checkDescription(input) {
|
|
233
|
+
const { destroys, replacements } = destructiveEntries(input.doc);
|
|
234
|
+
if (destroys.length + replacements.length === 0)
|
|
235
|
+
return { status: "skipped", reason: "the plan destroys and replaces nothing", unmentioned: [] };
|
|
236
|
+
let answer;
|
|
237
|
+
try {
|
|
238
|
+
answer = await input.ask(descriptionState(input.doc, input.title, input.description));
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
return { status: "error", reason: err instanceof Error ? err.message : String(err), unmentioned: [] };
|
|
242
|
+
}
|
|
243
|
+
const threshold = input.threshold ?? DESCRIPTION_THRESHOLD;
|
|
244
|
+
const base = { probability: answer.probability, model: answer.model, ...(answer.reason ? { reason: answer.reason } : {}) };
|
|
245
|
+
if (!(answer.probability >= threshold))
|
|
246
|
+
return { status: "clear", ...base, unmentioned: [] };
|
|
247
|
+
const left = unmentioned(input.doc, `${input.title}\n${input.description}`);
|
|
248
|
+
const names = left.map(named);
|
|
249
|
+
return { status: "flagged", ...base, unmentioned: names, body: renderDescriptionFinding(left, base, input.words ?? activeProductWords()) };
|
|
250
|
+
}
|
|
251
|
+
function renderDescriptionFinding(left, answer, words) {
|
|
252
|
+
const list = left.slice(0, 10).map((e) => `- \`${named(e).replaceAll("`", "'")}\` (${e.action === "replace" ? "replace" : "destroy"})`);
|
|
253
|
+
if (left.length > 10)
|
|
254
|
+
list.push(`- and ${left.length - 10} more in the plan note`);
|
|
255
|
+
return [
|
|
256
|
+
`Check the description of this pull request. The ${words.verbs.plan[0]} makes changes it does not mention:`,
|
|
257
|
+
"",
|
|
258
|
+
...list,
|
|
259
|
+
"",
|
|
260
|
+
`${answer.model} answered yes with probability ${answer.probability.toFixed(2)}${answer.reason ? `: ${answer.reason}` : ""}. This finding approves nothing and never blocks a merge.`,
|
|
261
|
+
].join("\n");
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Post one response's body, editing its earlier comment. On a pull request
|
|
265
|
+
* the comment carries the marker as its first line; with no pull request it
|
|
266
|
+
* goes to a tracking issue titled `issue`. Never throws.
|
|
267
|
+
*/
|
|
268
|
+
export async function postResponse(forge, event, place, where, body) {
|
|
269
|
+
const marker = respondMarker(event, place);
|
|
270
|
+
const text = `${marker}\n${body}${body.endsWith("\n") ? "" : "\n"}`;
|
|
271
|
+
try {
|
|
272
|
+
if ("pr" in where) {
|
|
273
|
+
const r = await forge.upsertComment(where.pr, marker, text);
|
|
274
|
+
return { posted: true, ...(r.url ? { url: r.url } : {}) };
|
|
275
|
+
}
|
|
276
|
+
const r = await forge.trackIssue(marker, { title: where.issue, body: text }, { match: "anywhere" });
|
|
277
|
+
return { posted: true, ...(r.url ? { url: r.url } : {}) };
|
|
278
|
+
}
|
|
279
|
+
catch (err) {
|
|
280
|
+
return { posted: false, warning: `could not post the ${event} response: ${err instanceof Error ? err.message : String(err)}` };
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function capital(s) {
|
|
284
|
+
return s.length === 0 ? s : s[0].toUpperCase() + s.slice(1);
|
|
285
|
+
}
|
|
@@ -99,8 +99,8 @@ export interface AuditCommandResult {
|
|
|
99
99
|
/** Run diagnostics for stderr: a truncated scan in a format that cannot carry it (#2528). */
|
|
100
100
|
warnings?: AuditWarning[];
|
|
101
101
|
}
|
|
102
|
-
/** Exit code when the audit had no lexicons to look with
|
|
103
|
-
export declare const NO_LEXICONS_EXIT_CODE
|
|
102
|
+
/** Exit code when the audit had no lexicons to look with: a config failure, so `failed` (#4585). */
|
|
103
|
+
export declare const NO_LEXICONS_EXIT_CODE: 1;
|
|
104
104
|
/**
|
|
105
105
|
* The rule ids the audited project enables with `lint.rules` (anything but
|
|
106
106
|
* `"off"`), read from its config without running it, the way the audit reads
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/audit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AAC9H,OAAO,EAAmF,KAAK,aAAa,EAAE,KAAK,YAAY,EAAiB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEjM,OAA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iconMap, recordedLexiconModules } from "../../lexicon-module.js";
|
|
24
24
|
import { readConfigFieldsStatically, readLexiconDeclarationsStatically, unknownPathLexiconsNotice } from "../../config-static.js";
|
|
25
25
|
import { findProjectConfigPastFragments } from "../../config.js";
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
27
|
+
/** Exit code when the audit had no lexicons to look with: a config failure, so `failed` (#4585). */
|
|
28
|
+
export const NO_LEXICONS_EXIT_CODE = CHANT_EXIT.failed;
|
|
28
29
|
/**
|
|
29
30
|
* What to tell the user about lexicons that did not load: an `npm i` line for
|
|
30
31
|
* the package-backed ones, and the declared path for any lexicon
|
|
@@ -168,7 +168,7 @@ export function formatCarveReport(result) {
|
|
|
168
168
|
}
|
|
169
169
|
lines.push("");
|
|
170
170
|
}
|
|
171
|
-
lines.push(`Bands: 80-100 carve now | 50-79 carve with boundary edits | 0-49
|
|
171
|
+
lines.push(`Bands: 80-100 carve now | 50-79 carve with boundary edits | 0-49 stays in ${cdk ? "CDK" : "Terraform"}`);
|
|
172
172
|
if (cellWidth > 0) {
|
|
173
173
|
lines.push("Radius: resources+outputs that depend on it at any depth, dN the farthest hop; - none; " +
|
|
174
174
|
(cdk ? "xN across a stack boundary." : "? a module or unresolved count/for_each hides how many."));
|
|
@@ -200,7 +200,7 @@ function bandLabel(band, cdk) {
|
|
|
200
200
|
case "leave in Terraform":
|
|
201
201
|
// The band's name is part of the JSON contract and does not change per
|
|
202
202
|
// source; only the heading a person reads does.
|
|
203
|
-
return cdk ? "
|
|
203
|
+
return cdk ? "STAYS IN CDK" : "STAYS IN TERRAFORM";
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
/** One-line explanation of what drove a score, from its breakdown. */
|
|
@@ -14,6 +14,8 @@ export interface InitOptions {
|
|
|
14
14
|
force?: boolean;
|
|
15
15
|
/** Skip writing the project's `.mcp.json` (`--skip-mcp`) */
|
|
16
16
|
skipMcp?: boolean;
|
|
17
|
+
/** Register `chant serve mcp --read-only` in `.mcp.json` (`--mcp-read-only`, chant#4543) */
|
|
18
|
+
mcpReadOnly?: boolean;
|
|
17
19
|
/** Skip interactive install prompt */
|
|
18
20
|
skipInstall?: boolean;
|
|
19
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AASA,wEAAwE;AACxE,wBAAgB,eAAe,IAAI,MAAM,CAQxC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,6BAA6B;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,uBAAuB;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;aACpC,aAAa,EAAE,SAAS;aACxB,UAAU,EAAE,kBAAkB;CACtB,CAAC;AAkCX;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAmBzC;AAmHD;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG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BAAgB,gBAAgB,IAAI,MAAM,CAmBzC;AAmHD;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA6O3E;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CA8Cf"}
|
|
@@ -288,7 +288,7 @@ export async function initCommand(options) {
|
|
|
288
288
|
// chant #2383 for the three-way disagreement that came of writing it into
|
|
289
289
|
// the user's home directory instead.
|
|
290
290
|
if (!options.skipMcp) {
|
|
291
|
-
writeIfNotExists(mcpConfigPath(targetDir), generateMcpConfig(detectPackageManager(targetDir)), MCP_CONFIG_FILENAME, createdFiles, warnings);
|
|
291
|
+
writeIfNotExists(mcpConfigPath(targetDir), generateMcpConfig(detectPackageManager(targetDir), { readOnly: options.mcpReadOnly }), MCP_CONFIG_FILENAME, createdFiles, warnings);
|
|
292
292
|
}
|
|
293
293
|
// Install skills from the lexicon's plugin. With --skill, install only
|
|
294
294
|
// the matching skill; without, install all.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant agent prepare|run|land` (#4616): the three steps of the agent jobs
|
|
3
|
+
* the Op generator writes for a scheduled Op spec's `agent`
|
|
4
|
+
* (../../ci-agent.ts says what each does and which token each holds).
|
|
5
|
+
*
|
|
6
|
+
* ```
|
|
7
|
+
* chant agent prepare --forge <kind> [--output <dir>] the agent job, read token: decide
|
|
8
|
+
* chant agent run --forge <kind> [--output <dir>] the agent job, the model's key and no forge token
|
|
9
|
+
* chant agent land --forge <kind> [--output <dir>] the push job, write token: commit, push, pull request, record
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* The settings come from the job's `CHANT_AGENT_*` variables, which the
|
|
13
|
+
* generator wrote into the workflow file of the base branch.
|
|
14
|
+
*/
|
|
15
|
+
import type { CommandContext } from "../registry.js";
|
|
16
|
+
export declare function runAgentCommandLine(ctx: CommandContext): Promise<number>;
|
|
17
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAuBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkClD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuD9E"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant agent prepare|run|land` (#4616): the three steps of the agent jobs
|
|
3
|
+
* the Op generator writes for a scheduled Op spec's `agent`
|
|
4
|
+
* (../../ci-agent.ts says what each does and which token each holds).
|
|
5
|
+
*
|
|
6
|
+
* ```
|
|
7
|
+
* chant agent prepare --forge <kind> [--output <dir>] the agent job, read token: decide
|
|
8
|
+
* chant agent run --forge <kind> [--output <dir>] the agent job, the model's key and no forge token
|
|
9
|
+
* chant agent land --forge <kind> [--output <dir>] the push job, write token: commit, push, pull request, record
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* The settings come from the job's `CHANT_AGENT_*` variables, which the
|
|
13
|
+
* generator wrote into the workflow file of the base branch.
|
|
14
|
+
*/
|
|
15
|
+
import { execFileSync } from "node:child_process";
|
|
16
|
+
import { readFileSync } from "node:fs";
|
|
17
|
+
import { tmpdir } from "node:os";
|
|
18
|
+
import { join, resolve } from "node:path";
|
|
19
|
+
import { AGENT_DIR, AgentError, agentSettingsFromEnv, landAgentChange, prepareAgentRun, runAgent, runAgentCommand, } from "../../ci-agent.js";
|
|
20
|
+
import { activeProductWords } from "../../ci-product-words.js";
|
|
21
|
+
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
22
|
+
import { appendRunRecord, readRunLedger } from "../../lifecycle/run-ledger.js";
|
|
23
|
+
import { pushLifecycle } from "../../lifecycle/git.js";
|
|
24
|
+
import { resolveCiRun } from "../../lifecycle/release-ledger.js";
|
|
25
|
+
import { FORGE_KINDS, forgeFromEnv } from "../../pr-forge.js";
|
|
26
|
+
import { formatError, formatInfo } from "../format.js";
|
|
27
|
+
const USAGE = "chant agent prepare|run|land --forge github|gitlab|forgejo [--output <dir>]";
|
|
28
|
+
function fail(message) {
|
|
29
|
+
console.error(formatError({ message, hint: USAGE }));
|
|
30
|
+
return CHANT_EXIT.failed;
|
|
31
|
+
}
|
|
32
|
+
/** git with hooks and fsmonitor off: nothing here runs code from the repository. */
|
|
33
|
+
const git = (args, opts = {}) => execFileSync("git", ["-c", "core.hooksPath=/dev/null", "-c", "core.fsmonitor=false", ...args], {
|
|
34
|
+
cwd: opts.cwd,
|
|
35
|
+
input: opts.input,
|
|
36
|
+
encoding: "utf8",
|
|
37
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
38
|
+
env: { ...process.env, GIT_TERMINAL_PROMPT: "0" },
|
|
39
|
+
maxBuffer: 64 << 20,
|
|
40
|
+
});
|
|
41
|
+
function eventOf() {
|
|
42
|
+
const file = process.env.GITHUB_EVENT_PATH;
|
|
43
|
+
if (!file)
|
|
44
|
+
return undefined;
|
|
45
|
+
try {
|
|
46
|
+
return JSON.parse(readFileSync(file, "utf8"));
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function workDir(name) {
|
|
53
|
+
return join(process.env.RUNNER_TEMP || process.env.TMPDIR || tmpdir(), name);
|
|
54
|
+
}
|
|
55
|
+
export async function runAgentCommandLine(ctx) {
|
|
56
|
+
const action = ctx.args.path;
|
|
57
|
+
if (action !== "prepare" && action !== "run" && action !== "land")
|
|
58
|
+
return fail(action ? `agent ${action} is not one of prepare, run or land` : "agent needs an action: prepare, run or land");
|
|
59
|
+
const kind = ctx.args.forge;
|
|
60
|
+
if (!kind || !FORGE_KINDS.includes(kind))
|
|
61
|
+
return fail(`--forge is one of ${FORGE_KINDS.join(", ")}`);
|
|
62
|
+
const words = activeProductWords();
|
|
63
|
+
const dir = resolve(ctx.args.output ?? AGENT_DIR);
|
|
64
|
+
let settings;
|
|
65
|
+
try {
|
|
66
|
+
settings = agentSettingsFromEnv(process.env, words.product);
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
return fail(e.message);
|
|
70
|
+
}
|
|
71
|
+
const readRuns = async () => (await readRunLedger(settings.env, settings.name)).records;
|
|
72
|
+
const forge = () => forgeFromEnv(kind);
|
|
73
|
+
try {
|
|
74
|
+
if (action === "prepare") {
|
|
75
|
+
const d = await prepareAgentRun({ settings, words, dir, env: process.env, event: eventOf(), forge: settings.on === "comment" && kind !== "gitlab" ? forge() : undefined, readRuns, git, now: new Date() });
|
|
76
|
+
console.error(formatInfo(d.go ? `${words.product} agent: runs on ${d.sha?.slice(0, 12)}${d.pr ? ` for #${d.pr}` : ""}` : `${words.product} agent: does not run: ${d.reason}`));
|
|
77
|
+
return CHANT_EXIT.done;
|
|
78
|
+
}
|
|
79
|
+
if (action === "run") {
|
|
80
|
+
const r = await runAgent({ settings, dir, workDir: workDir("chant-agent-work"), env: process.env, git, runCommand: runAgentCommand });
|
|
81
|
+
console.error(formatInfo(`${words.product} agent: exited ${r.rc}${r.changed ? ", with a change" : ", changing nothing"}`));
|
|
82
|
+
// The push job says why on the pull request; this job stays green so it runs.
|
|
83
|
+
return CHANT_EXIT.done;
|
|
84
|
+
}
|
|
85
|
+
const ci = resolveCiRun(process.env);
|
|
86
|
+
const out = await landAgentChange({
|
|
87
|
+
settings,
|
|
88
|
+
words,
|
|
89
|
+
dir,
|
|
90
|
+
workDir: workDir("chant-agent-land"),
|
|
91
|
+
env: process.env,
|
|
92
|
+
event: eventOf(),
|
|
93
|
+
forge: forge(),
|
|
94
|
+
git,
|
|
95
|
+
push: ({ cwd, ref, lease }) => {
|
|
96
|
+
git(["push", "-q", ...(lease ? [`--force-with-lease=${lease}`] : []), "origin", `HEAD:${ref}`], { cwd });
|
|
97
|
+
},
|
|
98
|
+
readRuns,
|
|
99
|
+
record: async (input) => {
|
|
100
|
+
await appendRunRecord(input);
|
|
101
|
+
await pushLifecycle();
|
|
102
|
+
},
|
|
103
|
+
now: () => new Date(),
|
|
104
|
+
...(ci ? { runOrigin: ci.runOrigin } : {}),
|
|
105
|
+
});
|
|
106
|
+
console.error(formatInfo(`${words.product} agent: ${out.result}: ${out.reason}`));
|
|
107
|
+
return out.code;
|
|
108
|
+
}
|
|
109
|
+
catch (e) {
|
|
110
|
+
if (e instanceof AgentError)
|
|
111
|
+
return fail(e.message);
|
|
112
|
+
return fail(`agent ${action}: ${e.message}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant approve` at a terminal (#4575): show the plan the gate waits on and
|
|
3
|
+
* ask the person to type the target's name before anything is recorded.
|
|
4
|
+
*
|
|
5
|
+
* Ruled on INTENTIUS/sql-yodeler#285 (F): the type-the-name confirmation
|
|
6
|
+
* lives in chant core, so every product's approve word gets it from here and
|
|
7
|
+
* drops its own prompt. `yodel approve` is the model: it prints the plan and
|
|
8
|
+
* its digest, asks "Type <env> to approve", refuses a wrong answer, and reads
|
|
9
|
+
* the plan again after the answer so the approval is for the plan the person
|
|
10
|
+
* saw.
|
|
11
|
+
*
|
|
12
|
+
* Only a person at a terminal is asked: stdin and stdout both a TTY, no
|
|
13
|
+
* `--yes`, no `--json`, no `CI` in the environment, and a channel a person
|
|
14
|
+
* types on (not MCP or ACP). Every other run records as it did before.
|
|
15
|
+
*
|
|
16
|
+
* The plan shown is the stored change set (`_change-sets/<digest>.json`,
|
|
17
|
+
* `../../lifecycle/change-set-store.ts`) the pending fact cites: its
|
|
18
|
+
* `changeSet` field once chant#4551 adds one, else its `planDigest` when that
|
|
19
|
+
* is a change-set digest (pull-request and release gates). When none is
|
|
20
|
+
* stored, the pending fact's own lines are shown and the person is told where
|
|
21
|
+
* the plan was printed.
|
|
22
|
+
*/
|
|
23
|
+
import type { ParsedArgs } from "../registry.js";
|
|
24
|
+
import type { PendingGateRecord } from "../../lifecycle/gate-ledger.js";
|
|
25
|
+
/** The streams the terminal check reads. `process` in the CLI; tests pass their own. */
|
|
26
|
+
export interface ApprovalTerminal {
|
|
27
|
+
stdin: {
|
|
28
|
+
isTTY?: boolean;
|
|
29
|
+
};
|
|
30
|
+
stdout: {
|
|
31
|
+
isTTY?: boolean;
|
|
32
|
+
};
|
|
33
|
+
env: Record<string, string | undefined>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Whether `chant approve` asks before recording: a person at a terminal, on
|
|
37
|
+
* a shell channel, who did not pass `--yes` or `--json`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function interactiveApproval(args: Pick<ParsedArgs, "yes" | "json">, terminal?: ApprovalTerminal): Promise<boolean>;
|
|
40
|
+
/** What the confirmation decided. */
|
|
41
|
+
export type ApprovalConfirmation =
|
|
42
|
+
/** Nothing to show (no plan, a bad `--plan`, a ledger that can't be read): record as before, which reports the problem. */
|
|
43
|
+
{
|
|
44
|
+
status: "skipped";
|
|
45
|
+
}
|
|
46
|
+
/** The person typed the target's name; approve exactly `plan`. */
|
|
47
|
+
| {
|
|
48
|
+
status: "confirmed";
|
|
49
|
+
plan: string;
|
|
50
|
+
target: string;
|
|
51
|
+
}
|
|
52
|
+
/** Nothing is recorded; exit with `code`. */
|
|
53
|
+
| {
|
|
54
|
+
status: "refused";
|
|
55
|
+
code: number;
|
|
56
|
+
};
|
|
57
|
+
export interface ConfirmApprovalOptions {
|
|
58
|
+
/** `--plan`, when given. */
|
|
59
|
+
plan?: string;
|
|
60
|
+
/** `--env`, when given. */
|
|
61
|
+
environment?: string;
|
|
62
|
+
/** Where the ledger is read from. Defaults to the process's directory. */
|
|
63
|
+
cwd?: string;
|
|
64
|
+
/** Asks one question and resolves to the answer, or null at end of input. Defaults to a readline prompt on stderr. */
|
|
65
|
+
ask?: (question: string) => Promise<string | null>;
|
|
66
|
+
/** Where the plan is printed. Defaults to stdout. */
|
|
67
|
+
out?: (text: string) => void;
|
|
68
|
+
/** Where the questions' surroundings and refusals go. Defaults to stderr. */
|
|
69
|
+
err?: (text: string) => void;
|
|
70
|
+
}
|
|
71
|
+
/** Ask one line on the terminal; null when input ends before an answer. */
|
|
72
|
+
export declare function askLine(question: string): Promise<string | null>;
|
|
73
|
+
/**
|
|
74
|
+
* The name a person types to approve: the environment the pending fact was
|
|
75
|
+
* recorded in, else the one `--env` names, else the gate's own name.
|
|
76
|
+
*/
|
|
77
|
+
export declare function approvalTarget(gate: string, standing: Pick<PendingGateRecord, "environment"> | undefined, environment?: string): string;
|
|
78
|
+
/**
|
|
79
|
+
* Show the plan `chant approve <op> <gate>` would approve and ask for the
|
|
80
|
+
* target's name. The caller has already decided the run is interactive
|
|
81
|
+
* ({@link interactiveApproval}).
|
|
82
|
+
*/
|
|
83
|
+
export declare function confirmApproval(opName: string, gate: string, opts?: ConfirmApprovalOptions): Promise<ApprovalConfirmation>;
|
|
84
|
+
//# sourceMappingURL=approve-confirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approve-confirm.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve-confirm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC3B,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,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