@intentius/chant 0.56.0 → 0.58.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 +51 -1
- package/dist/audit/catalog.d.ts.map +1 -1
- package/dist/audit/core.d.ts +20 -1
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts +14 -8
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/lineage.d.ts +10 -0
- package/dist/audit/lineage.d.ts.map +1 -0
- package/dist/audit/prior-art.d.ts +385 -0
- package/dist/audit/prior-art.d.ts.map +1 -0
- package/dist/audit/proof.d.ts +16 -0
- package/dist/audit/proof.d.ts.map +1 -1
- package/dist/audit/report-html.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +8 -1
- 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 +3 -0
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/audit/secrets.d.ts +15 -0
- package/dist/audit/secrets.d.ts.map +1 -1
- package/dist/audit/terraform-state.d.ts +46 -0
- package/dist/audit/terraform-state.d.ts.map +1 -0
- package/dist/build.d.ts +17 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/claimed-fields.d.ts +161 -0
- package/dist/claimed-fields.d.ts.map +1 -0
- package/dist/cli/build-params-cli.d.ts +2 -2
- package/dist/cli/command-group.d.ts +14 -0
- package/dist/cli/command-group.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts +17 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-docs.d.ts +1 -1
- package/dist/cli/commands/check-lexicon-examples.d.ts +16 -6
- package/dist/cli/commands/check-lexicon-examples.d.ts.map +1 -1
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts +1 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/project.d.ts +7 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/onboard.d.ts +2 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +82 -16
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts +49 -42
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts +28 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/op-tools.d.ts +16 -1
- package/dist/cli/mcp/op-tools.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/resources/context.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +26 -9
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/generate-post-synth-barrel.d.ts +1 -1
- package/dist/components/auto-release.d.ts +10 -20
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/capability.d.ts +4 -4
- package/dist/components/cli-support.d.ts +20 -21
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +3 -3
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/driver-output.d.ts.map +1 -1
- package/dist/components/driver.d.ts +66 -36
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest-persistence.d.ts +1 -9
- package/dist/components/manifest-persistence.d.ts.map +1 -1
- package/dist/components/run-progress.d.ts +6 -6
- package/dist/components/run-progress.d.ts.map +1 -1
- package/dist/components/verbs/run-agent.d.ts +9 -15
- package/dist/components/verbs/run-agent.d.ts.map +1 -1
- package/dist/components/verbs/verify.d.ts +2 -2
- package/dist/deep-observation.d.ts +17 -0
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/discovery/files.d.ts +4 -4
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +33 -0
- package/dist/discovery/param-deps.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
- package/dist/discovery/sandbox/config-wire.d.ts +2 -2
- package/dist/fold/foldable-helpers.d.ts +5 -1
- package/dist/fold/foldable-helpers.d.ts.map +1 -1
- package/dist/fold-provenance.d.ts +236 -0
- package/dist/fold-provenance.d.ts.map +1 -0
- package/dist/graph-ops.d.ts +1 -1
- package/dist/held-elsewhere.d.ts +85 -0
- package/dist/held-elsewhere.d.ts.map +1 -0
- package/dist/import/ir-utils.d.ts +1 -1
- package/dist/import/ir-utils.d.ts.map +1 -1
- package/dist/import/parser.d.ts +33 -0
- package/dist/import/parser.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/kubectl-context.d.ts +3 -3
- package/dist/lexicon-config.d.ts +4 -4
- package/dist/lexicon-plugin-helpers.d.ts +1 -1
- package/dist/lexicon.d.ts +104 -14
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/change-set.d.ts +13 -0
- package/dist/lifecycle/change-set.d.ts.map +1 -1
- package/dist/lifecycle/deep-diff.d.ts +133 -6
- package/dist/lifecycle/deep-diff.d.ts.map +1 -1
- package/dist/lifecycle/deep-observe.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +71 -3
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.d.ts +2 -2
- package/dist/lifecycle/run-ledger.d.ts +53 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -0
- package/dist/lifecycle/symptoms.d.ts +3 -3
- package/dist/lifecycle/symptoms.d.ts.map +1 -1
- package/dist/lint/config.d.ts +81 -2
- package/dist/lint/config.d.ts.map +1 -1
- package/dist/lint/post-synth.d.ts +55 -2
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts.map +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts.map +1 -1
- package/dist/lint/rules/comp/comp004-gate-needs-durable-runtime.d.ts +44 -0
- package/dist/lint/rules/comp/comp004-gate-needs-durable-runtime.d.ts.map +1 -0
- package/dist/lint/rules/comp/index.d.ts +1 -1
- package/dist/lint/rules/comp/index.d.ts.map +1 -1
- package/dist/lint/rules/op/index.d.ts +16 -0
- package/dist/lint/rules/op/index.d.ts.map +1 -0
- package/dist/lint/rules/op/ops012-activity-contract.d.ts +27 -0
- package/dist/lint/rules/op/ops012-activity-contract.d.ts.map +1 -0
- package/dist/lint/rules/op/ops013-step-output-ref.d.ts +61 -0
- package/dist/lint/rules/op/ops013-step-output-ref.d.ts.map +1 -0
- package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts +55 -0
- package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts.map +1 -0
- package/dist/lint/rules/op/support.d.ts +12 -0
- package/dist/lint/rules/op/support.d.ts.map +1 -0
- package/dist/lint/suppressions.d.ts +108 -0
- package/dist/lint/suppressions.d.ts.map +1 -0
- package/dist/live-endpoint.d.ts +1 -1
- package/dist/op/activities/activity-contracts.d.ts +54 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -0
- package/dist/op/activities/apply.d.ts +262 -0
- package/dist/op/activities/apply.d.ts.map +1 -0
- package/dist/op/activities/build.d.ts +13 -0
- package/dist/op/activities/build.d.ts.map +1 -0
- package/dist/op/activities/converge.d.ts +110 -0
- package/dist/op/activities/converge.d.ts.map +1 -0
- package/dist/op/activities/env-teardown.d.ts +76 -0
- package/dist/op/activities/env-teardown.d.ts.map +1 -0
- package/dist/op/activities/guard-validate.d.ts +64 -0
- package/dist/op/activities/guard-validate.d.ts.map +1 -0
- package/dist/op/activities/http-check.d.ts +34 -0
- package/dist/op/activities/http-check.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +31 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/op/activities/lexicon-upgrade.d.ts +182 -0
- package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -0
- package/dist/op/activities/lifecycle.d.ts +42 -0
- package/dist/op/activities/lifecycle.d.ts.map +1 -0
- package/dist/op/activities/pipeline-audit.d.ts +84 -0
- package/dist/op/activities/pipeline-audit.d.ts.map +1 -0
- package/dist/op/activities/policy.d.ts +17 -0
- package/dist/op/activities/policy.d.ts.map +1 -0
- package/dist/op/activities/reconcile.d.ts +89 -0
- package/dist/op/activities/reconcile.d.ts.map +1 -0
- package/dist/op/activities/shell.d.ts +13 -0
- package/dist/op/activities/shell.d.ts.map +1 -0
- package/dist/op/activities/teardown.d.ts +10 -0
- package/dist/op/activities/teardown.d.ts.map +1 -0
- package/dist/op/activities/util.d.ts +7 -0
- package/dist/op/activities/util.d.ts.map +1 -0
- package/dist/op/activities/wait.d.ts +28 -0
- package/dist/op/activities/wait.d.ts.map +1 -0
- package/dist/op/activities/workflow-audit.d.ts +92 -0
- package/dist/op/activities/workflow-audit.d.ts.map +1 -0
- package/dist/op/activity-contract-registry.d.ts +76 -0
- package/dist/op/activity-contract-registry.d.ts.map +1 -0
- package/dist/op/activity-contract.d.ts +25 -18
- package/dist/op/activity-contract.d.ts.map +1 -1
- package/dist/op/activity-failure.d.ts +28 -0
- package/dist/op/activity-failure.d.ts.map +1 -0
- package/dist/op/activity-profiles.d.ts +118 -0
- package/dist/op/activity-profiles.d.ts.map +1 -0
- package/dist/op/activity-registry.d.ts +22 -38
- package/dist/op/activity-registry.d.ts.map +1 -1
- package/dist/op/activity-runtime.d.ts +3 -14
- package/dist/op/activity-runtime.d.ts.map +1 -1
- package/dist/op/builders.d.ts +84 -29
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/composites/apply-op.d.ts +113 -0
- package/dist/op/composites/apply-op.d.ts.map +1 -0
- package/dist/op/composites/converge-op.d.ts +120 -0
- package/dist/op/composites/converge-op.d.ts.map +1 -0
- package/dist/op/composites/index.d.ts +26 -0
- package/dist/op/composites/index.d.ts.map +1 -0
- package/dist/op/composites/lexicon-upgrade-op.d.ts +78 -0
- package/dist/op/composites/lexicon-upgrade-op.d.ts.map +1 -0
- package/dist/op/composites/pipeline-audit-op.d.ts +50 -0
- package/dist/op/composites/pipeline-audit-op.d.ts.map +1 -0
- package/dist/op/composites/reconcile-op.d.ts +57 -0
- package/dist/op/composites/reconcile-op.d.ts.map +1 -0
- package/dist/op/composites/watch-op.d.ts +60 -0
- package/dist/op/composites/watch-op.d.ts.map +1 -0
- package/dist/op/composites/workflow-audit-op.d.ts +57 -0
- package/dist/op/composites/workflow-audit-op.d.ts.map +1 -0
- package/dist/op/converge-rule.d.ts +12 -10
- package/dist/op/converge-rule.d.ts.map +1 -1
- package/dist/op/cron.d.ts +51 -0
- package/dist/op/cron.d.ts.map +1 -0
- package/dist/op/discover.d.ts +9 -0
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/duration.d.ts +11 -0
- package/dist/op/duration.d.ts.map +1 -0
- package/dist/op/emulator-lifecycle.d.ts.map +1 -1
- package/dist/op/gate.d.ts +90 -0
- package/dist/op/gate.d.ts.map +1 -0
- package/dist/op/generate-pipeline.d.ts +9 -0
- package/dist/op/generate-pipeline.d.ts.map +1 -1
- package/dist/op/index.d.ts +23 -7
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts +114 -28
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-output.d.ts +11 -1
- package/dist/op/local-output.d.ts.map +1 -1
- package/dist/op/op-ir.d.ts +184 -0
- package/dist/op/op-ir.d.ts.map +1 -0
- package/dist/op/op-verb-class.d.ts +10 -2
- package/dist/op/op-verb-class.d.ts.map +1 -1
- package/dist/op/operator.d.ts +30 -5
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/receipt-store.d.ts +1 -1
- package/dist/op/receipt-store.d.ts.map +1 -1
- package/dist/op/resource.d.ts +15 -1
- package/dist/op/resource.d.ts.map +1 -1
- package/dist/op/runtime.d.ts +200 -0
- package/dist/op/runtime.d.ts.map +1 -0
- package/dist/op/runtimes/local.d.ts +29 -0
- package/dist/op/runtimes/local.d.ts.map +1 -0
- package/dist/op/step-output-ref.d.ts +15 -13
- package/dist/op/step-output-ref.d.ts.map +1 -1
- package/dist/op/types.d.ts +79 -27
- package/dist/op/types.d.ts.map +1 -1
- package/dist/ownership.d.ts +1 -1
- package/dist/provenance.d.ts +21 -0
- package/dist/provenance.d.ts.map +1 -1
- package/dist/serializer-walker.d.ts.map +1 -1
- package/dist/stack-output.d.ts +5 -0
- package/dist/stack-output.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/audit/catalog.test.ts +79 -3
- package/src/audit/catalog.ts +111 -13
- package/src/audit/core.test.ts +26 -0
- package/src/audit/core.ts +61 -17
- package/src/audit/discover.test.ts +39 -0
- package/src/audit/discover.ts +91 -15
- package/src/audit/lineage.ts +100 -0
- package/src/audit/prior-art.ts +153 -0
- package/src/audit/proof.test.ts +67 -0
- package/src/audit/proof.ts +70 -0
- package/src/audit/report-html.ts +9 -4
- package/src/audit/report-model.ts +16 -2
- package/src/audit/report.test.ts +33 -0
- package/src/audit/report.ts +5 -3
- package/src/audit/rules-doc.test.ts +34 -2
- package/src/audit/rules-doc.ts +82 -9
- package/src/audit/secrets.ts +15 -3
- package/src/audit/terraform-state.test.ts +144 -0
- package/src/audit/terraform-state.ts +131 -0
- package/src/build.ts +31 -1
- package/src/claimed-fields.test.ts +145 -0
- package/src/claimed-fields.ts +208 -0
- package/src/cli/build-params-cli.ts +2 -2
- package/src/cli/command-group.ts +14 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/.terraform/providers/lock.txt +1 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/main.tf +1 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/modules/foo/main.tf +1 -0
- package/src/cli/commands/__fixtures__/audit-terraform/infra/variables.tf +3 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +13 -4
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/docs-cli.ts +4 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/package.ts +1 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/package-cli.ts +21 -0
- package/src/cli/commands/__snapshots__/init-lexicon.test.ts.snap +1 -0
- package/src/cli/commands/audit.test.ts +189 -11
- package/src/cli/commands/audit.ts +73 -27
- package/src/cli/commands/build.test.ts +292 -9
- package/src/cli/commands/build.ts +156 -24
- package/src/cli/commands/check-lexicon-docs.ts +1 -1
- package/src/cli/commands/check-lexicon-examples.test.ts +29 -1
- package/src/cli/commands/check-lexicon-examples.ts +42 -10
- package/src/cli/commands/import.ts +6 -0
- package/src/cli/commands/init-lexicon/templates/codegen.ts +9 -0
- package/src/cli/commands/init-lexicon/templates/project.ts +44 -4
- package/src/cli/commands/init-lexicon.test.ts +97 -2
- package/src/cli/commands/init-lexicon.ts +4 -2
- package/src/cli/commands/init.test.ts +35 -1
- package/src/cli/commands/init.ts +14 -3
- package/src/cli/commands/lint.test.ts +48 -0
- package/src/cli/commands/lint.ts +123 -0
- package/src/cli/commands/onboard.test.ts +75 -0
- package/src/cli/commands/onboard.ts +54 -23
- package/src/cli/handlers/build.test.ts +81 -1
- package/src/cli/handlers/build.ts +15 -1
- package/src/cli/handlers/graph.test.ts +3 -3
- package/src/cli/handlers/lifecycle.test.ts +195 -12
- package/src/cli/handlers/lifecycle.ts +123 -6
- package/src/cli/handlers/misc.ts +1 -1
- package/src/cli/handlers/operator.test.ts +183 -11
- package/src/cli/handlers/operator.ts +260 -55
- package/src/cli/handlers/run.test.ts +431 -1287
- package/src/cli/handlers/run.ts +365 -915
- package/src/cli/main.test.ts +23 -15
- package/src/cli/main.ts +88 -33
- package/src/cli/mcp/op-tools.ts +147 -88
- package/src/cli/mcp/resource-handlers.ts +10 -37
- package/src/cli/mcp/resources/context.ts +11 -12
- package/src/cli/mcp/server.test.ts +25 -27
- package/src/cli/mcp/server.ts +2 -2
- package/src/cli/registry.ts +26 -9
- package/src/codegen/docs.ts +1 -1
- package/src/codegen/generate-post-synth-barrel.test.ts +1 -1
- package/src/codegen/generate-post-synth-barrel.ts +1 -1
- package/src/components/README.md +3 -2
- package/src/components/auto-release.test.ts +4 -20
- package/src/components/auto-release.ts +17 -42
- package/src/components/capability.ts +4 -4
- package/src/components/cli-support.test.ts +10 -5
- package/src/components/cli-support.ts +52 -44
- package/src/components/component.schema.json +2 -2
- package/src/components/component.ts +3 -3
- package/src/components/driver-output.ts +14 -2
- package/src/components/driver.test.ts +92 -22
- package/src/components/driver.ts +193 -83
- package/src/components/index.ts +1 -6
- package/src/components/manifest-persistence.test.ts +2 -20
- package/src/components/manifest-persistence.ts +4 -24
- package/src/components/pilots/pilots-lint-clean.test.ts +11 -10
- package/src/components/run-progress.ts +6 -6
- package/src/components/verbs/run-agent.ts +11 -17
- package/src/components/verbs/verify.ts +2 -2
- package/src/deep-observation.test.ts +75 -0
- package/src/deep-observation.ts +48 -0
- package/src/discovery/collect.test.ts +3 -3
- package/src/discovery/files.ts +4 -4
- package/src/discovery/fold-import.ts +105 -2
- package/src/discovery/param-deps.test.ts +112 -1
- package/src/discovery/param-deps.ts +193 -0
- package/src/discovery/sandbox/bundle.ts +15 -1
- package/src/discovery/sandbox/config-wire.test.ts +2 -2
- package/src/discovery/sandbox/config-wire.ts +2 -2
- package/src/fold/fold.test.ts +56 -0
- package/src/fold/foldable-helpers.ts +81 -1
- package/src/fold-provenance-exclusion.test.ts +186 -0
- package/src/fold-provenance.test.ts +495 -0
- package/src/fold-provenance.ts +441 -0
- package/src/graph-ops.test.ts +2 -2
- package/src/graph-ops.ts +1 -1
- package/src/held-elsewhere.test.ts +102 -0
- package/src/held-elsewhere.ts +114 -0
- package/src/import/ir-utils.ts +11 -1
- package/src/import/parser.ts +35 -0
- package/src/index.ts +3 -0
- package/src/kubectl-context.ts +3 -3
- package/src/lexicon-config.test.ts +5 -5
- package/src/lexicon-config.ts +4 -4
- package/src/lexicon-plugin-helpers.ts +1 -1
- package/src/lexicon.ts +120 -14
- package/src/lifecycle/change-set.test.ts +49 -0
- package/src/lifecycle/change-set.ts +67 -0
- package/src/lifecycle/converge-ledger.ts +1 -1
- package/src/lifecycle/deep-diff.test.ts +267 -14
- package/src/lifecycle/deep-diff.ts +217 -14
- package/src/lifecycle/deep-observe.test.ts +3 -1
- package/src/lifecycle/deep-observe.ts +16 -6
- package/src/lifecycle/gate-ledger.test.ts +74 -2
- package/src/lifecycle/gate-ledger.ts +143 -36
- package/src/lifecycle/index.ts +1 -0
- package/src/lifecycle/release-ledger.ts +2 -2
- package/src/lifecycle/run-ledger.test.ts +268 -0
- package/src/lifecycle/run-ledger.ts +201 -0
- package/src/lifecycle/symptoms.ts +3 -3
- package/src/lint/config.test.ts +82 -1
- package/src/lint/config.ts +112 -3
- package/src/lint/policy.test.ts +1 -1
- package/src/lint/post-synth.test.ts +31 -0
- package/src/lint/post-synth.ts +54 -1
- package/src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts +2 -2
- package/src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts +1 -1
- package/src/lint/rules/comp/comp.test.ts +1 -1
- package/src/lint/rules/comp/comp004-gate-needs-durable-runtime.ts +74 -0
- package/src/lint/rules/comp/index.ts +3 -3
- package/src/lint/rules/op/index.ts +23 -0
- package/src/lint/rules/op/ops012-activity-contract.test.ts +161 -0
- package/src/lint/rules/op/ops012-activity-contract.ts +64 -0
- package/src/lint/rules/op/ops013-step-output-ref.test.ts +237 -0
- package/src/lint/rules/op/ops013-step-output-ref.ts +98 -0
- package/src/lint/rules/op/ops014-converge-rule-refusals.test.ts +263 -0
- package/src/lint/rules/op/ops014-converge-rule-refusals.ts +179 -0
- package/src/lint/rules/op/support.ts +11 -0
- package/src/lint/suppressions.test.ts +163 -0
- package/src/lint/suppressions.ts +204 -0
- package/src/live-endpoint.ts +1 -1
- package/src/op/activities/activity-contracts.ts +66 -0
- package/src/op/activities/apply.test.ts +567 -0
- package/src/op/activities/apply.ts +662 -0
- package/src/op/activities/build.ts +26 -0
- package/src/op/activities/converge.test.ts +330 -0
- package/src/op/activities/converge.ts +449 -0
- package/src/op/activities/env-teardown.test.ts +187 -0
- package/src/op/activities/env-teardown.ts +171 -0
- package/src/op/activities/guard-validate.test.ts +139 -0
- package/src/op/activities/guard-validate.ts +223 -0
- package/src/op/activities/http-check.test.ts +48 -0
- package/src/op/activities/http-check.ts +55 -0
- package/src/op/activities/index.ts +119 -0
- package/src/op/activities/lexicon-upgrade.test.ts +492 -0
- package/src/op/activities/lexicon-upgrade.ts +673 -0
- package/src/op/activities/lifecycle.ts +85 -0
- package/src/op/activities/pipeline-audit.test.ts +67 -0
- package/src/op/activities/pipeline-audit.ts +201 -0
- package/src/op/activities/policy.test.ts +19 -0
- package/src/op/activities/policy.ts +37 -0
- package/src/op/activities/reconcile.test.ts +81 -0
- package/src/op/activities/reconcile.ts +187 -0
- package/src/op/activities/shell.ts +26 -0
- package/src/op/activities/teardown.ts +22 -0
- package/src/op/activities/util.ts +6 -0
- package/src/op/activities/wait.ts +69 -0
- package/src/op/activities/workflow-audit.test.ts +90 -0
- package/src/op/activities/workflow-audit.ts +203 -0
- package/src/op/activity-contract-registry.test.ts +98 -0
- package/src/op/activity-contract-registry.ts +114 -0
- package/src/op/activity-contract.test.ts +1 -1
- package/src/op/activity-contract.ts +37 -33
- package/src/op/activity-failure.ts +34 -0
- package/src/op/activity-profiles.test.ts +56 -0
- package/src/op/activity-profiles.ts +116 -0
- package/src/op/activity-registry.test.ts +37 -28
- package/src/op/activity-registry.ts +27 -56
- package/src/op/activity-runtime.ts +3 -47
- package/src/op/builders-exports.test.ts +0 -49
- package/src/op/builders-typed.test.ts +164 -0
- package/src/op/builders.ts +123 -39
- package/src/op/composites/apply-op.ts +208 -0
- package/src/op/composites/composites.test.ts +366 -0
- package/src/op/composites/converge-op.test.ts +168 -0
- package/src/op/composites/converge-op.ts +214 -0
- package/src/op/composites/index.ts +26 -0
- package/src/op/composites/lexicon-upgrade-op.test.ts +68 -0
- package/src/op/composites/lexicon-upgrade-op.ts +134 -0
- package/src/op/composites/pipeline-audit-op.test.ts +25 -0
- package/src/op/composites/pipeline-audit-op.ts +78 -0
- package/src/op/composites/reconcile-op.test.ts +51 -0
- package/src/op/composites/reconcile-op.ts +107 -0
- package/src/op/composites/watch-op.ts +108 -0
- package/src/op/composites/workflow-audit-op.test.ts +25 -0
- package/src/op/composites/workflow-audit-op.ts +88 -0
- package/src/op/converge-rule.ts +12 -10
- package/src/op/cron.test.ts +128 -0
- package/src/op/cron.ts +149 -0
- package/src/op/discover-root.test.ts +105 -1
- package/src/op/discover.test.ts +6 -2
- package/src/op/discover.ts +84 -16
- package/src/op/duration.ts +21 -0
- package/src/op/effect-step.test.ts +26 -11
- package/src/op/emulator-lifecycle.ts +1 -2
- package/src/op/gate.ts +155 -0
- package/src/op/generate-pipeline.test.ts +65 -3
- package/src/op/generate-pipeline.ts +19 -2
- package/src/op/index.ts +39 -6
- package/src/op/local-executor.test.ts +163 -34
- package/src/op/local-executor.ts +370 -102
- package/src/op/local-output.test.ts +95 -11
- package/src/op/local-output.ts +33 -4
- package/src/op/op-ir.test.ts +281 -0
- package/src/op/op-ir.ts +417 -0
- package/src/op/op-verb-class.ts +19 -5
- package/src/op/op.test.ts +26 -5
- package/src/op/operator.test.ts +175 -6
- package/src/op/operator.ts +63 -16
- package/src/op/receipt-store.ts +1 -1
- package/src/op/resource.ts +20 -2
- package/src/op/runtime.ts +203 -0
- package/src/op/runtimes/local.test.ts +181 -0
- package/src/op/runtimes/local.ts +212 -0
- package/src/op/step-output-ref.ts +15 -13
- package/src/op/types.ts +84 -24
- package/src/ownership.ts +1 -1
- package/src/provenance.test.ts +6 -0
- package/src/provenance.ts +21 -1
- package/src/serializer-walker.test.ts +42 -0
- package/src/serializer-walker.ts +21 -2
- package/src/stack-output.ts +6 -1
- package/dist/cli/handlers/op-progress.d.ts +0 -90
- package/dist/cli/handlers/op-progress.d.ts.map +0 -1
- package/dist/cli/handlers/run-client.d.ts +0 -127
- package/dist/cli/handlers/run-client.d.ts.map +0 -1
- package/dist/cli/handlers/run-report.d.ts +0 -5
- package/dist/cli/handlers/run-report.d.ts.map +0 -1
- package/dist/components/temporal-codegen-loader.d.ts +0 -27
- package/dist/components/temporal-codegen-loader.d.ts.map +0 -1
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts +0 -37
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts.map +0 -1
- package/src/cli/handlers/op-progress.test.ts +0 -268
- package/src/cli/handlers/op-progress.ts +0 -248
- package/src/cli/handlers/run-client.test.ts +0 -82
- package/src/cli/handlers/run-client.ts +0 -219
- package/src/cli/handlers/run-report.test.ts +0 -62
- package/src/cli/handlers/run-report.ts +0 -122
- package/src/components/temporal-codegen-loader.ts +0 -41
- package/src/lint/rules/comp/comp004-gate-needs-temporal.ts +0 -66
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OPS013: a step-output reference (`stepOutput()`/`activity().out`, chant
|
|
3
|
+
* #1290) must name a step that precedes it, in scope (main `phases`, not
|
|
4
|
+
* `onFailure` or nested inside an `EffectStep`), with a registered
|
|
5
|
+
* `ActivityContract` whose `returns` schema the referenced path resolves
|
|
6
|
+
* against. Moved from a hosting lexicon's own TMP013 to core in #2122 (epic
|
|
7
|
+
* #2114 sub-issue 6), so it fires on every project that declares an Op — a
|
|
8
|
+
* project on the local runtime with no lexicons configured included.
|
|
9
|
+
*
|
|
10
|
+
* Same shape as OPS012 (`./ops012-activity-contract.ts`): the generic walk
|
|
11
|
+
* lives in `@intentius/chant/op`'s `validateStepOutputRefs`, over the same
|
|
12
|
+
* contract map this file builds from core's own base-activity contracts
|
|
13
|
+
* (`../../../op/activities/activity-contracts.ts`, #2117). A producer
|
|
14
|
+
* step whose `fn` has no registered contract is flagged (unlike OPS012's
|
|
15
|
+
* args/outcomeAttribute checks, which skip an unregistered `fn` — a
|
|
16
|
+
* reference has nothing to validate against without one, so it can't be
|
|
17
|
+
* silently allowed the way an unchecked arg can). The purely structural half
|
|
18
|
+
* of this check (an unknown step id, or a reference into a later phase) is
|
|
19
|
+
* independent of the contract map's contents entirely — no lexicon needs to
|
|
20
|
+
* be configured, and no activity needs a registered contract at all, for it
|
|
21
|
+
* to fire.
|
|
22
|
+
*
|
|
23
|
+
* Cross-lexicon (chant #2101): an Op step may call an activity any
|
|
24
|
+
* configured lexicon contributes (`terraformPlan`, `k3sInstall`,
|
|
25
|
+
* `flyApply`), and since this check became core-owned it fires on every
|
|
26
|
+
* project that declares an Op. `ctx.activityContracts` carries the contracts
|
|
27
|
+
* every configured lexicon declared, resolved by `loadActivityContracts`
|
|
28
|
+
* (`../../../op/activity-contract-registry.ts`) the same way
|
|
29
|
+
* `loadActivities` resolves the implementations, and is merged over the
|
|
30
|
+
* static table below. A context that carries none — a hand-built one in a
|
|
31
|
+
* test, a caller that has not loaded any — falls back to that table alone,
|
|
32
|
+
* exactly as before.
|
|
33
|
+
*
|
|
34
|
+
* That merge is what makes this rule usable at all on an Op whose steps are
|
|
35
|
+
* a lexicon's: before it, `terraformPlan` feeding `terraformApply` failed
|
|
36
|
+
* `chant build` for the absence of a contract the terraform lexicon does in
|
|
37
|
+
* fact declare, which is why both terraform examples carrying an Op kept it
|
|
38
|
+
* outside `src/` where the example-build harness could not see it.
|
|
39
|
+
*
|
|
40
|
+
* This check is what makes it safe for a lexicon's own serializer to compile
|
|
41
|
+
* every reference it finds unconditionally: `chant build` blocks file output
|
|
42
|
+
* while an error-severity post-synth finding stands, so generated code
|
|
43
|
+
* referencing an unresolved step never reaches disk (a lexicon's own Op
|
|
44
|
+
* serializer also runs the scope-only subset of this check directly —
|
|
45
|
+
* `validateStepOutputRefScope` — as defense-in-depth, chant #1950 pre-merge
|
|
46
|
+
* review finding 2).
|
|
47
|
+
*
|
|
48
|
+
* Cross-contract type compatibility (chant #1950 pre-merge review, finding
|
|
49
|
+
* 3): this rule also compares a producer's declared return type at `path`
|
|
50
|
+
* against the consumer's declared arg type at the same position
|
|
51
|
+
* (`string`/`number`/`boolean`/`object`/`array` only) and flags a mismatch —
|
|
52
|
+
* a string-returning path feeding a number-typed arg, for example.
|
|
53
|
+
* Deliberately shallow: a union, enum, literal, `z.any()`/`z.unknown()`, a
|
|
54
|
+
* transform, or a reference sitting inside an array in `args` all bail
|
|
55
|
+
* silently rather than being reasoned about. See `@intentius/chant/op`'s
|
|
56
|
+
* `step-output-ref.ts` module doc for the full writeup of what this catches
|
|
57
|
+
* and what it defers (to #1288 Stage 2).
|
|
58
|
+
*/
|
|
59
|
+
import type { PostSynthCheck } from "../../post-synth.js";
|
|
60
|
+
export declare const ops013: PostSynthCheck;
|
|
61
|
+
//# sourceMappingURL=ops013-step-output-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ops013-step-output-ref.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/ops013-step-output-ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;AAU9F,eAAO,MAAM,MAAM,EAAE,cA4BpB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OPS014: converge-rule-refusals (#1484). Moved from a hosting lexicon's own
|
|
3
|
+
* TMP014 to core in #2122 (epic #2114 sub-issue 6), so it fires on every
|
|
4
|
+
* project that declares a `ConvergeOp`-shaped Op, not only one with that
|
|
5
|
+
* lexicon configured.
|
|
6
|
+
*
|
|
7
|
+
* Cross-Op build-time refusals for a `ConvergeOp`'s rule table — the checks
|
|
8
|
+
* `../../../op/composites/converge-op.ts`'s factory can't make on its own,
|
|
9
|
+
* since they need the *whole* discovered graph of `Chant::Op` entities
|
|
10
|
+
* (`PostSynthContext.entities`), not just the ConvergeOp instance under
|
|
11
|
+
* construction: a sibling `*.op.ts` file's Op may not exist yet at the
|
|
12
|
+
* moment a composite factory runs, the same reason OPS012/OPS013 exist as
|
|
13
|
+
* post-synth checks rather than builder-time throws.
|
|
14
|
+
*
|
|
15
|
+
* A `ConvergeOp`-produced Op is identified by its own
|
|
16
|
+
* `labels.Converge === "true"` marker (mirroring `ApplyOp`'s
|
|
17
|
+
* `{ Apply: "true" }` / `WatchOp`'s `{ Watch: "true" }`); its rule table is
|
|
18
|
+
* read back off the `convergeTick` activity step's `args.rules` (there is no
|
|
19
|
+
* dedicated `OpConfig` field for it — see `../../../op/composites/
|
|
20
|
+
* converge-op.ts`'s doc on why the rule table travels as a step's args
|
|
21
|
+
* instead of a bespoke config field).
|
|
22
|
+
*
|
|
23
|
+
* Flags (pre-merge review of #1954 tightened the last three to match issue
|
|
24
|
+
* #1484's own Autonomy table — see `converge-op.ts`'s module doc):
|
|
25
|
+
* - a rule with no (or a blank) `why` — every rule must carry its
|
|
26
|
+
* rationale (Accessible Ops factor III),
|
|
27
|
+
* - a rule whose predicate isn't in the evaluable subset
|
|
28
|
+
* (`isWellFormedPredicate`, re-validated here as the runtime backstop
|
|
29
|
+
* over a rule table not authored through `when()`),
|
|
30
|
+
* - a `run()` action naming an Op no declared Op entity has as its `name`,
|
|
31
|
+
* - a `run()` action dispatching a `mutating` Op under any dial other than
|
|
32
|
+
* `"apply"` — the issue's Autonomy table gives `reconcile` "open PR", not
|
|
33
|
+
* "run directly"; opening a PR is out of v1 scope (epic #1487's
|
|
34
|
+
* `onDrift`-channel open question), so `reconcile` refuses the mutating
|
|
35
|
+
* dispatch rather than silently escalating it to "run directly",
|
|
36
|
+
* - a `run()` action dispatching a `destructive` Op under any dial,
|
|
37
|
+
* unconditionally — a converge tick runs unattended, on a schedule, with
|
|
38
|
+
* no one watching it fire. A destructive dispatch needs a human's
|
|
39
|
+
* approval *before* it is attempted, not a gate the tick consults after
|
|
40
|
+
* it has already committed to running the op — and `run()` has no way to
|
|
41
|
+
* ask first. (This used to be argued from the local executor's inability
|
|
42
|
+
* to honor a gate at all; as of #2119 a gated op ends the run `gated`
|
|
43
|
+
* rather than being refused, so that argument no longer holds — the
|
|
44
|
+
* refusal stands on the unattended-approval ground instead.) Durable,
|
|
45
|
+
* pre-approved destructive dispatch from a tick is a future design's to
|
|
46
|
+
* own; v1 refuses the target rather than shipping a path that dispatches
|
|
47
|
+
* a destructive op with no human in the loop,
|
|
48
|
+
* - a rule whose predicate reads `adoptCount` while its action is `run()`
|
|
49
|
+
* against a `mutating` Op — adopt safety (never auto-claiming an unowned
|
|
50
|
+
* resource) is enforced here, not merely documented: a rule that reads
|
|
51
|
+
* the adopt signal has no business dispatching a mutation.
|
|
52
|
+
*/
|
|
53
|
+
import type { PostSynthCheck } from "../../post-synth.js";
|
|
54
|
+
export declare const ops014: PostSynthCheck;
|
|
55
|
+
//# sourceMappingURL=ops014-converge-rule-refusals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ops014-converge-rule-refusals.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/ops014-converge-rule-refusals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;AAuB9F,eAAO,MAAM,MAAM,EAAE,cAuGpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared support for the OPS* Op-model post-synth checks (#2122, epic #2114
|
|
3
|
+
* sub-issue 6) — OPS012 (`./ops012-activity-contract.ts`), OPS013
|
|
4
|
+
* (`./ops013-step-output-ref.ts`) and OPS014
|
|
5
|
+
* (`./ops014-converge-rule-refusals.ts`), ported here from a hosting
|
|
6
|
+
* lexicon's own TMP012/TMP013/TMP014.
|
|
7
|
+
*
|
|
8
|
+
* Op-entity recognition is core's own `isOpEntity` (`../../../op/resource.ts`,
|
|
9
|
+
* #2118) — re-exported here so every OPS* check imports it from one place.
|
|
10
|
+
*/
|
|
11
|
+
export { isOpEntity } from "../../../op/resource.js";
|
|
12
|
+
//# sourceMappingURL=support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline HCL-comment suppression (chant #2111). This file is core's small,
|
|
3
|
+
* generic half of the mechanism. It filters already-produced
|
|
4
|
+
* `PostSynthDiagnostic`s against suppression directives an entity carries,
|
|
5
|
+
* with no knowledge of which lexicon produced that entity. The other half,
|
|
6
|
+
* reading `# chant-ignore` / `# chant-ignore-file` / `# chant-ignore-block`
|
|
7
|
+
* comments out of raw `.tf` text and attaching the result to each parsed
|
|
8
|
+
* entity, is terraform-specific and lives in
|
|
9
|
+
* `lexicons/terraform/src/hcl/suppressions.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Placement. The issue that asked for this weighed two options: a wrapper
|
|
12
|
+
* over `runPostSynthChecks` private to the terraform lexicon, or a
|
|
13
|
+
* `PostSynthContext` field every lexicon could share. Neither is quite what
|
|
14
|
+
* this file does. `ctx.entities` is already the one thing every
|
|
15
|
+
* `PostSynthContext` carries regardless of lexicon, and a suppression
|
|
16
|
+
* directive is inherently a fact ABOUT one entity, namely which block it
|
|
17
|
+
* anchors to, not a fact about the run as a whole. That is the same reasoning
|
|
18
|
+
* that already lets each lexicon's `Declarable` carry its own `props` shape
|
|
19
|
+
* (`TerraformEntity.props`, `K8sEntity.props`, and so on), so the hook here
|
|
20
|
+
* is a plain, duck-typed optional field, `suppressions`, that any entity MAY
|
|
21
|
+
* carry beside its `props`, read generically through `entitySuppressions()`
|
|
22
|
+
* below. Choosing this over a `PostSynthContext.suppressions` field needed no
|
|
23
|
+
* change to `PostSynthContext`, `Declarable`, or any of the places that
|
|
24
|
+
* construct a context (`./post-synth.ts`'s `runPostSynthChecks`, `chant
|
|
25
|
+
* audit`'s `../audit/core.ts`, and the two test-utils builders). Every one
|
|
26
|
+
* of them already hands `applyInlineSuppressions` below `ctx.entities`, so a
|
|
27
|
+
* lexicon that wants this (k8s manifests are the epic's other named
|
|
28
|
+
* candidate) adopts the convention on its own entities, with zero further
|
|
29
|
+
* core changes.
|
|
30
|
+
*
|
|
31
|
+
* `rules` (a project's `lint.rules`) is optional here on purpose. `chant
|
|
32
|
+
* build` has one to pass, so `ignorable: false` works there; `chant audit`'s
|
|
33
|
+
* audit-core path does not thread a project config through at all today, see
|
|
34
|
+
* `../audit/core.ts`, so it calls this with `rules` omitted. Every rule
|
|
35
|
+
* reads as ignorable in that path, the same default this module
|
|
36
|
+
* gives an unconfigured rule id everywhere else.
|
|
37
|
+
*/
|
|
38
|
+
import type { RuleConfig } from "./rule.js";
|
|
39
|
+
import type { PostSynthDiagnostic } from "./post-synth.js";
|
|
40
|
+
import type { Declarable } from "../declarable.js";
|
|
41
|
+
/** What a directive's id list names. `"all"` is the wildcard every form accepts. */
|
|
42
|
+
export type SuppressionIds = "all" | ReadonlySet<string>;
|
|
43
|
+
/** One `# chant-ignore*` comment, already parsed from raw source text. */
|
|
44
|
+
export interface SuppressionDirective {
|
|
45
|
+
/** Which of the three comment forms produced this directive. */
|
|
46
|
+
form: "chant-ignore" | "chant-ignore-file" | "chant-ignore-block";
|
|
47
|
+
/** Rule ids this directive names, or `"all"`. */
|
|
48
|
+
ids: SuppressionIds;
|
|
49
|
+
/** The `exp:YYYY-MM-DD` term, if present. */
|
|
50
|
+
expires?: string;
|
|
51
|
+
/** Source file the comment lives in. */
|
|
52
|
+
file: string;
|
|
53
|
+
/** 1-based line the comment ITSELF sits on (not the block it anchors to). */
|
|
54
|
+
line: number;
|
|
55
|
+
/**
|
|
56
|
+
* `chant-ignore-file` is only valid as the file's first non-blank line
|
|
57
|
+
* (tflint's own constraint on `tflint-ignore-file`, kept here so the form
|
|
58
|
+
* stays findable). A directive found elsewhere sets this instead of being
|
|
59
|
+
* applied; see `SUPPRESSION_MISPLACED_FILE_ID` below.
|
|
60
|
+
*/
|
|
61
|
+
misplaced?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Stable identity, for dedup across the several entities one directive can
|
|
64
|
+
* attach to. A file-level directive attaches to every entity parsed from
|
|
65
|
+
* its file, but an expired-or-misplaced report about it should appear once.
|
|
66
|
+
*/
|
|
67
|
+
key: string;
|
|
68
|
+
}
|
|
69
|
+
/** An expired suppression is reported once as its own finding, not dropped. */
|
|
70
|
+
export declare const SUPPRESSION_EXPIRED_ID = "SUPP001";
|
|
71
|
+
/** A `chant-ignore-file` found anywhere but the first non-blank line. */
|
|
72
|
+
export declare const SUPPRESSION_MISPLACED_FILE_ID = "SUPP002";
|
|
73
|
+
/** A directive explicitly names a rule id configured `ignorable: false`. */
|
|
74
|
+
export declare const SUPPRESSION_UNIGNORABLE_ID = "SUPP003";
|
|
75
|
+
export type SuppressionMetaCheckId = typeof SUPPRESSION_EXPIRED_ID | typeof SUPPRESSION_MISPLACED_FILE_ID | typeof SUPPRESSION_UNIGNORABLE_ID;
|
|
76
|
+
/**
|
|
77
|
+
* A finding about the suppression mechanism itself, not about a rule id a
|
|
78
|
+
* check would normally report, so it deliberately does not go through the
|
|
79
|
+
* audit catalog: nothing here is registered as a `PostSynthCheck`, so it
|
|
80
|
+
* never needs a `RuleMeta` entry, a lineage entry, or a full page.
|
|
81
|
+
*/
|
|
82
|
+
export interface SuppressionMetaFinding {
|
|
83
|
+
checkId: SuppressionMetaCheckId;
|
|
84
|
+
severity: "warning";
|
|
85
|
+
message: string;
|
|
86
|
+
file: string;
|
|
87
|
+
line: number;
|
|
88
|
+
}
|
|
89
|
+
export interface InlineSuppressionResult {
|
|
90
|
+
/** Diagnostics after inline suppression, matched ones removed. */
|
|
91
|
+
diagnostics: PostSynthDiagnostic[];
|
|
92
|
+
/** Diagnostics an inline directive suppressed, unaltered (counted, never dropped silently). */
|
|
93
|
+
suppressed: PostSynthDiagnostic[];
|
|
94
|
+
/** Findings about the suppression mechanism itself: expired, misplaced, or denied by `ignorable: false`. */
|
|
95
|
+
meta: SuppressionMetaFinding[];
|
|
96
|
+
}
|
|
97
|
+
/** Read an entity's directives, if it carries any (duck-typed; see module doc). */
|
|
98
|
+
export declare function entitySuppressions(entity: Declarable | undefined): readonly SuppressionDirective[];
|
|
99
|
+
/**
|
|
100
|
+
* Apply inline (`# chant-ignore*`) suppression to a set of post-synth
|
|
101
|
+
* diagnostics. `entities` is `ctx.entities`, the same map every
|
|
102
|
+
* `PostSynthContext` already carries. `rules` is the project's `lint.rules`,
|
|
103
|
+
* for `ignorable: false`; see this module's doc comment for why it is
|
|
104
|
+
* optional. `today` is injectable so an expiry test doesn't depend on the
|
|
105
|
+
* clock.
|
|
106
|
+
*/
|
|
107
|
+
export declare function applyInlineSuppressions(diagnostics: readonly PostSynthDiagnostic[], entities: Map<string, Declarable>, rules?: Record<string, RuleConfig>, today?: Date): InlineSuppressionResult;
|
|
108
|
+
//# sourceMappingURL=suppressions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressions.d.ts","sourceRoot":"","sources":["../../src/lint/suppressions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,oFAAoF;AACpF,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAEzD,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,IAAI,EAAE,cAAc,GAAG,mBAAmB,GAAG,oBAAoB,CAAC;IAClE,iDAAiD;IACjD,GAAG,EAAE,cAAc,CAAC;IACpB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,yEAAyE;AACzE,eAAO,MAAM,6BAA6B,YAAY,CAAC;AACvD,4EAA4E;AAC5E,eAAO,MAAM,0BAA0B,YAAY,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAC9B,OAAO,sBAAsB,GAC7B,OAAO,6BAA6B,GACpC,OAAO,0BAA0B,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,sBAAsB,CAAC;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,uBAAuB;IACtC,kEAAkE;IAClE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,+FAA+F;IAC/F,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,4GAA4G;IAC5G,IAAI,EAAE,sBAAsB,EAAE,CAAC;CAChC;AAED,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,oBAAoB,EAAE,CAIlG;AAqBD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,mBAAmB,EAAE,EAC3C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAClC,KAAK,GAAE,IAAiB,GACvB,uBAAuB,CAyDzB"}
|
package/dist/live-endpoint.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ import { type EmulatorDeclaration } from "./op/emulator-lifecycle.js";
|
|
|
40
40
|
* The ambient endpoint vars a lexicon honors, from its emulator capability.
|
|
41
41
|
*
|
|
42
42
|
* A lexicon with no emulator contributes nothing, which is the same answer the
|
|
43
|
-
* hand-maintained map gave for k8s
|
|
43
|
+
* hand-maintained map gave for k8s and gcp — they resolve their live
|
|
44
44
|
* target from `chant.config` itself, so there is nothing to inject.
|
|
45
45
|
*/
|
|
46
46
|
export declare function endpointEnvVarsFor(lexicon: EndpointLexicon): string[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Activity contracts for core's own `op/activities` (chant #1288
|
|
3
|
+
* Stage 1). Each contract's `args` schema mirrors the corresponding
|
|
4
|
+
* `*Args` interface in `./activities/*.ts` — kept alongside the
|
|
5
|
+
* implementation, the way the issue asked for, and validated by
|
|
6
|
+
* `chant build` via `tmp012` (the OPS012 activity-contract rule).
|
|
7
|
+
*
|
|
8
|
+
* Author `args` with `z.strictObject(...)`, never `z.object(...)`: the
|
|
9
|
+
* default form silently drops a key it doesn't recognize instead of
|
|
10
|
+
* rejecting it, which reproduces the exact bug this issue is about
|
|
11
|
+
* (`helmInstall("api", "./chart", { nameSpace: "prod" })` — the misspelled
|
|
12
|
+
* key vanishes rather than failing the build).
|
|
13
|
+
*
|
|
14
|
+
* Deliberately partial. Only activities with args simple enough for a zod
|
|
15
|
+
* mirror to earn its keep are covered here — `kubectlApply`/`helmInstall`/
|
|
16
|
+
* the cloud appliers carry a dozen-plus fields each with real cross-field
|
|
17
|
+
* logic (see `KubectlApplyArgs`, `HelmInstallArgs`), and forcing those
|
|
18
|
+
* through a duplicate schema is exactly the maintenance burden Stage 2
|
|
19
|
+
* (regenerating the step builders as fully typed wrappers) is meant to
|
|
20
|
+
* avoid by deriving types instead of restating them. A step calling an
|
|
21
|
+
* activity with no registered contract here is skipped by `tmp012`, not
|
|
22
|
+
* flagged — see `activityContract`'s doc in `../activity-contract` for why
|
|
23
|
+
* that's the intended, non-breaking default.
|
|
24
|
+
*/
|
|
25
|
+
export declare const lifecycleSnapshotContract: import("../index.js").ActivityContract<{
|
|
26
|
+
env: string;
|
|
27
|
+
}, never>;
|
|
28
|
+
export declare const lifecycleDiffContract: import("../index.js").ActivityContract<{
|
|
29
|
+
env: string;
|
|
30
|
+
live?: boolean | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
output: string;
|
|
33
|
+
exitCode: number;
|
|
34
|
+
drifted: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const shellCmdContract: import("../index.js").ActivityContract<{
|
|
37
|
+
cmd: string;
|
|
38
|
+
env?: Record<string, string> | undefined;
|
|
39
|
+
cwd?: string | undefined;
|
|
40
|
+
}, never>;
|
|
41
|
+
export declare const httpCheckContract: import("../index.js").ActivityContract<{
|
|
42
|
+
url: string;
|
|
43
|
+
method?: string | undefined;
|
|
44
|
+
status?: number | undefined;
|
|
45
|
+
contains?: string | undefined;
|
|
46
|
+
retries?: number | undefined;
|
|
47
|
+
intervalMs?: number | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
status: number;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const chantTeardownContract: import("../index.js").ActivityContract<{
|
|
52
|
+
path: string;
|
|
53
|
+
}, never>;
|
|
54
|
+
//# sourceMappingURL=activity-contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-contracts.d.ts","sourceRoot":"","sources":["../../../src/op/activities/activity-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,eAAO,MAAM,yBAAyB;;SAGrC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;EAIjC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;SAG5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;EAgB7B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;SAGjC,CAAC"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `nativeApply` — push declared source to the cloud through the target's own
|
|
3
|
+
* mechanism. Authority stays with the platform; chant hosts no state file.
|
|
4
|
+
*
|
|
5
|
+
* ## Where the shell went (chant #1075, #1448, #1449)
|
|
6
|
+
*
|
|
7
|
+
* This used to build a shell command for every target — `kubectl apply -f`,
|
|
8
|
+
* `az deployment group create`, `aws cloudformation deploy`. Two things were
|
|
9
|
+
* wrong with that. The shell commands carried product knowledge that belongs to
|
|
10
|
+
* each product's lexicon, against the one-lexicon-per-product rule that already
|
|
11
|
+
* moved `kubectlApply`, `k3dUp`/`k3dDown` and `waitForArgoSync` out (chant
|
|
12
|
+
* #809). And each CLI's semantics diverged from what the docblocks promised —
|
|
13
|
+
* `kubectl apply`'s client-side merge gave the diff engine nothing to key on
|
|
14
|
+
* (#1075), and ARM Complete mode deleted resources chant never applied (#1448).
|
|
15
|
+
*
|
|
16
|
+
* So each branch moved to its product's lexicon: `kubectl`/`kustomize` are a
|
|
17
|
+
* server-side apply over the k8s lexicon's typed client (#1075, #1548), `arm`
|
|
18
|
+
* is the azure lexicon's per-resource `azApply` (#1448), `cloudformation`
|
|
19
|
+
* is the aws lexicon's `awsApply` — the CloudFormation Query API directly, no
|
|
20
|
+
* CLI in the path (#1449) — and `gcp`/`fly` are the gcp lexicon's
|
|
21
|
+
* per-resource `gcpApply` and the fly lexicon's `flyApply`, which never had a
|
|
22
|
+
* CLI in the path to begin with: gcp maps each CNRM kind to its REST API
|
|
23
|
+
* itself, and fly speaks the Machines API (flaps) directly, no flyctl.
|
|
24
|
+
* **The dispatcher stayed here**, because "which
|
|
25
|
+
* mechanism applies this target" is not any one product's knowledge — and
|
|
26
|
+
* because the activity keeps its name, its arguments and its place in
|
|
27
|
+
* `ApplyOp`, so no existing Op changes shape.
|
|
28
|
+
*
|
|
29
|
+
* The lexicons are reached by dynamic import at call time, never by a static
|
|
30
|
+
* one: this package must not depend on them. A project applying a target
|
|
31
|
+
* already lists that lexicon in its config, so the module is there; when it is
|
|
32
|
+
* not, the failure names the package to install.
|
|
33
|
+
*/
|
|
34
|
+
import { type ApplyResult } from "../../apply.js";
|
|
35
|
+
/** The native apply mechanism for a target. */
|
|
36
|
+
export type ApplyTarget = "cloudformation" | "kubectl" | "arm" | "kustomize" | "gcp" | "fly";
|
|
37
|
+
/**
|
|
38
|
+
* How apply treats resources no longer declared.
|
|
39
|
+
* - `never` — additive only; never deletes.
|
|
40
|
+
* - `owned-only` — enables the target's own delete path. What bounds that path
|
|
41
|
+
* differs per target, and all of them are genuinely owned-only: `kubectl`
|
|
42
|
+
* sweeps by the ownership marker, `arm` prunes by the ownership tag
|
|
43
|
+
* (`isChantOwned`, via the azure lexicon's `azApply`), `gcp` prunes by the
|
|
44
|
+
* ownership label (via the gcp lexicon's `gcpApply` — only kinds it can
|
|
45
|
+
* list; the rest are reported not-prunable), `fly` prunes machines by the
|
|
46
|
+
* metadata marker and the metadata-less types (volumes/ips/certs/secrets)
|
|
47
|
+
* app-scoped under a managed app (via the fly lexicon's `flyApply`), and
|
|
48
|
+
* `cloudformation` is bounded by the stack — which holds, because a
|
|
49
|
+
* resource CFN did not create is not in the stack.
|
|
50
|
+
* - `gated` — same delete scope as `owned-only`, but an approval gate precedes
|
|
51
|
+
* the destructive apply, so an unapproved run ends `gated` before deleting
|
|
52
|
+
* anything (the gate lives in the composite).
|
|
53
|
+
*/
|
|
54
|
+
export type DeleteMode = "never" | "owned-only" | "gated";
|
|
55
|
+
export interface NativeApplyArgs {
|
|
56
|
+
/** Native mechanism to delegate to. */
|
|
57
|
+
target: ApplyTarget;
|
|
58
|
+
/** Environment. What it means is per target: the CFN stack name on
|
|
59
|
+
* `cloudformation`, the ARM resource group on `arm`, the chant environment
|
|
60
|
+
* on `kubectl`/`kustomize`. On `gcp` and `fly` it is a log label only — the
|
|
61
|
+
* gcp applier resolves the project (`GOOGLE_CLOUD_PROJECT` env / CNRM
|
|
62
|
+
* annotation) and endpoint (`GCP_ENDPOINT_URL` env) itself, and the fly
|
|
63
|
+
* applier resolves its endpoint (`FLY_FLAPS_BASE_URL` env) and token
|
|
64
|
+
* (`FLY_API_TOKEN` env) itself, with the app names coming from the plan. */
|
|
65
|
+
env: string;
|
|
66
|
+
/** Built manifest/template path. Default per target ({@link defaultOutput}):
|
|
67
|
+
* `dist` (a dir) for kubectl, `template.json` (a file) for
|
|
68
|
+
* CloudFormation/ARM, `dist/gcp.yaml` for gcp, `dist/fly.json` for fly. */
|
|
69
|
+
output?: string;
|
|
70
|
+
/** Delete handling. Default: never. */
|
|
71
|
+
deleteMode?: DeleteMode;
|
|
72
|
+
/**
|
|
73
|
+
* kubectl target only (chant #1075). Take ownership of fields another field
|
|
74
|
+
* manager owns instead of failing with a conflict that names them.
|
|
75
|
+
* **Opt-in, and never defaulted on**: transferring ownership of a live field
|
|
76
|
+
* is a decision, not a retry.
|
|
77
|
+
*/
|
|
78
|
+
forceConflicts?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* What an apply did — one shape for every target: the count projection of
|
|
82
|
+
* core's `NormalizedApply` (#1446, collapsed here in #1449). The per-target
|
|
83
|
+
* shapes this used to carry (`fieldManager`, `stackName`/`status`/`action`,
|
|
84
|
+
* a separate `notPrunable`) belong to the appliers and stay in their lexicons;
|
|
85
|
+
* this activity's result is the shape every Op reads back regardless of
|
|
86
|
+
* target, and the target-specific detail still reaches the operator on the
|
|
87
|
+
* activity log.
|
|
88
|
+
*/
|
|
89
|
+
export interface NativeApplyResult {
|
|
90
|
+
/** Resources the provider was called for and which converged — created,
|
|
91
|
+
* updated or unchanged. On `cloudformation` the unit is the stack, so a
|
|
92
|
+
* settled deploy is `1`. */
|
|
93
|
+
applied: number;
|
|
94
|
+
/** Owned, no-longer-declared resources deleted. */
|
|
95
|
+
pruned: number;
|
|
96
|
+
/** Declared resources no provider call was made for (#1447), including
|
|
97
|
+
* kinds an owned-only prune could not consider (`not-prunable`). Zero on a
|
|
98
|
+
* complete apply. */
|
|
99
|
+
notAttempted: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The k8s lexicon's server-side apply, as this module needs to call it.
|
|
103
|
+
* Structural, so nothing here imports the k8s lexicon's types.
|
|
104
|
+
*/
|
|
105
|
+
export type K8sApplier = (args: {
|
|
106
|
+
manifest: string;
|
|
107
|
+
/** Already-rendered documents (#1548) — the kustomize target hands the
|
|
108
|
+
* render straight in; `manifest` is then only the log label. */
|
|
109
|
+
documents?: Array<Record<string, unknown>>;
|
|
110
|
+
environment?: string;
|
|
111
|
+
deleteMode?: DeleteMode;
|
|
112
|
+
force?: boolean;
|
|
113
|
+
}, signal?: AbortSignal) => Promise<{
|
|
114
|
+
applied: unknown[];
|
|
115
|
+
pruned: unknown[];
|
|
116
|
+
fieldManager: string;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* The azure lexicon's per-resource ARM applier, as this module needs to call
|
|
120
|
+
* it: `azApply` composed with the lexicon's own `toApplyResult` projection, so
|
|
121
|
+
* what crosses this seam is core's versioned apply envelope (#1446) and
|
|
122
|
+
* nothing ARM-shaped.
|
|
123
|
+
*/
|
|
124
|
+
export type AzureApplier = (args: {
|
|
125
|
+
templatePath: string;
|
|
126
|
+
resourceGroup: string;
|
|
127
|
+
endpoint?: string;
|
|
128
|
+
prune?: boolean;
|
|
129
|
+
}, signal?: AbortSignal) => Promise<ApplyResult>;
|
|
130
|
+
/**
|
|
131
|
+
* The gcp lexicon's per-resource applier, as this module needs to call it
|
|
132
|
+
* (#1449): `gcpApply` composed with the lexicon's own `toApplyResult`
|
|
133
|
+
* projection, so what crosses this seam is core's versioned apply envelope
|
|
134
|
+
* (#1446) — the skips of #1447 ride it as NOT-ATTEMPTED entries, and a kind
|
|
135
|
+
* the prune could not consider rides it as `not-prunable`.
|
|
136
|
+
*
|
|
137
|
+
* Deliberately narrow: no `endpoint`, because `gcpApply` resolves
|
|
138
|
+
* `GCP_ENDPOINT_URL` itself — the same variable gcp's read path honours, so an
|
|
139
|
+
* apply lands wherever `--live` is already looking (floci-gcp, or real GCP
|
|
140
|
+
* when unset); and no `project`, because `gcpApply` resolves
|
|
141
|
+
* `GOOGLE_CLOUD_PROJECT` / the CNRM project-id annotation itself.
|
|
142
|
+
*/
|
|
143
|
+
export type GcpApplier = (args: {
|
|
144
|
+
manifestPath: string;
|
|
145
|
+
prune?: boolean;
|
|
146
|
+
}, signal?: AbortSignal) => Promise<ApplyResult>;
|
|
147
|
+
/**
|
|
148
|
+
* The fly lexicon's flaps applier, as this module needs to call it (#1449):
|
|
149
|
+
* `flyApply` composed with the lexicon's own `toApplyResult` projection. The
|
|
150
|
+
* eleven arrays flyApply returns — six entity classes applied, five pruned —
|
|
151
|
+
* are its own contract and stay in the fly lexicon; what crosses this seam is
|
|
152
|
+
* core's versioned apply envelope (#1446).
|
|
153
|
+
*
|
|
154
|
+
* Deliberately narrow: no `endpoint`, because `flyApply` resolves
|
|
155
|
+
* `FLY_FLAPS_BASE_URL` itself — mudflaps locally, real Fly when unset; and no
|
|
156
|
+
* `token`, because it resolves `FLY_API_TOKEN` itself.
|
|
157
|
+
*/
|
|
158
|
+
export type FlyApplier = (args: {
|
|
159
|
+
planPath: string;
|
|
160
|
+
prune?: boolean;
|
|
161
|
+
}, signal?: AbortSignal) => Promise<ApplyResult>;
|
|
162
|
+
/**
|
|
163
|
+
* The aws lexicon's CloudFormation applier, as this module needs to call it
|
|
164
|
+
* (#1449). Structural, like {@link K8sApplier} and {@link AzureApplier}.
|
|
165
|
+
*
|
|
166
|
+
* Deliberately narrow: no `endpoint`, because `awsApply` resolves
|
|
167
|
+
* `AWS_ENDPOINT_URL_CLOUDFORMATION` then `AWS_ENDPOINT_URL` itself (#1694) —
|
|
168
|
+
* the rule that used to live here as `applyEndpoint` (#926); and no
|
|
169
|
+
* `capabilities`, because `awsApply` derives them from the template body
|
|
170
|
+
* (`CAPABILITY_NAMED_IAM`, plus `CAPABILITY_AUTO_EXPAND` for a top-level
|
|
171
|
+
* `Transform` — #980), the rule that used to live here as `cfnCapabilities`.
|
|
172
|
+
*/
|
|
173
|
+
export type AwsApplier = (args: {
|
|
174
|
+
templatePath: string;
|
|
175
|
+
stackName: string;
|
|
176
|
+
}, signal?: AbortSignal) => Promise<{
|
|
177
|
+
stackName: string;
|
|
178
|
+
status: string;
|
|
179
|
+
action: "created" | "updated" | "unchanged";
|
|
180
|
+
}>;
|
|
181
|
+
/**
|
|
182
|
+
* The aws lexicon's CloudFormation rollback (saga compensation), as
|
|
183
|
+
* {@link compensateApply} needs to call it. Structural, like the appliers.
|
|
184
|
+
*/
|
|
185
|
+
export type AwsRollback = (args: {
|
|
186
|
+
stackName: string;
|
|
187
|
+
}, signal?: AbortSignal) => Promise<{
|
|
188
|
+
stackName: string;
|
|
189
|
+
rolledBack: boolean;
|
|
190
|
+
status?: string;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* Sensible default build output per target. kubectl takes a directory (all
|
|
194
|
+
* manifests), so `dist`; kustomize's "output" is the kustomization DIRECTORY
|
|
195
|
+
* the render reads. The file targets take the file their lexicon's build
|
|
196
|
+
* conventionally emits: `template.json` for CloudFormation/ARM, `dist/gcp.yaml`
|
|
197
|
+
* (the CNRM manifest) for gcp, `dist/fly.json` (the serialized plan) for fly.
|
|
198
|
+
* Pure — exported for testing.
|
|
199
|
+
*/
|
|
200
|
+
export declare function defaultOutput(target: ApplyTarget): string;
|
|
201
|
+
/**
|
|
202
|
+
* Apply declared source to the cloud via the target's native mechanism.
|
|
203
|
+
* Deletes (when enabled) ride that mechanism's own delete path — marker-scoped
|
|
204
|
+
* on `kubectl`, tag-scoped on `arm`, label-scoped on `gcp`, marker- and
|
|
205
|
+
* app-scoped on `fly`, and stack-scoped on `cloudformation`, where the deploy
|
|
206
|
+
* itself removes resources dropped from the template and `deleteMode` changes
|
|
207
|
+
* nothing: a resource CFN did not create is not in the stack. See
|
|
208
|
+
* {@link DeleteMode}.
|
|
209
|
+
*
|
|
210
|
+
* The appliers are injectable so this dispatcher can be tested without the
|
|
211
|
+
* product lexicons present; production resolves them through
|
|
212
|
+
* {@link loadK8sApplier} / {@link loadAzureApplier} / {@link loadAwsApplier} /
|
|
213
|
+
* {@link loadGcpApplier} / {@link loadFlyApplier}.
|
|
214
|
+
*/
|
|
215
|
+
export declare function nativeApply(args: NativeApplyArgs, signal?: AbortSignal, applier?: K8sApplier, azureApplier?: AzureApplier, renderer?: (dir: string) => Promise<Array<Record<string, unknown>>>, awsApplier?: AwsApplier, gcpApplier?: GcpApplier, flyApplier?: FlyApplier): Promise<NativeApplyResult>;
|
|
216
|
+
/**
|
|
217
|
+
* Whether a target has a mapped native rollback for {@link compensateApply} to
|
|
218
|
+
* run without an explicit `compensate.command`. `cloudformation` is the only
|
|
219
|
+
* one today — the aws lexicon's `rollbackStack`. This is the totality
|
|
220
|
+
* predicate `ApplyOp` checks at build time (#1449): a target outside it with
|
|
221
|
+
* no command has nothing a compensation could run, so the op refuses to build
|
|
222
|
+
* with compensation on rather than warn at rollback time.
|
|
223
|
+
*/
|
|
224
|
+
export declare function hasNativeRollback(target: ApplyTarget): boolean;
|
|
225
|
+
export interface CompensateApplyArgs {
|
|
226
|
+
/** Native mechanism that was applied. */
|
|
227
|
+
target: ApplyTarget;
|
|
228
|
+
/** Environment — CFN stack name / ARM resource group. */
|
|
229
|
+
env: string;
|
|
230
|
+
/** Explicit rollback command, used in preference to the native default. */
|
|
231
|
+
command?: string;
|
|
232
|
+
}
|
|
233
|
+
/** What a compensation did. */
|
|
234
|
+
export interface CompensateApplyResult {
|
|
235
|
+
/** The explicit rollback command that ran, when one was supplied. */
|
|
236
|
+
command?: string;
|
|
237
|
+
/** The stack rolled back — cloudformation. */
|
|
238
|
+
stackName?: string;
|
|
239
|
+
/** Whether the native rollback actually ran — cloudformation. `false` when
|
|
240
|
+
* the stack was absent or the target does not implement RollbackStack (Floci). */
|
|
241
|
+
rolledBack?: boolean;
|
|
242
|
+
/** The settled post-rollback stack status — cloudformation. */
|
|
243
|
+
status?: string;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Compensation step (saga rollback) for a partial apply failure. Runs the
|
|
247
|
+
* explicit `command` if given; otherwise `cloudformation` rolls back natively
|
|
248
|
+
* through the aws lexicon's `rollbackStack` (#1449 — CloudFormation
|
|
249
|
+
* `RollbackStack` over the Query API, no CLI in the path).
|
|
250
|
+
*
|
|
251
|
+
* Compensation is total for built ops: `ApplyOp` refuses at build time to wire
|
|
252
|
+
* this activity for a target with neither a native rollback
|
|
253
|
+
* ({@link hasNativeRollback}) nor an explicit `command`, so the no-rollback
|
|
254
|
+
* branch below is unreachable from an op it built. It stays as a throw, not a
|
|
255
|
+
* warn — a hand-assembled op that reaches it must fail loudly, because partial
|
|
256
|
+
* state should never look reverted when it isn't.
|
|
257
|
+
*
|
|
258
|
+
* `rollback` is injectable for tests; production resolves it through
|
|
259
|
+
* {@link loadAwsRollback}.
|
|
260
|
+
*/
|
|
261
|
+
export declare function compensateApply(args: CompensateApplyArgs, signal?: AbortSignal, rollback?: AwsRollback): Promise<CompensateApplyResult>;
|
|
262
|
+
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/op/activities/apply.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ChantBuildArgs {
|
|
2
|
+
path: string;
|
|
3
|
+
/** npm script to run. Default: `build`. Set e.g. `build:aws` to build one target. */
|
|
4
|
+
script?: string;
|
|
5
|
+
/** Optional extra env vars to pass to the build command. */
|
|
6
|
+
env?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Run an npm build script (`build` by default) in the given project directory.
|
|
10
|
+
* Uses fastIdempotent profile — 5m timeout, 3 retries.
|
|
11
|
+
*/
|
|
12
|
+
export declare function chantBuild(args: ChantBuildArgs, signal?: AbortSignal): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/op/activities/build.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ1F"}
|