@intentius/chant 0.124.51 → 0.124.54
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/discover.d.ts.map +1 -1
- package/dist/audit/discover.js +3 -1
- package/dist/behaviour.d.ts +1 -1
- package/dist/behaviour.d.ts.map +1 -1
- package/dist/capabilities/templates.d.ts +65 -0
- package/dist/capabilities/templates.d.ts.map +1 -0
- package/dist/capabilities/templates.js +193 -0
- package/dist/capabilities/templates.json +145 -0
- package/dist/change-set-graph.d.ts +35 -3
- package/dist/change-set-graph.d.ts.map +1 -1
- package/dist/change-set-graph.js +60 -9
- package/dist/change-set.d.ts +65 -7
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +23 -12
- package/dist/ci-identity.d.ts +7 -2
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +4 -1
- package/dist/cli/commands/import-index.d.ts +52 -0
- package/dist/cli/commands/import-index.d.ts.map +1 -0
- package/dist/cli/commands/import-index.js +226 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +4 -2
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +11 -2
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +16 -3
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/graph.js +22 -4
- package/dist/cli/handlers/index-cloud.d.ts +14 -0
- package/dist/cli/handlers/index-cloud.d.ts.map +1 -0
- package/dist/cli/handlers/index-cloud.js +22 -0
- package/dist/cli/handlers/index-diff.d.ts +18 -0
- package/dist/cli/handlers/index-diff.d.ts.map +1 -0
- package/dist/cli/handlers/index-diff.js +142 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts +25 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-drift.js +64 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +188 -28
- package/dist/cli/handlers/misc.d.ts +9 -0
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/misc.js +77 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +17 -3
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +89 -15
- package/dist/cli/handlers/query.d.ts.map +1 -1
- package/dist/cli/handlers/query.js +28 -4
- package/dist/cli/handlers/scenario.d.ts.map +1 -1
- package/dist/cli/handlers/scenario.js +8 -7
- package/dist/cli/handlers/search.d.ts +34 -4
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/handlers/search.js +216 -36
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +55 -1
- package/dist/cli/mcp/lifecycle-tools.d.ts.map +1 -1
- package/dist/cli/mcp/lifecycle-tools.js +3 -2
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.js +4 -3
- package/dist/cli/mcp/workspace-tools.js +1 -1
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +55 -2
- package/dist/cli/registry.d.ts +19 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cloud-lister/aws.d.ts +35 -0
- package/dist/cloud-lister/aws.d.ts.map +1 -0
- package/dist/cloud-lister/aws.js +203 -0
- package/dist/cloud-lister/azure.d.ts +34 -0
- package/dist/cloud-lister/azure.d.ts.map +1 -0
- package/dist/cloud-lister/azure.js +129 -0
- package/dist/cloud-lister/common.d.ts +40 -0
- package/dist/cloud-lister/common.d.ts.map +1 -0
- package/dist/cloud-lister/common.js +83 -0
- package/dist/cloud-lister/credentials.d.ts +50 -0
- package/dist/cloud-lister/credentials.d.ts.map +1 -0
- package/dist/cloud-lister/credentials.js +86 -0
- package/dist/cloud-lister/fakes.d.ts +27 -0
- package/dist/cloud-lister/fakes.d.ts.map +1 -0
- package/dist/cloud-lister/fakes.js +50 -0
- package/dist/cloud-lister/gcp.d.ts +42 -0
- package/dist/cloud-lister/gcp.d.ts.map +1 -0
- package/dist/cloud-lister/gcp.js +143 -0
- package/dist/cloud-lister/guard.d.ts +49 -0
- package/dist/cloud-lister/guard.d.ts.map +1 -0
- package/dist/cloud-lister/guard.js +103 -0
- package/dist/cloud-lister/ids.d.ts +23 -0
- package/dist/cloud-lister/ids.d.ts.map +1 -0
- package/dist/cloud-lister/ids.js +42 -0
- package/dist/cloud-lister/index.d.ts +67 -0
- package/dist/cloud-lister/index.d.ts.map +1 -0
- package/dist/cloud-lister/index.js +102 -0
- package/dist/cloud-lister/kubernetes.d.ts +64 -0
- package/dist/cloud-lister/kubernetes.d.ts.map +1 -0
- package/dist/cloud-lister/kubernetes.js +276 -0
- package/dist/cloud-lister/markers.d.ts +31 -0
- package/dist/cloud-lister/markers.d.ts.map +1 -0
- package/dist/cloud-lister/markers.js +73 -0
- package/dist/cloud-lister/mask.d.ts +31 -0
- package/dist/cloud-lister/mask.d.ts.map +1 -0
- package/dist/cloud-lister/mask.js +74 -0
- package/dist/cloud-lister/sigv4.d.ts +29 -0
- package/dist/cloud-lister/sigv4.d.ts.map +1 -0
- package/dist/cloud-lister/sigv4.js +54 -0
- package/dist/cloud-lister/transport.d.ts +55 -0
- package/dist/cloud-lister/transport.d.ts.map +1 -0
- package/dist/cloud-lister/transport.js +86 -0
- package/dist/cloud-lister/types.d.ts +121 -0
- package/dist/cloud-lister/types.d.ts.map +1 -0
- package/dist/cloud-lister/types.js +24 -0
- package/dist/components/capability-plugin-loader.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.js +6 -0
- package/dist/components/capability-plugin.d.ts +9 -0
- package/dist/components/capability-plugin.d.ts.map +1 -1
- package/dist/components/capability.d.ts +224 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +21 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +58 -14
- package/dist/components/covered-round.d.ts +173 -0
- package/dist/components/covered-round.d.ts.map +1 -0
- package/dist/components/covered-round.js +200 -0
- package/dist/components/declared-reads.d.ts +38 -0
- package/dist/components/declared-reads.d.ts.map +1 -0
- package/dist/components/declared-reads.js +131 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +4 -0
- package/dist/components/driver.d.ts +42 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +74 -3
- package/dist/components/fan-out-run.d.ts +23 -1
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +82 -14
- package/dist/components/fan-out-support.d.ts +6 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out-support.js +4 -1
- package/dist/components/fan-out.d.ts +28 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/groups.d.ts +229 -0
- package/dist/components/groups.d.ts.map +1 -0
- package/dist/components/groups.js +760 -0
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -0
- package/dist/components/plan-shape-conformance.d.ts +48 -0
- package/dist/components/plan-shape-conformance.d.ts.map +1 -0
- package/dist/components/plan-shape-conformance.js +122 -0
- package/dist/components/pr-run.d.ts +62 -7
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +354 -53
- package/dist/components/promote-rounds.d.ts +9 -0
- package/dist/components/promote-rounds.d.ts.map +1 -1
- package/dist/components/promote-rounds.js +23 -2
- package/dist/components/promote.d.ts +17 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +36 -6
- package/dist/components/release-gate.d.ts +23 -1
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +97 -33
- package/dist/components/run-groups.d.ts +58 -0
- package/dist/components/run-groups.d.ts.map +1 -0
- package/dist/components/run-groups.js +78 -0
- package/dist/components/starter-plugin.d.ts +1 -0
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/starter-plugin.js +6 -1
- package/dist/components/verbs/index.d.ts +1 -0
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/index.js +1 -0
- package/dist/components/verbs/member-outputs.d.ts +187 -0
- package/dist/components/verbs/member-outputs.d.ts.map +1 -0
- package/dist/components/verbs/member-outputs.js +218 -0
- package/dist/components/wave-plan.d.ts +2 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +4 -1
- package/dist/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -0
- package/dist/deep-observation.d.ts +1 -13
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/deep-observation.js +5 -22
- package/dist/drift-record.d.ts +542 -0
- package/dist/drift-record.d.ts.map +1 -0
- package/dist/drift-record.js +886 -0
- package/dist/engine-facts.d.ts +144 -0
- package/dist/engine-facts.d.ts.map +1 -0
- package/dist/engine-facts.js +14 -0
- package/dist/graph-ir.d.ts +153 -2
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-ir.js +224 -6
- package/dist/graph-refs.d.ts +145 -0
- package/dist/graph-refs.d.ts.map +1 -1
- package/dist/graph-refs.js +305 -0
- package/dist/graph-schema/fixtures/adopt.json +15 -0
- package/dist/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/dist/graph-schema/fixtures/index.json +68 -0
- package/dist/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/dist/graph-schema/fixtures.d.ts +23 -0
- package/dist/graph-schema/fixtures.d.ts.map +1 -0
- package/dist/graph-schema/fixtures.js +246 -0
- package/dist/graph-schema/generate.d.ts +15 -0
- package/dist/graph-schema/generate.d.ts.map +1 -0
- package/dist/graph-schema/generate.js +267 -0
- package/dist/graph-schema/graph.schema.json +1387 -0
- package/dist/health.schema.json +2 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/instance-nodes.d.ts +159 -0
- package/dist/instance-nodes.d.ts.map +1 -0
- package/dist/instance-nodes.js +231 -0
- package/dist/lexicon.d.ts +72 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.d.ts +56 -0
- package/dist/lifecycle/adoption-file.d.ts.map +1 -0
- package/dist/lifecycle/adoption-file.js +123 -0
- package/dist/lifecycle/cloud-index.d.ts +186 -0
- package/dist/lifecycle/cloud-index.d.ts.map +1 -0
- package/dist/lifecycle/cloud-index.js +618 -0
- package/dist/lifecycle/derive-edges.d.ts +59 -0
- package/dist/lifecycle/derive-edges.d.ts.map +1 -0
- package/dist/lifecycle/derive-edges.js +126 -0
- package/dist/lifecycle/git.d.ts +10 -9
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +7 -1
- package/dist/lifecycle/identity-match.d.ts +133 -0
- package/dist/lifecycle/identity-match.d.ts.map +1 -0
- package/dist/lifecycle/identity-match.js +147 -0
- package/dist/lifecycle/index-diff.d.ts +224 -0
- package/dist/lifecycle/index-diff.d.ts.map +1 -0
- package/dist/lifecycle/index-diff.js +327 -0
- package/dist/lifecycle/index-document.d.ts +130 -0
- package/dist/lifecycle/index-document.d.ts.map +1 -0
- package/dist/lifecycle/index-document.js +189 -0
- package/dist/lifecycle/index-drift.d.ts +121 -0
- package/dist/lifecycle/index-drift.d.ts.map +1 -0
- package/dist/lifecycle/index-drift.js +178 -0
- package/dist/lifecycle/index-import.d.ts +168 -0
- package/dist/lifecycle/index-import.d.ts.map +1 -0
- package/dist/lifecycle/index-import.js +515 -0
- package/dist/lifecycle/index-join.d.ts +129 -0
- package/dist/lifecycle/index-join.d.ts.map +1 -0
- package/dist/lifecycle/index-join.js +248 -0
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle/observation-baseline.d.ts +61 -21
- package/dist/lifecycle/observation-baseline.d.ts.map +1 -1
- package/dist/lifecycle/observation-baseline.js +144 -19
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/observe.js +6 -1
- package/dist/lifecycle/query.d.ts +45 -4
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +89 -7
- package/dist/lifecycle/replay.d.ts +10 -3
- package/dist/lifecycle/replay.d.ts.map +1 -1
- package/dist/lifecycle/replay.js +10 -6
- package/dist/lifecycle/scenario.d.ts +4 -3
- package/dist/lifecycle/scenario.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store-fake.d.ts +9 -0
- package/dist/lifecycle/snapshot-store-fake.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-fake.js +21 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts +102 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-s3.js +254 -0
- package/dist/lifecycle/snapshot-store.d.ts +170 -0
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store.js +832 -0
- package/dist/lifecycle/snapshot.d.ts +11 -0
- package/dist/lifecycle/snapshot.d.ts.map +1 -1
- package/dist/lifecycle/snapshot.js +18 -5
- package/dist/lifecycle/type-listing.d.ts +148 -0
- package/dist/lifecycle/type-listing.d.ts.map +1 -0
- package/dist/lifecycle/type-listing.js +166 -0
- package/dist/lint/component-checks.d.ts +15 -1
- package/dist/lint/component-checks.d.ts.map +1 -1
- package/dist/lint/component-checks.js +1 -0
- package/dist/lint/presets/relaxed.json +2 -1
- package/dist/lint/presets/strict.json +2 -1
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.js +13 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.js +8 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts +33 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.js +123 -0
- package/dist/lint/rules/comp/index.d.ts +2 -1
- package/dist/lint/rules/comp/index.d.ts.map +1 -1
- package/dist/lint/rules/comp/index.js +4 -1
- package/dist/observation.d.ts +19 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +18 -1
- package/dist/op/activities/activity-contracts.d.ts +1 -1
- package/dist/op/activities/activity-contracts.js +1 -1
- package/dist/op/activities/change-set.d.ts +6 -4
- package/dist/op/activities/change-set.d.ts.map +1 -1
- package/dist/op/activities/change-set.js +4 -2
- package/dist/op/activity-failure.d.ts +27 -0
- package/dist/op/activity-failure.d.ts.map +1 -1
- package/dist/op/activity-failure.js +31 -0
- package/dist/op/index.d.ts +2 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/local-executor.d.ts +5 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +22 -8
- package/dist/pr-loop.d.ts +92 -3
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +62 -3
- package/dist/pulumi-urn.d.ts +101 -0
- package/dist/pulumi-urn.d.ts.map +1 -0
- package/dist/pulumi-urn.js +131 -0
- package/dist/release-floors.d.ts +23 -0
- package/dist/release-floors.d.ts.map +1 -0
- package/dist/release-floors.js +22 -0
- package/dist/sensitive-key.d.ts +23 -0
- package/dist/sensitive-key.d.ts.map +1 -0
- package/dist/sensitive-key.js +31 -0
- package/dist/wave-runtime.mjs +234 -234
- package/dist/workspace/adoption-report.d.ts +53 -0
- package/dist/workspace/adoption-report.d.ts.map +1 -0
- package/dist/workspace/adoption-report.js +76 -0
- package/dist/workspace/capabilities-contract.d.ts +7 -0
- package/dist/workspace/capabilities-contract.d.ts.map +1 -1
- package/dist/workspace/capabilities-contract.js +2 -1
- package/dist/workspace/capabilities.schema.json +98 -0
- package/dist/workspace/change-set.schema.json +42 -3
- package/dist/workspace/ci-cloud-identity.d.ts +13 -1
- package/dist/workspace/ci-cloud-identity.d.ts.map +1 -1
- package/dist/workspace/ci-cloud-identity.js +30 -1
- package/dist/workspace/compose-graph.d.ts +10 -1
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/compose-graph.js +6 -1
- package/dist/workspace/conformance/index.d.ts +1 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/index.js +6 -1
- package/dist/workspace/drift-cli.d.ts +81 -0
- package/dist/workspace/drift-cli.d.ts.map +1 -0
- package/dist/workspace/drift-cli.js +317 -0
- package/dist/workspace/drift.schema.json +672 -0
- package/dist/workspace/graph-cli.d.ts +2 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/graph-cli.js +3 -0
- package/dist/workspace/graph.schema.json +72 -0
- package/dist/workspace/init.d.ts +5 -1
- package/dist/workspace/init.d.ts.map +1 -1
- package/dist/workspace/init.js +55 -9
- package/dist/workspace/ledger.schema.json +1 -1
- package/dist/workspace/nested-graph.d.ts.map +1 -1
- package/dist/workspace/nested-graph.js +2 -0
- package/dist/workspace/pr-report.schema.json +76 -3
- package/dist/workspace/promote-waves.d.ts +112 -0
- package/dist/workspace/promote-waves.d.ts.map +1 -0
- package/dist/workspace/promote-waves.js +290 -0
- package/dist/workspace/promote.d.ts +84 -2
- package/dist/workspace/promote.d.ts.map +1 -1
- package/dist/workspace/promote.js +347 -61
- package/dist/workspace/reason-codes.d.ts +12 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +14 -0
- package/dist/workspace/search-contract.d.ts +3 -3
- package/dist/workspace/search-contract.d.ts.map +1 -1
- package/dist/workspace/search-contract.js +2 -0
- package/dist/workspace/search.schema.json +103 -5
- package/package.json +14 -1
- package/src/__fixtures__/drift-record/README.md +58 -0
- package/src/__fixtures__/drift-record/choudoufu-cone.ndjson +4 -0
- package/src/__fixtures__/drift-record/choudoufu-resource.ndjson +3 -0
- package/src/__fixtures__/drift-record/component-status-ledger.json +65 -0
- package/src/__fixtures__/drift-record/component-status.json +91 -0
- package/src/__fixtures__/drift-record/deep-diff.json +259 -0
- package/src/__fixtures__/drift-record/lifecycle-diff-live.json +825 -0
- package/src/__fixtures__/drift-record/live-diff.json +125 -0
- package/src/audit/discover.e2e.test.ts +14 -0
- package/src/audit/discover.ts +3 -1
- package/src/behaviour.ts +1 -1
- package/src/capabilities/templates.json +145 -0
- package/src/capabilities/templates.test.ts +212 -0
- package/src/capabilities/templates.ts +204 -0
- package/src/change-set-bundle.test.ts +83 -0
- package/src/change-set-graph.ts +80 -9
- package/src/change-set.test.ts +24 -0
- package/src/change-set.ts +77 -14
- package/src/ci-identity-targets.test.ts +23 -0
- package/src/ci-identity.ts +10 -4
- package/src/cli/commands/import-index.test.ts +117 -0
- package/src/cli/commands/import-index.ts +265 -0
- package/src/cli/commands/lint.ts +4 -2
- package/src/cli/handlers/components.test.ts +9 -0
- package/src/cli/handlers/components.ts +12 -2
- package/src/cli/handlers/fan-out.ts +17 -3
- package/src/cli/handlers/graph.test.ts +42 -0
- package/src/cli/handlers/graph.ts +26 -4
- package/src/cli/handlers/index-cloud.ts +32 -0
- package/src/cli/handlers/index-diff.test.ts +68 -0
- package/src/cli/handlers/index-diff.ts +146 -0
- package/src/cli/handlers/ledger-root-member.test.ts +161 -0
- package/src/cli/handlers/lifecycle-drift.ts +68 -0
- package/src/cli/handlers/lifecycle.test.ts +33 -11
- package/src/cli/handlers/lifecycle.ts +205 -30
- package/src/cli/handlers/misc.ts +73 -0
- package/src/cli/handlers/pr-waves-blocked.test.ts +37 -2
- package/src/cli/handlers/pr.ts +16 -3
- package/src/cli/handlers/promote.test.ts +64 -0
- package/src/cli/handlers/promote.ts +81 -6
- package/src/cli/handlers/query.ts +27 -4
- package/src/cli/handlers/run-declared-reads-cli.test.ts +187 -0
- package/src/cli/handlers/run-groups-cli.test.ts +229 -0
- package/src/cli/handlers/scenario.test.ts +13 -0
- package/src/cli/handlers/scenario.ts +8 -7
- package/src/cli/handlers/search-index.test.ts +255 -0
- package/src/cli/handlers/search-json.test.ts +1 -1
- package/src/cli/handlers/search-ownership.test.ts +194 -0
- package/src/cli/handlers/search.ts +271 -38
- package/src/cli/main.test.ts +7 -0
- package/src/cli/main.ts +56 -1
- package/src/cli/mcp/lifecycle-tools.ts +3 -2
- package/src/cli/mcp/resource-handlers.ts +4 -3
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/cli/parse-args.ts +40 -2
- package/src/cli/registry.ts +19 -1
- package/src/cloud-lister/aws.test.ts +202 -0
- package/src/cloud-lister/aws.ts +226 -0
- package/src/cloud-lister/azure.test.ts +132 -0
- package/src/cloud-lister/azure.ts +142 -0
- package/src/cloud-lister/common.ts +115 -0
- package/src/cloud-lister/credentials.ts +110 -0
- package/src/cloud-lister/fakes.ts +66 -0
- package/src/cloud-lister/gcp.test.ts +121 -0
- package/src/cloud-lister/gcp.ts +159 -0
- package/src/cloud-lister/guard.test.ts +198 -0
- package/src/cloud-lister/guard.ts +111 -0
- package/src/cloud-lister/ids.ts +54 -0
- package/src/cloud-lister/index.ts +134 -0
- package/src/cloud-lister/kubernetes.test.ts +160 -0
- package/src/cloud-lister/kubernetes.ts +284 -0
- package/src/cloud-lister/markers.ts +74 -0
- package/src/cloud-lister/mask.ts +77 -0
- package/src/cloud-lister/shape.test.ts +81 -0
- package/src/cloud-lister/sigv4.ts +70 -0
- package/src/cloud-lister/transport.ts +118 -0
- package/src/cloud-lister/types.ts +135 -0
- package/src/components/capability-plugin-loader.ts +4 -0
- package/src/components/capability-plugin.ts +10 -0
- package/src/components/capability.ts +238 -0
- package/src/components/cli-support.ts +70 -14
- package/src/components/covered-round.test.ts +166 -0
- package/src/components/covered-round.ts +293 -0
- package/src/components/declared-reads.test.ts +103 -0
- package/src/components/declared-reads.ts +134 -0
- package/src/components/deploy-units.ts +4 -0
- package/src/components/driver.ts +101 -4
- package/src/components/fan-out-run.ts +95 -15
- package/src/components/fan-out-support.ts +10 -1
- package/src/components/fan-out.ts +30 -0
- package/src/components/groups.test.ts +320 -0
- package/src/components/groups.ts +880 -0
- package/src/components/index.ts +59 -0
- package/src/components/plan-shape-conformance.ts +130 -0
- package/src/components/pr-env-run-bundle.test.ts +2 -0
- package/src/components/pr-run.test.ts +728 -4
- package/src/components/pr-run.ts +395 -55
- package/src/components/promote-rounds.ts +25 -2
- package/src/components/promote.ts +55 -5
- package/src/components/registry.test.ts +1 -1
- package/src/components/release-gate.ts +115 -30
- package/src/components/release-groups.test.ts +362 -0
- package/src/components/run-groups.ts +113 -0
- package/src/components/starter-plugin.ts +6 -0
- package/src/components/verbs/index.ts +1 -0
- package/src/components/verbs/member-outputs.test.ts +205 -0
- package/src/components/verbs/member-outputs.ts +308 -0
- package/src/components/wave-plan.ts +5 -2
- package/src/config.ts +44 -0
- package/src/deep-observation.ts +5 -23
- package/src/drift-record.test.ts +596 -0
- package/src/drift-record.ts +1206 -0
- package/src/engine-facts.guard.test.ts +111 -0
- package/src/engine-facts.test.ts +178 -0
- package/src/engine-facts.ts +154 -0
- package/src/gated-waves-bundle.test.ts +2 -0
- package/src/graph-ir-live.test.ts +92 -0
- package/src/graph-ir.ts +317 -7
- package/src/graph-refs.ts +416 -0
- package/src/graph-schema/fixtures/adopt.json +15 -0
- package/src/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/src/graph-schema/fixtures/index.json +68 -0
- package/src/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/src/graph-schema/fixtures.ts +267 -0
- package/src/graph-schema/generate.ts +263 -0
- package/src/graph-schema/graph-schema.test.ts +153 -0
- package/src/graph-schema/graph.schema.json +1387 -0
- package/src/health.schema.json +2 -1
- package/src/identity.ts +2 -0
- package/src/index.ts +2 -0
- package/src/instance-nodes.ts +288 -0
- package/src/lexicon.ts +76 -0
- package/src/lifecycle/__fixtures__/index-diff/20261026T120000Z-aaaaaaaaaaaa.json +149 -0
- package/src/lifecycle/__fixtures__/index-diff/20261026T130000Z-bbbbbbbbbbbb.json +127 -0
- package/src/lifecycle/adoption-file.test.ts +100 -0
- package/src/lifecycle/adoption-file.ts +154 -0
- package/src/lifecycle/cloud-index.test.ts +517 -0
- package/src/lifecycle/cloud-index.ts +736 -0
- package/src/lifecycle/derive-edges.test.ts +193 -0
- package/src/lifecycle/derive-edges.ts +182 -0
- package/src/lifecycle/git.ts +10 -4
- package/src/lifecycle/identity-match.test.ts +308 -0
- package/src/lifecycle/identity-match.ts +257 -0
- package/src/lifecycle/index-diff.test.ts +198 -0
- package/src/lifecycle/index-diff.ts +476 -0
- package/src/lifecycle/index-document.test.ts +64 -0
- package/src/lifecycle/index-document.ts +299 -0
- package/src/lifecycle/index-drift.test.ts +191 -0
- package/src/lifecycle/index-drift.ts +304 -0
- package/src/lifecycle/index-import.test.ts +255 -0
- package/src/lifecycle/index-import.ts +634 -0
- package/src/lifecycle/index-join.test.ts +250 -0
- package/src/lifecycle/index-join.ts +304 -0
- package/src/lifecycle/index-store-load-bearing.test.ts +187 -0
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/member-ledger.test.ts +25 -7
- package/src/lifecycle/observation-baseline.test.ts +72 -1
- package/src/lifecycle/observation-baseline.ts +190 -27
- package/src/lifecycle/observe.ts +6 -1
- package/src/lifecycle/query.test.ts +69 -1
- package/src/lifecycle/query.ts +103 -10
- package/src/lifecycle/replay.test.ts +9 -5
- package/src/lifecycle/replay.ts +9 -5
- package/src/lifecycle/scenario.ts +4 -3
- package/src/lifecycle/snapshot-store-fake.ts +29 -0
- package/src/lifecycle/snapshot-store-s3.ts +316 -0
- package/src/lifecycle/snapshot-store.test.ts +385 -0
- package/src/lifecycle/snapshot-store.ts +981 -0
- package/src/lifecycle/snapshot.test.ts +13 -0
- package/src/lifecycle/snapshot.ts +23 -6
- package/src/lifecycle/type-listing.test.ts +166 -0
- package/src/lifecycle/type-listing.ts +309 -0
- package/src/lint/component-checks.ts +17 -1
- package/src/lint/config.test.ts +3 -0
- package/src/lint/presets/relaxed.json +2 -1
- package/src/lint/presets/strict.json +2 -1
- package/src/lint/rules/__fixtures__/comp/comp008/fail/dns.component.ts +15 -0
- package/src/lint/rules/__fixtures__/comp/comp008/pass/dns.component.ts +10 -0
- package/src/lint/rules/comp/comp.test.ts +2 -1
- package/src/lint/rules/comp/comp008-applies-signal-only-root.ts +121 -0
- package/src/lint/rules/comp/comp008.test.ts +77 -0
- package/src/lint/rules/comp/index.ts +4 -1
- package/src/observation-edges.test.ts +33 -0
- package/src/observation.ts +36 -1
- package/src/op/activities/activity-contracts.ts +1 -1
- package/src/op/activities/change-set.ts +8 -5
- package/src/op/activity-failure.ts +36 -0
- package/src/op/index.ts +2 -1
- package/src/op/local-executor.test.ts +80 -0
- package/src/op/local-executor.ts +27 -9
- package/src/pr-loop-bundle.test.ts +5 -2
- package/src/pr-loop.test.ts +57 -1
- package/src/pr-loop.ts +154 -6
- package/src/pulumi-urn.ts +151 -0
- package/src/release-floors.ts +22 -0
- package/src/sensitive-key.ts +34 -0
- package/src/workspace/adoption-report.test.ts +61 -0
- package/src/workspace/adoption-report.ts +103 -0
- package/src/workspace/capabilities-contract.test.ts +4 -0
- package/src/workspace/capabilities-contract.ts +9 -1
- package/src/workspace/capabilities.schema.json +98 -0
- package/src/workspace/change-set.schema.json +42 -3
- package/src/workspace/ci-cloud-identity.ts +31 -1
- package/src/workspace/compose-graph.test.ts +12 -0
- package/src/workspace/compose-graph.ts +12 -1
- package/src/workspace/conformance/conformance.e2e.test.ts +2 -1
- package/src/workspace/conformance/index.ts +6 -1
- package/src/workspace/drift-cli.test.ts +65 -0
- package/src/workspace/drift-cli.ts +365 -0
- package/src/workspace/drift.schema.json +672 -0
- package/src/workspace/graph-cli.ts +5 -0
- package/src/workspace/graph.schema.json +72 -0
- package/src/workspace/init.test.ts +38 -1
- package/src/workspace/init.ts +50 -8
- package/src/workspace/intent-gaps.test.ts +18 -2
- package/src/workspace/ledger.schema.json +1 -1
- package/src/workspace/nested-graph.ts +1 -0
- package/src/workspace/pr-report.schema.json +76 -3
- package/src/workspace/promote-waves.test.ts +296 -0
- package/src/workspace/promote-waves.ts +340 -0
- package/src/workspace/promote.test.ts +158 -4
- package/src/workspace/promote.ts +398 -57
- package/src/workspace/reason-codes.test.ts +4 -1
- package/src/workspace/reason-codes.ts +14 -0
- package/src/workspace/search-contract.ts +2 -0
- package/src/workspace/search.schema.json +103 -5
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant import --index <ref>` (#4524): typed source for indexed resources.
|
|
3
|
+
*
|
|
4
|
+
* Reads one index version (a file, or a version in the project's index
|
|
5
|
+
* store), selects nodes, and writes source through each lexicon's own
|
|
6
|
+
* template generator. Nothing is applied and nothing is written to the
|
|
7
|
+
* cloud. The pure part is ../../lifecycle/index-import.ts; this module reads
|
|
8
|
+
* the index, builds the project for the declared check, and writes files.
|
|
9
|
+
*
|
|
10
|
+
* The report (`chant-index-import.json` in the output directory, or
|
|
11
|
+
* `--report <path>`) names every selected resource's identity and cloud ids,
|
|
12
|
+
* what was imported, declared or unsupported, each reference and each
|
|
13
|
+
* parameter. The adoption step (INTENTIUS/choudoufu#2284) reads it.
|
|
14
|
+
* `--adopt-out <file>` also writes the adoption file (`adopt: v1`, #4536)
|
|
15
|
+
* that adopts every imported resource as its logical id.
|
|
16
|
+
*/
|
|
17
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
18
|
+
import { dirname, join, relative, resolve } from "path";
|
|
19
|
+
import { adoptionFileFromImportReport, adoptionFileJson } from "../../lifecycle/adoption-file.js";
|
|
20
|
+
import { declaredNodes, indexImportHeader, planIndexImport, selectionIsEmpty, } from "../../lifecycle/index-import.js";
|
|
21
|
+
import { generateOrganizedFiles } from "./import.js";
|
|
22
|
+
export const INDEX_IMPORT_REPORT_FILE = "chant-index-import.json";
|
|
23
|
+
function asDocuments(parsed, from) {
|
|
24
|
+
const list = Array.isArray(parsed)
|
|
25
|
+
? parsed
|
|
26
|
+
: parsed && typeof parsed === "object" && Array.isArray(parsed.documents)
|
|
27
|
+
? parsed.documents
|
|
28
|
+
: [parsed];
|
|
29
|
+
for (const d of list) {
|
|
30
|
+
if (!d || typeof d !== "object" || d.index !== "v1") {
|
|
31
|
+
throw new Error(`${from} does not hold index documents (index: "v1")`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return list;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The documents an index ref names: a file path, or a store ref in the
|
|
38
|
+
* grammar `chant search --index` reads (`<scopeKey>[@latest|@<version>]`,
|
|
39
|
+
* ../../lifecycle/index-join.ts), from the store chant.config's `snapshots`
|
|
40
|
+
* picks (#4519).
|
|
41
|
+
*/
|
|
42
|
+
export async function loadIndexDocuments(ref, cwd) {
|
|
43
|
+
const asFile = resolve(cwd, ref);
|
|
44
|
+
if (existsSync(asFile))
|
|
45
|
+
return asDocuments(JSON.parse(readFileSync(asFile, "utf-8")), ref);
|
|
46
|
+
const { parseIndexRef, readIndexRef } = await import("../../lifecycle/index-join.js");
|
|
47
|
+
const parsed = parseIndexRef(ref);
|
|
48
|
+
if ("error" in parsed)
|
|
49
|
+
throw new Error(`no file of that name, and ${parsed.error}; ${parsed.hint}`);
|
|
50
|
+
const { resolveSnapshotStore } = await import("../../lifecycle/snapshot-store.js");
|
|
51
|
+
const store = await resolveSnapshotStore({ cwd });
|
|
52
|
+
await store.fetch();
|
|
53
|
+
const read = await readIndexRef(store, parsed);
|
|
54
|
+
if ("error" in read)
|
|
55
|
+
throw new Error(read.hint ? `${read.error}; ${read.hint}` : read.error);
|
|
56
|
+
return [read.doc];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The files an import plan writes, through each lexicon's template
|
|
60
|
+
* generator, with the plan's header on each group's first file. Pure apart
|
|
61
|
+
* from the generators, so the same plan gives byte-identical files.
|
|
62
|
+
*/
|
|
63
|
+
export function renderIndexImport(plan, plugins) {
|
|
64
|
+
const files = [];
|
|
65
|
+
const warnings = [];
|
|
66
|
+
for (const group of plan.groups) {
|
|
67
|
+
const plugin = plugins.find((p) => p.name === group.lexicon);
|
|
68
|
+
if (!plugin?.templateGenerator) {
|
|
69
|
+
warnings.push(`the ${group.lexicon} lexicon has no template generator; ${group.ir.resources.length} resource(s) in ${group.dir || "."} were not written`);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const organized = generateOrganizedFiles(group.ir, plugin.templateGenerator());
|
|
73
|
+
warnings.push(...organized.warnings);
|
|
74
|
+
organized.files.forEach((f, i) => {
|
|
75
|
+
const path = group.dir ? `${group.dir}/${f.path}` : f.path;
|
|
76
|
+
files.push({ path, content: i === 0 ? indexImportHeader(plan, group) + f.content : f.content });
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return { files, warnings };
|
|
80
|
+
}
|
|
81
|
+
/** The report as written: two-space JSON and a final newline. */
|
|
82
|
+
export function indexImportReportJson(report) {
|
|
83
|
+
return JSON.stringify(report, null, 2) + "\n";
|
|
84
|
+
}
|
|
85
|
+
/** The project's declared entities by lexicon, or why there are none to check. */
|
|
86
|
+
async function projectEntities(projectDir, src, plugins) {
|
|
87
|
+
const entities = new Map();
|
|
88
|
+
try {
|
|
89
|
+
const { loadChantConfigUpward } = await import("../../config.js");
|
|
90
|
+
const { config, configPath } = await loadChantConfigUpward(projectDir);
|
|
91
|
+
if (!configPath)
|
|
92
|
+
return { entities };
|
|
93
|
+
const projectPlugins = plugins.filter((p) => p.serializer);
|
|
94
|
+
if (projectPlugins.length === 0)
|
|
95
|
+
return { entities };
|
|
96
|
+
const { build } = await import("../../build.js");
|
|
97
|
+
const { isObservableDeclarable } = await import("../../declarable.js");
|
|
98
|
+
const root = src ? resolve(src) : resolve(dirname(configPath), config.sourceDir ?? ".");
|
|
99
|
+
const result = await build(root, projectPlugins.map((p) => p.serializer), undefined, { config: config });
|
|
100
|
+
if (result.errors.length > 0) {
|
|
101
|
+
return { entities, warning: `the project at ${root} does not build, so no indexed resource was checked against its declarations` };
|
|
102
|
+
}
|
|
103
|
+
for (const [name, entity] of result.entities) {
|
|
104
|
+
if (!isObservableDeclarable(entity))
|
|
105
|
+
continue;
|
|
106
|
+
const list = entities.get(entity.lexicon) ?? entities.set(entity.lexicon, []).get(entity.lexicon);
|
|
107
|
+
list.push({ name, entityType: entity.entityType, props: (entity.props ?? {}) });
|
|
108
|
+
}
|
|
109
|
+
return { entities };
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
return { entities, warning: `the declared check did not run: ${err instanceof Error ? err.message : String(err)}` };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/** The plugins for the index's lexicons and the project's, each loaded once; one that fails to load is left out. */
|
|
116
|
+
async function pluginsFor(docs, projectDir) {
|
|
117
|
+
const { loadPlugin, resolveProjectLexicons } = await import("../plugins.js");
|
|
118
|
+
let names = [];
|
|
119
|
+
try {
|
|
120
|
+
names = await resolveProjectLexicons(projectDir);
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
names = [];
|
|
124
|
+
}
|
|
125
|
+
for (const d of docs)
|
|
126
|
+
for (const n of d.graph.nodes)
|
|
127
|
+
if (!n.unmappedKind)
|
|
128
|
+
names.push(n.lexicon);
|
|
129
|
+
const plugins = [];
|
|
130
|
+
for (const name of [...new Set(names)].sort()) {
|
|
131
|
+
try {
|
|
132
|
+
const plugin = await loadPlugin(name);
|
|
133
|
+
await plugin.init?.();
|
|
134
|
+
plugins.push(plugin);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
// Not installed here: its nodes are reported as not loaded.
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return plugins;
|
|
141
|
+
}
|
|
142
|
+
export async function importFromIndex(options) {
|
|
143
|
+
const outputDir = resolve(options.output ?? "./infra/");
|
|
144
|
+
const projectDir = resolve(options.projectDir ?? (options.output ? dirname(outputDir) : "."));
|
|
145
|
+
const warnings = [];
|
|
146
|
+
const fail = (error) => ({ success: false, generatedFiles: [], warnings, error });
|
|
147
|
+
if (selectionIsEmpty(options.selection)) {
|
|
148
|
+
return fail("name what to import: --type <type>, --name <native id>, --tag key=value, --select <file of node ids>, or --all");
|
|
149
|
+
}
|
|
150
|
+
let docs;
|
|
151
|
+
try {
|
|
152
|
+
docs = await loadIndexDocuments(options.index, process.cwd());
|
|
153
|
+
}
|
|
154
|
+
catch (err) {
|
|
155
|
+
return fail(`could not read the index ${options.index}: ${err instanceof Error ? err.message : String(err)}`);
|
|
156
|
+
}
|
|
157
|
+
const plugins = options.plugins ?? (await pluginsFor(docs, projectDir));
|
|
158
|
+
let declared = new Map();
|
|
159
|
+
let entities;
|
|
160
|
+
if (options.declaredEntities) {
|
|
161
|
+
entities = options.declaredEntities;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
const project = await projectEntities(projectDir, options.src, plugins);
|
|
165
|
+
if (project.warning)
|
|
166
|
+
warnings.push(project.warning);
|
|
167
|
+
entities = project.entities;
|
|
168
|
+
}
|
|
169
|
+
try {
|
|
170
|
+
declared = declaredNodes(docs, entities, plugins);
|
|
171
|
+
}
|
|
172
|
+
catch (err) {
|
|
173
|
+
warnings.push(`the declared check did not run: ${err instanceof Error ? err.message : String(err)}`);
|
|
174
|
+
}
|
|
175
|
+
let plan;
|
|
176
|
+
try {
|
|
177
|
+
plan = planIndexImport(docs, options.selection, plugins, { declared });
|
|
178
|
+
}
|
|
179
|
+
catch (err) {
|
|
180
|
+
return fail(err instanceof Error ? err.message : String(err));
|
|
181
|
+
}
|
|
182
|
+
if (plan.report.resources.length === 0)
|
|
183
|
+
return fail("the selection matches no node in the index");
|
|
184
|
+
const { files, warnings: renderWarnings } = renderIndexImport(plan, plugins);
|
|
185
|
+
warnings.push(...renderWarnings);
|
|
186
|
+
for (const r of plan.report.resources) {
|
|
187
|
+
if (r.status === "unsupported")
|
|
188
|
+
warnings.push(`${r.node}: not imported, ${r.reason}`);
|
|
189
|
+
}
|
|
190
|
+
const reportPath = resolve(options.report ?? join(outputDir, INDEX_IMPORT_REPORT_FILE));
|
|
191
|
+
const generatedFiles = [];
|
|
192
|
+
const write = (path, content, shown) => {
|
|
193
|
+
if (existsSync(path) && !options.force) {
|
|
194
|
+
warnings.push(`File ${shown} already exists, skipping`);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
198
|
+
writeFileSync(path, content);
|
|
199
|
+
generatedFiles.push(shown);
|
|
200
|
+
};
|
|
201
|
+
for (const file of files)
|
|
202
|
+
write(join(outputDir, file.path), file.content, file.path);
|
|
203
|
+
write(reportPath, indexImportReportJson(plan.report), relative(outputDir, reportPath) || reportPath);
|
|
204
|
+
if (options.adoptOut) {
|
|
205
|
+
const adoptPath = resolve(options.adoptOut);
|
|
206
|
+
try {
|
|
207
|
+
write(adoptPath, adoptionFileJson(adoptionFileFromImportReport(plan.report)), relative(outputDir, adoptPath) || adoptPath);
|
|
208
|
+
}
|
|
209
|
+
catch (err) {
|
|
210
|
+
return { success: false, generatedFiles, warnings, error: `no adoption file written: ${err instanceof Error ? err.message : String(err)}`, report: plan.report };
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const lexicons = [...new Set(plan.groups.map((g) => g.lexicon))];
|
|
214
|
+
return {
|
|
215
|
+
success: true,
|
|
216
|
+
generatedFiles,
|
|
217
|
+
warnings,
|
|
218
|
+
...(lexicons.length === 1 ? { lexicon: lexicons[0] } : {}),
|
|
219
|
+
report: plan.report,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/** One line per status: what was imported, declared and left out. */
|
|
223
|
+
export function summarizeIndexImport(report) {
|
|
224
|
+
const count = (s) => report.resources.filter((r) => r.status === s).length;
|
|
225
|
+
return `index import: ${count("imported")} imported, ${count("declared")} already declared, ${count("unsupported")} unsupported, ${report.parameters.length} parameter(s) to fill in`;
|
|
226
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAW,MAAM,iBAAiB,CAAC;AAyCzE;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAW5D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAoBhC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,WAAW,CAAC;AAsBnD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,WAAW,CAAC;AA2I9C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,oBAAoB;IACpB,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC,qCAAqC;IACrC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAW,MAAM,iBAAiB,CAAC;AAyCzE;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAW5D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAoBhC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,WAAW,CAAC;AAsBnD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,WAAW,CAAC;AA2I9C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,oBAAoB;IACpB,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC,qCAAqC;IACrC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAkfD;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA+N3E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAIxD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GACtC,MAAM,IAAI,CAiCZ"}
|
|
@@ -6,7 +6,7 @@ import { findInfraFiles, detectLexicons } from "../../index.js";
|
|
|
6
6
|
import { formatStylish, formatJson, formatSarif } from "../reporters/stylish.js";
|
|
7
7
|
import { loadLocalRules } from "../../lint/rule-loader.js";
|
|
8
8
|
import { loadCoreRules } from "../../lint/rules/index.js";
|
|
9
|
-
import { loadComponentChecks } from "../../lint/rules/comp/index.js";
|
|
9
|
+
import { loadComponentChecks, signalOnlyRootsOf } from "../../lint/rules/comp/index.js";
|
|
10
10
|
import { runComponentChecks } from "../../lint/component-checks.js";
|
|
11
11
|
import { buildCapabilityRegistry } from "../../components/capability-plugin-loader.js";
|
|
12
12
|
import { coreOpChecks, workspaceIdentityGates } from "../../lint/rules/op/index.js";
|
|
@@ -363,7 +363,9 @@ async function runComponentCheckDiagnostics(infraPath, sandbox, buildParams) {
|
|
|
363
363
|
const checks = loadComponentChecks();
|
|
364
364
|
const allCheckIds = new Set(checks.map((c) => c.id));
|
|
365
365
|
const registryContext = await resolveRegistryContext(infraPath);
|
|
366
|
-
|
|
366
|
+
// COMP008 (#4490) reads the project's signalOnly terraform roots.
|
|
367
|
+
const signalOnlyRoots = await signalOnlyRootsOf(findProjectRoot(infraPath));
|
|
368
|
+
const raw = await runComponentChecks(infraPath, checks, { ...registryContext, signalOnlyRoots }, sandbox, buildParams);
|
|
367
369
|
const fileDirectivesCache = new Map();
|
|
368
370
|
const fileLevelDisable = (file, checkId) => {
|
|
369
371
|
let directives = fileDirectivesCache.get(file);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAKnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+GrF;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiH9E;AA6DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAMzD;AAgHD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoT9E;AAED,kEAAkE;AAClE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E"}
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import { resolve, join, dirname } from "node:path";
|
|
30
30
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
31
|
-
import { getHeadCommit, fetchLifecycle, pushLifecycle,
|
|
31
|
+
import { getHeadCommit, fetchLifecycle, pushLifecycle, snapshotStorageKey, StaleLifecycleBranchError } from "../../lifecycle/git.js";
|
|
32
|
+
import { resolveSnapshotStore } from "../../lifecycle/snapshot-store.js";
|
|
32
33
|
import { appendReleaseRecord, readReleaseLedger, listReleaseEnvironments, latestPerComponent, resolveRunId, InvalidReleaseRecordError, } from "../../lifecycle/release-ledger.js";
|
|
33
34
|
import { persistReleasePlan, InvalidReleasePlanError } from "../../lifecycle/plan-ledger.js";
|
|
34
35
|
import { reconcileStatus, liveEvidenceFromChangeSet, compareAcrossEnvironments, mergeLiveEvidence } from "../../lifecycle/status.js";
|
|
@@ -416,14 +417,22 @@ async function observeComponentStacks(components, plugins, environment) {
|
|
|
416
417
|
* snapshot is no baseline, never an error: with none, nothing can have changed
|
|
417
418
|
* since, and the status falls back to identity and presence.
|
|
418
419
|
*/
|
|
420
|
+
/** Stores already fetched in this process, so a status over many lexicons fetches once. */
|
|
421
|
+
const fetchedBaselineStores = new WeakSet();
|
|
419
422
|
async function readStatusBaseline(environment, lexicon, stacks) {
|
|
420
423
|
const keys = [...new Set([...stacks.filter((s) => !!s).map((s) => snapshotStorageKey(lexicon, s)), snapshotStorageKey(lexicon)])];
|
|
424
|
+
// Through the index store (#4519); a store that cannot be built is no baseline, like a missing snapshot.
|
|
425
|
+
const store = await resolveSnapshotStore().catch(() => null);
|
|
426
|
+
if (store && !fetchedBaselineStores.has(store)) {
|
|
427
|
+
fetchedBaselineStores.add(store);
|
|
428
|
+
await store.fetch();
|
|
429
|
+
}
|
|
421
430
|
let resources;
|
|
422
431
|
const timestamps = new Map();
|
|
423
432
|
for (const key of keys) {
|
|
424
433
|
let snap;
|
|
425
434
|
try {
|
|
426
|
-
const content = await
|
|
435
|
+
const content = store ? await store.readLatest(environment, key) : null;
|
|
427
436
|
snap = content ? JSON.parse(content) : undefined;
|
|
428
437
|
}
|
|
429
438
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fan-out.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/fan-out.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAIH,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAiB7F,OAAO,EAAmB,KAAK,YAAY,EAAuB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fan-out.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/fan-out.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAIH,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAiB7F,OAAO,EAAmB,KAAK,YAAY,EAAuB,MAAM,0BAA0B,CAAC;AAWnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,WAAW,EACnB,IAAI,GAAE;IACJ,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,GACL,OAAO,CAAC;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA+ErE;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAO9E"}
|
|
@@ -69,6 +69,8 @@ import { approveCommand, gateIsSealed } from "../../op/gate.js";
|
|
|
69
69
|
import { getHeadCommit } from "../../lifecycle/git.js";
|
|
70
70
|
import { remainingFanOut } from "../../components/fan-out.js";
|
|
71
71
|
import { readDeployedOutputs } from "../../components/wave-plan.js";
|
|
72
|
+
import { formRunGroups } from "../../components/groups.js";
|
|
73
|
+
import { renderRunGroups, runGroupsReport } from "../../components/run-groups.js";
|
|
72
74
|
import { deployContext, failedRunExitCode } from "../../components/driver.js";
|
|
73
75
|
import { resolveCliBuildParams, parseParamFlags } from "../build-params-cli.js";
|
|
74
76
|
import { formatError, formatInfo, formatWarning } from "../format.js";
|
|
@@ -215,6 +217,8 @@ async function fanOut(ctx, projectPath, config) {
|
|
|
215
217
|
console.error(formatError({ message: signal.error, ...(signal.hint ? { hint: signal.hint } : {}) }));
|
|
216
218
|
return 1;
|
|
217
219
|
}
|
|
220
|
+
// #4516: one registry finds the declared reads (a template's Fn::ImportValue) that order the fan-out and runs it.
|
|
221
|
+
const registry = await fanOutRegistry(projectPath, config);
|
|
218
222
|
let derived;
|
|
219
223
|
try {
|
|
220
224
|
derived = await deriveFanOut({
|
|
@@ -223,6 +227,7 @@ async function fanOut(ctx, projectPath, config) {
|
|
|
223
227
|
sandbox: args.sandbox,
|
|
224
228
|
buildParams: paramsResolution.provenance,
|
|
225
229
|
config,
|
|
230
|
+
registry,
|
|
226
231
|
...(args.canary?.length ? { canary: args.canary } : {}),
|
|
227
232
|
});
|
|
228
233
|
}
|
|
@@ -368,7 +373,6 @@ async function fanOut(ctx, projectPath, config) {
|
|
|
368
373
|
return 1;
|
|
369
374
|
}
|
|
370
375
|
}
|
|
371
|
-
const registry = await fanOutRegistry(projectPath, config);
|
|
372
376
|
const env = args.env ?? "local";
|
|
373
377
|
// A completed component's recorded outputs win over a `--seed-outputs`
|
|
374
378
|
// entry for the same name, as a fresh apply's outputs merge over a seed in
|
|
@@ -422,10 +426,14 @@ async function fanOut(ctx, projectPath, config) {
|
|
|
422
426
|
// `--events-json` (#4041) names the run by it too.
|
|
423
427
|
const release = autoReleaseRun(`fan-out-${Date.now()}`);
|
|
424
428
|
const events = await openCliRunEvents(args, { kind: "component", name: `fan-out ${derived.plan.order.join(",")}`, runId: release.runId, cwd: projectPath });
|
|
429
|
+
// ws-107 (#4465): the components a capability takes as one plan in their
|
|
430
|
+
// wave and apply as one group; under --wave-gate none forms (ruling 1).
|
|
431
|
+
const runPlan = await formRunGroups({ components: derived.components, plan: derived.plan, registry, env, ...(waveGate ? { waveGate: true } : {}) });
|
|
425
432
|
let result;
|
|
426
433
|
try {
|
|
427
|
-
result = await runFanOut(
|
|
434
|
+
result = await runFanOut(runPlan, derived.components, registry, {
|
|
428
435
|
env,
|
|
436
|
+
...(runPlan.groups?.length ? { planGroupsAtWave: true } : {}),
|
|
429
437
|
releaseIdentity: () => (revision ? { revision } : {}),
|
|
430
438
|
componentOutputs,
|
|
431
439
|
...(targets ? { targets } : {}),
|
|
@@ -498,8 +506,13 @@ async function fanOut(ctx, projectPath, config) {
|
|
|
498
506
|
recordAttempt();
|
|
499
507
|
if (args.json)
|
|
500
508
|
renderFanOutJson(result);
|
|
501
|
-
else
|
|
509
|
+
else {
|
|
502
510
|
renderFanOutHuman(result, { ...(gate ? { gate } : {}), ...(waveGate ? { waveGate } : {}) });
|
|
511
|
+
// #4465: the groups applied as one, and how each member ended.
|
|
512
|
+
const report = runGroupsReport({ grouped: result.plan.groups?.length || result.plan.fallbacks?.length ? result.plan : runPlan, ...(result.groupOutcomes ? { outcomes: result.groupOutcomes } : {}) });
|
|
513
|
+
for (const line of renderRunGroups(report, "the same fan-out with --resume"))
|
|
514
|
+
console.error(formatInfo(line));
|
|
515
|
+
}
|
|
503
516
|
// A wave whose set moved after its approval stops with both digests named
|
|
504
517
|
// (#3049), the #2300 refusal on a set. Printed on stderr even under --json,
|
|
505
518
|
// since it is the line a CI log reader is looking for.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/graph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/graph.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAYhE,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,aAAa,CAAC;AAgE9D;;;;;;;;;GASG;AACH;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAE7D;AAqcD,yEAAyE;AACzE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,wGAAwG;IACxG,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAQD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,eAAe,CAoBtF"}
|
|
@@ -2,7 +2,7 @@ import { isAbsolute, relative, resolve } from "node:path";
|
|
|
2
2
|
import { discoverOps } from "../../op/discover.js";
|
|
3
3
|
import { discover } from "../../discovery/index.js";
|
|
4
4
|
import { partitionByLexicon, computeStackGraph, build } from "../../build.js";
|
|
5
|
-
import { applyLexiconOutputs, buildGraphIr, buildLiveGraphIr, collectUnobserved, overlayGraphs, sourceOverlayGraphs, GRAPH_IR_VERSION } from "../../graph-ir.js";
|
|
5
|
+
import { applyLexiconOutputs, buildGraphIr, buildLiveGraphIr, collectUnobserved, overlayGraphs, sourceOverlayGraphs, withInstanceNodes, GRAPH_IR_VERSION } from "../../graph-ir.js";
|
|
6
6
|
import { behaviourOverlay } from "../../behaviour-overlay.js";
|
|
7
7
|
import { applyBehaviourOverlay, behaviourRequestFromIr } from "../../behaviour-graph.js";
|
|
8
8
|
import { buildDeclaredPerStack } from "../../graph-declared.js";
|
|
@@ -274,6 +274,8 @@ async function runGraphLive(ctx, format) {
|
|
|
274
274
|
let observations;
|
|
275
275
|
// Facts about absent entities (#4372), carried onto the overlay's nodes.
|
|
276
276
|
let annotations;
|
|
277
|
+
// Which read answered each root (#4452), carried onto the IR as written.
|
|
278
|
+
let rootReads;
|
|
277
279
|
// A replay is a graph of what was recorded, so it must not reach the provider
|
|
278
280
|
// at all — not for observation and not for enrichment. Anything that quietly
|
|
279
281
|
// called out would make `--at` a live read with an older label on it.
|
|
@@ -304,6 +306,7 @@ async function runGraphLive(ctx, format) {
|
|
|
304
306
|
});
|
|
305
307
|
observations = observeResult.observations;
|
|
306
308
|
annotations = observeResult.annotations;
|
|
309
|
+
rootReads = observeResult.rootReads;
|
|
307
310
|
const { errors, warnings, notes = [] } = observeResult;
|
|
308
311
|
for (const e of errors)
|
|
309
312
|
console.error(formatWarning({ message: e }));
|
|
@@ -365,7 +368,13 @@ async function runGraphLive(ctx, format) {
|
|
|
365
368
|
let containment = [];
|
|
366
369
|
if (catalogs.length > 0) {
|
|
367
370
|
const reconstructed = reconstructEdges(ir.nodes, mergeCatalogs(catalogs));
|
|
368
|
-
|
|
371
|
+
// Merge, never replace, as `search --live` does (#1273). An observation
|
|
372
|
+
// can carry edges of its own (terraform's state dependencies, #4520's
|
|
373
|
+
// engine facts), and a catalog on one observing lexicon used to wipe every
|
|
374
|
+
// lexicon's: the reason terraform's catalog stayed off its plugin until
|
|
375
|
+
// #4535.
|
|
376
|
+
const seen = new Set(ir.edges.map((e) => `${e.from}|${e.to}|${e.viaAttr ?? ""}`));
|
|
377
|
+
ir = { ...ir, edges: [...ir.edges, ...reconstructed.edges.filter((e) => !seen.has(`${e.from}|${e.to}|${e.viaAttr ?? ""}`))] };
|
|
369
378
|
containment = reconstructed.containment;
|
|
370
379
|
}
|
|
371
380
|
// Drift overlay: classify each resource against declared source (managed /
|
|
@@ -411,7 +420,9 @@ async function runGraphLive(ctx, format) {
|
|
|
411
420
|
}
|
|
412
421
|
else {
|
|
413
422
|
await mergeGraphOps(declared.entities, declared.sourceFiles, projectPath);
|
|
414
|
-
|
|
423
|
+
// Instance nodes (#4454) on the declared side too, so a live instance
|
|
424
|
+
// meets its declared node and an unread one is painted alone.
|
|
425
|
+
const declaredIr = withInstanceNodes(withLexiconEdges(buildGraphIr(declared.entities, projectPath), plugins, declared.entities), declared.entities);
|
|
415
426
|
ir =
|
|
416
427
|
args.overlayAnchor === "live"
|
|
417
428
|
? overlayGraphs(ir, declaredIr, overlayOpts)
|
|
@@ -467,6 +478,11 @@ async function runGraphLive(ctx, format) {
|
|
|
467
478
|
ir = { ...ir, groups: { ...ir.groups, byContainer } };
|
|
468
479
|
}
|
|
469
480
|
}
|
|
481
|
+
// The structured read report (#4452) goes on last, past the overlay, lens
|
|
482
|
+
// and detail passes that each build a fresh IR, so it is in every format's
|
|
483
|
+
// IR whatever those kept.
|
|
484
|
+
if (rootReads && Object.keys(rootReads).length > 0)
|
|
485
|
+
ir = { ...ir, rootReads };
|
|
470
486
|
return emitIr(ir, ctx, format);
|
|
471
487
|
}
|
|
472
488
|
/**
|
|
@@ -858,7 +874,9 @@ async function runGraphView(ctx, format) {
|
|
|
858
874
|
await mergeGraphOps(result.entities, result.sourceFiles, projectPath);
|
|
859
875
|
// Build the base IR, focus with a lens (declarable-level, most precise), then
|
|
860
876
|
// apply the detail tier — so e.g. blast:<resource> works before any collapse.
|
|
861
|
-
|
|
877
|
+
// Instance nodes (#4454) go on here, not in `buildGraphIr`, so search and
|
|
878
|
+
// the other readers of the base IR still count one node per block.
|
|
879
|
+
let ir = withInstanceNodes(buildGraphIr(result.entities, projectPath), result.entities);
|
|
862
880
|
// The declared half of the epic's delta (#2355): this path predicts the
|
|
863
881
|
// file, the live path predicts the account. Same helper, so the two shapes
|
|
864
882
|
// reach the engine by one route and stay comparable.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant index <substrate>` as a registry command (chant#4532).
|
|
3
|
+
*
|
|
4
|
+
* At the terminal, main() hands `index`'s raw argv straight to
|
|
5
|
+
* `runCloudIndex` (../../lifecycle/cloud-index.ts), because its flags are its
|
|
6
|
+
* own. This entry is for a caller that has already parsed a command line
|
|
7
|
+
* with core's parser (the ACP server asks the registry whether a word is a
|
|
8
|
+
* verb): it rebuilds the words that parser keeps (the substrate, `--json`,
|
|
9
|
+
* `--help`), and refuses when the parsed line carried an action flag core's
|
|
10
|
+
* parser knows, so the read-only rule holds on this path too.
|
|
11
|
+
*/
|
|
12
|
+
import type { CommandContext } from "../registry.js";
|
|
13
|
+
export declare function runIndexCommand(ctx: CommandContext): Promise<number>;
|
|
14
|
+
//# sourceMappingURL=index-cloud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-cloud.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/index-cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkB1E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export async function runIndexCommand(ctx) {
|
|
2
|
+
const { runCloudIndex } = await import("../../lifecycle/cloud-index.js");
|
|
3
|
+
const a = ctx.args;
|
|
4
|
+
const action = a.fix ? "--fix" : a.live ? "--live" : a.write ? "--write" : a.yes ? "--yes" : a.op ? "--op" : undefined;
|
|
5
|
+
const words = [...(a.positionals ?? (a.path && a.path !== "." ? [a.path] : []))];
|
|
6
|
+
if (words[0] === "diff") {
|
|
7
|
+
// #4533 — `chant index diff <a> [<b>]` reads two stored versions; it takes no action flag either.
|
|
8
|
+
if (action) {
|
|
9
|
+
process.stderr.write(`chant index diff: refused ${action}: the diff only reads the store\n`);
|
|
10
|
+
return 2;
|
|
11
|
+
}
|
|
12
|
+
const { runIndexDiff } = await import("./index-diff.js");
|
|
13
|
+
return runIndexDiff([...words.slice(1), ...(a.json ? ["--json"] : []), ...(a.help ? ["--help"] : [])]);
|
|
14
|
+
}
|
|
15
|
+
if (action)
|
|
16
|
+
words.push(action);
|
|
17
|
+
if (a.json)
|
|
18
|
+
words.push("--json");
|
|
19
|
+
if (a.help)
|
|
20
|
+
words.push("--help");
|
|
21
|
+
return runCloudIndex(words);
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type StorePlan } from "../../lifecycle/cloud-index.js";
|
|
2
|
+
import { type IndexDiff } from "../../lifecycle/index-diff.js";
|
|
3
|
+
import { type SnapshotStore } from "../../lifecycle/snapshot-store.js";
|
|
4
|
+
export declare const INDEX_DIFF_USAGE = "chant index diff <a> [<b>] [--store <spec>] [--json]\n\nWhat changed between two versions of one index scope: nodes added and\nremoved, properties changed, edges added and removed. A node is removed only\nwhere the later read listed its type and location; elsewhere it is not\nobserved. Two versions of different scopes are refused.\n\n <a> <scopeKey>/<version>, or <scopeKey> for its latest version\n <b> <scopeKey>/<version>, or a version name in <a>'s scope.\n Absent: the version before <a> against <a> (a scope alone:\n its last two versions)\n --store <spec> the store to read, as chant index takes it (local,\n local:<dir>, git-ref, git-ref:<ref>, s3,\n s3://<bucket>[/<prefix>]). Default: the project's store,\n else chant's per-user store\n --json the diff as JSON\n";
|
|
5
|
+
export interface IndexDiffRunOptions {
|
|
6
|
+
cwd?: string;
|
|
7
|
+
env?: Record<string, string | undefined>;
|
|
8
|
+
home?: string;
|
|
9
|
+
stdout?: (s: string) => void;
|
|
10
|
+
stderr?: (s: string) => void;
|
|
11
|
+
/** Open the planned store; tests pass a fake. */
|
|
12
|
+
openStore?: (plan: StorePlan, cwd: string) => Promise<Pick<SnapshotStore, "kind" | "listIndex" | "readIndexAt" | "fetch">>;
|
|
13
|
+
}
|
|
14
|
+
/** The diff as text, one line per change. */
|
|
15
|
+
export declare function renderIndexDiff(d: IndexDiff): string;
|
|
16
|
+
/** `chant index diff`'s argv (the words after `diff`). Exit 0 on a diff, 1 on a refusal, 2 on a usage error. */
|
|
17
|
+
export declare function runIndexDiff(argv: readonly string[], o?: IndexDiffRunOptions): Promise<number>;
|
|
18
|
+
//# sourceMappingURL=index-diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-diff.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/index-diff.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACjH,OAAO,EAAqF,KAAK,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/I,OAAO,EAAkE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpI,eAAO,MAAM,gBAAgB,g5BAgB5B,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,iDAAiD;IACjD,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;CAC5H;AAeD,6CAA6C;AAC7C,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,CA0BpD;AAED,gHAAgH;AAChH,wBAAsB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,GAAE,mBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsDxG"}
|