@intentius/chant 0.46.0 → 0.49.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/audit/core.d.ts +21 -3
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts +3 -2
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/build.d.ts +3 -3
- package/dist/build.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/tools/explain.d.ts +6 -0
- package/dist/cli/mcp/tools/explain.d.ts.map +1 -1
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.d.ts.map +1 -1
- package/dist/cli/reporters/stylish.d.ts +15 -1
- package/dist/cli/reporters/stylish.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts +4 -0
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/starter-plugin.d.ts +2 -0
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/verbs/ensure-secret.d.ts +50 -0
- package/dist/components/verbs/ensure-secret.d.ts.map +1 -0
- package/dist/components/verbs/index.d.ts +8 -0
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/r2-sync.d.ts +76 -0
- package/dist/components/verbs/r2-sync.d.ts.map +1 -0
- package/dist/components/verbs/wrangler.d.ts +108 -0
- package/dist/components/verbs/wrangler.d.ts.map +1 -0
- package/dist/config.d.ts +26 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/deep-observation.d.ts +14 -0
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/effect-receipt.d.ts +177 -0
- package/dist/effect-receipt.d.ts.map +1 -0
- package/dist/fold/subset.d.ts +15 -2
- package/dist/fold/subset.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lexicon.d.ts +44 -3
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/change-set.d.ts +33 -5
- package/dist/lifecycle/change-set.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +2 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/observation-baseline.d.ts +21 -3
- package/dist/lifecycle/observation-baseline.d.ts.map +1 -1
- package/dist/lifecycle/receipt-plan.d.ts +62 -0
- package/dist/lifecycle/receipt-plan.d.ts.map +1 -0
- package/dist/lifecycle/release-ledger.d.ts +20 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/teardown.d.ts +6 -4
- package/dist/lifecycle/teardown.d.ts.map +1 -1
- package/dist/lifecycle/unobserved-gate.d.ts +67 -0
- package/dist/lifecycle/unobserved-gate.d.ts.map +1 -0
- package/dist/lint/knowledge-checks.d.ts +48 -0
- package/dist/lint/knowledge-checks.d.ts.map +1 -0
- package/dist/lint/output-checks.d.ts +5 -0
- package/dist/lint/output-checks.d.ts.map +1 -0
- package/dist/lint/pipeline-change-gate.d.ts +101 -0
- package/dist/lint/pipeline-change-gate.d.ts.map +1 -0
- package/dist/lint/post-synth.d.ts +12 -0
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/lint/receipt-checks.d.ts +9 -0
- package/dist/lint/receipt-checks.d.ts.map +1 -0
- package/dist/lint/rules/cor022-receipt-leaf.d.ts +13 -0
- package/dist/lint/rules/cor022-receipt-leaf.d.ts.map +1 -0
- package/dist/lint/rules/cor024-receipt-secret-pointer.d.ts +3 -0
- package/dist/lint/rules/cor024-receipt-secret-pointer.d.ts.map +1 -0
- package/dist/lint/rules/evl001-non-literal-expression.d.ts.map +1 -1
- package/dist/lint/rules/index.d.ts +3 -1
- package/dist/lint/rules/index.d.ts.map +1 -1
- package/dist/okf-read.d.ts +78 -0
- package/dist/okf-read.d.ts.map +1 -0
- package/dist/op/builders.d.ts +98 -1
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/index.d.ts +4 -2
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts +2 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/receipt-store.d.ts +138 -0
- package/dist/op/receipt-store.d.ts.map +1 -0
- package/dist/op/types.d.ts +31 -1
- package/dist/op/types.d.ts.map +1 -1
- package/dist/secret-materialization.d.ts +138 -0
- package/dist/secret-materialization.d.ts.map +1 -0
- package/dist/secret-provenance.d.ts +218 -0
- package/dist/secret-provenance.d.ts.map +1 -0
- package/dist/serializer.d.ts +11 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/audit/core.test.ts +57 -0
- package/src/audit/core.ts +0 -0
- package/src/audit/detect-bundle.test.ts +1 -1
- package/src/audit/discover.test.ts +24 -0
- package/src/audit/discover.ts +11 -2
- package/src/audit/rules-doc.ts +11 -1
- package/src/build.test.ts +41 -0
- package/src/build.ts +34 -6
- package/src/cli/commands/__fixtures__/audit-fountain/agents/fleet.yaml +27 -0
- package/src/cli/commands/__fixtures__/audit-fountain/k8s/deploy.yaml +16 -0
- package/src/cli/commands/__fixtures__/audit-fountain-clean/fleet.yaml +20 -0
- package/src/cli/commands/audit.test.ts +53 -0
- package/src/cli/commands/audit.ts +1 -1
- package/src/cli/commands/build.test.ts +80 -0
- package/src/cli/commands/build.ts +106 -8
- package/src/cli/commands/lint.ts +15 -3
- package/src/cli/handlers/explain.test.ts +70 -1
- package/src/cli/handlers/graph.ts +2 -2
- package/src/cli/handlers/lifecycle.test.ts +115 -1
- package/src/cli/handlers/lifecycle.ts +84 -11
- package/src/cli/mcp/resource-handlers.ts +38 -1
- package/src/cli/mcp/server.test.ts +58 -1
- package/src/cli/mcp/tools/explain.ts +51 -2
- package/src/cli/plugins.ts +4 -2
- package/src/cli/reporters/stylish.test.ts +154 -0
- package/src/cli/reporters/stylish.ts +154 -33
- package/src/components/auto-release.ts +6 -0
- package/src/components/registry.test.ts +7 -2
- package/src/components/starter-plugin.ts +17 -0
- package/src/components/verbs/ensure-secret.test.ts +130 -0
- package/src/components/verbs/ensure-secret.ts +79 -0
- package/src/components/verbs/index.ts +8 -0
- package/src/components/verbs/r2-sync.test.ts +107 -0
- package/src/components/verbs/r2-sync.ts +124 -0
- package/src/components/verbs/wrangler.test.ts +170 -0
- package/src/components/verbs/wrangler.ts +241 -0
- package/src/config.test.ts +15 -0
- package/src/config.ts +30 -0
- package/src/deep-observation.test.ts +19 -0
- package/src/deep-observation.ts +17 -0
- package/src/effect-receipt-exclusion.test.ts +190 -0
- package/src/effect-receipt.test.ts +419 -0
- package/src/effect-receipt.ts +412 -0
- package/src/fold/subset.test.ts +26 -0
- package/src/fold/subset.ts +45 -19
- package/src/index.ts +4 -0
- package/src/lexicon.ts +48 -3
- package/src/lifecycle/change-set.ts +46 -7
- package/src/lifecycle/index.ts +2 -0
- package/src/lifecycle/observation-baseline.test.ts +46 -0
- package/src/lifecycle/observation-baseline.ts +33 -1
- package/src/lifecycle/receipt-plan.test.ts +250 -0
- package/src/lifecycle/receipt-plan.ts +249 -0
- package/src/lifecycle/release-ledger.ts +20 -0
- package/src/lifecycle/teardown.test.ts +31 -0
- package/src/lifecycle/teardown.ts +6 -4
- package/src/lifecycle/unobserved-gate.test.ts +109 -0
- package/src/lifecycle/unobserved-gate.ts +102 -0
- package/src/lint/knowledge-checks.test.ts +80 -0
- package/src/lint/knowledge-checks.ts +74 -0
- package/src/lint/output-checks.test.ts +85 -0
- package/src/lint/output-checks.ts +99 -0
- package/src/lint/pipeline-change-gate.test.ts +144 -0
- package/src/lint/pipeline-change-gate.ts +153 -0
- package/src/lint/post-synth.ts +15 -0
- package/src/lint/receipt-checks.test.ts +101 -0
- package/src/lint/receipt-checks.ts +93 -0
- package/src/lint/rules/cor022-receipt-leaf.test.ts +116 -0
- package/src/lint/rules/cor022-receipt-leaf.ts +130 -0
- package/src/lint/rules/cor024-receipt-secret-pointer.test.ts +121 -0
- package/src/lint/rules/cor024-receipt-secret-pointer.ts +218 -0
- package/src/lint/rules/evl001-non-literal-expression.test.ts +27 -0
- package/src/lint/rules/evl001-non-literal-expression.ts +8 -1
- package/src/lint/rules/index.ts +7 -1
- package/src/okf-read.test.ts +149 -0
- package/src/okf-read.ts +197 -0
- package/src/op/builders.ts +139 -1
- package/src/op/effect-step.test.ts +311 -0
- package/src/op/index.ts +10 -3
- package/src/op/local-executor.ts +172 -25
- package/src/op/op.test.ts +25 -2
- package/src/op/receipt-store.ts +211 -0
- package/src/op/types.ts +33 -1
- package/src/secret-materialization.test.ts +199 -0
- package/src/secret-materialization.ts +235 -0
- package/src/secret-provenance.test.ts +388 -0
- package/src/secret-provenance.ts +475 -0
- package/src/serializer.ts +12 -0
- package/src/yaml.test.ts +88 -0
- package/src/yaml.ts +76 -6
|
@@ -91,15 +91,33 @@ export interface DeviationToAccept {
|
|
|
91
91
|
value: unknown;
|
|
92
92
|
note?: string;
|
|
93
93
|
}
|
|
94
|
+
/** Options for {@link acceptDeviations}. */
|
|
95
|
+
export interface AcceptDeviationsOptions {
|
|
96
|
+
/** ISO timestamp to stamp instead of the wall clock (tests, replays). */
|
|
97
|
+
now?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Entity names the caller recognized as effect receipts (#1833) — the
|
|
100
|
+
* marker-based read (`collectEffectReceipts`, ../effect-receipt.ts) over
|
|
101
|
+
* the build's entities, which is how a lexicon-materialized receipt row is
|
|
102
|
+
* caught even though its `entityType` is the row's own. Core-typed
|
|
103
|
+
* receipts are refused regardless, via {@link DeviationToAccept.type}.
|
|
104
|
+
*/
|
|
105
|
+
receipts?: ReadonlySet<string>;
|
|
106
|
+
}
|
|
94
107
|
/**
|
|
95
108
|
* Record deviations as accepted, returning a new baseline (the input is not
|
|
96
109
|
* mutated). An existing acceptance for the same entity+path is replaced — that
|
|
97
110
|
* is how re-accepting after a deliberate change works, and it keeps the file
|
|
98
111
|
* from growing a second entry for every value a path has ever held.
|
|
112
|
+
*
|
|
113
|
+
* REFUSES a deviation on an effect receipt (#1833, epic #1703), throwing
|
|
114
|
+
* before anything is recorded: a receipt is the declared witness that its
|
|
115
|
+
* effect ran, and the `effect()` step is its only writer — baselining a
|
|
116
|
+
* receipt's live value would accept "the effect never fired" as the new
|
|
117
|
+
* normal and silently defuse the effect. The whole acceptance aborts, not
|
|
118
|
+
* just the receipt's row, so a partial baseline never lands.
|
|
99
119
|
*/
|
|
100
|
-
export declare function acceptDeviations(baseline: ObservationBaseline, lexicon: string, deviations: readonly DeviationToAccept[], opts?:
|
|
101
|
-
now?: string;
|
|
102
|
-
}): ObservationBaseline;
|
|
120
|
+
export declare function acceptDeviations(baseline: ObservationBaseline, lexicon: string, deviations: readonly DeviationToAccept[], opts?: AcceptDeviationsOptions): ObservationBaseline;
|
|
103
121
|
/** Total accepted deviations across every lexicon — for the "N accepted" line. */
|
|
104
122
|
export declare function countAccepted(baseline: ObservationBaseline | null | undefined): number;
|
|
105
123
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observation-baseline.d.ts","sourceRoot":"","sources":["../../src/lifecycle/observation-baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;
|
|
1
|
+
{"version":3,"file":"observation-baseline.d.ts","sourceRoot":"","sources":["../../src/lifecycle/observation-baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAMH,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,yGAAyG;IACzG,IAAI,EAAE,MAAM,CAAC;IACb,+FAA+F;IAC/F,KAAK,EAAE,OAAO,CAAC;IACf,+DAA+D;IAC/D,IAAI,CA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AM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,SAAS,iBAAiB,EAAE,EACxC,IAAI,CAAC,EAAE,uBAAuB,GAC7B,mBAAmB,CAkCrB;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAOtF;AAID;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAErC;AAED,oFAAoF;AACpF,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,mBAAmB,EAC7B,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC,MAAM,CAAC,CAQjB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type EffectReceiptDeclaration, type ReceiptInputResolver } from "../effect-receipt.js";
|
|
2
|
+
import type { ResourceMetadata } from "../lexicon.js";
|
|
3
|
+
import type { UnobservedReason } from "../observation.js";
|
|
4
|
+
import type { ChangeSet, ChangeSetEntry } from "./change-set.js";
|
|
5
|
+
/**
|
|
6
|
+
* The attribute a materialized receipt's live value is read from. A lexicon
|
|
7
|
+
* receipt row's observation (#1835) maps the stored value onto
|
|
8
|
+
* `attributes[RECEIPT_VALUE_ATTRIBUTE]`; `Value` is accepted as a fallback for
|
|
9
|
+
* observations that keep the provider's own casing (SSM's `Value`).
|
|
10
|
+
*/
|
|
11
|
+
export declare const RECEIPT_VALUE_ATTRIBUTE = "value";
|
|
12
|
+
/** Read a live receipt's stored value off an observation's attributes. */
|
|
13
|
+
export declare function readReceiptValue(attributes: Record<string, unknown> | undefined): unknown;
|
|
14
|
+
/**
|
|
15
|
+
* What the plan's observation pass learned about one declared receipt.
|
|
16
|
+
* Deliberately tri-state, the same shape the change set rests on (#1089):
|
|
17
|
+
* `observed: false` means "nobody looked", which is a hole — never absence.
|
|
18
|
+
* A receipt with no reading at all means no loaded lexicon even claims it.
|
|
19
|
+
*/
|
|
20
|
+
export interface ReceiptReading {
|
|
21
|
+
/** The lexicon actually looked. `false` → the receipt is a plan hole. */
|
|
22
|
+
observed: boolean;
|
|
23
|
+
/** Observed present in the live system. Meaningful only when `observed`. */
|
|
24
|
+
present: boolean;
|
|
25
|
+
/** The live receipt's stored value ({@link readReceiptValue}). */
|
|
26
|
+
value?: unknown;
|
|
27
|
+
/** Live resource type, when reported. */
|
|
28
|
+
type?: string;
|
|
29
|
+
/** Provider-assigned physical id, when reported. */
|
|
30
|
+
physicalId?: string;
|
|
31
|
+
/** The lexicon whose observation produced this reading. */
|
|
32
|
+
lexicon?: string;
|
|
33
|
+
/** Why the read did not happen, when `observed: false`. */
|
|
34
|
+
unobservedReason?: UnobservedReason;
|
|
35
|
+
unobservedDetail?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A {@link ReceiptInputResolver} over the plan's merged observed values: an
|
|
39
|
+
* attr-ref resolves to the referenced entity's observed attribute. Anything
|
|
40
|
+
* that is not among the observed values throws — which `planReceipts` renders
|
|
41
|
+
* as an effect-will-fire entry with an "unresolved input" note rather than a
|
|
42
|
+
* guessed expectation.
|
|
43
|
+
*/
|
|
44
|
+
export declare function observedValueResolver(resources: Readonly<Record<string, ResourceMetadata>>): ReceiptInputResolver;
|
|
45
|
+
/**
|
|
46
|
+
* Classify every declared receipt into its change-set entry. See the module
|
|
47
|
+
* doc for the classification; entries come back sorted by name.
|
|
48
|
+
*/
|
|
49
|
+
export declare function planReceipts(receipts: ReadonlyMap<string, EffectReceiptDeclaration>, readings: ReadonlyMap<string, ReceiptReading>, resolver: ReceiptInputResolver): ChangeSetEntry[];
|
|
50
|
+
/**
|
|
51
|
+
* Replace whatever the generic classification proposed for the receipts with
|
|
52
|
+
* the receipt entries built by {@link planReceipts}, in place.
|
|
53
|
+
*
|
|
54
|
+
* This is the plan-side write-exclusion (#1832): the generic change set,
|
|
55
|
+
* knowing nothing about receipts, classifies a declared-but-absent receipt as
|
|
56
|
+
* `create` and an undeclared-but-live one as `delete`/`adopt` — proposals the
|
|
57
|
+
* generic apply path must never act on for a receipt, and prune candidacy a
|
|
58
|
+
* receipt must never have. Every entry named like a receipt is dropped and
|
|
59
|
+
* the receipt's own entries stand in.
|
|
60
|
+
*/
|
|
61
|
+
export declare function mergeReceiptEntries(cs: ChangeSet, receipts: ReadonlyMap<string, EffectReceiptDeclaration>, receiptEntries: ChangeSetEntry[]): ChangeSet;
|
|
62
|
+
//# sourceMappingURL=receipt-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt-plan.d.ts","sourceRoot":"","sources":["../../src/lifecycle/receipt-plan.ts"],"names":[],"mappings":"AAkCA,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAA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ional: the archive's own manifest digest (../components/verbs/build-archive.ts's `manifestDigest`), when the caller has it — lets a reader recover full build contents/provenance, not just the promoted image digest. */
|
|
76
76
|
manifestDigest?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Optional: set when the deploy's capability-profile assertion (chant
|
|
79
|
+
* #1244, helm lexicon) was deliberately overridden — carries the named
|
|
80
|
+
* divergences that were bypassed (declared vs live), so the ledger shows
|
|
81
|
+
* this release knowingly skewed from its declared profile. Absent for a
|
|
82
|
+
* deploy whose target matched, and for deploys with no declared profile.
|
|
83
|
+
*/
|
|
84
|
+
profileOverride?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Optional: the deploy's input-side digest, when `digest` is a
|
|
87
|
+
* rendered-content identity rather than an input identity. A pinned helm
|
|
88
|
+
* deploy (chant #1242) records the render's `contentDigest` as `digest` —
|
|
89
|
+
* what this cluster actually received — and carries the input digest
|
|
90
|
+
* (chart, chart version, resolved values, capability facts; chant #1243)
|
|
91
|
+
* here, because profiles are per cluster: two environments legitimately
|
|
92
|
+
* render to different bytes, so cross-environment "is prod running what
|
|
93
|
+
* staging tested" joins on this field while `digest` proves the exact
|
|
94
|
+
* bytes each cluster got. Absent when `digest` is already input-side.
|
|
95
|
+
*/
|
|
96
|
+
inputDigest?: string;
|
|
77
97
|
}
|
|
78
98
|
/** Thrown by `appendReleaseRecord` when the record is missing a required field — a release record can never be recorded partially, since it is never editable afterward. */
|
|
79
99
|
export declare class InvalidReleaseRecordError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-ledger.d.ts","sourceRoot":"","sources":["../../src/lifecycle/release-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,4FAA4F;IAC5F,OAAO,EAAE,CAAC,CAAC;IACX,6FAA6F;IAC7F,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,GAAG,EA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,yFAAyF;AACzF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,MAAM,EAAE,CAO9E;AAED,gIAAgI;AAChI,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,kBAAkB,EACzB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC,CAQpD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAiB1D;AAED,4EAA4E;AAC5E,wBAAsB,uBAAuB,CAAC,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAExF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CASvF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,CAE1F"}
|
|
@@ -86,11 +86,13 @@ export declare function planTeardown(opts: PlanTeardownOptions): Promise<Teardow
|
|
|
86
86
|
export interface TeardownOutcomeEntry extends TeardownPlanEntry {
|
|
87
87
|
/**
|
|
88
88
|
* `skipped` is core's verdict for a candidate whose lexicon implements no
|
|
89
|
-
* `executeTeardown` yet; the
|
|
90
|
-
* {@link TeardownOutcome}).
|
|
89
|
+
* `executeTeardown` yet; the others come from the lexicon (see
|
|
90
|
+
* {@link TeardownOutcome}). `retained` is the loud keep (#1365 decision 5):
|
|
91
|
+
* owned, no longer declared, deliberately not deleted — a `generated-once`
|
|
92
|
+
* secret survives every sweep and says so with a row.
|
|
91
93
|
*/
|
|
92
|
-
outcome: "deleted" | "failed" | "not-prunable" | "skipped";
|
|
93
|
-
/** The error for `failed`, the reason for `not-prunable`/`skipped`. */
|
|
94
|
+
outcome: "deleted" | "failed" | "not-prunable" | "retained" | "skipped";
|
|
95
|
+
/** The error for `failed`, the reason for `not-prunable`/`retained`/`skipped`. */
|
|
94
96
|
detail?: string;
|
|
95
97
|
/** True when this final outcome came from the bounded retry pass. */
|
|
96
98
|
retried?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../src/lifecycle/teardown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAmB,MAAM,YAAY,CAAC;AAGvG,0EAA0E;AAC1E,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,sEAAsE;AACtE,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,2EAA2E;AAC3E,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,kFAAkF;IAClF,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B;;;;OAIG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,mBAA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,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The unobserved gate predicate (#1568): a plan containing unobserved
|
|
3
|
+
* entities must not pass as clean.
|
|
4
|
+
*
|
|
5
|
+
* `buildChangeSet` (./change-set.ts) already refuses to guess when a lexicon
|
|
6
|
+
* could not look (#1089) — entries land as `action: "unobserved"`, carrying a
|
|
7
|
+
* total `unobservedReason` (`read-failed`, `no-credentials`, `no-binding`,
|
|
8
|
+
* `unsupported-kind`, `filtered`; see ../observation.ts). But nothing
|
|
9
|
+
* downstream is *required* to look: a gate that checks lint-clean,
|
|
10
|
+
* owned-only, and a blast-radius budget can walk right past a change set
|
|
11
|
+
* whose live read partially failed and call it clean, because none of those
|
|
12
|
+
* checks reads `unobserved` at all. A gate over an incomplete read is a gate
|
|
13
|
+
* over a guess.
|
|
14
|
+
*
|
|
15
|
+
* This is a reusable predicate, not a runtime — evaluate a `ChangeSet`
|
|
16
|
+
* against a policy and get back a verdict; the caller (a `lint.policies`
|
|
17
|
+
* check routed through `policyGate`, an Op step, #1487's gate-as-fact once it
|
|
18
|
+
* lands) decides what to do with a refusal (throw, diagnostic, a durable
|
|
19
|
+
* gated-run fact). Same instinct #1484 already adopts for `unknown` in the
|
|
20
|
+
* operating loop ("`unknown` never remediates"), surfaced here as something
|
|
21
|
+
* any gate can declare rather than a property of one runtime.
|
|
22
|
+
*/
|
|
23
|
+
import type { ChangeSet } from "./change-set.js";
|
|
24
|
+
import { type UnobservedReason } from "../observation.js";
|
|
25
|
+
/**
|
|
26
|
+
* How the gate treats the change set's unobserved set.
|
|
27
|
+
*
|
|
28
|
+
* - `"refuse"` (the default) — any unobserved entry not covered by `allow`
|
|
29
|
+
* fails the gate outright. Fail-closed, the right default for a policy set
|
|
30
|
+
* aimed at agent-proposed change sets: a hole must never launder into a
|
|
31
|
+
* clean verdict just because nobody configured otherwise.
|
|
32
|
+
* - `"escalate"` — the gate does not fail here; instead the verdict reports
|
|
33
|
+
* `escalate: true` so a caller can route the plan to a stricter gate class
|
|
34
|
+
* rather than the ordinary path (the same shape of routing decision #1569
|
|
35
|
+
* makes for pipeline changes).
|
|
36
|
+
* - `{ allow: [...] }` — the listed reasons are tolerated (e.g. `"filtered"`,
|
|
37
|
+
* intentional in a scoped run) and never fail or escalate the gate; any
|
|
38
|
+
* reason NOT in the list still refuses. `no-credentials` — a hole that must
|
|
39
|
+
* never launder into a clean verdict — should never appear in an `allow`
|
|
40
|
+
* list for a policy aimed at agent-proposed change sets.
|
|
41
|
+
*/
|
|
42
|
+
export type UnobservedGatePolicy = "refuse" | "escalate" | {
|
|
43
|
+
allow: UnobservedReason[];
|
|
44
|
+
};
|
|
45
|
+
/** One unobserved hole the gate found, carried into the refusal. */
|
|
46
|
+
export interface UnobservedGateFinding {
|
|
47
|
+
name: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
reason: UnobservedReason;
|
|
50
|
+
detail?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface UnobservedGateVerdict {
|
|
53
|
+
/** False when the policy is `"refuse"` (default) and an unallowed unobserved entry exists. */
|
|
54
|
+
pass: boolean;
|
|
55
|
+
/** True when the policy is `"escalate"` and an unallowed unobserved entry exists — route to a stricter gate instead of failing here. */
|
|
56
|
+
escalate: boolean;
|
|
57
|
+
/** Every unobserved entry the policy did not allow. Empty when `pass` is true and `escalate` is false. */
|
|
58
|
+
findings: UnobservedGateFinding[];
|
|
59
|
+
/** Human-readable summary carrying the reasons into a refusal — the message a caller can surface as-is. Undefined when `findings` is empty. */
|
|
60
|
+
detail?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Evaluate a `ChangeSet`'s unobserved set against `policy`. Pure — reads only
|
|
64
|
+
* `cs.entries`, no I/O. Defaults to `"refuse"`.
|
|
65
|
+
*/
|
|
66
|
+
export declare function evaluateUnobservedGate(cs: ChangeSet, policy?: UnobservedGatePolicy): UnobservedGateVerdict;
|
|
67
|
+
//# sourceMappingURL=unobserved-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unobserved-gate.d.ts","sourceRoot":"","sources":["../../src/lifecycle/unobserved-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,UAAU,GAAG;IAAE,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAEzF,oEAAoE;AACpE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,IAAI,EAAE,OAAO,CAAC;IACd,wIAAwI;IACxI,QAAQ,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,QAAQ,EAAE,qBAAqB,EAAE,CAAC;IAClC,+IAA+I;IAC/I,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,SAAS,EACb,MAAM,GAAE,oBAA+B,GACtC,qBAAqB,CA+BvB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { PostSynthCheck } from "./post-synth.js";
|
|
2
|
+
import type { OkfBundle } from "../okf-read.js";
|
|
3
|
+
/**
|
|
4
|
+
* COR026: Stale Knowledge Binding (#1865, design #1059, epic #1057)
|
|
5
|
+
*
|
|
6
|
+
* A concept's `binds` frontmatter key names a discovered entity's logical
|
|
7
|
+
* name (#1864, `../okf-read.ts`'s `bindConcepts`). A name that resolves to
|
|
8
|
+
* nothing is a stale binding — the entity was renamed or removed, or the
|
|
9
|
+
* concept was authored against a name that never existed — and per #1059's
|
|
10
|
+
* stated failure posture ("the spec permits broken links, which argues for
|
|
11
|
+
* warn") that is a warning, never a build failure: knowledge is deliberately
|
|
12
|
+
* softer than the typed graph it describes, and OKF itself tolerates broken
|
|
13
|
+
* links (epic #1057).
|
|
14
|
+
*
|
|
15
|
+
* The converse is deliberately silent: a concept with no `binds` at all is
|
|
16
|
+
* orphaned knowledge, not an omission (a runbook, a decision about the
|
|
17
|
+
* project as a whole), and `bindConcepts` never reports it as unresolved in
|
|
18
|
+
* the first place — see its own doc comment. A project with no knowledge
|
|
19
|
+
* bundle loads an empty one (`loadOkfBundle`), so this check produces no
|
|
20
|
+
* diagnostics either.
|
|
21
|
+
*
|
|
22
|
+
* Wired into `chant build` (`../cli/commands/build.ts`) alongside
|
|
23
|
+
* `coreReceiptChecks` — same reasons COR023/COR024 are build-owned rather
|
|
24
|
+
* than a per-file `LintRule`: the check needs the full discovered entity map
|
|
25
|
+
* (`ctx.entities`), not one `ts.SourceFile`, and that map only exists after
|
|
26
|
+
* discovery has run. Unlike COR023/024 it never reads `ctx.outputs` — the
|
|
27
|
+
* bundle is loaded once, up front (async — `loadOkfBundle` reads the
|
|
28
|
+
* filesystem), and closed over here so the check itself stays the same sync
|
|
29
|
+
* shape every other `PostSynthCheck` has.
|
|
30
|
+
*/
|
|
31
|
+
export declare const STALE_KNOWLEDGE_BINDING_CHECK_ID = "COR026";
|
|
32
|
+
/**
|
|
33
|
+
* Build the COR026 check for one loaded bundle. A factory, not a bare
|
|
34
|
+
* constant, because — unlike `coreReceiptChecks`, which needs nothing but
|
|
35
|
+
* `ctx.entities` — this check needs the bundle loaded from disk, and
|
|
36
|
+
* `loadOkfBundle` is async while `PostSynthCheck#check` is not. The caller
|
|
37
|
+
* loads the bundle once (`resolveKnowledgeDir` + `loadOkfBundle`) and passes
|
|
38
|
+
* it in; see `../cli/commands/build.ts`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function staleKnowledgeBindingCheck(bundle: OkfBundle): PostSynthCheck;
|
|
41
|
+
/**
|
|
42
|
+
* Core's own post-synth check over knowledge bindings, run by `chant build`
|
|
43
|
+
* over the full build result — unscoped, like `coreReceiptChecks`, since a
|
|
44
|
+
* concept's `binds` can name any discovered entity regardless of which
|
|
45
|
+
* lexicon owns it.
|
|
46
|
+
*/
|
|
47
|
+
export declare function coreKnowledgeChecks(bundle: OkfBundle): PostSynthCheck[];
|
|
48
|
+
//# sourceMappingURL=knowledge-checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-checks.d.ts","sourceRoot":"","sources":["../../src/lint/knowledge-checks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,gCAAgC,WAAW,CAAC;AAEzD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,CAoB5E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,EAAE,CAEvE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PostSynthCheck } from "./post-synth.js";
|
|
2
|
+
export declare const STRINGIFIED_REFERENCE_CHECK_ID = "COR025";
|
|
3
|
+
/** Core-owned post-synth checks over serialized output text (#1526). */
|
|
4
|
+
export declare function coreOutputChecks(): PostSynthCheck[];
|
|
5
|
+
//# sourceMappingURL=output-checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-checks.d.ts","sourceRoot":"","sources":["../../src/lint/output-checks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AAoCxE,eAAO,MAAM,8BAA8B,WAAW,CAAC;AA0DvD,wEAAwE;AACxE,wBAAgB,gBAAgB,IAAI,cAAc,EAAE,CAEnD"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pipeline-change gate class (#1569): changes to the pipeline itself
|
|
3
|
+
* route to a stricter gate.
|
|
4
|
+
*
|
|
5
|
+
* The honest concession in the PR-flow teardown (rubric-product-research,
|
|
6
|
+
* 06-objections §1): chant Ops have a `shell` step, so a governed plane is
|
|
7
|
+
* not automatically immune to "the change edits the machinery that applies
|
|
8
|
+
* changes." What chant *can* claim — and a plain PR flow structurally cannot
|
|
9
|
+
* — is that pipeline changes are distinguishable: a composition is data over
|
|
10
|
+
* a bounded verb registry, and the COMP rules already police the escape
|
|
11
|
+
* hatches (COMP006 — every `shell` step carries a declared reason;
|
|
12
|
+
* COMP005 — no noun-shaped escape hatches, `./rules/comp/`). What was missing
|
|
13
|
+
* was the routing: nothing classified a change as "touches the pipeline" and
|
|
14
|
+
* required a stricter gate for it, so a change to a composition rode through
|
|
15
|
+
* the same gate as a replica-count bump.
|
|
16
|
+
*
|
|
17
|
+
* This is the cheap first cut #1569 asks for: the registry-only predicate.
|
|
18
|
+
* A composition that contains only registry verbs is ordinary; a `shell`
|
|
19
|
+
* step (the deliberate escape hatch) or a change to the set of verbs a
|
|
20
|
+
* composition invokes trips the stricter class. comp005/comp006 already make
|
|
21
|
+
* both decidable from the text — this module reuses the same walk
|
|
22
|
+
* (`./rules/comp/support.ts`) rather than re-deriving it.
|
|
23
|
+
*
|
|
24
|
+
* Like #1568's `evaluateUnobservedGate`
|
|
25
|
+
* (../lifecycle/unobserved-gate.ts), this is a reusable predicate, not a
|
|
26
|
+
* runtime: classify a change and get back a verdict; the caller (a
|
|
27
|
+
* `lint.policies` check routed through `policyGate`, an Op step, #1487's
|
|
28
|
+
* gate-as-fact once it lands) decides what "stricter" means in its own
|
|
29
|
+
* context. The stricter class composes with #1487's principle that
|
|
30
|
+
* destructive verbs always wait for a person — pipeline changes are the
|
|
31
|
+
* second category that should never free-run, because they change what
|
|
32
|
+
* "gated" means for everything after them. That is why the default policy
|
|
33
|
+
* below is `"human-always"`, not `"stricter-gate"`.
|
|
34
|
+
*/
|
|
35
|
+
import type { Component } from "../components/component.js";
|
|
36
|
+
/** Why a composition (or a change to one) tripped the pipeline-change class. */
|
|
37
|
+
export type PipelineChangeReason = {
|
|
38
|
+
kind: "shell-step";
|
|
39
|
+
phaseName: string;
|
|
40
|
+
} | {
|
|
41
|
+
kind: "unregistered-verb";
|
|
42
|
+
stepKind: string;
|
|
43
|
+
phaseName: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "verb-set-changed";
|
|
46
|
+
added: string[];
|
|
47
|
+
removed: string[];
|
|
48
|
+
};
|
|
49
|
+
export interface PipelineChangeClassification {
|
|
50
|
+
/** True when any reason below applies. */
|
|
51
|
+
pipelineChange: boolean;
|
|
52
|
+
reasons: PipelineChangeReason[];
|
|
53
|
+
}
|
|
54
|
+
/** Every non-gate step kind a component's composition invokes, across `deploy` and `rollback` (nested fan-out phases included, via `walkComponent`). `gate` steps are excluded — they are not a capability verb. */
|
|
55
|
+
export declare function componentVerbSet(component: Component): Set<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Classify a single component's composition (the "cheap first cut", no
|
|
58
|
+
* before/after needed): a `shell` step trips the class unconditionally — it
|
|
59
|
+
* is the escape hatch by construction (COMP006) — and any step whose `kind`
|
|
60
|
+
* is outside `knownKinds` trips it too, since an unregistered verb is,
|
|
61
|
+
* structurally, the same kind of hole a `shell` step is: something the
|
|
62
|
+
* bounded registry does not account for.
|
|
63
|
+
*/
|
|
64
|
+
export declare function classifyComponentPipelineChange(component: Component, opts?: {
|
|
65
|
+
knownKinds?: ReadonlySet<string>;
|
|
66
|
+
}): PipelineChangeClassification;
|
|
67
|
+
/**
|
|
68
|
+
* Classify a *change* to a component's composition between two revisions
|
|
69
|
+
* (#1569's "add or modify a shell step ... or the composition graph
|
|
70
|
+
* itself"): on top of `classifyComponentPipelineChange`'s single-composition
|
|
71
|
+
* check on `after`, a change also trips the class when the verb set itself
|
|
72
|
+
* changed — a verb added or removed changes what the composition can invoke,
|
|
73
|
+
* which is the routing signal even when every individual verb, before and
|
|
74
|
+
* after, is registry-clean. `before: undefined` (a brand-new component) never
|
|
75
|
+
* reports a verb-set change — there is nothing to diff against, and the
|
|
76
|
+
* single-composition check already covers a new component's own shell/
|
|
77
|
+
* unregistered-verb findings.
|
|
78
|
+
*/
|
|
79
|
+
export declare function classifyPipelineChange(before: Component | undefined, after: Component, opts?: {
|
|
80
|
+
knownKinds?: ReadonlySet<string>;
|
|
81
|
+
}): PipelineChangeClassification;
|
|
82
|
+
/**
|
|
83
|
+
* How the gate routes a classified pipeline change.
|
|
84
|
+
*
|
|
85
|
+
* - `"human-always"` (the recommended default — see this module's doc
|
|
86
|
+
* comment) — a pipeline change never free-runs, mirroring #1487's "a
|
|
87
|
+
* destructive verb always waits for a person."
|
|
88
|
+
* - `"stricter-gate"` — route to a named stricter gate class rather than
|
|
89
|
+
* requiring a person on every run; the caller supplies what "stricter"
|
|
90
|
+
* means (an additional approval, a narrower blast-radius budget, ...).
|
|
91
|
+
*/
|
|
92
|
+
export type PipelineChangeGatePolicy = "stricter-gate" | "human-always";
|
|
93
|
+
export interface PipelineChangeGateVerdict extends PipelineChangeClassification {
|
|
94
|
+
/** What the policy says to do about it. `"none"` when the change is not a pipeline change at all. */
|
|
95
|
+
route: PipelineChangeGatePolicy | "none";
|
|
96
|
+
}
|
|
97
|
+
/** Evaluate a component composition change against a routing policy. Pure — no I/O. */
|
|
98
|
+
export declare function evaluatePipelineChangeGate(before: Component | undefined, after: Component, policy?: PipelineChangeGatePolicy, opts?: {
|
|
99
|
+
knownKinds?: ReadonlySet<string>;
|
|
100
|
+
}): PipelineChangeGateVerdict;
|
|
101
|
+
//# sourceMappingURL=pipeline-change-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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AQ,4BAA4B;IAC7E,qGAAqG;IACrG,KAAK,EAAE,wBAAwB,GAAG,MAAM,CAAC;CAC1C;AAED,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,KAAK,EAAE,SAAS,EAChB,MAAM,GAAE,wBAAyC,EACjD,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,GAC1C,yBAAyB,CAG3B"}
|
|
@@ -31,6 +31,18 @@ export interface PostSynthContext {
|
|
|
31
31
|
* Extract the primary content string from a serializer output.
|
|
32
32
|
*/
|
|
33
33
|
export declare function getPrimaryOutput(output: string | SerializerResult): string;
|
|
34
|
+
/**
|
|
35
|
+
* Extract the ADDITIONAL files from a serializer output — everything
|
|
36
|
+
* {@link getPrimaryOutput} discards.
|
|
37
|
+
*
|
|
38
|
+
* Every post-synth check shipped before this one reads the primary output
|
|
39
|
+
* only, which means a sidecar file (a nested stack template, committed SOPS
|
|
40
|
+
* ciphertext) is invisible to all of them. That is the right default — the
|
|
41
|
+
* primary output is what appliers read — but a rule ABOUT a sidecar has to
|
|
42
|
+
* be able to see it, and `PostSynthContext.outputs` has carried the data all
|
|
43
|
+
* along. WK8504 (k8s) is the first caller.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getAdditionalFiles(output: string | SerializerResult): Record<string, string>;
|
|
34
46
|
/**
|
|
35
47
|
* A diagnostic from a post-synthesis check.
|
|
36
48
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-synth.d.ts","sourceRoot":"","sources":["../../src/lint/post-synth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC;;GAEG;AACH,MAAM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,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5F;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;CACrD;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAQxE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EAAE,EACxB,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,EAC5C,GAAG,CAAC,EAAE,MAAM,GACX,mBAAmB,EAAE,CAavB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PostSynthCheck } from "./post-synth.js";
|
|
2
|
+
export declare const RECEIPT_PLAIN_STORE_CHECK_ID = "COR023";
|
|
3
|
+
/**
|
|
4
|
+
* Core's own post-synth checks over effect receipts, run by `chant build`
|
|
5
|
+
* over the full build result (plugin checks are lexicon-scoped; receipts are
|
|
6
|
+
* recognized by marker, so this set is deliberately not).
|
|
7
|
+
*/
|
|
8
|
+
export declare function coreReceiptChecks(): PostSynthCheck[];
|
|
9
|
+
//# sourceMappingURL=receipt-checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt-checks.d.ts","sourceRoot":"","sources":["../../src/lint/receipt-checks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AAqCxE,eAAO,MAAM,4BAA4B,WAAW,CAAC;AAgDrD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,EAAE,CAEpD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as ts from "typescript";
|
|
2
|
+
import type { LintRule } from "../rule.js";
|
|
3
|
+
/** A variable declaration's `EffectReceipt(...)` initializer, if that is what it is. */
|
|
4
|
+
export declare function receiptFactoryCall(decl: ts.VariableDeclaration): ts.CallExpression | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Every variable name bound to an effect receipt in this file: direct
|
|
7
|
+
* `EffectReceipt(...)` initializers plus identifier aliases, resolved to a
|
|
8
|
+
* fixpoint so declaration order does not matter. Scope-naive by design, the
|
|
9
|
+
* same trade COR011 makes — a chant source file is flat declarations.
|
|
10
|
+
*/
|
|
11
|
+
export declare function collectReceiptVariables(sourceFile: ts.SourceFile): Set<string>;
|
|
12
|
+
export declare const cor022ReceiptLeafRule: LintRule;
|
|
13
|
+
//# sourceMappingURL=cor022-receipt-leaf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cor022-receipt-leaf.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/cor022-receipt-leaf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAsCrE,wFAAwF;AACxF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,GAAG,EAAE,CAAC,cAAc,GAAG,SAAS,CAG9F;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CA2B9E;AASD,eAAO,MAAM,qBAAqB,EAAE,QA0CnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cor024-receipt-secret-pointer.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/cor024-receipt-secret-pointer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AA2IrE,eAAO,MAAM,8BAA8B,EAAE,QA6E5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evl001-non-literal-expression.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl001-non-literal-expression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"evl001-non-literal-expression.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl001-non-literal-expression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AA6DrE,eAAO,MAAM,8BAA8B,EAAE,QAU5C,CAAC"}
|
|
@@ -24,9 +24,11 @@ export { evl010CompositeNoTransformRule } from "./evl010-composite-no-transform.
|
|
|
24
24
|
export { cor017CompositeNameMatchRule } from "./cor017-composite-name-match.js";
|
|
25
25
|
export { cor018CompositePreferLexiconTypeRule } from "./cor018-composite-prefer-lexicon-type.js";
|
|
26
26
|
export { cor021EnvLiteralNameRule } from "./cor021-env-literal-name.js";
|
|
27
|
+
export { cor022ReceiptLeafRule, collectReceiptVariables, receiptFactoryCall } from "./cor022-receipt-leaf.js";
|
|
28
|
+
export { cor024ReceiptSecretPointerRule } from "./cor024-receipt-secret-pointer.js";
|
|
27
29
|
export { isInsideCompositeFactory } from "./composite-scope.js";
|
|
28
30
|
/**
|
|
29
|
-
* Load all
|
|
31
|
+
* Load all 24 core lint rules (COR + EVL).
|
|
30
32
|
*/
|
|
31
33
|
export declare function loadCoreRules(): LintRule[];
|
|
32
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EA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,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AA2B7D;;GAEG;AACH,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CA2B1C"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { Declarable } from "./declarable.js";
|
|
2
|
+
/**
|
|
3
|
+
* One authored concept document, parsed from a bundle. Deliberately thinner
|
|
4
|
+
* than the emit side's internal `Concept` (`./okf.ts`) — this is what a
|
|
5
|
+
* *reader* trusts, and per the #1059 design that is `type`/`title` plus the
|
|
6
|
+
* single frontmatter key chant interprets, `binds`. Everything else an
|
|
7
|
+
* author wrote rides along in {@link frontmatter} unexamined, so a consumer
|
|
8
|
+
* that needs a project-specific key (a future `category`, say) can still
|
|
9
|
+
* reach it without a reader change.
|
|
10
|
+
*/
|
|
11
|
+
export interface OkfConcept {
|
|
12
|
+
/** Bundle-relative path (forward-slash separated), e.g. "decisions/public-assets.md". */
|
|
13
|
+
path: string;
|
|
14
|
+
/** The frontmatter `type`. May be empty — the reader never rejects a concept for it, unlike the emitter's conformance check. */
|
|
15
|
+
type: string;
|
|
16
|
+
/** Frontmatter `title`, when the author set one. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* This concept's `binds` frontmatter key, normalized to a list — one name,
|
|
20
|
+
* several, or `[]` for "declared no binding, and that's legitimate."
|
|
21
|
+
* Structural-looking keys (`name`, `lexicon`, `kind`) are deliberately
|
|
22
|
+
* *not* surfaced here or anywhere else on this type: the reader interprets
|
|
23
|
+
* exactly `binds` (#1059's precedence-by-construction), so authored and
|
|
24
|
+
* inferred knowledge cannot conflict at the fact level.
|
|
25
|
+
*/
|
|
26
|
+
binds: string[];
|
|
27
|
+
/** Every frontmatter key this concept's document carries, `binds` included, verbatim. */
|
|
28
|
+
frontmatter: Record<string, unknown>;
|
|
29
|
+
/** Markdown body (everything after the closing `---`), unchanged. */
|
|
30
|
+
body: string;
|
|
31
|
+
}
|
|
32
|
+
/** A loaded OKF knowledge bundle: every authored concept found, reserved files already excluded. */
|
|
33
|
+
export interface OkfBundle {
|
|
34
|
+
concepts: OkfConcept[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Load every authored concept from an OKF knowledge bundle directory.
|
|
38
|
+
* `index.md`/`log.md` are skipped (reserved, by basename, at any depth —
|
|
39
|
+
* matching `okfConformanceProblems`'s check on the emit side). A directory
|
|
40
|
+
* that does not exist yields an empty bundle, not an error: the #1059 design
|
|
41
|
+
* treats a missing `knowledge/` as "this project has none yet," the same
|
|
42
|
+
* posture as a project with no lexicons configured.
|
|
43
|
+
*
|
|
44
|
+
* A file that fails to parse — no frontmatter block, unparseable YAML, or
|
|
45
|
+
* frontmatter that isn't a mapping — is skipped with a `console.warn` and
|
|
46
|
+
* does not affect any other file. Nothing here throws.
|
|
47
|
+
*/
|
|
48
|
+
export declare function loadOkfBundle(dir: string): Promise<OkfBundle>;
|
|
49
|
+
/** {@link bindConcepts}'s result: bound concepts per entity, plus every binding that resolved nothing. */
|
|
50
|
+
export interface BindConceptsResult {
|
|
51
|
+
/**
|
|
52
|
+
* Bound concepts keyed by entity logical name — the same names that key
|
|
53
|
+
* `DiscoveryResult.entities` (`./discovery/index.ts`). An entity with no
|
|
54
|
+
* bound concepts is absent from the map, never present with `[]`.
|
|
55
|
+
*/
|
|
56
|
+
bound: Map<string, OkfConcept[]>;
|
|
57
|
+
/** Every `binds` entry that named no entity in `entities` — chant's own broken-link posture (#1059): a warning for the caller to surface (COR022, #1865), never a load failure. */
|
|
58
|
+
unresolved: UnresolvedBinding[];
|
|
59
|
+
}
|
|
60
|
+
/** One `binds` entry that resolved to nothing. */
|
|
61
|
+
export interface UnresolvedBinding {
|
|
62
|
+
/** The concept whose `binds` named this entity. */
|
|
63
|
+
concept: OkfConcept;
|
|
64
|
+
/** The unresolved logical name. */
|
|
65
|
+
name: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Resolve every concept's `binds` against a project's discovered entities.
|
|
69
|
+
* `entities` is the same shape `./okf.ts`'s emitter takes, `DiscoveryResult`'s
|
|
70
|
+
* own `entities` map — a bare logical name is unambiguous within one
|
|
71
|
+
* discovery pass (#1059's "Rejected options" on binding ambiguity).
|
|
72
|
+
*
|
|
73
|
+
* A concept with no `binds` contributes to neither `bound` nor `unresolved`;
|
|
74
|
+
* an unbound concept is legitimate, not an omission (a runbook, a decision
|
|
75
|
+
* about the project as a whole).
|
|
76
|
+
*/
|
|
77
|
+
export declare function bindConcepts(bundle: OkfBundle, entities: Map<string, Declarable>): BindConceptsResult;
|
|
78
|
+
//# sourceMappingURL=okf-read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"okf-read.d.ts","sourceRoot":"","sources":["../src/okf-read.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAkB/C;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,gIAAgI;IAChI,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oGAAoG;AACpG,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAmCD;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CA8CnE;AAED,0GAA0G;AAC1G,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IACjC,mLAAmL;IACnL,UAAU,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,OAAO,EAAE,UAAU,CAAC;IACpB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,kBAAkB,CAgBrG"}
|