@intentius/chant 0.7.0 → 0.8.1

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.
Files changed (424) hide show
  1. package/dist/attrref.d.ts +35 -0
  2. package/dist/attrref.d.ts.map +1 -0
  3. package/dist/audit/catalog.d.ts +65 -0
  4. package/dist/audit/catalog.d.ts.map +1 -0
  5. package/dist/audit/core.d.ts +76 -0
  6. package/dist/audit/core.d.ts.map +1 -0
  7. package/dist/audit/discover.d.ts +76 -0
  8. package/dist/audit/discover.d.ts.map +1 -0
  9. package/dist/audit/fetch.d.ts +90 -0
  10. package/dist/audit/fetch.d.ts.map +1 -0
  11. package/dist/audit/proof.d.ts +53 -0
  12. package/dist/audit/proof.d.ts.map +1 -0
  13. package/dist/audit/report-html.d.ts +32 -0
  14. package/dist/audit/report-html.d.ts.map +1 -0
  15. package/dist/audit/report-model.d.ts +119 -0
  16. package/dist/audit/report-model.d.ts.map +1 -0
  17. package/dist/audit/report.d.ts +31 -0
  18. package/dist/audit/report.d.ts.map +1 -0
  19. package/dist/audit/rules-doc.d.ts +11 -0
  20. package/dist/audit/rules-doc.d.ts.map +1 -0
  21. package/dist/build.d.ts +120 -0
  22. package/dist/build.d.ts.map +1 -0
  23. package/dist/builder.d.ts +56 -0
  24. package/dist/builder.d.ts.map +1 -0
  25. package/dist/child-project.d.ts +34 -0
  26. package/dist/child-project.d.ts.map +1 -0
  27. package/dist/cli/commands/audit.d.ts +60 -0
  28. package/dist/cli/commands/audit.d.ts.map +1 -0
  29. package/dist/cli/commands/build.d.ts +70 -0
  30. package/dist/cli/commands/build.d.ts.map +1 -0
  31. package/dist/cli/commands/check-lexicon.d.ts +19 -0
  32. package/dist/cli/commands/check-lexicon.d.ts.map +1 -0
  33. package/dist/cli/commands/describe.d.ts +39 -0
  34. package/dist/cli/commands/describe.d.ts.map +1 -0
  35. package/dist/cli/commands/diff.d.ts +32 -0
  36. package/dist/cli/commands/diff.d.ts.map +1 -0
  37. package/dist/cli/commands/doctor.d.ts +11 -0
  38. package/dist/cli/commands/doctor.d.ts.map +1 -0
  39. package/dist/cli/commands/import.d.ts +68 -0
  40. package/dist/cli/commands/import.d.ts.map +1 -0
  41. package/dist/cli/commands/init-lexicon/templates/codegen.d.ts +9 -0
  42. package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -0
  43. package/dist/cli/commands/init-lexicon/templates/docs.d.ts +9 -0
  44. package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -0
  45. package/dist/cli/commands/init-lexicon/templates/examples.d.ts +8 -0
  46. package/dist/cli/commands/init-lexicon/templates/examples.d.ts.map +1 -0
  47. package/dist/cli/commands/init-lexicon/templates/lint.d.ts +8 -0
  48. package/dist/cli/commands/init-lexicon/templates/lint.d.ts.map +1 -0
  49. package/dist/cli/commands/init-lexicon/templates/lsp.d.ts +6 -0
  50. package/dist/cli/commands/init-lexicon/templates/lsp.d.ts.map +1 -0
  51. package/dist/cli/commands/init-lexicon/templates/plugin.d.ts +12 -0
  52. package/dist/cli/commands/init-lexicon/templates/plugin.d.ts.map +1 -0
  53. package/dist/cli/commands/init-lexicon/templates/project.d.ts +19 -0
  54. package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -0
  55. package/dist/cli/commands/init-lexicon/templates/spec.d.ts +6 -0
  56. package/dist/cli/commands/init-lexicon/templates/spec.d.ts.map +1 -0
  57. package/dist/cli/commands/init-lexicon/templates/tests.d.ts +12 -0
  58. package/dist/cli/commands/init-lexicon/templates/tests.d.ts.map +1 -0
  59. package/dist/cli/commands/init-lexicon.d.ts +37 -0
  60. package/dist/cli/commands/init-lexicon.d.ts.map +1 -0
  61. package/dist/cli/commands/init.d.ts +48 -0
  62. package/dist/cli/commands/init.d.ts.map +1 -0
  63. package/dist/cli/commands/licenses.d.ts +23 -0
  64. package/dist/cli/commands/licenses.d.ts.map +1 -0
  65. package/dist/cli/commands/lint.d.ts +52 -0
  66. package/dist/cli/commands/lint.d.ts.map +1 -0
  67. package/dist/cli/commands/list.d.ts +38 -0
  68. package/dist/cli/commands/list.d.ts.map +1 -0
  69. package/dist/cli/commands/migrate.d.ts +51 -0
  70. package/dist/cli/commands/migrate.d.ts.map +1 -0
  71. package/dist/cli/commands/onboard.d.ts +19 -0
  72. package/dist/cli/commands/onboard.d.ts.map +1 -0
  73. package/dist/cli/commands/update.d.ts +29 -0
  74. package/dist/cli/commands/update.d.ts.map +1 -0
  75. package/dist/cli/commands/vendor.d.ts +84 -0
  76. package/dist/cli/commands/vendor.d.ts.map +1 -0
  77. package/dist/cli/conflict-check.d.ts +18 -0
  78. package/dist/cli/conflict-check.d.ts.map +1 -0
  79. package/dist/cli/debug.d.ts +5 -0
  80. package/dist/cli/debug.d.ts.map +1 -0
  81. package/dist/cli/format.d.ts +36 -0
  82. package/dist/cli/format.d.ts.map +1 -0
  83. package/dist/cli/handlers/build.d.ts +3 -0
  84. package/dist/cli/handlers/build.d.ts.map +1 -0
  85. package/dist/cli/handlers/dev.d.ts +7 -0
  86. package/dist/cli/handlers/dev.d.ts.map +1 -0
  87. package/dist/cli/handlers/graph.d.ts +8 -0
  88. package/dist/cli/handlers/graph.d.ts.map +1 -0
  89. package/dist/cli/handlers/init.d.ts +4 -0
  90. package/dist/cli/handlers/init.d.ts.map +1 -0
  91. package/dist/cli/handlers/lifecycle.d.ts +39 -0
  92. package/dist/cli/handlers/lifecycle.d.ts.map +1 -0
  93. package/dist/cli/handlers/lint.d.ts +3 -0
  94. package/dist/cli/handlers/lint.d.ts.map +1 -0
  95. package/dist/cli/handlers/migrate.d.ts +3 -0
  96. package/dist/cli/handlers/migrate.d.ts.map +1 -0
  97. package/dist/cli/handlers/misc.d.ts +8 -0
  98. package/dist/cli/handlers/misc.d.ts.map +1 -0
  99. package/dist/cli/handlers/run-client.d.ts +107 -0
  100. package/dist/cli/handlers/run-client.d.ts.map +1 -0
  101. package/dist/cli/handlers/run-report.d.ts +5 -0
  102. package/dist/cli/handlers/run-report.d.ts.map +1 -0
  103. package/dist/cli/handlers/run.d.ts +27 -0
  104. package/dist/cli/handlers/run.d.ts.map +1 -0
  105. package/dist/cli/handlers/serve.d.ts +5 -0
  106. package/dist/cli/handlers/serve.d.ts.map +1 -0
  107. package/dist/cli/handlers/vendor.d.ts +9 -0
  108. package/dist/cli/handlers/vendor.d.ts.map +1 -0
  109. package/dist/cli/index.d.ts +4 -0
  110. package/dist/cli/index.d.ts.map +1 -0
  111. package/dist/cli/lsp/capabilities.d.ts +21 -0
  112. package/dist/cli/lsp/capabilities.d.ts.map +1 -0
  113. package/dist/cli/lsp/diagnostics.d.ts +30 -0
  114. package/dist/cli/lsp/diagnostics.d.ts.map +1 -0
  115. package/dist/cli/lsp/server.d.ts +106 -0
  116. package/dist/cli/lsp/server.d.ts.map +1 -0
  117. package/dist/cli/main.d.ts +7 -0
  118. package/dist/cli/main.d.ts.map +1 -0
  119. package/dist/cli/mcp/lifecycle-tools.d.ts +15 -0
  120. package/dist/cli/mcp/lifecycle-tools.d.ts.map +1 -0
  121. package/dist/cli/mcp/op-tools.d.ts +7 -0
  122. package/dist/cli/mcp/op-tools.d.ts.map +1 -0
  123. package/dist/cli/mcp/resource-handlers.d.ts +28 -0
  124. package/dist/cli/mcp/resource-handlers.d.ts.map +1 -0
  125. package/dist/cli/mcp/resources/context.d.ts +6 -0
  126. package/dist/cli/mcp/resources/context.d.ts.map +1 -0
  127. package/dist/cli/mcp/server.d.ts +44 -0
  128. package/dist/cli/mcp/server.d.ts.map +1 -0
  129. package/dist/cli/mcp/tools/build.d.ts +31 -0
  130. package/dist/cli/mcp/tools/build.d.ts.map +1 -0
  131. package/dist/cli/mcp/tools/explain.d.ts +27 -0
  132. package/dist/cli/mcp/tools/explain.d.ts.map +1 -0
  133. package/dist/cli/mcp/tools/import.d.ts +26 -0
  134. package/dist/cli/mcp/tools/import.d.ts.map +1 -0
  135. package/dist/cli/mcp/tools/lint.d.ts +26 -0
  136. package/dist/cli/mcp/tools/lint.d.ts.map +1 -0
  137. package/dist/cli/mcp/tools/scaffold.d.ts +31 -0
  138. package/dist/cli/mcp/tools/scaffold.d.ts.map +1 -0
  139. package/dist/cli/mcp/tools/search.d.ts +31 -0
  140. package/dist/cli/mcp/tools/search.d.ts.map +1 -0
  141. package/dist/cli/mcp/types.d.ts +42 -0
  142. package/dist/cli/mcp/types.d.ts.map +1 -0
  143. package/dist/cli/plugins.d.ts +21 -0
  144. package/dist/cli/plugins.d.ts.map +1 -0
  145. package/dist/cli/registry.d.ts +100 -0
  146. package/dist/cli/registry.d.ts.map +1 -0
  147. package/dist/cli/reporters/stylish.d.ts +26 -0
  148. package/dist/cli/reporters/stylish.d.ts.map +1 -0
  149. package/dist/cli/watch.d.ts +29 -0
  150. package/dist/cli/watch.d.ts.map +1 -0
  151. package/dist/codegen/bound-property-types.d.ts +38 -0
  152. package/dist/codegen/bound-property-types.d.ts.map +1 -0
  153. package/dist/codegen/coverage.d.ts +57 -0
  154. package/dist/codegen/coverage.d.ts.map +1 -0
  155. package/dist/codegen/docs-file-markers.d.ts +16 -0
  156. package/dist/codegen/docs-file-markers.d.ts.map +1 -0
  157. package/dist/codegen/docs-rule-scanning.d.ts +14 -0
  158. package/dist/codegen/docs-rule-scanning.d.ts.map +1 -0
  159. package/dist/codegen/docs-rules.d.ts +17 -0
  160. package/dist/codegen/docs-rules.d.ts.map +1 -0
  161. package/dist/codegen/docs-sections.d.ts +11 -0
  162. package/dist/codegen/docs-sections.d.ts.map +1 -0
  163. package/dist/codegen/docs-sidebar.d.ts +6 -0
  164. package/dist/codegen/docs-sidebar.d.ts.map +1 -0
  165. package/dist/codegen/docs-types.d.ts +84 -0
  166. package/dist/codegen/docs-types.d.ts.map +1 -0
  167. package/dist/codegen/docs.d.ts +28 -0
  168. package/dist/codegen/docs.d.ts.map +1 -0
  169. package/dist/codegen/fetch.d.ts +76 -0
  170. package/dist/codegen/fetch.d.ts.map +1 -0
  171. package/dist/codegen/generate-post-synth-barrel.d.ts +32 -0
  172. package/dist/codegen/generate-post-synth-barrel.d.ts.map +1 -0
  173. package/dist/codegen/generate-registry.d.ts +40 -0
  174. package/dist/codegen/generate-registry.d.ts.map +1 -0
  175. package/dist/codegen/generate-runtime-index.d.ts +40 -0
  176. package/dist/codegen/generate-runtime-index.d.ts.map +1 -0
  177. package/dist/codegen/generate-typescript.d.ts +48 -0
  178. package/dist/codegen/generate-typescript.d.ts.map +1 -0
  179. package/dist/codegen/generate.d.ts +92 -0
  180. package/dist/codegen/generate.d.ts.map +1 -0
  181. package/dist/codegen/json-patch.d.ts +12 -0
  182. package/dist/codegen/json-patch.d.ts.map +1 -0
  183. package/dist/codegen/json-schema.d.ts +82 -0
  184. package/dist/codegen/json-schema.d.ts.map +1 -0
  185. package/dist/codegen/naming.d.ts +64 -0
  186. package/dist/codegen/naming.d.ts.map +1 -0
  187. package/dist/codegen/package.d.ts +64 -0
  188. package/dist/codegen/package.d.ts.map +1 -0
  189. package/dist/codegen/topo-sort.d.ts +13 -0
  190. package/dist/codegen/topo-sort.d.ts.map +1 -0
  191. package/dist/codegen/typecheck.d.ts +10 -0
  192. package/dist/codegen/typecheck.d.ts.map +1 -0
  193. package/dist/codegen/validate.d.ts +45 -0
  194. package/dist/codegen/validate.d.ts.map +1 -0
  195. package/dist/composite.d.ts +116 -0
  196. package/dist/composite.d.ts.map +1 -0
  197. package/dist/config.d.ts +78 -0
  198. package/dist/config.d.ts.map +1 -0
  199. package/dist/declarable.d.ts +34 -0
  200. package/dist/declarable.d.ts.map +1 -0
  201. package/dist/detectLexicon.d.ts +10 -0
  202. package/dist/detectLexicon.d.ts.map +1 -0
  203. package/dist/discovery/cache.d.ts +36 -0
  204. package/dist/discovery/cache.d.ts.map +1 -0
  205. package/dist/discovery/collect.d.ts +17 -0
  206. package/dist/discovery/collect.d.ts.map +1 -0
  207. package/dist/discovery/cycles.d.ts +23 -0
  208. package/dist/discovery/cycles.d.ts.map +1 -0
  209. package/dist/discovery/files.d.ts +7 -0
  210. package/dist/discovery/files.d.ts.map +1 -0
  211. package/dist/discovery/graph.d.ts +8 -0
  212. package/dist/discovery/graph.d.ts.map +1 -0
  213. package/dist/discovery/import.d.ts +9 -0
  214. package/dist/discovery/import.d.ts.map +1 -0
  215. package/dist/discovery/index.d.ts +25 -0
  216. package/dist/discovery/index.d.ts.map +1 -0
  217. package/dist/discovery/resolve.d.ts +10 -0
  218. package/dist/discovery/resolve.d.ts.map +1 -0
  219. package/dist/errors.d.ts +49 -0
  220. package/dist/errors.d.ts.map +1 -0
  221. package/dist/import/base-parser.d.ts +19 -0
  222. package/dist/import/base-parser.d.ts.map +1 -0
  223. package/dist/import/generator.d.ts +20 -0
  224. package/dist/import/generator.d.ts.map +1 -0
  225. package/dist/import/ir-utils.d.ts +25 -0
  226. package/dist/import/ir-utils.d.ts.map +1 -0
  227. package/dist/import/parser.d.ts +39 -0
  228. package/dist/import/parser.d.ts.map +1 -0
  229. package/dist/index.d.ts +66 -0
  230. package/dist/index.d.ts.map +1 -0
  231. package/dist/intrinsic-interpolation.d.ts +24 -0
  232. package/dist/intrinsic-interpolation.d.ts.map +1 -0
  233. package/dist/intrinsic.d.ts +24 -0
  234. package/dist/intrinsic.d.ts.map +1 -0
  235. package/dist/lexicon-integrity.d.ts +25 -0
  236. package/dist/lexicon-integrity.d.ts.map +1 -0
  237. package/dist/lexicon-manifest.d.ts +9 -0
  238. package/dist/lexicon-manifest.d.ts.map +1 -0
  239. package/dist/lexicon-output.d.ts +66 -0
  240. package/dist/lexicon-output.d.ts.map +1 -0
  241. package/dist/lexicon-plugin-helpers.d.ts +59 -0
  242. package/dist/lexicon-plugin-helpers.d.ts.map +1 -0
  243. package/dist/lexicon-schema.d.ts +82 -0
  244. package/dist/lexicon-schema.d.ts.map +1 -0
  245. package/dist/lexicon.d.ts +383 -0
  246. package/dist/lexicon.d.ts.map +1 -0
  247. package/dist/lifecycle/affected.d.ts +57 -0
  248. package/dist/lifecycle/affected.d.ts.map +1 -0
  249. package/dist/lifecycle/change-set.d.ts +90 -0
  250. package/dist/lifecycle/change-set.d.ts.map +1 -0
  251. package/dist/lifecycle/digest.d.ts +21 -0
  252. package/dist/lifecycle/digest.d.ts.map +1 -0
  253. package/dist/lifecycle/git.d.ts +72 -0
  254. package/dist/lifecycle/git.d.ts.map +1 -0
  255. package/dist/lifecycle/index.d.ts +8 -0
  256. package/dist/lifecycle/index.d.ts.map +1 -0
  257. package/dist/lifecycle/live-diff.d.ts +67 -0
  258. package/dist/lifecycle/live-diff.d.ts.map +1 -0
  259. package/dist/lifecycle/snapshot.d.ts +20 -0
  260. package/dist/lifecycle/snapshot.d.ts.map +1 -0
  261. package/dist/lifecycle/types.d.ts +61 -0
  262. package/dist/lifecycle/types.d.ts.map +1 -0
  263. package/dist/lint/config.d.ts +100 -0
  264. package/dist/lint/config.d.ts.map +1 -0
  265. package/dist/lint/declarative.d.ts +56 -0
  266. package/dist/lint/declarative.d.ts.map +1 -0
  267. package/dist/lint/discover.d.ts +35 -0
  268. package/dist/lint/discover.d.ts.map +1 -0
  269. package/dist/lint/engine.d.ts +21 -0
  270. package/dist/lint/engine.d.ts.map +1 -0
  271. package/dist/lint/named-checks.d.ts +19 -0
  272. package/dist/lint/named-checks.d.ts.map +1 -0
  273. package/dist/lint/parser.d.ts +9 -0
  274. package/dist/lint/parser.d.ts.map +1 -0
  275. package/dist/lint/policy.d.ts +22 -0
  276. package/dist/lint/policy.d.ts.map +1 -0
  277. package/dist/lint/post-synth.d.ts +69 -0
  278. package/dist/lint/post-synth.d.ts.map +1 -0
  279. package/dist/lint/presets/strict.json +19 -0
  280. package/dist/lint/rule-loader.d.ts +16 -0
  281. package/dist/lint/rule-loader.d.ts.map +1 -0
  282. package/dist/lint/rule-registry.d.ts +37 -0
  283. package/dist/lint/rule-registry.d.ts.map +1 -0
  284. package/dist/lint/rule.d.ts +82 -0
  285. package/dist/lint/rule.d.ts.map +1 -0
  286. package/dist/lint/rules/composite-scope.d.ts +18 -0
  287. package/dist/lint/rules/composite-scope.d.ts.map +1 -0
  288. package/dist/lint/rules/cor017-composite-name-match.d.ts +3 -0
  289. package/dist/lint/rules/cor017-composite-name-match.d.ts.map +1 -0
  290. package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts +3 -0
  291. package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts.map +1 -0
  292. package/dist/lint/rules/declarable-naming-convention.d.ts +3 -0
  293. package/dist/lint/rules/declarable-naming-convention.d.ts.map +1 -0
  294. package/dist/lint/rules/evl001-non-literal-expression.d.ts +3 -0
  295. package/dist/lint/rules/evl001-non-literal-expression.d.ts.map +1 -0
  296. package/dist/lint/rules/evl002-control-flow-resource.d.ts +3 -0
  297. package/dist/lint/rules/evl002-control-flow-resource.d.ts.map +1 -0
  298. package/dist/lint/rules/evl003-dynamic-property-access.d.ts +3 -0
  299. package/dist/lint/rules/evl003-dynamic-property-access.d.ts.map +1 -0
  300. package/dist/lint/rules/evl004-spread-non-const.d.ts +3 -0
  301. package/dist/lint/rules/evl004-spread-non-const.d.ts.map +1 -0
  302. package/dist/lint/rules/evl005-resource-block-body.d.ts +3 -0
  303. package/dist/lint/rules/evl005-resource-block-body.d.ts.map +1 -0
  304. package/dist/lint/rules/evl007-invalid-siblings.d.ts +3 -0
  305. package/dist/lint/rules/evl007-invalid-siblings.d.ts.map +1 -0
  306. package/dist/lint/rules/evl009-composite-no-constant.d.ts +3 -0
  307. package/dist/lint/rules/evl009-composite-no-constant.d.ts.map +1 -0
  308. package/dist/lint/rules/evl010-composite-no-transform.d.ts +3 -0
  309. package/dist/lint/rules/evl010-composite-no-transform.d.ts.map +1 -0
  310. package/dist/lint/rules/export-required.d.ts +3 -0
  311. package/dist/lint/rules/export-required.d.ts.map +1 -0
  312. package/dist/lint/rules/file-declarable-limit.d.ts +3 -0
  313. package/dist/lint/rules/file-declarable-limit.d.ts.map +1 -0
  314. package/dist/lint/rules/flat-declarations.d.ts +3 -0
  315. package/dist/lint/rules/flat-declarations.d.ts.map +1 -0
  316. package/dist/lint/rules/index.d.ts +31 -0
  317. package/dist/lint/rules/index.d.ts.map +1 -0
  318. package/dist/lint/rules/no-cyclic-declarable-ref.d.ts +3 -0
  319. package/dist/lint/rules/no-cyclic-declarable-ref.d.ts.map +1 -0
  320. package/dist/lint/rules/no-redundant-type-import.d.ts +10 -0
  321. package/dist/lint/rules/no-redundant-type-import.d.ts.map +1 -0
  322. package/dist/lint/rules/no-redundant-value-cast.d.ts +3 -0
  323. package/dist/lint/rules/no-redundant-value-cast.d.ts.map +1 -0
  324. package/dist/lint/rules/no-string-ref.d.ts +3 -0
  325. package/dist/lint/rules/no-string-ref.d.ts.map +1 -0
  326. package/dist/lint/rules/no-unused-declarable-import.d.ts +3 -0
  327. package/dist/lint/rules/no-unused-declarable-import.d.ts.map +1 -0
  328. package/dist/lint/rules/no-unused-declarable.d.ts +3 -0
  329. package/dist/lint/rules/no-unused-declarable.d.ts.map +1 -0
  330. package/dist/lint/rules/single-concern-file.d.ts +3 -0
  331. package/dist/lint/rules/single-concern-file.d.ts.map +1 -0
  332. package/dist/lint/selectors.d.ts +21 -0
  333. package/dist/lint/selectors.d.ts.map +1 -0
  334. package/dist/lsp/lexicon-providers.d.ts +61 -0
  335. package/dist/lsp/lexicon-providers.d.ts.map +1 -0
  336. package/dist/lsp/types.d.ts +64 -0
  337. package/dist/lsp/types.d.ts.map +1 -0
  338. package/dist/mcp/types.d.ts +21 -0
  339. package/dist/mcp/types.d.ts.map +1 -0
  340. package/dist/op/activity-registry.d.ts +57 -0
  341. package/dist/op/activity-registry.d.ts.map +1 -0
  342. package/dist/op/builders.d.ts +69 -0
  343. package/dist/op/builders.d.ts.map +1 -0
  344. package/dist/op/discover.d.ts +16 -0
  345. package/dist/op/discover.d.ts.map +1 -0
  346. package/dist/op/index.d.ts +11 -0
  347. package/dist/op/index.d.ts.map +1 -0
  348. package/dist/op/local-executor.d.ts +54 -0
  349. package/dist/op/local-executor.d.ts.map +1 -0
  350. package/dist/op/local-output.d.ts +16 -0
  351. package/dist/op/local-output.d.ts.map +1 -0
  352. package/dist/op/resource.d.ts +7 -0
  353. package/dist/op/resource.d.ts.map +1 -0
  354. package/dist/op/types.d.ts +71 -0
  355. package/dist/op/types.d.ts.map +1 -0
  356. package/dist/ownership.d.ts +75 -0
  357. package/dist/ownership.d.ts.map +1 -0
  358. package/dist/project-validation.d.ts +28 -0
  359. package/dist/project-validation.d.ts.map +1 -0
  360. package/dist/provenance.d.ts +26 -0
  361. package/dist/provenance.d.ts.map +1 -0
  362. package/dist/pseudo-parameter.d.ts +32 -0
  363. package/dist/pseudo-parameter.d.ts.map +1 -0
  364. package/dist/resource-attributes.d.ts +17 -0
  365. package/dist/resource-attributes.d.ts.map +1 -0
  366. package/dist/runtime-adapter.d.ts +41 -0
  367. package/dist/runtime-adapter.d.ts.map +1 -0
  368. package/dist/runtime.d.ts +23 -0
  369. package/dist/runtime.d.ts.map +1 -0
  370. package/dist/serializer-walker.d.ts +21 -0
  371. package/dist/serializer-walker.d.ts.map +1 -0
  372. package/dist/serializer.d.ts +64 -0
  373. package/dist/serializer.d.ts.map +1 -0
  374. package/dist/sort.d.ts +8 -0
  375. package/dist/sort.d.ts.map +1 -0
  376. package/dist/stack-output.d.ts +52 -0
  377. package/dist/stack-output.d.ts.map +1 -0
  378. package/dist/toml-emit.d.ts +22 -0
  379. package/dist/toml-emit.d.ts.map +1 -0
  380. package/dist/toml-parse.d.ts +14 -0
  381. package/dist/toml-parse.d.ts.map +1 -0
  382. package/dist/toml-utils.d.ts +20 -0
  383. package/dist/toml-utils.d.ts.map +1 -0
  384. package/dist/toml.d.ts +9 -0
  385. package/dist/toml.d.ts.map +1 -0
  386. package/dist/types.d.ts +47 -0
  387. package/dist/types.d.ts.map +1 -0
  388. package/dist/utils.d.ts +30 -0
  389. package/dist/utils.d.ts.map +1 -0
  390. package/dist/validation.d.ts +42 -0
  391. package/dist/validation.d.ts.map +1 -0
  392. package/dist/yaml.d.ts +42 -0
  393. package/dist/yaml.d.ts.map +1 -0
  394. package/package.json +31 -6
  395. package/src/audit/bundle-decoupling.test.ts +56 -0
  396. package/src/audit/catalog.test.ts +16 -1
  397. package/src/audit/catalog.ts +244 -4
  398. package/src/audit/core.test.ts +15 -0
  399. package/src/audit/core.ts +0 -0
  400. package/src/audit/detect-bundle.test.ts +35 -0
  401. package/src/audit/discover.test.ts +72 -0
  402. package/src/audit/discover.ts +329 -0
  403. package/src/audit/edge-init-safety.test.ts +43 -0
  404. package/src/audit/fetch.test.ts +136 -55
  405. package/src/audit/fetch.ts +175 -91
  406. package/src/audit/remote-discovery.test.ts +80 -0
  407. package/src/audit/report-html.ts +14 -6
  408. package/src/audit/report-model.ts +13 -1
  409. package/src/audit/report.test.ts +3 -1
  410. package/src/audit/report.ts +13 -5
  411. package/src/cli/commands/__fixtures__/audit-mixed/.github/workflows/ci.yml +5 -0
  412. package/src/cli/commands/__fixtures__/audit-mixed/Dockerfile +2 -0
  413. package/src/cli/commands/__fixtures__/audit-mixed/cfn/template.json +1 -0
  414. package/src/cli/commands/__fixtures__/audit-mixed/k8s/deploy.yaml +12 -0
  415. package/src/cli/commands/audit.test.ts +27 -19
  416. package/src/cli/commands/audit.ts +28 -272
  417. package/src/codegen/bound-property-types.test.ts +57 -0
  418. package/src/codegen/bound-property-types.ts +110 -0
  419. package/src/codegen/generate-post-synth-barrel.test.ts +37 -0
  420. package/src/codegen/generate-post-synth-barrel.ts +75 -0
  421. package/src/codegen/post-synth-barrel-guards.test.ts +63 -0
  422. package/src/codegen/validate.ts +13 -1
  423. package/src/lint/discover.ts +1 -1
  424. package/src/meta/peer-deps.test.ts +29 -0
@@ -0,0 +1,64 @@
1
+ import type { Declarable } from "./declarable.js";
2
+ import type { LexiconOutput } from "./lexicon-output.js";
3
+ import type { OwnershipMarker } from "./ownership.js";
4
+ /**
5
+ * Build-time context passed to a serializer. Optional — serializers that don't
6
+ * need it ignore the parameter.
7
+ */
8
+ export interface SerializeContext {
9
+ /**
10
+ * When set, the serializer stamps this ownership marker into the target's
11
+ * native metadata channel (AWS/Azure tags, K8s/GCP labels).
12
+ */
13
+ ownership?: OwnershipMarker;
14
+ /**
15
+ * The resolved project configuration, when a build was driven from a project
16
+ * with a `chant.config.*`. Lets a serializer read its own lexicon-scoped
17
+ * settings (e.g. the forgejo dialect's `forgejo.runnerLabels`). Undefined for
18
+ * ad-hoc builds (e.g. context tools) that pass no config.
19
+ */
20
+ config?: Record<string, unknown>;
21
+ }
22
+ /**
23
+ * Result of serialization that may include additional files (e.g. nested stack templates).
24
+ */
25
+ export interface SerializerResult {
26
+ /** Primary template content */
27
+ primary: string;
28
+ /** Additional files keyed by filename (e.g. "network.template.json" → content) */
29
+ files?: Record<string, string>;
30
+ /**
31
+ * Non-fatal diagnostics produced during serialization (e.g. a dialect
32
+ * dropping keys the target platform ignores). The build pipeline collects
33
+ * these into its `warnings` array.
34
+ */
35
+ warnings?: string[];
36
+ }
37
+ /**
38
+ * Serializer interface for chant specifications
39
+ */
40
+ export interface Serializer {
41
+ /**
42
+ * Name of the lexicon
43
+ */
44
+ name: string;
45
+ /**
46
+ * Prefix used for rules in this lexicon
47
+ */
48
+ rulePrefix: string;
49
+ /**
50
+ * Serializes the entities to a string representation
51
+ * @param entities - Map of entity name to Declarable entity
52
+ * @param outputs - Optional array of LexiconOutputs produced by this lexicon
53
+ * @param context - Optional build-time context (e.g. ownership marker)
54
+ */
55
+ serialize(entities: Map<string, Declarable>, outputs?: LexiconOutput[], context?: SerializeContext): string | SerializerResult;
56
+ /**
57
+ * Serialize a cross-lexicon reference to a foreign output.
58
+ * Called when this lexicon consumes an output produced by another lexicon.
59
+ * @param output - The LexiconOutput being referenced
60
+ * @returns Lexicon-specific reference representation
61
+ */
62
+ serializeCrossRef?(output: LexiconOutput): unknown;
63
+ }
64
+ //# sourceMappingURL=serializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,SAAS,CACP,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACjC,OAAO,CAAC,EAAE,aAAa,EAAE,EACzB,OAAO,CAAC,EAAE,gBAAgB,GACzB,MAAM,GAAG,gBAAgB,CAAC;IAE7B;;;;;OAKG;IACH,iBAAiB,CAAC,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC;CACpD"}
package/dist/sort.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Performs a topological sort on a dependency graph
3
+ * @param dependencies - Record where keys are entity names and values are arrays of their dependencies
4
+ * @returns Array of entity names in topological order (dependencies appear before dependents)
5
+ * @throws {BuildError} If a cycle is detected in the dependency graph
6
+ */
7
+ export declare function topologicalSort(dependencies: Record<string, string[]>): string[];
8
+ //# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACrC,MAAM,EAAE,CA8CV"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Stack Output — marks a value for cross-stack export.
3
+ *
4
+ * When a child project declares `stackOutput(ref)`, the serializer emits
5
+ * it into the template's Outputs section. The parent can then reference
6
+ * it via `nestedStack().outputs.name`.
7
+ */
8
+ import { DECLARABLE_MARKER, type Declarable } from "./declarable.js";
9
+ import type { AttrRef } from "./attrref.js";
10
+ /**
11
+ * Marker symbol for stack output identification.
12
+ */
13
+ export declare const STACK_OUTPUT_MARKER: unique symbol;
14
+ /**
15
+ * A stack output declaration — wraps an AttrRef into a Declarable
16
+ * that serializers emit as a template Output.
17
+ */
18
+ export interface StackOutput extends Declarable {
19
+ readonly [STACK_OUTPUT_MARKER]: true;
20
+ readonly [DECLARABLE_MARKER]: true;
21
+ readonly lexicon: string;
22
+ readonly entityType: string;
23
+ readonly kind: "output";
24
+ readonly sourceRef: AttrRef;
25
+ readonly description?: string;
26
+ }
27
+ /**
28
+ * Type guard for StackOutput.
29
+ */
30
+ export declare function isStackOutput(value: unknown): value is StackOutput;
31
+ /**
32
+ * Create a stack output that exports an attribute reference for cross-stack use.
33
+ *
34
+ * @param ref - The AttrRef to export (e.g. `vpc.vpcId`)
35
+ * @param options - Optional description for the output
36
+ * @returns A StackOutput Declarable
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * import { stackOutput } from "@intentius/chant";
41
+ * import { vpc, subnet } from "./vpc";
42
+ *
43
+ * export const vpcId = stackOutput(vpc.vpcId);
44
+ * export const subnetId = stackOutput(subnet.subnetId, {
45
+ * description: "Primary subnet ID",
46
+ * });
47
+ * ```
48
+ */
49
+ export declare function stackOutput(ref: AttrRef, options?: {
50
+ description?: string;
51
+ }): StackOutput;
52
+ //# sourceMappingURL=stack-output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack-output.d.ts","sourceRoot":"","sources":["../src/stack-output.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAC;IACrC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAOlE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,OAAO,EACZ,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,WAAW,CAkBb"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * TOML emitter.
3
+ *
4
+ * Converts JavaScript objects to TOML document strings.
5
+ * Handles scalars, tables, arrays, array of tables, and inline tables.
6
+ */
7
+ export interface EmitTOMLOptions {
8
+ /** Comment to prepend at the top of the document. */
9
+ header?: string;
10
+ /** Key ordering hint: keys matching earlier entries appear first. */
11
+ keyOrder?: string[];
12
+ }
13
+ /**
14
+ * Emit a JavaScript object as a TOML document string.
15
+ *
16
+ * - Top-level scalars, arrays of scalars → bare key-value pairs.
17
+ * - Nested objects → `[section]` tables.
18
+ * - Arrays of objects → `[[section]]` array of tables.
19
+ * - Deeply nested objects → `[parent.child]` dotted sections.
20
+ */
21
+ export declare function emitTOML(value: unknown, options?: EmitTOMLOptions): string;
22
+ //# sourceMappingURL=toml-emit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml-emit.d.ts","sourceRoot":"","sources":["../src/toml-emit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,CAsB1E"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * TOML parser.
3
+ *
4
+ * Handles the TOML subset used by Chant lexicons: tables, arrays of tables,
5
+ * key-value pairs, inline tables, inline arrays, strings, numbers, booleans.
6
+ */
7
+ /**
8
+ * Parse a TOML document string into a plain object.
9
+ *
10
+ * Uses a built-in parser that handles the common TOML subset used by tool
11
+ * configuration files (tables, dotted keys, inline tables, and arrays).
12
+ */
13
+ export declare function parseTOML(content: string): Record<string, unknown>;
14
+ //# sourceMappingURL=toml-parse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml-parse.d.ts","sourceRoot":"","sources":["../src/toml-parse.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8ClE"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Shared TOML utilities — key escaping, string unescaping, etc.
3
+ */
4
+ /**
5
+ * Escape a TOML key if it contains special characters.
6
+ */
7
+ export declare function escapeKey(key: string): string;
8
+ /**
9
+ * Unescape a TOML basic string.
10
+ */
11
+ export declare function unescapeString(val: string): string;
12
+ /**
13
+ * Sort keys according to a preferred order, with unmatched keys at the end.
14
+ */
15
+ export declare function sortKeys(keys: string[], keyOrder?: string[]): string[];
16
+ /**
17
+ * Strip inline comment from a value string.
18
+ */
19
+ export declare function stripInlineComment(raw: string): string;
20
+ //# sourceMappingURL=toml-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml-utils.d.ts","sourceRoot":"","sources":["../src/toml-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAStE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAkBtD"}
package/dist/toml.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * TOML emitter and parser — re-exports from split modules.
3
+ *
4
+ * Import from here for the public API:
5
+ * import { emitTOML, parseTOML } from "@intentius/chant/toml";
6
+ */
7
+ export { emitTOML, type EmitTOMLOptions } from "./toml-emit.js";
8
+ export { parseTOML } from "./toml-parse.js";
9
+ //# sourceMappingURL=toml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml.d.ts","sourceRoot":"","sources":["../src/toml.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { Intrinsic } from "./intrinsic.js";
2
+ /**
3
+ * Value type that can be either a concrete value T or an Intrinsic
4
+ */
5
+ export type Value<T> = T | Intrinsic;
6
+ /**
7
+ * Converts all properties of T to Value<T> types
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * interface Props { name: string; count: number }
12
+ * type ValueProps = AllValues<Props>
13
+ * // Result: { name: Value<string>; count: Value<number> }
14
+ * ```
15
+ */
16
+ export type AllValues<T> = {
17
+ [K in keyof T]: Value<T[K]>;
18
+ };
19
+ /**
20
+ * Makes specific properties K of T be Value types while keeping others unchanged
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * interface Props { name: string; count: number; enabled: boolean }
25
+ * type ValueProps = PartialValues<Props, 'name' | 'count'>
26
+ * // Result: { name: Value<string>; count: Value<number>; enabled: boolean }
27
+ * ```
28
+ */
29
+ export type PartialValues<T, K extends keyof T> = {
30
+ [P in keyof T]: P extends K ? Value<T[P]> : T[P];
31
+ };
32
+ /**
33
+ * Makes specific properties K of T required while keeping others unchanged
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * interface Props { name?: string; count?: number; enabled?: boolean }
38
+ * type RequiredNameProps = RequiredProps<Props, 'name'>
39
+ * // Result: { name: string; count?: number; enabled?: boolean }
40
+ * ```
41
+ */
42
+ type Prettify<T> = {
43
+ [P in keyof T]: T[P];
44
+ } & {};
45
+ export type RequiredProps<T, K extends keyof T> = Prettify<Omit<T, K> & Required<Pick<T, K>>>;
46
+ export {};
47
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI;KAC/C,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;;;;GASG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAC;AACjD,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { Declarable } from "./declarable.js";
2
+ import { AttrRef } from "./attrref.js";
3
+ /**
4
+ * Symbol for storing logical names on Declarable entities
5
+ */
6
+ export declare const LOGICAL_NAME_SYMBOL: unique symbol;
7
+ /**
8
+ * Duck-type check for AttrRef that survives the dual-package hazard.
9
+ * When npm installs separate copies of @intentius/chant (one for the CLI,
10
+ * one for the lexicon), `instanceof AttrRef` fails across package boundaries.
11
+ */
12
+ export declare function isAttrRefLike(value: unknown): value is AttrRef;
13
+ /**
14
+ * JSON.stringify replacer that sorts object keys for deterministic output.
15
+ */
16
+ export declare function sortedJsonReplacer(_key: string, value: unknown): unknown;
17
+ /**
18
+ * Get all property names that have AttrRef values
19
+ * @param entity - The declarable entity to inspect
20
+ * @returns Array of property names with AttrRef values
21
+ */
22
+ export declare function getAttributes(entity: Declarable): string[];
23
+ /**
24
+ * Get the logical name stored on a Declarable entity
25
+ * @param entity - The declarable entity
26
+ * @returns The logical name
27
+ * @throws {Error} If logical name is not set
28
+ */
29
+ export declare function getLogicalName(entity: Declarable): string;
30
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAW9D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAOxE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,CAc1D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAUzD"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Validation system for declarable entities
3
+ *
4
+ * Provides opt-in, non-blocking validation hooks that can be used
5
+ * to validate entities during build or discovery phases.
6
+ */
7
+ import type { Declarable } from "./declarable.js";
8
+ /**
9
+ * Result of a validation check
10
+ */
11
+ export interface ValidationResult {
12
+ /** Whether validation passed */
13
+ valid: boolean;
14
+ /** Error message if validation failed */
15
+ message?: string;
16
+ /** Optional additional context about the validation */
17
+ context?: Record<string, unknown>;
18
+ }
19
+ /**
20
+ * A validation rule that can check declarable entities
21
+ */
22
+ export interface ValidationRule {
23
+ /** Unique identifier for this rule */
24
+ id: string;
25
+ /** Human-readable description of what this rule checks */
26
+ description: string;
27
+ /** Validate an entity and return result */
28
+ validate(entity: Declarable): ValidationResult;
29
+ }
30
+ /**
31
+ * Validate an entity against a set of validation rules
32
+ *
33
+ * This function is opt-in and non-blocking - it returns results
34
+ * but does not throw errors. Callers can decide how to handle
35
+ * validation failures.
36
+ *
37
+ * @param entity - The declarable entity to validate
38
+ * @param rules - Array of validation rules to apply
39
+ * @returns Array of validation results, one per rule
40
+ */
41
+ export declare function validate(entity: Declarable, rules: ValidationRule[]): ValidationResult[];
42
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,gBAAgB,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,cAAc,EAAE,GACtB,gBAAgB,EAAE,CAEpB"}
package/dist/yaml.d.ts ADDED
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Lightweight YAML emitter and parser.
3
+ *
4
+ * Covers the subset of YAML used by Chant lexicons (scalars, block arrays,
5
+ * nested objects, tagged values). Not a full YAML implementation — use a
6
+ * dedicated library if you need anchors, multi-document streams, or
7
+ * block scalars.
8
+ */
9
+ /**
10
+ * Emit a YAML value with proper indentation.
11
+ *
12
+ * - Primitives render inline.
13
+ * - Arrays and objects render as block YAML, returning a string that starts
14
+ * with `\n` so the caller can append it after a key.
15
+ * - Tagged values `{ tag, value }` emit `!tag [...]` or `!tag scalar`.
16
+ */
17
+ export declare function emitYAML(value: unknown, indent: number): string;
18
+ /** Result of parsing a YAML block. */
19
+ export interface ParseResult {
20
+ value: unknown;
21
+ endIndex: number;
22
+ }
23
+ /**
24
+ * Parse a YAML document (or JSON document) into a plain object.
25
+ *
26
+ * Tries `JSON.parse` first; falls back to a line-based YAML parser that
27
+ * handles the subset of YAML commonly found in CI configuration files.
28
+ */
29
+ export declare function parseYAML(content: string): Record<string, unknown>;
30
+ /**
31
+ * Parse indentation-based YAML lines into a key-value object.
32
+ */
33
+ export declare function parseYAMLLines(lines: string[], startIndex: number, baseIndent: number): ParseResult;
34
+ /**
35
+ * Parse a block array (lines starting with `- `).
36
+ */
37
+ export declare function parseYAMLArray(lines: string[], startIndex: number, baseIndent: number): ParseResult;
38
+ /**
39
+ * Coerce a scalar string to a typed value.
40
+ */
41
+ export declare function parseScalar(value: string): unknown;
42
+ //# sourceMappingURL=yaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA2G/D;AAMD,sCAAsC;AACtC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASlE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,WAAW,CAuEb;AAsDD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,WAAW,CAkEb;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAelD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -24,6 +24,7 @@
24
24
  "type": "module",
25
25
  "files": [
26
26
  "src/",
27
+ "dist/",
27
28
  "bin/"
28
29
  ],
29
30
  "publishConfig": {
@@ -33,11 +34,35 @@
33
34
  "chant": "./bin/chant"
34
35
  },
35
36
  "exports": {
36
- ".": "./src/index.ts",
37
- "./cli": "./src/cli/index.ts",
38
- "./cli/*": "./src/cli/*.ts",
39
- "./op": "./src/op/index.ts",
40
- "./*": "./src/*.ts"
37
+ ".": {
38
+ "development": "./src/index.ts",
39
+ "types": "./dist/index.d.ts",
40
+ "default": "./src/index.ts"
41
+ },
42
+ "./cli": {
43
+ "development": "./src/cli/index.ts",
44
+ "types": "./dist/cli/index.d.ts",
45
+ "default": "./src/cli/index.ts"
46
+ },
47
+ "./cli/*": {
48
+ "development": "./src/cli/*.ts",
49
+ "types": "./dist/cli/*.d.ts",
50
+ "default": "./src/cli/*.ts"
51
+ },
52
+ "./op": {
53
+ "development": "./src/op/index.ts",
54
+ "types": "./dist/op/index.d.ts",
55
+ "default": "./src/op/index.ts"
56
+ },
57
+ "./*": {
58
+ "development": "./src/*.ts",
59
+ "types": "./dist/*.d.ts",
60
+ "default": "./src/*.ts"
61
+ }
62
+ },
63
+ "scripts": {
64
+ "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete",
65
+ "prepack": "npm run build"
41
66
  },
42
67
  "dependencies": {
43
68
  "fflate": "^0.8.2",
@@ -0,0 +1,56 @@
1
+ import { describe, test, expect } from "vitest";
2
+ import { build } from "esbuild";
3
+ import { fileURLToPath } from "url";
4
+
5
+ /**
6
+ * #408: importing the audit core must NOT statically pull in `cli/plugins`
7
+ * (which drags in the config loader and the TypeScript compiler — fatal on edge
8
+ * runtimes). `loadPlugins` is reached only via a lazy `import()` inside
9
+ * `load()`, so with code splitting `cli/plugins` lands in a separate chunk and
10
+ * never in the entry chunk that an embedder bundles.
11
+ */
12
+ async function entryInputsFor(file: string): Promise<{ entryInputs: string[]; allInputs: string[] }> {
13
+ const result = await build({
14
+ entryPoints: [fileURLToPath(new URL(file, import.meta.url))],
15
+ bundle: true,
16
+ format: "esm",
17
+ splitting: true,
18
+ platform: "node",
19
+ // Skip node_modules (incl. the huge `typescript` package) — we only care
20
+ // about which internal modules land in the entry chunk.
21
+ packages: "external",
22
+ metafile: true,
23
+ write: false,
24
+ outdir: "out",
25
+ logLevel: "silent",
26
+ });
27
+ const outputs = result.metafile.outputs;
28
+ const entry = Object.values(outputs).find((o) => o.entryPoint?.endsWith(file.replace("./", "audit/")));
29
+ return {
30
+ entryInputs: entry ? Object.keys(entry.inputs) : [],
31
+ allInputs: Object.values(outputs).flatMap((o) => Object.keys(o.inputs)),
32
+ };
33
+ }
34
+
35
+ /**
36
+ * #408/#426: importing the audit entry points must NOT statically pull in
37
+ * `cli/plugins` — it drags the config loader and the root barrel (index.ts ->
38
+ * lint/parser -> the TypeScript compiler), fatal on edge runtimes. `loadPlugins`
39
+ * / `loadPlugin` are reached only via lazy `import()`, so with code splitting
40
+ * `cli/plugins` lands in a separate chunk, never the entry an embedder bundles.
41
+ */
42
+ describe("audit bundle graph (edge-safe entries)", () => {
43
+ test("audit/core (auditFiles) does not statically import cli/plugins", async () => {
44
+ const { entryInputs, allInputs } = await entryInputsFor("./core.ts");
45
+ expect(entryInputs.length, "core.ts entry chunk present").toBeGreaterThan(0);
46
+ expect(entryInputs.some((p) => p.includes("cli/plugins"))).toBe(false);
47
+ // Still reachable, just split into its own chunk (lazy, not dropped).
48
+ expect(allInputs.some((p) => p.includes("cli/plugins"))).toBe(true);
49
+ }, 30_000);
50
+
51
+ test("audit/discover (classifyFiles) does not statically import cli/plugins", async () => {
52
+ const { entryInputs } = await entryInputsFor("./discover.ts");
53
+ expect(entryInputs.length, "discover.ts entry chunk present").toBeGreaterThan(0);
54
+ expect(entryInputs.some((p) => p.includes("cli/plugins"))).toBe(false);
55
+ }, 30_000);
56
+ });
@@ -1,5 +1,5 @@
1
1
  import { describe, test, expect } from "vitest";
2
- import { RULE_CATALOG, ruleMeta } from "./catalog";
2
+ import { RULE_CATALOG, RULE_CATEGORY, ruleMeta } from "./catalog";
3
3
  import { loadPlugins } from "../cli/plugins";
4
4
 
5
5
  /** All post-synth check ids the audit can actually surface, from the lexicons. */
@@ -34,6 +34,21 @@ describe("RULE_CATALOG", () => {
34
34
  expect(m.remediation.length, `${id} has remediation`).toBeGreaterThan(0);
35
35
  expect(["merge-worthy", "report-only"]).toContain(m.tier);
36
36
  expect(["deterministic", "guidance"]).toContain(m.fixKind);
37
+ expect(["security", "correctness", "best-practice"], `${id} has a valid category`).toContain(m.category);
38
+ }
39
+ });
40
+
41
+ test("every entry is categorized from the curated map (no fallback)", () => {
42
+ // meta() falls back to "best-practice" only if RULE_CATEGORY is missing an
43
+ // id — assert the curated map explicitly covers every catalogued rule, so a
44
+ // new rule can't silently inherit the fallback.
45
+ const uncategorized = Object.keys(RULE_CATALOG).filter((id) => !(id in RULE_CATEGORY)).sort();
46
+ expect(uncategorized, "rules missing an explicit RULE_CATEGORY entry").toEqual([]);
47
+ // And an authority citation (the strongest signal) always means security.
48
+ for (const [id, m] of Object.entries(RULE_CATALOG)) {
49
+ if (m.authority && m.authority.length > 0) {
50
+ expect(m.category, `${id} cites an authority, so it is security`).toBe("security");
51
+ }
37
52
  }
38
53
  });
39
54