@intentius/chant 0.46.0 → 0.50.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/catalog.d.ts +13 -3
- package/dist/audit/catalog.d.ts.map +1 -1
- package/dist/audit/core.d.ts +30 -3
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts +9 -2
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/fetch.d.ts.map +1 -1
- package/dist/audit/report-html.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +6 -0
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/report.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/audit/secrets.d.ts +95 -0
- package/dist/audit/secrets.d.ts.map +1 -0
- package/dist/audit/wrangler.d.ts +33 -0
- package/dist/audit/wrangler.d.ts.map +1 -0
- package/dist/build.d.ts +3 -3
- package/dist/build.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts +7 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts +23 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts +31 -0
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts +12 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +32 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -0
- package/dist/cli/handlers/scenario.d.ts +39 -0
- package/dist/cli/handlers/scenario.d.ts.map +1 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/server.d.ts +35 -2
- package/dist/cli/mcp/server.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/mcp/types.d.ts +29 -1
- package/dist/cli/mcp/types.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 +14 -2
- 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/docs-rule-scanning.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/capability.d.ts +17 -2
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +7 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +15 -0
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/driver.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 +13 -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/run-agent.d.ts +499 -0
- package/dist/components/verbs/run-agent.d.ts.map +1 -0
- package/dist/components/verbs/sign.d.ts +30 -0
- package/dist/components/verbs/sign.d.ts.map +1 -1
- package/dist/components/verbs/wrangler.d.ts +108 -0
- package/dist/components/verbs/wrangler.d.ts.map +1 -0
- package/dist/composite.d.ts +6 -1
- package/dist/composite.d.ts.map +1 -1
- 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/discovery/collect.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +15 -1
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/fold-rank.d.ts +66 -0
- package/dist/discovery/fold-rank.d.ts.map +1 -0
- package/dist/discovery/index.d.ts +15 -0
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +17 -0
- package/dist/discovery/param-deps.d.ts.map +1 -0
- package/dist/effect-receipt.d.ts +177 -0
- package/dist/effect-receipt.d.ts.map +1 -0
- package/dist/fold/fold.d.ts +55 -2
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/fold/subset.d.ts +20 -0
- 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-schema.d.ts +2 -0
- package/dist/lexicon-schema.d.ts.map +1 -1
- package/dist/lexicon.d.ts +137 -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/converge-ledger.d.ts +90 -0
- package/dist/lifecycle/converge-ledger.d.ts.map +1 -0
- package/dist/lifecycle/deep-diff.d.ts +18 -0
- package/dist/lifecycle/deep-diff.d.ts.map +1 -1
- package/dist/lifecycle/deep-observe.d.ts +9 -1
- package/dist/lifecycle/deep-observe.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +33 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +145 -21
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +6 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/lease.d.ts +113 -0
- package/dist/lifecycle/lease.d.ts.map +1 -0
- 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/scenario-eval.d.ts +42 -0
- package/dist/lifecycle/scenario-eval.d.ts.map +1 -0
- package/dist/lifecycle/scenario.d.ts +163 -0
- package/dist/lifecycle/scenario.d.ts.map +1 -0
- package/dist/lifecycle/symptoms.d.ts +63 -0
- package/dist/lifecycle/symptoms.d.ts.map +1 -0
- 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/output-docs.d.ts +94 -0
- package/dist/lint/output-docs.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 +41 -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/__fixtures__/comp/comp003/pass/agent-turn.component.d.ts +11 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.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/lsp/lexicon-providers.d.ts +7 -0
- package/dist/lsp/lexicon-providers.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/activity-contract.d.ts +139 -0
- package/dist/op/activity-contract.d.ts.map +1 -0
- package/dist/op/builders.d.ts +140 -3
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/converge-rule.d.ts +161 -0
- package/dist/op/converge-rule.d.ts.map +1 -0
- package/dist/op/generate-pipeline.d.ts +39 -0
- package/dist/op/generate-pipeline.d.ts.map +1 -0
- package/dist/op/index.d.ts +18 -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/op-verb-class.d.ts +42 -0
- package/dist/op/op-verb-class.d.ts.map +1 -0
- package/dist/op/operator.d.ts +128 -0
- package/dist/op/operator.d.ts.map +1 -0
- package/dist/op/receipt-store.d.ts +138 -0
- package/dist/op/receipt-store.d.ts.map +1 -0
- package/dist/op/step-output-ref.d.ts +187 -0
- package/dist/op/step-output-ref.d.ts.map +1 -0
- package/dist/op/types.d.ts +49 -2
- package/dist/op/types.d.ts.map +1 -1
- package/dist/provenance.d.ts +73 -3
- package/dist/provenance.d.ts.map +1 -1
- package/dist/runtime-adapter.d.ts +7 -1
- package/dist/runtime-adapter.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 +29 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/toml.d.ts +40 -5
- package/dist/toml.d.ts.map +1 -1
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/audit/catalog.test.ts +1 -1
- package/src/audit/catalog.ts +75 -3
- 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 +40 -4
- package/src/audit/fetch.test.ts +216 -3
- package/src/audit/fetch.ts +270 -59
- package/src/audit/report-html.ts +5 -2
- package/src/audit/report-model.ts +9 -0
- package/src/audit/report.test.ts +22 -0
- package/src/audit/report.ts +3 -2
- package/src/audit/rules-doc.ts +13 -1
- package/src/audit/secrets.test.ts +303 -0
- package/src/audit/secrets.ts +406 -0
- package/src/audit/wrangler.test.ts +230 -0
- package/src/audit/wrangler.ts +290 -0
- package/src/build.test.ts +41 -0
- package/src/build.ts +39 -6
- package/src/cli/command-group.ts +1 -1
- 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/__fixtures__/schemas/sarif-2.1.0.schema.json +2882 -0
- package/src/cli/commands/audit.test.ts +268 -1
- package/src/cli/commands/audit.ts +87 -18
- package/src/cli/commands/build.test.ts +245 -0
- package/src/cli/commands/build.ts +210 -21
- package/src/cli/commands/lint.ts +15 -3
- package/src/cli/handlers/build.ts +2 -0
- package/src/cli/handlers/components.test.ts +199 -1
- package/src/cli/handlers/components.ts +160 -3
- package/src/cli/handlers/explain.test.ts +70 -1
- package/src/cli/handlers/graph.test.ts +20 -0
- package/src/cli/handlers/graph.ts +12 -3
- package/src/cli/handlers/lifecycle.test.ts +115 -1
- package/src/cli/handlers/lifecycle.ts +96 -15
- package/src/cli/handlers/operator.test.ts +255 -0
- package/src/cli/handlers/operator.ts +240 -0
- package/src/cli/handlers/scenario.test.ts +456 -0
- package/src/cli/handlers/scenario.ts +330 -0
- package/src/cli/main.test.ts +23 -0
- package/src/cli/main.ts +72 -1
- package/src/cli/mcp/resource-handlers.ts +38 -1
- package/src/cli/mcp/server.test.ts +323 -3
- package/src/cli/mcp/server.ts +84 -7
- package/src/cli/mcp/tools/explain.ts +51 -2
- package/src/cli/mcp/types.ts +27 -1
- package/src/cli/plugins.ts +4 -2
- package/src/cli/registry.ts +14 -2
- package/src/cli/reporters/stylish.test.ts +154 -0
- package/src/cli/reporters/stylish.ts +154 -33
- package/src/codegen/docs-rule-scanning.test.ts +42 -0
- package/src/codegen/docs-rule-scanning.ts +25 -2
- package/src/components/README.md +7 -0
- package/src/components/auto-release.ts +6 -0
- package/src/components/capability.ts +17 -2
- package/src/components/cli-support.test.ts +17 -0
- package/src/components/cli-support.ts +13 -1
- package/src/components/component-schema.test.ts +32 -0
- package/src/components/component.schema.json +6 -0
- package/src/components/component.test.ts +21 -0
- package/src/components/component.ts +15 -0
- package/src/components/driver.ts +12 -4
- 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 +13 -0
- package/src/components/verbs/r2-sync.test.ts +107 -0
- package/src/components/verbs/r2-sync.ts +124 -0
- package/src/components/verbs/run-agent.test.ts +683 -0
- package/src/components/verbs/run-agent.ts +786 -0
- package/src/components/verbs/sign.test.ts +19 -0
- package/src/components/verbs/sign.ts +34 -2
- package/src/components/verbs/wrangler.test.ts +170 -0
- package/src/components/verbs/wrangler.ts +241 -0
- package/src/composite.ts +31 -2
- 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/discovery/collect.ts +11 -2
- package/src/discovery/fold-import.test.ts +54 -0
- package/src/discovery/fold-import.ts +178 -38
- package/src/discovery/fold-rank.test.ts +197 -0
- package/src/discovery/fold-rank.ts +346 -0
- package/src/discovery/index.ts +16 -1
- package/src/discovery/param-deps.test.ts +118 -0
- package/src/discovery/param-deps.ts +170 -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/fold.test.ts +6 -2
- package/src/fold/fold.ts +184 -3
- package/src/fold/subset.test.ts +95 -6
- package/src/fold/subset.ts +66 -2
- package/src/index.ts +4 -0
- package/src/lexicon-schema.ts +3 -0
- package/src/lexicon.ts +151 -5
- package/src/lifecycle/change-set.ts +46 -7
- package/src/lifecycle/converge-ledger.test.ts +199 -0
- package/src/lifecycle/converge-ledger.ts +179 -0
- package/src/lifecycle/deep-diff.test.ts +79 -1
- package/src/lifecycle/deep-diff.ts +23 -0
- package/src/lifecycle/deep-observe.ts +13 -2
- package/src/lifecycle/gate-ledger.test.ts +103 -0
- package/src/lifecycle/gate-ledger.ts +140 -0
- package/src/lifecycle/git.test.ts +430 -0
- package/src/lifecycle/git.ts +446 -84
- package/src/lifecycle/index.ts +6 -0
- package/src/lifecycle/lease.test.ts +343 -0
- package/src/lifecycle/lease.ts +270 -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/scenario-eval.test.ts +199 -0
- package/src/lifecycle/scenario-eval.ts +158 -0
- package/src/lifecycle/scenario.test.ts +195 -0
- package/src/lifecycle/scenario.ts +321 -0
- package/src/lifecycle/symptoms.test.ts +116 -0
- package/src/lifecycle/symptoms.ts +126 -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/output-docs.test.ts +220 -0
- package/src/lint/output-docs.ts +204 -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.test.ts +97 -0
- package/src/lint/post-synth.ts +60 -0
- package/src/lint/receipt-checks.test.ts +101 -0
- package/src/lint/receipt-checks.ts +93 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.ts +26 -0
- package/src/lint/rules/comp/comp.test.ts +49 -1
- 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 +35 -3
- package/src/lint/rules/evl001-non-literal-expression.ts +7 -0
- package/src/lint/rules/index.ts +7 -1
- package/src/lsp/lexicon-providers.test.ts +44 -0
- package/src/lsp/lexicon-providers.ts +11 -1
- package/src/okf-read.test.ts +149 -0
- package/src/okf-read.ts +197 -0
- package/src/op/activity-contract.test.ts +180 -0
- package/src/op/activity-contract.ts +278 -0
- package/src/op/builders-exports.test.ts +17 -1
- package/src/op/builders.ts +198 -6
- package/src/op/converge-rule.test.ts +179 -0
- package/src/op/converge-rule.ts +311 -0
- package/src/op/effect-step.test.ts +311 -0
- package/src/op/generate-pipeline.test.ts +53 -0
- package/src/op/generate-pipeline.ts +99 -0
- package/src/op/index.ts +40 -3
- package/src/op/local-executor.test.ts +92 -0
- package/src/op/local-executor.ts +212 -29
- package/src/op/op-verb-class.test.ts +126 -0
- package/src/op/op-verb-class.ts +115 -0
- package/src/op/op.test.ts +25 -2
- package/src/op/operator.test.ts +346 -0
- package/src/op/operator.ts +213 -0
- package/src/op/receipt-store.ts +211 -0
- package/src/op/step-output-ref.test.ts +334 -0
- package/src/op/step-output-ref.ts +453 -0
- package/src/op/types.ts +51 -2
- package/src/provenance.test.ts +151 -4
- package/src/provenance.ts +118 -4
- package/src/runtime-adapter.ts +31 -10
- 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 +30 -0
- package/src/toml.test.ts +157 -384
- package/src/toml.ts +371 -5
- package/src/yaml.test.ts +88 -0
- package/src/yaml.ts +76 -6
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Effect receipts (chant #1831, epic #1703).
|
|
3
|
+
*
|
|
4
|
+
* A RECEIPT is the declared witness that an out-of-band effect (a migration,
|
|
5
|
+
* a seed job, a one-shot bootstrap) has run — declared, diffed, and observed
|
|
6
|
+
* like any resource, but observe-only to the generic apply path: the
|
|
7
|
+
* `effect()` step (#1834) is the sole writer, on success, last. Anything
|
|
8
|
+
* else silently converts at-least-once into never (epic decision log, item
|
|
9
|
+
* 3). That write-exclusion is #1832's enforcement; what THIS module provides
|
|
10
|
+
* is the recognition marker that makes it possible: core code (lint, plan,
|
|
11
|
+
* apply) identifies receipts via {@link EFFECT_RECEIPT_MARKER} without any
|
|
12
|
+
* lexicon knowledge, while per-lexicon rows (#1835's `AWS::SSM::Parameter`)
|
|
13
|
+
* materialize them as real resources. Unlike a secret provenance declaration
|
|
14
|
+
* (./secret-provenance.ts), a receipt DOES serialize — the marker identifies,
|
|
15
|
+
* it does not exclude.
|
|
16
|
+
*
|
|
17
|
+
* The resolution split (epic decision log, item 5):
|
|
18
|
+
*
|
|
19
|
+
* - STATIC inputs hash at synthesis, in the serializer — a fully static
|
|
20
|
+
* receipt's expectation is already known when the template is written
|
|
21
|
+
* ({@link receiptExpectation}).
|
|
22
|
+
* - REFERENCE inputs (attr-refs and other intrinsics — deploy-time values)
|
|
23
|
+
* are recorded in placeholder form at synthesis and resolve in the plan
|
|
24
|
+
* engine (#1832) and again in the effect step (#1834), via
|
|
25
|
+
* {@link resolveReceiptExpectation}. Synthesis resolves NOTHING:
|
|
26
|
+
* {@link receiptExpectation} refuses a hash-flavor receipt that still
|
|
27
|
+
* carries references rather than hashing a placeholder.
|
|
28
|
+
* - Build-time `params.*` are not references here: they fold to literals
|
|
29
|
+
* before discovery ever runs (../params.ts), so by the time this factory
|
|
30
|
+
* sees them they are static.
|
|
31
|
+
*
|
|
32
|
+
* Nothing in this module reads live state. Every function is pure over the
|
|
33
|
+
* declaration and, for resolution, the caller-supplied resolver.
|
|
34
|
+
*
|
|
35
|
+
* Hashing is JCS-style canonical JSON (RFC 8785 shape: sorted keys, standard
|
|
36
|
+
* ECMAScript number/string encoding — implemented minimally here, no
|
|
37
|
+
* dependency) digested with sha256 ({@link canonicalJson},
|
|
38
|
+
* `sha256:<hex>` like the build-ledger digests in ./lifecycle/build-ledger.ts).
|
|
39
|
+
*/
|
|
40
|
+
import { type Declarable } from "./declarable.js";
|
|
41
|
+
import { type Intrinsic } from "./intrinsic.js";
|
|
42
|
+
/** The closed union of receipt flavors. */
|
|
43
|
+
export type EffectReceiptFlavor = "existence" | "hash";
|
|
44
|
+
/** Every receipt flavor, for exhaustiveness checks. */
|
|
45
|
+
export declare const EFFECT_RECEIPT_FLAVORS: readonly EffectReceiptFlavor[];
|
|
46
|
+
/** Marker symbol identifying an effect receipt. `Symbol.for` so it survives
|
|
47
|
+
* the entity-wire codec (./discovery/entity-wire-codec.ts) and so a lexicon
|
|
48
|
+
* row can stamp the SAME symbol on its materialized resource — core's lint
|
|
49
|
+
* (#1833), plan (#1832), and apply write-exclusion recognize receipts through
|
|
50
|
+
* this marker alone, lexicon-independently. */
|
|
51
|
+
export declare const EFFECT_RECEIPT_MARKER: unique symbol;
|
|
52
|
+
/** The `entityType` the core factory stamps. Lexicon materialization rows
|
|
53
|
+
* (#1835) use their own entityType and carry the marker instead. */
|
|
54
|
+
export declare const EFFECT_RECEIPT_ENTITY_TYPE = "Chant::EffectReceipt";
|
|
55
|
+
/**
|
|
56
|
+
* The expected stored value of an `existence`-flavor receipt: a fixed marker
|
|
57
|
+
* constant, the same for every existence receipt. Present-and-equal means the
|
|
58
|
+
* effect has run; anything else renders an effect-will-fire row (#1832).
|
|
59
|
+
*/
|
|
60
|
+
export declare const EXISTENCE_EXPECTATION = "chant.effect-receipt:exists";
|
|
61
|
+
/**
|
|
62
|
+
* An effect receipt declaration — a Declarable, so discovery collects it,
|
|
63
|
+
* `chant list` shows it, and (unlike a secret declaration) serialization
|
|
64
|
+
* keeps it: a lexicon row turns it into a real, observable resource.
|
|
65
|
+
*/
|
|
66
|
+
export interface EffectReceiptDeclaration extends Declarable {
|
|
67
|
+
readonly [EFFECT_RECEIPT_MARKER]: true;
|
|
68
|
+
/** `"chant"` for the plain factory; a lexicon row (#1835) declares its own. */
|
|
69
|
+
readonly lexicon: string;
|
|
70
|
+
/** The core factory stamps EFFECT_RECEIPT_ENTITY_TYPE; a lexicon row uses its materialized kind. */
|
|
71
|
+
readonly entityType: string;
|
|
72
|
+
/** The receipt's own name (the export-level identity of the witness). */
|
|
73
|
+
readonly name: string;
|
|
74
|
+
/** The effect this receipt witnesses — the identity the `effect()` step
|
|
75
|
+
* (#1834) and the receipt path (#1835) key on. */
|
|
76
|
+
readonly effect: string;
|
|
77
|
+
/** How the receipt is compared: mere presence, or a digest of the inputs. */
|
|
78
|
+
readonly flavor: EffectReceiptFlavor;
|
|
79
|
+
/**
|
|
80
|
+
* The effect's inputs as recorded at synthesis: static values verbatim,
|
|
81
|
+
* references (intrinsics) kept in placeholder form — never resolved here.
|
|
82
|
+
*/
|
|
83
|
+
readonly inputs: Readonly<Record<string, unknown>>;
|
|
84
|
+
}
|
|
85
|
+
/** Factory options for {@link EffectReceipt}. */
|
|
86
|
+
export interface EffectReceiptOptions {
|
|
87
|
+
/** The effect this receipt witnesses. Non-empty. */
|
|
88
|
+
readonly effect: string;
|
|
89
|
+
/** `existence` — presence is the witness; `hash` — a digest of the inputs
|
|
90
|
+
* is, so changed inputs re-propose the fire. */
|
|
91
|
+
readonly flavor: EffectReceiptFlavor;
|
|
92
|
+
/** The effect's inputs. Static values hash at synthesis; intrinsic values
|
|
93
|
+
* (attr-refs, deploy-time references) resolve at plan and at run. */
|
|
94
|
+
readonly inputs?: Record<string, unknown>;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Declare an effect receipt. The returned object is a locked Declarable:
|
|
98
|
+
* declared fields are immutable, plain-data input structures are frozen
|
|
99
|
+
* (intrinsics are left live — discovery still stamps logical names onto
|
|
100
|
+
* attr-refs), and the top-level object stays extensible for discovery's own
|
|
101
|
+
* symbol-keyed metadata.
|
|
102
|
+
*/
|
|
103
|
+
export declare function EffectReceipt(name: string, options: EffectReceiptOptions): EffectReceiptDeclaration;
|
|
104
|
+
/** Type guard for an effect receipt — the recognition read core's guards use.
|
|
105
|
+
* True for the core declaration AND for any lexicon-materialized resource
|
|
106
|
+
* that carries the marker. */
|
|
107
|
+
export declare function isEffectReceipt(value: unknown): value is EffectReceiptDeclaration;
|
|
108
|
+
/**
|
|
109
|
+
* Extract the effect receipts from a discovered entity map — the read surface
|
|
110
|
+
* for lint (#1833), the plan engine (#1832), and the apply write-exclusion.
|
|
111
|
+
* Keyed by entity name (export name), the same key `DiscoveryResult.entities`
|
|
112
|
+
* uses.
|
|
113
|
+
*/
|
|
114
|
+
export declare function collectEffectReceipts(entities: ReadonlyMap<string, Declarable>): Map<string, EffectReceiptDeclaration>;
|
|
115
|
+
/**
|
|
116
|
+
* Split an entity map into the apply-bound set and the receipts (#1832).
|
|
117
|
+
*
|
|
118
|
+
* The write-exclusion seam: receipts are observe-only to the generic apply
|
|
119
|
+
* path — the `effect()` step is the sole writer (epic #1703, decision 3), and
|
|
120
|
+
* a receipt the generic apply stamped would silently convert at-least-once
|
|
121
|
+
* into never. The build calls this at serializer-input assembly, the one core
|
|
122
|
+
* choke point every applier's input flows through (appliers consume serialized
|
|
123
|
+
* build outputs), so no lexicon's serialized apply document ever contains a
|
|
124
|
+
* receipt and no applier's desired or prune set can. Receipts still reach the
|
|
125
|
+
* serializer — for visibility rendering outside the apply-bound document
|
|
126
|
+
* (#1835) — via `SerializeContext.receipts`, never in the entity map.
|
|
127
|
+
*/
|
|
128
|
+
export declare function splitReceiptEntities(entities: ReadonlyMap<string, Declarable>): {
|
|
129
|
+
applyBound: Map<string, Declarable>;
|
|
130
|
+
receipts: Map<string, EffectReceiptDeclaration>;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* JCS-style canonical JSON (the RFC 8785 shape, implemented minimally):
|
|
134
|
+
* object keys sorted by UTF-16 code units, numbers and strings in standard
|
|
135
|
+
* ECMAScript `JSON.stringify` encoding, no insignificant whitespace.
|
|
136
|
+
* `toJSON()` is honored the way `JSON.stringify` honors it — which is what
|
|
137
|
+
* puts an intrinsic's PLACEHOLDER envelope (e.g. an attr-ref's
|
|
138
|
+
* `{"__attrRef":{...}}`) into the canonical form rather than a resolved
|
|
139
|
+
* value. Non-representable values (undefined outside an object property,
|
|
140
|
+
* functions, symbols, bigints, non-finite numbers, cycles) throw — a hash
|
|
141
|
+
* input silently coerced is a wrong expectation.
|
|
142
|
+
*/
|
|
143
|
+
export declare function canonicalJson(value: unknown): string;
|
|
144
|
+
/** The paths (dot/bracket, rooted at `inputs`) of every reference (intrinsic)
|
|
145
|
+
* input still unresolved on the receipt. Empty means the receipt is fully
|
|
146
|
+
* static and {@link receiptExpectation} can stamp its digest at synthesis. */
|
|
147
|
+
export declare function referenceInputPaths(receipt: EffectReceiptDeclaration): string[];
|
|
148
|
+
/**
|
|
149
|
+
* The receipt's expected stored value, computable at synthesis:
|
|
150
|
+
*
|
|
151
|
+
* - `existence` → {@link EXISTENCE_EXPECTATION}, always.
|
|
152
|
+
* - `hash` → `sha256:<hex>` over the canonical JSON of
|
|
153
|
+
* `{ effect, inputs }` — the effect name is bound into the digest so the
|
|
154
|
+
* same inputs under a different effect never collide.
|
|
155
|
+
*
|
|
156
|
+
* A hash-flavor receipt that still carries reference inputs THROWS instead
|
|
157
|
+
* of hashing placeholders: synthesis resolves nothing (epic decision log,
|
|
158
|
+
* item 5). The plan engine and the effect step get the digest through
|
|
159
|
+
* {@link resolveReceiptExpectation}.
|
|
160
|
+
*/
|
|
161
|
+
export declare function receiptExpectation(receipt: EffectReceiptDeclaration): string;
|
|
162
|
+
/**
|
|
163
|
+
* Resolves one reference input to its live value. `path` is the reference's
|
|
164
|
+
* location (as {@link referenceInputPaths} renders it). Must return a
|
|
165
|
+
* JSON-representable value — returning `undefined` or another intrinsic is
|
|
166
|
+
* an error, reported with the path.
|
|
167
|
+
*/
|
|
168
|
+
export type ReceiptInputResolver = (ref: Intrinsic, path: string) => unknown;
|
|
169
|
+
/**
|
|
170
|
+
* The receipt's expected stored value with references resolved — the form
|
|
171
|
+
* the plan engine (#1832) compares against the live receipt and the effect
|
|
172
|
+
* step (#1834) writes on success. Deterministic over the receipt and the
|
|
173
|
+
* resolver's answers; resolves nothing itself and reads no live state (the
|
|
174
|
+
* resolver is the caller's seam to deploy-time values).
|
|
175
|
+
*/
|
|
176
|
+
export declare function resolveReceiptExpectation(receipt: EffectReceiptDeclaration, resolver: ReceiptInputResolver): string;
|
|
177
|
+
//# sourceMappingURL=effect-receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect-receipt.d.ts","sourceRoot":"","sources":["../src/effect-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1D,2CAA2C;AAC3C,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,MAAM,CAAC;AAEvD,uDAAuD;AACvD,eAAO,MAAM,sBAAsB,EAAE,SAAS,mBAAmB,EAA0B,CAAC;AAE5F;;;;+CAI+C;AAC/C,eAAO,MAAM,qBAAqB,eAAqC,CAAC;AAExE;oEACoE;AACpE,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,gCAAgC,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,w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AM,EAAE,UAAU,CAAC,CAAC;IACpC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;CACjD,CAQA;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMpD;AA4DD;;8EAE8E;AAC9E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,wBAAwB,GAAG,MAAM,EAAE,CAI/E;AAmBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,MAAM,CAW5E;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;AAE7E;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,oBAAoB,GAC7B,MAAM,CAIR"}
|
package/dist/fold/fold.d.ts
CHANGED
|
@@ -50,7 +50,27 @@ import { type SubsetRuleId } from "./subset.js";
|
|
|
50
50
|
* folds its body against the defining module's scope with the folded
|
|
51
51
|
* arguments bound. Still nothing is imported or run.
|
|
52
52
|
*
|
|
53
|
-
*
|
|
53
|
+
* A bare composite factory call (`Checkout({...})` on its own) is still out
|
|
54
|
+
* of scope (epic Phase 5, #1023 covers only interpreting a factory's OWN
|
|
55
|
+
* body, not consuming its result as a value elsewhere). chant #1174 adds one
|
|
56
|
+
* narrow exception at the PROPERTY-ACCESS level rather than here: the
|
|
57
|
+
* `<Identifier>(...).step` idiom — see {@link FoldedCompositeStepCall} on the
|
|
58
|
+
* property-access branch below. A call with no `.step` narrowing, or any
|
|
59
|
+
* other member, still throws from this branch exactly as before.
|
|
60
|
+
*
|
|
61
|
+
* chant #1966 adds a fourth call shape, and a method call on top of any of
|
|
62
|
+
* the four: a lexicon-package function its lexicon registered with
|
|
63
|
+
* {@link intrinsicCallFoldsEagerly} (../lexicon.ts) evaluates eagerly —
|
|
64
|
+
* unlike the other three, which envelope for later revival — because its
|
|
65
|
+
* usual use (`` `${matrix("os")}` ``) coerces the result via `String()` at
|
|
66
|
+
* fold time, before any revival would run. A `CallExpression` whose callee is
|
|
67
|
+
* a property access — `github.actor.toString()`, `[...].join(",")`,
|
|
68
|
+
* `matrix("os").toString()` — folds its receiver and calls the named method
|
|
69
|
+
* on it directly, PROVIDED the receiver is a real value and not one of
|
|
70
|
+
* fold's own symbolic envelopes (see {@link isFoldSymbolicEnvelope}); nothing
|
|
71
|
+
* about the method name is otherwise restricted.
|
|
72
|
+
*
|
|
73
|
+
* Everything else — an ordinary package function, an array `.map`, a
|
|
54
74
|
* registered name shadowed by a local binding — still throws.
|
|
55
75
|
*
|
|
56
76
|
* Cross-file identifier resolution (chant #1020): `consts` alone is always
|
|
@@ -77,7 +97,7 @@ import { type SubsetRuleId } from "./subset.js";
|
|
|
77
97
|
*/
|
|
78
98
|
export type FoldedValue = string | number | boolean | null | undefined | FoldedValue[] | {
|
|
79
99
|
[key: string]: FoldedValue;
|
|
80
|
-
} | AttrRefValue | FoldedIntrinsic | FoldedHelperCall | SymbolicValue | FoldedResource;
|
|
100
|
+
} | AttrRefValue | FoldedIntrinsic | FoldedHelperCall | SymbolicValue | FoldedResource | FoldedCompositeStepCall;
|
|
81
101
|
/**
|
|
82
102
|
* Symbolic reference produced when a property/element access resolves to an
|
|
83
103
|
* attribute of another `const`-declared resource in the same file, e.g.
|
|
@@ -196,6 +216,39 @@ export interface FoldedResource {
|
|
|
196
216
|
*/
|
|
197
217
|
args?: FoldedValue[];
|
|
198
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* The result of folding the `<Identifier>(...).step` composite-consumer
|
|
221
|
+
* idiom (chant #1174) — `Checkout({...}).step`, `SetupNode({...}).step`,
|
|
222
|
+
* every lexicon's single-action `Composite()` wrapper embedded inline in a
|
|
223
|
+
* `Job`'s `steps` array, exactly as composites.mdx documents it. This is the
|
|
224
|
+
* SAME shape chant #1544 already carved out of EVL001 as a documented,
|
|
225
|
+
* correct fallback rather than a lint error
|
|
226
|
+
* ({@link "./subset"}'s `allowCompositeStepAccess`) — `fold()` never set
|
|
227
|
+
* that flag, so before this it fell back to run every time, as designed.
|
|
228
|
+
* This is the fold-side counterpart that actually reduces it instead.
|
|
229
|
+
*
|
|
230
|
+
* Symbolic, exactly like {@link FoldedIntrinsic}/{@link FoldedHelperCall}:
|
|
231
|
+
* `fold()` executes nothing here. It records which composite factory the
|
|
232
|
+
* source named, its folded arguments (in source order), and that the result
|
|
233
|
+
* was immediately narrowed to `.step`. ../discovery/fold-import.ts's bridge
|
|
234
|
+
* resolves the callee through the folding file's own imports — a
|
|
235
|
+
* project-file registered `Composite` is interpreted (chant #1023's existing
|
|
236
|
+
* machinery), anything else (every lexicon-package composite, which is what
|
|
237
|
+
* `Checkout`/`SetupNode` are) is imported and invoked for real, exactly as a
|
|
238
|
+
* top-level `export const x = Checkout({...})` already does via
|
|
239
|
+
* `resolveCallExpression` — and then reads `.step` off the REAL result.
|
|
240
|
+
*
|
|
241
|
+
* Deliberately narrower than "any call, any member access": the member name
|
|
242
|
+
* is fixed to `"step"`, matching the one idiom ../fold/subset.ts's EVL
|
|
243
|
+
* carve-out already permits. `fold()` may never accept a shape EVL doesn't
|
|
244
|
+
* (see that module's doc, point 2c, for the direction it is not allowed to
|
|
245
|
+
* be wrong in) — widening past `.step` here without widening the shared
|
|
246
|
+
* predicate in lockstep would open exactly that gap.
|
|
247
|
+
*/
|
|
248
|
+
export interface FoldedCompositeStepCall {
|
|
249
|
+
__compositeStep: string;
|
|
250
|
+
args: FoldedValue[];
|
|
251
|
+
}
|
|
199
252
|
/**
|
|
200
253
|
* One entry per exported `const` resource declaration in {@link foldModule}'s
|
|
201
254
|
* result. The `ok: false` case surfaces the same located, rule-id-tagged
|
package/dist/fold/fold.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold.d.ts","sourceRoot":"","sources":["../../src/fold/fold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"fold.d.ts","sourceRoot":"","sources":["../../src/fold/fold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAoE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AACjH,OAAO,EAaL,KAAK,YAAY,EAClB,MAAM,UAAU,CAAC;AAGlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AAEH;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,WAAW,EAAE,GACb;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,GAC9B,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,cAAc,GACd,uBAAuB,CAAC;AAE5B;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAClD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAEvE,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,WAAW,EAAE,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WA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AAG,SAAS,CAmDpB;AAuID;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAItE;AAOD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,CAYnF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,GAAG,MAAM,CAGtD;AA+LD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,IAAI,CAClB,IAAI,EAAE,EAAE,CAAC,UAAU,EACnB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAClC,UAAU,GAAE,SAAS,YAAY,EAAO,EACxC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GACvC,WAAW,CAibb;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,EAAE,CAAC,aAAa,EACtB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAClC,UAAU,GAAE,SAAS,YAAY,EAAO,EACxC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GACvC,cAAc,CA6BhB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,QAAQ,SAAc,EACtB,UAAU,GAAE,SAAS,YAAY,EAAO,GACvC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CA6BjC"}
|
package/dist/fold/subset.d.ts
CHANGED
|
@@ -175,6 +175,26 @@ export declare function checkObjectMember(prop: ts.ObjectLiteralElementLike, int
|
|
|
175
175
|
* environment-dependent exceptions). Returns the first (deepest,
|
|
176
176
|
* `fold()`-evaluation-order) unsupported node, or `undefined` when `node`'s
|
|
177
177
|
* whole shape is foldable.
|
|
178
|
+
*
|
|
179
|
+
* The `<call>(...).step` composite-consumer idiom (`Checkout({...}).step`,
|
|
180
|
+
* every lexicon's single-action `Composite()` wrapper embedded inline in a
|
|
181
|
+
* `Job`'s `steps` array — see composites.mdx) used to be an EVL-only,
|
|
182
|
+
* MORE-permissive divergence here (chant #1544's `allowCompositeStepAccess`
|
|
183
|
+
* opt-in parameter, since removed): `fold()` had no way to invoke an
|
|
184
|
+
* arbitrary composite factory, so it fell the file back to run for this
|
|
185
|
+
* shape (documented, correct behavior, never an error) while this shared
|
|
186
|
+
* predicate had to be told to stop treating that fallback as a lint error.
|
|
187
|
+
* chant #1174 closed the divergence — `fold()` now folds exactly this shape
|
|
188
|
+
* (narrowed to the literal member name `"step"`, the one idiom actually in
|
|
189
|
+
* use) — so this classifier accepts it unconditionally, the same way it
|
|
190
|
+
* already accepts a nested `new Type(...)` unconditionally since #1169.
|
|
191
|
+
*
|
|
192
|
+
* chant #1966 adds a CallExpression whose callee is a property access —
|
|
193
|
+
* `github.actor.toString()`, `matrix("os").toString()`, `[...].join(",")` —
|
|
194
|
+
* to the same unconditional-acceptance set: whether the receiver actually
|
|
195
|
+
* folds to a value with a callable method of that name is resolution-
|
|
196
|
+
* dependent (module doc, point 1), so this classifier stays permissive and
|
|
197
|
+
* only recurses into shape.
|
|
178
198
|
*/
|
|
179
199
|
export declare function findSubsetViolation(node: ts.Node, intrinsics?: readonly IntrinsicDef[]): SubsetViolation | undefined;
|
|
180
200
|
//# sourceMappingURL=subset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subset.d.ts","sourceRoot":"","sources":["../../src/fold/subset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"subset.d.ts","sourceRoot":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AAU,GAAG,MAAM,CAE1E;AAED,eAAO,MAAM,iCAAiC,8BAA8B,CAAC;AAE7E,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,CAEtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,GAAG,MAAM,CAErE;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,MAAM,CAElE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,EAAE,CAAC,wBAAwB,EACjC,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,GACnC,eAAe,GAAG,SAAS,CAc7B;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,GACnC,eAAe,GAAG,SAAS,CA6M7B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
export * from "./declarable.js";
|
|
7
7
|
export * from "./composite.js";
|
|
8
8
|
export * from "./provenance.js";
|
|
9
|
+
export * from "./secret-provenance.js";
|
|
10
|
+
export * from "./secret-materialization.js";
|
|
11
|
+
export * from "./effect-receipt.js";
|
|
9
12
|
export * from "./build-params.js";
|
|
10
13
|
export * from "./intrinsic.js";
|
|
11
14
|
export * from "./types.js";
|
|
@@ -42,6 +45,7 @@ export * from "./lint/selectors.js";
|
|
|
42
45
|
export * from "./lint/named-checks.js";
|
|
43
46
|
export * from "./lint/post-synth.js";
|
|
44
47
|
export * from "./lint/policy.js";
|
|
48
|
+
export * from "./lint/pipeline-change-gate.js";
|
|
45
49
|
export * from "./lint/rule-loader.js";
|
|
46
50
|
export * from "./lint/discover.js";
|
|
47
51
|
export * from "./import/parser.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAA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0BAA0B,EAC/B,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAClE,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5F,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/lexicon-schema.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const IntrinsicDefSchema: z.ZodObject<{
|
|
|
9
9
|
outputKey: z.ZodOptional<z.ZodString>;
|
|
10
10
|
isTag: z.ZodBoolean;
|
|
11
11
|
foldsAsCall: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
foldsEagerly: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
export declare const LexiconManifestSchema: z.ZodObject<{
|
|
14
15
|
name: z.ZodString;
|
|
@@ -21,6 +22,7 @@ export declare const LexiconManifestSchema: z.ZodObject<{
|
|
|
21
22
|
outputKey: z.ZodOptional<z.ZodString>;
|
|
22
23
|
isTag: z.ZodBoolean;
|
|
23
24
|
foldsAsCall: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
foldsEagerly: z.ZodOptional<z.ZodBoolean>;
|
|
24
26
|
}, z.core.$strip>>>;
|
|
25
27
|
pseudoParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
26
28
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon-schema.d.ts","sourceRoot":"","sources":["../src/lexicon-schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AAM/D,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"lexicon-schema.d.ts","sourceRoot":"","sources":["../src/lexicon-schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AAM/D,eAAO,MAAM,kBAAkB;;;;;;;iBAe7B,CAAC;AAQH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAOhC,CAAC;AAiCH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmB7B,CAAC;AAMH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAMpE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,CA2B/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAmBjF"}
|
package/dist/lexicon.d.ts
CHANGED
|
@@ -186,6 +186,29 @@ export interface IntrinsicDef {
|
|
|
186
186
|
* run path would have called, from the module the source itself named.
|
|
187
187
|
*/
|
|
188
188
|
readonly foldsAsCall?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* chant #1966 — opt this intrinsic's PLAIN-CALL form into EAGER folding:
|
|
191
|
+
* unlike {@link foldsAsCall}, which defers to a `{__intrinsic}` envelope
|
|
192
|
+
* revived later, `fold()` (../fold/fold.ts) calls the real function
|
|
193
|
+
* immediately, with the folded arguments, and its real return value IS the
|
|
194
|
+
* folded value.
|
|
195
|
+
*
|
|
196
|
+
* Exists for a lexicon helper whose result is commonly embedded directly in
|
|
197
|
+
* a template literal (`` `${matrix("os")}` ``, github's
|
|
198
|
+
* `matrix`/`inputs`/…) — an envelope is still a plain `{__intrinsic, args}`
|
|
199
|
+
* object when the enclosing template folds, so `String()` coercion at fold
|
|
200
|
+
* time would stringify it as `"[object Object]"` instead of the real value.
|
|
201
|
+
* Eager evaluation produces the real, already-live result instead.
|
|
202
|
+
*
|
|
203
|
+
* Same admission bar as {@link foldsAsCall} (a pure function of its
|
|
204
|
+
* arguments — no I/O, no mutable state, no dependency on anything but its
|
|
205
|
+
* arguments) and mutually exclusive with both {@link isTag} and
|
|
206
|
+
* `foldsAsCall`: a plain call folds exactly one way.
|
|
207
|
+
* `../discovery/fold-import.ts`'s `resolveActiveLexiconExport` checks this
|
|
208
|
+
* to admit the function export into `externals` at all — a lexicon
|
|
209
|
+
* package's function export is excluded there otherwise.
|
|
210
|
+
*/
|
|
211
|
+
readonly foldsEagerly?: boolean;
|
|
189
212
|
}
|
|
190
213
|
/**
|
|
191
214
|
* Whether `chant build --fold` can ever fold a use of this intrinsic
|
|
@@ -219,6 +242,7 @@ export interface IntrinsicDef {
|
|
|
219
242
|
export declare function intrinsicFolds(def: {
|
|
220
243
|
isTag?: boolean;
|
|
221
244
|
foldsAsCall?: boolean;
|
|
245
|
+
foldsEagerly?: boolean;
|
|
222
246
|
}): boolean;
|
|
223
247
|
/** True when this intrinsic's TAGGED-TEMPLATE form folds (`Sub\`...\``) — see {@link intrinsicFolds}. */
|
|
224
248
|
export declare function intrinsicTagFolds(def: {
|
|
@@ -238,6 +262,15 @@ export declare function intrinsicCallFolds(def: {
|
|
|
238
262
|
isTag?: boolean;
|
|
239
263
|
foldsAsCall?: boolean;
|
|
240
264
|
}): boolean;
|
|
265
|
+
/**
|
|
266
|
+
* True when this intrinsic's PLAIN-CALL form folds EAGERLY (chant #1966) —
|
|
267
|
+
* i.e. the lexicon opted it in via {@link IntrinsicDef.foldsEagerly}.
|
|
268
|
+
* `isTag: true` disqualifies, same as {@link intrinsicCallFolds}.
|
|
269
|
+
*/
|
|
270
|
+
export declare function intrinsicCallFoldsEagerly(def: {
|
|
271
|
+
isTag?: boolean;
|
|
272
|
+
foldsEagerly?: boolean;
|
|
273
|
+
}): boolean;
|
|
241
274
|
/**
|
|
242
275
|
* Options passed to a MigrationSource by `chant migrate`.
|
|
243
276
|
*/
|
|
@@ -356,6 +389,56 @@ export interface ComponentPipelineResult {
|
|
|
356
389
|
/** Every generated job, in emit order. */
|
|
357
390
|
jobs: ComponentPipelineJob[];
|
|
358
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* Finding-mode a scheduled Op surfaces on drift — the vocabulary the
|
|
394
|
+
* temporal-lexicon composites (`WorkflowAuditOp`/`PipelineAuditOp`/
|
|
395
|
+
* `ReconcileOp`) already declare on the Op itself (#927). The mode is baked
|
|
396
|
+
* into the Op's own activity args at build time and is never re-passed on the
|
|
397
|
+
* generated CI invocation; here it decides only what token/permission wiring
|
|
398
|
+
* the generated job needs to act on a finding — elevated write access for
|
|
399
|
+
* `issue`/`pull-request`/`merge-request`, none for `report`.
|
|
400
|
+
*/
|
|
401
|
+
export type OpFindingMode = "report" | "issue" | "pull-request" | "merge-request";
|
|
402
|
+
/** One scheduled Op to generate CI for — the cron-triggered counterpart to a component (generate mode). */
|
|
403
|
+
export interface ScheduledOpSpec {
|
|
404
|
+
/** Op name (`*.op.ts`'s `Op({ name })`) — what `chant run <name>` targets. */
|
|
405
|
+
name: string;
|
|
406
|
+
/** Cron expression driving the CI-native trigger — the CI-only alternative to a Temporal `TemporalSchedule`. */
|
|
407
|
+
schedule: string;
|
|
408
|
+
/** This Op's finding-mode, for permission/token wiring only (see {@link OpFindingMode}). Default: "report" — no elevated permissions. */
|
|
409
|
+
findingMode?: OpFindingMode;
|
|
410
|
+
}
|
|
411
|
+
/** One CI job generated for a scheduled Op. */
|
|
412
|
+
export interface OpPipelineJob {
|
|
413
|
+
/** CI job name (safe as a YAML key). */
|
|
414
|
+
jobName: string;
|
|
415
|
+
/** The Op this job runs. */
|
|
416
|
+
op: string;
|
|
417
|
+
/** Cron expression this job's workflow is scheduled on. */
|
|
418
|
+
schedule: string;
|
|
419
|
+
/** The finding-mode wired for this job. */
|
|
420
|
+
findingMode: OpFindingMode;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* One generated CI file for a scheduled Op. Unlike a component pipeline —
|
|
424
|
+
* one combined document for the whole graph — a cron trigger is
|
|
425
|
+
* workflow-scoped in every CI provider chant targets (GitHub Actions'
|
|
426
|
+
* `on.schedule`, a GitLab pipeline schedule bound to one `.gitlab-ci.yml`), so
|
|
427
|
+
* each scheduled Op gets its own file.
|
|
428
|
+
*/
|
|
429
|
+
export interface OpPipelineFile {
|
|
430
|
+
/** Suggested file name (e.g. `<op-name>.yml`), relative to the provider's workflow directory. */
|
|
431
|
+
name: string;
|
|
432
|
+
/** The synthesized CI YAML for this Op. */
|
|
433
|
+
yaml: string;
|
|
434
|
+
}
|
|
435
|
+
/** The synthesized CI pipeline for a set of scheduled Ops (generate mode's Op counterpart, #927). */
|
|
436
|
+
export interface OpPipelineResult {
|
|
437
|
+
/** One file per scheduled Op. */
|
|
438
|
+
files: OpPipelineFile[];
|
|
439
|
+
/** Every generated job, in emit order — one per Op. */
|
|
440
|
+
jobs: OpPipelineJob[];
|
|
441
|
+
}
|
|
359
442
|
/**
|
|
360
443
|
* Live status of a single deploy unit (a CloudFormation stack, a K8s release, …)
|
|
361
444
|
* addressed by its deployed name — the per-component presence signal
|
|
@@ -388,6 +471,24 @@ export interface BuildRootContext {
|
|
|
388
471
|
projectRoot: string;
|
|
389
472
|
/** The resolved project configuration, for the lexicon's own namespace. */
|
|
390
473
|
config: Record<string, unknown>;
|
|
474
|
+
/**
|
|
475
|
+
* The discovered entities, read-only (#1828 / SOPS provenance). A
|
|
476
|
+
* contributor that reacts to what the project DECLARED — rather than to
|
|
477
|
+
* what its config listed — reads them here: the committed-encrypted
|
|
478
|
+
* `declareSecret()` hook resolves each declaration's `file` into a sidecar
|
|
479
|
+
* entity, and any future declaration-driven contributor needs the same.
|
|
480
|
+
*
|
|
481
|
+
* Read-only on purpose. The merge that follows is the only thing that adds
|
|
482
|
+
* to the entity set, and it refuses a name collision rather than
|
|
483
|
+
* overwriting; a contributor mutating the map directly would slip past
|
|
484
|
+
* that. Contributors run in order, so a contributor also sees entities
|
|
485
|
+
* earlier contributors added.
|
|
486
|
+
*
|
|
487
|
+
* Optional: a caller that has no entity set (a plugin hook invoked
|
|
488
|
+
* directly, a graph mode that never discovered) omits it, and a hook must
|
|
489
|
+
* treat an absent map as an empty one.
|
|
490
|
+
*/
|
|
491
|
+
entities?: ReadonlyMap<string, Declarable>;
|
|
391
492
|
}
|
|
392
493
|
/**
|
|
393
494
|
* What a build-root render contributes to the build: entities keyed like
|
|
@@ -397,6 +498,14 @@ export interface BuildRootContribution {
|
|
|
397
498
|
entities: Map<string, Declarable>;
|
|
398
499
|
warnings?: string[];
|
|
399
500
|
}
|
|
501
|
+
/**
|
|
502
|
+
* A plugin's `buildRoots` hook, already bound to this invocation's project
|
|
503
|
+
* root and config (`collectBuildRootContributors`, ./cli/plugins.ts). What is
|
|
504
|
+
* NOT bindable that early is the entity set — discovery has not run yet — so
|
|
505
|
+
* the merge supplies it when it calls the closure. A contributor that ignores
|
|
506
|
+
* the argument is still assignable, which is what every pre-#1828 hook does.
|
|
507
|
+
*/
|
|
508
|
+
export type BuildRootContributor = (ctx: Pick<BuildRootContext, "entities">) => Promise<BuildRootContribution>;
|
|
400
509
|
export interface LexiconPlugin {
|
|
401
510
|
/** Human-readable name (e.g. "aws", "gcp") */
|
|
402
511
|
readonly name: string;
|
|
@@ -482,6 +591,16 @@ export interface LexiconPlugin {
|
|
|
482
591
|
* for lexicons whose rule metadata still lives in core's static catalog.
|
|
483
592
|
*/
|
|
484
593
|
auditCatalog?(): Record<string, RuleMeta>;
|
|
594
|
+
/**
|
|
595
|
+
* Parse standalone template content (a file audit discovery classified for
|
|
596
|
+
* this lexicon) into the lexicon's entity graph, keyed the way `ctx.entities`
|
|
597
|
+
* is during a build. Lets entity-reading post-synth checks fire on
|
|
598
|
+
* `chant audit` of hand-written manifests — parse-to-graph rather than
|
|
599
|
+
* output-reading rule variants (#1567). Implementations must tolerate
|
|
600
|
+
* arbitrary external content: a malformed document yields no entities, never
|
|
601
|
+
* a throw. Omit for lexicons whose audit checks read `ctx.outputs`.
|
|
602
|
+
*/
|
|
603
|
+
auditEntities?(content: string): Map<string, Declarable>;
|
|
485
604
|
/**
|
|
486
605
|
* Machine-readable spec-coverage accounting for `check-lexicon` (#1330).
|
|
487
606
|
*
|
|
@@ -530,6 +649,16 @@ export interface LexiconPlugin {
|
|
|
530
649
|
* that are not CI providers.
|
|
531
650
|
*/
|
|
532
651
|
generateComponentPipeline?(components: DriverComponent[], options?: ComponentPipelineOptions): ComponentPipelineResult;
|
|
652
|
+
/**
|
|
653
|
+
* Generate CI for a set of scheduled, stateless Ops — the cron-triggered
|
|
654
|
+
* sibling of {@link generateComponentPipeline} (#927). Each
|
|
655
|
+
* `ScheduledOpSpec` becomes its own CI file (cron triggers are
|
|
656
|
+
* workflow-scoped in every CI provider chant targets), invoking `chant run
|
|
657
|
+
* <name>` on the local executor — the same one-shot invocation `chant run
|
|
658
|
+
* <op>` runs by hand. Only CI-provider lexicons (gitlab, github, forgejo)
|
|
659
|
+
* implement this; omit for lexicons that are not CI providers.
|
|
660
|
+
*/
|
|
661
|
+
generateOpPipeline?(ops: ScheduledOpSpec[], options?: ComponentPipelineOptions): OpPipelineResult;
|
|
533
662
|
/**
|
|
534
663
|
* Render this lexicon's config-declared build roots into entities (#1548
|
|
535
664
|
* piece 3) — the seam for a build root that is NOT typed chant source. The
|
|
@@ -1045,10 +1174,15 @@ export interface TeardownOutcome {
|
|
|
1045
1174
|
/**
|
|
1046
1175
|
* - `deleted` — gone, including already-gone (deletion is idempotent);
|
|
1047
1176
|
* - `failed` — the delete errored (core retries these once);
|
|
1048
|
-
* - `not-prunable` — deliberately not deleted; `detail` says why
|
|
1177
|
+
* - `not-prunable` — deliberately not deleted; `detail` says why;
|
|
1178
|
+
* - `retained` — owned and no longer declared, but deliberately kept
|
|
1179
|
+
* (#1365 decision 5): a `generated-once` secret never enters the prunable
|
|
1180
|
+
* set, because deleting it would destroy the only copy of material chant
|
|
1181
|
+
* never held. Reported loudly, never deleted; deletion is an explicit act
|
|
1182
|
+
* (`kubectl delete`, or a future gated op), never a sweep's.
|
|
1049
1183
|
*/
|
|
1050
|
-
outcome: "deleted" | "failed" | "not-prunable";
|
|
1051
|
-
/** The error for `failed`, the reason for `not-prunable`. */
|
|
1184
|
+
outcome: "deleted" | "failed" | "not-prunable" | "retained";
|
|
1185
|
+
/** The error for `failed`, the reason for `not-prunable`/`retained`. */
|
|
1052
1186
|
detail?: string;
|
|
1053
1187
|
}
|
|
1054
1188
|
/** What {@link LexiconPlugin.executeTeardown} returns: one outcome per candidate. */
|