@intentius/chant 0.28.0 → 0.29.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.
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts +5 -3
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/config.d.ts +46 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +153 -17
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/sandbox/config-wire.d.ts +3 -2
- package/dist/discovery/sandbox/config-wire.d.ts.map +1 -1
- package/dist/env.d.ts +5 -2
- package/dist/env.d.ts.map +1 -1
- package/dist/fold/fold.d.ts +12 -0
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/graph-ir.d.ts +29 -4
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/kubectl-context.d.ts +27 -0
- package/dist/kubectl-context.d.ts.map +1 -1
- package/dist/lexicon.d.ts +31 -6
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/change-set.d.ts +26 -5
- package/dist/lifecycle/change-set.d.ts.map +1 -1
- package/dist/lifecycle/live-diff.d.ts +25 -1
- package/dist/lifecycle/live-diff.d.ts.map +1 -1
- package/dist/lifecycle/observe.d.ts +4 -2
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/snapshot.d.ts.map +1 -1
- package/dist/lifecycle/status.d.ts +26 -1
- package/dist/lifecycle/status.d.ts.map +1 -1
- package/dist/lifecycle/types.d.ts +8 -0
- package/dist/lifecycle/types.d.ts.map +1 -1
- package/dist/live-endpoint.d.ts +92 -0
- package/dist/live-endpoint.d.ts.map +1 -0
- package/dist/observation.d.ts +123 -0
- package/dist/observation.d.ts.map +1 -0
- package/dist/stack-output.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/handlers/components.test.ts +63 -4
- package/src/cli/handlers/components.ts +78 -35
- package/src/cli/handlers/graph.test.ts +69 -6
- package/src/cli/handlers/graph.ts +61 -27
- package/src/cli/handlers/lifecycle.test.ts +285 -6
- package/src/cli/handlers/lifecycle.ts +297 -185
- package/src/config.test.ts +75 -0
- package/src/config.ts +61 -3
- package/src/discovery/fold-composite.test.ts +594 -0
- package/src/discovery/fold-import.ts +987 -43
- package/src/discovery/sandbox/config-wire.ts +3 -2
- package/src/env.test.ts +12 -0
- package/src/env.ts +12 -4
- package/src/fold/fold.ts +12 -2
- package/src/graph-ir-live.test.ts +28 -1
- package/src/graph-ir.ts +68 -12
- package/src/index.ts +1 -0
- package/src/kubectl-context.ts +81 -0
- package/src/lexicon.ts +41 -6
- package/src/lifecycle/change-set.test.ts +93 -1
- package/src/lifecycle/change-set.ts +65 -13
- package/src/lifecycle/live-diff.test.ts +39 -0
- package/src/lifecycle/live-diff.ts +51 -5
- package/src/lifecycle/observe.test.ts +74 -3
- package/src/lifecycle/observe.ts +82 -22
- package/src/lifecycle/snapshot.test.ts +39 -1
- package/src/lifecycle/snapshot.ts +34 -9
- package/src/lifecycle/status.test.ts +89 -8
- package/src/lifecycle/status.ts +53 -3
- package/src/lifecycle/types.ts +8 -0
- package/src/live-endpoint.test.ts +115 -0
- package/src/live-endpoint.ts +148 -0
- package/src/observation.test.ts +96 -0
- package/src/observation.ts +213 -0
- package/src/stack-output.test.ts +55 -0
- package/src/stack-output.ts +41 -20
package/dist/lexicon.d.ts
CHANGED
|
@@ -11,7 +11,9 @@ import type { DriverComponent } from "./components/driver.js";
|
|
|
11
11
|
import type { EmulatorCapability } from "./op/emulator-lifecycle.js";
|
|
12
12
|
import type { RuleMeta } from "./audit/catalog.js";
|
|
13
13
|
import type { ReferenceCatalog } from "./graph-refs.js";
|
|
14
|
+
import type { DescribeResourcesResult } from "./observation.js";
|
|
14
15
|
export type { ReferenceCatalog, IdentityRule, RefRule } from "./graph-refs.js";
|
|
16
|
+
export type { DescribeResourcesResult, ObservationResult, NormalizedObservation, UnobservedEntity, UnobservedReason, } from "./observation.js";
|
|
15
17
|
/**
|
|
16
18
|
* Manifest for a packaged lexicon — metadata embedded in the tarball.
|
|
17
19
|
*
|
|
@@ -459,6 +461,27 @@ export interface LexiconPlugin {
|
|
|
459
461
|
* Use this when each chant entity has a 1:1 cloud equivalent — e.g. an
|
|
460
462
|
* AWS CFN resource, a K8s object, an ARM resource, a Temporal namespace.
|
|
461
463
|
*
|
|
464
|
+
* **The observation contract (#1089).** Returning nothing for a declared
|
|
465
|
+
* entity is a claim, and there are two different claims to make. Either the
|
|
466
|
+
* provider was asked and reported the resource absent — which is what lets
|
|
467
|
+
* the change set propose `create` — or the lexicon never looked, which must
|
|
468
|
+
* not. An implementation that has a "did not look" case (no reader for the
|
|
469
|
+
* kind, the read errored, no credentials, no cluster binding) must return the
|
|
470
|
+
* {@link ObservationResult} envelope and name those entities in `unobserved`
|
|
471
|
+
* with a total {@link UnobservedReason}. Warning on stderr is not enough: a
|
|
472
|
+
* warning is invisible to `lifecycle plan`, which is where the wrong `create`
|
|
473
|
+
* gets proposed. Returning the bare `name → ResourceMetadata` map is still
|
|
474
|
+
* valid and means "everything I was asked about, I looked at".
|
|
475
|
+
*
|
|
476
|
+
* Throwing is the whole-lexicon failure (see the k8s cluster-binding refusal,
|
|
477
|
+
* #1100): core catches it and marks every declared entity NOT-OBSERVED with
|
|
478
|
+
* `read-failed`, so a failed read is never a list of creates.
|
|
479
|
+
*
|
|
480
|
+
* Ownership verdicts are total (#1089). When `owned` is requested and the
|
|
481
|
+
* lexicon has no marker channel on this path, it must stamp
|
|
482
|
+
* `ownership: "unknown"` on what it returns rather than degrading silently —
|
|
483
|
+
* the change set never escalates `unknown` to a `delete`.
|
|
484
|
+
*
|
|
462
485
|
* `entities` carries the chant-side entity declarations for this lexicon,
|
|
463
486
|
* keyed by chant entity name (e.g. the export name from a `*.ts` file).
|
|
464
487
|
* Implementations that need to map cloud-side names back to chant entity
|
|
@@ -491,7 +514,7 @@ export interface LexiconPlugin {
|
|
|
491
514
|
* everything.
|
|
492
515
|
*/
|
|
493
516
|
owned?: boolean;
|
|
494
|
-
}): Promise<
|
|
517
|
+
}): Promise<DescribeResourcesResult>;
|
|
495
518
|
/**
|
|
496
519
|
* Report the live status of one deploy unit by its deployed name. Opt-in.
|
|
497
520
|
*
|
|
@@ -638,12 +661,14 @@ export interface ResourceMetadata {
|
|
|
638
661
|
/** Cloud-assigned output properties */
|
|
639
662
|
attributes?: Record<string, unknown>;
|
|
640
663
|
/**
|
|
641
|
-
* Live ownership verdict from the resource's marker (#119/#120)
|
|
642
|
-
*
|
|
643
|
-
* no marker
|
|
644
|
-
*
|
|
664
|
+
* Live ownership verdict from the resource's marker (#119/#120). `owned` =
|
|
665
|
+
* carries chant's marker; `foreign` = no marker; `unknown` = the lexicon has
|
|
666
|
+
* no marker channel on this read path and says so rather than degrading
|
|
667
|
+
* silently (#1089 — verdicts are total). Absent is read as `unknown`. The
|
|
668
|
+
* change set reads this — never the snapshot — to decide whether an orphan is
|
|
669
|
+
* a delete, and never escalates `unknown` to one.
|
|
645
670
|
*/
|
|
646
|
-
ownership?: "owned" | "foreign";
|
|
671
|
+
ownership?: "owned" | "foreign" | "unknown";
|
|
647
672
|
}
|
|
648
673
|
/**
|
|
649
674
|
* Metadata about a runtime artifact, returned by listArtifacts. Same shape
|
package/dist/lexicon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon.d.ts","sourceRoot":"","sources":["../src/lexicon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAA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,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IAC1C,iDAAiD;IACjD,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAkBtE"}
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
* load-bearing.
|
|
14
14
|
*/
|
|
15
15
|
import { type AttributeChange, type DiffLiveInput } from "./live-diff.js";
|
|
16
|
+
import { type UnobservedReason } from "../observation.js";
|
|
16
17
|
/**
|
|
17
18
|
* What the projection proposes for a single resource.
|
|
18
19
|
*
|
|
19
|
-
* - `create` — declared in source,
|
|
20
|
+
* - `create` — declared in source, and the provider **confirmed** it absent.
|
|
20
21
|
* - `update` — declared and live, but live config drifted.
|
|
21
22
|
* - `delete` — a chant-owned resource that is live but no longer declared.
|
|
22
23
|
* Only emitted once ownership is known (#121); never inferred from the
|
|
@@ -24,8 +25,11 @@ import { type AttributeChange, type DiffLiveInput } from "./live-diff.js";
|
|
|
24
25
|
* - `adopt` — live but undeclared, ownership not established → a candidate to
|
|
25
26
|
* pull back into source, never an auto-delete.
|
|
26
27
|
* - `noop` — declared and live with no drift, or already reconciled.
|
|
28
|
+
* - `unobserved` — declared, and the lexicon could not look (#1089). Not a
|
|
29
|
+
* proposal at all: it is the plan admitting a hole. Never a create, never a
|
|
30
|
+
* delete. Read `unobservedReason` for which hole.
|
|
27
31
|
*/
|
|
28
|
-
export type ChangeAction = "create" | "update" | "delete" | "adopt" | "noop";
|
|
32
|
+
export type ChangeAction = "create" | "update" | "delete" | "adopt" | "noop" | "unobserved";
|
|
29
33
|
/**
|
|
30
34
|
* Who answers "is this resource chant's?". `unknown` until a live ownership
|
|
31
35
|
* marker is queried (#120). The change set never escalates `unknown` to a
|
|
@@ -44,13 +48,24 @@ export interface ChangeSetEntry {
|
|
|
44
48
|
declared: boolean;
|
|
45
49
|
/** Present in the last snapshot. */
|
|
46
50
|
inSnapshot: boolean;
|
|
47
|
-
/** Observed in the live system right now. */
|
|
51
|
+
/** Observed present in the live system right now. */
|
|
48
52
|
live: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The lexicon actually looked at this entity (#1089). `false` with
|
|
55
|
+
* `live: false` means "unknown", not "absent" — the distinction the whole
|
|
56
|
+
* change set now rests on. Absent-and-looked-at is `observed: true,
|
|
57
|
+
* live: false`.
|
|
58
|
+
*/
|
|
59
|
+
observed: boolean;
|
|
49
60
|
};
|
|
50
61
|
/** Attribute-level changes, for `update`. */
|
|
51
62
|
deltas?: AttributeChange[];
|
|
52
63
|
/** Live-marker ownership. Defaults to `unknown`. */
|
|
53
64
|
ownership: Ownership;
|
|
65
|
+
/** Why the entity could not be observed, for `action: "unobserved"` (#1089). */
|
|
66
|
+
unobservedReason?: UnobservedReason;
|
|
67
|
+
/** Human-readable backing for `unobservedReason` (the failing command, the missing binding). */
|
|
68
|
+
unobservedDetail?: string;
|
|
54
69
|
}
|
|
55
70
|
export interface ChangeSet {
|
|
56
71
|
env: string;
|
|
@@ -62,6 +77,10 @@ export interface ChangeSet {
|
|
|
62
77
|
* `create`/`update` are precise from declared-vs-live. `delete` is never
|
|
63
78
|
* emitted here — an undeclared live resource classifies as `adopt` until
|
|
64
79
|
* ownership is known.
|
|
80
|
+
*
|
|
81
|
+
* A declared entity the lexicon could not observe (`input.unobserved`, #1089)
|
|
82
|
+
* classifies as `unobserved` and nothing else: no `create` is ever synthesized
|
|
83
|
+
* from a read that did not happen.
|
|
65
84
|
*/
|
|
66
85
|
export declare function buildChangeSet(env: string, input: DiffLiveInput): ChangeSet;
|
|
67
86
|
/** Count entries per action. */
|
|
@@ -72,8 +91,10 @@ export declare function summarize(cs: ChangeSet): Record<ChangeAction, number>;
|
|
|
72
91
|
* GitLab renders an `artifacts:reports:terraform` artifact in the merge-request
|
|
73
92
|
* UI as "N to add, M to change, K to delete". The format is generic — any tool
|
|
74
93
|
* that emits this JSON gets the widget — and the chant plan maps onto it
|
|
75
|
-
* directly. Only the mutating actions count: `adopt` and `
|
|
76
|
-
* since the widget has no column for "live but undeclared"
|
|
94
|
+
* directly. Only the mutating actions count: `adopt`, `noop` and `unobserved`
|
|
95
|
+
* are excluded, since the widget has no column for "live but undeclared", "no
|
|
96
|
+
* change", or "could not look" (#1089). The widget is therefore a floor, not a
|
|
97
|
+
* complete plan: read the full change set when entities are unobserved.
|
|
77
98
|
*
|
|
78
99
|
* The widget label reads "Terraform" regardless of producer; that is GitLab's
|
|
79
100
|
* fixed string, not a claim chant makes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../../src/lifecycle/change-set.ts"],"names":[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,EAAE,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,SAAS,CAgF3E;AAID,gCAAgC;AAChC,wBAAgB,SAAS,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAWrE;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAG5D;AAED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CA0BrD"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* outside chant's entity model)
|
|
14
14
|
*/
|
|
15
15
|
import type { ResourceMetadata, ArtifactMetadata } from "../lexicon.js";
|
|
16
|
+
import type { UnobservedEntity, UnobservedReason } from "../observation.js";
|
|
16
17
|
export interface AttributeChange {
|
|
17
18
|
/** Attribute path (e.g. "status", "physicalId", "attributes.tags.env"). */
|
|
18
19
|
path: string;
|
|
@@ -24,8 +25,19 @@ export interface ResourceDrift {
|
|
|
24
25
|
type: string;
|
|
25
26
|
changes: AttributeChange[];
|
|
26
27
|
}
|
|
28
|
+
/** A declared entity the lexicon could not observe, as reported by the diff (#1089). */
|
|
29
|
+
export interface UnobservedResource {
|
|
30
|
+
name: string;
|
|
31
|
+
type?: string;
|
|
32
|
+
reason: UnobservedReason;
|
|
33
|
+
detail?: string;
|
|
34
|
+
}
|
|
27
35
|
export interface LiveDiffResult {
|
|
28
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Declared in current build, and the provider reported it absent. Entities
|
|
38
|
+
* the lexicon could not observe are NOT here — they are in `unobserved`
|
|
39
|
+
* (#1089), so "missing" keeps meaning "confirmed not there".
|
|
40
|
+
*/
|
|
29
41
|
missing: string[];
|
|
30
42
|
/** Observed in cloud right now, but not declared. */
|
|
31
43
|
orphan: string[];
|
|
@@ -37,6 +49,12 @@ export interface LiveDiffResult {
|
|
|
37
49
|
driftedSinceSnapshot: ResourceDrift[];
|
|
38
50
|
/** Observed both then and now; metadata identical. */
|
|
39
51
|
unchanged: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Declared, and the lexicon could not look (#1089) — no reader for the kind,
|
|
54
|
+
* the read failed, no credentials, no binding. Not drift, not absence: a hole
|
|
55
|
+
* in the observation. Sorted by name.
|
|
56
|
+
*/
|
|
57
|
+
unobserved: UnobservedResource[];
|
|
40
58
|
}
|
|
41
59
|
export interface DiffLiveInput {
|
|
42
60
|
/** Entity names from the current build. */
|
|
@@ -45,6 +63,12 @@ export interface DiffLiveInput {
|
|
|
45
63
|
observedNow: Record<string, ResourceMetadata>;
|
|
46
64
|
/** Resources captured by the previous snapshot, if any. */
|
|
47
65
|
observedThen: Record<string, ResourceMetadata> | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Declared entities `describeResources()` reported as NOT-OBSERVED (#1089),
|
|
68
|
+
* keyed by entity name. Absent/empty means every declared entity was looked
|
|
69
|
+
* at, so absence from `observedNow` is a confirmed absence.
|
|
70
|
+
*/
|
|
71
|
+
unobserved?: Record<string, UnobservedEntity>;
|
|
48
72
|
}
|
|
49
73
|
/** The delta between two saved snapshots (#822): a two-way observed diff. */
|
|
50
74
|
export interface SnapshotDiffResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-diff.d.ts","sourceRoot":"","sources":["../../src/lifecycle/live-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"live-diff.d.ts","sourceRoot":"","sources":["../../src/lifecycle/live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AAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,SAAS,CAAC;IAC3D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC/C;AAyCD,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,gCAAgC;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,oEAAoE;IACpE,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,mCAAmC;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GACrC,kBAAkB,CAiBpB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAsF7D;AAID,MAAM,WAAW,sBAAsB;IACrC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,iCAAiC;IACjC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,mCAAmC;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC9C,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,SAAS,CAAC;CAC5D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,CAmCvF"}
|
|
@@ -22,8 +22,10 @@ export interface ObserveResult {
|
|
|
22
22
|
* `environment`. `owned` (default true for the managed-only diagram, epic #776)
|
|
23
23
|
* restricts to resources carrying chant's ownership marker; a lexicon with no
|
|
24
24
|
* marker channel logs and returns everything (its own contract). Plugins that
|
|
25
|
-
* throw are collected into `errors`
|
|
26
|
-
*
|
|
25
|
+
* throw are collected into `errors` — one failing lexicon never sinks the whole
|
|
26
|
+
* graph — and every entity they were asked about is recorded as NOT-OBSERVED
|
|
27
|
+
* (`read-failed`, #1089) rather than dropped, so a failed read is visibly a
|
|
28
|
+
* hole instead of a silent absence.
|
|
27
29
|
*
|
|
28
30
|
* `stacks` (#57) is for a multi-stack, per-component project (e.g. loomster)
|
|
29
31
|
* where there is no single stack named after the environment — AWS's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/lifecycle/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/lifecycle/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAUnD,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,kBAAkB,EAAE,EAC7B,WAAW,EAAE,WAAW,EACxB,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC5C,OAAO,CAAC,aAAa,CAAC,CAmFxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/lifecycle/snapshot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAsC,MAAM,YAAY,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/lifecycle/snapshot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAsC,MAAM,YAAY,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAkEjD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,kBAAkB,EAAE,EAC7B,WAAW,EAAE,WAAW,EACxB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACtC,OAAO,CAAC,kBAAkB,CAAC,CA0I7B"}
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
* lower-confidence signal rather than silently treated as "reconciled".
|
|
22
22
|
* - **reconciled** — a release record exists and live evidence (via
|
|
23
23
|
* ownership) confirms the component is present and owned by chant.
|
|
24
|
+
* - **unknown** — live evidence was requested and could not be read (#1089),
|
|
25
|
+
* or was not requested at all. A component chant could not observe is never
|
|
26
|
+
* reported `stale`: "the read failed" and "it is gone" are different facts.
|
|
24
27
|
*
|
|
25
28
|
* This is deliberately a light-touch reconciliation: chant's lexicons report
|
|
26
29
|
* resource-level status (`ResourceMetadata`), not "the digest currently
|
|
@@ -35,6 +38,7 @@
|
|
|
35
38
|
import type { ChangeSet, ChangeAction } from "./change-set.js";
|
|
36
39
|
import { type ReleaseRecord } from "./release-ledger.js";
|
|
37
40
|
import type { BuildLedgerEntry, ComponentBomSummary } from "./build-ledger.js";
|
|
41
|
+
import { type UnobservedReason } from "../observation.js";
|
|
38
42
|
/** One row of `chant components status [env]` — the per-component join of recorded vs live. */
|
|
39
43
|
export interface ComponentStatusRow {
|
|
40
44
|
component: string;
|
|
@@ -61,9 +65,21 @@ export interface ComponentStatusRow {
|
|
|
61
65
|
/**
|
|
62
66
|
* Machine-readable "observed live", when live evidence was gathered (`--live`).
|
|
63
67
|
* A consumer joining this row onto a graph node should read this rather than
|
|
64
|
-
* string-matching `detail`. Absent when `--live` was not requested
|
|
68
|
+
* string-matching `detail`. Absent when `--live` was not requested — and, since
|
|
69
|
+
* #1089, also absent when live state could not be read at all: `false` means
|
|
70
|
+
* "looked, not there", never "did not look". Read {@link unobserved} for that
|
|
71
|
+
* case; a consumer that treats absent as "unknown" already handles it.
|
|
65
72
|
*/
|
|
66
73
|
live?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Set when `--live` was requested and the observation could not read this
|
|
76
|
+
* component (#1089). `live` is absent alongside it and `reconciliation` is
|
|
77
|
+
* `unknown` — the row reports a hole rather than a verdict.
|
|
78
|
+
*/
|
|
79
|
+
unobserved?: {
|
|
80
|
+
reason: UnobservedReason;
|
|
81
|
+
detail?: string;
|
|
82
|
+
};
|
|
67
83
|
/**
|
|
68
84
|
* The owning deploy unit's raw status, when a lexicon reported it (AWS: the
|
|
69
85
|
* component's own CFN stack via `describeStackStatus`). Lets a renderer paint a
|
|
@@ -98,6 +114,15 @@ export interface ComponentStatusResult {
|
|
|
98
114
|
export interface LiveComponentEvidence {
|
|
99
115
|
/** True if this component name was observed live at all (declared+live, or orphan+live). */
|
|
100
116
|
live: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Set when the observation could not read this component (#1089). `live` is
|
|
119
|
+
* `false` alongside it, but only because the boolean has nowhere else to go —
|
|
120
|
+
* every consumer must branch on this field before believing `live: false`.
|
|
121
|
+
*/
|
|
122
|
+
unobserved?: {
|
|
123
|
+
reason: UnobservedReason;
|
|
124
|
+
detail?: string;
|
|
125
|
+
};
|
|
101
126
|
/** The `ChangeSet` action chant's existing plan logic assigned, when the component maps to a tracked entity/resource name. */
|
|
102
127
|
action?: ChangeAction;
|
|
103
128
|
/** Ownership verdict, when known. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/lifecycle/status.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/lifecycle/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,+FAA+F;AAC/F,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,+IAA+I;IAC/I,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,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AAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,aAAa,EAAE,CAAA;CAAE,EAChD,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,aAAa,EAAE,CAAA;CAAE,GAC/C,kBAAkB,CAWpB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ResourceMetadata, ArtifactMetadata } from "../lexicon.js";
|
|
2
|
+
import type { UnobservedEntity } from "../observation.js";
|
|
2
3
|
export type { ResourceMetadata, ArtifactMetadata } from "../lexicon.js";
|
|
3
4
|
/**
|
|
4
5
|
* State snapshot for a single lexicon in an environment.
|
|
@@ -16,6 +17,13 @@ export interface LifecycleSnapshot {
|
|
|
16
17
|
timestamp: string;
|
|
17
18
|
/** Resource metadata keyed by logical name */
|
|
18
19
|
resources: Record<string, ResourceMetadata>;
|
|
20
|
+
/**
|
|
21
|
+
* Declared entities this observation could not read (#1089), keyed by logical
|
|
22
|
+
* name. Additive and optional: a snapshot without it observed everything it
|
|
23
|
+
* was asked about. Present so a later diff can tell "was not there when the
|
|
24
|
+
* snapshot was taken" from "was never looked at".
|
|
25
|
+
*/
|
|
26
|
+
unobserved?: Record<string, UnobservedEntity>;
|
|
19
27
|
/** Artifact metadata keyed by server-side identifier (lexicon-specific). */
|
|
20
28
|
artifacts?: Record<string, ArtifactMetadata>;
|
|
21
29
|
/** Build digest at snapshot time — what was declared when this snapshot was taken */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lifecycle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lifecycle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC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,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wCAAwC;IACxC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wCAAwC;IACxC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* chant #1166 — let a declared `environment` carry its own endpoint so
|
|
3
|
+
* `--live --env <name>` is self-sufficient.
|
|
4
|
+
*
|
|
5
|
+
* The bug this closes: `chant graph --live --env floci` (and `lifecycle
|
|
6
|
+
* diff`/`plan`) observe a stack by shelling out through each lexicon's
|
|
7
|
+
* `describeResources()`. For AWS that shell-out honors the ambient
|
|
8
|
+
* `AWS_ENDPOINT_URL` env var — when a project's `floci` environment is a local
|
|
9
|
+
* emulator (`http://localhost:4566`) but the invoking shell never exported
|
|
10
|
+
* that var, the AWS CLI silently targets real AWS instead. The stack named
|
|
11
|
+
* after the environment doesn't exist there, so `describeResources` hits its
|
|
12
|
+
* `stackDoesNotExist` branch and returns an empty, unremarkable "nothing is
|
|
13
|
+
* deployed" — indistinguishable from the truthful answer. This cost real
|
|
14
|
+
* debugging time validating #1162's live overlay: the observation code was
|
|
15
|
+
* right, the manual repro just never set the var.
|
|
16
|
+
*
|
|
17
|
+
* The fix: `environments` in `chant.config.ts` can name an endpoint per
|
|
18
|
+
* environment (`config.ts`'s `EnvironmentDeclaration`), and {@link
|
|
19
|
+
* applyLiveEndpoint} injects it into the ambient env var each observing
|
|
20
|
+
* lexicon's CLI shell-out actually reads — but only for a var that isn't
|
|
21
|
+
* already set. Ambient always wins: a shell that already exports
|
|
22
|
+
* `AWS_ENDPOINT_URL` sees no change in behavior.
|
|
23
|
+
*
|
|
24
|
+
* Audited (#1166) which lexicons have an ambient-env-var endpoint knob at
|
|
25
|
+
* all, since that's the specific footgun — a lexicon whose environment
|
|
26
|
+
* binding is resolved from `chant.config` itself (not an ambient var) has
|
|
27
|
+
* nothing to inject here:
|
|
28
|
+
*
|
|
29
|
+
* - **aws** — `AWS_ENDPOINT_URL`, read directly by
|
|
30
|
+
* `lexicons/aws/src/components/cloud-executor.ts` / `plugin.ts` before
|
|
31
|
+
* every `aws …` shell-out (`applyAwsEndpoint`/`applyAwsEndpointArgv`).
|
|
32
|
+
* - **fly** — `FLY_FLAPS_BASE_URL`, read by `resolveEndpoint()` in
|
|
33
|
+
* `lexicons/fly/src/op/activities/fly-apply.ts`, the same seam
|
|
34
|
+
* `describeResources` (`../describe-resources.ts`) calls through.
|
|
35
|
+
* - **gcp**, **k8s** — resolve their live target from `chant.config` itself
|
|
36
|
+
* (`k8s.profiles.<env>.context` via `resolveClusterTarget`,
|
|
37
|
+
* `packages/core/src/kubectl-context.ts`), not an ambient var. Nothing to
|
|
38
|
+
* inject: the config *is* the binding already.
|
|
39
|
+
* - **azure** — resolves via the `az` CLI's own logged-in
|
|
40
|
+
* subscription/session context; no ambient endpoint var exists to miss.
|
|
41
|
+
* - **temporal** — resolves its connection from `temporal.profiles.<env>`
|
|
42
|
+
* (`resolveProfile`, `lexicons/temporal/src/describe-resources.ts`), the
|
|
43
|
+
* same "config is the binding" shape as k8s/gcp.
|
|
44
|
+
*/
|
|
45
|
+
import { type EnvironmentDeclaration } from "./config.js";
|
|
46
|
+
/**
|
|
47
|
+
* Per-lexicon ambient env var a `--live` read honors for its endpoint. Only
|
|
48
|
+
* lexicons with a genuine ambient-var footgun are listed — see the module doc
|
|
49
|
+
* for the full audit (gcp/k8s/azure/temporal resolve their target from
|
|
50
|
+
* `chant.config` instead, so they have nothing to inject).
|
|
51
|
+
*/
|
|
52
|
+
export declare const LEXICON_ENDPOINT_ENV_VAR: Record<string, string>;
|
|
53
|
+
/** Result of {@link applyLiveEndpoint} — always call `restore()`, even when nothing was applied (it is then a no-op). */
|
|
54
|
+
export interface AppliedEndpoint {
|
|
55
|
+
/**
|
|
56
|
+
* One line describing what happened, or `undefined` when the environment
|
|
57
|
+
* declares no endpoint at all (nothing to say). Present whether the
|
|
58
|
+
* declared endpoint was applied OR an ambient var already won — #1166's
|
|
59
|
+
* "no silent anything" stance: an operator should never have to guess which
|
|
60
|
+
* target a `--live` read actually used.
|
|
61
|
+
*/
|
|
62
|
+
notice?: string;
|
|
63
|
+
/** Undo whatever ambient env vars this call set. Always safe to call. */
|
|
64
|
+
restore: () => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Resolve `environment`'s declared endpoint (if any) from `config.environments`
|
|
68
|
+
* and apply it to the ambient env var of every lexicon in `lexicons` that has
|
|
69
|
+
* one ({@link LEXICON_ENDPOINT_ENV_VAR}) — but only when that var isn't
|
|
70
|
+
* already set. Ambient always wins (#1166): behavior for a shell that already
|
|
71
|
+
* exports `AWS_ENDPOINT_URL` is unchanged.
|
|
72
|
+
*
|
|
73
|
+
* Call before a `--live` describe/enrich pass; `restore()` in a `finally` so
|
|
74
|
+
* the injected value never leaks into a later invocation in the same process
|
|
75
|
+
* (tests, or a long-lived host like the MCP server).
|
|
76
|
+
*/
|
|
77
|
+
export declare function applyLiveEndpoint(environments: EnvironmentDeclaration[] | undefined, environment: string, lexicons: readonly string[], env?: NodeJS.ProcessEnv): AppliedEndpoint;
|
|
78
|
+
/**
|
|
79
|
+
* #1166 acceptance: when a `--live` describe comes back with zero resources
|
|
80
|
+
* for a lexicon that had declared entities to look for, and nothing was
|
|
81
|
+
* already reported NOT-OBSERVED (#1089) either, that is either "genuinely
|
|
82
|
+
* nothing is deployed yet" or a misconfigured endpoint/credentials — the two
|
|
83
|
+
* are visually identical, so a caller must say so rather than stay quiet.
|
|
84
|
+
* Returns `undefined` when there is nothing to declare (no declared entities
|
|
85
|
+
* to have asked about, or the emptiness is already explained by #1089's
|
|
86
|
+
* `unobserved`).
|
|
87
|
+
*/
|
|
88
|
+
export declare function zeroResourcesWarning(lexicon: string, environment: string, declaredCount: number, observed: {
|
|
89
|
+
resources: Record<string, unknown>;
|
|
90
|
+
unobserved: Record<string, unknown>;
|
|
91
|
+
}): string | undefined;
|
|
92
|
+
//# sourceMappingURL=live-endpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-endpoint.d.ts","sourceRoot":"","sources":["../src/live-endpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG3D,CAAC;AAEF,yHAAyH;AACzH,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAClD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,eAAe,CAqCjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GACpF,MAAM,GAAG,SAAS,CAKpB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The observation contract (#1089) — what a lexicon's `describeResources()`
|
|
3
|
+
* is allowed to mean.
|
|
4
|
+
*
|
|
5
|
+
* Before this module there were two ways for an observation to return nothing
|
|
6
|
+
* for a declared entity and no way to tell them apart:
|
|
7
|
+
*
|
|
8
|
+
* 1. The provider was asked and said the resource does not exist.
|
|
9
|
+
* 2. The lexicon never looked — no reader for that kind, the read errored,
|
|
10
|
+
* no credentials, no cluster/subscription binding.
|
|
11
|
+
*
|
|
12
|
+
* Both arrived at the change set as "absent", and absent + declared classifies
|
|
13
|
+
* as `create`. So `chant lifecycle plan` proposed creating a Kubernetes CRD
|
|
14
|
+
* that already existed in the cluster, with nothing in the plan to say the tool
|
|
15
|
+
* had simply not looked (a warn on stderr is not a signal in a change set).
|
|
16
|
+
*
|
|
17
|
+
* The contract is a tri-state, per declared entity:
|
|
18
|
+
*
|
|
19
|
+
* - **OBSERVED-PRESENT** — a key in `resources`. The provider returned it.
|
|
20
|
+
* - **OBSERVED-ABSENT** — in neither map. The lexicon looked and the provider
|
|
21
|
+
* reported it missing. This is the only shape that may become a `create`.
|
|
22
|
+
* - **NOT-OBSERVED** — a key in `unobserved`, carrying a total
|
|
23
|
+
* {@link UnobservedReason}. Never a `create`, never a `delete`; consumers
|
|
24
|
+
* surface it and stop.
|
|
25
|
+
*
|
|
26
|
+
* Compatibility: `describeResources()` may still return the bare
|
|
27
|
+
* `name → ResourceMetadata` map it always did — that means "everything I was
|
|
28
|
+
* asked about, I looked at" and normalizes to an empty `unobserved`. Reporting
|
|
29
|
+
* NOT-OBSERVED requires the explicitly versioned {@link ObservationResult}
|
|
30
|
+
* envelope, which is discriminated by its literal `observation: "v1"` field (a
|
|
31
|
+
* bare map's value at any key is a `ResourceMetadata` object, never that
|
|
32
|
+
* string, so the two shapes can never be confused).
|
|
33
|
+
*/
|
|
34
|
+
import type { ResourceMetadata } from "./lexicon.js";
|
|
35
|
+
/**
|
|
36
|
+
* Why a declared entity was not observed. Total: a lexicon that cannot observe
|
|
37
|
+
* an entity must pick one of these, and consumers may switch exhaustively.
|
|
38
|
+
*
|
|
39
|
+
* - `read-failed` — the provider was reached and the read errored (a non-zero
|
|
40
|
+
* CLI exit, a 5xx, an unparseable response).
|
|
41
|
+
* - `no-credentials` — no usable credentials/authorization for the target.
|
|
42
|
+
* - `no-binding` — the environment resolves to no concrete target (no kubectl
|
|
43
|
+
* context, no subscription, no stack, no endpoint).
|
|
44
|
+
* - `unsupported-kind` — the lexicon has no reader for this entity type (the
|
|
45
|
+
* K8s CRD case, Azure's nested ARM types). The resource may well exist.
|
|
46
|
+
* - `filtered` — the entity was reached but withheld by a caller-requested
|
|
47
|
+
* filter (`owned: true` against a resource carrying no chant marker). The
|
|
48
|
+
* result deliberately says nothing about it, which is still not absence: a
|
|
49
|
+
* declared resource that exists but is foreign must not classify as `create`.
|
|
50
|
+
*/
|
|
51
|
+
export type UnobservedReason = "read-failed" | "no-credentials" | "no-binding" | "unsupported-kind" | "filtered";
|
|
52
|
+
/** Every legal {@link UnobservedReason}, for validation and conformance checks. */
|
|
53
|
+
export declare const UNOBSERVED_REASONS: readonly UnobservedReason[];
|
|
54
|
+
/** True when `value` is a legal {@link UnobservedReason}. */
|
|
55
|
+
export declare function isUnobservedReason(value: unknown): value is UnobservedReason;
|
|
56
|
+
/** One declared entity the lexicon could not observe, and why. */
|
|
57
|
+
export interface UnobservedEntity {
|
|
58
|
+
/** Declared entity type, when the lexicon knows it (it usually does — the entity is declared). */
|
|
59
|
+
type?: string;
|
|
60
|
+
/** Total verdict. */
|
|
61
|
+
reason: UnobservedReason;
|
|
62
|
+
/** Human-readable detail: the command that failed, the missing binding key, the unsupported kind. */
|
|
63
|
+
detail?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The observation envelope — a `describeResources()` return value that can say
|
|
67
|
+
* "I did not look at this one". Explicitly versioned: `observation: "v1"`.
|
|
68
|
+
*/
|
|
69
|
+
export interface ObservationResult {
|
|
70
|
+
/** Discriminant + wire version. Distinguishes the envelope from the bare `name → ResourceMetadata` map. */
|
|
71
|
+
readonly observation: "v1";
|
|
72
|
+
/** OBSERVED-PRESENT, keyed by chant entity name. */
|
|
73
|
+
resources: Record<string, ResourceMetadata>;
|
|
74
|
+
/** NOT-OBSERVED, keyed by chant entity name. Omit or leave empty when everything asked about was looked at. */
|
|
75
|
+
unobserved?: Record<string, UnobservedEntity>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* What `describeResources()` may return: the bare map (pre-#1089, still valid —
|
|
79
|
+
* "I looked at everything") or the {@link ObservationResult} envelope.
|
|
80
|
+
*/
|
|
81
|
+
export type DescribeResourcesResult = Record<string, ResourceMetadata> | ObservationResult;
|
|
82
|
+
/** Normalized form every consumer works with. Both maps always present. */
|
|
83
|
+
export interface NormalizedObservation {
|
|
84
|
+
resources: Record<string, ResourceMetadata>;
|
|
85
|
+
unobserved: Record<string, UnobservedEntity>;
|
|
86
|
+
}
|
|
87
|
+
/** True when `value` is the versioned {@link ObservationResult} envelope. */
|
|
88
|
+
export declare function isObservationResult(value: unknown): value is ObservationResult;
|
|
89
|
+
/**
|
|
90
|
+
* Build an {@link ObservationResult}. Lexicons use this rather than writing the
|
|
91
|
+
* discriminant by hand.
|
|
92
|
+
*/
|
|
93
|
+
export declare function observation(resources: Record<string, ResourceMetadata>, unobserved?: Record<string, UnobservedEntity>): ObservationResult;
|
|
94
|
+
/**
|
|
95
|
+
* Normalize either accepted return shape. `undefined` (a lexicon that returned
|
|
96
|
+
* nothing at all) normalizes to two empty maps — which reads as "everything was
|
|
97
|
+
* observed absent", so callers that mean "the read failed" must say so with
|
|
98
|
+
* {@link unobservedAll} rather than returning nothing.
|
|
99
|
+
*/
|
|
100
|
+
export declare function normalizeObservation(value: DescribeResourcesResult | undefined): NormalizedObservation;
|
|
101
|
+
/**
|
|
102
|
+
* Mark every named entity NOT-OBSERVED with one reason — the whole-lexicon
|
|
103
|
+
* failure case (the provider CLI is missing, the cluster binding refused, the
|
|
104
|
+
* credentials are gone). Core applies this when `describeResources()` throws,
|
|
105
|
+
* so a thrown read degrades to an honest "did not look" for each declared
|
|
106
|
+
* entity instead of an empty map that classifies as N creates.
|
|
107
|
+
*/
|
|
108
|
+
export declare function unobservedAll(names: Iterable<string>, reason: UnobservedReason, detail?: string, types?: Map<string, {
|
|
109
|
+
entityType: string;
|
|
110
|
+
}> | Record<string, string>): Record<string, UnobservedEntity>;
|
|
111
|
+
/**
|
|
112
|
+
* Union several observations of the same lexicon (the multi-stack read, where
|
|
113
|
+
* `describeResources` runs once per stack). Precedence is
|
|
114
|
+
* present > not-observed > absent: a resource found in any stack is present; an
|
|
115
|
+
* entity nobody could look at stays not-observed; an entity every reader looked
|
|
116
|
+
* for and did not find is absent.
|
|
117
|
+
*/
|
|
118
|
+
export declare function mergeObservations(parts: Iterable<NormalizedObservation>): NormalizedObservation;
|
|
119
|
+
/** One-line human phrasing of a reason, for CLI output. */
|
|
120
|
+
export declare function unobservedReasonText(reason: UnobservedReason): string;
|
|
121
|
+
/** `name — reason (detail)`, the shared rendering for CLI and plan output. */
|
|
122
|
+
export declare function formatUnobserved(name: string, entry: UnobservedEntity): string;
|
|
123
|
+
//# sourceMappingURL=observation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../src/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,UAAU,CAAC;AAEf,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,EAAE,SAAS,gBAAgB,EAMzD,CAAC;AAEF,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAED,kEAAkE;AA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