@intentius/chant 0.7.0 → 0.8.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/attrref.d.ts +35 -0
- package/dist/attrref.d.ts.map +1 -0
- package/dist/audit/catalog.d.ts +65 -0
- package/dist/audit/catalog.d.ts.map +1 -0
- package/dist/audit/core.d.ts +76 -0
- package/dist/audit/core.d.ts.map +1 -0
- package/dist/audit/discover.d.ts +76 -0
- package/dist/audit/discover.d.ts.map +1 -0
- package/dist/audit/fetch.d.ts +90 -0
- package/dist/audit/fetch.d.ts.map +1 -0
- package/dist/audit/proof.d.ts +53 -0
- package/dist/audit/proof.d.ts.map +1 -0
- package/dist/audit/report-html.d.ts +32 -0
- package/dist/audit/report-html.d.ts.map +1 -0
- package/dist/audit/report-model.d.ts +119 -0
- package/dist/audit/report-model.d.ts.map +1 -0
- package/dist/audit/report.d.ts +31 -0
- package/dist/audit/report.d.ts.map +1 -0
- package/dist/audit/rules-doc.d.ts +11 -0
- package/dist/audit/rules-doc.d.ts.map +1 -0
- package/dist/build.d.ts +120 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/builder.d.ts +56 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/child-project.d.ts +34 -0
- package/dist/child-project.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +60 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/build.d.ts +70 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/check-lexicon.d.ts +19 -0
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -0
- package/dist/cli/commands/describe.d.ts +39 -0
- package/dist/cli/commands/describe.d.ts.map +1 -0
- package/dist/cli/commands/diff.d.ts +32 -0
- package/dist/cli/commands/diff.d.ts.map +1 -0
- package/dist/cli/commands/doctor.d.ts +11 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/import.d.ts +68 -0
- package/dist/cli/commands/import.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts +9 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts +9 -0
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/examples.d.ts +8 -0
- package/dist/cli/commands/init-lexicon/templates/examples.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/lint.d.ts +8 -0
- package/dist/cli/commands/init-lexicon/templates/lint.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/lsp.d.ts +6 -0
- package/dist/cli/commands/init-lexicon/templates/lsp.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/plugin.d.ts +12 -0
- package/dist/cli/commands/init-lexicon/templates/plugin.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts +19 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/spec.d.ts +6 -0
- package/dist/cli/commands/init-lexicon/templates/spec.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/tests.d.ts +12 -0
- package/dist/cli/commands/init-lexicon/templates/tests.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon.d.ts +37 -0
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -0
- package/dist/cli/commands/init.d.ts +48 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/licenses.d.ts +23 -0
- package/dist/cli/commands/licenses.d.ts.map +1 -0
- package/dist/cli/commands/lint.d.ts +52 -0
- package/dist/cli/commands/lint.d.ts.map +1 -0
- package/dist/cli/commands/list.d.ts +38 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/migrate.d.ts +51 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/onboard.d.ts +19 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/update.d.ts +29 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/vendor.d.ts +84 -0
- package/dist/cli/commands/vendor.d.ts.map +1 -0
- package/dist/cli/conflict-check.d.ts +18 -0
- package/dist/cli/conflict-check.d.ts.map +1 -0
- package/dist/cli/debug.d.ts +5 -0
- package/dist/cli/debug.d.ts.map +1 -0
- package/dist/cli/format.d.ts +36 -0
- package/dist/cli/format.d.ts.map +1 -0
- package/dist/cli/handlers/build.d.ts +3 -0
- package/dist/cli/handlers/build.d.ts.map +1 -0
- package/dist/cli/handlers/dev.d.ts +7 -0
- package/dist/cli/handlers/dev.d.ts.map +1 -0
- package/dist/cli/handlers/graph.d.ts +8 -0
- package/dist/cli/handlers/graph.d.ts.map +1 -0
- package/dist/cli/handlers/init.d.ts +4 -0
- package/dist/cli/handlers/init.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle.d.ts +39 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -0
- package/dist/cli/handlers/lint.d.ts +3 -0
- package/dist/cli/handlers/lint.d.ts.map +1 -0
- package/dist/cli/handlers/migrate.d.ts +3 -0
- package/dist/cli/handlers/migrate.d.ts.map +1 -0
- package/dist/cli/handlers/misc.d.ts +8 -0
- package/dist/cli/handlers/misc.d.ts.map +1 -0
- package/dist/cli/handlers/run-client.d.ts +107 -0
- package/dist/cli/handlers/run-client.d.ts.map +1 -0
- package/dist/cli/handlers/run-report.d.ts +5 -0
- package/dist/cli/handlers/run-report.d.ts.map +1 -0
- package/dist/cli/handlers/run.d.ts +27 -0
- package/dist/cli/handlers/run.d.ts.map +1 -0
- package/dist/cli/handlers/serve.d.ts +5 -0
- package/dist/cli/handlers/serve.d.ts.map +1 -0
- package/dist/cli/handlers/vendor.d.ts +9 -0
- package/dist/cli/handlers/vendor.d.ts.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/lsp/capabilities.d.ts +21 -0
- package/dist/cli/lsp/capabilities.d.ts.map +1 -0
- package/dist/cli/lsp/diagnostics.d.ts +30 -0
- package/dist/cli/lsp/diagnostics.d.ts.map +1 -0
- package/dist/cli/lsp/server.d.ts +106 -0
- package/dist/cli/lsp/server.d.ts.map +1 -0
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/mcp/lifecycle-tools.d.ts +15 -0
- package/dist/cli/mcp/lifecycle-tools.d.ts.map +1 -0
- package/dist/cli/mcp/op-tools.d.ts +7 -0
- package/dist/cli/mcp/op-tools.d.ts.map +1 -0
- package/dist/cli/mcp/resource-handlers.d.ts +28 -0
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -0
- package/dist/cli/mcp/resources/context.d.ts +6 -0
- package/dist/cli/mcp/resources/context.d.ts.map +1 -0
- package/dist/cli/mcp/server.d.ts +44 -0
- package/dist/cli/mcp/server.d.ts.map +1 -0
- package/dist/cli/mcp/tools/build.d.ts +31 -0
- package/dist/cli/mcp/tools/build.d.ts.map +1 -0
- package/dist/cli/mcp/tools/explain.d.ts +27 -0
- package/dist/cli/mcp/tools/explain.d.ts.map +1 -0
- package/dist/cli/mcp/tools/import.d.ts +26 -0
- package/dist/cli/mcp/tools/import.d.ts.map +1 -0
- package/dist/cli/mcp/tools/lint.d.ts +26 -0
- package/dist/cli/mcp/tools/lint.d.ts.map +1 -0
- package/dist/cli/mcp/tools/scaffold.d.ts +31 -0
- package/dist/cli/mcp/tools/scaffold.d.ts.map +1 -0
- package/dist/cli/mcp/tools/search.d.ts +31 -0
- package/dist/cli/mcp/tools/search.d.ts.map +1 -0
- package/dist/cli/mcp/types.d.ts +42 -0
- package/dist/cli/mcp/types.d.ts.map +1 -0
- package/dist/cli/plugins.d.ts +21 -0
- package/dist/cli/plugins.d.ts.map +1 -0
- package/dist/cli/registry.d.ts +100 -0
- package/dist/cli/registry.d.ts.map +1 -0
- package/dist/cli/reporters/stylish.d.ts +26 -0
- package/dist/cli/reporters/stylish.d.ts.map +1 -0
- package/dist/cli/watch.d.ts +29 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/codegen/bound-property-types.d.ts +38 -0
- package/dist/codegen/bound-property-types.d.ts.map +1 -0
- package/dist/codegen/coverage.d.ts +57 -0
- package/dist/codegen/coverage.d.ts.map +1 -0
- package/dist/codegen/docs-file-markers.d.ts +16 -0
- package/dist/codegen/docs-file-markers.d.ts.map +1 -0
- package/dist/codegen/docs-rule-scanning.d.ts +14 -0
- package/dist/codegen/docs-rule-scanning.d.ts.map +1 -0
- package/dist/codegen/docs-rules.d.ts +17 -0
- package/dist/codegen/docs-rules.d.ts.map +1 -0
- package/dist/codegen/docs-sections.d.ts +11 -0
- package/dist/codegen/docs-sections.d.ts.map +1 -0
- package/dist/codegen/docs-sidebar.d.ts +6 -0
- package/dist/codegen/docs-sidebar.d.ts.map +1 -0
- package/dist/codegen/docs-types.d.ts +84 -0
- package/dist/codegen/docs-types.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +28 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/fetch.d.ts +76 -0
- package/dist/codegen/fetch.d.ts.map +1 -0
- package/dist/codegen/generate-post-synth-barrel.d.ts +32 -0
- package/dist/codegen/generate-post-synth-barrel.d.ts.map +1 -0
- package/dist/codegen/generate-registry.d.ts +40 -0
- package/dist/codegen/generate-registry.d.ts.map +1 -0
- package/dist/codegen/generate-runtime-index.d.ts +40 -0
- package/dist/codegen/generate-runtime-index.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +48 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +92 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/json-patch.d.ts +12 -0
- package/dist/codegen/json-patch.d.ts.map +1 -0
- package/dist/codegen/json-schema.d.ts +82 -0
- package/dist/codegen/json-schema.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +64 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +64 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/topo-sort.d.ts +13 -0
- package/dist/codegen/topo-sort.d.ts.map +1 -0
- package/dist/codegen/typecheck.d.ts +10 -0
- package/dist/codegen/typecheck.d.ts.map +1 -0
- package/dist/codegen/validate.d.ts +45 -0
- package/dist/codegen/validate.d.ts.map +1 -0
- package/dist/composite.d.ts +116 -0
- package/dist/composite.d.ts.map +1 -0
- package/dist/config.d.ts +78 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/declarable.d.ts +34 -0
- package/dist/declarable.d.ts.map +1 -0
- package/dist/detectLexicon.d.ts +10 -0
- package/dist/detectLexicon.d.ts.map +1 -0
- package/dist/discovery/cache.d.ts +36 -0
- package/dist/discovery/cache.d.ts.map +1 -0
- package/dist/discovery/collect.d.ts +17 -0
- package/dist/discovery/collect.d.ts.map +1 -0
- package/dist/discovery/cycles.d.ts +23 -0
- package/dist/discovery/cycles.d.ts.map +1 -0
- package/dist/discovery/files.d.ts +7 -0
- package/dist/discovery/files.d.ts.map +1 -0
- package/dist/discovery/graph.d.ts +8 -0
- package/dist/discovery/graph.d.ts.map +1 -0
- package/dist/discovery/import.d.ts +9 -0
- package/dist/discovery/import.d.ts.map +1 -0
- package/dist/discovery/index.d.ts +25 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/resolve.d.ts +10 -0
- package/dist/discovery/resolve.d.ts.map +1 -0
- package/dist/errors.d.ts +49 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/import/base-parser.d.ts +19 -0
- package/dist/import/base-parser.d.ts.map +1 -0
- package/dist/import/generator.d.ts +20 -0
- package/dist/import/generator.d.ts.map +1 -0
- package/dist/import/ir-utils.d.ts +25 -0
- package/dist/import/ir-utils.d.ts.map +1 -0
- package/dist/import/parser.d.ts +39 -0
- package/dist/import/parser.d.ts.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/intrinsic-interpolation.d.ts +24 -0
- package/dist/intrinsic-interpolation.d.ts.map +1 -0
- package/dist/intrinsic.d.ts +24 -0
- package/dist/intrinsic.d.ts.map +1 -0
- package/dist/lexicon-integrity.d.ts +25 -0
- package/dist/lexicon-integrity.d.ts.map +1 -0
- package/dist/lexicon-manifest.d.ts +9 -0
- package/dist/lexicon-manifest.d.ts.map +1 -0
- package/dist/lexicon-output.d.ts +66 -0
- package/dist/lexicon-output.d.ts.map +1 -0
- package/dist/lexicon-plugin-helpers.d.ts +59 -0
- package/dist/lexicon-plugin-helpers.d.ts.map +1 -0
- package/dist/lexicon-schema.d.ts +82 -0
- package/dist/lexicon-schema.d.ts.map +1 -0
- package/dist/lexicon.d.ts +383 -0
- package/dist/lexicon.d.ts.map +1 -0
- package/dist/lifecycle/affected.d.ts +57 -0
- package/dist/lifecycle/affected.d.ts.map +1 -0
- package/dist/lifecycle/change-set.d.ts +90 -0
- package/dist/lifecycle/change-set.d.ts.map +1 -0
- package/dist/lifecycle/digest.d.ts +21 -0
- package/dist/lifecycle/digest.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +72 -0
- package/dist/lifecycle/git.d.ts.map +1 -0
- package/dist/lifecycle/index.d.ts +8 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/live-diff.d.ts +67 -0
- package/dist/lifecycle/live-diff.d.ts.map +1 -0
- package/dist/lifecycle/snapshot.d.ts +20 -0
- package/dist/lifecycle/snapshot.d.ts.map +1 -0
- package/dist/lifecycle/types.d.ts +61 -0
- package/dist/lifecycle/types.d.ts.map +1 -0
- package/dist/lint/config.d.ts +100 -0
- package/dist/lint/config.d.ts.map +1 -0
- package/dist/lint/declarative.d.ts +56 -0
- package/dist/lint/declarative.d.ts.map +1 -0
- package/dist/lint/discover.d.ts +35 -0
- package/dist/lint/discover.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +21 -0
- package/dist/lint/engine.d.ts.map +1 -0
- package/dist/lint/named-checks.d.ts +19 -0
- package/dist/lint/named-checks.d.ts.map +1 -0
- package/dist/lint/parser.d.ts +9 -0
- package/dist/lint/parser.d.ts.map +1 -0
- package/dist/lint/policy.d.ts +22 -0
- package/dist/lint/policy.d.ts.map +1 -0
- package/dist/lint/post-synth.d.ts +69 -0
- package/dist/lint/post-synth.d.ts.map +1 -0
- package/dist/lint/presets/strict.json +19 -0
- package/dist/lint/rule-loader.d.ts +16 -0
- package/dist/lint/rule-loader.d.ts.map +1 -0
- package/dist/lint/rule-registry.d.ts +37 -0
- package/dist/lint/rule-registry.d.ts.map +1 -0
- package/dist/lint/rule.d.ts +82 -0
- package/dist/lint/rule.d.ts.map +1 -0
- package/dist/lint/rules/composite-scope.d.ts +18 -0
- package/dist/lint/rules/composite-scope.d.ts.map +1 -0
- package/dist/lint/rules/cor017-composite-name-match.d.ts +3 -0
- package/dist/lint/rules/cor017-composite-name-match.d.ts.map +1 -0
- package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts +3 -0
- package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts.map +1 -0
- package/dist/lint/rules/declarable-naming-convention.d.ts +3 -0
- package/dist/lint/rules/declarable-naming-convention.d.ts.map +1 -0
- package/dist/lint/rules/evl001-non-literal-expression.d.ts +3 -0
- package/dist/lint/rules/evl001-non-literal-expression.d.ts.map +1 -0
- package/dist/lint/rules/evl002-control-flow-resource.d.ts +3 -0
- package/dist/lint/rules/evl002-control-flow-resource.d.ts.map +1 -0
- package/dist/lint/rules/evl003-dynamic-property-access.d.ts +3 -0
- package/dist/lint/rules/evl003-dynamic-property-access.d.ts.map +1 -0
- package/dist/lint/rules/evl004-spread-non-const.d.ts +3 -0
- package/dist/lint/rules/evl004-spread-non-const.d.ts.map +1 -0
- package/dist/lint/rules/evl005-resource-block-body.d.ts +3 -0
- package/dist/lint/rules/evl005-resource-block-body.d.ts.map +1 -0
- package/dist/lint/rules/evl007-invalid-siblings.d.ts +3 -0
- package/dist/lint/rules/evl007-invalid-siblings.d.ts.map +1 -0
- package/dist/lint/rules/evl009-composite-no-constant.d.ts +3 -0
- package/dist/lint/rules/evl009-composite-no-constant.d.ts.map +1 -0
- package/dist/lint/rules/evl010-composite-no-transform.d.ts +3 -0
- package/dist/lint/rules/evl010-composite-no-transform.d.ts.map +1 -0
- package/dist/lint/rules/export-required.d.ts +3 -0
- package/dist/lint/rules/export-required.d.ts.map +1 -0
- package/dist/lint/rules/file-declarable-limit.d.ts +3 -0
- package/dist/lint/rules/file-declarable-limit.d.ts.map +1 -0
- package/dist/lint/rules/flat-declarations.d.ts +3 -0
- package/dist/lint/rules/flat-declarations.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +31 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/no-cyclic-declarable-ref.d.ts +3 -0
- package/dist/lint/rules/no-cyclic-declarable-ref.d.ts.map +1 -0
- package/dist/lint/rules/no-redundant-type-import.d.ts +10 -0
- package/dist/lint/rules/no-redundant-type-import.d.ts.map +1 -0
- package/dist/lint/rules/no-redundant-value-cast.d.ts +3 -0
- package/dist/lint/rules/no-redundant-value-cast.d.ts.map +1 -0
- package/dist/lint/rules/no-string-ref.d.ts +3 -0
- package/dist/lint/rules/no-string-ref.d.ts.map +1 -0
- package/dist/lint/rules/no-unused-declarable-import.d.ts +3 -0
- package/dist/lint/rules/no-unused-declarable-import.d.ts.map +1 -0
- package/dist/lint/rules/no-unused-declarable.d.ts +3 -0
- package/dist/lint/rules/no-unused-declarable.d.ts.map +1 -0
- package/dist/lint/rules/single-concern-file.d.ts +3 -0
- package/dist/lint/rules/single-concern-file.d.ts.map +1 -0
- package/dist/lint/selectors.d.ts +21 -0
- package/dist/lint/selectors.d.ts.map +1 -0
- package/dist/lsp/lexicon-providers.d.ts +61 -0
- package/dist/lsp/lexicon-providers.d.ts.map +1 -0
- package/dist/lsp/types.d.ts +64 -0
- package/dist/lsp/types.d.ts.map +1 -0
- package/dist/mcp/types.d.ts +21 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/op/activity-registry.d.ts +57 -0
- package/dist/op/activity-registry.d.ts.map +1 -0
- package/dist/op/builders.d.ts +69 -0
- package/dist/op/builders.d.ts.map +1 -0
- package/dist/op/discover.d.ts +16 -0
- package/dist/op/discover.d.ts.map +1 -0
- package/dist/op/index.d.ts +11 -0
- package/dist/op/index.d.ts.map +1 -0
- package/dist/op/local-executor.d.ts +54 -0
- package/dist/op/local-executor.d.ts.map +1 -0
- package/dist/op/local-output.d.ts +16 -0
- package/dist/op/local-output.d.ts.map +1 -0
- package/dist/op/resource.d.ts +7 -0
- package/dist/op/resource.d.ts.map +1 -0
- package/dist/op/types.d.ts +71 -0
- package/dist/op/types.d.ts.map +1 -0
- package/dist/ownership.d.ts +75 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/project-validation.d.ts +28 -0
- package/dist/project-validation.d.ts.map +1 -0
- package/dist/provenance.d.ts +26 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/pseudo-parameter.d.ts +32 -0
- package/dist/pseudo-parameter.d.ts.map +1 -0
- package/dist/resource-attributes.d.ts +17 -0
- package/dist/resource-attributes.d.ts.map +1 -0
- package/dist/runtime-adapter.d.ts +41 -0
- package/dist/runtime-adapter.d.ts.map +1 -0
- package/dist/runtime.d.ts +23 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/serializer-walker.d.ts +21 -0
- package/dist/serializer-walker.d.ts.map +1 -0
- package/dist/serializer.d.ts +64 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/sort.d.ts +8 -0
- package/dist/sort.d.ts.map +1 -0
- package/dist/stack-output.d.ts +52 -0
- package/dist/stack-output.d.ts.map +1 -0
- package/dist/toml-emit.d.ts +22 -0
- package/dist/toml-emit.d.ts.map +1 -0
- package/dist/toml-parse.d.ts +14 -0
- package/dist/toml-parse.d.ts.map +1 -0
- package/dist/toml-utils.d.ts +20 -0
- package/dist/toml-utils.d.ts.map +1 -0
- package/dist/toml.d.ts +9 -0
- package/dist/toml.d.ts.map +1 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/validation.d.ts +42 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/yaml.d.ts +42 -0
- package/dist/yaml.d.ts.map +1 -0
- package/package.json +31 -6
- package/src/audit/bundle-decoupling.test.ts +56 -0
- package/src/audit/catalog.test.ts +16 -1
- package/src/audit/catalog.ts +244 -4
- package/src/audit/core.test.ts +15 -0
- package/src/audit/core.ts +0 -0
- package/src/audit/detect-bundle.test.ts +35 -0
- package/src/audit/discover.test.ts +72 -0
- package/src/audit/discover.ts +329 -0
- package/src/audit/edge-init-safety.test.ts +43 -0
- package/src/audit/fetch.test.ts +86 -55
- package/src/audit/fetch.ts +118 -87
- package/src/audit/remote-discovery.test.ts +80 -0
- package/src/audit/report-html.ts +14 -6
- package/src/audit/report-model.ts +13 -1
- package/src/audit/report.test.ts +3 -1
- package/src/audit/report.ts +13 -5
- package/src/cli/commands/__fixtures__/audit-mixed/.github/workflows/ci.yml +5 -0
- package/src/cli/commands/__fixtures__/audit-mixed/Dockerfile +2 -0
- package/src/cli/commands/__fixtures__/audit-mixed/cfn/template.json +1 -0
- package/src/cli/commands/__fixtures__/audit-mixed/k8s/deploy.yaml +12 -0
- package/src/cli/commands/audit.test.ts +27 -19
- package/src/cli/commands/audit.ts +28 -272
- package/src/codegen/bound-property-types.test.ts +57 -0
- package/src/codegen/bound-property-types.ts +110 -0
- package/src/codegen/generate-post-synth-barrel.test.ts +37 -0
- package/src/codegen/generate-post-synth-barrel.ts +75 -0
- package/src/codegen/post-synth-barrel-guards.test.ts +63 -0
- package/src/codegen/validate.ts +13 -1
- package/src/lint/discover.ts +1 -1
- package/src/meta/peer-deps.test.ts +29 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import type { Serializer } from "./serializer.js";
|
|
2
|
+
import type { LintRule } from "./lint/rule.js";
|
|
3
|
+
import type { RuleSpec } from "./lint/declarative.js";
|
|
4
|
+
import type { PostSynthCheck } from "./lint/post-synth.js";
|
|
5
|
+
import type { TemplateParser, TemplateIR } from "./import/parser.js";
|
|
6
|
+
import type { TypeScriptGenerator } from "./import/generator.js";
|
|
7
|
+
import type { ArtifactIntegrity } from "./lexicon-integrity.js";
|
|
8
|
+
import type { CompletionContext, CompletionItem, HoverContext, HoverInfo, CodeActionContext, CodeAction } from "./lsp/types.js";
|
|
9
|
+
import type { McpToolContribution, McpResourceContribution } from "./mcp/types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Manifest for a packaged lexicon — metadata embedded in the tarball.
|
|
12
|
+
*/
|
|
13
|
+
export interface LexiconManifest {
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
chantVersion?: string;
|
|
17
|
+
namespace?: string;
|
|
18
|
+
intrinsics?: IntrinsicDef[];
|
|
19
|
+
pseudoParameters?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Metadata about when and how a package was generated.
|
|
23
|
+
*/
|
|
24
|
+
export interface PackageMetadata {
|
|
25
|
+
generatedAt: string;
|
|
26
|
+
chantVersion: string;
|
|
27
|
+
generatorVersion: string;
|
|
28
|
+
sourceSchemaCount: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Container for all artifacts in a lexicon bundle.
|
|
32
|
+
*/
|
|
33
|
+
export interface BundleSpec {
|
|
34
|
+
manifest: LexiconManifest;
|
|
35
|
+
registry: string;
|
|
36
|
+
typesDTS: string;
|
|
37
|
+
rules: Map<string, string>;
|
|
38
|
+
skills: Map<string, string>;
|
|
39
|
+
integrity?: ArtifactIntegrity;
|
|
40
|
+
metadata?: PackageMetadata;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Trigger that determines when a skill should be suggested.
|
|
44
|
+
*/
|
|
45
|
+
export interface SkillTrigger {
|
|
46
|
+
type: "command" | "file-pattern" | "context";
|
|
47
|
+
value: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Parameter definition for a skill.
|
|
51
|
+
*/
|
|
52
|
+
export interface SkillParameter {
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
type: string;
|
|
56
|
+
required?: boolean;
|
|
57
|
+
default?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Example showing how a skill is used.
|
|
61
|
+
*/
|
|
62
|
+
export interface SkillExample {
|
|
63
|
+
title: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
input?: string;
|
|
66
|
+
output?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Definition of a skill provided by a lexicon plugin.
|
|
70
|
+
* Content is full markdown with optional YAML frontmatter.
|
|
71
|
+
*/
|
|
72
|
+
export interface SkillDefinition {
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly description: string;
|
|
75
|
+
readonly content: string;
|
|
76
|
+
readonly triggers?: SkillTrigger[];
|
|
77
|
+
readonly parameters?: SkillParameter[];
|
|
78
|
+
readonly examples?: SkillExample[];
|
|
79
|
+
readonly preConditions?: string[];
|
|
80
|
+
readonly postConditions?: string[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Definition of a lexicon-specific intrinsic function
|
|
84
|
+
*/
|
|
85
|
+
export interface IntrinsicDef {
|
|
86
|
+
readonly name: string;
|
|
87
|
+
readonly description?: string;
|
|
88
|
+
readonly outputKey?: string;
|
|
89
|
+
readonly isTag?: boolean;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Options passed to a MigrationSource by `chant migrate`.
|
|
93
|
+
*/
|
|
94
|
+
export interface MigrateOptions {
|
|
95
|
+
/** Output format. */
|
|
96
|
+
emit?: "yaml" | "ts";
|
|
97
|
+
/** Recognise composite patterns when emitting. */
|
|
98
|
+
useComposites?: boolean;
|
|
99
|
+
/** Source file path (for provenance display only). */
|
|
100
|
+
sourceFile?: string;
|
|
101
|
+
/** Escalate needs-review diagnostics to errors. */
|
|
102
|
+
strict?: boolean;
|
|
103
|
+
/** Run security-aware migration analysis (classify property fates + run
|
|
104
|
+
* target security checks). Enabled by `chant migrate --validate`. */
|
|
105
|
+
security?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Result of `MigrationSource.transform()`.
|
|
109
|
+
*
|
|
110
|
+
* Provenance is a generic side channel: each record is `{ sourceKey, rule,
|
|
111
|
+
* category, note?, ... }`. Diagnostics are SARIF-compatible records derived
|
|
112
|
+
* from provenance (concrete shape lives in `packages/core/src/lint/rule.ts`).
|
|
113
|
+
*/
|
|
114
|
+
export interface MigrationResult {
|
|
115
|
+
/** Rendered output (YAML by default, TS when emit: "ts"). */
|
|
116
|
+
output: string;
|
|
117
|
+
/** Per-key provenance records (typed loosely at the core level). */
|
|
118
|
+
provenance: Array<Record<string, unknown>>;
|
|
119
|
+
/** SARIF-shaped diagnostics. */
|
|
120
|
+
diagnostics: Array<Record<string, unknown>>;
|
|
121
|
+
/** Markdown "Security posture" section, when security analysis ran (#306). */
|
|
122
|
+
securityPosture?: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Edge that translates one lexicon's source format into this lexicon's IR
|
|
126
|
+
* and output. Exposed via `LexiconPlugin.migrationSource(from)`.
|
|
127
|
+
*/
|
|
128
|
+
export interface MigrationSource {
|
|
129
|
+
/** Lightweight detector: does this content look like the expected source? */
|
|
130
|
+
detect(content: string): boolean;
|
|
131
|
+
/** Run the translation. */
|
|
132
|
+
transform(content: string, opts: MigrateOptions): Promise<MigrationResult>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Structured init template output from a lexicon plugin.
|
|
136
|
+
*/
|
|
137
|
+
export interface InitTemplateSet {
|
|
138
|
+
/** Source files written to src/ */
|
|
139
|
+
src: Record<string, string>;
|
|
140
|
+
/** Application scaffold files written to project root */
|
|
141
|
+
root?: Record<string, string>;
|
|
142
|
+
/** Scripts merged into generated package.json */
|
|
143
|
+
scripts?: Record<string, string>;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Plugin interface for lexicon packages.
|
|
147
|
+
*
|
|
148
|
+
* Required lifecycle methods enforce consistency: every lexicon must support
|
|
149
|
+
* generate, validate, coverage, and package operations.
|
|
150
|
+
*/
|
|
151
|
+
export interface LexiconPlugin {
|
|
152
|
+
/** Human-readable name (e.g. "aws", "gcp") */
|
|
153
|
+
readonly name: string;
|
|
154
|
+
/** Serializer for build output */
|
|
155
|
+
readonly serializer: Serializer;
|
|
156
|
+
/** Generate lexicon artifacts (types, lexicon JSON, runtime) from spec */
|
|
157
|
+
generate(options?: {
|
|
158
|
+
verbose?: boolean;
|
|
159
|
+
}): Promise<void>;
|
|
160
|
+
/** Validate generated lexicon artifacts */
|
|
161
|
+
validate(options?: {
|
|
162
|
+
verbose?: boolean;
|
|
163
|
+
}): Promise<void>;
|
|
164
|
+
/** Analyze lexicon coverage across resource dimensions */
|
|
165
|
+
coverage(options?: {
|
|
166
|
+
verbose?: boolean;
|
|
167
|
+
minOverall?: number;
|
|
168
|
+
}): Promise<void>;
|
|
169
|
+
/** Package lexicon into distributable tarball */
|
|
170
|
+
package(options?: {
|
|
171
|
+
verbose?: boolean;
|
|
172
|
+
force?: boolean;
|
|
173
|
+
}): Promise<void>;
|
|
174
|
+
/** Return lint rules provided by this lexicon */
|
|
175
|
+
lintRules?(): LintRule[];
|
|
176
|
+
/** Return declarative rule specs for compilation via rule() */
|
|
177
|
+
declarativeRules?(): RuleSpec[];
|
|
178
|
+
/** Return post-synthesis checks for build validation */
|
|
179
|
+
postSynthChecks?(): PostSynthCheck[];
|
|
180
|
+
/** Return intrinsic function definitions */
|
|
181
|
+
intrinsics?(): IntrinsicDef[];
|
|
182
|
+
/** Return pseudo-parameter names (e.g. "MyDomain::StackName") */
|
|
183
|
+
pseudoParameters?(): string[];
|
|
184
|
+
/**
|
|
185
|
+
* Detect whether raw template content belongs to this lexicon.
|
|
186
|
+
* @param data - Parsed JSON object from a template file
|
|
187
|
+
* @returns true if this plugin can handle the template
|
|
188
|
+
*/
|
|
189
|
+
detectTemplate?(data: unknown): boolean;
|
|
190
|
+
/** Return a parser for importing external templates into IR */
|
|
191
|
+
templateParser?(): TemplateParser;
|
|
192
|
+
/** Return a generator for converting IR to TypeScript */
|
|
193
|
+
templateGenerator?(): TypeScriptGenerator;
|
|
194
|
+
/** Return skills provided by this lexicon */
|
|
195
|
+
skills?(): SkillDefinition[];
|
|
196
|
+
/** Return source file templates for `chant init` project scaffolding */
|
|
197
|
+
initTemplates?(template?: string): InitTemplateSet;
|
|
198
|
+
/** Optional initialization hook */
|
|
199
|
+
init?(): void | Promise<void>;
|
|
200
|
+
/** Provide completions for LSP */
|
|
201
|
+
completionProvider?(ctx: CompletionContext): CompletionItem[];
|
|
202
|
+
/** Provide hover information for LSP */
|
|
203
|
+
hoverProvider?(ctx: HoverContext): HoverInfo | undefined;
|
|
204
|
+
/** Provide code actions for LSP */
|
|
205
|
+
codeActionProvider?(ctx: CodeActionContext): CodeAction[];
|
|
206
|
+
/** Generate documentation pages */
|
|
207
|
+
docs?(options?: {
|
|
208
|
+
verbose?: boolean;
|
|
209
|
+
}): Promise<void>;
|
|
210
|
+
/** Return MCP tool contributions */
|
|
211
|
+
mcpTools?(): McpToolContribution[];
|
|
212
|
+
/** Return MCP resource contributions */
|
|
213
|
+
mcpResources?(): McpResourceContribution[];
|
|
214
|
+
/**
|
|
215
|
+
* Return a migration source for translating from another lexicon's
|
|
216
|
+
* format into this lexicon. Returns undefined if `from` is not supported.
|
|
217
|
+
*
|
|
218
|
+
* Example: the gitlab lexicon implements `migrationSource("github")` to
|
|
219
|
+
* translate `.github/workflows/*.yml` into `.gitlab-ci.yml`.
|
|
220
|
+
*/
|
|
221
|
+
migrationSource?(from: string): MigrationSource | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* Query deployed resources and return API metadata. Opt-in.
|
|
224
|
+
*
|
|
225
|
+
* Use this when each chant entity has a 1:1 cloud equivalent — e.g. an
|
|
226
|
+
* AWS CFN resource, a K8s object, an ARM resource, a Temporal namespace.
|
|
227
|
+
*
|
|
228
|
+
* `entities` carries the chant-side entity declarations for this lexicon,
|
|
229
|
+
* keyed by chant entity name (e.g. the export name from a `*.ts` file).
|
|
230
|
+
* Implementations that need to map cloud-side names back to chant entity
|
|
231
|
+
* names (e.g. Temporal — server-side namespace `prod` ↔ chant entity `ns`
|
|
232
|
+
* declared with `name: "prod"`) read this; implementations that already
|
|
233
|
+
* have name parity (e.g. AWS CloudFormation logical IDs == chant entity
|
|
234
|
+
* names) can ignore it.
|
|
235
|
+
*
|
|
236
|
+
* `entityNames` is preserved as a convenience for the simple case.
|
|
237
|
+
*/
|
|
238
|
+
describeResources?(options: {
|
|
239
|
+
environment: string;
|
|
240
|
+
buildOutput: string;
|
|
241
|
+
entityNames: string[];
|
|
242
|
+
entities: Map<string, {
|
|
243
|
+
entityType: string;
|
|
244
|
+
props: Record<string, unknown>;
|
|
245
|
+
}>;
|
|
246
|
+
/**
|
|
247
|
+
* Restrict the result to chant-owned resources (those carrying the
|
|
248
|
+
* ownership marker, #119). Where a lexicon has no durable marker channel,
|
|
249
|
+
* it must log that ownership is unavailable rather than silently returning
|
|
250
|
+
* everything.
|
|
251
|
+
*/
|
|
252
|
+
owned?: boolean;
|
|
253
|
+
}): Promise<Record<string, ResourceMetadata>>;
|
|
254
|
+
/**
|
|
255
|
+
* List runtime artifacts in the given environment. Opt-in.
|
|
256
|
+
*
|
|
257
|
+
* Use this for lexicons whose chant entities describe *authoring*
|
|
258
|
+
* primitives rather than 1:1 cloud resources — e.g. Helm (charts vs
|
|
259
|
+
* releases), Docker (Compose vs running containers). The contract is
|
|
260
|
+
* context-keyed: given an environment, list all artifacts visible there.
|
|
261
|
+
* There is no `declared` comparison axis — `state diff --live` reports
|
|
262
|
+
* added/removed/changed between snapshots, not vs. declared.
|
|
263
|
+
*
|
|
264
|
+
* `entities` is passed for cases where the lexicon needs to know what
|
|
265
|
+
* was declared in order to scope its enumeration (e.g. a per-tenant
|
|
266
|
+
* runtime where the declared entities name which tenants to query).
|
|
267
|
+
*/
|
|
268
|
+
listArtifacts?(options: {
|
|
269
|
+
environment: string;
|
|
270
|
+
entities: Map<string, {
|
|
271
|
+
entityType: string;
|
|
272
|
+
props: Record<string, unknown>;
|
|
273
|
+
}>;
|
|
274
|
+
}): Promise<Record<string, ArtifactMetadata>>;
|
|
275
|
+
/**
|
|
276
|
+
* Export full-fidelity import IR from a live API — the cloud→code primitive
|
|
277
|
+
* that lets chant regenerate TypeScript from running cloud/cluster state.
|
|
278
|
+
*
|
|
279
|
+
* Deliberately separate from {@link describeResources}: that returns scrubbed
|
|
280
|
+
* *output* metadata for diffing, this returns full *input* config — enough to
|
|
281
|
+
* regenerate a resource, and therefore possibly containing secrets. The
|
|
282
|
+
* scrubbing boundary stays single-purpose; never overload one method for both.
|
|
283
|
+
*
|
|
284
|
+
* The return type {@link ExportedTemplate} is branded distinct from the
|
|
285
|
+
* observation types so a full-fidelity export can never flow into the
|
|
286
|
+
* observation/`state` code paths by accident.
|
|
287
|
+
*
|
|
288
|
+
* `owned` is accepted now but inert until ownership marking exists (#119/#120).
|
|
289
|
+
*
|
|
290
|
+
* `verbatim` controls fidelity: by default an implementation strips
|
|
291
|
+
* server-defaulted and server-managed fields to reach the declared shape
|
|
292
|
+
* (the form a user would have authored). `verbatim: true` keeps them. Targets
|
|
293
|
+
* whose live config is already the declared shape (e.g. a CloudFormation
|
|
294
|
+
* original template) may ignore it.
|
|
295
|
+
*/
|
|
296
|
+
exportResources?(options: {
|
|
297
|
+
environment: string;
|
|
298
|
+
selector?: ResourceSelector;
|
|
299
|
+
owned?: boolean;
|
|
300
|
+
verbatim?: boolean;
|
|
301
|
+
}): Promise<ExportedTemplate>;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* The observation view of a lexicon — every capability except live export.
|
|
305
|
+
*
|
|
306
|
+
* State/observation code (snapshots, `state diff --live`) consumes lexicons
|
|
307
|
+
* through this type so that `exportResources` is unreachable from those paths:
|
|
308
|
+
* a full-fidelity {@link ExportedTemplate} (which may carry secrets) must never
|
|
309
|
+
* be read where scrubbed {@link ResourceMetadata} is expected. A full
|
|
310
|
+
* {@link LexiconPlugin} is assignable to this type; accessing `exportResources`
|
|
311
|
+
* on it is a compile error.
|
|
312
|
+
*/
|
|
313
|
+
export type ObservationLexicon = Omit<LexiconPlugin, "exportResources">;
|
|
314
|
+
/**
|
|
315
|
+
* Narrows which live resources {@link LexiconPlugin.exportResources} and the
|
|
316
|
+
* `owned` filter operate on. Both fields are optional; omit to export all.
|
|
317
|
+
*/
|
|
318
|
+
export interface ResourceSelector {
|
|
319
|
+
/** Restrict to a single chant resource type (e.g. "AWS::S3::Bucket"). */
|
|
320
|
+
readonly type?: string;
|
|
321
|
+
/** Restrict to a single resource name. */
|
|
322
|
+
readonly name?: string;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Full-fidelity import IR read from a live API, branded distinct from the
|
|
326
|
+
* scrubbed observation metadata. It IS a {@link TemplateIR} — it feeds the
|
|
327
|
+
* existing `templateGenerator()` unchanged — but the phantom brand keeps it
|
|
328
|
+
* from being passed where observation metadata is expected, and keeps
|
|
329
|
+
* observation metadata from being passed where an export is expected.
|
|
330
|
+
*
|
|
331
|
+
* The brand is type-only; nothing is added at runtime.
|
|
332
|
+
*/
|
|
333
|
+
export type ExportedTemplate = TemplateIR & {
|
|
334
|
+
/** Phantom marker — never present at runtime. */
|
|
335
|
+
readonly __fidelity?: "full-config";
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Metadata about a deployed resource, returned by describeResources.
|
|
339
|
+
*/
|
|
340
|
+
export interface ResourceMetadata {
|
|
341
|
+
/** Entity type (e.g. AWS::S3::Bucket, K8s::Apps::Deployment) */
|
|
342
|
+
type: string;
|
|
343
|
+
/** Provider-assigned physical ID (ARN, resource ID, pod name) */
|
|
344
|
+
physicalId?: string;
|
|
345
|
+
/** Provider-specific status string */
|
|
346
|
+
status: string;
|
|
347
|
+
/** ISO timestamp of last update */
|
|
348
|
+
lastUpdated?: string;
|
|
349
|
+
/** Cloud-assigned output properties */
|
|
350
|
+
attributes?: Record<string, unknown>;
|
|
351
|
+
/**
|
|
352
|
+
* Live ownership verdict from the resource's marker (#119/#120), when the
|
|
353
|
+
* lexicon could determine it. `owned` = carries chant's marker; `foreign` =
|
|
354
|
+
* no marker. Absent = the lexicon has no marker channel here. The change set
|
|
355
|
+
* reads this — never the snapshot — to decide whether an orphan is a delete.
|
|
356
|
+
*/
|
|
357
|
+
ownership?: "owned" | "foreign";
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Metadata about a runtime artifact, returned by listArtifacts. Same shape
|
|
361
|
+
* as ResourceMetadata; the conceptual distinction is whether the lexicon's
|
|
362
|
+
* chant entities have 1:1 runtime equivalents (resources) or whether the
|
|
363
|
+
* runtime artifacts are created by tooling outside chant's entity model
|
|
364
|
+
* (artifacts — e.g. Helm releases, Docker containers).
|
|
365
|
+
*/
|
|
366
|
+
export interface ArtifactMetadata {
|
|
367
|
+
/** Artifact type (e.g. Helm::Release, Docker::Container) */
|
|
368
|
+
type: string;
|
|
369
|
+
/** Server-side identifier */
|
|
370
|
+
physicalId?: string;
|
|
371
|
+
/** Provider-specific status string */
|
|
372
|
+
status: string;
|
|
373
|
+
/** ISO timestamp of last update */
|
|
374
|
+
lastUpdated?: string;
|
|
375
|
+
/** Provider-specific properties */
|
|
376
|
+
attributes?: Record<string, unknown>;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Type guard to check if a value is a LexiconPlugin.
|
|
380
|
+
* Checks for required lifecycle methods in addition to name/serializer.
|
|
381
|
+
*/
|
|
382
|
+
export declare function isLexiconPlugin(value: unknown): value is LexiconPlugin;
|
|
383
|
+
//# source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G;AACH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAkBtE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type StackGraph } from "../build.js";
|
|
2
|
+
import type { Serializer } from "../serializer.js";
|
|
3
|
+
import type { Declarable } from "../declarable.js";
|
|
4
|
+
export interface AffectedResult {
|
|
5
|
+
/** Stacks whose built artifact differs between base and head. */
|
|
6
|
+
changed: string[];
|
|
7
|
+
/** Downstream consumers of changed stacks (only when `includeDependents`). */
|
|
8
|
+
dependents: string[];
|
|
9
|
+
/** Stacks with deploy-time inputs — cannot be confirmed from a source diff. */
|
|
10
|
+
indeterminate: string[];
|
|
11
|
+
}
|
|
12
|
+
/** Stacks whose serialized output differs between the two builds (added/removed count). */
|
|
13
|
+
export declare function changedStacks(base: Map<string, string>, head: Map<string, string>): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Walk the cross-stack graph backwards from `changed` to find every stack that
|
|
16
|
+
* (transitively) consumes a changed stack. Edge `from → to` means `from`
|
|
17
|
+
* depends on `to`, so a changed `to` makes `from` a dependent.
|
|
18
|
+
*/
|
|
19
|
+
export declare function dependentStacks(changed: string[], graph: StackGraph): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Compute the affected set from two per-stack artifact maps and the cross-stack
|
|
22
|
+
* graph. Pure — no builds, no git — so the model is independently testable.
|
|
23
|
+
*/
|
|
24
|
+
export declare function computeAffected(base: Map<string, string>, head: Map<string, string>, graph: StackGraph, opts?: {
|
|
25
|
+
includeDependents?: boolean;
|
|
26
|
+
externalInput?: string[];
|
|
27
|
+
}): AffectedResult;
|
|
28
|
+
/** A built BuildResult's per-stack (lexicon) primary output, keyed by stack. */
|
|
29
|
+
export declare function artifactMap(outputs: Map<string, string | {
|
|
30
|
+
primary: string;
|
|
31
|
+
}>): Map<string, string>;
|
|
32
|
+
/** Stacks (lexicons) that declare a deploy-time parameter — external input. */
|
|
33
|
+
export declare function externalInputStacks(entities: Map<string, Declarable>): string[];
|
|
34
|
+
export interface AffectedStacksOptions {
|
|
35
|
+
/** Project source directory to scope (the head/working-tree build root). */
|
|
36
|
+
projectPath: string;
|
|
37
|
+
serializers: Serializer[];
|
|
38
|
+
/** Base git ref to diff against (built in a throwaway worktree). */
|
|
39
|
+
baseRef?: string;
|
|
40
|
+
/** Head git ref. Defaults to the working tree (built in place — no worktree). */
|
|
41
|
+
headRef?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Caller-supplied base source directory (already on disk). Takes precedence
|
|
44
|
+
* over `baseRef` — no worktree is created. Use for a build cache or two dist
|
|
45
|
+
* trees you already have.
|
|
46
|
+
*/
|
|
47
|
+
baseDir?: string;
|
|
48
|
+
includeDependents?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Compute the affected stacks for a change. Head is built in place (the working
|
|
52
|
+
* tree); base is built from `baseDir` if supplied, else from `baseRef` via a
|
|
53
|
+
* single throwaway worktree. Builds are deterministic, so a cached/supplied base
|
|
54
|
+
* is as trustworthy as a rebuild.
|
|
55
|
+
*/
|
|
56
|
+
export declare function affectedStacks(opts: AffectedStacksOptions): Promise<AffectedResult>;
|
|
57
|
+
//# sourceMappingURL=affected.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affected.d.ts","sourceRoot":"","sources":["../../src/lifecycle/affected.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+EAA+E;IAC/E,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAID,2FAA2F;AAC3F,wBAAgB,aAAa,CAC3B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACzB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,MAAM,EAAE,CAOV;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE,CAkB9E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACzB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACzB,KAAK,EAAE,UAAU,EACjB,IAAI,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GACnE,cAAc,CAKhB;AAID,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAInG;AAED,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,MAAM,EAAE,CAQ/E;AA2BD,MAAM,WAAW,qBAAqB;IACpC,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC,CAoCzF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Change set: a typed, read-only projection of a live diff.
|
|
3
|
+
*
|
|
4
|
+
* `chant lifecycle diff --live` computes a three-way comparison — declared now /
|
|
5
|
+
* last snapshot / live now — and prints it. `buildChangeSet` promotes that
|
|
6
|
+
* same signal into a classified create/update/delete/adopt/noop set that other
|
|
7
|
+
* tooling (reconcile, apply) can act on.
|
|
8
|
+
*
|
|
9
|
+
* Strictly read-only and pure: no I/O, no mutation. The classification reads
|
|
10
|
+
* ownership from the live marker only (populated downstream); until ownership
|
|
11
|
+
* exists, an undeclared live resource is `adopt`, never `delete`. The snapshot
|
|
12
|
+
* is evidence, never the basis for a mutation decision — it must never become
|
|
13
|
+
* load-bearing.
|
|
14
|
+
*/
|
|
15
|
+
import { type AttributeChange, type DiffLiveInput } from "./live-diff.js";
|
|
16
|
+
/**
|
|
17
|
+
* What the projection proposes for a single resource.
|
|
18
|
+
*
|
|
19
|
+
* - `create` — declared in source, absent from live.
|
|
20
|
+
* - `update` — declared and live, but live config drifted.
|
|
21
|
+
* - `delete` — a chant-owned resource that is live but no longer declared.
|
|
22
|
+
* Only emitted once ownership is known (#121); never inferred from the
|
|
23
|
+
* snapshot.
|
|
24
|
+
* - `adopt` — live but undeclared, ownership not established → a candidate to
|
|
25
|
+
* pull back into source, never an auto-delete.
|
|
26
|
+
* - `noop` — declared and live with no drift, or already reconciled.
|
|
27
|
+
*/
|
|
28
|
+
export type ChangeAction = "create" | "update" | "delete" | "adopt" | "noop";
|
|
29
|
+
/**
|
|
30
|
+
* Who answers "is this resource chant's?". `unknown` until a live ownership
|
|
31
|
+
* marker is queried (#120). The change set never escalates `unknown` to a
|
|
32
|
+
* delete.
|
|
33
|
+
*/
|
|
34
|
+
export type Ownership = "owned" | "foreign" | "unknown";
|
|
35
|
+
export interface ChangeSetEntry {
|
|
36
|
+
/** chant entity name. */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Resource type, when known from either side. */
|
|
39
|
+
type?: string;
|
|
40
|
+
action: ChangeAction;
|
|
41
|
+
/** The three-way evidence the classification was derived from. */
|
|
42
|
+
evidence: {
|
|
43
|
+
/** Present in the current build. */
|
|
44
|
+
declared: boolean;
|
|
45
|
+
/** Present in the last snapshot. */
|
|
46
|
+
inSnapshot: boolean;
|
|
47
|
+
/** Observed in the live system right now. */
|
|
48
|
+
live: boolean;
|
|
49
|
+
};
|
|
50
|
+
/** Attribute-level changes, for `update`. */
|
|
51
|
+
deltas?: AttributeChange[];
|
|
52
|
+
/** Live-marker ownership. Defaults to `unknown`. */
|
|
53
|
+
ownership: Ownership;
|
|
54
|
+
}
|
|
55
|
+
export interface ChangeSet {
|
|
56
|
+
env: string;
|
|
57
|
+
entries: ChangeSetEntry[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Build a typed change set from the same inputs `diffLive` consumes.
|
|
61
|
+
*
|
|
62
|
+
* `create`/`update` are precise from declared-vs-live. `delete` is never
|
|
63
|
+
* emitted here — an undeclared live resource classifies as `adopt` until
|
|
64
|
+
* ownership is known.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildChangeSet(env: string, input: DiffLiveInput): ChangeSet;
|
|
67
|
+
/** Count entries per action. */
|
|
68
|
+
export declare function summarize(cs: ChangeSet): Record<ChangeAction, number>;
|
|
69
|
+
/**
|
|
70
|
+
* GitLab MR plan widget report.
|
|
71
|
+
*
|
|
72
|
+
* GitLab renders an `artifacts:reports:terraform` artifact in the merge-request
|
|
73
|
+
* UI as "N to add, M to change, K to delete". The format is generic — any tool
|
|
74
|
+
* that emits this JSON gets the widget — and the chant plan maps onto it
|
|
75
|
+
* directly. Only the mutating actions count: `adopt` and `noop` are excluded,
|
|
76
|
+
* since the widget has no column for "live but undeclared" or "no change".
|
|
77
|
+
*
|
|
78
|
+
* The widget label reads "Terraform" regardless of producer; that is GitLab's
|
|
79
|
+
* fixed string, not a claim chant makes.
|
|
80
|
+
*/
|
|
81
|
+
export interface GitlabMrReport {
|
|
82
|
+
create: number;
|
|
83
|
+
update: number;
|
|
84
|
+
delete: number;
|
|
85
|
+
}
|
|
86
|
+
/** Project a change set onto the GitLab MR plan widget shape. Pure. */
|
|
87
|
+
export declare function gitlabMrReport(cs: ChangeSet): GitlabMrReport;
|
|
88
|
+
/** Human-readable render of a change set. Pure — returns a string. */
|
|
89
|
+
export declare function renderChangeSet(cs: ChangeSet): string;
|
|
90
|
+
//# sourceMappingURL=change-set.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../../src/lifecycle/change-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAY,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,aAA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,MAAM,CAmBrD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build digest: fingerprints of resource declarations + dependency graph.
|
|
3
|
+
*
|
|
4
|
+
* The digest captures *what was declared* at a point in time, enabling
|
|
5
|
+
* diff operations without re-parsing templates.
|
|
6
|
+
*/
|
|
7
|
+
import type { BuildResult } from "../build.js";
|
|
8
|
+
import type { BuildDigest, DigestDiff } from "./types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Hash an entity's props deterministically.
|
|
11
|
+
*/
|
|
12
|
+
export declare function hashProps(props: unknown): string;
|
|
13
|
+
/**
|
|
14
|
+
* Compute a full build digest from a BuildResult.
|
|
15
|
+
*/
|
|
16
|
+
export declare function computeBuildDigest(buildResult: BuildResult): BuildDigest;
|
|
17
|
+
/**
|
|
18
|
+
* Compare two digests and categorize resources.
|
|
19
|
+
*/
|
|
20
|
+
export declare function diffDigests(current: BuildDigest, previous: BuildDigest | undefined): DigestDiff;
|
|
21
|
+
//# sourceMappingURL=digest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../src/lifecycle/digest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAkB,UAAU,EAAE,MAAM,SAAS,CAAC;AAIvE;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAwBxE;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,WAAW,GAAG,SAAS,GAChC,UAAU,CAgCZ"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write a state snapshot JSON to the orphan branch.
|
|
3
|
+
*
|
|
4
|
+
* Pipeline: hash-object → mktree → commit-tree → update-ref
|
|
5
|
+
*/
|
|
6
|
+
export declare function writeSnapshot(environment: string, lexicon: string, json: string, opts?: {
|
|
7
|
+
cwd?: string;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Read a snapshot from the orphan branch.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readSnapshot(environment: string, lexicon: string, opts?: {
|
|
13
|
+
cwd?: string;
|
|
14
|
+
}): Promise<string | null>;
|
|
15
|
+
/**
|
|
16
|
+
* Read all snapshots for an environment (all lexicons).
|
|
17
|
+
*/
|
|
18
|
+
export declare function readEnvironmentSnapshots(environment: string, opts?: {
|
|
19
|
+
cwd?: string;
|
|
20
|
+
}): Promise<Map<string, string>>;
|
|
21
|
+
/**
|
|
22
|
+
* List snapshot history from the orphan branch.
|
|
23
|
+
*/
|
|
24
|
+
export declare function listSnapshots(opts?: {
|
|
25
|
+
cwd?: string;
|
|
26
|
+
environment?: string;
|
|
27
|
+
}): Promise<Array<{
|
|
28
|
+
commit: string;
|
|
29
|
+
date: string;
|
|
30
|
+
message: string;
|
|
31
|
+
}>>;
|
|
32
|
+
/**
|
|
33
|
+
* Thrown by pushLifecycle when the remote chant/lifecycle branch has moved since
|
|
34
|
+
* the local snapshot was prepared — i.e. another snapshot for this or a
|
|
35
|
+
* different env was pushed concurrently. The caller should fetch and retry.
|
|
36
|
+
*/
|
|
37
|
+
export declare class StaleLifecycleBranchError extends Error {
|
|
38
|
+
readonly expected: string | null;
|
|
39
|
+
constructor(expected: string | null, stderr: string);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Look up the remote-tracking SHA for chant/lifecycle, if any. Returns null when
|
|
43
|
+
* the remote ref doesn't exist locally yet (e.g. first-ever snapshot).
|
|
44
|
+
*/
|
|
45
|
+
export declare function getRemoteLifecycleBranchSha(remote: string, opts?: {
|
|
46
|
+
cwd?: string;
|
|
47
|
+
}): Promise<string | null>;
|
|
48
|
+
/**
|
|
49
|
+
* Push the state branch to remote with --force-with-lease.
|
|
50
|
+
*
|
|
51
|
+
* If the remote chant/lifecycle ref has advanced past the local remote-tracking
|
|
52
|
+
* SHA captured at the start of this push, the push is rejected and we throw
|
|
53
|
+
* StaleLifecycleBranchError so the caller can surface a recovery hint.
|
|
54
|
+
*
|
|
55
|
+
* Returns false (without throwing) only when no remote is configured at all.
|
|
56
|
+
*/
|
|
57
|
+
export declare function pushLifecycle(opts?: {
|
|
58
|
+
cwd?: string;
|
|
59
|
+
}): Promise<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Fetch the state branch from remote.
|
|
62
|
+
*/
|
|
63
|
+
export declare function fetchLifecycle(opts?: {
|
|
64
|
+
cwd?: string;
|
|
65
|
+
}): Promise<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Get the current HEAD commit SHA of the main working branch.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getHeadCommit(opts?: {
|
|
70
|
+
cwd?: string;
|
|
71
|
+
}): Promise<string>;
|
|
72
|
+
//# sourceMappingURL=git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/lifecycle/git.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC,MAAM,CAAC,CAoFjB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB;AAED;;GAEG;AACH,wBAAsB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