@intentius/chant 0.45.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/check-lexicon.d.ts +14 -0
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/lexicon-surface-diff.d.ts +6 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts +13 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/main.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/registry.d.ts +7 -0
- package/dist/cli/registry.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/codegen/lexicon-regen.d.ts +11 -0
- package/dist/codegen/lexicon-regen.d.ts.map +1 -1
- package/dist/codegen/validate.d.ts +10 -0
- package/dist/codegen/validate.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 +54 -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/env.d.ts +12 -1
- package/dist/env.d.ts.map +1 -1
- 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 +223 -2
- 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 +3 -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 +132 -0
- package/dist/lifecycle/teardown.d.ts.map +1 -0
- package/dist/lifecycle/unobserved-gate.d.ts +67 -0
- package/dist/lifecycle/unobserved-gate.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +6 -2
- package/dist/lint/engine.d.ts.map +1 -1
- 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/rule.d.ts +31 -0
- package/dist/lint/rule.d.ts.map +1 -1
- package/dist/lint/rules/cor021-env-literal-name.d.ts +3 -0
- package/dist/lint/rules/cor021-env-literal-name.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 +4 -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 +134 -8
- 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/testing.d.ts +136 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +9 -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 +211 -0
- package/src/cli/commands/build.ts +126 -8
- package/src/cli/commands/check-lexicon.test.ts +45 -1
- package/src/cli/commands/check-lexicon.ts +45 -0
- package/src/cli/commands/lexicon-surface-diff.ts +9 -0
- package/src/cli/commands/lexicon-surface-diff.update.test.ts +112 -0
- package/src/cli/commands/lint.ts +32 -7
- package/src/cli/handlers/explain.test.ts +70 -1
- package/src/cli/handlers/graph.ts +4 -4
- package/src/cli/handlers/lifecycle.test.ts +345 -1
- package/src/cli/handlers/lifecycle.ts +300 -11
- package/src/cli/handlers/search.ts +5 -2
- package/src/cli/main.ts +12 -1
- 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/registry.ts +7 -0
- package/src/cli/reporters/stylish.test.ts +154 -0
- package/src/cli/reporters/stylish.ts +154 -33
- package/src/codegen/lexicon-regen.ts +19 -1
- package/src/codegen/validate.test.ts +33 -0
- package/src/codegen/validate.ts +21 -2
- 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 +55 -0
- package/src/config.ts +88 -1
- 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/env.test.ts +35 -1
- package/src/env.ts +17 -3
- 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 +227 -2
- package/src/lifecycle/change-set.ts +46 -7
- package/src/lifecycle/index.ts +3 -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 +568 -0
- package/src/lifecycle/teardown.ts +359 -0
- package/src/lifecycle/unobserved-gate.test.ts +109 -0
- package/src/lifecycle/unobserved-gate.ts +102 -0
- package/src/lint/engine.ts +7 -1
- 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/rule.ts +23 -0
- package/src/lint/rules/cor021-env-literal-name.test.ts +128 -0
- package/src/lint/rules/cor021-env-literal-name.ts +114 -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 +10 -1
- package/src/okf-read.test.ts +149 -0
- package/src/okf-read.ts +197 -0
- package/src/op/builders.ts +179 -8
- 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/testing.test.ts +261 -0
- package/src/testing.ts +338 -0
- package/src/yaml.test.ts +88 -0
- package/src/yaml.ts +76 -6
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Teardown planning (#1222) — the enumeration half of
|
|
3
|
+
* `chant lifecycle teardown <env>`.
|
|
4
|
+
*
|
|
5
|
+
* Answers one question: which live resources carry THIS project's ownership
|
|
6
|
+
* marker for THIS environment? Selection is marker-scoped by construction —
|
|
7
|
+
* managed-by present, stack equal to the project's `ownership.stack`, env
|
|
8
|
+
* equal to the argument — so a foreign stack's resources, another env's
|
|
9
|
+
* resources, and unmarked resources are out of scope by shape, not by
|
|
10
|
+
* filtering discipline someone has to remember.
|
|
11
|
+
*
|
|
12
|
+
* Stateless: live markers only. No build, no snapshot, no ledger — the
|
|
13
|
+
* ownership record lives on the cloud resource (see ../ownership.ts), and this
|
|
14
|
+
* module reads it back from there.
|
|
15
|
+
*
|
|
16
|
+
* Two paths per lexicon:
|
|
17
|
+
* - the `teardownOwned` capability, where the lexicon enumerates its own
|
|
18
|
+
* would-delete set (and can use a read shaped for deletion — aws's
|
|
19
|
+
* stack-level path, k8s's prune selector);
|
|
20
|
+
* - a fallback over `describeResources` + the {@link ResourceMetadata.marker}
|
|
21
|
+
* field (#1222 PR 1), for lexicons that have not implemented the capability
|
|
22
|
+
* yet. Best-effort: a lexicon whose thin read only resolves declared names
|
|
23
|
+
* returns nothing here, which the plan reports as a skip, not as clean.
|
|
24
|
+
*
|
|
25
|
+
* Whichever path ran, core re-checks every candidate's marker and drops
|
|
26
|
+
* mismatches — an implementation bug can narrow the set, never widen it.
|
|
27
|
+
*
|
|
28
|
+
* The execution half is {@link executeTeardown}: it drives each lexicon's
|
|
29
|
+
* `executeTeardown` capability over the planned set, then runs one bounded
|
|
30
|
+
* retry pass over the failures. Both halves are exported as functions —
|
|
31
|
+
* #1224's test-env harness calls them in-process, not only through the verb.
|
|
32
|
+
*/
|
|
33
|
+
import type { ObservationLexicon, TeardownCandidate, TeardownHole } from "../lexicon.js";
|
|
34
|
+
/** One would-delete row in a teardown plan, attributed to its lexicon. */
|
|
35
|
+
export interface TeardownPlanEntry extends TeardownCandidate {
|
|
36
|
+
lexicon: string;
|
|
37
|
+
}
|
|
38
|
+
/** One hole in a teardown plan (#1089), attributed to its lexicon. */
|
|
39
|
+
export interface TeardownPlanHole extends TeardownHole {
|
|
40
|
+
lexicon: string;
|
|
41
|
+
}
|
|
42
|
+
/** The plan `chant lifecycle teardown <env>` prints and #1224 consumes. */
|
|
43
|
+
export interface TeardownPlan {
|
|
44
|
+
environment: string;
|
|
45
|
+
/** The project's ownership stack — the identity everything was selected on. */
|
|
46
|
+
stack: string;
|
|
47
|
+
/** The would-delete set. Every entry's marker equals `{ stack, env: environment }`. */
|
|
48
|
+
entries: TeardownPlanEntry[];
|
|
49
|
+
/** What could not be read (#1089). A plan with holes is incomplete, not clean. */
|
|
50
|
+
holes: TeardownPlanHole[];
|
|
51
|
+
/**
|
|
52
|
+
* Lexicons that took part in neither path — no `teardownOwned`, no
|
|
53
|
+
* `describeResources`. Reported so "nothing to delete" can never quietly
|
|
54
|
+
* mean "nobody looked".
|
|
55
|
+
*/
|
|
56
|
+
skipped: string[];
|
|
57
|
+
}
|
|
58
|
+
export interface PlanTeardownOptions {
|
|
59
|
+
/** The environment being torn down — the marker env to select on. */
|
|
60
|
+
environment: string;
|
|
61
|
+
/** This project's ownership stack (`ownership.stack` in chant.config). */
|
|
62
|
+
stack: string;
|
|
63
|
+
plugins: ObservationLexicon[];
|
|
64
|
+
/** Deployed stack name, for a multi-stack project. */
|
|
65
|
+
deployedStack?: string;
|
|
66
|
+
/** Region that stack is deployed in. */
|
|
67
|
+
region?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Every deployed stack a multi-stack project declares (`stacks` in
|
|
70
|
+
* chant.config), for a lexicon whose teardown is stack-shaped (aws
|
|
71
|
+
* enumerates and deletes whole stacks). Forwarded to `teardownOwned` /
|
|
72
|
+
* `executeTeardown` as `stacks`.
|
|
73
|
+
*/
|
|
74
|
+
deployedStacks?: Array<{
|
|
75
|
+
name: string;
|
|
76
|
+
region?: string;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Enumerate what `chant lifecycle teardown <env>` would delete. Read-only —
|
|
81
|
+
* this function never deletes and never will; execution composes on top of the
|
|
82
|
+
* plan it returns.
|
|
83
|
+
*/
|
|
84
|
+
export declare function planTeardown(opts: PlanTeardownOptions): Promise<TeardownPlan>;
|
|
85
|
+
/** One planned entry's fate after execution, attributed to its lexicon. */
|
|
86
|
+
export interface TeardownOutcomeEntry extends TeardownPlanEntry {
|
|
87
|
+
/**
|
|
88
|
+
* `skipped` is core's verdict for a candidate whose lexicon implements no
|
|
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.
|
|
93
|
+
*/
|
|
94
|
+
outcome: "deleted" | "failed" | "not-prunable" | "retained" | "skipped";
|
|
95
|
+
/** The error for `failed`, the reason for `not-prunable`/`retained`/`skipped`. */
|
|
96
|
+
detail?: string;
|
|
97
|
+
/** True when this final outcome came from the bounded retry pass. */
|
|
98
|
+
retried?: boolean;
|
|
99
|
+
}
|
|
100
|
+
/** What `chant lifecycle teardown <env> --yes` prints and #1224 consumes. */
|
|
101
|
+
export interface TeardownReport {
|
|
102
|
+
environment: string;
|
|
103
|
+
stack: string;
|
|
104
|
+
/** The plan that was executed — holes and skipped lexicons included. */
|
|
105
|
+
plan: TeardownPlan;
|
|
106
|
+
/** One row per planned entry. Never fewer: silence is never success. */
|
|
107
|
+
outcomes: TeardownOutcomeEntry[];
|
|
108
|
+
/** Lexicons whose candidates were skipped for lack of an `executeTeardown`. */
|
|
109
|
+
unimplemented: string[];
|
|
110
|
+
}
|
|
111
|
+
export interface ExecuteTeardownOptions extends PlanTeardownOptions {
|
|
112
|
+
/**
|
|
113
|
+
* A plan already computed (the one just shown to the user). Recomputed from
|
|
114
|
+
* a fresh live read when omitted.
|
|
115
|
+
*/
|
|
116
|
+
plan?: TeardownPlan;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Execute a teardown: delete every planned candidate through its lexicon's
|
|
120
|
+
* `executeTeardown`, then retry the failures once. Per-lexicon ordering only —
|
|
121
|
+
* each lexicon deletes its own set in the order its target requires (k8s
|
|
122
|
+
* deletes namespaces last, fly deletes apps last); there is no global
|
|
123
|
+
* reverse-dependency ordering in v1, the bounded retry pass covers the
|
|
124
|
+
* cross-lexicon cases it would.
|
|
125
|
+
*
|
|
126
|
+
* Every planned entry comes back with an outcome. A lexicon that enumerates
|
|
127
|
+
* but implements no execution reports its candidates as `skipped` — loudly,
|
|
128
|
+
* never as clean. Failures that survive the retry stay `failed` in the
|
|
129
|
+
* report; nothing here ever swallows one.
|
|
130
|
+
*/
|
|
131
|
+
export declare function executeTeardown(opts: ExecuteTeardownOptions): Promise<TeardownReport>;
|
|
132
|
+
//# sourceMappingURL=teardown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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;;;;;;OAMG;IACH,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;IACxE,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,YAAY,CAAC;IACnB,wEAAwE;IACxE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,+EAA+E;IAC/E,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAkDD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,CAwE3F"}
|
|
@@ -0,0 +1,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"}
|
package/dist/lint/engine.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LintRule, LintDiagnostic } from "./rule.js";
|
|
1
|
+
import type { LintRule, LintDiagnostic, LintProjectConfig } from "./rule.js";
|
|
2
2
|
import type { IntrinsicDef } from "../lexicon.js";
|
|
3
3
|
/**
|
|
4
4
|
* Result of a lint run, separating active diagnostics from suppressed ones.
|
|
@@ -48,7 +48,11 @@ export declare function parseDisableComments(content: string): DisableDirective[
|
|
|
48
48
|
* `IntrinsicDef[]` into the fold path since #1039/#1105. Optional and
|
|
49
49
|
* defaulting to none, so a caller that hasn't resolved a project's
|
|
50
50
|
* lexicons (a unit test, `bench.test.ts`) is unaffected.
|
|
51
|
+
* @param projectConfig - chant #1221 — the project's config slice for
|
|
52
|
+
* config-aware rules (COR021 reads `environments` + `ownership`), put on
|
|
53
|
+
* every file's `LintContext.projectConfig`. Optional; without it those
|
|
54
|
+
* rules stay silent.
|
|
51
55
|
* @returns LintRunResult with diagnostics and suppressed items
|
|
52
56
|
*/
|
|
53
|
-
export declare function runLint(files: string[], rules: LintRule[], ruleOptions?: Map<string, Record<string, unknown>>, intrinsics?: readonly IntrinsicDef[]): Promise<LintRunResult>;
|
|
57
|
+
export declare function runLint(files: string[], rules: LintRule[], ruleOptions?: Map<string, Record<string, unknown>>, intrinsics?: readonly IntrinsicDef[], projectConfig?: LintProjectConfig): Promise<LintRunResult>;
|
|
54
58
|
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/lint/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAe,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/lint/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAe,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,mFAAmF;IACnF,UAAU,EAAE,KAAK,CAAC,cAAc,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IACpC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAyCxE;AAgDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,OAAO,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,EAAE,QAAQ,EAAE,EACjB,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAClD,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,EACpC,aAAa,CAAC,EAAE,iBAAiB,GAChC,OAAO,CAAC,aAAa,CAAC,CAuDxB"}
|
|
@@ -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,"file":"pipeline-change-gate.d.ts","sourceRoot":"","sources":["../../src/lint/pipeline-change-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAczD,gFAAgF;AAChF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAClE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAErE,MAAM,WAAW,4BAA4B;IAC3C,0CAA0C;IAC1C,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAED,oNAAoN;AACpN,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,CAGlE;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,SAAS,EACpB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,GAC1C,4BAA4B,CAc9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,KAAK,EAAE,SAAS,EAChB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,GAC1C,4BAA4B,CAe9B;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,wBAAwB,GAAG,eAAe,GAAG,cAAc,CAAC;AAExE,MAAM,WAAW,yBAA0B,SAAQ,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,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAChD,8CAA8C;IAC9C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,WAAW,EAAE;QACX,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;QAChD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACjD,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAE1E;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,QAAQ,EAAE,QA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E,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"}
|
package/dist/lint/rule.d.ts
CHANGED
|
@@ -44,6 +44,29 @@ export interface LintDiagnostic {
|
|
|
44
44
|
/** Optional fix that can be applied */
|
|
45
45
|
fix?: LintFix;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* The slice of the project's `chant.config` a config-aware rule reads
|
|
49
|
+
* (#1221) — threaded into {@link LintContext} by `runLint` when the caller
|
|
50
|
+
* resolved the project's config (`chant lint` does; a bare unit test or the
|
|
51
|
+
* LSP's single-file lint may not). Structurally mirrors the corresponding
|
|
52
|
+
* `ChantConfig` fields (../config.ts) without importing them, so `rule.ts`
|
|
53
|
+
* stays dependency-light for lexicon rule authors.
|
|
54
|
+
*/
|
|
55
|
+
export interface LintProjectConfig {
|
|
56
|
+
/** Declared environments — a bare name or `{ name, endpoint }` (#1166). */
|
|
57
|
+
environments?: Array<string | {
|
|
58
|
+
name: string;
|
|
59
|
+
endpoint?: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** Ownership marking config — `env` is a literal or a build-parameter reference (#1396). */
|
|
62
|
+
ownership?: {
|
|
63
|
+
stack?: string;
|
|
64
|
+
env?: string | {
|
|
65
|
+
param: string;
|
|
66
|
+
};
|
|
67
|
+
enabled?: boolean;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
47
70
|
/**
|
|
48
71
|
* Context provided to lint rules during checking
|
|
49
72
|
*/
|
|
@@ -69,6 +92,14 @@ export interface LintContext {
|
|
|
69
92
|
* call is a violation.
|
|
70
93
|
*/
|
|
71
94
|
intrinsics?: readonly IntrinsicDef[];
|
|
95
|
+
/**
|
|
96
|
+
* chant #1221 — the project's resolved config slice for config-aware rules
|
|
97
|
+
* (COR021 reads `environments` + `ownership`). Threaded from `runLint`;
|
|
98
|
+
* undefined when the caller never loaded a project config (a unit test
|
|
99
|
+
* constructing a context directly, the LSP's single-file path), in which
|
|
100
|
+
* case config-aware rules stay silent.
|
|
101
|
+
*/
|
|
102
|
+
projectConfig?: LintProjectConfig;
|
|
72
103
|
}
|
|
73
104
|
/**
|
|
74
105
|
* Configuration value for a rule: either a severity string or a [severity, options] tuple
|
package/dist/lint/rule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/lint/rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,gDAAgD;IAChD,KAAK,EAAE,CAAC,MAAM,EAAE,MA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lint/rules/cor021-env-literal-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAkD,MAAM,SAAS,CAAC;AAmGxF,eAAO,MAAM,wBAAwB,EAAE,QAatC,CAAC"}
|
|
@@ -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"}
|
|
@@ -23,9 +23,12 @@ export { evl009CompositeNoConstantRule } from "./evl009-composite-no-constant.js
|
|
|
23
23
|
export { evl010CompositeNoTransformRule } from "./evl010-composite-no-transform.js";
|
|
24
24
|
export { cor017CompositeNameMatchRule } from "./cor017-composite-name-match.js";
|
|
25
25
|
export { cor018CompositePreferLexiconTypeRule } from "./cor018-composite-prefer-lexicon-type.js";
|
|
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";
|
|
26
29
|
export { isInsideCompositeFactory } from "./composite-scope.js";
|
|
27
30
|
/**
|
|
28
|
-
* Load all
|
|
31
|
+
* Load all 24 core lint rules (COR + EVL).
|
|
29
32
|
*/
|
|
30
33
|
export declare function loadCoreRules(): LintRule[];
|
|
31
34
|
//# sourceMappingUR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