@intentius/chant-lexicon-terraform 0.65.0 → 0.66.0

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.
@@ -0,0 +1,4 @@
1
+ export { blockAddressOf, edgeCoverageOf, regionOfArn, substituteReferences, terraformBehaviourRequest, type LiveResourceFacts, type LiveResourceStatus, type TerraformBehaviourEntity, type TerraformBehaviourRequest, type TerraformBehaviourRequestOptions, type TerraformLiveRead, } from "./request.js";
2
+ export { liveRootsOf, predictTerraformBehaviour, TERRAFORM, type TerraformBehaviourDeps, type TerraformPredictOptions, } from "./predict.js";
3
+ export { CATALOGUED_KINDS, isUnresolvedKind, REFERENCES_NOTHING, TERRAFORM_REFERENCE_CATALOG, } from "./reference-catalog.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/behaviour/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,yBAAyB,EACzB,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,112 @@
1
+ /**
2
+ * The live path for choudoufu roots (#2360): a prediction of the account as
3
+ * it stands, drift included.
4
+ *
5
+ * `describeResources` (`../describe-resources.ts`) answers "does this declared
6
+ * block exist" for a live root by running `choudoufu live-plan -json` through
7
+ * the applier's own activity. This does the same two reads — `live-ls -json`
8
+ * for what the account holds, `live-plan -json` for how that binds to the
9
+ * declaration — through the same injected activities, builds the engine's
10
+ * request from them (`./request.ts`), and hands it to whichever lexicon fronts
11
+ * the engine. The terraform lexicon has no engine of its own and dials none:
12
+ * `deps.predict` is augur's `predictBehaviour` in production, and a fixture
13
+ * in a test.
14
+ *
15
+ * ## Four moves, in this order
16
+ *
17
+ * 1. **Read.** One `live-ls` and one `live-plan` per live root — none at all
18
+ * under `from: "declared"` — no ambient
19
+ * credentials and no new shell-out: the activities are the ones
20
+ * `describeResources` already runs. A root whose read fails reports every
21
+ * resource it declares `read-failed`, naming the root, and is not sent — a
22
+ * failed read must never render as an estate with nothing in it.
23
+ * 2. **Build.** `terraformBehaviourRequest`, pure, over the parsed documents.
24
+ * 3. **Screen.** `screenBehaviourRequest`, before any engine is asked. Live
25
+ * props are exactly where a resolved connection string or a secret written
26
+ * into a tag can appear, and the screen's key-name, value-shape,
27
+ * URL-userinfo and walk-depth rules all apply to them. A refusal here is
28
+ * the result.
29
+ * 4. **Ask, and account for the rest.** The engine-fronting lexicon answers
30
+ * for what was sent. What was not sent — a resource the plan could not
31
+ * read, one withheld by `owned`, every resource of a root whose read
32
+ * failed — is merged into the report as `unpredicted` with its reason, so
33
+ * every declared name still lands in one map or the other.
34
+ *
35
+ * A root that is not live is built from its declaration by the same producer,
36
+ * so a project mixing stock and live roots gets one request with both, and
37
+ * `sources` says which is which. With no live root at all this is the
38
+ * declared path, containment included.
39
+ *
40
+ * ## Both halves of the delta come out of here
41
+ *
42
+ * `from: "declared"` reads no account and builds every root from its file,
43
+ * including a root that is live. That is the other side of the delta the epic
44
+ * wants, and it is deliberately the same function rather than a second one:
45
+ * two reports that differ because one producer was handed different input are
46
+ * a statement about the estate, and two reports that differ because two
47
+ * producers disagree about how to assemble a graph are a statement about
48
+ * chant. `edgeCoverage.containmentEdges` is the field that made the
49
+ * difference concrete (#2360's third review comment) — it is built by the same
50
+ * catalog over the same reconstruction on both sides here, so a "one zone
51
+ * lost" verdict that differs between the two differs because the account
52
+ * differs.
53
+ */
54
+ import { type BehaviourResult, type PredictBehaviourOptions } from "@intentius/chant/behaviour";
55
+ import { type TerraformReadDeps } from "../describe-resources.js";
56
+ import { type TerraformBehaviourEntity } from "./request.js";
57
+ /** The name this path screens and refuses under. */
58
+ export declare const TERRAFORM = "terraform";
59
+ /** What the live path needs beyond the request: the two reads, and an engine to ask. */
60
+ export interface TerraformBehaviourDeps {
61
+ liveLs: TerraformReadDeps["liveLs"];
62
+ livePlan: TerraformReadDeps["livePlan"];
63
+ /**
64
+ * The lexicon in front of the engine. Its own `screenBehaviourRequest` runs
65
+ * again inside; that is harmless, and the one here is what makes "screened
66
+ * before any engine call" true of this path rather than of its callee.
67
+ */
68
+ predict: (options: PredictBehaviourOptions) => Promise<BehaviourResult>;
69
+ }
70
+ /**
71
+ * The contract's options, less the three fields this path produces rather than
72
+ * accepts, plus where to read from.
73
+ *
74
+ * `edges` and `edgeCoverage` are **not** inputs. They are what
75
+ * `./request.ts` computes — from the live reads on one side and from the
76
+ * declaration on the other — and a caller has no way to know either before
77
+ * this function has decided which roots it is reading. Asking for them and
78
+ * then discarding whatever arrived would be a signature that lies about what
79
+ * it uses, and the delta this path exists for depends on both sides' coverage
80
+ * being this producer's claim rather than a caller's.
81
+ *
82
+ * `entities` is widened to carry the terraform build's `references` beside
83
+ * `props`, which the builder needs and the contract's own entity shape has no
84
+ * room for.
85
+ */
86
+ export interface TerraformPredictOptions extends Omit<PredictBehaviourOptions, "entities" | "edges" | "edgeCoverage"> {
87
+ entities: ReadonlyMap<string, TerraformBehaviourEntity>;
88
+ /** Directory the activities start the `chant.config.*` search from. Default: the process cwd. */
89
+ cwd?: string;
90
+ /**
91
+ * Which estate to predict. `"live"`, the default, is this path's whole
92
+ * point: the account as it stands, drift included. `"declared"` runs the
93
+ * same producer over the declaration alone and reads no account, which is
94
+ * the other half of the delta the epic asks for (#2355) — a caller wanting
95
+ * that delta calls this twice and differences the two reports, and gets two
96
+ * reports assembled by one producer rather than two shapes that have each
97
+ * been through a different translation.
98
+ *
99
+ * `"declared"` on a project with no live root is the same request `"live"`
100
+ * builds, because there is no account to read; the option exists so that a
101
+ * caller can ask for the declaration of a root that *is* live.
102
+ */
103
+ from?: "live" | "declared";
104
+ }
105
+ /** Which roots the request would read live: those whose entities the parse stamped `mode: "live"`. */
106
+ export declare function liveRootsOf(entityNames: readonly string[], entities: ReadonlyMap<string, TerraformBehaviourEntity>): string[];
107
+ /**
108
+ * Predict from the account for every live root, and from the declaration for
109
+ * every other, through the engine `deps.predict` fronts.
110
+ */
111
+ export declare function predictTerraformBehaviour(options: TerraformPredictOptions, deps: TerraformBehaviourDeps): Promise<BehaviourResult>;
112
+ //# sourceMappingURL=predict.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predict.d.ts","sourceRoot":"","sources":["../../src/behaviour/predict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,WAAW,CAAC;AAEnB,oDAAoD;AACpD,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,wFAAwF;AACxF,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACpC,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC;;;;OAIG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CACzE;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;IAC5E,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IACxD,iGAAiG;IACjG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CAC5B;AAED,sGAAsG;AACtG,wBAAgB,WAAW,CACzB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,wBAAwB,CAAC,GACtD,MAAM,EAAE,CAQV;AAQD;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,uBAAuB,EAChC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,eAAe,CAAC,CA2E1B"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * How the aws provider's resources reference each other, as a `ReferenceCatalog`
3
+ * over terraform's own argument names (#2360).
4
+ *
5
+ * `packages/core/src/graph-refs.ts`'s `reconstructEdges` turns a bag of nodes
6
+ * into a graph by reading identifier values out of each node's attributes and
7
+ * matching them against every other node's identity. The aws lexicon's
8
+ * catalog does that over the SDK's shape (`VpcId`, `SecurityGroups[].GroupId`);
9
+ * this one does it over a terraform block's shape (`vpc_id`,
10
+ * `vpc_security_group_ids[]`), because that is the shape a block's body has
11
+ * after `../hcl/parse.ts` and the shape `./request.ts` hands the resolver on
12
+ * both the declared and the live side.
13
+ *
14
+ * ## Keyed by provider type, not by chant entity type
15
+ *
16
+ * Every terraform `resource` block is `Terraform::Resource` to chant. A rule
17
+ * keyed on that would apply to a VPC and an instance alike, so the nodes
18
+ * `./request.ts` builds for the resolver carry the **provider type** as their
19
+ * `kind` — `aws_subnet` — and the rules here are keyed the same way. That is
20
+ * also why this catalog is not declared on the plugin as `referenceCatalog`:
21
+ * `chant graph --live` builds its nodes with `kind: "Terraform::Resource"`
22
+ * and attributes that carry no arguments at all, so declaring it there would
23
+ * be a catalog that matched nothing and looked like coverage.
24
+ *
25
+ * ## Two relations, and why the split matters to an engine
26
+ *
27
+ * A `containment` rule (subnet ∈ VPC, instance ∈ subnet) becomes a boundary
28
+ * pair and a traversable containment edge; a `reference` rule becomes an
29
+ * ordinary edge. `PredictBehaviourOptions.edges` carries the second and
30
+ * `edgeCoverage.containmentEdges` the first, and the contract keeps them
31
+ * apart for a reason that is the whole of #2360's first review comment: a
32
+ * "one zone lost" verdict is computed over zone membership, and membership is
33
+ * not a reference. Both sides of the declared-versus-live delta run these
34
+ * same rules, so neither side is structurally short of containment the other
35
+ * has.
36
+ *
37
+ * ## Multi-kind arguments carry no `targetKind`
38
+ *
39
+ * `reconstructEdges` records a value under a rule with a `targetKind` as
40
+ * dangling when the value resolves to a node of another kind. An argument
41
+ * that legitimately points at more than one kind — a target-group attachment's
42
+ * `target_id` is an instance or a function — would therefore report every
43
+ * match of the other kind as a reference leaving the estate. Those rules name
44
+ * no `targetKind` and take whatever the identifier resolves to, the same
45
+ * choice the aws catalog makes for its CloudFormation template paths.
46
+ *
47
+ * ## What "no rule" means
48
+ *
49
+ * A kind with no rule here produces no edges and, on its own, no complaint —
50
+ * the quiet gap `edgeCoverage.unresolvedKinds` exists to name. But "no rule"
51
+ * has two causes that should not read alike: nobody has written one, or the
52
+ * kind holds no identifier-bearing argument to write one about. A VPC
53
+ * references nothing; an SQS queue names its dead-letter queue inside a JSON
54
+ * document this catalog does not read. {@link REFERENCES_NOTHING} is the list
55
+ * of kinds in the first position, checked rather than assumed, so that an
56
+ * estate with a VPC in it is not `partial` forever and an estate with a queue
57
+ * in it is not `complete` by omission.
58
+ */
59
+ import type { ReferenceCatalog } from "@intentius/chant/graph-refs";
60
+ /**
61
+ * Provider types this catalog has looked at and found to hold no argument
62
+ * that identifies another resource. A node of one of these kinds is not an
63
+ * unresolved kind: nothing was looked for because there is nothing to find.
64
+ *
65
+ * Deliberately short. A kind is added here when every identifier-bearing
66
+ * argument it has is also a rule below, or when it has none — not when its
67
+ * references happen to be inconvenient to read.
68
+ */
69
+ export declare const REFERENCES_NOTHING: ReadonlySet<string>;
70
+ /** The catalog. Rules are grouped by the relation they produce. */
71
+ export declare const TERRAFORM_REFERENCE_CATALOG: ReferenceCatalog;
72
+ /** Every provider type the catalog has at least one rule from. */
73
+ export declare const CATALOGUED_KINDS: ReadonlySet<string>;
74
+ /**
75
+ * True when nothing would be looked for on a node of this kind: no rule is
76
+ * written for it, and it is not one of the kinds known to reference nothing.
77
+ */
78
+ export declare function isUnresolvedKind(kind: string): boolean;
79
+ //# sourceMappingURL=reference-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-catalog.d.ts","sourceRoot":"","sources":["../../src/behaviour/reference-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAMjD,CAAC;AAEH,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,EAAE,gBA8FzC,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAgE,CAAC;AAElH;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD"}
@@ -0,0 +1,178 @@
1
+ /**
2
+ * A behaviour engine's request from a terraform estate, declared or live (#2360).
3
+ *
4
+ * The epic (#2355) wants two predictions shown as a delta: what the file
5
+ * declares, and what the account holds. For a choudoufu root the second is
6
+ * readable — `live-ls -json` lists every resource the account holds under the
7
+ * estate's marker, `live-plan -json` says which declared instance each one is
8
+ * bound to and which declarations nothing answers for — and this module turns
9
+ * either reading into the request `PredictBehaviourOptions` describes:
10
+ * `entityNames`, `entities`, `edges`, `edgeCoverage`, `traffic`.
11
+ *
12
+ * One producer for both sides, on purpose. A delta is only a statement about
13
+ * the estate if both sides were assembled the same way, and the third review
14
+ * comment on #2360 is about exactly the asymmetry this avoids: the declared
15
+ * path had no containment producer, so a "one zone lost" verdict differed
16
+ * between the sides for a reason that was not drift. Here the same reference
17
+ * catalog (`./reference-catalog.ts`) runs over the same reconstruction
18
+ * (`reconstructEdges`, `packages/core/src/graph-refs.ts`) on both sides, and
19
+ * `edgeCoverage.containmentEdges` is populated the same way on each.
20
+ *
21
+ * ## What the live side is, and is not
22
+ *
23
+ * The two documents carry identities, types, addresses and markers. Neither
24
+ * carries a resource's attributes: a subnet's `vpc_id` as the account holds it
25
+ * is in no section of either. So a live node's arguments are the declaration's
26
+ * arguments — the body choudoufu applied — and its **references** are the
27
+ * declaration's references resolved against what is bound: a reference whose
28
+ * target the plan bound resolves to that target's live identity, and one whose
29
+ * target is absent from the account stays unresolved and is reported as
30
+ * `dangling`, naming the node, the argument and the address it points at. A
31
+ * resource the listing holds that nothing declares has no body at all; it is a
32
+ * node with an identity and a type, and its kind is counted into
33
+ * `unresolvedKinds` unless the catalog knows that kind references nothing.
34
+ *
35
+ * The drift this side sees is therefore **membership** drift: a resource added
36
+ * out of band under the estate's marker, a declared resource never applied, a
37
+ * resource at a declared identity that another estate holds. An attribute
38
+ * changed live — an instance resized by hand — is not in either document and
39
+ * is not claimed here; the size an engine is sent is the declared one on both
40
+ * sides. `describe-resources.ts`'s module doc has the same boundary for the
41
+ * observation read, for the same reason.
42
+ *
43
+ * One consequence of that worth stating outright, because it is the one a
44
+ * reader will hit first: a block with `count` or `for_each` is **one** node on
45
+ * both sides, whatever the account holds. The request's unit is the entity the
46
+ * caller asked about, and the caller asked about `aws_eip.pool`, not about two
47
+ * slots — inventing `aws_eip.pool[0]` and `[1]` as entities would put names in
48
+ * the report that are in no `entityNames` list and in no build. Every instance
49
+ * address the plan named rides on `props.live.instances` instead, so an engine
50
+ * that prices per instance has the count and one that does not is not silently
51
+ * handed a multiplier. An estate whose drift is a changed `count` is therefore
52
+ * a delta this path does not yet show.
53
+ *
54
+ * ## `edgeCoverage`, honestly
55
+ *
56
+ * `partial` whenever `dangling` or `unresolvedKinds` is non-empty, `complete`
57
+ * only when both are empty, and `dangling` carries `reconstructEdges`'s
58
+ * `DanglingRef` records through unflattened — `from` is the field that says
59
+ * which node's argument leaves the estate. `containmentEdges` comes from the
60
+ * reconstruction's `containmentEdges`, the traversable shape, and never from
61
+ * the `containment` pairs beside it. All three of those are #2360's review
62
+ * comments, applied.
63
+ */
64
+ import type { BehaviourEdgeCoverage, PredictBehaviourOptions, UnpredictedEntity } from "@intentius/chant/behaviour";
65
+ import type { EntityReference } from "@intentius/chant/graph-ir";
66
+ import { type ReconstructedEdges } from "@intentius/chant/graph-refs";
67
+ import { type LiveLsListing, type LivePlanIndex } from "../describe-resources.js";
68
+ /**
69
+ * One entity as this builder needs it: the contract's `{ entityType, props }`
70
+ * plus the `references` the terraform build stamps beside `props`
71
+ * (`../hcl/edges.ts`, chant #2265). A caller holding the build's entities has
72
+ * them; a caller that copied only the two contract fields does not, and a
73
+ * block whose body holds a `${…}` reference with none resolved is counted as
74
+ * an unresolved kind rather than read as referencing nothing.
75
+ */
76
+ export interface TerraformBehaviourEntity {
77
+ entityType: string;
78
+ props: Record<string, unknown>;
79
+ references?: readonly EntityReference[];
80
+ }
81
+ /** One live root's two documents, already parsed. */
82
+ export interface TerraformLiveRead {
83
+ root: string;
84
+ listing: LiveLsListing;
85
+ plan: LivePlanIndex;
86
+ }
87
+ /** How a live node stands in the account. */
88
+ export type LiveResourceStatus = "bound" | "adoptable" | "foreign" | "orphan";
89
+ /**
90
+ * What a live node's `props.live` carries: the facts the two documents state
91
+ * about it, kept apart from the declaration under `props` so a reader can
92
+ * tell which side said what.
93
+ */
94
+ export interface LiveResourceFacts {
95
+ status: LiveResourceStatus;
96
+ ownership: "owned" | "unknown" | "foreign";
97
+ /** The import identity the plan bound (`vpc-…`, a bucket name), on a single-instance block. */
98
+ identity?: string;
99
+ /** The ARN or other stable identity the listing carries. */
100
+ arn?: string;
101
+ /** The region the ARN names, where it names one. */
102
+ region?: string;
103
+ /** Every instance address the plan named for the block, where there is more than the block itself. */
104
+ instances?: string[];
105
+ /** The estate holding a foreign resource, when its marker names one. */
106
+ heldBy?: string;
107
+ /** The marker tags the listing read off an undeclared resource. */
108
+ tags?: Record<string, string>;
109
+ }
110
+ export interface TerraformBehaviourRequestOptions extends Pick<PredictBehaviourOptions, "environment" | "buildOutput" | "traffic" | "region" | "stack" | "owned"> {
111
+ entityNames: readonly string[];
112
+ entities: ReadonlyMap<string, TerraformBehaviourEntity>;
113
+ /**
114
+ * Live reads, one per live root. A root with a read here is built from the
115
+ * account; every other root is built from its declaration. Omit for the
116
+ * declared side.
117
+ */
118
+ live?: readonly TerraformLiveRead[];
119
+ }
120
+ export interface TerraformBehaviourRequest {
121
+ /** The request, ready for `screenBehaviourRequest` and an engine-fronting `predictBehaviour`. */
122
+ request: PredictBehaviourOptions;
123
+ /** Which side each name in the request came from. */
124
+ sources: Record<string, "live" | "declared">;
125
+ /**
126
+ * Declared resources of a live root the account does not hold: the plan
127
+ * reported them `ABSENT`, or named no instance for them. Not in the request,
128
+ * because a prediction of the account cannot price what is not in it, and
129
+ * not `unpredicted`, because the contract has no reason for "not there".
130
+ * The declared side names them; the delta shows them as declared-only.
131
+ */
132
+ absent: string[];
133
+ /**
134
+ * Declared names of a live root with no live verdict to build from — an
135
+ * instance the plan could not read, or one withheld by `owned` — each with
136
+ * the reason. Not in the request; a caller merges them into the report.
137
+ */
138
+ unpredicted: Record<string, UnpredictedEntity>;
139
+ }
140
+ /** The block a document instance address belongs to: `aws_eip.pool[0]` is `aws_eip.pool`. */
141
+ export declare function blockAddressOf(instance: string): string;
142
+ /** The region an ARN names, or undefined for a global one (`arn:aws:s3:::bucket`). */
143
+ export declare function regionOfArn(arn: string): string | undefined;
144
+ /**
145
+ * The body with every resolvable reference replaced by the identifier it
146
+ * stands for, so `reconstructEdges` can match it against the node that owns
147
+ * that identifier.
148
+ *
149
+ * A leaf string is replaced only when the reference **is** the whole value:
150
+ * the string is one `${…}` and nothing else, exactly one of the block's
151
+ * references under the same top-level argument is the one it names, and that
152
+ * reference resolves. Then the value in the account really is the target's
153
+ * identity, and matching it against the node holding that identity is a
154
+ * statement about the estate.
155
+ *
156
+ * Everything else is left alone, and the two cases it leaves alone are
157
+ * different. `"${a.id}-${b.id}"` and `"${a.id}-suffix"` are composed values —
158
+ * a name derived from an identity is not that identity, and substituting the
159
+ * bare identity into one would hand the resolver a value the account does not
160
+ * hold and get back an edge nothing points along. A string naming a reference
161
+ * that does not resolve keeps its `${…}`, which is what makes a reference to a
162
+ * target the account is missing come back from the resolver as `dangling` with
163
+ * the address in `value` rather than vanishing.
164
+ */
165
+ export declare function substituteReferences(body: Record<string, unknown>, references: readonly EntityReference[], addressOf: (to: string) => string | undefined, resolve: (to: string) => string | undefined): Record<string, unknown>;
166
+ /**
167
+ * The coverage claim, from the reconstruction and the kinds nothing was
168
+ * looked for on. `partial` names what is missing; `complete` is claimed only
169
+ * when nothing is.
170
+ */
171
+ export declare function edgeCoverageOf(reconstructed: Pick<ReconstructedEdges, "dangling" | "containmentEdges">, unresolvedKinds: readonly string[]): BehaviourEdgeCoverage;
172
+ /**
173
+ * Build the request. Pure: the documents are already parsed and nothing here
174
+ * reads a clock, the environment or the filesystem, so the same declaration
175
+ * and the same two documents give the same request forever.
176
+ */
177
+ export declare function terraformBehaviourRequest(options: TerraformBehaviourRequestOptions): TerraformBehaviourRequest;
178
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/behaviour/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,4BAA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}
@@ -153,7 +153,7 @@
153
153
  * `id`, which is the physical id every observation carries.
154
154
  */
155
155
  import type { DescribeResourcesResult, ResourceMetadata, TeardownEnumeration } from "@intentius/chant/lexicon";
156
- import { type UnobservedReason } from "@intentius/chant/observation";
156
+ import { type DeclaredEntity, type UnobservedReason } from "@intentius/chant/observation";
157
157
  import type { OwnershipMarker } from "@intentius/chant/ownership";
158
158
  import { choudoufuLiveLs, choudoufuLivePlan, terraformInit, terraformShow } from "./op/activities/terraform.js";
159
159
  export { TERRAFORM_STATE_OWNERSHIP_KEYS } from "./state-ownership.js";
@@ -281,6 +281,40 @@ export declare function indexLivePlan(document: unknown): LivePlanIndex;
281
281
  * direction: no NOT-OBSERVED verdict ever becomes a create or a delete.
282
282
  */
283
283
  export declare const LIVE_PLAN_OMISSION_REASONS: Readonly<Record<string, UnobservedReason | "absent">>;
284
+ /**
285
+ * Every instance address in the document belonging to the declared block
286
+ * `address`. Exported for the behaviour request builder (`./behaviour/`,
287
+ * #2360), which places the same blocks against the same document.
288
+ */
289
+ export declare function instancesOf(address: string, index: LivePlanIndex): string[];
290
+ /** One instance's verdict, before a block aggregates its instances. */
291
+ export type InstanceVerdict = {
292
+ kind: "owned";
293
+ row: LivePlanBoundRow;
294
+ } | {
295
+ kind: "adoptable";
296
+ row: LivePlanAdoptableRow;
297
+ } | {
298
+ kind: "foreign";
299
+ row: LivePlanUnownedRow;
300
+ } | {
301
+ kind: "absent";
302
+ } | {
303
+ kind: "unobserved";
304
+ reason: UnobservedReason;
305
+ detail: string;
306
+ };
307
+ /**
308
+ * Classify one instance address against the document, `unowned[]` first: a
309
+ * declared instance that also carries a `UNOWNED` omission is answered by the
310
+ * section that has the verdict, not by the one that has the apology.
311
+ * `adoptable[]` sits under `bound[]` for the same reason, one rung further
312
+ * down: a content match is the answer for an instance nothing else could
313
+ * answer for, and its paired omission is always `NEEDS_DISCOVERY`, which on
314
+ * its own would read as unsupported-kind and hide a real, actionable verdict
315
+ * (choudoufu #962, chant #2241).
316
+ */
317
+ export declare function classifyLiveInstance(address: string, index: LivePlanIndex): InstanceVerdict;
284
318
  /** One `items[]` entry of a `live-ls -json` listing. */
285
319
  export interface LiveLsItem {
286
320
  /** ARN or other stable identity. */
@@ -387,6 +421,13 @@ export interface TerraformReadDeps {
387
421
  livePlan: typeof choudoufuLivePlan;
388
422
  liveLs: typeof choudoufuLiveLs;
389
423
  }
424
+ /** A declared entity, plus the root, address and mode `buildRoots()` recorded on it. */
425
+ export interface TerraformDeclared extends DeclaredEntity {
426
+ root: string;
427
+ address: string;
428
+ /** `"live"` when the root runs under choudoufu with a declared estate (#2103). */
429
+ mode?: string;
430
+ }
390
431
  /**
391
432
  * The address the live system knows a block by. For a root-module block that
392
433
  * is the block's own address; for one inside a child module it is what
@@ -397,6 +438,15 @@ export interface TerraformReadDeps {
397
438
  * read observes still line up one to one.
398
439
  */
399
440
  export declare function qualifiedAddress(address: string, callers: readonly string[]): string;
441
+ /**
442
+ * The root, qualified address and mode of one declared entity, from what
443
+ * `buildRoots()` recorded on its props. Exported for the behaviour request
444
+ * builder (#2360), which groups entities by root the same way.
445
+ */
446
+ export declare function declaredOf(name: string, entity: {
447
+ entityType: string;
448
+ props: Record<string, unknown>;
449
+ } | undefined): TerraformDeclared;
400
450
  export interface DescribeResourcesOptions {
401
451
  environment: string;
402
452
  buildOutput: string;
@@ -1 +1 @@
1
- {"version":3,"file":"describe-resources.d.ts","sourceRoot":"","sources":["../src/describe-resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyJG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAEhB,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAQL,KAA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OAAO,eAAe,CAAC;CAChC;AASD,wFAAwF;AACxF,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAoBD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEpF;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,SAAS,GAAG,iBAAiB,CActI;AAgFD,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAC9E;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,EACjC,IAAI,GAAE,iBAA6B,GAClC,OAAO,CAAC,uBAAuB,CAAC,CAuElC"}
package/dist/index.d.ts CHANGED
@@ -12,4 +12,5 @@ export type { TerraformWatchOpConfig, TerraformWatchOpResources, TerraformFindin
12
12
  export { TerraformAdoptOp } from "./composites/terraform-adopt-op.js";
13
13
  export type { TerraformAdoptOpConfig, TerraformAdoptOpResources } from "./composites/terraform-adopt-op.js";
14
14
  export { TERRAFORM_STATE_OWNERSHIP_KEYS } from "./state-ownership.js";
15
+ export { predictTerraformBehaviour, terraformBehaviourRequest, TERRAFORM_REFERENCE_CATALOG, type TerraformBehaviourDeps, type TerraformBehaviourEntity, type TerraformBehaviourRequest, type TerraformBehaviourRequestOptions, type TerraformLiveRead, type TerraformPredictOptions, } from "./behaviour/index.js";
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,UAAU,CAAC;AAIlB,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,oBAAoB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAK9E,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,GACf,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EA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AM,eAAe,CAAC;AAKvB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAKzG,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAOnE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,aAAa,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "d343d6292beaaf88268848977437b1cbddfa88b84bb0daa88eb07e34536579b1",
4
+ "manifest.json": "226bbce3601e4a1ba4ae65964a53010231d8b6174b599804cfae272eeb6e0fc1",
5
5
  "meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
6
6
  "types/index.d.ts": "022927e6a7b351cc4cf52d5f973f60ccd140e5810e17b32fb8868965aa1db161",
7
7
  "rules/plan-before-apply.ts": "31b1b3176799fd365b2583fe3947edd187c2a863e3dc0094ed9e91ece2464c99",
@@ -37,5 +37,5 @@
37
37
  "rules/tf028.ts": "81ef95659c40ad1774c83e663473ed769143d894a4ba0517c3defa31f00ba723",
38
38
  "skills/chant-terraform.md": "d9ca7b7c28aed0038ce775a3491150298492eed2858fd3651ed9bfca0e577ae8"
39
39
  },
40
- "composite": "7d976b27efddd6fcfe089f960509d555e2e813abc093eb8317d3ef3163e8d3b7"
40
+ "composite": "f46021b80755a0ea4886db1cdfd1423d8d4e5e537967a787f10bae5bba496f07"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terraform",
3
- "version": "0.65.0",
3
+ "version": "0.66.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Terraform"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-terraform",
3
- "version": "0.65.0",
3
+ "version": "0.66.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "peerDependencies": {
58
58
  "zod": "^4.3.6",
59
- "@intentius/chant": "^0.65.0",
59
+ "@intentius/chant": "^0.66.0",
60
60
  "typescript": "^5.9.3"
61
61
  },
62
62
  "description": "terraform lexicon for chant, existing Terraform root modules as declarable entities",
@@ -0,0 +1,29 @@
1
+ // The live path for choudoufu roots (#2360): the account as it stands, as a
2
+ // behaviour engine's request, and the same producer over the declaration so
3
+ // the two sides of the delta are built alike.
4
+ export {
5
+ blockAddressOf,
6
+ edgeCoverageOf,
7
+ regionOfArn,
8
+ substituteReferences,
9
+ terraformBehaviourRequest,
10
+ type LiveResourceFacts,
11
+ type LiveResourceStatus,
12
+ type TerraformBehaviourEntity,
13
+ type TerraformBehaviourRequest,
14
+ type TerraformBehaviourRequestOptions,
15
+ type TerraformLiveRead,
16
+ } from "./request";
17
+ export {
18
+ liveRootsOf,
19
+ predictTerraformBehaviour,
20
+ TERRAFORM,
21
+ type TerraformBehaviourDeps,
22
+ type TerraformPredictOptions,
23
+ } from "./predict";
24
+ export {
25
+ CATALOGUED_KINDS,
26
+ isUnresolvedKind,
27
+ REFERENCES_NOTHING,
28
+ TERRAFORM_REFERENCE_CATALOG,
29
+ } from "./reference-catalog";