@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,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Activity contracts — the Stage 1 fix for chant #1288 ("Ops are the one
|
|
3
|
+
* place chant accepts untyped arguments and resolves names at runtime").
|
|
4
|
+
*
|
|
5
|
+
* Maintainer decision (#1288, 2026-08-25): a staged approach. Stage 1 (this
|
|
6
|
+
* module) is registered args/return schemas per activity, validated by
|
|
7
|
+
* `chant build` against every step — non-breaking, no change to
|
|
8
|
+
* {@link ActivityStep.args}'s `Record<string, unknown>` shape or the step
|
|
9
|
+
* builders. Stage 2 (a separate PR) regenerates the step builders as fully
|
|
10
|
+
* typed wrappers for editor completion and go-to-definition. #1289 (op.json
|
|
11
|
+
* IR) and #1290 (step-output references) build on these contracts — #1290
|
|
12
|
+
* specifically needs a declared `returns` schema to validate a later step's
|
|
13
|
+
* reference into an earlier one's output against, which is why `returns` is
|
|
14
|
+
* part of the shape here even though nothing in Stage 1 reads it for that.
|
|
15
|
+
*
|
|
16
|
+
* An activity declares a contract alongside its implementation — the same
|
|
17
|
+
* "registration surface" the issue asked for (`activity-registry.ts`'s
|
|
18
|
+
* `collectActivities` already does this for implementations; this is the
|
|
19
|
+
* schema-shaped sibling). `chant build` — via a lexicon's own post-synth
|
|
20
|
+
* check, e.g. the temporal lexicon's TMP012 — resolves each step's `fn`
|
|
21
|
+
* against a contract map built the same way and validates `args` and
|
|
22
|
+
* `outcomeAttribute.from`. A step whose `fn` has no registered contract is
|
|
23
|
+
* skipped (not an error): this is deliberately incremental — a lexicon opts
|
|
24
|
+
* an activity in by declaring a contract for it, and the k8s/aws/azure/gcp/
|
|
25
|
+
* fly activity sets are expected to pick this up lexicon by lexicon rather
|
|
26
|
+
* than all at once (see the issue's "worth checking this lands cleanly"
|
|
27
|
+
* note).
|
|
28
|
+
*
|
|
29
|
+
* Ownership is decentralized on purpose: each lexicon declares contracts for
|
|
30
|
+
* the activities it implements and validates them with its own post-synth
|
|
31
|
+
* check (the same `rulePrefix`-per-lexicon pattern every other check in
|
|
32
|
+
* chant already uses), rather than a shared cross-lexicon registry. A
|
|
33
|
+
* `Temporal::Op` step can call an activity contributed by any lexicon, and
|
|
34
|
+
* `PostSynthContext.entities` already carries the whole resolved graph to
|
|
35
|
+
* every lexicon's checks, so no new plumbing is needed for that to work.
|
|
36
|
+
*/
|
|
37
|
+
import { z } from "zod";
|
|
38
|
+
import type { OpConfig } from "./types.js";
|
|
39
|
+
/** Every literal value {@link ActivityStep.profile} may hold. Kept in sync with `types.ts`'s `ActivityStep["profile"]`. */
|
|
40
|
+
export declare const KNOWN_ACTIVITY_PROFILES: readonly ["fastIdempotent", "longInfra", "k8sWait", "humanGate", "argoSync", "policyCheck"];
|
|
41
|
+
declare const CONTRACT_BRAND: unique symbol;
|
|
42
|
+
/**
|
|
43
|
+
* A registered activity's args/return schemas — the declaration that lets
|
|
44
|
+
* `chant build` catch a typo'd or mistyped step before it ever reaches a
|
|
45
|
+
* cluster.
|
|
46
|
+
*
|
|
47
|
+
* Author `args` with `z.strictObject(...)` (or an equivalent that rejects
|
|
48
|
+
* unrecognized keys), not `z.object(...)`. Zod's default `.object()` silently
|
|
49
|
+
* drops a key it doesn't recognize instead of failing — exactly the
|
|
50
|
+
* `helmInstall("api", "./chart", { nameSpace: "prod" })` failure class the
|
|
51
|
+
* issue names, where the misspelled key vanishes instead of erroring. A
|
|
52
|
+
* strict schema turns that into a build error.
|
|
53
|
+
*/
|
|
54
|
+
export interface ActivityContract<Args = unknown, Return = unknown> {
|
|
55
|
+
readonly [CONTRACT_BRAND]: true;
|
|
56
|
+
/** The activity's registered name — must match a step's `fn`. */
|
|
57
|
+
name: string;
|
|
58
|
+
/** Schema every step's `args` (defaulted to `{}` when omitted) must satisfy. */
|
|
59
|
+
args: z.ZodType<Args>;
|
|
60
|
+
/**
|
|
61
|
+
* Schema the activity resolves to. Optional: an activity that returns
|
|
62
|
+
* nothing meaningful (or hasn't had its return type written down yet) can
|
|
63
|
+
* omit it. Needed to validate a step's `outcomeAttribute.from` path, and —
|
|
64
|
+
* per #1290 — a later step's reference into this one's output.
|
|
65
|
+
*/
|
|
66
|
+
returns?: z.ZodType<Return>;
|
|
67
|
+
}
|
|
68
|
+
/** Declare an activity contract. */
|
|
69
|
+
export declare function activityContract<ArgsSchema extends z.ZodTypeAny, ReturnSchema extends z.ZodTypeAny = never>(name: string, args: ArgsSchema, returns?: ReturnSchema): ActivityContract<z.infer<ArgsSchema>, ReturnSchema extends z.ZodTypeAny ? z.infer<ReturnSchema> : unknown>;
|
|
70
|
+
/** Structural guard for a value produced by {@link activityContract}. */
|
|
71
|
+
export declare function isActivityContract(value: unknown): value is ActivityContract;
|
|
72
|
+
/**
|
|
73
|
+
* Add every {@link ActivityContract} exported from an activity-contracts
|
|
74
|
+
* module to `into`, keyed by its declared `name` — the schema-shaped sibling
|
|
75
|
+
* of `activity-registry.ts`'s `collectActivities`.
|
|
76
|
+
*/
|
|
77
|
+
export declare function collectActivityContracts(mod: Record<string, unknown>, into: Map<string, ActivityContract>): void;
|
|
78
|
+
export interface ActivityContractIssue {
|
|
79
|
+
/** The Op the offending step belongs to. */
|
|
80
|
+
opName: string;
|
|
81
|
+
/** The phase the offending step belongs to. */
|
|
82
|
+
phase: string;
|
|
83
|
+
/** The activity name the offending step calls. */
|
|
84
|
+
fn: string;
|
|
85
|
+
/** Human-readable description of the mismatch. */
|
|
86
|
+
message: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Does dot-path `path` resolve to a field that exists on `schema`? Object
|
|
90
|
+
* shapes only — a return schema whose root (or an intermediate segment) is
|
|
91
|
+
* a `z.record(...)`/`z.array(...)` rather than a `z.object(...)` hard-errors
|
|
92
|
+
* (returns `false`) instead of skipping, deliberately (chant #1290 comment
|
|
93
|
+
* on #1288's pre-merge review): a record's keys are dynamic and an array's
|
|
94
|
+
* elements are index-addressed, neither of which a dot-path segment can
|
|
95
|
+
* check against in any way that's more meaningful than "the author probably
|
|
96
|
+
* meant something else." No declared `returns` schema needs this today, so
|
|
97
|
+
* there's no live case to design against yet. The escape hatch is an empty
|
|
98
|
+
* path — `outcomeAttribute.from` omitted, or a {@link StepOutputRef}'s
|
|
99
|
+
* `path` omitted — which references the whole return value and never calls
|
|
100
|
+
* this function; a record/array-returning activity's whole value is always
|
|
101
|
+
* a valid reference target.
|
|
102
|
+
*/
|
|
103
|
+
export declare function pathExistsInSchema(schema: z.ZodTypeAny, path: string): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* The zod schema at property-key path `path` inside `schema`, walking
|
|
106
|
+
* through `z.ZodObject` shapes only (unwrapping optional/nullable/default at
|
|
107
|
+
* each level, same as {@link pathExistsInSchema}). `undefined` when a
|
|
108
|
+
* segment doesn't resolve, or an intermediate schema isn't a `z.ZodObject` —
|
|
109
|
+
* same record/array hard-stop {@link pathExistsInSchema} documents. An empty
|
|
110
|
+
* `path` returns `schema` itself (unwrapped).
|
|
111
|
+
*/
|
|
112
|
+
export declare function schemaAtPath(schema: z.ZodTypeAny, path: ReadonlyArray<string>): z.ZodTypeAny | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* A primitive-shape classification of a zod schema — `string`/`number`/
|
|
115
|
+
* `boolean`/`object`/`array`, or `undefined` for anything else (a union,
|
|
116
|
+
* enum, literal, `z.any()`/`z.unknown()`, a transform, …). Used by the
|
|
117
|
+
* step-output-ref cross-contract type check (chant #1950-3) to compare a
|
|
118
|
+
* producer's declared return type against a consumer's declared arg type at
|
|
119
|
+
* the same structural position — deliberately shallow: it bails (returns
|
|
120
|
+
* `undefined`) on anything fancier than these five kinds rather than trying
|
|
121
|
+
* to reason about it, per that check's "bail out silently" design.
|
|
122
|
+
*/
|
|
123
|
+
export type PrimitiveSchemaKind = "string" | "number" | "boolean" | "object" | "array";
|
|
124
|
+
export declare function primitiveKindOf(schema: z.ZodTypeAny): PrimitiveSchemaKind | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Validate every activity step in an Op's phases (main and `onFailure`)
|
|
127
|
+
* against a contract map. A step whose `fn` has no entry in `contracts` is
|
|
128
|
+
* skipped — Stage 1 is opt-in per activity, not a hard requirement that
|
|
129
|
+
* every activity have a declared contract.
|
|
130
|
+
*
|
|
131
|
+
* Catches the four failure classes chant #1288 names:
|
|
132
|
+
* - an unrecognized `profile` (checked against {@link KNOWN_ACTIVITY_PROFILES}, independent of whether `fn` has a contract),
|
|
133
|
+
* - an args key the declared schema doesn't recognize,
|
|
134
|
+
* - an args value of the wrong type (including a required key that's missing),
|
|
135
|
+
* - an `outcomeAttribute.from` path that can't exist on the declared return type.
|
|
136
|
+
*/
|
|
137
|
+
export declare function validateActivitySteps(config: Pick<OpConfig, "name" | "phases" | "onFailure">, contracts: ReadonlyMap<string, ActivityContract>): ActivityContractIssue[];
|
|
138
|
+
export {};
|
|
139
|
+
//# sourceMappingURL=activity-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-contract.d.ts","sourceRoot":"","sources":["../../src/op/activity-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAiD,MAAM,SAAS,CAAC;AAEvF,2HAA2H;AAC3H,eAAO,MAAM,uBAAuB,6FAO1B,CAAC;AAEX,QAAA,MAAM,cAAc,eAA0C,CAAC;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO;IAChE,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC;IAChC,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,EAAE,CA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AAS,CASxG;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvF,wBAAgB,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,GAAG,mBAAmB,GAAG,SAAS,CAQrF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC,EACvD,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAC/C,qBAAqB,EAAE,CA+CzB"}
|
package/dist/op/builders.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { OpResource } from "./resource.js";
|
|
2
|
-
import type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep } from "./types.js";
|
|
2
|
+
import type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep, EffectStep } from "./types.js";
|
|
3
|
+
import { type EffectReceiptDeclaration } from "../effect-receipt.js";
|
|
4
|
+
import { type StepOutputRef } from "./step-output-ref.js";
|
|
5
|
+
/** An `activity()` result — the plain `ActivityStep` shape plus the `.out` reference sugar (#1290). */
|
|
6
|
+
export interface NamedActivityStep extends ActivityStep {
|
|
7
|
+
/**
|
|
8
|
+
* `step.out.someField` builds a {@link StepOutputRef} into this step's
|
|
9
|
+
* declared return value, for use in a later step's `args`. Throws on
|
|
10
|
+
* access if this step has no `id` (pass one via `activity()`'s third
|
|
11
|
+
* argument) — there is nothing for a reference to name otherwise.
|
|
12
|
+
*/
|
|
13
|
+
readonly out: Record<string, StepOutputRef>;
|
|
14
|
+
}
|
|
3
15
|
/**
|
|
4
16
|
* Declare a named, phased Temporal workflow.
|
|
5
17
|
*
|
|
@@ -20,13 +32,74 @@ export declare function Op(config: OpConfig): InstanceType<typeof OpResource>;
|
|
|
20
32
|
export declare function phase(name: string, steps: StepDefinition[], opts?: {
|
|
21
33
|
parallel?: boolean;
|
|
22
34
|
}): PhaseDefinition;
|
|
23
|
-
/**
|
|
24
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Reference a pre-built or custom activity by function name.
|
|
37
|
+
*
|
|
38
|
+
* The third argument is a profile string (unchanged) or, to name the step
|
|
39
|
+
* so a later step can reference its output (#1290), an options object:
|
|
40
|
+
* `activity("lifecycleDiff", { env: "prod" }, { id: "diff" })`. Named or
|
|
41
|
+
* not, the result carries `.out` — `diff.out.driftedStacks` builds a
|
|
42
|
+
* reference to this step's declared return value; see `stepOutput()` in
|
|
43
|
+
* `@intentius/chant/op` for the equivalent on a step authored as a plain
|
|
44
|
+
* object literal instead of via this builder.
|
|
45
|
+
*/
|
|
46
|
+
export declare function activity(fn: string, args?: Record<string, unknown>, opts?: ActivityStep["profile"] | {
|
|
47
|
+
profile?: ActivityStep["profile"];
|
|
48
|
+
id?: string;
|
|
49
|
+
}): NamedActivityStep;
|
|
25
50
|
/** Insert a human gate — the workflow pauses until the named signal is received. */
|
|
26
51
|
export declare function gate(signalName: string, opts?: {
|
|
27
52
|
timeout?: string;
|
|
28
53
|
description?: string;
|
|
29
54
|
}): GateStep;
|
|
55
|
+
/**
|
|
56
|
+
* Wrap nested steps in read-compare-run-write over an effect receipt (#1834,
|
|
57
|
+
* epic #1703). At run: read the live receipt through the receipt store,
|
|
58
|
+
* compare it against the resolved expectation, and on a match skip the nested
|
|
59
|
+
* steps ("effect already applied"). On a mismatch the nested steps run in
|
|
60
|
+
* authored order, and ONLY when every one of them succeeds is the receipt
|
|
61
|
+
* written — last, once. This step is the sole writer of a receipt (decision
|
|
62
|
+
* 3); a nested-step failure leaves the receipt untouched (stale), so the next
|
|
63
|
+
* run re-proposes the effect.
|
|
64
|
+
*
|
|
65
|
+
* `receipt` is the typed EffectReceipt declaration — import the const from
|
|
66
|
+
* your receipts module. There is no string form: a receipt named by string
|
|
67
|
+
* would sever the step from the declaration that lint, plan, and the lexicon
|
|
68
|
+
* row all key on.
|
|
69
|
+
*
|
|
70
|
+
* A gate authored inside `steps` pauses only when the effect will fire (the
|
|
71
|
+
* matched path never reaches it). The receipt-store activities (`receiptRead`,
|
|
72
|
+
* `receiptWrite`) are provided by the receipt row's lexicon (#1835, aws).
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* import { seededReceipt } from "./receipts";
|
|
77
|
+
* phase("Seed", [
|
|
78
|
+
* effect(seededReceipt, [
|
|
79
|
+
* shell("npm run db:seed"),
|
|
80
|
+
* ]),
|
|
81
|
+
* ]),
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export declare function effect(receipt: EffectReceiptDeclaration, steps: Array<ActivityStep | GateStep>, opts?: {
|
|
85
|
+
description?: string;
|
|
86
|
+
}): EffectStep;
|
|
87
|
+
/**
|
|
88
|
+
* {@link takeProfile}'s sibling for the typed, lexicon-owned step-builder
|
|
89
|
+
* wrappers added in chant #1288 Stage 2 (e.g. `kubectlApply` in
|
|
90
|
+
* `@intentius/chant-lexicon-k8s`): also pulls `id` out of the opts bag so it
|
|
91
|
+
* routes to the step's `id` field (enabling `.out` — #1290) instead of
|
|
92
|
+
* leaking into the activity's args, the same way `profile` would without
|
|
93
|
+
* this split.
|
|
94
|
+
*/
|
|
95
|
+
export declare function takeProfileAndId(opts: (Record<string, unknown> & {
|
|
96
|
+
profile?: ActivityStep["profile"];
|
|
97
|
+
id?: string;
|
|
98
|
+
}) | undefined): {
|
|
99
|
+
args: Record<string, unknown>;
|
|
100
|
+
profile?: ActivityStep["profile"];
|
|
101
|
+
id?: string;
|
|
102
|
+
};
|
|
30
103
|
/** Run an npm build script in the given project directory. `opts.script` selects the script (default `build`, e.g. `build:aws`); `opts.env` adds env vars. */
|
|
31
104
|
export declare const build: (path: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
32
105
|
/** Run `kubectl apply -f <manifest>`. Defaults to the `longInfra` profile (override via `opts.profile`). */
|
|
@@ -38,6 +111,18 @@ export declare const helmInstall: (name: string, chart: string, opts?: {
|
|
|
38
111
|
profile?: ActivityStep["profile"];
|
|
39
112
|
[k: string]: unknown;
|
|
40
113
|
}) => ActivityStep;
|
|
114
|
+
/**
|
|
115
|
+
* Deploy a recorded pinned render by its `sha256:` content digest (chant
|
|
116
|
+
* #1242): the helm lexicon's `helmInstall` activity loads the render from
|
|
117
|
+
* the render store, verifies the digest, and installs those exact bytes as
|
|
118
|
+
* a structure-preserving wrapper chart — no deploy-time render. Defaults to
|
|
119
|
+
* the `longInfra` profile (override via `opts.profile`).
|
|
120
|
+
*/
|
|
121
|
+
export declare const helmInstallPinned: (name: string, contentDigest: string, opts?: {
|
|
122
|
+
namespace?: string;
|
|
123
|
+
profile?: ActivityStep["profile"];
|
|
124
|
+
[k: string]: unknown;
|
|
125
|
+
}) => ActivityStep;
|
|
41
126
|
/** Poll for stack readiness (kubectl rollout, CloudFormation complete, etc). Defaults to the `k8sWait` profile (override via `opts.profile`). */
|
|
42
127
|
export declare const waitForStack: (name: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
43
128
|
/** Poll any operator-backed Kubernetes resource until it reports ready, driven by a data-only readiness spec (CRD-aware; #365). Defaults to the `k8sWait` profile (override via `opts.profile`). */
|
|
@@ -55,6 +140,24 @@ export declare const shell: (cmd: string, opts?: {
|
|
|
55
140
|
env?: Record<string, string>;
|
|
56
141
|
profile?: ActivityStep["profile"];
|
|
57
142
|
}) => ActivityStep;
|
|
143
|
+
/**
|
|
144
|
+
* Ensure a `generated-once` secret exists in the target store (#1829, epic
|
|
145
|
+
* #1365). The op-step surface over the same engine as the `ensure-secret`
|
|
146
|
+
* capability verb (`ensureSecretMaterialization`, core's
|
|
147
|
+
* secret-materialization module): read-then-write — if the secret exists, its
|
|
148
|
+
* declared key-set and any declared `metadata` are verified and the step
|
|
149
|
+
* stops (present means done); if absent, one value per key is minted at
|
|
150
|
+
* apply time and written straight to the store. Never mints over an existing
|
|
151
|
+
* value, never rotates implicitly; a mismatch fails the step loudly, naming
|
|
152
|
+
* key names and metadata keys — never values. No output of the activity
|
|
153
|
+
* carries secret material. The backing activity is provided by the store's
|
|
154
|
+
* lexicon (k8s, #1830).
|
|
155
|
+
*/
|
|
156
|
+
export declare const ensureSecret: (name: string, keys: string[], opts?: {
|
|
157
|
+
metadata?: Record<string, string>;
|
|
158
|
+
profile?: ActivityStep["profile"];
|
|
159
|
+
[k: string]: unknown;
|
|
160
|
+
}) => ActivityStep;
|
|
58
161
|
/** Run `chant teardown` in the given project directory. Uses `longInfra` profile. */
|
|
59
162
|
export declare const teardown: (path: string) => ActivityStep;
|
|
60
163
|
/**
|
|
@@ -108,6 +211,40 @@ export declare const k3dUp: (name: string, opts?: Record<string, unknown>) => Ac
|
|
|
108
211
|
* (chant #1410) — requires `"k3d"` in the project's `lexicons`.
|
|
109
212
|
*/
|
|
110
213
|
export declare const k3dDown: (name: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
214
|
+
/**
|
|
215
|
+
* Run the pinned k3s installer against a reachable host (`role`: `"server"`
|
|
216
|
+
* or `"agent"`). Idempotent on an already-installed matching version.
|
|
217
|
+
* Defaults to the `longInfra` profile (the installer downloads and starts
|
|
218
|
+
* the binary); override via `opts.profile`.
|
|
219
|
+
*
|
|
220
|
+
* The implementation lives in the k3s lexicon (chant #1601) — the project's
|
|
221
|
+
* `chant.config.ts` must list `"k3s"` in `lexicons` for the activity to load.
|
|
222
|
+
* Bounded exactly as `k3dUp`/`k3dDown` (chant #1410): drives the reachable-host
|
|
223
|
+
* case only, no host provisioning, no SSH orchestration.
|
|
224
|
+
*
|
|
225
|
+
* `opts` accepts `configFile` (required — path to the chant-emitted
|
|
226
|
+
* config.yaml, passed as `--config`), `version` (overrides the lexicon's
|
|
227
|
+
* pinned `INSTALL_K3S_VERSION`), and `tokenFile` (path to a file holding the
|
|
228
|
+
* join token, passed to the installer as `K3S_TOKEN_FILE`). There is no
|
|
229
|
+
* `token` option — the join secret's value never travels through this step;
|
|
230
|
+
* only a file path does (the #1601 token boundary, same stance as #1365).
|
|
231
|
+
*/
|
|
232
|
+
export declare const k3sInstall: (role: "server" | "agent", opts: {
|
|
233
|
+
configFile: string;
|
|
234
|
+
version?: string;
|
|
235
|
+
tokenFile?: string;
|
|
236
|
+
profile?: ActivityStep["profile"];
|
|
237
|
+
[k: string]: unknown;
|
|
238
|
+
}) => ActivityStep;
|
|
239
|
+
/**
|
|
240
|
+
* Uninstall k3s from a reachable host (`role`: `"server"` or `"agent"`).
|
|
241
|
+
* Defaults to the `fastIdempotent` profile (override via `opts.profile`).
|
|
242
|
+
* Implementation lives in the k3s lexicon (chant #1601) — requires `"k3s"`
|
|
243
|
+
* in the project's `lexicons`. A host where k3s was never installed is a
|
|
244
|
+
* no-op success, the same shape as `k3dDown` against an already-gone
|
|
245
|
+
* cluster.
|
|
246
|
+
*/
|
|
247
|
+
export declare const k3sUninstall: (role: "server" | "agent", opts?: Record<string, unknown>) => ActivityStep;
|
|
111
248
|
/**
|
|
112
249
|
* Boot a local Floci AWS emulator in Docker and point subsequent steps at it —
|
|
113
250
|
* sets `AWS_ENDPOINT_URL` + test creds in the process env so a following
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/op/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIjG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,EAAE,CAAC,MAAM,EAAE,QAAQ,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAEpE;AAED,mEAAmE;AACnE,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,cAAc,EAAE,EACvB,IAAI,CAAC,EAAE;IAAE,QAAQ,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AAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAC9B,KAAG,YAGR,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,YAKjE,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converge rules (#1484) — the typed, JSON-serializable predicate language a
|
|
3
|
+
* `ConvergeOp` rule table is built from.
|
|
4
|
+
*
|
|
5
|
+
* The issue's illustrative sketch writes a rule's condition as a JS arrow
|
|
6
|
+
* function (`s => s.status === "drifted"`). That reads well but can't
|
|
7
|
+
* actually ship: a rule is evaluated per-tick against live, freshly-observed
|
|
8
|
+
* data inside a Temporal activity, and an activity's arguments — including
|
|
9
|
+
* whatever a `ConvergeOp` composite bakes into its generated workflow — must
|
|
10
|
+
* be plain JSON (see `step-output-ref.ts`'s module doc on why a value
|
|
11
|
+
* crossing the workflow/activity boundary can't carry a closure). A rule
|
|
12
|
+
* "outside the evaluable subset" is one of the build-time refusals #1484
|
|
13
|
+
* names explicitly, which only makes sense if there IS an evaluable subset
|
|
14
|
+
* to be outside of — so rules here are data: a small comparison language
|
|
15
|
+
* over one typed symptom record, interpreted by {@link evaluatePredicate}
|
|
16
|
+
* (pure, no I/O, matching Accessible Ops factor I — "predictable from the
|
|
17
|
+
* text alone").
|
|
18
|
+
*
|
|
19
|
+
* `S` is the symptom record type a `ConvergeOp` instance evaluates against
|
|
20
|
+
* (`ConvergeSymptom`, ../lifecycle/symptoms.ts, for the real thing — kept
|
|
21
|
+
* generic here so the predicate language and its tests don't depend on the
|
|
22
|
+
* lifecycle package). Since a predicate's `field` is typed `keyof S`, a rule
|
|
23
|
+
* that names a field the symptom record doesn't have is refused by
|
|
24
|
+
* TypeScript itself at the author's call site — the "symptom field nothing
|
|
25
|
+
* produces" refusal, satisfied for free. {@link isWellFormedPredicate} is the
|
|
26
|
+
* runtime backstop for a rule assembled by hand (bypassing `when()`/the
|
|
27
|
+
* comparison builders) rather than authored through them, and is what a
|
|
28
|
+
* build-time check (TMP014) re-validates the serialized rule table against.
|
|
29
|
+
*/
|
|
30
|
+
/** Comparison operators over a single symptom field. */
|
|
31
|
+
export type FieldComparisonOp = "eq" | "neq" | "gt" | "gte" | "lt" | "lte";
|
|
32
|
+
/** Truthiness operators over a single symptom field — no `value` needed. */
|
|
33
|
+
export type FieldTruthinessOp = "truthy" | "falsy";
|
|
34
|
+
export interface FieldComparisonPredicate<S> {
|
|
35
|
+
kind: "field-comparison";
|
|
36
|
+
field: keyof S & string;
|
|
37
|
+
op: FieldComparisonOp;
|
|
38
|
+
value: string | number | boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface FieldTruthinessPredicate<S> {
|
|
41
|
+
kind: "field-truthiness";
|
|
42
|
+
field: keyof S & string;
|
|
43
|
+
op: FieldTruthinessOp;
|
|
44
|
+
}
|
|
45
|
+
export interface AllOfPredicate<S> {
|
|
46
|
+
kind: "all-of";
|
|
47
|
+
predicates: SymptomPredicate<S>[];
|
|
48
|
+
}
|
|
49
|
+
export interface AnyOfPredicate<S> {
|
|
50
|
+
kind: "any-of";
|
|
51
|
+
predicates: SymptomPredicate<S>[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A rule's `when` — the evaluable subset #1484 requires: field comparisons
|
|
55
|
+
* and truthiness checks over `S`, composed with `allOf`/`anyOf`. Every
|
|
56
|
+
* variant is plain JSON; there is deliberately no escape hatch to an
|
|
57
|
+
* arbitrary expression.
|
|
58
|
+
*/
|
|
59
|
+
export type SymptomPredicate<S> = FieldComparisonPredicate<S> | FieldTruthinessPredicate<S> | AllOfPredicate<S> | AnyOfPredicate<S>;
|
|
60
|
+
/**
|
|
61
|
+
* Structural validator for a value claiming to be a {@link SymptomPredicate}
|
|
62
|
+
* — the runtime backstop `TMP014` (lexicons/temporal's post-synth check)
|
|
63
|
+
* re-checks a serialized rule table against, since nothing forces a rule
|
|
64
|
+
* assembled by hand (rather than through the builders below) to match this
|
|
65
|
+
* shape. Recurses through `allOf`/`anyOf`; `fieldWhitelist`, when given,
|
|
66
|
+
* additionally refuses a field name the symptom record doesn't actually
|
|
67
|
+
* produce (defense in depth over TypeScript's `keyof S` check, which only
|
|
68
|
+
* applies at the author's original call site — not to a rule table replayed
|
|
69
|
+
* from JSON).
|
|
70
|
+
*/
|
|
71
|
+
export declare function isWellFormedPredicate(value: unknown, fieldWhitelist?: ReadonlySet<string>): boolean;
|
|
72
|
+
/** Evaluate a {@link SymptomPredicate} against a symptom record. Pure — no I/O, no ambient reads. */
|
|
73
|
+
export declare function evaluatePredicate<S>(predicate: SymptomPredicate<S>, symptom: S): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Does a predicate reference the given symptom field anywhere in it,
|
|
76
|
+
* recursing through `allOf`/`anyOf`? The build-time backstop for a claim
|
|
77
|
+
* about a *category* of rule (e.g. "a rule reading `adoptCount`") rather
|
|
78
|
+
* than a single comparison — `TMP014`'s adopt-safety check
|
|
79
|
+
* (../../../lexicons/temporal/src/lint/post-synth/tmp014-converge-rule-refusals.ts)
|
|
80
|
+
* uses this to refuse a rule that both reads `adoptCount` and dispatches a
|
|
81
|
+
* mutating op, rather than merely documenting that authors shouldn't write
|
|
82
|
+
* one.
|
|
83
|
+
*/
|
|
84
|
+
export declare function predicateReferencesField<S>(predicate: SymptomPredicate<S>, field: string): boolean;
|
|
85
|
+
export declare function eq<S>(field: keyof S & string, value: string | number | boolean): FieldComparisonPredicate<S>;
|
|
86
|
+
export declare function neq<S>(field: keyof S & string, value: string | number | boolean): FieldComparisonPredicate<S>;
|
|
87
|
+
export declare function gt<S>(field: keyof S & string, value: number): FieldComparisonPredicate<S>;
|
|
88
|
+
export declare function gte<S>(field: keyof S & string, value: number): FieldComparisonPredicate<S>;
|
|
89
|
+
export declare function lt<S>(field: keyof S & string, value: number): FieldComparisonPredicate<S>;
|
|
90
|
+
export declare function lte<S>(field: keyof S & string, value: number): FieldComparisonPredicate<S>;
|
|
91
|
+
export declare function truthy<S>(field: keyof S & string): FieldTruthinessPredicate<S>;
|
|
92
|
+
export declare function falsy<S>(field: keyof S & string): FieldTruthinessPredicate<S>;
|
|
93
|
+
export declare function allOf<S>(...predicates: SymptomPredicate<S>[]): AllOfPredicate<S>;
|
|
94
|
+
export declare function anyOf<S>(...predicates: SymptomPredicate<S>[]): AnyOfPredicate<S>;
|
|
95
|
+
/**
|
|
96
|
+
* Dispatch a declared Op by name. `chant run <op>` — the existing local
|
|
97
|
+
* runner (../op's `runOpLocally` under the hood via the CLI) — takes no
|
|
98
|
+
* caller-supplied arguments today, so a dispatched Op reads whatever it
|
|
99
|
+
* needs from its own declared `env`/config rather than from this rule.
|
|
100
|
+
*/
|
|
101
|
+
export interface RunAction {
|
|
102
|
+
kind: "run";
|
|
103
|
+
op: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Report only — never a mutation. The log-and-ledger channel is the only one
|
|
107
|
+
* v1 implements (issue open question 5): reusing `ReconcileOp`'s
|
|
108
|
+
* `onDrift: "pull-request" | "issue" | "report"` channels is "obviously
|
|
109
|
+
* right" per the issue, but wiring `pull-request`/`issue` through requires
|
|
110
|
+
* the same reconcile plumbing `ReconcileOp` already owns — out of scope for
|
|
111
|
+
* the smallest honest `ConvergeOp`. A future `channel` field can extend this
|
|
112
|
+
* without a shape change.
|
|
113
|
+
*/
|
|
114
|
+
export interface ReportAction {
|
|
115
|
+
kind: "report";
|
|
116
|
+
reason: string;
|
|
117
|
+
}
|
|
118
|
+
export type RuleAction = RunAction | ReportAction;
|
|
119
|
+
export declare function run(op: string): RunAction;
|
|
120
|
+
export declare function report(reason: string): ReportAction;
|
|
121
|
+
/** A rule table's default flap-damping threshold (issue: "with a default"). */
|
|
122
|
+
export declare const DEFAULT_FLAP_THRESHOLD = 3;
|
|
123
|
+
/**
|
|
124
|
+
* One rule: a symptom predicate, the action to take when it matches, and its
|
|
125
|
+
* mandatory rationale. "Every rule carries its why" (Accessible Ops factor
|
|
126
|
+
* III) — `why` is a required field, not an optional one, and `when()` below
|
|
127
|
+
* throws at construction (build time — the same "throw in the factory" shape
|
|
128
|
+
* `ApplyOp`'s `compensate` refusal already uses) if it's missing or blank.
|
|
129
|
+
*/
|
|
130
|
+
export interface ConvergeRule<S> {
|
|
131
|
+
/** Stable identifier — used for flap-damping counters, so it must not change across a rule's lifetime just because the table was reordered. */
|
|
132
|
+
id: string;
|
|
133
|
+
when: SymptomPredicate<S>;
|
|
134
|
+
then: RuleAction;
|
|
135
|
+
/** Why this rule exists — refused at build if blank. */
|
|
136
|
+
why: string;
|
|
137
|
+
/** Consecutive ticks the symptom may fire before this rule escalates to report-and-stop. @default {@link DEFAULT_FLAP_THRESHOLD} */
|
|
138
|
+
flapThreshold?: number;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Declare one converge rule. Throws immediately (build time — this runs
|
|
142
|
+
* while `chant build` evaluates the authoring `*.op.ts` file, exactly like
|
|
143
|
+
* `ApplyOp`'s `compensate` refusal) when `id` or `why` is missing or blank,
|
|
144
|
+
* or `flapThreshold` isn't a positive integer.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* when(eq("status", "drifted"), run("fountain-apply"), {
|
|
149
|
+
* id: "drift-apply",
|
|
150
|
+
* why: "Live config drifted from declared source; re-apply converges it back.",
|
|
151
|
+
* })
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export declare function when<S>(predicate: SymptomPredicate<S>, action: RuleAction, opts: {
|
|
155
|
+
id: string;
|
|
156
|
+
why: string;
|
|
157
|
+
flapThreshold?: number;
|
|
158
|
+
}): ConvergeRule<S>;
|
|
159
|
+
/** Every rule id in a table must be unique — flap-damping counters and dispatch/report accounting are keyed by id. */
|
|
160
|
+
export declare function duplicateRuleIds<S>(rules: ConvergeRule<S>[]): string[];
|
|
161
|
+
//#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;;;GAaG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC9B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GACxD,YAAY,CAAC,CAAC,CAAC,CAiBjB;AAED,sHAAsH;AACtH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAQtE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate mode's Op counterpart (#927): synthesize scheduled CI for
|
|
3
|
+
* stateless Ops — the cron-triggered sibling of `generateComponentsPipeline`
|
|
4
|
+
* (../components/cli-support.ts, #563/#688). A component pipeline triggers a
|
|
5
|
+
* deploy-time graph on `workflow_dispatch`; this triggers already-built Ops
|
|
6
|
+
* on a cron, each via `chant run <name>` on the local executor — the same
|
|
7
|
+
* one-shot invocation documented at docs/src/content/docs/guide/ops.mdx. Core
|
|
8
|
+
* owns only Op discovery, so a typo'd name fails fast before any CI is
|
|
9
|
+
* generated; the CI-specific synthesis is contributed by the target
|
|
10
|
+
* lexicon's `generateOpPipeline` (../lexicon.ts), exactly like
|
|
11
|
+
* `generateComponentPipeline`.
|
|
12
|
+
*
|
|
13
|
+
* There is no dependency graph between scheduled Ops the way there is
|
|
14
|
+
* between components — `Op.depends` orders phases within one run, not
|
|
15
|
+
* separately scheduled cron triggers — so this does not call
|
|
16
|
+
* `resolveComponentGraph`; each `ScheduledOpSpec` is generated independently.
|
|
17
|
+
*/
|
|
18
|
+
import { type ComponentPipelineOptions, type ScheduledOpSpec, type OpPipelineFile, type OpPipelineJob } from "../lexicon.js";
|
|
19
|
+
/** Result of generating scheduled CI for a set of Ops (generate mode's Op counterpart, #927). */
|
|
20
|
+
export interface GenerateOpsPipelineResult {
|
|
21
|
+
success: boolean;
|
|
22
|
+
/** One generated CI file per scheduled Op, when `success` is true. */
|
|
23
|
+
files?: OpPipelineFile[];
|
|
24
|
+
/** Every generated job, for a machine-readable view. */
|
|
25
|
+
jobs?: OpPipelineJob[];
|
|
26
|
+
error?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Synthesize scheduled CI for `ops` targeting `lexicon`: validate every named
|
|
30
|
+
* Op exists (`discoverOps`, under the git root — mirrors `chant run <name>`'s
|
|
31
|
+
* own resolution), then dispatch to the lexicon's `generateOpPipeline`. No
|
|
32
|
+
* deploy/audit logic is inlined into the generated YAML — the finding-mode
|
|
33
|
+
* behavior lives in the Op's own activity args, set by the composite that
|
|
34
|
+
* built it (`WorkflowAuditOp`, `PipelineAuditOp`, `ReconcileOp`, …); this
|
|
35
|
+
* function only wires the cron trigger and the token/permission surface the
|
|
36
|
+
* declared `findingMode` needs.
|
|
37
|
+
*/
|
|
38
|
+
export declare function generateOpsPipeline(ops: ScheduledOpSpec[], lexicon: string, options?: ComponentPipelineOptions, cwd?: string): Promise<GenerateOpsPipelineResult>;
|
|
39
|
+
//# sourceMappingURL=generate-pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-pipeline.d.ts","sourceRoot":"","sources":["../../src/op/generate-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAsBpB,iGAAiG;AACjG,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,wDAAwD;IACxD,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,eAAe,EAAE,EACtB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB,EAClC,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,yBAAyB,CAAC,CAyBpC"}
|
package/dist/op/index.d.ts
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForStack, waitForReady, gitlabPipeline, lifecycleSnapshot, shell, teardown, envTeardown, k3dUp, k3dDown, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove, spriteApplyNetworkPolicy, spriteApplyServices, spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease, spritesUp, spritesDown } from "./builders.js";
|
|
1
|
+
export { Op, phase, activity, gate, effect, build, kubectlApply, helmInstall, helmInstallPinned, waitForStack, waitForReady, gitlabPipeline, lifecycleSnapshot, shell, ensureSecret, teardown, envTeardown, k3dUp, k3dDown, k3sInstall, k3sUninstall, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove, spriteApplyNetworkPolicy, spriteApplyServices, spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease, spritesUp, spritesDown } from "./builders.js";
|
|
2
2
|
export { OpResource } from "./resource.js";
|
|
3
3
|
export { safeHeartbeat, sleep } from "./activity-runtime.js";
|
|
4
4
|
export { emulatorLifecycle, emulatorsOf, endpointEnvVars } from "./emulator-lifecycle.js";
|
|
5
5
|
export type { EmulatorSpec, EmulatorCapability, EmulatorDeclaration, EmulatorUpArgs, EmulatorLifecycle } from "./emulator-lifecycle.js";
|
|
6
6
|
export { checkFreshness, compare, formatResult, latestRelease, parseVersion, unpinned } from "./emulator-freshness.js";
|
|
7
7
|
export type { FreshnessResult } from "./emulator-freshness.js";
|
|
8
|
-
export type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep } from "./types.js";
|
|
8
|
+
export type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep, EffectStep } from "./types.js";
|
|
9
|
+
export { receiptActivities, receiptCheckInput } from "./receipt-store.js";
|
|
10
|
+
export type { ReceiptStore, EffectReceiptRef, ReceiptCheckInput, ReceiptActivities, ReceiptActivityOptions, ReceiptReadArgs, ReceiptReadResult, ReceiptWriteArgs, ReceiptStalenessArgs, ReceiptStalenessResult, ReceiptStaleFinding, } from "./receipt-store.js";
|
|
9
11
|
export { discoverOps } from "./discover.js";
|
|
10
12
|
export type { DiscoveredOp, OpDiscoveryResult } from "./discover.js";
|
|
13
|
+
export { generateOpsPipeline } from "./generate-pipeline.js";
|
|
14
|
+
export type { GenerateOpsPipelineResult } from "./generate-pipeline.js";
|
|
11
15
|
export { loadActivities, loadProfiles, resolveActivity } from "./activity-registry.js";
|
|
12
16
|
export type { ActivityFn, ActivityProfile } from "./activity-registry.js";
|
|
13
17
|
export { runOpLocally, parseDuration, findGate, LocalGateUnsupportedError, OpRunFailure } from "./local-executor.js";
|
|
14
18
|
export type { StepRecord, OpRunResult } from "./local-executor.js";
|
|
15
19
|
export { renderHuman, renderJson } from "./local-output.js";
|
|
20
|
+
export { activityContract, isActivityContract, collectActivityContracts, validateActivitySteps, KNOWN_ACTIVITY_PROFILES, pathExistsInSchema, } from "./activity-contract.js";
|
|
21
|
+
export type { ActivityContract, ActivityContractIssue } from "./activity-contract.js";
|
|
22
|
+
export { stepOutput, isStepOutputRef, collectStepOutputRefs, validateStepOutputRefs, validateStepOutputRefScope, makeOutProxy } from "./step-output-ref.js";
|
|
23
|
+
export type { StepOutputRef, WithStepRefs } from "./step-output-ref.js";
|
|
24
|
+
export type { NamedActivityStep } from "./builders.js";
|
|
25
|
+
export { eq, neq, gt, gte, lt, lte, truthy, falsy, allOf, anyOf, evaluatePredicate, isWellFormedPredicate, predicateReferencesField, run, report, when, duplicateRuleIds, DEFAULT_FLAP_THRESHOLD, } from "./converge-rule.js";
|
|
26
|
+
export type { FieldComparisonOp, FieldTruthinessOp, FieldComparisonPredicate, FieldTruthinessPredicate, AllOfPredicate, AnyOfPredicate, SymptomPredicate, RunAction, ReportAction, RuleAction, ConvergeRule, } from "./converge-rule.js";
|
|
27
|
+
export { discoverConvergeOps, runOperatorRound, runOperatorForever, formatRoundLine, DEFAULT_OPERATOR_INTERVAL_MS, } from "./operator.js";
|
|
28
|
+
export type { OperatorTickEvent, OperatorRoundOptions, OperatorLoopOptions } from "./operator.js";
|
|
29
|
+
export { classifyOpVerbClass, isGated } from "./op-verb-class.js";
|
|
30
|
+
export type { OpVerbClass } from "./op-verb-class.js";
|
|
31
|
+
export { takeProfileAndId } from "./builders.js";
|
|
16
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/op/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,i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