@intentius/chant 0.124.52 → 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 +15 -2
- 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 +215 -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/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 +34 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +66 -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 +6 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/plan-shape-conformance.d.ts +48 -0
- package/dist/components/plan-shape-conformance.d.ts.map +1 -0
- package/dist/components/plan-shape-conformance.js +122 -0
- package/dist/components/pr-run.d.ts +41 -4
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +209 -39
- 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/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 +56 -1
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +51 -1
- 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 +51 -2
- 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 +14 -2
- 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 +229 -0
- package/src/components/cli-support.ts +70 -14
- 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 +89 -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 +42 -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 +516 -3
- package/src/components/pr-run.ts +231 -41
- 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/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 +43 -0
- package/src/pr-loop.ts +111 -2
- 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 +51 -2
- 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
package/dist/health.schema.json
CHANGED
package/dist/identity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,uEAAuE;AACvE,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,MAAM,EAAE,gBAAgB,CAAC;IACzB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,GAAG;IAAE,UAAU,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAE3F,iFAAiF;AACjF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,sBAAsB,GAC5B,KAAK,IAAI;IAAE,UAAU,EAAE,kBAAkB,CAAA;CAAE,CAE7C;AAED,2CAA2C;AAC3C,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,YAAY,GAAG,cAAc,CAAC;AAExE,uFAAuF;AACvF,MAAM,WA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EAAE,MAAM,EAOrC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAWjE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,MAAM,CAaR;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,WAAW,EAChB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,WAAW,CAWb;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,sBAAsB,GAAG,SAAS,EAC1C,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,WAAW,CAgCb;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,OAAO,EAAE,uBAAuB,EAChC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,OAAO,CAAC,WAAW,EAAE,CAAC,CAoBxB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,CAS3D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,GAAG,MAAM,CAiBjF"}
|
package/dist/identity.js
CHANGED
|
@@ -245,6 +245,8 @@ export function unresolvedReasonText(reason) {
|
|
|
245
245
|
return "the substrate exposes no self-query";
|
|
246
246
|
case "filtered":
|
|
247
247
|
return "withheld";
|
|
248
|
+
case "not-reached":
|
|
249
|
+
return "the self-query never answered";
|
|
248
250
|
default:
|
|
249
251
|
return "no reason given";
|
|
250
252
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export * from "./discovery/cache.js";
|
|
|
31
31
|
export * from "./build.js";
|
|
32
32
|
export * from "./env.js";
|
|
33
33
|
export * from "./graph-ir.js";
|
|
34
|
+
export * from "./engine-facts.js";
|
|
34
35
|
export * from "./graph-detail.js";
|
|
35
36
|
export * from "./graph-mermaid.js";
|
|
36
37
|
export * from "./graph-dot.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,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAA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AAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7E,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAClE,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5F,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,8 @@ export * from "./discovery/cache.js";
|
|
|
31
31
|
export * from "./build.js";
|
|
32
32
|
export * from "./env.js";
|
|
33
33
|
export * from "./graph-ir.js";
|
|
34
|
+
// Engine facts and the engine graph document (#4527): types for readers that show the graph.
|
|
35
|
+
export * from "./engine-facts.js";
|
|
34
36
|
export * from "./graph-detail.js";
|
|
35
37
|
export * from "./graph-mermaid.js";
|
|
36
38
|
export * from "./graph-dot.js";
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Instance nodes (#4454): one graph node per `count` or `for_each` instance,
|
|
3
|
+
* under the node of the block that declares it.
|
|
4
|
+
*
|
|
5
|
+
* A lexicon whose entity is a block that expands into instances (terraform's
|
|
6
|
+
* `aws_eip.pool`, applied as `aws_eip.pool[0]`, `aws_eip.pool[1]`, ...) has
|
|
7
|
+
* one graph node per block. A plan, a state read and a drift read all speak
|
|
8
|
+
* per instance. This module is the contract that puts both on the graph:
|
|
9
|
+
*
|
|
10
|
+
* - An instance's node id is its block's node id followed by the instance key
|
|
11
|
+
* exactly as Terraform prints it: `<blockNode>[0]`, `<blockNode>["a"]`.
|
|
12
|
+
* Inside a workspace the member goes in front as for any node, so
|
|
13
|
+
* `<member>/<blockNode>[0]`.
|
|
14
|
+
* - The block node keeps existing and is the rollup: its verdict is the
|
|
15
|
+
* aggregate of its instances' ({@link rollupInstances}).
|
|
16
|
+
* - In the graph IR an instance node is a child of its block node. It carries
|
|
17
|
+
* `instanceOf`, the block node's id, and `instanceKey`, the key on its own
|
|
18
|
+
* (`IRNode` in `./graph-ir.ts`). It has no edges and no attrs of its own:
|
|
19
|
+
* both stay on the block, since a reference in the source is block to block.
|
|
20
|
+
* - A change-set entry and a drift row for an instance carry the instance
|
|
21
|
+
* node's id as `node`, and the block node's id as `instanceOf`.
|
|
22
|
+
*
|
|
23
|
+
* The graph lists the instances a read of the source can count: a literal
|
|
24
|
+
* `count` or a literal `for_each`, or (#4486) one that reads a variable whose
|
|
25
|
+
* value the root's files give. An expansion that only a plan can count has
|
|
26
|
+
* no instance nodes in the declared graph, and an entry
|
|
27
|
+
* for one of its instances still names the instance id by the rule above,
|
|
28
|
+
* with `instanceOf` saying which block node to hang it under.
|
|
29
|
+
*
|
|
30
|
+
* Under a module call that is itself expanded (#4486), the module key goes
|
|
31
|
+
* on the call segment it belongs to, as Terraform prints it, and the
|
|
32
|
+
* block's own key stays at the end: `module.app[0].aws_eip.pool[1]` in root
|
|
33
|
+
* `estate` is `estate/module.app[0]/aws_eip.pool[1]`, under the block node
|
|
34
|
+
* `estate/module.app/aws_eip.pool`. The node also carries `instanceScope`,
|
|
35
|
+
* the expanded module path as Terraform prints it (`module.app[0]`), and its
|
|
36
|
+
* `instanceKey` is the block's own key, absent when only the module call is
|
|
37
|
+
* expanded. With no module call expanded the rule is the one above. The
|
|
38
|
+
* module call's own node gets instance nodes by the first rule,
|
|
39
|
+
* `estate/module.app[0]`.
|
|
40
|
+
*
|
|
41
|
+
* Imports nothing at run time, so it bundles with `./change-set.ts`.
|
|
42
|
+
*/
|
|
43
|
+
import type { EngineFacts } from "./engine-facts.js";
|
|
44
|
+
/**
|
|
45
|
+
* Why the declared graph leaves an expanded block as one node (#4489): the
|
|
46
|
+
* codes of a block node's `instanceRollup`. Each is in the read contract's
|
|
47
|
+
* closed list (`workspace/reason-codes.ts`).
|
|
48
|
+
*/
|
|
49
|
+
export declare const INSTANCE_ROLLUP_CODES: readonly ["instances-each-value", "instances-merge", "instances-value-unknown", "instances-form-unread", "instances-over-limit", "instances-module-uncounted"];
|
|
50
|
+
export type InstanceRollupCode = (typeof INSTANCE_ROLLUP_CODES)[number];
|
|
51
|
+
/**
|
|
52
|
+
* On a block node whose `count` or `for_each` the declared graph cannot
|
|
53
|
+
* count (#4489): why, and the expression it could not count. `argument` and
|
|
54
|
+
* `expression` are the block's own, or with `call` those of the enclosing
|
|
55
|
+
* module call that could not be counted.
|
|
56
|
+
*/
|
|
57
|
+
export interface InstanceRollup {
|
|
58
|
+
code: InstanceRollupCode;
|
|
59
|
+
/** `count` or `for_each`. */
|
|
60
|
+
argument: "count" | "for_each";
|
|
61
|
+
/** The expression as written, without the `${ }` around it. */
|
|
62
|
+
expression: string;
|
|
63
|
+
/** With `instances-module-uncounted`: the module call, `module.app` or `module.app.module.db`. */
|
|
64
|
+
call?: string;
|
|
65
|
+
}
|
|
66
|
+
/** An entity's duck-typed `instanceRollup`, when it is one (#4489). */
|
|
67
|
+
export declare function entityInstanceRollup(entity: unknown): InstanceRollup | undefined;
|
|
68
|
+
/** An instance key as Terraform prints it: `[0]` for a `count` index, `["a"]` for a `for_each` key. */
|
|
69
|
+
export declare function instanceKeyLiteral(key: string | number): string;
|
|
70
|
+
/** The instance node id for a block node id and an instance key as Terraform prints it. */
|
|
71
|
+
export declare function instanceNodeId(blockNode: string, key: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* The instance key a terraform-family address ends with, as printed
|
|
74
|
+
* (`[0]`, `["a"]`), or undefined when it has none or when a module call on
|
|
75
|
+
* the way to it is expanded, which rolls up to the block (see the module doc).
|
|
76
|
+
*/
|
|
77
|
+
export declare function terraformInstanceKey(address: string): string | undefined;
|
|
78
|
+
/** Where one terraform-family instance address sits, relative to its root (#4486). */
|
|
79
|
+
export interface TerraformInstancePath {
|
|
80
|
+
/** The block's key in its root: `module.app/aws_eip.pool`. */
|
|
81
|
+
block: string;
|
|
82
|
+
/** The instance node's key in its root: `module.app[0]/aws_eip.pool[1]`. */
|
|
83
|
+
instance: string;
|
|
84
|
+
/** The block's own instance key, `[1]`, absent when the block itself is not expanded. */
|
|
85
|
+
key?: string;
|
|
86
|
+
/** The expanded module path, `module.app[0]`, absent when no module call on the way is expanded. */
|
|
87
|
+
scope?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The block key and instance node key a terraform-family address names, or
|
|
91
|
+
* undefined when nothing on it is expanded (no `[...]` anywhere) or the
|
|
92
|
+
* address is not a block's. `module.app[0].aws_eip.pool[1]` is block
|
|
93
|
+
* `module.app/aws_eip.pool`, instance `module.app[0]/aws_eip.pool[1]`, key
|
|
94
|
+
* `[1]`, scope `module.app[0]`.
|
|
95
|
+
*/
|
|
96
|
+
export declare function terraformInstancePath(address: string): TerraformInstancePath | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* One instance's observed verdict, carried on its block's
|
|
99
|
+
* `ResourceMetadata.instances` (`./lexicon.ts`) so the live graph can draw the
|
|
100
|
+
* instance node and paint it on its own.
|
|
101
|
+
*/
|
|
102
|
+
export interface InstanceObservation {
|
|
103
|
+
/**
|
|
104
|
+
* The block's own instance key as Terraform prints it, `[0]` or `["a"]`.
|
|
105
|
+
* Absent on an instance that only an expanded module call makes (#4488),
|
|
106
|
+
* which then carries {@link scope}.
|
|
107
|
+
*/
|
|
108
|
+
key?: string;
|
|
109
|
+
/**
|
|
110
|
+
* The expanded module path as Terraform prints it, `module.app[0]`, on an
|
|
111
|
+
* instance under an expanded module call (#4488). The live graph then
|
|
112
|
+
* builds the node id by {@link terraformInstancePath} from {@link address},
|
|
113
|
+
* the same id the declared graph lists: `estate/module.app[0]/aws_eip.pool[1]`.
|
|
114
|
+
*/
|
|
115
|
+
scope?: string;
|
|
116
|
+
/** The engine's own instance address, `aws_eip.pool[0]` or `module.app[0].aws_eip.pool[1]`. */
|
|
117
|
+
address: string;
|
|
118
|
+
verdict: "present" | "absent" | "not-observed";
|
|
119
|
+
/** The provider's id, on a present instance, when the read gave one. */
|
|
120
|
+
physicalId?: string;
|
|
121
|
+
/** Same meaning as `ResourceMetadata.ownership`, on a present instance. */
|
|
122
|
+
ownership?: "owned" | "foreign" | "unknown";
|
|
123
|
+
/** Same meaning as `ResourceMetadata.facts` (#4527), on a present instance. Never read for a decision. */
|
|
124
|
+
facts?: EngineFacts;
|
|
125
|
+
/** The lexicon's status word for this instance, as on `ResourceMetadata.status`. */
|
|
126
|
+
status?: string;
|
|
127
|
+
/** Why it was not observed, on a not-observed instance. An `UnobservedReason`. */
|
|
128
|
+
reason?: string;
|
|
129
|
+
detail?: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The live graph's node id for one observed instance of the block node
|
|
133
|
+
* `blockNode` (#4488): `<blockNode><key>` with no expanded module call on
|
|
134
|
+
* the way, else the declared graph's rule (#4486) applied to the instance's
|
|
135
|
+
* address, so `module.app[0].aws_eip.pool[1]` under
|
|
136
|
+
* `estate/module.app/aws_eip.pool` is `estate/module.app[0]/aws_eip.pool[1]`.
|
|
137
|
+
* Undefined when the address does not belong to that block node.
|
|
138
|
+
*/
|
|
139
|
+
export declare function observedInstanceNodeId(blockNode: string, inst: Pick<InstanceObservation, "key" | "scope" | "address">): string | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* The block's verdict from its instances' (#4454, the one place the rollup is
|
|
142
|
+
* written): the first kind in `precedence` that any instance has, or
|
|
143
|
+
* undefined when there are no instances or none has a kind `precedence`
|
|
144
|
+
* names. The precedence is the caller's, most significant first; terraform's
|
|
145
|
+
* is {@link TERRAFORM_INSTANCE_ROLLUP}.
|
|
146
|
+
*
|
|
147
|
+
* Partial knowledge is not knowledge: put the not-observed kind first and a
|
|
148
|
+
* block with one unread instance is unread, never partly owned.
|
|
149
|
+
*/
|
|
150
|
+
export declare function rollupInstances<V extends {
|
|
151
|
+
kind: string;
|
|
152
|
+
}>(verdicts: readonly V[], precedence: readonly V["kind"][]): V | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Terraform's block rollup over live-plan instance verdicts: any instance
|
|
155
|
+
* not-observed makes the block not-observed, then foreign, then adoptable,
|
|
156
|
+
* then owned, and a block whose instances are all absent is absent.
|
|
157
|
+
*/
|
|
158
|
+
export declare const TERRAFORM_INSTANCE_ROLLUP: readonly ["unobserved", "foreign", "adoptable", "owned", "absent"];
|
|
159
|
+
//# sourceMappingURL=instance-nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-nodes.d.ts","sourceRoot":"","sources":["../src/instance-nodes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,YAChC,sBAA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K,CAAC,EAAE,MAAM,CAAC;IACf,+FAA+F;IAC/F,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;IAC/C,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5C,0GAA0G;IAC1G,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAM1I;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,SAAS,CAMnI;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,YAAI,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Instance nodes (#4454): one graph node per `count` or `for_each` instance,
|
|
3
|
+
* under the node of the block that declares it.
|
|
4
|
+
*
|
|
5
|
+
* A lexicon whose entity is a block that expands into instances (terraform's
|
|
6
|
+
* `aws_eip.pool`, applied as `aws_eip.pool[0]`, `aws_eip.pool[1]`, ...) has
|
|
7
|
+
* one graph node per block. A plan, a state read and a drift read all speak
|
|
8
|
+
* per instance. This module is the contract that puts both on the graph:
|
|
9
|
+
*
|
|
10
|
+
* - An instance's node id is its block's node id followed by the instance key
|
|
11
|
+
* exactly as Terraform prints it: `<blockNode>[0]`, `<blockNode>["a"]`.
|
|
12
|
+
* Inside a workspace the member goes in front as for any node, so
|
|
13
|
+
* `<member>/<blockNode>[0]`.
|
|
14
|
+
* - The block node keeps existing and is the rollup: its verdict is the
|
|
15
|
+
* aggregate of its instances' ({@link rollupInstances}).
|
|
16
|
+
* - In the graph IR an instance node is a child of its block node. It carries
|
|
17
|
+
* `instanceOf`, the block node's id, and `instanceKey`, the key on its own
|
|
18
|
+
* (`IRNode` in `./graph-ir.ts`). It has no edges and no attrs of its own:
|
|
19
|
+
* both stay on the block, since a reference in the source is block to block.
|
|
20
|
+
* - A change-set entry and a drift row for an instance carry the instance
|
|
21
|
+
* node's id as `node`, and the block node's id as `instanceOf`.
|
|
22
|
+
*
|
|
23
|
+
* The graph lists the instances a read of the source can count: a literal
|
|
24
|
+
* `count` or a literal `for_each`, or (#4486) one that reads a variable whose
|
|
25
|
+
* value the root's files give. An expansion that only a plan can count has
|
|
26
|
+
* no instance nodes in the declared graph, and an entry
|
|
27
|
+
* for one of its instances still names the instance id by the rule above,
|
|
28
|
+
* with `instanceOf` saying which block node to hang it under.
|
|
29
|
+
*
|
|
30
|
+
* Under a module call that is itself expanded (#4486), the module key goes
|
|
31
|
+
* on the call segment it belongs to, as Terraform prints it, and the
|
|
32
|
+
* block's own key stays at the end: `module.app[0].aws_eip.pool[1]` in root
|
|
33
|
+
* `estate` is `estate/module.app[0]/aws_eip.pool[1]`, under the block node
|
|
34
|
+
* `estate/module.app/aws_eip.pool`. The node also carries `instanceScope`,
|
|
35
|
+
* the expanded module path as Terraform prints it (`module.app[0]`), and its
|
|
36
|
+
* `instanceKey` is the block's own key, absent when only the module call is
|
|
37
|
+
* expanded. With no module call expanded the rule is the one above. The
|
|
38
|
+
* module call's own node gets instance nodes by the first rule,
|
|
39
|
+
* `estate/module.app[0]`.
|
|
40
|
+
*
|
|
41
|
+
* Imports nothing at run time, so it bundles with `./change-set.ts`.
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* Why the declared graph leaves an expanded block as one node (#4489): the
|
|
45
|
+
* codes of a block node's `instanceRollup`. Each is in the read contract's
|
|
46
|
+
* closed list (`workspace/reason-codes.ts`).
|
|
47
|
+
*/
|
|
48
|
+
export const INSTANCE_ROLLUP_CODES = [
|
|
49
|
+
"instances-each-value",
|
|
50
|
+
"instances-merge",
|
|
51
|
+
"instances-value-unknown",
|
|
52
|
+
"instances-form-unread",
|
|
53
|
+
"instances-over-limit",
|
|
54
|
+
"instances-module-uncounted",
|
|
55
|
+
];
|
|
56
|
+
/** An entity's duck-typed `instanceRollup`, when it is one (#4489). */
|
|
57
|
+
export function entityInstanceRollup(entity) {
|
|
58
|
+
const r = entity?.instanceRollup;
|
|
59
|
+
if (typeof r !== "object" || r === null)
|
|
60
|
+
return undefined;
|
|
61
|
+
const { code, argument, expression, call } = r;
|
|
62
|
+
if (!INSTANCE_ROLLUP_CODES.includes(code))
|
|
63
|
+
return undefined;
|
|
64
|
+
if (argument !== "count" && argument !== "for_each")
|
|
65
|
+
return undefined;
|
|
66
|
+
if (typeof expression !== "string")
|
|
67
|
+
return undefined;
|
|
68
|
+
return { code: code, argument, expression, ...(typeof call === "string" ? { call } : {}) };
|
|
69
|
+
}
|
|
70
|
+
/** A `[...]` instance key, a number or a quoted string with escapes. */
|
|
71
|
+
const KEY = /\[(?:"(?:[^"\\]|\\.)*"|\d+)\]/;
|
|
72
|
+
const TRAILING_KEY = new RegExp(`(${KEY.source})$`);
|
|
73
|
+
/** An instance key as Terraform prints it: `[0]` for a `count` index, `["a"]` for a `for_each` key. */
|
|
74
|
+
export function instanceKeyLiteral(key) {
|
|
75
|
+
return typeof key === "number" ? `[${key}]` : `[${JSON.stringify(key)}]`;
|
|
76
|
+
}
|
|
77
|
+
/** The instance node id for a block node id and an instance key as Terraform prints it. */
|
|
78
|
+
export function instanceNodeId(blockNode, key) {
|
|
79
|
+
return `${blockNode}${key}`;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The instance key a terraform-family address ends with, as printed
|
|
83
|
+
* (`[0]`, `["a"]`), or undefined when it has none or when a module call on
|
|
84
|
+
* the way to it is expanded, which rolls up to the block (see the module doc).
|
|
85
|
+
*/
|
|
86
|
+
export function terraformInstanceKey(address) {
|
|
87
|
+
const m = TRAILING_KEY.exec(address);
|
|
88
|
+
if (!m)
|
|
89
|
+
return undefined;
|
|
90
|
+
const head = address.slice(0, m.index);
|
|
91
|
+
if (head.includes("["))
|
|
92
|
+
return undefined;
|
|
93
|
+
return m[1];
|
|
94
|
+
}
|
|
95
|
+
/** Split a terraform address on its dots, keeping each part's `[...]` key. Quoted keys may hold `.` or `]`. */
|
|
96
|
+
function addressParts(address) {
|
|
97
|
+
const parts = [];
|
|
98
|
+
let name = "";
|
|
99
|
+
let key = "";
|
|
100
|
+
let depth = 0;
|
|
101
|
+
let quoted = false;
|
|
102
|
+
const flush = () => {
|
|
103
|
+
if (name.length > 0)
|
|
104
|
+
parts.push({ name, ...(key ? { key } : {}) });
|
|
105
|
+
name = "";
|
|
106
|
+
key = "";
|
|
107
|
+
};
|
|
108
|
+
for (let i = 0; i < address.length; i++) {
|
|
109
|
+
const c = address[i];
|
|
110
|
+
if (depth > 0) {
|
|
111
|
+
key += c;
|
|
112
|
+
if (quoted) {
|
|
113
|
+
if (c === "\\")
|
|
114
|
+
key += address[++i] ?? "";
|
|
115
|
+
else if (c === '"')
|
|
116
|
+
quoted = false;
|
|
117
|
+
}
|
|
118
|
+
else if (c === '"')
|
|
119
|
+
quoted = true;
|
|
120
|
+
else if (c === "]")
|
|
121
|
+
depth--;
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
if (c === "[") {
|
|
125
|
+
depth++;
|
|
126
|
+
key += c;
|
|
127
|
+
}
|
|
128
|
+
else if (c === ".")
|
|
129
|
+
flush();
|
|
130
|
+
else
|
|
131
|
+
name += c;
|
|
132
|
+
}
|
|
133
|
+
flush();
|
|
134
|
+
return parts;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The block key and instance node key a terraform-family address names, or
|
|
138
|
+
* undefined when nothing on it is expanded (no `[...]` anywhere) or the
|
|
139
|
+
* address is not a block's. `module.app[0].aws_eip.pool[1]` is block
|
|
140
|
+
* `module.app/aws_eip.pool`, instance `module.app[0]/aws_eip.pool[1]`, key
|
|
141
|
+
* `[1]`, scope `module.app[0]`.
|
|
142
|
+
*/
|
|
143
|
+
export function terraformInstancePath(address) {
|
|
144
|
+
const parts = addressParts(address);
|
|
145
|
+
const blockScope = [];
|
|
146
|
+
const instanceScope = [];
|
|
147
|
+
let expandedScope = false;
|
|
148
|
+
let i = 0;
|
|
149
|
+
while (parts[i]?.name === "module" && i + 1 < parts.length) {
|
|
150
|
+
const call = parts[i + 1];
|
|
151
|
+
blockScope.push(`module.${call.name}`);
|
|
152
|
+
instanceScope.push(`module.${call.name}${call.key ?? ""}`);
|
|
153
|
+
if (call.key)
|
|
154
|
+
expandedScope = true;
|
|
155
|
+
i += 2;
|
|
156
|
+
}
|
|
157
|
+
const rest = parts.slice(i);
|
|
158
|
+
let block;
|
|
159
|
+
let key;
|
|
160
|
+
if (rest.length === 0) {
|
|
161
|
+
// The module call itself, a block of its caller.
|
|
162
|
+
if (blockScope.length === 0)
|
|
163
|
+
return undefined;
|
|
164
|
+
const call = blockScope.pop();
|
|
165
|
+
const inst = instanceScope.pop();
|
|
166
|
+
block = call;
|
|
167
|
+
key = inst.length > call.length ? inst.slice(call.length) : undefined;
|
|
168
|
+
expandedScope = instanceScope.some((s, n) => s !== blockScope[n]);
|
|
169
|
+
}
|
|
170
|
+
else if (rest[0].name === "data" && rest.length >= 3) {
|
|
171
|
+
block = `data.${rest[1].name}.${rest[2].name}`;
|
|
172
|
+
key = rest[2].key;
|
|
173
|
+
}
|
|
174
|
+
else if (rest.length >= 2) {
|
|
175
|
+
block = `${rest[0].name}.${rest[1].name}`;
|
|
176
|
+
key = rest[1].key;
|
|
177
|
+
}
|
|
178
|
+
else
|
|
179
|
+
return undefined;
|
|
180
|
+
if (key === undefined && !expandedScope)
|
|
181
|
+
return undefined;
|
|
182
|
+
const scope = expandedScope ? instanceScope.join(".") : undefined;
|
|
183
|
+
return {
|
|
184
|
+
block: [...blockScope, block].join("/"),
|
|
185
|
+
instance: [...(expandedScope ? instanceScope : blockScope), `${block}${key ?? ""}`].join("/"),
|
|
186
|
+
...(key !== undefined ? { key } : {}),
|
|
187
|
+
...(scope !== undefined ? { scope } : {}),
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* The live graph's node id for one observed instance of the block node
|
|
192
|
+
* `blockNode` (#4488): `<blockNode><key>` with no expanded module call on
|
|
193
|
+
* the way, else the declared graph's rule (#4486) applied to the instance's
|
|
194
|
+
* address, so `module.app[0].aws_eip.pool[1]` under
|
|
195
|
+
* `estate/module.app/aws_eip.pool` is `estate/module.app[0]/aws_eip.pool[1]`.
|
|
196
|
+
* Undefined when the address does not belong to that block node.
|
|
197
|
+
*/
|
|
198
|
+
export function observedInstanceNodeId(blockNode, inst) {
|
|
199
|
+
if (inst.scope === undefined)
|
|
200
|
+
return inst.key === undefined ? undefined : instanceNodeId(blockNode, inst.key);
|
|
201
|
+
const path = terraformInstancePath(inst.address);
|
|
202
|
+
if (!path?.scope)
|
|
203
|
+
return undefined;
|
|
204
|
+
if (blockNode !== path.block && !blockNode.endsWith(`/${path.block}`))
|
|
205
|
+
return undefined;
|
|
206
|
+
return `${blockNode.slice(0, blockNode.length - path.block.length)}${path.instance}`;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The block's verdict from its instances' (#4454, the one place the rollup is
|
|
210
|
+
* written): the first kind in `precedence` that any instance has, or
|
|
211
|
+
* undefined when there are no instances or none has a kind `precedence`
|
|
212
|
+
* names. The precedence is the caller's, most significant first; terraform's
|
|
213
|
+
* is {@link TERRAFORM_INSTANCE_ROLLUP}.
|
|
214
|
+
*
|
|
215
|
+
* Partial knowledge is not knowledge: put the not-observed kind first and a
|
|
216
|
+
* block with one unread instance is unread, never partly owned.
|
|
217
|
+
*/
|
|
218
|
+
export function rollupInstances(verdicts, precedence) {
|
|
219
|
+
for (const kind of precedence) {
|
|
220
|
+
const found = verdicts.find((v) => v.kind === kind);
|
|
221
|
+
if (found)
|
|
222
|
+
return found;
|
|
223
|
+
}
|
|
224
|
+
return undefined;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Terraform's block rollup over live-plan instance verdicts: any instance
|
|
228
|
+
* not-observed makes the block not-observed, then foreign, then adoptable,
|
|
229
|
+
* then owned, and a block whose instances are all absent is absent.
|
|
230
|
+
*/
|
|
231
|
+
export const TERRAFORM_INSTANCE_ROLLUP = ["unobserved", "foreign", "adoptable", "owned", "absent"];
|
package/dist/lexicon.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { InstanceObservation } from "./instance-nodes.js";
|
|
2
|
+
import type { EngineFacts } from "./engine-facts.js";
|
|
1
3
|
import type { CapabilityPack } from "./capabilities/view.js";
|
|
2
4
|
import type { Serializer } from "./serializer.js";
|
|
3
5
|
import type { Declarable } from "./declarable.js";
|
|
@@ -24,8 +26,12 @@ import type { OwnershipChannel, OwnershipMarker } from "./ownership.js";
|
|
|
24
26
|
import type { LexiconConfigSchema } from "./lexicon-config.js";
|
|
25
27
|
import type { RuleMeta } from "./audit/catalog.js";
|
|
26
28
|
import type { ReferenceCatalog } from "./graph-refs.js";
|
|
29
|
+
import type { ListedTypeMapping } from "./lifecycle/type-listing.js";
|
|
30
|
+
import type { IndexIdentity } from "./lifecycle/identity-match.js";
|
|
31
|
+
import type { IndexImportCodegen } from "./lifecycle/index-import.js";
|
|
27
32
|
import type { IREdge, LexiconGraphEdges, LexiconUnreadSource, LexiconWorkspaceLinks, LexiconWorkspaceOutputs } from "./graph-ir.js";
|
|
28
33
|
import type { DescribeResourcesResult, UnobservedReason } from "./observation.js";
|
|
34
|
+
import type { ReadDriftOptions, ReadDriftResult } from "./drift-record.js";
|
|
29
35
|
import type { DescribeIdentityOptions, DescribeIdentityResult } from "./identity.js";
|
|
30
36
|
import type { DeepNormalizationHooks, DeepObservationResult } from "./deep-observation.js";
|
|
31
37
|
import type { BehaviourResult, PredictBehaviourOptions } from "./behaviour.js";
|
|
@@ -1788,6 +1794,23 @@ export interface LexiconPlugin {
|
|
|
1788
1794
|
* refusal: it says which variable, and a stack trace does not.
|
|
1789
1795
|
*/
|
|
1790
1796
|
predictBehaviour?(options: PredictBehaviourOptions): Promise<BehaviourResult>;
|
|
1797
|
+
/**
|
|
1798
|
+
* The drift of what this lexicon reads, as drift-record stream lines
|
|
1799
|
+
* (behold#995, `./drift-record.ts`): a `drift-start`, one record per
|
|
1800
|
+
* resource instance and a `drift-settle`, for each root or stack the
|
|
1801
|
+
* project declares. `chant lifecycle drift` calls it and prints the lines,
|
|
1802
|
+
* and `chant workspace drift` runs that command in the reader project of
|
|
1803
|
+
* a member whose kind the lexicon reads, so a terraform or choudoufu
|
|
1804
|
+
* member's drift comes from the engine that owns it.
|
|
1805
|
+
*
|
|
1806
|
+
* Optional. A lexicon without it has no drift read of its own; a chant
|
|
1807
|
+
* member's drift comes from `lifecycle diff --live` instead. A read that
|
|
1808
|
+
* the lexicon cannot answer (a read its engine does not have, or one
|
|
1809
|
+
* resource on an engine that cannot read one alone) is a `refused`
|
|
1810
|
+
* answer. A read that ran and failed is records, `not-observed`, never a
|
|
1811
|
+
* refusal and never a throw.
|
|
1812
|
+
*/
|
|
1813
|
+
readDrift?(options: ReadDriftOptions): Promise<ReadDriftResult>;
|
|
1791
1814
|
/**
|
|
1792
1815
|
* What this lexicon's own entity types are, to an engine that prices them
|
|
1793
1816
|
* (#2382). Rows, not a capability: core resolves and predicts, and a lexicon
|
|
@@ -1976,6 +1999,36 @@ export interface LexiconPlugin {
|
|
|
1976
1999
|
* method. Opt-in.
|
|
1977
2000
|
*/
|
|
1978
2001
|
referenceCatalog?: ReferenceCatalog;
|
|
2002
|
+
/**
|
|
2003
|
+
* How a cloud inventory API's type names map to this lexicon's kinds
|
|
2004
|
+
* (#4521): CloudFormation types for aws, lowercase ARM types for azure,
|
|
2005
|
+
* Cloud Asset types for gcp, group/version/kind for k8s. `typeListing`
|
|
2006
|
+
* (./lifecycle/type-listing.ts) reads it to type an indexed resource, then
|
|
2007
|
+
* normalizes its properties with {@link deepNormalizationHooks}. Data plus
|
|
2008
|
+
* pure functions. Opt-in: a lexicon without it leaves listed objects of its
|
|
2009
|
+
* substrate as unknown-kind nodes.
|
|
2010
|
+
*/
|
|
2011
|
+
listedTypes?: ListedTypeMapping;
|
|
2012
|
+
/**
|
|
2013
|
+
* How this lexicon's declared entities match indexed resources by identity
|
|
2014
|
+
* (#4523): the identifier a declaration's props spell (aws: the
|
|
2015
|
+
* CloudFormation `primaryIdentifier`), or why there is none (a
|
|
2016
|
+
* server-assigned id). `matchDeclaredToIndex`
|
|
2017
|
+
* (./lifecycle/identity-match.ts) runs it against an index version, and the
|
|
2018
|
+
* identity-match edge pass (./lifecycle/derive-edges.ts) uses it to name
|
|
2019
|
+
* this lexicon's indexed nodes. Data plus pure functions. Opt-in: a lexicon
|
|
2020
|
+
* whose live read already matches by name or state does not need it.
|
|
2021
|
+
*/
|
|
2022
|
+
indexIdentity?: IndexIdentity;
|
|
2023
|
+
/**
|
|
2024
|
+
* How this lexicon writes an indexed resource as source (#4524, `chant
|
|
2025
|
+
* import --index`): the import IR for one indexed node, a value as a
|
|
2026
|
+
* reference to another imported node, and a parameter for a masked value.
|
|
2027
|
+
* Core hands the IR to {@link templateGenerator}, the codegen a template
|
|
2028
|
+
* import uses. Data plus pure functions. Opt-in: an indexed node of a
|
|
2029
|
+
* lexicon without it is reported as unsupported and written nowhere.
|
|
2030
|
+
*/
|
|
2031
|
+
indexImport?: IndexImportCodegen;
|
|
1979
2032
|
/**
|
|
1980
2033
|
* This lexicon's capability pack (#4375): its mapping onto the
|
|
1981
2034
|
* lexicon-neutral view the capability rules read (labels, edge names,
|
|
@@ -2279,6 +2332,14 @@ export interface ResourceMetadata {
|
|
|
2279
2332
|
* a delete, and never escalates `unknown` to one.
|
|
2280
2333
|
*/
|
|
2281
2334
|
ownership?: "owned" | "foreign" | "unknown";
|
|
2335
|
+
/**
|
|
2336
|
+
* What an ownership engine (choudoufu, plunge) observed about this resource
|
|
2337
|
+
* (#4520, #4527), read from the engine's graph document. `buildLiveGraphIr`
|
|
2338
|
+
* copies it onto the node beside `physicalId`. Never read for a decision:
|
|
2339
|
+
* the change set reads {@link ownership}, and no change set, lifecycle step
|
|
2340
|
+
* or Op imports `EngineFacts`. Absent unless an engine supplied it.
|
|
2341
|
+
*/
|
|
2342
|
+
facts?: EngineFacts;
|
|
2282
2343
|
/**
|
|
2283
2344
|
* The stack/env identity read off the resource's own ownership marker
|
|
2284
2345
|
* (#1222) — the tags/labels/metadata chant stamped at synthesis, read back
|
|
@@ -2308,6 +2369,17 @@ export interface ResourceMetadata {
|
|
|
2308
2369
|
* undeclared live resource stays `orphan`.
|
|
2309
2370
|
*/
|
|
2310
2371
|
ownerChain?: OwnerChainVerdict;
|
|
2372
|
+
/**
|
|
2373
|
+
* The instances of a `count` or `for_each` block (#4454), each with its own
|
|
2374
|
+
* verdict, keyed as the engine prints them (`[0]`, `["a"]`). The rest of
|
|
2375
|
+
* this metadata is the block's rollup over them. `buildLiveGraphIr` draws
|
|
2376
|
+
* each present instance as a node `<name><key>` under this one, or by the
|
|
2377
|
+
* declared graph's module-key rule when the instance carries a `scope`
|
|
2378
|
+
* (`estate/module.app[0]/aws_eip.pool[1]`, #4488), and the
|
|
2379
|
+
* overlay paints a declared instance from it. Absent when the lexicon reads
|
|
2380
|
+
* no instances, or the block is not expanded.
|
|
2381
|
+
*/
|
|
2382
|
+
instances?: InstanceObservation[];
|
|
2311
2383
|
/**
|
|
2312
2384
|
* The declared node ids that reference this resource (#1273), set on an
|
|
2313
2385
|
* undeclared resource observed only because something declared points at it —
|