@intentius/chant 0.102.0 → 0.104.1
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/audit/core.d.ts +2 -0
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/change-set.d.ts +232 -0
- package/dist/change-set.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +7 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/change-set.d.ts +11 -0
- package/dist/cli/handlers/change-set.d.ts.map +1 -0
- package/dist/cli/handlers/fan-out.d.ts +33 -0
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +7 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/pr.d.ts +31 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -0
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/op-tools.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts +3 -2
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +63 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts +16 -0
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/capability.d.ts +53 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/changed-files.d.ts +31 -0
- package/dist/components/changed-files.d.ts.map +1 -0
- package/dist/components/cli-support.d.ts +9 -1
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +24 -0
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/driver.d.ts +13 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/fan-out-output.d.ts +6 -0
- package/dist/components/fan-out-output.d.ts.map +1 -1
- package/dist/components/fan-out-record.d.ts +41 -0
- package/dist/components/fan-out-record.d.ts.map +1 -0
- package/dist/components/fan-out-run.d.ts +65 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-support.d.ts +2 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out.d.ts +6 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/gated-wave-pipeline.d.ts +50 -0
- package/dist/components/gated-wave-pipeline.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layers.d.ts +25 -0
- package/dist/components/layers.d.ts.map +1 -0
- package/dist/components/pr-pipeline.d.ts +61 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -0
- package/dist/components/pr-run.d.ts +119 -0
- package/dist/components/pr-run.d.ts.map +1 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/verbs/shell.d.ts.map +1 -1
- package/dist/components/wave-plan.d.ts +49 -0
- package/dist/components/wave-plan.d.ts.map +1 -0
- package/dist/gated-waves.d.ts +147 -0
- package/dist/gated-waves.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lexicon.d.ts +48 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +7 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +46 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lint/post-synth.d.ts +18 -0
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.d.ts +126 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/change-set.d.ts +62 -0
- package/dist/op/activities/change-set.d.ts.map +1 -0
- package/dist/op/activities/decide.d.ts +2 -0
- package/dist/op/activities/decide.d.ts.map +1 -1
- package/dist/op/activities/factory.d.ts +137 -0
- package/dist/op/activities/factory.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +4 -0
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activity-contract.d.ts.map +1 -1
- package/dist/op/builders.d.ts +11 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/decide-backend.d.ts +5 -1
- package/dist/op/decide-backend.d.ts.map +1 -1
- package/dist/op/decide-read-inputs.d.ts +4 -2
- package/dist/op/decide-read-inputs.d.ts.map +1 -1
- package/dist/op/factory.d.ts +83 -0
- package/dist/op/factory.d.ts.map +1 -0
- package/dist/op/index.d.ts +4 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/op-ir.d.ts +2 -0
- package/dist/op/op-ir.d.ts.map +1 -1
- package/dist/op/op-verb-class.d.ts.map +1 -1
- package/dist/op/types.d.ts +8 -0
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/work-lease-run.d.ts.map +1 -1
- package/dist/plan-summary.d.ts +207 -0
- package/dist/plan-summary.d.ts.map +1 -0
- package/dist/pr-forge.d.ts +105 -0
- package/dist/pr-forge.d.ts.map +1 -0
- package/dist/pr-loop.d.ts +178 -0
- package/dist/pr-loop.d.ts.map +1 -0
- package/dist/telemetry-attribution.d.ts +31 -0
- package/dist/telemetry-attribution.d.ts.map +1 -1
- package/dist/terraform/hcl2json.d.ts +45 -0
- package/dist/terraform/hcl2json.d.ts.map +1 -0
- package/dist/terraform/parse.d.ts +4 -40
- package/dist/terraform/parse.d.ts.map +1 -1
- package/dist/vendor/js-yaml-load.d.ts +56 -0
- package/dist/vendor/js-yaml-load.d.ts.map +1 -0
- package/dist/workspace/box-cli.d.ts +12 -0
- package/dist/workspace/box-cli.d.ts.map +1 -0
- package/dist/workspace/box-factory.d.ts +27 -3
- package/dist/workspace/box-factory.d.ts.map +1 -1
- package/dist/workspace/box-listing.d.ts +85 -0
- package/dist/workspace/box-listing.d.ts.map +1 -0
- package/dist/workspace/box-publish.d.ts +147 -0
- package/dist/workspace/box-publish.d.ts.map +1 -0
- package/dist/workspace/broker-protocol.d.ts +190 -0
- package/dist/workspace/broker-protocol.d.ts.map +1 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/composites.d.ts +2 -2
- package/dist/workspace/composites.d.ts.map +1 -1
- package/dist/workspace/conformance/__fixtures__/reference-broker.d.ts +17 -0
- package/dist/workspace/conformance/__fixtures__/reference-broker.d.ts.map +1 -0
- package/dist/workspace/conformance/broker.d.ts +202 -0
- package/dist/workspace/conformance/broker.d.ts.map +1 -0
- package/dist/workspace/conformance/index.d.ts +2 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/vitest.d.ts +9 -2
- package/dist/workspace/conformance/vitest.d.ts.map +1 -1
- package/dist/workspace/conformance/writer.d.ts +108 -14
- package/dist/workspace/conformance/writer.d.ts.map +1 -1
- package/dist/workspace/decide.d.ts +126 -12
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/decision-points.schema.json +11 -4
- package/dist/workspace/declaration.d.ts +65 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +153 -4
- package/dist/workspace/environments.d.ts +36 -10
- package/dist/workspace/environments.d.ts.map +1 -1
- package/dist/workspace/factory-rules.d.ts +180 -0
- package/dist/workspace/factory-rules.d.ts.map +1 -0
- package/dist/workspace/init.d.ts +21 -0
- package/dist/workspace/init.d.ts.map +1 -1
- package/dist/workspace/intent-cli.d.ts +1 -1
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-record.d.ts +28 -1
- package/dist/workspace/intent-record.d.ts.map +1 -1
- package/dist/workspace/intent.d.ts +102 -5
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/json-edit.d.ts +24 -0
- package/dist/workspace/json-edit.d.ts.map +1 -0
- package/dist/workspace/jsonc.d.ts +11 -0
- package/dist/workspace/jsonc.d.ts.map +1 -1
- package/dist/workspace/kinds.d.ts +48 -0
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/lexicon-symbols.d.ts +29 -0
- package/dist/workspace/lexicon-symbols.d.ts.map +1 -0
- package/dist/workspace/lineage-upgrade.d.ts +31 -2
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
- package/dist/workspace/point-answer.schema.json +42 -2
- package/dist/workspace/points-cli.d.ts +10 -3
- package/dist/workspace/points-cli.d.ts.map +1 -1
- package/dist/workspace/points.d.ts +66 -5
- package/dist/workspace/points.d.ts.map +1 -1
- package/dist/workspace/reason-codes.d.ts +33 -4
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-sessions.d.ts +5 -7
- package/dist/workspace/record-sessions.d.ts.map +1 -1
- package/dist/workspace/records-cli.d.ts +7 -0
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +7 -3
- package/dist/workspace/records-close.d.ts.map +1 -1
- package/dist/workspace/records-write.d.ts +66 -6
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +28 -9
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/runs-cli.d.ts +138 -6
- package/dist/workspace/runs-cli.d.ts.map +1 -1
- package/dist/workspace/runs.d.ts +132 -11
- package/dist/workspace/runs.d.ts.map +1 -1
- package/dist/workspace/session-kinds.d.ts +1 -1
- package/dist/workspace/session-kinds.d.ts.map +1 -1
- package/dist/workspace/squash.d.ts +80 -0
- package/dist/workspace/squash.d.ts.map +1 -0
- package/dist/workspace/status-gates.d.ts +2 -0
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +54 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/symbols.d.ts +16 -5
- package/dist/workspace/symbols.d.ts.map +1 -1
- package/dist/workspace/trust/run-commits.d.ts +46 -0
- package/dist/workspace/trust/run-commits.d.ts.map +1 -0
- package/dist/workspace/trust/run-statement.d.ts +128 -0
- package/dist/workspace/trust/run-statement.d.ts.map +1 -0
- package/dist/workspace/trust/seal.d.ts +6 -1
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/verify-cli.d.ts +1 -1
- package/dist/workspace/trust/verify.d.ts +16 -2
- package/dist/workspace/trust/verify.d.ts.map +1 -1
- package/dist/workspace/wip-cli.d.ts +21 -0
- package/dist/workspace/wip-cli.d.ts.map +1 -0
- package/dist/workspace/wip.d.ts +268 -0
- package/dist/workspace/wip.d.ts.map +1 -0
- package/dist/workspace/work-cli.d.ts.map +1 -1
- package/dist/workspace/work-evidence.d.ts +1 -1
- package/dist/workspace/work-evidence.d.ts.map +1 -1
- package/dist/workspace/work-size.d.ts +55 -0
- package/dist/workspace/work-size.d.ts.map +1 -0
- package/dist/workspace/workspace-kinds.schema.json +122 -0
- package/dist/workspace/write-lock-cli.d.ts +60 -0
- package/dist/workspace/write-lock-cli.d.ts.map +1 -0
- package/dist/workspace/write-lock.d.ts +152 -0
- package/dist/workspace/write-lock.d.ts.map +1 -0
- package/dist/workspace/write-scope.d.ts +6 -2
- package/dist/workspace/write-scope.d.ts.map +1 -1
- package/dist/yaml.d.ts +1 -1
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/__fixtures__/change-set/lifecycle-plan.floci.json +59 -0
- package/src/__fixtures__/change-set/lifecycle-v1.ts.txt +4 -0
- package/src/__fixtures__/change-set/lifecycle-v2.ts.txt +4 -0
- package/src/__fixtures__/change-set/lifecycle.change-set.golden.json +95 -0
- package/src/__fixtures__/change-set/warden.change-set.golden.json +106 -0
- package/src/__fixtures__/change-set/warden.plan.json +44 -0
- package/src/__fixtures__/plan-summary/normalization-vectors.json +1593 -0
- package/src/__fixtures__/pr-loop/pr-apply-applied.note.golden.md +31 -0
- package/src/__fixtures__/pr-loop/pr-apply-refused.note.golden.md +31 -0
- package/src/__fixtures__/pr-loop/pr-plan.golden.json +127 -0
- package/src/__fixtures__/pr-loop/pr-plan.note.golden.md +37 -0
- package/src/audit/core.test.ts +15 -0
- package/src/audit/core.ts +8 -2
- package/src/audit/discover.test.ts +11 -0
- package/src/audit/discover.ts +7 -2
- package/src/change-set-bundle.test.ts +57 -0
- package/src/change-set.test.ts +215 -0
- package/src/change-set.ts +445 -0
- package/src/cli/commands/audit-opt-in.test.ts +54 -0
- package/src/cli/commands/audit.ts +29 -2
- package/src/cli/commands/build.test.ts +19 -0
- package/src/cli/commands/build.ts +3 -2
- package/src/cli/handlers/build.ts +13 -1
- package/src/cli/handlers/change-set.test.ts +56 -0
- package/src/cli/handlers/change-set.ts +44 -0
- package/src/cli/handlers/fan-out.test.ts +221 -2
- package/src/cli/handlers/fan-out.ts +165 -75
- package/src/cli/handlers/graph.ts +3 -0
- package/src/cli/handlers/operator.test.ts +21 -0
- package/src/cli/handlers/operator.ts +34 -3
- package/src/cli/handlers/pr.ts +373 -0
- package/src/cli/handlers/run.ts +1 -0
- package/src/cli/main.test.ts +20 -0
- package/src/cli/main.ts +185 -23
- package/src/cli/mcp/never-over-mcp.test.ts +101 -0
- package/src/cli/mcp/op-tools.ts +24 -2
- package/src/cli/mcp/workspace-tools.test.ts +1 -1
- package/src/cli/mcp/workspace-tools.ts +34 -6
- package/src/cli/registry.ts +63 -1
- package/src/components/auto-release.ts +1 -1
- package/src/components/capability.ts +55 -0
- package/src/components/changed-files.ts +66 -0
- package/src/components/cli-support.ts +28 -5
- package/src/components/component.schema.json +17 -0
- package/src/components/component.ts +25 -0
- package/src/components/deploy-units.ts +3 -0
- package/src/components/driver.test.ts +52 -0
- package/src/components/driver.ts +31 -13
- package/src/components/fan-out-output.ts +42 -1
- package/src/components/fan-out-record.ts +69 -0
- package/src/components/fan-out-run.test.ts +17 -0
- package/src/components/fan-out-run.ts +304 -1
- package/src/components/fan-out-support.ts +3 -0
- package/src/components/fan-out-waves.test.ts +375 -0
- package/src/components/fan-out.ts +18 -17
- package/src/components/gated-wave-pipeline.ts +82 -0
- package/src/components/index.ts +1 -0
- package/src/components/layers.ts +30 -0
- package/src/components/pr-pipeline.ts +91 -0
- package/src/components/pr-run.test.ts +205 -0
- package/src/components/pr-run.ts +280 -0
- package/src/components/promote.ts +5 -0
- package/src/components/verbs/shell.test.ts +11 -0
- package/src/components/verbs/shell.ts +7 -3
- package/src/components/wave-plan.ts +124 -0
- package/src/discovery/sandbox/bundle.ts +1 -1
- package/src/gated-waves-bundle.test.ts +62 -0
- package/src/gated-waves.test.ts +118 -0
- package/src/gated-waves.ts +240 -0
- package/src/index.ts +1 -0
- package/src/lexicon.ts +51 -0
- package/src/lifecycle/gate-ledger.ts +7 -0
- package/src/lifecycle/git.ts +102 -16
- package/src/lint/post-synth.test.ts +19 -0
- package/src/lint/post-synth.ts +19 -1
- package/src/meta/declared-imports.test.ts +1 -1
- package/src/op/activities/activity-contracts.ts +84 -0
- package/src/op/activities/change-set.ts +114 -0
- package/src/op/activities/decide.ts +3 -0
- package/src/op/activities/factory.ts +675 -0
- package/src/op/activities/index.ts +6 -0
- package/src/op/activity-contract.test.ts +21 -1
- package/src/op/activity-contract.ts +19 -9
- package/src/op/builders.ts +23 -0
- package/src/op/decide-backend.ts +5 -1
- package/src/op/decide-read-inputs.ts +33 -5
- package/src/op/factory.e2e.test.ts +232 -0
- package/src/op/factory.ts +118 -0
- package/src/op/index.ts +9 -1
- package/src/op/op-ir.test.ts +9 -0
- package/src/op/op-ir.ts +4 -0
- package/src/op/op-verb-class.ts +3 -0
- package/src/op/types.ts +8 -0
- package/src/op/work-lease-run.ts +3 -0
- package/src/plan-summary.test.ts +263 -0
- package/src/plan-summary.ts +845 -0
- package/src/pr-forge.test.ts +237 -0
- package/src/pr-forge.ts +332 -0
- package/src/pr-loop-bundle.test.ts +46 -0
- package/src/pr-loop.test.ts +171 -0
- package/src/pr-loop.ts +324 -0
- package/src/telemetry-attribution.test.ts +23 -1
- package/src/telemetry-attribution.ts +51 -0
- package/src/terraform/hcl2json.test.ts +21 -0
- package/src/terraform/hcl2json.ts +81 -0
- package/src/terraform/parse.ts +11 -74
- package/src/vendor/js-yaml-load.test.ts +115 -0
- package/src/vendor/js-yaml-load.ts +1939 -0
- package/src/workspace/__fixtures__/studio-template-84c8b21.json +1 -1
- package/src/workspace/app-kind.test.ts +196 -0
- package/src/workspace/box-cli.ts +113 -0
- package/src/workspace/box-factory.test.ts +4 -1
- package/src/workspace/box-factory.ts +37 -4
- package/src/workspace/box-listing-write.schema.json +204 -0
- package/src/workspace/box-listing.test.ts +234 -0
- package/src/workspace/box-listing.ts +324 -0
- package/src/workspace/box-publish.schema.json +498 -0
- package/src/workspace/box-publish.test.ts +204 -0
- package/src/workspace/box-publish.ts +420 -0
- package/src/workspace/box-ship.test.ts +96 -0
- package/src/workspace/broker-protocol.schema.json +186 -0
- package/src/workspace/broker-protocol.test.ts +122 -0
- package/src/workspace/broker-protocol.ts +317 -0
- package/src/workspace/builder-tiers.test.ts +146 -0
- package/src/workspace/change-set.schema.json +460 -0
- package/src/workspace/chant-migrations.e2e.test.ts +17 -5
- package/src/workspace/checks/boxes.test.ts +3 -0
- package/src/workspace/checks.ts +10 -3
- package/src/workspace/component-environments.test.ts +105 -0
- package/src/workspace/composites.schema.json +23 -4
- package/src/workspace/composites.test.ts +8 -8
- package/src/workspace/composites.ts +13 -2
- package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +2 -2
- package/src/workspace/conformance/__fixtures__/reference-broker.ts +207 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.kind.mjs +7 -2
- package/src/workspace/conformance/__writer_fixture__/answers/answer.schema.json +42 -2
- package/src/workspace/conformance/__writer_fixture__/contracts/contract.kind.mjs +37 -0
- package/src/workspace/conformance/__writer_fixture__/contracts/contract.schema.json +213 -0
- package/src/workspace/conformance/__writer_fixture__/decisions/points.json +96 -0
- package/src/workspace/conformance/__writer_fixture__/drivers/driver.kind.mjs +15 -0
- package/src/workspace/conformance/__writer_fixture__/drivers/driver.schema.json +38 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.kind.mjs +14 -8
- package/src/workspace/conformance/__writer_fixture__/sessions/session.schema.json +187 -6
- package/src/workspace/conformance/__writer_fixture__/work/work.schema.json +25 -0
- package/src/workspace/conformance/broker.test.ts +122 -0
- package/src/workspace/conformance/broker.ts +792 -0
- package/src/workspace/conformance/conformance.e2e.test.ts +2 -1
- package/src/workspace/conformance/index.mjs +22 -1
- package/src/workspace/conformance/index.ts +5 -1
- package/src/workspace/conformance/vitest.ts +33 -1
- package/src/workspace/conformance/writer-conformance.e2e.test.ts +49 -3
- package/src/workspace/conformance/writer.test.ts +32 -2
- package/src/workspace/conformance/writer.ts +339 -28
- package/src/workspace/decide.test.ts +208 -4
- package/src/workspace/decide.ts +427 -73
- package/src/workspace/decision-points.schema.json +11 -4
- package/src/workspace/declaration.schema.json +153 -4
- package/src/workspace/declaration.ts +141 -0
- package/src/workspace/environments.ts +66 -14
- package/src/workspace/factory-rules.test.ts +62 -0
- package/src/workspace/factory-rules.ts +218 -0
- package/src/workspace/graph-cli.ts +2 -2
- package/src/workspace/graph.schema.json +67 -0
- package/src/workspace/identity.test.ts +23 -0
- package/src/workspace/init.ts +82 -2
- package/src/workspace/intent-cli.ts +26 -9
- package/src/workspace/intent-patch-id.test.ts +162 -0
- package/src/workspace/intent-record.schema.json +130 -3
- package/src/workspace/intent-record.ts +74 -28
- package/src/workspace/intent-reviews.test.ts +76 -0
- package/src/workspace/intent-squash.test.ts +213 -0
- package/src/workspace/intent-why.test.ts +5 -5
- package/src/workspace/intent.schema.json +234 -4
- package/src/workspace/intent.ts +260 -66
- package/src/workspace/json-edit.test.ts +121 -0
- package/src/workspace/json-edit.ts +142 -0
- package/src/workspace/jsonc.ts +20 -0
- package/src/workspace/kinds.ts +157 -2
- package/src/workspace/lexicon-symbols.test.ts +148 -0
- package/src/workspace/lexicon-symbols.ts +125 -0
- package/src/workspace/lineage-upgrade.test.ts +63 -0
- package/src/workspace/lineage-upgrade.ts +146 -5
- package/src/workspace/plan-summary.schema.json +155 -0
- package/src/workspace/point-answer.schema.json +42 -2
- package/src/workspace/points-cli.ts +42 -16
- package/src/workspace/points-write.schema.json +162 -4
- package/src/workspace/points.schema.json +157 -2
- package/src/workspace/points.test.ts +13 -1
- package/src/workspace/points.ts +118 -12
- package/src/workspace/pr-report.schema.json +95 -0
- package/src/workspace/profiles.test.ts +159 -0
- package/src/workspace/read-contract.test.ts +2 -2
- package/src/workspace/reason-codes.test.ts +13 -1
- package/src/workspace/reason-codes.ts +38 -4
- package/src/workspace/record-sessions.ts +9 -8
- package/src/workspace/records-amend.schema.json +78 -0
- package/src/workspace/records-cli.ts +20 -6
- package/src/workspace/records-close.schema.json +78 -0
- package/src/workspace/records-close.ts +31 -7
- package/src/workspace/records-concurrent.e2e.test.ts +135 -0
- package/src/workspace/records-concurrent.test.ts +145 -0
- package/src/workspace/records-formats.test.ts +46 -10
- package/src/workspace/records-new.schema.json +7 -0
- package/src/workspace/records-review.schema.json +78 -0
- package/src/workspace/records-sessions-write.test.ts +69 -0
- package/src/workspace/records-sessions.test.ts +22 -0
- package/src/workspace/records-write.ts +192 -25
- package/src/workspace/records.schema.json +16 -0
- package/src/workspace/records.ts +50 -9
- package/src/workspace/reference-kinds/app/package.json +10 -0
- package/src/workspace/reference-kinds/app/workspace-kinds.json +45 -0
- package/src/workspace/run-statement.schema.json +622 -0
- package/src/workspace/runs-cli.ts +343 -14
- package/src/workspace/runs-statement.test.ts +239 -0
- package/src/workspace/runs-write.schema.json +416 -5
- package/src/workspace/runs.schema.json +451 -4
- package/src/workspace/runs.test.ts +39 -0
- package/src/workspace/runs.ts +296 -35
- package/src/workspace/session-kinds.ts +3 -3
- package/src/workspace/squash.ts +198 -0
- package/src/workspace/status-contract.test.ts +5 -2
- package/src/workspace/status-gates.ts +3 -1
- package/src/workspace/status.schema.json +126 -3
- package/src/workspace/status.ts +90 -1
- package/src/workspace/symbols.ts +20 -9
- package/src/workspace/trust/run-commits.ts +115 -0
- package/src/workspace/trust/run-statement.ts +226 -0
- package/src/workspace/trust/seal.ts +8 -2
- package/src/workspace/trust/verify-cli.ts +6 -5
- package/src/workspace/trust/verify.ts +39 -6
- package/src/workspace/wip-cli.ts +97 -0
- package/src/workspace/wip-write.schema.json +504 -0
- package/src/workspace/wip.schema.json +334 -0
- package/src/workspace/wip.test.ts +294 -0
- package/src/workspace/wip.ts +753 -0
- package/src/workspace/work-cli.ts +3 -0
- package/src/workspace/work-evidence.schema.json +3 -0
- package/src/workspace/work-size.test.ts +77 -0
- package/src/workspace/work-size.ts +93 -0
- package/src/workspace/workspace-kinds.schema.json +122 -0
- package/src/workspace/write-lock-cli.ts +131 -0
- package/src/workspace/write-lock.schema.json +172 -0
- package/src/workspace/write-lock.test.ts +189 -0
- package/src/workspace/write-lock.ts +474 -0
- package/src/workspace/write-scope.test.ts +16 -1
- package/src/workspace/write-scope.ts +33 -11
- package/src/yaml.ts +31 -21
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The jobs of a generated gated-wave pipeline (#3049): one CI job per wave.
|
|
3
|
+
*
|
|
4
|
+
* The ruling in #3347 puts gated waves on forge CI by default, a job per
|
|
5
|
+
* wave, with approvals on `chant/lifecycle`. Each forge's generator (the
|
|
6
|
+
* gitlab and github lexicons) takes these jobs and adds its own transport;
|
|
7
|
+
* the commands and the order live here so the two cannot disagree.
|
|
8
|
+
*
|
|
9
|
+
* Job `wave-k` runs `chant components fan-out --wave-gate <gate> --wave k`.
|
|
10
|
+
* It derives the fan-out from the change, plans wave k against the outputs
|
|
11
|
+
* the record holds, decides that wave's gate and applies it. The attempt
|
|
12
|
+
* record (`--resume`) is the artifact handed from job to job: it says which
|
|
13
|
+
* components applied and what they exposed. A gate nobody approved exits 3,
|
|
14
|
+
* which fails the job; after `chant approve fan-out <gate>-wave-<k> --plan
|
|
15
|
+
* <digest>`, re-running that job carries on.
|
|
16
|
+
*
|
|
17
|
+
* How many jobs: the waves of the whole component graph, with the canary list
|
|
18
|
+
* in front. A change selects a subset, and a subset never layers deeper than
|
|
19
|
+
* the graph it came from, so a job past the change's last wave finds nothing
|
|
20
|
+
* to run and exits 0.
|
|
21
|
+
*/
|
|
22
|
+
import type { DriverComponent } from "./driver.js";
|
|
23
|
+
/** Where each wave job keeps the attempt record it hands the next one. */
|
|
24
|
+
export declare const GATED_WAVE_RECORD = ".chant/fan-out.json";
|
|
25
|
+
/** The `gatedWaves` generator option (`ComponentPipelineOptions.gatedWaves`). */
|
|
26
|
+
export interface GatedWavePipelineOptions {
|
|
27
|
+
/** The base gate name. Wave k waits on `<gate>-wave-<k>`. */
|
|
28
|
+
gate: string;
|
|
29
|
+
/** Components that form wave 1. */
|
|
30
|
+
canary?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* The ref the change is measured from (`--base`). Default `HEAD~1`: the
|
|
33
|
+
* pipeline runs on the merge commit and fans out what it changed. Every
|
|
34
|
+
* job must derive the same fan-out, so this must not move between jobs.
|
|
35
|
+
*/
|
|
36
|
+
base?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface GatedWaveJob {
|
|
39
|
+
/** 1-based. */
|
|
40
|
+
wave: number;
|
|
41
|
+
/** `wave-<k>`. */
|
|
42
|
+
jobName: string;
|
|
43
|
+
/** The previous wave's job, if any. */
|
|
44
|
+
needs: string[];
|
|
45
|
+
/** The job's command, as argv. */
|
|
46
|
+
command: string[];
|
|
47
|
+
}
|
|
48
|
+
/** One job per possible wave, in order, each needing the one before. */
|
|
49
|
+
export declare function gatedWaveJobs(components: DriverComponent[], env: string, options: GatedWavePipelineOptions): GatedWaveJob[];
|
|
50
|
+
//# sourceMappingURL=gated-wave-pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gated-wave-pipeline.d.ts","sourceRoot":"","sources":["../../src/components/gated-wave-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD,iFAAiF;AACjF,MAAM,WAAW,wBAAwB;IACvC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe;IACf,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,kCAAkC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAC3B,UAAU,EAAE,eAAe,EAAE,EAC7B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,wBAAwB,GAChC,YAAY,EAAE,CAuBhB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* leaves have real implementations over an injectable `CloudExecutor` (#557);
|
|
5
5
|
* every other verb remains a typed stub. See https://intentius.io/chant/components/orchestration/
|
|
6
6
|
*/
|
|
7
|
-
export { type Archetype, type Wiring, type StackOutputReference, type BuildSpec, type Step, type Gate, type Phase, type Component, phase, gate, stackOutput, inferArchetype, projectToJson, isComponent, } from "./component.js";
|
|
7
|
+
export { type Archetype, type Wiring, type StackOutputReference, type BuildSpec, type Step, type Gate, type Phase, type Component, type ComponentEnvironmentDeclaration, phase, gate, stackOutput, inferArchetype, projectToJson, isComponent, } from "./component.js";
|
|
8
8
|
export { type DiscoveredComponent, type ComponentDiscoveryResult, discoverComponents, } from "./discover.js";
|
|
9
9
|
export { type ListedComponent, type ListComponentsResult, type DescribedComponent, type DescribeComponentResult, type ComponentGraphResult, type GenerateLexicon, type GenerateComponentsResult, type RunComponentsOptions, type RunComponentsResult, type ResolvedComponentTargets, listComponents, describeComponent, computeComponentGraph, generateComponentsPipeline, runComponents, findComponentGate, resolveComponentTargets, } from "./cli-support.js";
|
|
10
10
|
export { renderDriverHuman, renderDriverJson } from "./driver-output.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,EACL,IAAI,EACJ,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAA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ACL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,YAAY,EACZ,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,eAAe,EACf,KAAK,qBAAqB,EAC1B,0BAA0B,EAC1B,KAAK,gCAAgC,GACtC,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,+BAA+B,EACpC,KAAK,EACL,IAAI,EACJ,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE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AAK,mBAAmB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,YAAY,EACZ,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,eAAe,EACf,KAAK,qBAAqB,EAC1B,0BAA0B,EAC1B,KAAK,gCAAgC,GACtC,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kahn layering over a plain name graph: the wave computation
|
|
3
|
+
* `resolveComponentGraph` (./driver.ts) runs for `chant components fan-out`.
|
|
4
|
+
*
|
|
5
|
+
* It lives on its own, with no imports, so code that needs the same order
|
|
6
|
+
* without the driver can take it. The terraform lexicon's pin-bump rollout
|
|
7
|
+
* (#3189) orders roots with it, and that code has to bundle without the
|
|
8
|
+
* driver's gate and ledger modules (#3421).
|
|
9
|
+
*/
|
|
10
|
+
/** The layers, or the names left when no name is ready (a cycle). */
|
|
11
|
+
export type KahnLayers = {
|
|
12
|
+
waves: string[][];
|
|
13
|
+
cycle?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
waves?: undefined;
|
|
16
|
+
cycle: string[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Split `deps` (name -> the names it depends on) into waves. A name is ready
|
|
20
|
+
* once every dependency it names has been placed in an earlier wave. Names in
|
|
21
|
+
* one wave are sorted. A dependency that is not a key of `deps` is the caller's
|
|
22
|
+
* to refuse or drop first: here it never becomes ready, so it reads as a cycle.
|
|
23
|
+
*/
|
|
24
|
+
export declare function kahnLayers(deps: ReadonlyMap<string, ReadonlySet<string>>): KahnLayers;
|
|
25
|
+
//# sourceMappingURL=layers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../src/components/layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAE3G;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAUrF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The jobs of a generated pull-request pipeline (#3183): a plan job on every
|
|
3
|
+
* pull request and an apply job on every push to the target branch.
|
|
4
|
+
*
|
|
5
|
+
* Each forge's generator (the github, gitlab and forgejo lexicons) adds its
|
|
6
|
+
* own triggers, permissions and artifact handling; the commands and the
|
|
7
|
+
* values they read from the forge live here so the three cannot disagree.
|
|
8
|
+
*
|
|
9
|
+
* - The plan job runs `chant components pr-plan` against the pull request's
|
|
10
|
+
* target commit. It posts the note and the `chant/plan` status and writes
|
|
11
|
+
* nothing to `chant/lifecycle`, since it runs the pull request's code.
|
|
12
|
+
* - The apply job runs `chant components pr-apply` against the commit the
|
|
13
|
+
* push replaced, finds the pull request that merged the pushed commit
|
|
14
|
+
* through the forge, and applies only when an approval stands for the
|
|
15
|
+
* digest it plans. With `requireReview` (the default) the approver must
|
|
16
|
+
* also have approved the pull request on the forge. It needs write access
|
|
17
|
+
* to `chant/lifecycle`, to record the pending fact when the gate stops it.
|
|
18
|
+
* One apply runs at a time per environment.
|
|
19
|
+
*
|
|
20
|
+
* Measuring the push from the commit it replaced works for merge commits,
|
|
21
|
+
* squash merges and rebase merges alike, and every job measures from the
|
|
22
|
+
* merge base of that commit and its own head (`resolveMergeBase`).
|
|
23
|
+
*/
|
|
24
|
+
import type { ForgeKind } from "../pr-forge.js";
|
|
25
|
+
/** Where both jobs write their reports, kept as a CI artifact. */
|
|
26
|
+
export declare const PR_LOOP_REPORT_DIR = ".chant/pr";
|
|
27
|
+
/** The `prLoop` generator option (`ComponentPipelineOptions.prLoop`). */
|
|
28
|
+
export interface PrLoopPipelineOptions {
|
|
29
|
+
/** The gate the apply waits on. Default `pr-apply`. */
|
|
30
|
+
gate?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The branch pull requests target and merges land on. Default `main` on
|
|
33
|
+
* GitHub and Forgejo; on GitLab, the project's default branch.
|
|
34
|
+
*/
|
|
35
|
+
branch?: string;
|
|
36
|
+
/** Count an approval only from someone who approved the pull request on the forge. Default true. */
|
|
37
|
+
requireReview?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Which GitHub-shaped forge the workflow is for. Set by the forgejo
|
|
40
|
+
* generator, which reuses the github one; a caller never needs to.
|
|
41
|
+
*/
|
|
42
|
+
forge?: "github" | "forgejo";
|
|
43
|
+
}
|
|
44
|
+
/** One job's command and the forge values it reads, as environment variables for its step. */
|
|
45
|
+
export interface PrLoopJob {
|
|
46
|
+
/** `plan` or `apply`. */
|
|
47
|
+
jobName: "plan" | "apply";
|
|
48
|
+
/** The command line. Reads `$BASE_SHA` and, for the plan, `$PR_NUMBER`. */
|
|
49
|
+
command: string;
|
|
50
|
+
/**
|
|
51
|
+
* Values the command reads, by variable name, as the forge spells them:
|
|
52
|
+
* `${{ ... }}` expressions on GitHub and Forgejo, GitLab's predefined
|
|
53
|
+
* variables on GitLab.
|
|
54
|
+
*/
|
|
55
|
+
env: Record<string, string>;
|
|
56
|
+
}
|
|
57
|
+
/** The two jobs for `forge`. */
|
|
58
|
+
export declare function prLoopJobs(forge: ForgeKind, env: string, options?: PrLoopPipelineOptions): PrLoopJob[];
|
|
59
|
+
/** The concurrency group (GitHub, Forgejo) or resource group (GitLab) that keeps one apply at a time per environment. */
|
|
60
|
+
export declare function prApplyGroup(env: string): string;
|
|
61
|
+
//# sourceMappingURL=pr-pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-pipeline.d.ts","sourceRoot":"","sources":["../../src/components/pr-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oGAAoG;IACpG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B;AAED,8FAA8F;AAC9F,MAAM,WAAW,SAAS;IACxB,yBAAyB;IACzB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAED,gCAAgC;AAChC,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG,SAAS,EAAE,CAsB1G;AAED,yHAAyH;AACzH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan and apply a pull request's members (#3183).
|
|
3
|
+
*
|
|
4
|
+
* `../pr-loop.ts` says what the gate binds and what the report holds; this
|
|
5
|
+
* produces them. Both stages call {@link planPrSet}: the plan stage to show
|
|
6
|
+
* the plan and its digest, the apply stage to plan the same members again
|
|
7
|
+
* before anything applies and decide the gate against what it gets. Planning
|
|
8
|
+
* everything before applying anything is what makes the two digests
|
|
9
|
+
* comparable: each member is planned against the same state both times.
|
|
10
|
+
*
|
|
11
|
+
* ## Dependents read the outputs standing now
|
|
12
|
+
*
|
|
13
|
+
* A member that reads another one's output through `stackOutput()` is
|
|
14
|
+
* planned with the value that output has now, read through the capability's
|
|
15
|
+
* `outputs` (`readComponentOutputs`). When the change moves that output, the
|
|
16
|
+
* dependent's approved plan still carries the old value; the apply applies
|
|
17
|
+
* it as approved and marks the member `inputsMoved`, and the next run plans
|
|
18
|
+
* it against the new value. A change that must carry a moved output through
|
|
19
|
+
* its dependents in one rollout is what gated waves are for (#3049): each
|
|
20
|
+
* wave is planned after the one before it applied.
|
|
21
|
+
*/
|
|
22
|
+
import { type ChangeSetDocument } from "../change-set.js";
|
|
23
|
+
import { type GateCheck, type GateLedgerPort } from "../op/gate.js";
|
|
24
|
+
import { type PrApproval, type PrMember, type PrRefusal, type PrReport, type PrStatus } from "../pr-loop.js";
|
|
25
|
+
import { type DriverComponent } from "./driver.js";
|
|
26
|
+
import { type FanOutRunResult } from "./fan-out-run.js";
|
|
27
|
+
import type { ComponentChangeSignal, FanOutPlan } from "./fan-out.js";
|
|
28
|
+
import type { CapabilityRegistry } from "./capability.js";
|
|
29
|
+
import type { RunProgressEvent } from "./run-progress.js";
|
|
30
|
+
export interface PrPlanSetOptions {
|
|
31
|
+
/** Every component in the project. */
|
|
32
|
+
components: DriverComponent[];
|
|
33
|
+
/** The fan-out the change derives (`planFanOut`). Its `order` is what is planned. */
|
|
34
|
+
plan: FanOutPlan;
|
|
35
|
+
registry: CapabilityRegistry;
|
|
36
|
+
env: string;
|
|
37
|
+
vars?: Record<string, unknown>;
|
|
38
|
+
/** Outputs supplied by the caller (`--seed-outputs`). They win over outputs read here. */
|
|
39
|
+
seededOutputs?: Record<string, Record<string, unknown>>;
|
|
40
|
+
}
|
|
41
|
+
/** Every member of a pull request, planned. */
|
|
42
|
+
export interface PrPlanSet {
|
|
43
|
+
/** The change-set document over every member. Its digest is what the gate binds. */
|
|
44
|
+
doc: ChangeSetDocument;
|
|
45
|
+
members: PrMember[];
|
|
46
|
+
/** Per component, per member: what its steps hand `run`, so it applies this plan. */
|
|
47
|
+
plans: Record<string, Record<string, unknown>>;
|
|
48
|
+
/** The outputs the plans read: the seeds, and each dependency's outputs as they stood. */
|
|
49
|
+
outputs: Record<string, Record<string, unknown>>;
|
|
50
|
+
/** Whether any component failed to plan. */
|
|
51
|
+
failed: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Plan every component in `plan.order`, a wave at a time, each against the
|
|
55
|
+
* outputs its dependencies have now. Never throws for a component that fails
|
|
56
|
+
* to plan: it becomes a failed member, and `failed` is set.
|
|
57
|
+
*/
|
|
58
|
+
export declare function planPrSet(options: PrPlanSetOptions): Promise<PrPlanSet>;
|
|
59
|
+
/**
|
|
60
|
+
* A ledger that reads the real one and records nothing. The plan stage
|
|
61
|
+
* decides the gate only to say where the approval stands; it runs the pull
|
|
62
|
+
* request's own code and holds no write access to `chant/lifecycle`.
|
|
63
|
+
*/
|
|
64
|
+
export declare function readOnlyLedger(port: GateLedgerPort): GateLedgerPort;
|
|
65
|
+
/** Where the approval stands, as the report says it. */
|
|
66
|
+
export declare function approvalOf(check: GateCheck): PrApproval;
|
|
67
|
+
/** Decide the pull request's gate against `digest`. */
|
|
68
|
+
export declare function decidePrGate(port: GateLedgerPort, input: {
|
|
69
|
+
op: string;
|
|
70
|
+
gate: string;
|
|
71
|
+
digest: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
now?: string;
|
|
74
|
+
}): Promise<GateCheck>;
|
|
75
|
+
/**
|
|
76
|
+
* Who approved the gate but has no standing approving review on the pull
|
|
77
|
+
* request. Each approval's `resolvedBy` is compared with the forge's own
|
|
78
|
+
* naming of each approver (#3163's form).
|
|
79
|
+
*/
|
|
80
|
+
export declare function approversWithoutReview(approvedBy: readonly string[], reviewers: readonly string[]): string[];
|
|
81
|
+
export interface PrApplyOptions {
|
|
82
|
+
components: DriverComponent[];
|
|
83
|
+
plan: FanOutPlan;
|
|
84
|
+
registry: CapabilityRegistry;
|
|
85
|
+
env: string;
|
|
86
|
+
vars?: Record<string, unknown>;
|
|
87
|
+
/** The set {@link planPrSet} planned and the gate approved. */
|
|
88
|
+
set: PrPlanSet;
|
|
89
|
+
onProgress?: (event: RunProgressEvent) => void;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Apply the approved plans in dependency order. A failed component blocks
|
|
93
|
+
* its dependents and nothing else (`runFanOut`).
|
|
94
|
+
*/
|
|
95
|
+
export declare function applyPrSet(options: PrApplyOptions): Promise<{
|
|
96
|
+
members: PrMember[];
|
|
97
|
+
status: "applied" | "failed";
|
|
98
|
+
run: FanOutRunResult;
|
|
99
|
+
}>;
|
|
100
|
+
export interface PrReportInput {
|
|
101
|
+
stage: "plan" | "apply";
|
|
102
|
+
pr: number | null;
|
|
103
|
+
env: string;
|
|
104
|
+
base: string;
|
|
105
|
+
head: string;
|
|
106
|
+
op: string;
|
|
107
|
+
gate: string;
|
|
108
|
+
plan: FanOutPlan;
|
|
109
|
+
signal: ComponentChangeSignal;
|
|
110
|
+
set: PrPlanSet;
|
|
111
|
+
approval: PrApproval;
|
|
112
|
+
status: PrStatus;
|
|
113
|
+
members?: PrMember[];
|
|
114
|
+
refusal?: PrRefusal;
|
|
115
|
+
message?: string;
|
|
116
|
+
}
|
|
117
|
+
/** The report a stage writes. */
|
|
118
|
+
export declare function prReport(input: PrReportInput): PrReport;
|
|
119
|
+
//# sourceMappingURL=pr-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-run.d.ts","sourceRoot":"","sources":["../../src/components/pr-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAoB,KAAK,iBAAiB,EAAsB,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAgB,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qB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAM1F;AAED,+FAA+F;AAC/F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAyBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/shell.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/shell.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG/E,MAAM,WAAW,UAAU;IACzB,sBAAsB;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,GAAE,aAAsC,GAAG,UAAU,CAAC,UAAU,EAAE,WAAW,CAAC,CAehI;AAED,qEAAqE;AACrE,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,UAAU,EAAE,WAAW,CAA2B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan one wave of a gated-wave fan-out (#3049).
|
|
3
|
+
*
|
|
4
|
+
* Each component in the wave is asked what it would change: every deploy
|
|
5
|
+
* step whose capability has a `plan` (`Capability.plan`, ./capability.ts) is
|
|
6
|
+
* planned, with its wiring resolved against the outputs the earlier waves
|
|
7
|
+
* left behind. That is the point of planning at the wave rather than up
|
|
8
|
+
* front: a root that reads an upstream output plans against the value the
|
|
9
|
+
* upstream wave actually wrote.
|
|
10
|
+
*
|
|
11
|
+
* A component with no plannable step is still a member of the wave. Its plan
|
|
12
|
+
* digest is the composition digest a gate inside it would bind
|
|
13
|
+
* (`componentPlanDigest`, ./gate-plan.ts, #2574), so a wave mixing roots and
|
|
14
|
+
* other components still has one digest that moves when any of them does.
|
|
15
|
+
*
|
|
16
|
+
* Known limit: a step input that reads an earlier step of the same
|
|
17
|
+
* component (`@Phase.field`) has no value before the component runs, so it
|
|
18
|
+
* plans as `undefined`. Cross-component wiring (`stackOutput()`,
|
|
19
|
+
* `@<component>.publish.*`) resolves.
|
|
20
|
+
*/
|
|
21
|
+
import { type DriverComponent } from "./driver.js";
|
|
22
|
+
import type { CapabilityRegistry, DeployContext } from "./capability.js";
|
|
23
|
+
import type { WaveMember } from "../gated-waves.js";
|
|
24
|
+
import type { ChangeSetPart } from "../change-set.js";
|
|
25
|
+
/**
|
|
26
|
+
* What planning one component produced: its members, what its steps hand to
|
|
27
|
+
* `run`, and each member's change-set part (#3183), or why it could not plan.
|
|
28
|
+
* A member whose capability returns no part gets one with no entries, so the
|
|
29
|
+
* parts always cover the members.
|
|
30
|
+
*/
|
|
31
|
+
export type WaveComponentPlan = {
|
|
32
|
+
component: string;
|
|
33
|
+
members: WaveMember[];
|
|
34
|
+
plans: Record<string, unknown>;
|
|
35
|
+
parts: ChangeSetPart[];
|
|
36
|
+
} | {
|
|
37
|
+
component: string;
|
|
38
|
+
error: string;
|
|
39
|
+
};
|
|
40
|
+
/** Plan one component against the outputs earlier waves produced. Never throws: a failure comes back as `error`. */
|
|
41
|
+
export declare function planWaveComponent(component: DriverComponent, registry: CapabilityRegistry, ctx: DeployContext, componentOutputs: Record<string, Record<string, unknown>>): Promise<WaveComponentPlan>;
|
|
42
|
+
/**
|
|
43
|
+
* The outputs `component` exposes now, read from each step whose capability
|
|
44
|
+
* has `outputs` (#3183), merged the way the driver merges a run's outputs.
|
|
45
|
+
* `undefined` when no step can say. A pull request's plan reads these for
|
|
46
|
+
* the components a planned one depends on, before anything has applied.
|
|
47
|
+
*/
|
|
48
|
+
export declare function readComponentOutputs(component: DriverComponent, registry: CapabilityRegistry, ctx: DeployContext, componentOutputs: Record<string, Record<string, unknown>>): Promise<Record<string, unknown> | undefined>;
|
|
49
|
+
//# sourceMappingURL=wave-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wave-plan.d.ts","sourceRoot":"","sources":["../../src/components/wave-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAoB,KAAK,eAAe,EAAqC,MAAM,UAAU,CAAC;AAErG,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GACzB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,GACpG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AA2BzC,oHAAoH;AACpH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,EAAE,aAAa,EAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,OAAO,CAAC,iBAAiB,CAAC,CAgC5B;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,EAAE,aAAa,EAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAU9C"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gated waves (#3049): one change rolled out across many roots, a wave at a
|
|
3
|
+
* time, each wave behind its own gate bound to that wave's set digest.
|
|
4
|
+
*
|
|
5
|
+
* `chant components fan-out --wave-gate` is the runner. This module holds the
|
|
6
|
+
* parts that need no runner: how a set of roots is cut into waves, what a
|
|
7
|
+
* wave's digest is, what its gate is called, and what the attempt record says
|
|
8
|
+
* about each wave. They are kept apart from the runner because terragucci
|
|
9
|
+
* calls them from its CI stages as one bundled file with no TypeScript
|
|
10
|
+
* toolchain (#3421). Everything here imports `./change-set` and nothing else,
|
|
11
|
+
* and `gated-waves-bundle.test.ts` holds that.
|
|
12
|
+
*
|
|
13
|
+
* ## The set digest
|
|
14
|
+
*
|
|
15
|
+
* A wave's digest is {@link changeSetDigest} over its members' `{ member,
|
|
16
|
+
* planDigest }` pairs, the function #3181's change-set document uses. A
|
|
17
|
+
* terraform-family member is named after its root, so this is the issue's
|
|
18
|
+
* `jcs1-sha256` over sorted `{ root, planDigest }`, and a wave's digest equals
|
|
19
|
+
* the change-set digest of the wave's members. Each member's plan digest is
|
|
20
|
+
* the one a gate on that root alone binds (`terraformPlanDigest`, #2300), so a
|
|
21
|
+
* one-root wave and a one-root `TerraformApplyOp` approve the same value.
|
|
22
|
+
*
|
|
23
|
+
* ## Why a wave is planned when it is reached
|
|
24
|
+
*
|
|
25
|
+
* A later wave planned up front reads outputs that do not exist yet. Planned
|
|
26
|
+
* after the wave before it applied, its digest describes the real upstream
|
|
27
|
+
* values, which is what an approver of that wave is shown.
|
|
28
|
+
*/
|
|
29
|
+
/** A root, or a component, as wave planning sees it: a name and what it reads. */
|
|
30
|
+
export interface WaveNode {
|
|
31
|
+
name: string;
|
|
32
|
+
/** Names this node reads from. A name outside the node set is already satisfied. */
|
|
33
|
+
dependsOn?: readonly string[];
|
|
34
|
+
}
|
|
35
|
+
/** Thrown when a canary names something that is not in the set being planned. */
|
|
36
|
+
export declare class UnknownCanaryError extends Error {
|
|
37
|
+
readonly canary: string;
|
|
38
|
+
constructor(canary: string, known: readonly string[]);
|
|
39
|
+
}
|
|
40
|
+
/** Thrown when the nodes being layered depend on each other in a cycle. */
|
|
41
|
+
export declare class WaveCycleError extends Error {
|
|
42
|
+
readonly members: string[];
|
|
43
|
+
constructor(members: string[]);
|
|
44
|
+
}
|
|
45
|
+
export interface LayerWavesOptions {
|
|
46
|
+
/**
|
|
47
|
+
* Nodes that form wave 1 whatever the graph says (#3049). Only those in the
|
|
48
|
+
* set are placed; one outside it has nothing to apply. The rest follow in
|
|
49
|
+
* dependency order, and a dependency on a canary counts as satisfied by
|
|
50
|
+
* wave 1.
|
|
51
|
+
*/
|
|
52
|
+
canary?: readonly string[];
|
|
53
|
+
/**
|
|
54
|
+
* Names known to exist outside `nodes`. A canary naming one of them is
|
|
55
|
+
* left out quietly, since it is real but not part of this change; any
|
|
56
|
+
* other unknown canary is refused. Defaults to `nodes` alone.
|
|
57
|
+
*/
|
|
58
|
+
known?: readonly string[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Cut `nodes` into ordered waves: each node lands after every node it reads
|
|
62
|
+
* from, and each wave is sorted by name so the same graph always produces the
|
|
63
|
+
* same waves. With a canary list, those nodes are wave 1.
|
|
64
|
+
*
|
|
65
|
+
* A dependency on a name outside `nodes` does not hold a node back. That is
|
|
66
|
+
* the subset case: the dependency already applied, or is not changing.
|
|
67
|
+
*/
|
|
68
|
+
export declare function layerWaves(nodes: readonly WaveNode[], options?: LayerWavesOptions): string[][];
|
|
69
|
+
/** One member of a wave: a root (or a component with no plannable step) and its plan digest. */
|
|
70
|
+
export interface WaveMember {
|
|
71
|
+
member: string;
|
|
72
|
+
planDigest: string;
|
|
73
|
+
/** A provisional plan (`ChangeSetMember.provisional`, #3416). A wave refuses it. */
|
|
74
|
+
provisional?: true;
|
|
75
|
+
}
|
|
76
|
+
/** Thrown when a wave's members include a provisional plan, which no gate may bind. */
|
|
77
|
+
export declare class ProvisionalWaveMemberError extends Error {
|
|
78
|
+
readonly members: string[];
|
|
79
|
+
constructor(members: string[]);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A wave's set digest: {@link changeSetDigest} over its members. Order does
|
|
83
|
+
* not matter, and it moves whenever one member's plan digest does. A wave
|
|
84
|
+
* naming one member twice has no digest and is refused, and so is a wave
|
|
85
|
+
* holding a provisional plan (#3416): a gate bound to it would approve
|
|
86
|
+
* values nobody has yet.
|
|
87
|
+
*/
|
|
88
|
+
export declare function waveSetDigest(members: readonly WaveMember[]): string;
|
|
89
|
+
/**
|
|
90
|
+
* The gate a wave waits on: `<gate>-wave-<n>`, under the fan-out's op.
|
|
91
|
+
*
|
|
92
|
+
* One gate name per wave keeps each wave's approvals apart. With one name
|
|
93
|
+
* shared by every wave, wave 2 would find wave 1's approval and report it as
|
|
94
|
+
* an approval of another plan, which is true and useless. Wave numbers come
|
|
95
|
+
* from the derivation, not from what is left to run, so wave 3 stays wave 3
|
|
96
|
+
* on a resumed attempt and its approval still applies.
|
|
97
|
+
*/
|
|
98
|
+
export declare function waveGateName(gate: string, wave: number): string;
|
|
99
|
+
/** Where a wave got to. */
|
|
100
|
+
export type WaveStatus =
|
|
101
|
+
/** Planned, and its gate is not approved for this digest. Nothing in it ran. */
|
|
102
|
+
"gated"
|
|
103
|
+
/** Every member applied. */
|
|
104
|
+
| "applied"
|
|
105
|
+
/** At least one member failed to plan or to apply. Its dependents are blocked. */
|
|
106
|
+
| "failed";
|
|
107
|
+
/**
|
|
108
|
+
* One wave, as an attempt record and a run result carry it. The plan report
|
|
109
|
+
* (#3349) reads these and points at the gate record rather than copying it:
|
|
110
|
+
* `op` and `gate` name the ledger entry (`_gates/<op>.jsonl` on
|
|
111
|
+
* `chant/lifecycle`).
|
|
112
|
+
*/
|
|
113
|
+
export interface WaveRecord {
|
|
114
|
+
/** 1-based, from the derivation. */
|
|
115
|
+
wave: number;
|
|
116
|
+
op: string;
|
|
117
|
+
/** The full gate name, {@link waveGateName}. */
|
|
118
|
+
gate: string;
|
|
119
|
+
/** What was planned in this wave on this attempt. */
|
|
120
|
+
components: string[];
|
|
121
|
+
/** The set digest the gate was decided against. */
|
|
122
|
+
digest: string;
|
|
123
|
+
members: WaveMember[];
|
|
124
|
+
status: WaveStatus;
|
|
125
|
+
/** Who approved this digest, once the gate passed. */
|
|
126
|
+
approvedBy?: string;
|
|
127
|
+
/** When the gate refused because an approval stands for another digest: that digest. */
|
|
128
|
+
approved?: string;
|
|
129
|
+
/** Components that failed to plan or to apply, with why. */
|
|
130
|
+
failed?: Array<{
|
|
131
|
+
component: string;
|
|
132
|
+
error?: string;
|
|
133
|
+
}>;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Read the `waves` array of an attempt record, dropping anything malformed.
|
|
137
|
+
* A record written before #3049 has none, which reads as no waves.
|
|
138
|
+
*/
|
|
139
|
+
export declare function readWaveRecords(value: unknown): WaveRecord[];
|
|
140
|
+
/** Put `record` in `records` in place of any earlier record for the same wave, sorted by wave. */
|
|
141
|
+
export declare function withWaveRecord(records: readonly WaveRecord[], record: WaveRecord): WaveRecord[];
|
|
142
|
+
/**
|
|
143
|
+
* The refusal for a wave whose set changed after it was approved: the digest
|
|
144
|
+
* that was approved, the one planned now, and that nothing in the wave ran.
|
|
145
|
+
*/
|
|
146
|
+
export declare function describeChangedWave(record: Pick<WaveRecord, "wave" | "op" | "gate" | "digest" | "approved">): string;
|
|
147
|
+
//# sourceMappingURL=gated-waves.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gated-waves.d.ts","sourceRoot":"","sources":["../src/gated-waves.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,kFAAkF;AAClF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED,iFAAiF;AACjF,qBAAa,kBAAmB,SAAQ,KAAK;IAEzC,QAAQ,CAAC,MAAM,EAAE,MAAM;IADzB,YACW,MAAM,EAAE,MAAM,EACvB,KAAK,EAAE,SAAS,MAAM,EAAE,EAIzB;CACF;AAED,2EAA2E;AAC3E,qBAAa,cAAe,SAAQ,KAAK;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE;IAAtC,YAAqB,OAAO,EAAE,MAAM,EAAE,EAGrC;CAC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B,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvD;AAOD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,EAAE,CAgC5D;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,EAAE,CAE/F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC,GAAG,MAAM,CAMpH"}
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from "./resource-attributes.js";
|
|
|
90
90
|
export * from "./stack-output.js";
|
|
91
91
|
export * from "./child-project.js";
|
|
92
92
|
export * from "./lsp/types.js";
|
|
93
|
+
export type { SymbolDeclaration, SymbolResolver } from "./workspace/symbols.js";
|
|
93
94
|
export * from "./lsp/lexicon-providers.js";
|
|
94
95
|
export * from "./mcp/types.js";
|
|
95
96
|
export * from "./lifecycle/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,g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