@intentius/chant 0.57.0 → 0.59.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 +36 -1
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts +26 -9
- 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/carve-bridge.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/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 +13 -0
- 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 +12 -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/plugins.d.ts +22 -0
- package/dist/cli/plugins.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +40 -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 +24 -22
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +21 -6
- 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 +73 -37
- 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 +10 -22
- 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/detectLexicon.d.ts +13 -0
- package/dist/detectLexicon.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/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 +273 -16
- 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 +79 -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 +149 -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 +85 -30
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/change-signal.d.ts +91 -0
- package/dist/op/change-signal.d.ts.map +1 -0
- package/dist/op/composites/apply-op.d.ts +118 -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-name.d.ts +40 -0
- package/dist/op/gate-name.d.ts.map +1 -0
- package/dist/op/gate-summary.d.ts +43 -0
- package/dist/op/gate-summary.d.ts.map +1 -0
- 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 +29 -9
- 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 +185 -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 +93 -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 +96 -29
- 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/terraform/bridge.d.ts +26 -7
- package/dist/terraform/bridge.d.ts.map +1 -1
- package/dist/terraform/carve-provider.d.ts +28 -2
- package/dist/terraform/carve-provider.d.ts.map +1 -1
- package/dist/terraform/data-source-shape.d.ts +77 -0
- package/dist/terraform/data-source-shape.d.ts.map +1 -0
- package/dist/terraform/graph.d.ts.map +1 -1
- package/dist/terraform/providers/kubernetes.d.ts +5 -0
- package/dist/terraform/providers/kubernetes.d.ts.map +1 -1
- package/dist/terraform/tier-map.d.ts +16 -4
- package/dist/terraform/tier-map.d.ts.map +1 -1
- package/dist/terraform/types.d.ts +8 -0
- package/dist/terraform/types.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 +84 -18
- package/src/audit/discover.test.ts +39 -0
- package/src/audit/discover.ts +202 -18
- 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 +191 -11
- package/src/cli/commands/audit.ts +78 -28
- package/src/cli/commands/build.test.ts +330 -9
- package/src/cli/commands/build.ts +170 -24
- package/src/cli/commands/carve-bridge.test.ts +237 -14
- package/src/cli/commands/carve-bridge.ts +21 -17
- package/src/cli/commands/carve-emit-k8s.test.ts +17 -10
- 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/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 +194 -1
- package/src/cli/commands/lint.ts +205 -7
- 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 +341 -55
- package/src/cli/handlers/run.test.ts +568 -1295
- package/src/cli/handlers/run.ts +446 -912
- package/src/cli/main.test.ts +22 -16
- package/src/cli/main.ts +66 -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/plugins.test.ts +68 -2
- package/src/cli/plugins.ts +39 -0
- package/src/cli/registry.ts +40 -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 +4 -3
- package/src/components/__fixtures__/neo4j-fanout.json +1 -1
- 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 +28 -12
- package/src/components/cli-support.ts +60 -47
- package/src/components/component-schema.test.ts +18 -2
- package/src/components/component.schema.json +18 -5
- package/src/components/component.test.ts +2 -2
- package/src/components/component.ts +27 -7
- package/src/components/config-defaults.test.ts +2 -2
- package/src/components/driver-output.ts +14 -2
- package/src/components/driver.test.ts +109 -20
- package/src/components/driver.ts +201 -84
- 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/neo4j-fanout.pilot.ts +3 -3
- 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.test.ts +19 -0
- package/src/components/verbs/run-agent.ts +12 -24
- 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/detectLexicon.ts +18 -1
- package/src/discovery/collect.test.ts +3 -3
- package/src/discovery/files.ts +4 -4
- package/src/discovery/fold-import.test.ts +1 -1
- 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 +82 -2
- 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 +3 -3
- package/src/graph-ops.ts +1 -1
- package/src/held-elsewhere.test.ts +102 -0
- package/src/held-elsewhere.ts +114 -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 +296 -16
- 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 +154 -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/pipeline-change-gate.test.ts +2 -2
- 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 +27 -1
- package/src/lint/rules/comp/comp004-gate-needs-durable-runtime.ts +76 -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 +161 -0
- package/src/op/activities/reconcile.ts +354 -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 +125 -41
- package/src/op/change-signal.test.ts +117 -0
- package/src/op/change-signal.ts +169 -0
- package/src/op/composites/apply-op.ts +218 -0
- package/src/op/composites/composites.test.ts +379 -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 +110 -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 +29 -14
- package/src/op/emulator-lifecycle.ts +1 -2
- package/src/op/gate-name.test.ts +65 -0
- package/src/op/gate-name.ts +60 -0
- package/src/op/gate-summary.ts +84 -0
- 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 +48 -8
- package/src/op/local-executor.test.ts +178 -34
- package/src/op/local-executor.ts +371 -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 +292 -0
- package/src/op/op-ir.ts +419 -0
- package/src/op/op-verb-class.test.ts +2 -2
- package/src/op/op-verb-class.ts +19 -5
- package/src/op/op.test.ts +28 -7
- package/src/op/operator.test.ts +543 -6
- package/src/op/operator.ts +203 -20
- 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 +106 -26
- 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/terraform/aws-resources.test.ts +13 -4
- package/src/terraform/bridge.test.ts +22 -9
- package/src/terraform/bridge.ts +89 -28
- package/src/terraform/carve-provider.ts +38 -2
- package/src/terraform/data-source-shape.ts +95 -0
- package/src/terraform/graph.ts +35 -7
- package/src/terraform/providers/kubernetes.ts +48 -2
- package/src/terraform/tier-map.ts +21 -6
- package/src/terraform/types.ts +8 -0
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Declarable } from "../declarable.js";
|
|
2
|
+
import type { ActivityContract } from "../op/activity-contract.js";
|
|
2
3
|
import type { SerializerResult } from "../serializer.js";
|
|
3
4
|
import type { Severity } from "./rule.js";
|
|
4
5
|
import { type OutputDoc } from "./output-docs.js";
|
|
@@ -36,6 +37,22 @@ export interface PostSynthContext {
|
|
|
36
37
|
* with `ctx.docs ?? []` only when a context's provenance is unknown.
|
|
37
38
|
*/
|
|
38
39
|
readonly docs?: OutputDoc[];
|
|
40
|
+
/**
|
|
41
|
+
* Activity contracts resolved across every lexicon this build configured
|
|
42
|
+
* (chant #2101), keyed by activity name — core's own plus whatever each
|
|
43
|
+
* lexicon contributes at `@intentius/chant-lexicon-<name>/op/activity-contracts`
|
|
44
|
+
* or through its plugin. Filled in by `chant build`, `chant lint` and
|
|
45
|
+
* `check-lexicon`'s example harness via `loadActivityContracts`.
|
|
46
|
+
*
|
|
47
|
+
* The checks that validate Op steps against contracts (OPS012 and OPS013,
|
|
48
|
+
* `./rules/op/`) merge this over their own statically imported table with
|
|
49
|
+
* `mergeActivityContracts`, so an Op calling `terraformPlan` or
|
|
50
|
+
* `k3sInstall` validates against the contract the owning lexicon declared
|
|
51
|
+
* instead of failing for the absence of one. Optional, and absent from a
|
|
52
|
+
* hand-built context: a check must behave as it did before this existed
|
|
53
|
+
* when it is `undefined`.
|
|
54
|
+
*/
|
|
55
|
+
readonly activityContracts?: ReadonlyMap<string, ActivityContract>;
|
|
39
56
|
/** Raw build result object */
|
|
40
57
|
buildResult: {
|
|
41
58
|
outputs: Map<string, string | SerializerResult>;
|
|
@@ -87,6 +104,14 @@ export declare function getAdditionalFiles(output: string | SerializerResult): R
|
|
|
87
104
|
* comment (`chant-disable`) suppression is out of scope for post-synth
|
|
88
105
|
* findings — see `./config.ts`'s `applyConfiguredSeverity` doc for the full
|
|
89
106
|
* reasoning and what suppression surface post-synth findings get instead.
|
|
107
|
+
*
|
|
108
|
+
* chant #2111 finds a narrower anchor that does generalize: `./suppressions.ts`'s
|
|
109
|
+
* `applyInlineSuppressions` matches `entity` against `ctx.entities` (a map key
|
|
110
|
+
* every context already carries, source-level, before serialization), not
|
|
111
|
+
* against a name in the synthesized OUTPUT. A lexicon whose entities carry a
|
|
112
|
+
* `suppressions` field (see that file's module doc) gets inline `# chant-
|
|
113
|
+
* ignore`-style comments this way; one that doesn't is unaffected, and this
|
|
114
|
+
* interface's own contract (no `file`/`line`) is unchanged either way.
|
|
90
115
|
*/
|
|
91
116
|
export interface PostSynthDiagnostic {
|
|
92
117
|
/** ID of the check that produced this diagnostic */
|
|
@@ -103,6 +128,30 @@ export interface PostSynthDiagnostic {
|
|
|
103
128
|
entity?: string;
|
|
104
129
|
/** Optional lexicon related to this diagnostic */
|
|
105
130
|
lexicon?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Set when the finding is that something does not exist, rather than that
|
|
133
|
+
* something present is wrong (chant #2113). TF001 (no remote backend) is
|
|
134
|
+
* the motivating case: there is no resource to set `entity` to, only the
|
|
135
|
+
* scope that is missing one. Snyk's policy-engine spec names this the
|
|
136
|
+
* "missing-resource" archetype (a `deny` whose `info` carries a
|
|
137
|
+
* `resource_type` instead of a `resource`, because there is nothing to
|
|
138
|
+
* attach to) and is the only tool in chant's TF-family survey with a
|
|
139
|
+
* first-class shape for it; trivy's own inline-ignore comments admit they
|
|
140
|
+
* cannot suppress an absence finding for exactly this reason. `kind` names
|
|
141
|
+
* what is missing (a `backend`/`cloud` block, a required resource type);
|
|
142
|
+
* `scope` names where it is missing (a root module name, a file). Renders
|
|
143
|
+
* distinctly in all three reporters (stylish/JSON/SARIF, `../cli/commands/
|
|
144
|
+
* audit.ts` and `../audit/report-model.ts`) instead of falling back to
|
|
145
|
+
* `entity`, and gives #2111's HCL suppression a block-anchored key to
|
|
146
|
+
* suppress an absence finding by (the block that *should* declare `kind`
|
|
147
|
+
* inside `scope`), independent of whatever `entity` this diagnostic sets.
|
|
148
|
+
*/
|
|
149
|
+
missing?: {
|
|
150
|
+
/** What kind of thing is absent (e.g. `"backend"`, `"cloud"`). */
|
|
151
|
+
kind: string;
|
|
152
|
+
/** Where it is missing from (e.g. a root module name). */
|
|
153
|
+
scope: string;
|
|
154
|
+
};
|
|
106
155
|
}
|
|
107
156
|
/**
|
|
108
157
|
* A post-synthesis check that validates build output. Lexicons ship these as
|
|
@@ -121,7 +170,11 @@ export interface PostSynthCheck {
|
|
|
121
170
|
export declare function isPostSynthCheck(value: unknown): value is PostSynthCheck;
|
|
122
171
|
/**
|
|
123
172
|
* Run a set of post-synthesis checks against a build result. `env` is threaded
|
|
124
|
-
* into the context so a check can branch on the current environment/stack
|
|
173
|
+
* into the context so a check can branch on the current environment/stack, and
|
|
174
|
+
* `opts.activityContracts` (chant #2101) carries the build's cross-lexicon
|
|
175
|
+
* activity-contract map to the checks that validate Op steps against it.
|
|
125
176
|
*/
|
|
126
|
-
export declare function runPostSynthChecks(checks: PostSynthCheck[], buildResult: PostSynthContext["buildResult"], env?: string
|
|
177
|
+
export declare function runPostSynthChecks(checks: PostSynthCheck[], buildResult: PostSynthContext["buildResult"], env?: string, opts?: {
|
|
178
|
+
activityContracts?: ReadonlyMap<string, ActivityContract>;
|
|
179
|
+
}): PostSynthDiagnostic[];
|
|
127
180
|
//# sourceMappingURL=post-synth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-synth.d.ts","sourceRoot":"","sources":["../../src/lint/post-synth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAChD,8CAA8C;IAC9C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,8BAA8B;IAC9B,WAAW,EAAE;QACX,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;QAChD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACjD,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,GAC9C,MAAM,SAAS,EAAE,CAQnB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAE1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5F;AAED
|
|
1
|
+
{"version":3,"file":"post-synth.d.ts","sourceRoot":"","sources":["../../src/lint/post-synth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAChD,8CAA8C;IAC9C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACnE,8BAA8B;IAC9B,WAAW,EAAE;QACX,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;QAChD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACjD,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,GAC9C,MAAM,SAAS,EAAE,CAQnB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAE1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5F;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,EAAE;QACR,kEAAkE;QAClE,IAAI,EAAE,MAAM,CAAC;QACb,0DAA0D;QAC1D,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;CACrD;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAQxE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EAAE,EACxB,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,EAC5C,GAAG,CAAC,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAAE,GACnE,mBAAmB,EAAE,CAkBvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Component } from "../../../../../../components/component.js";
|
|
2
|
-
/** COMP004 pass case: a genuine gate, opted out via a file-level disable directive with a documented reason — the intended path for a component
|
|
2
|
+
/** COMP004 pass case: a genuine gate, opted out via a file-level disable directive with a documented reason — the intended path for a component whose rollout genuinely waits on a person. */
|
|
3
3
|
export declare const neo4jCluster: Component;
|
|
4
4
|
//# sourceMappingURL=neo4j-cluster.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"neo4j-cluster.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGxE,
|
|
1
|
+
{"version":3,"file":"neo4j-cluster.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGxE,8LAA8L;AAC9L,eAAO,MAAM,YAAY,EAAE,SAiB1B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Component } from "../../../../../../components/component.js";
|
|
2
|
-
/** COMP004 pass case: no gate step anywhere — nothing
|
|
2
|
+
/** COMP004 pass case: no gate step anywhere — nothing here stops the run for a person. */
|
|
3
3
|
export declare const ordersTable: Component;
|
|
4
4
|
//# sourceMappingURL=orders-table.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orders-table.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGxE,
|
|
1
|
+
{"version":3,"file":"orders-table.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGxE,0FAA0F;AAC1F,eAAO,MAAM,WAAW,EAAE,SAKzB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* COMP004: gate-needs-durable-runtime (the file is renamed in #2116; the
|
|
3
|
+
* behaviour changed in #2119)
|
|
4
|
+
*
|
|
5
|
+
* The file name and the exported symbol keep the old wording on purpose
|
|
6
|
+
* (#2195): the id is what an author writes in a `chant-disable` comment and
|
|
7
|
+
* what every import names, and churning both buys nothing. `description`
|
|
8
|
+
* below is the accurate sentence, and it is what the docs page uses as its
|
|
9
|
+
* heading — since #2119 the rule has nothing to do with which runtime hosts
|
|
10
|
+
* the run.
|
|
11
|
+
*
|
|
12
|
+
* Flags a `gate` step anywhere in a component's composition — the point where
|
|
13
|
+
* a run stops and waits for a person. Since #2119 that is not a refusal: the
|
|
14
|
+
* driver decides the gate against the gate ledger (`../../../op/gate.ts`), and
|
|
15
|
+
* one nobody has approved ends the run pending `chant approve <component>
|
|
16
|
+
* <gate>`, to be re-decided next run.
|
|
17
|
+
*
|
|
18
|
+
* The rule survives the change because what it flags survives it. The
|
|
19
|
+
* component contract has no per-component runtime field (the runtime is chosen
|
|
20
|
+
* per *run*, via `chant run --on`, intentionally not part of the declaration),
|
|
21
|
+
* so lint cannot tell from the declaration alone that a `gate` is deliberate;
|
|
22
|
+
* every one is a standing "this component stops for a human" fact worth
|
|
23
|
+
* surfacing, not a mistake to silently allow. Acknowledge it explicitly with a
|
|
24
|
+
* **file-level**
|
|
25
|
+
* disable directive once the human wait is genuinely intended (see
|
|
26
|
+
* lint-rules/disable-directives.mdx) — a COMP* diagnostic carries no real
|
|
27
|
+
* line/column (it is reported for the whole component; see
|
|
28
|
+
* ../../component-checks.ts), so only the file-level `chant-disable` form is
|
|
29
|
+
* honored for these rules — `-line`/`-next-line` do not suppress a COMP*
|
|
30
|
+
* diagnostic (see ../../../cli/commands/lint.ts's
|
|
31
|
+
* `runComponentCheckDiagnostics`):
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* // chant-disable COMP004 -- the rollout waits on a release manager's approval
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* Triggers on: any `gate` step in `deploy`/`rollback` with no matching
|
|
38
|
+
* file-level disable directive.
|
|
39
|
+
* OK: a component with no `gate` steps at all, or a `gate` whose file-level
|
|
40
|
+
* disable directive says who is expected to approve it and why.
|
|
41
|
+
*/
|
|
42
|
+
import type { ComponentCheck } from "../../component-checks.js";
|
|
43
|
+
export declare const comp004GateNeedsDurableRuntimeRule: ComponentCheck;
|
|
44
|
+
//# sourceMappingURL=comp004-gate-needs-durable-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comp004-gate-needs-durable-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/comp/comp004-gate-needs-durable-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAmD,MAAM,wBAAwB,CAAC;AAI9G,eAAO,MAAM,kCAAkC,EAAE,cA6BhD,CAAC"}
|
|
@@ -9,7 +9,7 @@ import type { ComponentCheck } from "../../component-checks.js";
|
|
|
9
9
|
export { comp001PublishesNeverAppliesRule } from "./comp001-publishes-never-applies.js";
|
|
10
10
|
export { comp002DanglingWiringRefRule } from "./comp002-dangling-wiring-ref.js";
|
|
11
11
|
export { comp003MutatingNoRollbackRule } from "./comp003-mutating-no-rollback.js";
|
|
12
|
-
export {
|
|
12
|
+
export { comp004GateNeedsDurableRuntimeRule } from "./comp004-gate-needs-durable-runtime.js";
|
|
13
13
|
export { comp005CapabilityKindIsNounRule } from "./comp005-capability-kind-is-noun.js";
|
|
14
14
|
export { comp006ShellNeedsReasonRule } from "./comp006-shell-needs-reason.js";
|
|
15
15
|
export { comp007CompositionSprawlRule } from "./comp007-composition-sprawl.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/comp/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAS7D,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/comp/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAS7D,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAE5E,4CAA4C;AAC5C,wBAAgB,mBAAmB,IAAI,cAAc,EAAE,CAUtD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OPS* Op-model post-synth checks (#2122, epic #2114 sub-issue 6) — ported
|
|
3
|
+
* from a hosting lexicon's own TMP012/TMP013/TMP014. Registered as core-owned
|
|
4
|
+
* post-synth checks (`coreOpChecks`, mirroring `../../receipt-checks.ts`'s
|
|
5
|
+
* `coreReceiptChecks`) so they run over the FULL build result regardless of
|
|
6
|
+
* which lexicons are configured — an Op is recognized by entity type
|
|
7
|
+
* (`../../../op/resource.ts`'s `OpResource`), not by which lexicon declared
|
|
8
|
+
* it.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "../../post-synth.js";
|
|
11
|
+
export { ops012 } from "./ops012-activity-contract.js";
|
|
12
|
+
export { ops013 } from "./ops013-step-output-ref.js";
|
|
13
|
+
export { ops014 } from "./ops014-converge-rule-refusals.js";
|
|
14
|
+
/** Core's own post-synth checks over the Op model — OPS012, OPS013, OPS014. */
|
|
15
|
+
export declare function coreOpChecks(): PostSynthCheck[];
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,+EAA+E;AAC/E,wBAAgB,YAAY,IAAI,cAAc,EAAE,CAE/C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OPS012: activity step args/outcomeAttribute must match the activity's
|
|
3
|
+
* declared contract (chant #1288 Stage 1; moved from a hosting lexicon's own
|
|
4
|
+
* TMP012 to core in #2122, epic #2114 sub-issue 6, so it fires on every
|
|
5
|
+
* project that declares an Op, not only one with that lexicon configured).
|
|
6
|
+
*
|
|
7
|
+
* Validates every Op entity's steps against core's own base-activity
|
|
8
|
+
* contracts (`../../../op/activities/activity-contracts.ts`, #2117), using
|
|
9
|
+
* the generic walk in `@intentius/chant/op`'s `validateActivitySteps`. A step
|
|
10
|
+
* whose `fn` has no registered contract here is skipped — most activities
|
|
11
|
+
* don't have one yet; see that module's doc for why that's the intended,
|
|
12
|
+
* non-breaking default.
|
|
13
|
+
*
|
|
14
|
+
* Cross-lexicon (chant #2101): an Op step may call an activity any
|
|
15
|
+
* configured lexicon contributes (`terraformPlan`, `k3sInstall`,
|
|
16
|
+
* `flyApply`), and since this check became core-owned it fires on every
|
|
17
|
+
* project that declares an Op. `ctx.activityContracts` carries the contracts
|
|
18
|
+
* every configured lexicon declared, resolved by `loadActivityContracts`
|
|
19
|
+
* (`../../../op/activity-contract-registry.ts`) the same way
|
|
20
|
+
* `loadActivities` resolves the implementations, and is merged over the
|
|
21
|
+
* static table below. A context that carries none — a hand-built one in a
|
|
22
|
+
* test, a caller that has not loaded any — falls back to that table alone,
|
|
23
|
+
* exactly as before.
|
|
24
|
+
*/
|
|
25
|
+
import type { PostSynthCheck } from "../../post-synth.js";
|
|
26
|
+
export declare const ops012: PostSynthCheck;
|
|
27
|
+
//# sourceMappingURL=ops012-activity-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ops012-activity-contract.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/ops012-activity-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;AAU9F,eAAO,MAAM,MAAM,EAAE,cA4BpB,CAAC"}
|
|
@@ -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"}
|