@intentius/chant-lexicon-aws 0.33.0 → 0.34.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.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAyJ,MAAM,0BAA0B,CAAC;AA0BrN;yEACyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AA6DnD,eAAO,MAAM,SAAS,EAAE,aAm2BvB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgL,MAAM,0BAA0B,CAAC;AA6B5O;yEACyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAWnD,eAAO,MAAM,SAAS,EAAE,aAm5BvB,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * A managed resource's own properties (#1279).
3
+ *
4
+ * `describe-stack-resources` returns identity and status — logical id, physical
5
+ * id, type, timestamp — and nothing about the resource itself. So the managed
6
+ * observation filled `attributes` with the *stack's* outputs instead, copied
7
+ * onto every resource in the stack. Every node in a stack came out carrying the
8
+ * same `expVpcId`/`expWebIp` keys, and no node carried its own `VpcId`.
9
+ *
10
+ * That is invisible until something asks. `search --show VpcId` printed a blank
11
+ * column for six instances, which reads as "the estate has no VPCs" rather than
12
+ * "chant never read that". An agent asked which instances were outside the
13
+ * default VPC concluded all six were, because nothing in the graph said
14
+ * otherwise.
15
+ *
16
+ * A deep read (Cloud Control) answers this properly but is a per-resource call
17
+ * and is not available on every endpoint. This is the cheap middle: one describe
18
+ * per kind for the whole observation, joined back by physical id. Stack outputs
19
+ * are kept — they were the only attributes for a long time and queries lean on
20
+ * them — but a resource's own properties win a name collision, because they are
21
+ * the resource's.
22
+ */
23
+ import type { ResourceMetadata } from "@intentius/chant/lexicon";
24
+ /**
25
+ * Stamp the region each resource was observed in (#1279).
26
+ *
27
+ * The observation is already scoped per stack and each stack declares its
28
+ * region, so the reader knows this and was throwing it away. Without it the
29
+ * only route to "which region is this in" was parsing
30
+ * `Placement.AvailabilityZone` and trimming the last character — a trick that
31
+ * happens to work for EC2 and for nothing else. Region is a dimension of the
32
+ * estate, not a substring of an availability zone.
33
+ */
34
+ export declare function stampRegion(resources: Record<string, ResourceMetadata>, region?: string): Record<string, ResourceMetadata>;
35
+ /** True when this lexicon can read the kind's own properties. */
36
+ export declare function canDescribe(kind: string): boolean;
37
+ /**
38
+ * Merge each resource's own properties into an observation, in place of nothing.
39
+ *
40
+ * Best-effort per kind, and per kind only: an endpoint that cannot answer
41
+ * `describe-subnets` still yields instance properties, and a total failure
42
+ * leaves the observation exactly as it arrived. The managed observation is
43
+ * already complete without any of this — these are additional facts about
44
+ * resources chant has already identified, so a miss costs detail, never
45
+ * correctness.
46
+ */
47
+ export declare function describeOwnProperties(resources: Record<string, ResourceMetadata>, region?: string): Promise<Record<string, ResourceMetadata>>;
48
+ //# sourceMappingURL=properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../src/properties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkCjE;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAUlC;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAgE3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"reference-catalog.d.ts","sourceRoot":"","sources":["../src/reference-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAoEjC,CAAC"}
1
+ {"version":3,"file":"reference-catalog.d.ts","sourceRoot":"","sources":["../src/reference-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAyFjC,CAAC"}