@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.
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 +86 -55
  405. package/src/audit/fetch.ts +118 -87
  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,35 @@
1
+ import { INTRINSIC_MARKER, type Intrinsic } from "./intrinsic.js";
2
+ /**
3
+ * Reference to an attribute of a parent entity.
4
+ * Lexicon serializers read `getLogicalName()` and `attribute` to produce
5
+ * their own output format (e.g. CloudFormation `Fn::GetAttr`).
6
+ */
7
+ export declare class AttrRef implements Intrinsic {
8
+ readonly [INTRINSIC_MARKER]: true;
9
+ readonly parent: WeakRef<object>;
10
+ readonly attribute: string;
11
+ private logicalName?;
12
+ constructor(parent: object, attribute: string);
13
+ /**
14
+ * Set the logical name for this attribute reference
15
+ * @internal
16
+ */
17
+ _setLogicalName(name: string): void;
18
+ /**
19
+ * Get the logical name assigned to this attribute reference.
20
+ */
21
+ getLogicalName(): string | undefined;
22
+ /**
23
+ * Serialize to a generic envelope. Lexicon-specific serializers should
24
+ * read `getLogicalName()` and `attribute` directly instead of relying
25
+ * on this format.
26
+ * @throws {Error} If logical name has not been set
27
+ */
28
+ toJSON(): {
29
+ __attrRef: {
30
+ entity: string;
31
+ attribute: string;
32
+ };
33
+ };
34
+ }
35
+ //# sourceMappingURL=attrref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attrref.d.ts","sourceRoot":"","sources":["../src/attrref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;GAIG;AACH,qBAAa,OAAQ,YAAW,SAAS;IACvC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,EAAG,IAAI,CAAU;IAC5C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,WAAW,CAAC,CAAS;gBAEjB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK7C;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAInC;;OAEG;IACH,cAAc,IAAI,MAAM,GAAG,SAAS;IAIpC;;;;;OAKG;IACH,MAAM,IAAI;QAAE,SAAS,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;CAU/D"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Rule catalog — classifies every CI post-synth check the auditor can surface.
3
+ *
4
+ * Two axes drive how a finding is presented:
5
+ * - `tier`: `merge-worthy` (a security vuln/supply-chain exposure or a hard
6
+ * correctness bug — worth opening a PR to the target) vs `report-only`
7
+ * (hygiene/style/perf/deprecation — shown in the report, never a PR title).
8
+ * - `fixKind`: `deterministic` (a safe mechanical fix can be auto-applied or
9
+ * diffed) vs `guidance` (needs human/LLM judgment — emit remediation text
10
+ * only; never auto-applied; never run by the hosted service).
11
+ *
12
+ * The catalog covers exactly the post-synth checks run by the audit across all
13
+ * lexicons (CI: GHA/WGL/WFJ; IaC and manifests: WK8/WAW/AZR/WGC/WHM/DKRD/ARGO).
14
+ * A drift-guard test asserts it stays in sync with the lexicons, and that every
15
+ * entry has a `category`.
16
+ */
17
+ export type Tier = "merge-worthy" | "report-only";
18
+ /** deterministic = safe auto-fix/diff; guidance = report text only (needs judgment). */
19
+ export type FixKind = "deterministic" | "guidance";
20
+ /**
21
+ * What kind of finding this is — orthogonal to `tier` (fix confidence). Lets the
22
+ * report say "N security, M best-practice, K correctness" instead of branding
23
+ * everything "security." `security` = exposure/vuln/supply-chain; `correctness`
24
+ * = a structural bug (broken reference, invalid schema, never-runs); everything
25
+ * else is `best-practice` (hygiene/style/deprecation/reliability).
26
+ */
27
+ export type Category = "security" | "correctness" | "best-practice";
28
+ export interface Authority {
29
+ name: string;
30
+ url: string;
31
+ }
32
+ export interface RuleMeta {
33
+ id: string;
34
+ tier: Tier;
35
+ fixKind: FixKind;
36
+ /** What kind of finding this is (security / correctness / best-practice). */
37
+ category: Category;
38
+ title: string;
39
+ /** External backing so a finding isn't just chant's opinion. */
40
+ authority?: Authority[];
41
+ /** One-line fix guidance (always present). */
42
+ remediation: string;
43
+ /**
44
+ * False if the check reads the chant model (`ctx.entities`) rather than the
45
+ * emitted YAML (`ctx.outputs`) — such a check won't fire on audited YAML.
46
+ * All current post-synth checks are output-based, so this is true.
47
+ */
48
+ yamlBased: boolean;
49
+ }
50
+ /**
51
+ * Finding category per rule (#415). Curated: security rules are those that
52
+ * cite an authority or guard an exposure; correctness rules flag structural
53
+ * bugs (broken references, invalid schema, never-runs); the rest are
54
+ * best-practice. A drift test asserts this covers every catalogued rule.
55
+ */
56
+ export declare const RULE_CATEGORY: Record<string, Category>;
57
+ /** Every audited post-synth check, keyed by id. */
58
+ export declare const RULE_CATALOG: Record<string, RuleMeta>;
59
+ /** Look up catalog metadata for a check id, if known. */
60
+ export declare function ruleMeta(id: string): RuleMeta | undefined;
61
+ /** Docs path for the audit rules reference (one anchor per rule id). */
62
+ export declare const RULES_DOC_PATH = "/chant/lint-rules/audit-rules/";
63
+ /** Absolute URL to a rule's entry in the audit rules reference. */
64
+ export declare function ruleDocUrl(id: string): string;
65
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/audit/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,IAAI,GAAG,cAAc,GAAG,aAAa,CAAC;AAElD,wFAAwF;AACxF,MAAM,MAAM,OAAO,GAAG,eAAe,GAAG,UAAU,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,eAAe,CAAC;AAEpE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,6EAA6E;IAC7E,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IACxB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAiFD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAuNlD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAwOjD,CAAC;AAEF,yDAAyD;AACzD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAEzD;AAED,wEAAwE;AACxE,eAAO,MAAM,cAAc,mCAAmC,CAAC;AAE/D,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE7C"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Audit core — run chant's CI security checks against arbitrary repo YAML.
3
+ *
4
+ * The post-synth security checks (`lexicons/<lex>/src/lint/post-synth/*.ts`)
5
+ * read the emitted workflow YAML from `ctx.outputs`, not the chant model
6
+ * (`ctx.entities`). So an auditor can feed *existing* repo YAML straight in as
7
+ * a synthetic output and run the real rules — no import-to-chant-model step.
8
+ *
9
+ * Each file is audited as its own `primary` output so single-document security
10
+ * checks (the merge-worthy tier: permissions, pinning, injection, secrets)
11
+ * fire on every workflow. Cross-file checks (e.g. duplicate workflow names)
12
+ * only see one file at a time here; that is acceptable because the security
13
+ * tier is per-document.
14
+ *
15
+ * Checks that read `ctx.entities` instead of `ctx.outputs` will not fire on
16
+ * audited YAML — the security tier is YAML-based, so this is by design.
17
+ */
18
+ import type { Severity } from "../lint/rule.js";
19
+ import type { PostSynthCheck } from "../lint/post-synth.js";
20
+ /**
21
+ * The lexicon whose post-synth checks run against an audited file. Any lexicon
22
+ * name is accepted — `defaultChecksProvider` loads the plugin by name — so a
23
+ * caller can audit a lexicon outside the built-in set. The listed names are the
24
+ * ones with built-in content detection (see `discover.ts`), kept here only for
25
+ * editor autocomplete; `(string & {})` keeps the union open.
26
+ */
27
+ export type AuditLexicon = "github" | "gitlab" | "forgejo" | "k8s" | "docker" | "aws" | "azure" | "gcp" | "helm" | (string & {});
28
+ /** A single CI file to audit. */
29
+ export interface AuditInput {
30
+ /** Path used to tag findings (e.g. ".github/workflows/ci.yml"). */
31
+ path: string;
32
+ /** Raw content of the file. */
33
+ content: string;
34
+ /** Which lexicon's checks to run against it. */
35
+ lexicon: AuditLexicon;
36
+ /**
37
+ * Bundle inputs (e.g. a Helm chart) supply a files map keyed by relative path
38
+ * — checks that read `output.files` (helm, docker) see the whole bundle.
39
+ */
40
+ files?: Record<string, string>;
41
+ }
42
+ /** A finding produced by a post-synth check against an audited file. */
43
+ export interface AuditFinding {
44
+ checkId: string;
45
+ severity: Severity;
46
+ message: string;
47
+ /** The audited file this finding came from. */
48
+ file: string;
49
+ /** The lexicon that produced the finding. */
50
+ lexicon: string;
51
+ /** Optional entity (e.g. job name) the check attached. */
52
+ entity?: string;
53
+ }
54
+ /**
55
+ * Resolve the post-synth checks for a lexicon. Injectable so the core can be
56
+ * unit-tested without loading real lexicon packages.
57
+ */
58
+ export type ChecksProvider = (lexicon: AuditLexicon) => Promise<PostSynthCheck[]>;
59
+ /**
60
+ * Default provider: load the lexicon plugin(s) and return their post-synth
61
+ * checks. Forgejo workflows are GitHub-dialect YAML, so the GitHub security
62
+ * tier is run against them in addition to Forgejo's own checks.
63
+ */
64
+ /** Thrown when a lexicon package the audit needs isn't installed. */
65
+ export declare class MissingLexiconError extends Error {
66
+ }
67
+ /**
68
+ * Audit a set of CI files and return all findings. Pure with respect to the
69
+ * filesystem and network — callers supply file contents.
70
+ */
71
+ export declare function auditFiles(inputs: AuditInput[], opts?: {
72
+ checksProvider?: ChecksProvider;
73
+ }): Promise<AuditFinding[]>;
74
+ /** Label for findings that span more than one file (e.g. duplicate names). */
75
+ export declare const CROSS_FILE = "(cross-file)";
76
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/audit/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;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iB,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Unified, detectTemplate-driven discovery (prototype for #391).
3
+ *
4
+ * Today `commands/audit.ts` ships six bespoke discoverers — `discoverManifests`,
5
+ * `discoverGcp`, `discoverCloudFormation`, `discoverArm`, `discoverDocker`,
6
+ * `discoverHelm` — each walking the tree and re-implementing a `looksLike*`
7
+ * content heuristic that mostly duplicates the lexicon plugin's own
8
+ * `detectTemplate(parsed)` (already used by `chant import`).
9
+ *
10
+ * This module collapses that into ONE walk plus a single content-detection
11
+ * pass that delegates to each plugin's `detectTemplate`. A new content-detected
12
+ * lexicon then needs only a `detectTemplate` and a precedence entry — no new
13
+ * walk, no new heuristic.
14
+ *
15
+ * It is deliberately a HYBRID, because some classification can't be expressed
16
+ * by content shape alone:
17
+ * - CI (github/forgejo/gitlab) stays a PATH fast-path. github and forgejo
18
+ * workflows are byte-for-byte the same shape (`on:` + `jobs:`), so only the
19
+ * directory (`.github` vs `.forgejo`) disambiguates them.
20
+ * - Dockerfiles are matched by FILENAME — they aren't YAML/JSON, so
21
+ * `detectTemplate` (which only knows Compose's `services:`) can't see them.
22
+ * - Helm charts are a directory BUNDLE keyed by `Chart.yaml`; the helm checks
23
+ * read `output.files`, so the whole chart is one AuditInput.
24
+ * - k8s `detectTemplate` matches any `apiVersion`+`kind`, including GCP Config
25
+ * Connector (`cnrm.cloud.google.com`) resources, so gcp must be tried first.
26
+ * - aws/azure checks `JSON.parse` their input, so YAML/templated content is
27
+ * normalized to a JSON string here.
28
+ */
29
+ import type { LexiconPlugin } from "../lexicon.js";
30
+ import type { AuditInput } from "./core.js";
31
+ /** Lexicons the auditor knows how to detect and run checks for. */
32
+ export declare const AUDIT_LEXICONS: readonly ["github", "gitlab", "forgejo", "k8s", "docker", "aws", "azure", "gcp", "helm"];
33
+ /**
34
+ * Load the plugins used for detection. Each is loaded in isolation (no
35
+ * cross-lexicon conflict aggregation — detection only reads `detectTemplate`),
36
+ * and a lexicon that isn't installed is skipped rather than failing the audit.
37
+ * `init()` is intentionally not called: `detectTemplate` is a pure function of
38
+ * its input and needs no plugin setup.
39
+ */
40
+ export declare function loadAuditPlugins(names?: readonly string[]): Promise<LexiconPlugin[]>;
41
+ /** A repo file (relative POSIX path + content) — the unit both local and remote feed the classifier. */
42
+ export interface RepoFile {
43
+ path: string;
44
+ content: string;
45
+ }
46
+ /**
47
+ * The minimal shape `classifyFiles` needs from a lexicon: its name and (for
48
+ * content-detected lexicons) its `detectTemplate`. Narrower than `LexiconPlugin`
49
+ * so an edge caller can build detectors from static `@…/detect` imports without
50
+ * loading the full plugin (which drags the TypeScript compiler — see #426).
51
+ */
52
+ export interface DetectPlugin {
53
+ name: string;
54
+ detectTemplate?: (data: unknown) => boolean;
55
+ }
56
+ /**
57
+ * Whether a path is worth reading/fetching at all. Bounds the local walk and,
58
+ * crucially, the remote fetch (so we never pull a whole repo's contents).
59
+ */
60
+ export declare function isCandidatePath(path: string): boolean;
61
+ /**
62
+ * Classify an in-memory set of repo files into per-lexicon audit inputs. Pure
63
+ * (no fs, no network) so the local walk and the remote tree-fetch share exactly
64
+ * one detection path. Each file maps to at most one lexicon: CI by path,
65
+ * Dockerfiles by name, Helm charts as a bundle, everything else by the
66
+ * precedence-ordered content detectors (delegating to each plugin's
67
+ * `detectTemplate`). Lexicons whose plugin isn't provided are skipped.
68
+ */
69
+ export declare function classifyFiles(files: RepoFile[], plugins: DetectPlugin[]): AuditInput[];
70
+ /**
71
+ * Local discovery: one filesystem walk, candidate-filtered, read into memory,
72
+ * then handed to the shared `classifyFiles`. Detection is skipped for any
73
+ * lexicon whose plugin isn't provided, so a caller can scope discovery.
74
+ */
75
+ export declare function discoverByDetection(root: string, plugins: LexiconPlugin[]): AuditInput[];
76
+ //# sourceMappingURL=discover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/audit/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,QAAQ,CAAC;AAEvD,mEAAmE;AACnE,eAAO,MAAM,cAAc,0FAA2F,CAAC;AAEvH;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,GAAE,SAAS,MAAM,EAAmB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAe1G;AAoJD,wGAAwG;AACxG,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;CAC7C;AAUD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrD;AA0BD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,UAAU,EAAE,CAiCtF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,CAWxF"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Remote fetch — pull a repo's candidate files (all lexicons) from a git host so
3
+ * the auditor can run on a URL, not just a local path. This is the ONLY audit
4
+ * module that touches the network; the core stays pure.
5
+ *
6
+ * SSRF posture: only an allowlisted set of hosts is accepted; request URLs are
7
+ * built from the parsed owner/repo (never a user-controlled host); redirects
8
+ * are refused; and file count / size / total bytes / time are all capped.
9
+ */
10
+ import type { AuditLexicon } from "./core.js";
11
+ export interface FetchOptions {
12
+ /** Branch/tag/sha; defaults to the repo's default branch. */
13
+ ref?: string;
14
+ /** Server-side token (lifts rate limits). Never surfaced to callers. */
15
+ token?: string;
16
+ /** Max number of files to fetch (default 50). */
17
+ maxFiles?: number;
18
+ /** Max bytes for a single file; larger files are skipped (default 256 KiB). */
19
+ maxBytesPerFile?: number;
20
+ /** Max total bytes across all files; exceeding throws (default 2 MiB). */
21
+ maxTotalBytes?: number;
22
+ /** Per-request timeout in ms (default 10000). */
23
+ timeoutMs?: number;
24
+ /** Injectable fetch for testing. Defaults to the global fetch. */
25
+ fetchImpl?: typeof fetch;
26
+ }
27
+ type HostKind = "github" | "forgejo" | "gitlab";
28
+ interface HostConfig {
29
+ kind: HostKind;
30
+ api: string;
31
+ lexicon: AuditLexicon;
32
+ }
33
+ export declare class FetchError extends Error {
34
+ }
35
+ interface ParsedRepo {
36
+ host: HostConfig;
37
+ owner: string;
38
+ repo: string;
39
+ }
40
+ /** Parse and validate a repo URL against the host allowlist (SSRF guard). */
41
+ export declare function parseRepoUrl(url: string): ParsedRepo;
42
+ /**
43
+ * Fetch every candidate file in a repo (all lexicons), so a URL audit covers the
44
+ * same ground as a local one. Returns raw {path, content}; classification (which
45
+ * needs the lexicon plugins) is the caller's job via `classifyFiles`.
46
+ */
47
+ export declare function fetchRepoFiles(url: string, opts?: FetchOptions): Promise<Array<{
48
+ path: string;
49
+ content: string;
50
+ }>>;
51
+ /**
52
+ * Resolve an action ref (e.g. action="actions/checkout", ref="v4") to its
53
+ * commit SHA via the GitHub API. Returns undefined on any failure — pinning
54
+ * degrades gracefully to guidance. Actions are GitHub-hosted slugs, so this
55
+ * queries api.github.com regardless of the audited repo's host.
56
+ */
57
+ export declare function resolveActionSha(action: string, ref: string, opts?: {
58
+ token?: string;
59
+ fetchImpl?: typeof fetch;
60
+ timeoutMs?: number;
61
+ }): Promise<string | undefined>;
62
+ interface ImageRef {
63
+ registry: string;
64
+ repository: string;
65
+ tag: string;
66
+ }
67
+ /** Parse a Docker/OCI image reference. Returns undefined if already digested. */
68
+ export declare function parseImageRef(ref: string): ImageRef | undefined;
69
+ /**
70
+ * Resolve a container image `name:tag` to its `sha256:...` digest via the OCI
71
+ * registry v2 API (anonymous bearer-token challenge). Returns undefined on any
72
+ * failure or for a non-allowlisted registry. The image ref is untrusted, so we
73
+ * only ever contact allowlisted public registries (SSRF guard).
74
+ */
75
+ export declare function resolveImageDigest(image: string, opts?: {
76
+ fetchImpl?: typeof fetch;
77
+ timeoutMs?: number;
78
+ }): Promise<string | undefined>;
79
+ /**
80
+ * Resolve the audited repo's current commit SHA (best-effort) for the report
81
+ * snapshot, so findings are anchored to an exact commit. Returns undefined on
82
+ * any failure.
83
+ */
84
+ export declare function resolveRepoCommit(url: string, opts?: {
85
+ token?: string;
86
+ fetchImpl?: typeof fetch;
87
+ timeoutMs?: number;
88
+ }): Promise<string | undefined>;
89
+ export {};
90
+ //# sourceMappingURL=fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/audit/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AASD,KAAK,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhD,UAAU,UAAU;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OA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;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1E,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAwB7B"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Proof of minimal change — for a deterministic (fixKind: "deterministic")
3
+ * finding, produce a minimal patched YAML + unified diff so a PR can show it
4
+ * changes exactly the flagged line and nothing else.
5
+ *
6
+ * No LLM, no API key — purely mechanical text edits. Findings that need
7
+ * judgment (fixKind: "guidance") are NOT auto-fixed here; they return
8
+ * `applied: false` with the catalog remediation as guidance. Any LLM-assisted
9
+ * apply of a guidance fix is a separate, optional, local concern.
10
+ *
11
+ * Edits are applied directly to the YAML text (not via a model round-trip), so
12
+ * the patched output differs only where intended — the diff proves it.
13
+ */
14
+ export interface ProveOptions {
15
+ /** Resolve an action ref (e.g. "actions/checkout@v4") to a 40-char SHA. */
16
+ resolveSha?: (action: string, ref: string) => string | undefined;
17
+ /** Resolve a container image (e.g. "node:20") to a "sha256:..." digest. */
18
+ resolveDigest?: (image: string) => string | undefined;
19
+ }
20
+ export interface ProofResult {
21
+ checkId: string;
22
+ /** True when a deterministic fix was produced. */
23
+ applied: boolean;
24
+ /** Full patched content (only when applied). */
25
+ patched?: string;
26
+ /** Unified diff of the change (only when applied). */
27
+ diff?: string;
28
+ /** Guidance/explanation when not applied (guidance fix, no-op, or needs-sha). */
29
+ note?: string;
30
+ /**
31
+ * Why the result is what it is:
32
+ * - applied: a fix was produced
33
+ * - noop: nothing to fix (issue absent, or already resolved by a prior fix)
34
+ * - needs-input: deterministic but blocked on external input (e.g. a SHA)
35
+ * - guidance: not auto-fixable; needs human judgement
36
+ */
37
+ reason: "applied" | "noop" | "needs-input" | "guidance";
38
+ }
39
+ /** Extract unpinned `uses: action@ref` references (deduped) from workflow YAML. */
40
+ export declare function extractUnpinnedActions(content: string): Array<{
41
+ action: string;
42
+ ref: string;
43
+ }>;
44
+ /** Extract unpinned `image:` references (deduped) from CI YAML. */
45
+ export declare function extractUnpinnedImages(content: string): string[];
46
+ /**
47
+ * Produce a deterministic fix + diff for a finding, if one is mechanical.
48
+ * Returns `applied: false` with guidance for non-deterministic findings.
49
+ */
50
+ export declare function proveFix(checkId: string, content: string, opts?: ProveOptions): ProofResult;
51
+ /** Render a unified diff with up to `context` equal lines around changes. */
52
+ export declare function unifiedDiff(oldStr: string, newStr: string, context?: number): string;
53
+ //# sourceMappingURL=proof.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof.d.ts","sourceRoot":"","sources":["../../src/audit/proof.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACjE,2EAA2E;IAC3E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACvD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,CAAC;CACzD;AAUD,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAc9F;AA4BD,mEAAmE;AACnE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAY/D;AAwCD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,YAAiB,GAAG,WAAW,CA4C/F;AAqCD,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,MAAM,CAwD/E"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * HTML report generator (the "expanded" mode) — a self-contained, presentable
3
+ * report rendered from the shared report model. Inline CSS, no external assets;
4
+ * opens in a browser and is shareable as a single file. Also the natural output
5
+ * for the future hosted service.
6
+ *
7
+ * Customization: a default template with `{{placeholder}}` slots, overridable
8
+ * via `template`, plus theme knobs (title, logo, accent, footer).
9
+ */
10
+ import type { AuditFinding } from "./core.js";
11
+ import { type AuditSnapshot, type BuildModelOptions } from "./report-model.js";
12
+ export type { AuditSnapshot } from "./report-model.js";
13
+ /** Customizable theme knobs filled into the template. */
14
+ export interface ReportTheme {
15
+ title?: string;
16
+ /** Logo: a URL (rendered as <img>) or inline text/SVG. */
17
+ logo?: string;
18
+ /** CSS color for accents. */
19
+ accent?: string;
20
+ /** Footer HTML (defaults to attribution). */
21
+ footer?: string;
22
+ }
23
+ export interface RenderHtmlOptions extends BuildModelOptions {
24
+ snapshot?: AuditSnapshot;
25
+ theme?: ReportTheme;
26
+ /** Full template override; `{{title}} {{accent}} {{logo}} {{meta}} {{body}} {{footer}}` slots. */
27
+ template?: string;
28
+ notes?: string[];
29
+ }
30
+ /** Render an audit report as a self-contained HTML document. */
31
+ export declare function renderHtml(findings: AuditFinding[], opts?: RenderHtmlOptions): string;
32
+ //# sourceMappingURL=report-html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-html.d.ts","sourceRoot":"","sources":["../../src/audit/report-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAqC,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAoF,MAAM,gBAAgB,CAAC;AAEjM,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,yDAAyD;AACzD,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAgJD,gEAAgE;AAChE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,IAAI,GAAE,iBAAsB,GAAG,MAAM,CAoCzF"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Shared report model — turns raw findings into the structured shape both the
3
+ * Markdown and HTML renderers consume, so they can never drift. Computes the
4
+ * tier split, de-noising, per-file quick-win patches (combined unified diff via
5
+ * proof.ts), guidance clusters, and severity counts.
6
+ */
7
+ import type { AuditFinding } from "./core.js";
8
+ import { type Authority, type Category, type FixKind, type RuleMeta, type Tier } from "./catalog.js";
9
+ import { type ProveOptions } from "./proof.js";
10
+ import type { Severity } from "../lint/rule.js";
11
+ /**
12
+ * Version of the machine-readable JSON report. Stability contract: additive
13
+ * changes (new fields) keep the same major; renamed/removed fields bump the
14
+ * major. Consumers should check the major and ignore unknown fields. See
15
+ * `docs/cli/audit`.
16
+ */
17
+ export declare const REPORT_SCHEMA_VERSION = "1.0";
18
+ export declare const SEVERITY_WEIGHT: Record<Severity, number>;
19
+ export interface EnrichedFinding extends AuditFinding {
20
+ meta: RuleMeta;
21
+ }
22
+ /** A per-file quick-win: a combined patch plus any findings still needing input. */
23
+ export interface QuickWinFile {
24
+ file: string;
25
+ /** Combined unified diff of the deterministic fixes applied to this file. */
26
+ diff?: string;
27
+ /** Rules the diff addresses. */
28
+ addressed: RuleMeta[];
29
+ /** Deduped findings that are deterministic but blocked on a value (e.g. a SHA). */
30
+ needsInput: EnrichedFinding[];
31
+ }
32
+ /** Guidance findings grouped by their primary authority. */
33
+ export interface GuidanceCluster {
34
+ name: string;
35
+ url?: string;
36
+ rules: Array<{
37
+ meta: RuleMeta;
38
+ findings: EnrichedFinding[];
39
+ }>;
40
+ }
41
+ export interface ReportCounts {
42
+ total: number;
43
+ quickWin: number;
44
+ needsReview: number;
45
+ reportOnly: number;
46
+ errors: number;
47
+ warnings: number;
48
+ infos: number;
49
+ /** Findings by category (#415) — what kind of issue, not how confident the fix. */
50
+ security: number;
51
+ correctness: number;
52
+ bestPractice: number;
53
+ }
54
+ export interface ReportModel {
55
+ counts: ReportCounts;
56
+ quickWins: QuickWinFile[];
57
+ needsReview: GuidanceCluster[];
58
+ reportOnly: EnrichedFinding[];
59
+ /** All shown findings (after de-noise), flat and sorted — for serialization. */
60
+ findings: EnrichedFinding[];
61
+ }
62
+ /** Provenance snapshot of what was audited (anchors findings to a commit). */
63
+ export interface AuditSnapshot {
64
+ target: string;
65
+ host?: string;
66
+ repo?: string;
67
+ ref?: string;
68
+ commit?: string;
69
+ files: string[];
70
+ generatedAt: string;
71
+ toolVersion: string;
72
+ }
73
+ /** A finding flattened for the machine-readable JSON report. */
74
+ export interface SerializedFinding {
75
+ checkId: string;
76
+ severity: Severity;
77
+ message: string;
78
+ file: string;
79
+ entity?: string;
80
+ lexicon: string;
81
+ tier: Tier;
82
+ fixKind: FixKind;
83
+ /** What kind of finding this is (security / correctness / best-practice). */
84
+ category: Category;
85
+ title: string;
86
+ remediation: string;
87
+ authority: Authority[];
88
+ /** Link to this rule's entry in the audit rules reference. */
89
+ docUrl: string;
90
+ }
91
+ /** The versioned machine-readable audit report. */
92
+ export interface AuditReportJson {
93
+ schemaVersion: string;
94
+ tool: {
95
+ name: string;
96
+ version: string;
97
+ };
98
+ snapshot?: AuditSnapshot;
99
+ summary: ReportCounts;
100
+ findings: SerializedFinding[];
101
+ }
102
+ export declare function metaFor(id: string): RuleMeta;
103
+ export declare function sortFindings(a: EnrichedFinding, b: EnrichedFinding): number;
104
+ export interface BuildModelOptions {
105
+ files?: Array<{
106
+ path: string;
107
+ content: string;
108
+ }>;
109
+ resolveSha?: ProveOptions["resolveSha"];
110
+ resolveDigest?: ProveOptions["resolveDigest"];
111
+ }
112
+ /** Build the structured report model from raw findings. */
113
+ export declare function buildReportModel(findings: AuditFinding[], opts?: BuildModelOptions): ReportModel;
114
+ /** Build the versioned, machine-readable JSON report (stable contract). */
115
+ export declare function buildReportJson(findings: AuditFinding[], opts?: {
116
+ snapshot?: AuditSnapshot;
117
+ toolVersion?: string;
118
+ }): AuditReportJson;
119
+ //# sourceMappingURL=report-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-model.d.ts","sourceRoot":"","sources":["../../src/audit/report-model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAA4B,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5H,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;GAKG;AAGH,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC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MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,UAAU,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACxC,aAAa,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;CAC/C;AAED,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,IAAI,GAAE,iBAAsB,GAAG,WAAW,CAuCpG;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,aAAa,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,eAAe,CAwBxI"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Markdown report generator (the "minimized" mode) — renders the shared
3
+ * report model as Markdown that pastes cleanly into a PR or issue.
4
+ *
5
+ * - **Quick wins (deterministic)** lead, per file, with one combined unified
6
+ * diff so the report doubles as a ready-to-apply patch.
7
+ * - **Needs review (guidance)** and **Report-only (hygiene)** collapse into
8
+ * `<details>` so a pasted report opens on the actionable fix.
9
+ *
10
+ * For a presentable/branded report, see `renderHtml` (report-html.ts).
11
+ */
12
+ import type { AuditFinding } from "./core.js";
13
+ import type { ProveOptions } from "./proof.js";
14
+ export interface RenderOptions {
15
+ /** Repo URL or path shown in the header. */
16
+ target?: string;
17
+ /** Audited file contents (path → YAML), enabling inline fix diffs. */
18
+ files?: Array<{
19
+ path: string;
20
+ content: string;
21
+ }>;
22
+ /** Resolve an action ref to a SHA so pin fixes can be diffed. */
23
+ resolveSha?: ProveOptions["resolveSha"];
24
+ /** Resolve a container image to a digest so image-pin fixes can be diffed. */
25
+ resolveDigest?: ProveOptions["resolveDigest"];
26
+ /** Coverage caveats shown near the top (e.g. unresolved GitLab includes). */
27
+ notes?: string[];
28
+ }
29
+ /** Render an audit report as Markdown. */
30
+ export declare function renderMarkdown(findings: AuditFinding[], opts?: RenderOptions): string;
31
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/audit/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAc5C,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,iEAAiE;IACjE,UAAU,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACxC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAC9C,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAmDD,0CAA0C;AAC1C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,IAAI,GAAE,aAAkB,GAAG,MAAM,CAqCzF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generator for the audit rules reference docs page. The page is derived from
3
+ * RULE_CATALOG so report rule-id links always have a target, and a sync test
4
+ * (rules-doc.test.ts) keeps the committed page in step with the catalog.
5
+ *
6
+ * Each rule gets an `### <ID>` heading, which Starlight slugifies to `#<id>`
7
+ * (lowercased) — the anchor `ruleDocUrl()` links to.
8
+ */
9
+ /** Render the full audit rules reference page (frontmatter + body). */
10
+ export declare function renderRulesReference(): string;
11
+ //# sourceMappingURL=rules-doc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules-doc.d.ts","sourceRoot":"","sources":["../../src/audit/rules-doc.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAwBH,uEAAuE;AACvE,wBAAgB,oBAAoB,IAAI,MAAM,CAmB7C"}