@intentius/chant 0.57.0 → 0.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (504) hide show
  1. package/dist/audit/catalog.d.ts +51 -1
  2. package/dist/audit/catalog.d.ts.map +1 -1
  3. package/dist/audit/core.d.ts +20 -1
  4. package/dist/audit/core.d.ts.map +1 -1
  5. package/dist/audit/discover.d.ts +14 -8
  6. package/dist/audit/discover.d.ts.map +1 -1
  7. package/dist/audit/lineage.d.ts +10 -0
  8. package/dist/audit/lineage.d.ts.map +1 -0
  9. package/dist/audit/prior-art.d.ts +385 -0
  10. package/dist/audit/prior-art.d.ts.map +1 -0
  11. package/dist/audit/proof.d.ts +16 -0
  12. package/dist/audit/proof.d.ts.map +1 -1
  13. package/dist/audit/report-html.d.ts.map +1 -1
  14. package/dist/audit/report-model.d.ts +8 -1
  15. package/dist/audit/report-model.d.ts.map +1 -1
  16. package/dist/audit/report.d.ts.map +1 -1
  17. package/dist/audit/rules-doc.d.ts +3 -0
  18. package/dist/audit/rules-doc.d.ts.map +1 -1
  19. package/dist/audit/secrets.d.ts +15 -0
  20. package/dist/audit/secrets.d.ts.map +1 -1
  21. package/dist/audit/terraform-state.d.ts +46 -0
  22. package/dist/audit/terraform-state.d.ts.map +1 -0
  23. package/dist/build.d.ts +17 -1
  24. package/dist/build.d.ts.map +1 -1
  25. package/dist/claimed-fields.d.ts +161 -0
  26. package/dist/claimed-fields.d.ts.map +1 -0
  27. package/dist/cli/build-params-cli.d.ts +2 -2
  28. package/dist/cli/command-group.d.ts +14 -0
  29. package/dist/cli/command-group.d.ts.map +1 -1
  30. package/dist/cli/commands/audit.d.ts +17 -1
  31. package/dist/cli/commands/audit.d.ts.map +1 -1
  32. package/dist/cli/commands/build.d.ts.map +1 -1
  33. package/dist/cli/commands/check-lexicon-docs.d.ts +1 -1
  34. package/dist/cli/commands/check-lexicon-examples.d.ts +16 -6
  35. package/dist/cli/commands/check-lexicon-examples.d.ts.map +1 -1
  36. package/dist/cli/commands/init-lexicon/templates/codegen.d.ts +1 -0
  37. package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -1
  38. package/dist/cli/commands/init-lexicon/templates/project.d.ts +7 -0
  39. package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -1
  40. package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
  41. package/dist/cli/commands/init.d.ts.map +1 -1
  42. package/dist/cli/commands/lint.d.ts.map +1 -1
  43. package/dist/cli/commands/onboard.d.ts +2 -0
  44. package/dist/cli/commands/onboard.d.ts.map +1 -1
  45. package/dist/cli/handlers/build.d.ts.map +1 -1
  46. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  47. package/dist/cli/handlers/operator.d.ts +82 -16
  48. package/dist/cli/handlers/operator.d.ts.map +1 -1
  49. package/dist/cli/handlers/run.d.ts +49 -42
  50. package/dist/cli/handlers/run.d.ts.map +1 -1
  51. package/dist/cli/main.d.ts +28 -1
  52. package/dist/cli/main.d.ts.map +1 -1
  53. package/dist/cli/mcp/op-tools.d.ts +16 -1
  54. package/dist/cli/mcp/op-tools.d.ts.map +1 -1
  55. package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
  56. package/dist/cli/mcp/resources/context.d.ts.map +1 -1
  57. package/dist/cli/registry.d.ts +26 -9
  58. package/dist/cli/registry.d.ts.map +1 -1
  59. package/dist/codegen/generate-post-synth-barrel.d.ts +1 -1
  60. package/dist/components/auto-release.d.ts +10 -20
  61. package/dist/components/auto-release.d.ts.map +1 -1
  62. package/dist/components/capability.d.ts +4 -4
  63. package/dist/components/cli-support.d.ts +20 -21
  64. package/dist/components/cli-support.d.ts.map +1 -1
  65. package/dist/components/component.d.ts +3 -3
  66. package/dist/components/component.d.ts.map +1 -1
  67. package/dist/components/driver-output.d.ts.map +1 -1
  68. package/dist/components/driver.d.ts +66 -36
  69. package/dist/components/driver.d.ts.map +1 -1
  70. package/dist/components/index.d.ts +1 -2
  71. package/dist/components/index.d.ts.map +1 -1
  72. package/dist/components/manifest-persistence.d.ts +1 -9
  73. package/dist/components/manifest-persistence.d.ts.map +1 -1
  74. package/dist/components/run-progress.d.ts +6 -6
  75. package/dist/components/run-progress.d.ts.map +1 -1
  76. package/dist/components/verbs/run-agent.d.ts +9 -15
  77. package/dist/components/verbs/run-agent.d.ts.map +1 -1
  78. package/dist/components/verbs/verify.d.ts +2 -2
  79. package/dist/deep-observation.d.ts +17 -0
  80. package/dist/deep-observation.d.ts.map +1 -1
  81. package/dist/discovery/files.d.ts +4 -4
  82. package/dist/discovery/fold-import.d.ts.map +1 -1
  83. package/dist/discovery/param-deps.d.ts +33 -0
  84. package/dist/discovery/param-deps.d.ts.map +1 -1
  85. package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
  86. package/dist/discovery/sandbox/config-wire.d.ts +2 -2
  87. package/dist/fold/foldable-helpers.d.ts +5 -1
  88. package/dist/fold/foldable-helpers.d.ts.map +1 -1
  89. package/dist/fold-provenance.d.ts +236 -0
  90. package/dist/fold-provenance.d.ts.map +1 -0
  91. package/dist/graph-ops.d.ts +1 -1
  92. package/dist/held-elsewhere.d.ts +85 -0
  93. package/dist/held-elsewhere.d.ts.map +1 -0
  94. package/dist/index.d.ts +3 -0
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/kubectl-context.d.ts +3 -3
  97. package/dist/lexicon-config.d.ts +4 -4
  98. package/dist/lexicon-plugin-helpers.d.ts +1 -1
  99. package/dist/lexicon.d.ts +104 -14
  100. package/dist/lexicon.d.ts.map +1 -1
  101. package/dist/lifecycle/change-set.d.ts +13 -0
  102. package/dist/lifecycle/change-set.d.ts.map +1 -1
  103. package/dist/lifecycle/deep-diff.d.ts +133 -6
  104. package/dist/lifecycle/deep-diff.d.ts.map +1 -1
  105. package/dist/lifecycle/deep-observe.d.ts.map +1 -1
  106. package/dist/lifecycle/gate-ledger.d.ts +71 -3
  107. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  108. package/dist/lifecycle/index.d.ts +1 -0
  109. package/dist/lifecycle/index.d.ts.map +1 -1
  110. package/dist/lifecycle/release-ledger.d.ts +2 -2
  111. package/dist/lifecycle/run-ledger.d.ts +53 -0
  112. package/dist/lifecycle/run-ledger.d.ts.map +1 -0
  113. package/dist/lifecycle/symptoms.d.ts +3 -3
  114. package/dist/lifecycle/symptoms.d.ts.map +1 -1
  115. package/dist/lint/config.d.ts +81 -2
  116. package/dist/lint/config.d.ts.map +1 -1
  117. package/dist/lint/post-synth.d.ts +55 -2
  118. package/dist/lint/post-synth.d.ts.map +1 -1
  119. package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts +1 -1
  120. package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts.map +1 -1
  121. package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts +1 -1
  122. package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts.map +1 -1
  123. package/dist/lint/rules/comp/comp004-gate-needs-durable-runtime.d.ts +44 -0
  124. package/dist/lint/rules/comp/comp004-gate-needs-durable-runtime.d.ts.map +1 -0
  125. package/dist/lint/rules/comp/index.d.ts +1 -1
  126. package/dist/lint/rules/comp/index.d.ts.map +1 -1
  127. package/dist/lint/rules/op/index.d.ts +16 -0
  128. package/dist/lint/rules/op/index.d.ts.map +1 -0
  129. package/dist/lint/rules/op/ops012-activity-contract.d.ts +27 -0
  130. package/dist/lint/rules/op/ops012-activity-contract.d.ts.map +1 -0
  131. package/dist/lint/rules/op/ops013-step-output-ref.d.ts +61 -0
  132. package/dist/lint/rules/op/ops013-step-output-ref.d.ts.map +1 -0
  133. package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts +55 -0
  134. package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts.map +1 -0
  135. package/dist/lint/rules/op/support.d.ts +12 -0
  136. package/dist/lint/rules/op/support.d.ts.map +1 -0
  137. package/dist/lint/suppressions.d.ts +108 -0
  138. package/dist/lint/suppressions.d.ts.map +1 -0
  139. package/dist/live-endpoint.d.ts +1 -1
  140. package/dist/op/activities/activity-contracts.d.ts +54 -0
  141. package/dist/op/activities/activity-contracts.d.ts.map +1 -0
  142. package/dist/op/activities/apply.d.ts +262 -0
  143. package/dist/op/activities/apply.d.ts.map +1 -0
  144. package/dist/op/activities/build.d.ts +13 -0
  145. package/dist/op/activities/build.d.ts.map +1 -0
  146. package/dist/op/activities/converge.d.ts +110 -0
  147. package/dist/op/activities/converge.d.ts.map +1 -0
  148. package/dist/op/activities/env-teardown.d.ts +76 -0
  149. package/dist/op/activities/env-teardown.d.ts.map +1 -0
  150. package/dist/op/activities/guard-validate.d.ts +64 -0
  151. package/dist/op/activities/guard-validate.d.ts.map +1 -0
  152. package/dist/op/activities/http-check.d.ts +34 -0
  153. package/dist/op/activities/http-check.d.ts.map +1 -0
  154. package/dist/op/activities/index.d.ts +31 -0
  155. package/dist/op/activities/index.d.ts.map +1 -0
  156. package/dist/op/activities/lexicon-upgrade.d.ts +182 -0
  157. package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -0
  158. package/dist/op/activities/lifecycle.d.ts +42 -0
  159. package/dist/op/activities/lifecycle.d.ts.map +1 -0
  160. package/dist/op/activities/pipeline-audit.d.ts +84 -0
  161. package/dist/op/activities/pipeline-audit.d.ts.map +1 -0
  162. package/dist/op/activities/policy.d.ts +17 -0
  163. package/dist/op/activities/policy.d.ts.map +1 -0
  164. package/dist/op/activities/reconcile.d.ts +89 -0
  165. package/dist/op/activities/reconcile.d.ts.map +1 -0
  166. package/dist/op/activities/shell.d.ts +13 -0
  167. package/dist/op/activities/shell.d.ts.map +1 -0
  168. package/dist/op/activities/teardown.d.ts +10 -0
  169. package/dist/op/activities/teardown.d.ts.map +1 -0
  170. package/dist/op/activities/util.d.ts +7 -0
  171. package/dist/op/activities/util.d.ts.map +1 -0
  172. package/dist/op/activities/wait.d.ts +28 -0
  173. package/dist/op/activities/wait.d.ts.map +1 -0
  174. package/dist/op/activities/workflow-audit.d.ts +92 -0
  175. package/dist/op/activities/workflow-audit.d.ts.map +1 -0
  176. package/dist/op/activity-contract-registry.d.ts +76 -0
  177. package/dist/op/activity-contract-registry.d.ts.map +1 -0
  178. package/dist/op/activity-contract.d.ts +25 -18
  179. package/dist/op/activity-contract.d.ts.map +1 -1
  180. package/dist/op/activity-failure.d.ts +28 -0
  181. package/dist/op/activity-failure.d.ts.map +1 -0
  182. package/dist/op/activity-profiles.d.ts +118 -0
  183. package/dist/op/activity-profiles.d.ts.map +1 -0
  184. package/dist/op/activity-registry.d.ts +22 -38
  185. package/dist/op/activity-registry.d.ts.map +1 -1
  186. package/dist/op/activity-runtime.d.ts +3 -14
  187. package/dist/op/activity-runtime.d.ts.map +1 -1
  188. package/dist/op/builders.d.ts +84 -29
  189. package/dist/op/builders.d.ts.map +1 -1
  190. package/dist/op/composites/apply-op.d.ts +113 -0
  191. package/dist/op/composites/apply-op.d.ts.map +1 -0
  192. package/dist/op/composites/converge-op.d.ts +120 -0
  193. package/dist/op/composites/converge-op.d.ts.map +1 -0
  194. package/dist/op/composites/index.d.ts +26 -0
  195. package/dist/op/composites/index.d.ts.map +1 -0
  196. package/dist/op/composites/lexicon-upgrade-op.d.ts +78 -0
  197. package/dist/op/composites/lexicon-upgrade-op.d.ts.map +1 -0
  198. package/dist/op/composites/pipeline-audit-op.d.ts +50 -0
  199. package/dist/op/composites/pipeline-audit-op.d.ts.map +1 -0
  200. package/dist/op/composites/reconcile-op.d.ts +57 -0
  201. package/dist/op/composites/reconcile-op.d.ts.map +1 -0
  202. package/dist/op/composites/watch-op.d.ts +60 -0
  203. package/dist/op/composites/watch-op.d.ts.map +1 -0
  204. package/dist/op/composites/workflow-audit-op.d.ts +57 -0
  205. package/dist/op/composites/workflow-audit-op.d.ts.map +1 -0
  206. package/dist/op/converge-rule.d.ts +12 -10
  207. package/dist/op/converge-rule.d.ts.map +1 -1
  208. package/dist/op/cron.d.ts +51 -0
  209. package/dist/op/cron.d.ts.map +1 -0
  210. package/dist/op/discover.d.ts +9 -0
  211. package/dist/op/discover.d.ts.map +1 -1
  212. package/dist/op/duration.d.ts +11 -0
  213. package/dist/op/duration.d.ts.map +1 -0
  214. package/dist/op/emulator-lifecycle.d.ts.map +1 -1
  215. package/dist/op/gate.d.ts +90 -0
  216. package/dist/op/gate.d.ts.map +1 -0
  217. package/dist/op/generate-pipeline.d.ts +9 -0
  218. package/dist/op/generate-pipeline.d.ts.map +1 -1
  219. package/dist/op/index.d.ts +23 -7
  220. package/dist/op/index.d.ts.map +1 -1
  221. package/dist/op/local-executor.d.ts +114 -28
  222. package/dist/op/local-executor.d.ts.map +1 -1
  223. package/dist/op/local-output.d.ts +11 -1
  224. package/dist/op/local-output.d.ts.map +1 -1
  225. package/dist/op/op-ir.d.ts +184 -0
  226. package/dist/op/op-ir.d.ts.map +1 -0
  227. package/dist/op/op-verb-class.d.ts +10 -2
  228. package/dist/op/op-verb-class.d.ts.map +1 -1
  229. package/dist/op/operator.d.ts +30 -5
  230. package/dist/op/operator.d.ts.map +1 -1
  231. package/dist/op/receipt-store.d.ts +1 -1
  232. package/dist/op/receipt-store.d.ts.map +1 -1
  233. package/dist/op/resource.d.ts +15 -1
  234. package/dist/op/resource.d.ts.map +1 -1
  235. package/dist/op/runtime.d.ts +200 -0
  236. package/dist/op/runtime.d.ts.map +1 -0
  237. package/dist/op/runtimes/local.d.ts +29 -0
  238. package/dist/op/runtimes/local.d.ts.map +1 -0
  239. package/dist/op/step-output-ref.d.ts +15 -13
  240. package/dist/op/step-output-ref.d.ts.map +1 -1
  241. package/dist/op/types.d.ts +79 -27
  242. package/dist/op/types.d.ts.map +1 -1
  243. package/dist/ownership.d.ts +1 -1
  244. package/dist/provenance.d.ts +21 -0
  245. package/dist/provenance.d.ts.map +1 -1
  246. package/dist/serializer-walker.d.ts.map +1 -1
  247. package/package.json +6 -1
  248. package/src/audit/catalog.test.ts +79 -3
  249. package/src/audit/catalog.ts +111 -13
  250. package/src/audit/core.test.ts +26 -0
  251. package/src/audit/core.ts +61 -17
  252. package/src/audit/discover.test.ts +39 -0
  253. package/src/audit/discover.ts +91 -15
  254. package/src/audit/lineage.ts +100 -0
  255. package/src/audit/prior-art.ts +153 -0
  256. package/src/audit/proof.test.ts +67 -0
  257. package/src/audit/proof.ts +70 -0
  258. package/src/audit/report-html.ts +9 -4
  259. package/src/audit/report-model.ts +16 -2
  260. package/src/audit/report.test.ts +33 -0
  261. package/src/audit/report.ts +5 -3
  262. package/src/audit/rules-doc.test.ts +34 -2
  263. package/src/audit/rules-doc.ts +82 -9
  264. package/src/audit/secrets.ts +15 -3
  265. package/src/audit/terraform-state.test.ts +144 -0
  266. package/src/audit/terraform-state.ts +131 -0
  267. package/src/build.ts +31 -1
  268. package/src/claimed-fields.test.ts +145 -0
  269. package/src/claimed-fields.ts +208 -0
  270. package/src/cli/build-params-cli.ts +2 -2
  271. package/src/cli/command-group.ts +14 -0
  272. package/src/cli/commands/__fixtures__/audit-terraform/infra/.terraform/providers/lock.txt +1 -0
  273. package/src/cli/commands/__fixtures__/audit-terraform/infra/main.tf +1 -0
  274. package/src/cli/commands/__fixtures__/audit-terraform/infra/modules/foo/main.tf +1 -0
  275. package/src/cli/commands/__fixtures__/audit-terraform/infra/variables.tf +3 -0
  276. package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +13 -4
  277. package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/docs-cli.ts +4 -0
  278. package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/package.ts +1 -0
  279. package/src/cli/commands/__fixtures__/init-lexicon-output/src/package-cli.ts +21 -0
  280. package/src/cli/commands/__snapshots__/init-lexicon.test.ts.snap +1 -0
  281. package/src/cli/commands/audit.test.ts +189 -11
  282. package/src/cli/commands/audit.ts +73 -27
  283. package/src/cli/commands/build.test.ts +292 -9
  284. package/src/cli/commands/build.ts +156 -24
  285. package/src/cli/commands/check-lexicon-docs.ts +1 -1
  286. package/src/cli/commands/check-lexicon-examples.test.ts +29 -1
  287. package/src/cli/commands/check-lexicon-examples.ts +42 -10
  288. package/src/cli/commands/init-lexicon/templates/codegen.ts +9 -0
  289. package/src/cli/commands/init-lexicon/templates/project.ts +44 -4
  290. package/src/cli/commands/init-lexicon.test.ts +97 -2
  291. package/src/cli/commands/init-lexicon.ts +4 -2
  292. package/src/cli/commands/init.test.ts +35 -1
  293. package/src/cli/commands/init.ts +14 -3
  294. package/src/cli/commands/lint.test.ts +48 -0
  295. package/src/cli/commands/lint.ts +123 -0
  296. package/src/cli/commands/onboard.test.ts +75 -0
  297. package/src/cli/commands/onboard.ts +54 -23
  298. package/src/cli/handlers/build.test.ts +81 -1
  299. package/src/cli/handlers/build.ts +15 -1
  300. package/src/cli/handlers/graph.test.ts +3 -3
  301. package/src/cli/handlers/lifecycle.test.ts +195 -12
  302. package/src/cli/handlers/lifecycle.ts +123 -6
  303. package/src/cli/handlers/misc.ts +1 -1
  304. package/src/cli/handlers/operator.test.ts +183 -11
  305. package/src/cli/handlers/operator.ts +260 -55
  306. package/src/cli/handlers/run.test.ts +431 -1287
  307. package/src/cli/handlers/run.ts +365 -915
  308. package/src/cli/main.test.ts +23 -15
  309. package/src/cli/main.ts +88 -33
  310. package/src/cli/mcp/op-tools.ts +147 -88
  311. package/src/cli/mcp/resource-handlers.ts +10 -37
  312. package/src/cli/mcp/resources/context.ts +11 -12
  313. package/src/cli/mcp/server.test.ts +25 -27
  314. package/src/cli/mcp/server.ts +2 -2
  315. package/src/cli/registry.ts +26 -9
  316. package/src/codegen/docs.ts +1 -1
  317. package/src/codegen/generate-post-synth-barrel.test.ts +1 -1
  318. package/src/codegen/generate-post-synth-barrel.ts +1 -1
  319. package/src/components/README.md +3 -2
  320. package/src/components/auto-release.test.ts +4 -20
  321. package/src/components/auto-release.ts +17 -42
  322. package/src/components/capability.ts +4 -4
  323. package/src/components/cli-support.test.ts +10 -5
  324. package/src/components/cli-support.ts +52 -44
  325. package/src/components/component.schema.json +2 -2
  326. package/src/components/component.ts +3 -3
  327. package/src/components/driver-output.ts +14 -2
  328. package/src/components/driver.test.ts +92 -22
  329. package/src/components/driver.ts +193 -83
  330. package/src/components/index.ts +1 -6
  331. package/src/components/manifest-persistence.test.ts +2 -20
  332. package/src/components/manifest-persistence.ts +4 -24
  333. package/src/components/pilots/pilots-lint-clean.test.ts +11 -10
  334. package/src/components/run-progress.ts +6 -6
  335. package/src/components/verbs/run-agent.ts +11 -17
  336. package/src/components/verbs/verify.ts +2 -2
  337. package/src/deep-observation.test.ts +75 -0
  338. package/src/deep-observation.ts +48 -0
  339. package/src/discovery/collect.test.ts +3 -3
  340. package/src/discovery/files.ts +4 -4
  341. package/src/discovery/fold-import.ts +105 -2
  342. package/src/discovery/param-deps.test.ts +112 -1
  343. package/src/discovery/param-deps.ts +193 -0
  344. package/src/discovery/sandbox/bundle.ts +15 -1
  345. package/src/discovery/sandbox/config-wire.test.ts +2 -2
  346. package/src/discovery/sandbox/config-wire.ts +2 -2
  347. package/src/fold/fold.test.ts +56 -0
  348. package/src/fold/foldable-helpers.ts +81 -1
  349. package/src/fold-provenance-exclusion.test.ts +186 -0
  350. package/src/fold-provenance.test.ts +495 -0
  351. package/src/fold-provenance.ts +441 -0
  352. package/src/graph-ops.test.ts +2 -2
  353. package/src/graph-ops.ts +1 -1
  354. package/src/held-elsewhere.test.ts +102 -0
  355. package/src/held-elsewhere.ts +114 -0
  356. package/src/index.ts +3 -0
  357. package/src/kubectl-context.ts +3 -3
  358. package/src/lexicon-config.test.ts +5 -5
  359. package/src/lexicon-config.ts +4 -4
  360. package/src/lexicon-plugin-helpers.ts +1 -1
  361. package/src/lexicon.ts +120 -14
  362. package/src/lifecycle/change-set.test.ts +49 -0
  363. package/src/lifecycle/change-set.ts +67 -0
  364. package/src/lifecycle/converge-ledger.ts +1 -1
  365. package/src/lifecycle/deep-diff.test.ts +267 -14
  366. package/src/lifecycle/deep-diff.ts +217 -14
  367. package/src/lifecycle/deep-observe.test.ts +3 -1
  368. package/src/lifecycle/deep-observe.ts +16 -6
  369. package/src/lifecycle/gate-ledger.test.ts +74 -2
  370. package/src/lifecycle/gate-ledger.ts +143 -36
  371. package/src/lifecycle/index.ts +1 -0
  372. package/src/lifecycle/release-ledger.ts +2 -2
  373. package/src/lifecycle/run-ledger.test.ts +268 -0
  374. package/src/lifecycle/run-ledger.ts +201 -0
  375. package/src/lifecycle/symptoms.ts +3 -3
  376. package/src/lint/config.test.ts +82 -1
  377. package/src/lint/config.ts +112 -3
  378. package/src/lint/policy.test.ts +1 -1
  379. package/src/lint/post-synth.test.ts +31 -0
  380. package/src/lint/post-synth.ts +54 -1
  381. package/src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts +2 -2
  382. package/src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts +1 -1
  383. package/src/lint/rules/comp/comp.test.ts +1 -1
  384. package/src/lint/rules/comp/comp004-gate-needs-durable-runtime.ts +74 -0
  385. package/src/lint/rules/comp/index.ts +3 -3
  386. package/src/lint/rules/op/index.ts +23 -0
  387. package/src/lint/rules/op/ops012-activity-contract.test.ts +161 -0
  388. package/src/lint/rules/op/ops012-activity-contract.ts +64 -0
  389. package/src/lint/rules/op/ops013-step-output-ref.test.ts +237 -0
  390. package/src/lint/rules/op/ops013-step-output-ref.ts +98 -0
  391. package/src/lint/rules/op/ops014-converge-rule-refusals.test.ts +263 -0
  392. package/src/lint/rules/op/ops014-converge-rule-refusals.ts +179 -0
  393. package/src/lint/rules/op/support.ts +11 -0
  394. package/src/lint/suppressions.test.ts +163 -0
  395. package/src/lint/suppressions.ts +204 -0
  396. package/src/live-endpoint.ts +1 -1
  397. package/src/op/activities/activity-contracts.ts +66 -0
  398. package/src/op/activities/apply.test.ts +567 -0
  399. package/src/op/activities/apply.ts +662 -0
  400. package/src/op/activities/build.ts +26 -0
  401. package/src/op/activities/converge.test.ts +330 -0
  402. package/src/op/activities/converge.ts +449 -0
  403. package/src/op/activities/env-teardown.test.ts +187 -0
  404. package/src/op/activities/env-teardown.ts +171 -0
  405. package/src/op/activities/guard-validate.test.ts +139 -0
  406. package/src/op/activities/guard-validate.ts +223 -0
  407. package/src/op/activities/http-check.test.ts +48 -0
  408. package/src/op/activities/http-check.ts +55 -0
  409. package/src/op/activities/index.ts +119 -0
  410. package/src/op/activities/lexicon-upgrade.test.ts +492 -0
  411. package/src/op/activities/lexicon-upgrade.ts +673 -0
  412. package/src/op/activities/lifecycle.ts +85 -0
  413. package/src/op/activities/pipeline-audit.test.ts +67 -0
  414. package/src/op/activities/pipeline-audit.ts +201 -0
  415. package/src/op/activities/policy.test.ts +19 -0
  416. package/src/op/activities/policy.ts +37 -0
  417. package/src/op/activities/reconcile.test.ts +81 -0
  418. package/src/op/activities/reconcile.ts +187 -0
  419. package/src/op/activities/shell.ts +26 -0
  420. package/src/op/activities/teardown.ts +22 -0
  421. package/src/op/activities/util.ts +6 -0
  422. package/src/op/activities/wait.ts +69 -0
  423. package/src/op/activities/workflow-audit.test.ts +90 -0
  424. package/src/op/activities/workflow-audit.ts +203 -0
  425. package/src/op/activity-contract-registry.test.ts +98 -0
  426. package/src/op/activity-contract-registry.ts +114 -0
  427. package/src/op/activity-contract.test.ts +1 -1
  428. package/src/op/activity-contract.ts +37 -33
  429. package/src/op/activity-failure.ts +34 -0
  430. package/src/op/activity-profiles.test.ts +56 -0
  431. package/src/op/activity-profiles.ts +116 -0
  432. package/src/op/activity-registry.test.ts +37 -28
  433. package/src/op/activity-registry.ts +27 -56
  434. package/src/op/activity-runtime.ts +3 -47
  435. package/src/op/builders-exports.test.ts +0 -49
  436. package/src/op/builders-typed.test.ts +164 -0
  437. package/src/op/builders.ts +123 -39
  438. package/src/op/composites/apply-op.ts +208 -0
  439. package/src/op/composites/composites.test.ts +366 -0
  440. package/src/op/composites/converge-op.test.ts +168 -0
  441. package/src/op/composites/converge-op.ts +214 -0
  442. package/src/op/composites/index.ts +26 -0
  443. package/src/op/composites/lexicon-upgrade-op.test.ts +68 -0
  444. package/src/op/composites/lexicon-upgrade-op.ts +134 -0
  445. package/src/op/composites/pipeline-audit-op.test.ts +25 -0
  446. package/src/op/composites/pipeline-audit-op.ts +78 -0
  447. package/src/op/composites/reconcile-op.test.ts +51 -0
  448. package/src/op/composites/reconcile-op.ts +107 -0
  449. package/src/op/composites/watch-op.ts +108 -0
  450. package/src/op/composites/workflow-audit-op.test.ts +25 -0
  451. package/src/op/composites/workflow-audit-op.ts +88 -0
  452. package/src/op/converge-rule.ts +12 -10
  453. package/src/op/cron.test.ts +128 -0
  454. package/src/op/cron.ts +149 -0
  455. package/src/op/discover-root.test.ts +105 -1
  456. package/src/op/discover.test.ts +6 -2
  457. package/src/op/discover.ts +84 -16
  458. package/src/op/duration.ts +21 -0
  459. package/src/op/effect-step.test.ts +26 -11
  460. package/src/op/emulator-lifecycle.ts +1 -2
  461. package/src/op/gate.ts +155 -0
  462. package/src/op/generate-pipeline.test.ts +65 -3
  463. package/src/op/generate-pipeline.ts +19 -2
  464. package/src/op/index.ts +39 -6
  465. package/src/op/local-executor.test.ts +163 -34
  466. package/src/op/local-executor.ts +370 -102
  467. package/src/op/local-output.test.ts +95 -11
  468. package/src/op/local-output.ts +33 -4
  469. package/src/op/op-ir.test.ts +281 -0
  470. package/src/op/op-ir.ts +417 -0
  471. package/src/op/op-verb-class.ts +19 -5
  472. package/src/op/op.test.ts +26 -5
  473. package/src/op/operator.test.ts +175 -6
  474. package/src/op/operator.ts +63 -16
  475. package/src/op/receipt-store.ts +1 -1
  476. package/src/op/resource.ts +20 -2
  477. package/src/op/runtime.ts +203 -0
  478. package/src/op/runtimes/local.test.ts +181 -0
  479. package/src/op/runtimes/local.ts +212 -0
  480. package/src/op/step-output-ref.ts +15 -13
  481. package/src/op/types.ts +84 -24
  482. package/src/ownership.ts +1 -1
  483. package/src/provenance.test.ts +6 -0
  484. package/src/provenance.ts +21 -1
  485. package/src/serializer-walker.test.ts +42 -0
  486. package/src/serializer-walker.ts +21 -2
  487. package/dist/cli/handlers/op-progress.d.ts +0 -90
  488. package/dist/cli/handlers/op-progress.d.ts.map +0 -1
  489. package/dist/cli/handlers/run-client.d.ts +0 -127
  490. package/dist/cli/handlers/run-client.d.ts.map +0 -1
  491. package/dist/cli/handlers/run-report.d.ts +0 -5
  492. package/dist/cli/handlers/run-report.d.ts.map +0 -1
  493. package/dist/components/temporal-codegen-loader.d.ts +0 -27
  494. package/dist/components/temporal-codegen-loader.d.ts.map +0 -1
  495. package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts +0 -37
  496. package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts.map +0 -1
  497. package/src/cli/handlers/op-progress.test.ts +0 -268
  498. package/src/cli/handlers/op-progress.ts +0 -248
  499. package/src/cli/handlers/run-client.test.ts +0 -82
  500. package/src/cli/handlers/run-client.ts +0 -219
  501. package/src/cli/handlers/run-report.test.ts +0 -62
  502. package/src/cli/handlers/run-report.ts +0 -122
  503. package/src/components/temporal-codegen-loader.ts +0 -41
  504. package/src/lint/rules/comp/comp004-gate-needs-temporal.ts +0 -66
@@ -16,6 +16,8 @@
16
16
  * over the small static core map (the cross-cutting COR/EXT ids). A drift-guard
17
17
  * test asserts the aggregate stays in sync with the lexicons' post-synth checks.
18
18
  */
19
+ import type { Lineage } from "./prior-art.js";
20
+ export { PRIOR_ART, applyLineage, lineageLabel, type Lineage, type LineageRelation, type PriorArtEntry, type PriorArtTool } from "./prior-art.js";
19
21
  export type Tier = "merge-worthy" | "report-only";
20
22
  /** deterministic = safe auto-fix/diff; guidance = report text only (needs judgment). */
21
23
  export type FixKind = "deterministic" | "guidance";
@@ -43,14 +45,42 @@ export interface RuleMeta {
43
45
  title: string;
44
46
  /** External backing so a finding isn't just chant's opinion. */
45
47
  authority?: Authority[];
48
+ /**
49
+ * Prior art: the open-source tools whose rules check the same condition
50
+ * (./prior-art.ts). Credit, not authority — never affects tier or category.
51
+ */
52
+ lineage?: Lineage[];
46
53
  /** One-line fix guidance (always present). */
47
54
  remediation: string;
48
55
  /**
49
56
  * False if the check reads the chant model (`ctx.entities`) rather than the
50
57
  * emitted YAML (`ctx.outputs`) — such a check won't fire on audited YAML.
51
- * All current post-synth checks are output-based, so this is true.
58
+ * Most post-synth checks are output-based, but cpln, fly, fountain, k3s
59
+ * and render all ship model-based checks with this false.
52
60
  */
53
61
  yamlBased: boolean;
62
+ /**
63
+ * Retired ids this rule used to ship under (chant #2113). A rule id is
64
+ * public the day it ships. trivy's checks carry `id`, `long_id` and
65
+ * `aliases` for exactly this reason, so a rename or a scheme migration
66
+ * doesn't strand every existing reference to the old id. An alias resolves
67
+ * to this entry wherever a rule id is looked up by a human or a config.
68
+ * `canonicalRuleId()` (below) is the shared resolver; a `lint.rules` key
69
+ * and #2111's HCL suppression both go through it (or will, since #2111
70
+ * lands separately and is not touched by this change).
71
+ */
72
+ aliases?: string[];
73
+ /**
74
+ * Set when this rule is retired: `true`, or a string explaining what
75
+ * replaced it / why it no longer fires. A deprecated rule stays in the
76
+ * catalog rather than being deleted. trivy's `deprecated: true` field lets
77
+ * a ruleset retire a check without breaking every existing suppression or
78
+ * dashboard that still names it, so its id keeps resolving (via `aliases`
79
+ * on whichever rule superseded it, when there is one) and the rules page
80
+ * still lists it, greyed out, instead of the id going dark with no
81
+ * explanation.
82
+ */
83
+ deprecated?: boolean | string;
54
84
  }
55
85
  export declare const SCORECARD_TOKEN: Authority;
56
86
  export declare const GH_TOKEN: Authority;
@@ -74,6 +104,7 @@ export declare const CWE_DIR_LISTING: Authority;
74
104
  export declare const GIXY_ALIAS: Authority;
75
105
  export declare const NGINX_STUB_STATUS: Authority;
76
106
  export declare const CWE_HARDCODED_CREDS: Authority;
107
+ export declare const HASHICORP_STYLE_GITIGNORE: Authority;
77
108
  export declare const CWE_CLEARTEXT: Authority;
78
109
  /**
79
110
  * Finding category per rule (#415). Curated: security rules are those that
@@ -102,6 +133,7 @@ export declare const RULE_CATALOG: Record<string, RuleMeta>;
102
133
  export declare function auditRule(id: string, tier: Tier, fixKind: FixKind, title: string, remediation: string, opts?: {
103
134
  authority?: Authority[];
104
135
  category?: Category;
136
+ lineage?: Lineage[];
105
137
  }): RuleMeta;
106
138
  /**
107
139
  * Resolve the effective audit catalog for a set of lexicons: core's static
@@ -115,6 +147,24 @@ export declare function auditRule(id: string, tier: Tier, fixKind: FixKind, titl
115
147
  export declare function resolveAuditCatalog(lexicons: string[]): Promise<Record<string, RuleMeta>>;
116
148
  /** Look up catalog metadata for a check id, if known. */
117
149
  export declare function ruleMeta(id: string): RuleMeta | undefined;
150
+ /**
151
+ * Resolve a rule id to its canonical form against `catalog` (chant #2113). An
152
+ * id that is itself a key of `catalog` passes through unchanged (this covers
153
+ * the common case without scanning every entry's `aliases`); otherwise every
154
+ * entry's `aliases` is searched for a match, and the id it belongs to is
155
+ * returned. An id neither a key nor anyone's alias passes through unchanged
156
+ * too, since this is a best-effort resolver, not a validator, so an unknown
157
+ * id is a caller's problem, not this function's.
158
+ *
159
+ * Exported so a `lint.rules`/preset key that names an alias resolves to the
160
+ * rule that actually runs (see `resolveConfiguredSeverity`,
161
+ * `../lint/config.ts`), and so #2111's HCL suppression code can key an
162
+ * inline `# chant-ignore <id>` off the same resolution once it lands — that
163
+ * suppression mechanism does not exist yet in this worktree (#2111 is a
164
+ * separate, parallel issue), so this function is exported now for it to call
165
+ * later rather than being wired into it here.
166
+ */
167
+ export declare function canonicalRuleId(id: string, catalog?: Record<string, RuleMeta>): string;
118
168
  /** Docs path for the audit rules reference (one anchor per rule id). */
119
169
  export declare const RULES_DOC_PATH = "/chant/lint-rules/audit-rules/";
120
170
  /** Absolute URL to a rule's entry in the audit rules reference. */
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/audit/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,IAAI,GAAG,cAAc,GAAG,aAAa,CAAC;AAElD,wFAAwF;AACxF,MAAM,MAAM,OAAO,GAA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S,CAAC,EAAE,SAAS,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,GAC3E,QAAQ,CAaV;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAwB/F;AAED,yDAAyD;AACzD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAEzD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAgB,GAAG,MAAM,CAMpG;AAED,wEAAwE;AACxE,eAAO,MAAM,cAAc,mCAAmC,CAAC;AAE/D,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE7C"}
@@ -64,6 +64,11 @@ export interface AuditFinding {
64
64
  * itself.
65
65
  */
66
66
  fingerprint?: string;
67
+ /** Carried verbatim from the producing `PostSynthDiagnostic.missing` (chant #2113) — see its doc comment. */
68
+ missing?: {
69
+ kind: string;
70
+ scope: string;
71
+ };
67
72
  }
68
73
  /**
69
74
  * Resolve the post-synth checks for a lexicon. Injectable so the core can be
@@ -74,8 +79,10 @@ export type ChecksProvider = (lexicon: AuditLexicon) => Promise<PostSynthCheck[]
74
79
  * Parse one classified file's content into the lexicon's entity graph — the
75
80
  * parse-to-graph half of the audit (#1567). The returned map is what
76
81
  * `ctx.entities` holds during a build, so entity-reading checks run unchanged.
82
+ * May return a `Promise` for a lexicon whose parser is inherently async (e.g.
83
+ * terraform's HCL parser); `auditLexicon`'s `entitiesFor` awaits it.
77
84
  */
78
- export type EntitiesParser = (content: string) => Map<string, Declarable>;
85
+ export type EntitiesParser = (content: string) => Map<string, Declarable> | Promise<Map<string, Declarable>>;
79
86
  /**
80
87
  * Resolve the entities parser for a lexicon (its plugin's `auditEntities`,
81
88
  * when it ships one). Injectable so the core can be unit-tested without
@@ -90,6 +97,17 @@ export type EntitiesProvider = (lexicon: AuditLexicon) => Promise<EntitiesParser
90
97
  /** Thrown when a lexicon package the audit needs isn't installed. */
91
98
  export declare class MissingLexiconError extends Error {
92
99
  }
100
+ /**
101
+ * Mutable out-param for the inline (`# chant-ignore*`) suppression count
102
+ * (chant #2111): `auditFiles`'s return type stays `AuditFinding[]` for every
103
+ * existing caller, so a caller that wants the count (`chant audit`'s CLI, for
104
+ * its summary line) passes this in and reads `.count` back afterward, rather
105
+ * than `auditFiles` growing a `{findings, suppressedCount}` shape that would
106
+ * touch every existing call site.
107
+ */
108
+ export interface SuppressionStats {
109
+ count: number;
110
+ }
93
111
  /**
94
112
  * Audit a set of CI files and return all findings. Pure with respect to the
95
113
  * filesystem and network — callers supply file contents.
@@ -97,6 +115,7 @@ export declare class MissingLexiconError extends Error {
97
115
  export declare function auditFiles(inputs: AuditInput[], opts?: {
98
116
  checksProvider?: ChecksProvider;
99
117
  entitiesProvider?: EntitiesProvider;
118
+ suppressionStats?: SuppressionStats;
100
119
  }): Promise<AuditFinding[]>;
101
120
  /** Label for findings that span more than one file (e.g. duplicate names). */
102
121
  export declare const CROSS_FILE = "(cross-file)";
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/audit/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,oBAAoB,CAAC;AAG3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,KAAK,G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AAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAE7G;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;AAa9F;;;;GAIG;AACH,qEAAqE;AACrE,qBAAa,mBAAoB,SAAQ,KAAK;CAAG;AA0DjD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,UAAU,EAAE,EACpB,IAAI,GAAE;IAAE,cAAc,CAAC,EAAE,cAAc,CAAC;IAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CAAO,GACvH,OAAO,CAAC,YAAY,EAAE,CAAC,CAqBzB;AAED,8EAA8E;AAC9E,eAAO,MAAM,UAAU,iBAAiB,CAAC"}
@@ -21,6 +21,11 @@
21
21
  * `detectTemplate` (which only knows Compose's `services:`) can't see them.
22
22
  * - Helm charts are a directory BUNDLE keyed by `Chart.yaml`; the helm checks
23
23
  * read `output.files`, so the whole chart is one AuditInput.
24
+ * - Terraform is also a directory BUNDLE, keyed by that directory's own
25
+ * `.tf` filenames, not recursively: a nested directory with its own
26
+ * `.tf` files (e.g. `modules/foo`) is a separate root module and gets its
27
+ * own AuditInput. `.tf` isn't YAML/JSON either, so `detectTemplate` can't
28
+ * see it.
24
29
  * - k8s `detectTemplate` matches any `apiVersion`+`kind`, including GCP Config
25
30
  * Connector (`cnrm.cloud.google.com`) resources and fountain
26
31
  * (`fountain.dev/v1`) manifests, so gcp and fountain must be tried first.
@@ -30,7 +35,7 @@
30
35
  import type { LexiconPlugin } from "../lexicon.js";
31
36
  import type { AuditInput, AuditLexicon } from "./core.js";
32
37
  /** Lexicons the auditor knows how to detect and run checks for. */
33
- export declare const AUDIT_LEXICONS: readonly ["github", "gitlab", "forgejo", "k8s", "docker", "aws", "azure", "gcp", "helm", "fountain"];
38
+ export declare const AUDIT_LEXICONS: readonly ["github", "gitlab", "forgejo", "k8s", "docker", "aws", "azure", "gcp", "helm", "fountain", "terraform"];
34
39
  /**
35
40
  * Load the plugins used for detection. Each is loaded in isolation (no
36
41
  * cross-lexicon conflict aggregation — detection only reads `detectTemplate`),
@@ -79,11 +84,11 @@ export declare function isCandidatePath(path: string): boolean;
79
84
  * (path, filename, a few content markers) with no lexicon plugin involved.
80
85
  * Names the lexicon that would have claimed a file when that lexicon isn't
81
86
  * installed (#1623). Deliberately coarse: precision comes from the plugin's
82
- * `detectTemplate`, which is exactly what's missing in that case.
83
- * `terraform` is not an audit lexicon; `*.tf` is surfaced so the user learns
84
- * the audit never reads it (see `chant carve`).
87
+ * `detectTemplate`, which is exactly what's missing in that case. `terraform`
88
+ * is a lexicon like any other here: a `.tf` file hints at it by name, the
89
+ * same way `Chart.yaml` hints at helm.
85
90
  */
86
- export type LexiconHint = AuditLexicon | "terraform";
91
+ export type LexiconHint = AuditLexicon;
87
92
  export declare function hintLexiconForFile(path: string, content: string): LexiconHint | undefined;
88
93
  /** A candidate file that looked like it belonged to a lexicon the audit did not have. */
89
94
  export interface UnclaimedFile {
@@ -100,9 +105,10 @@ export declare function unclaimedFiles(files: RepoFile[], inputs: AuditInput[],
100
105
  * Classify an in-memory set of repo files into per-lexicon audit inputs. Pure
101
106
  * (no fs, no network) so the local walk and the remote tree-fetch share exactly
102
107
  * one detection path. Each file maps to at most one lexicon: CI by path,
103
- * Dockerfiles by name, Helm charts as a bundle, everything else by the
104
- * precedence-ordered content detectors (delegating to each plugin's
105
- * `detectTemplate`). Lexicons whose plugin isn't provided are skipped.
108
+ * Dockerfiles by name, Helm charts and Terraform root modules as directory
109
+ * bundles, everything else by the precedence-ordered content detectors
110
+ * (delegating to each plugin's `detectTemplate`). Lexicons whose plugin isn't
111
+ * provided are skipped.
106
112
  */
107
113
  export declare function classifyFiles(files: RepoFile[], plugins: DetectPlugin[]): AuditInput[];
108
114
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/audit/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGvD,mEAAmE;AACnE,eAAO,MAAM,cAAc,sGAAuG,CAAC;AAEnI;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,GAAE,SAAS,MAAM,EAAmB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAe1G;AAgLD,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;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,S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0,0 +1,10 @@
1
+ /**
2
+ * Prior art for these audit rules: the open-source tools whose checks cover the
3
+ * same condition, credited per rule. See packages/core/src/audit/prior-art.ts for
4
+ * the registry, the relation vocabulary, and why this is credit rather than
5
+ * authority. Kept by hand; the prior-art sweep (scripts/prior-art-sweep.ts) reports
6
+ * when a credited tool's index no longer lists a rule cited here.
7
+ */
8
+ import type { Lineage } from "./prior-art.js";
9
+ export declare const coreAuditLineage: Record<string, Lineage[]>;
10
+ //# sourceMappingURL=lineage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineage.d.ts","sourceRoot":"","sources":["../../src/audit/lineage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CA0FtD,CAAC"}
@@ -0,0 +1,385 @@
1
+ /**
2
+ * Prior art for chant's audit rules.
3
+ *
4
+ * Most of what `chant audit` checks has been checked before by a dedicated
5
+ * open-source tool: zizmor and poutine for GitHub Actions, hadolint for
6
+ * Dockerfiles, cfn-lint and cfn_nag for CloudFormation, kube-linter and
7
+ * kube-score for Kubernetes manifests, gitleaks for secrets, and so on. chant's
8
+ * rules were written independently against the emitted output, but the ideas
9
+ * are shared, and the people who wrote them down first deserve the credit.
10
+ *
11
+ * A rule declares its lineage as `Lineage[]` on its `RuleMeta` entry: which
12
+ * tool, which upstream rule, where it is documented, and how the two relate.
13
+ * `PRIOR_ART` is the registry those entries key into, so a tool is named,
14
+ * linked and licensed once. The audit rules reference renders both, the
15
+ * markdown and HTML reports credit the tool beside the finding, and the SARIF
16
+ * and JSON outputs carry the entries verbatim for consumers.
17
+ *
18
+ * Lineage is credit, not authority. `authority` (./catalog.ts) is a standard
19
+ * or vendor document that says a finding matters; lineage is a tool that
20
+ * checks the same condition. The two are independent: a rule may have either,
21
+ * both, or neither, and lineage never changes a rule's category or tier.
22
+ */
23
+ /** How a chant rule relates to the upstream check it credits. */
24
+ export type LineageRelation =
25
+ /** Same condition, same scope. */
26
+ "equivalent"
27
+ /** The core condition is shared; one side is narrower or broader, or a different dialect of the same control. */
28
+ | "overlaps"
29
+ /** chant checks a strict superset of the upstream check. */
30
+ | "extends";
31
+ /** One credit: an upstream tool's rule that checks what this chant rule checks. */
32
+ export interface Lineage {
33
+ /** A key of {@link PRIOR_ART}. */
34
+ tool: PriorArtTool;
35
+ /** The upstream rule id or check name, in the tool's own vocabulary (e.g. `template-injection`, `DL3007`, `CKV_AWS_18`). Omitted when the tool has no per-rule ids. */
36
+ rule?: string;
37
+ /** Where the upstream rule is documented. */
38
+ url: string;
39
+ relation: LineageRelation;
40
+ }
41
+ /** A tool (or, for a few families, a vendor validator) that chant's rules credit. */
42
+ export interface PriorArtEntry {
43
+ name: string;
44
+ url: string;
45
+ /** SPDX identifier where confirmed, else "unverified" or "n/a" for documentation. */
46
+ license: string;
47
+ /** What kind of thing this is, so the rendered credit is honest about it. */
48
+ kind: "scanner" | "vendor-validator" | "specification";
49
+ }
50
+ /**
51
+ * The registry of prior art. Keys are the slugs `Lineage.tool` uses. Populated
52
+ * from the per-family research recorded in the PR that introduced lineage; the
53
+ * prior-art sweep (scripts/prior-art-sweep.ts) reads the same table.
54
+ */
55
+ export declare const PRIOR_ART: {
56
+ readonly checkov: {
57
+ readonly name: "Checkov";
58
+ readonly url: "https://www.checkov.io/";
59
+ readonly license: "Apache-2.0";
60
+ readonly kind: "scanner";
61
+ };
62
+ readonly kics: {
63
+ readonly name: "KICS";
64
+ readonly url: "https://docs.kics.io/";
65
+ readonly license: "Apache-2.0";
66
+ readonly kind: "scanner";
67
+ };
68
+ readonly zizmor: {
69
+ readonly name: "zizmor";
70
+ readonly url: "https://docs.zizmor.sh/";
71
+ readonly license: "MIT";
72
+ readonly kind: "scanner";
73
+ };
74
+ readonly "cfn-nag": {
75
+ readonly name: "cfn_nag";
76
+ readonly url: "https://github.com/stelligent/cfn_nag";
77
+ readonly license: "MIT";
78
+ readonly kind: "scanner";
79
+ };
80
+ readonly "gitlab-docs": {
81
+ readonly name: "GitLab CI/CD YAML reference";
82
+ readonly url: "https://docs.gitlab.com/ci/yaml/";
83
+ readonly license: "CC-BY-SA-4.0";
84
+ readonly kind: "specification";
85
+ };
86
+ readonly "guard-rules-registry": {
87
+ readonly name: "AWS Guard Rules Registry";
88
+ readonly url: "https://github.com/aws-cloudformation/aws-guard-rules-registry";
89
+ readonly license: "Apache-2.0";
90
+ readonly kind: "scanner";
91
+ };
92
+ readonly polaris: {
93
+ readonly name: "Fairwinds Polaris";
94
+ readonly url: "https://polaris.docs.fairwinds.com/";
95
+ readonly license: "Apache-2.0";
96
+ readonly kind: "scanner";
97
+ };
98
+ readonly "kube-linter": {
99
+ readonly name: "KubeLinter";
100
+ readonly url: "https://github.com/stackrox/kube-linter";
101
+ readonly license: "Apache-2.0";
102
+ readonly kind: "scanner";
103
+ };
104
+ readonly "kube-score": {
105
+ readonly name: "kube-score";
106
+ readonly url: "https://github.com/zegl/kube-score";
107
+ readonly license: "MIT";
108
+ readonly kind: "scanner";
109
+ };
110
+ readonly "psrule-azure": {
111
+ readonly name: "PSRule for Azure";
112
+ readonly url: "https://azure.github.io/PSRule.Rules.Azure/";
113
+ readonly license: "MIT";
114
+ readonly kind: "scanner";
115
+ };
116
+ readonly "gcp-policy-library": {
117
+ readonly name: "Google Cloud Policy Library";
118
+ readonly url: "https://github.com/GoogleCloudPlatform/policy-library";
119
+ readonly license: "Apache-2.0";
120
+ readonly kind: "scanner";
121
+ };
122
+ readonly poutine: {
123
+ readonly name: "poutine";
124
+ readonly url: "https://boostsecurityio.github.io/poutine/";
125
+ readonly license: "Apache-2.0";
126
+ readonly kind: "scanner";
127
+ };
128
+ readonly scorecard: {
129
+ readonly name: "OpenSSF Scorecard";
130
+ readonly url: "https://github.com/ossf/scorecard";
131
+ readonly license: "Apache-2.0";
132
+ readonly kind: "scanner";
133
+ };
134
+ readonly "cfn-lint": {
135
+ readonly name: "cfn-lint";
136
+ readonly url: "https://github.com/aws-cloudformation/cfn-lint";
137
+ readonly license: "MIT-0";
138
+ readonly kind: "scanner";
139
+ };
140
+ readonly "controlplane-docs": {
141
+ readonly name: "Control Plane reference documentation";
142
+ readonly url: "https://docs.controlplane.com";
143
+ readonly license: "n/a";
144
+ readonly kind: "specification";
145
+ };
146
+ readonly gitleaks: {
147
+ readonly name: "gitleaks";
148
+ readonly url: "https://github.com/gitleaks/gitleaks";
149
+ readonly license: "MIT";
150
+ readonly kind: "scanner";
151
+ };
152
+ readonly octoscan: {
153
+ readonly name: "octoscan";
154
+ readonly url: "https://github.com/synacktiv/octoscan";
155
+ readonly license: "GPL-3.0";
156
+ readonly kind: "scanner";
157
+ };
158
+ readonly "detect-secrets": {
159
+ readonly name: "detect-secrets";
160
+ readonly url: "https://github.com/Yelp/detect-secrets";
161
+ readonly license: "Apache-2.0";
162
+ readonly kind: "scanner";
163
+ };
164
+ readonly actionlint: {
165
+ readonly name: "actionlint";
166
+ readonly url: "https://github.com/rhysd/actionlint";
167
+ readonly license: "MIT";
168
+ readonly kind: "scanner";
169
+ };
170
+ readonly trufflehog: {
171
+ readonly name: "TruffleHog";
172
+ readonly url: "https://github.com/trufflesecurity/trufflehog";
173
+ readonly license: "AGPL-3.0";
174
+ readonly kind: "scanner";
175
+ };
176
+ readonly "gixy-ng": {
177
+ readonly name: "gixy-ng (maintained Gixy fork)";
178
+ readonly url: "https://github.com/dvershinin/gixy";
179
+ readonly license: "MPL-2.0";
180
+ readonly kind: "scanner";
181
+ };
182
+ readonly kubesec: {
183
+ readonly name: "kubesec";
184
+ readonly url: "https://kubesec.io/";
185
+ readonly license: "Apache-2.0";
186
+ readonly kind: "scanner";
187
+ };
188
+ readonly datree: {
189
+ readonly name: "Datree";
190
+ readonly url: "https://hub.datree.io/built-in-rules";
191
+ readonly license: "Apache-2.0";
192
+ readonly kind: "scanner";
193
+ };
194
+ readonly "helm-lint": {
195
+ readonly name: "helm lint";
196
+ readonly url: "https://helm.sh/docs/helm/helm_lint/";
197
+ readonly license: "Apache-2.0";
198
+ readonly kind: "vendor-validator";
199
+ };
200
+ readonly "cedar-validator": {
201
+ readonly name: "Cedar policy validator";
202
+ readonly url: "https://docs.cedarpolicy.com/policies/validation.html";
203
+ readonly license: "Apache-2.0";
204
+ readonly kind: "vendor-validator";
205
+ };
206
+ readonly "flux-docs": {
207
+ readonly name: "Flux Kustomization API reference";
208
+ readonly url: "https://fluxcd.io/flux/components/kustomize/kustomizations/";
209
+ readonly license: "n/a";
210
+ readonly kind: "specification";
211
+ };
212
+ readonly hadolint: {
213
+ readonly name: "hadolint";
214
+ readonly url: "https://github.com/hadolint/hadolint";
215
+ readonly license: "GPL-3.0";
216
+ readonly kind: "scanner";
217
+ };
218
+ readonly "agent-audit": {
219
+ readonly name: "agent-audit";
220
+ readonly url: "https://github.com/piiiico/agent-audit";
221
+ readonly license: "MIT";
222
+ readonly kind: "scanner";
223
+ };
224
+ readonly "arm-ttk": {
225
+ readonly name: "ARM Template Toolkit (arm-ttk)";
226
+ readonly url: "https://github.com/Azure/arm-ttk";
227
+ readonly license: "MIT";
228
+ readonly kind: "scanner";
229
+ };
230
+ readonly "bicep-linter": {
231
+ readonly name: "Bicep linter";
232
+ readonly url: "https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/linter";
233
+ readonly license: "MIT";
234
+ readonly kind: "scanner";
235
+ };
236
+ readonly "cedar-cli": {
237
+ readonly name: "Cedar CLI";
238
+ readonly url: "https://github.com/cedar-policy/cedar/tree/main/cedar-policy-cli";
239
+ readonly license: "Apache-2.0";
240
+ readonly kind: "vendor-validator";
241
+ };
242
+ readonly dockle: {
243
+ readonly name: "Dockle";
244
+ readonly url: "https://github.com/goodwithtech/dockle";
245
+ readonly license: "Apache-2.0";
246
+ readonly kind: "scanner";
247
+ };
248
+ readonly "mcp-audit": {
249
+ readonly name: "mcp-audit (APIsec)";
250
+ readonly url: "https://github.com/apisec-inc/mcp-audit";
251
+ readonly license: "MIT";
252
+ readonly kind: "scanner";
253
+ };
254
+ readonly "render-docs": {
255
+ readonly name: "Render Blueprint YAML reference";
256
+ readonly url: "https://render.com/docs/blueprint-spec";
257
+ readonly license: "n/a";
258
+ readonly kind: "specification";
259
+ };
260
+ readonly "agent-scan": {
261
+ readonly name: "Snyk Agent Scan (formerly mcp-scan)";
262
+ readonly url: "https://github.com/invariantlabs-ai/mcp-scan";
263
+ readonly license: "Apache-2.0";
264
+ readonly kind: "scanner";
265
+ };
266
+ readonly "cedar-docs": {
267
+ readonly name: "Cedar policy language reference";
268
+ readonly url: "https://docs.cedarpolicy.com/policies/json-format.html";
269
+ readonly license: "n/a";
270
+ readonly kind: "specification";
271
+ };
272
+ readonly "cedar-policy-crate": {
273
+ readonly name: "cedar-policy crate (PolicySet loader)";
274
+ readonly url: "https://docs.rs/cedar-policy/latest/cedar_policy/";
275
+ readonly license: "Apache-2.0";
276
+ readonly kind: "vendor-validator";
277
+ };
278
+ readonly "chart-testing": {
279
+ readonly name: "chart-testing (ct)";
280
+ readonly url: "https://github.com/helm/chart-testing";
281
+ readonly license: "Apache-2.0";
282
+ readonly kind: "vendor-validator";
283
+ };
284
+ readonly "fly-docs": {
285
+ readonly name: "Fly Machines API reference";
286
+ readonly url: "https://fly.io/docs/machines/api/machines-resource/";
287
+ readonly license: "n/a";
288
+ readonly kind: "specification";
289
+ };
290
+ readonly gixy: {
291
+ readonly name: "Gixy";
292
+ readonly url: "https://github.com/yandex/gixy";
293
+ readonly license: "MPL-2.0";
294
+ readonly kind: "scanner";
295
+ };
296
+ readonly "kube-bench": {
297
+ readonly name: "kube-bench";
298
+ readonly url: "https://github.com/aquasecurity/kube-bench";
299
+ readonly license: "Apache-2.0";
300
+ readonly kind: "scanner";
301
+ };
302
+ readonly pluto: {
303
+ readonly name: "Pluto";
304
+ readonly url: "https://github.com/FairwindsOps/pluto";
305
+ readonly license: "Apache-2.0";
306
+ readonly kind: "scanner";
307
+ };
308
+ readonly choudoufu: {
309
+ readonly name: "choudoufu";
310
+ readonly url: "https://github.com/INTENTIUS/choudoufu";
311
+ readonly license: "MPL-2.0";
312
+ readonly kind: "scanner";
313
+ };
314
+ readonly "tflint-ruleset-terraform": {
315
+ readonly name: "tflint-ruleset-terraform";
316
+ readonly url: "https://github.com/terraform-linters/tflint-ruleset-terraform";
317
+ readonly license: "MPL-2.0";
318
+ readonly kind: "scanner";
319
+ };
320
+ readonly "terraform-sentinel-policies": {
321
+ readonly name: "HashiCorp reference Sentinel policies";
322
+ readonly url: "https://github.com/hashicorp/terraform-sentinel-policies";
323
+ readonly license: "MPL-2.0";
324
+ readonly kind: "specification";
325
+ };
326
+ readonly "hashicorp-style-guide": {
327
+ readonly name: "HashiCorp Terraform style guide";
328
+ readonly url: "https://developer.hashicorp.com/terraform/language/style";
329
+ readonly license: "n/a";
330
+ readonly kind: "specification";
331
+ };
332
+ readonly "aws-terraform-prescriptive-guidance": {
333
+ readonly name: "AWS prescriptive guidance for Terraform";
334
+ readonly url: "https://docs.aws.amazon.com/prescriptive-guidance/latest/terraform-aws-provider-best-practices/";
335
+ readonly license: "n/a";
336
+ readonly kind: "specification";
337
+ };
338
+ readonly "gcp-terraform-best-practices": {
339
+ readonly name: "Google Cloud Terraform best-practices series";
340
+ readonly url: "https://docs.cloud.google.com/docs/terraform/best-practices/general-style-structure";
341
+ readonly license: "n/a";
342
+ readonly kind: "specification";
343
+ };
344
+ readonly "tflint-ruleset-redeploy": {
345
+ readonly name: "tflint-ruleset-redeploy";
346
+ readonly url: "https://github.com/RedeployAB/tflint-ruleset-redeploy";
347
+ readonly license: "0BSD";
348
+ readonly kind: "scanner";
349
+ };
350
+ readonly "tflint-ruleset-avm": {
351
+ readonly name: "tflint-ruleset-avm (Azure Verified Modules)";
352
+ readonly url: "https://github.com/Azure/tflint-ruleset-avm";
353
+ readonly license: "MIT";
354
+ readonly kind: "scanner";
355
+ };
356
+ readonly tfsec: {
357
+ readonly name: "tfsec";
358
+ readonly url: "https://github.com/aquasecurity/tfsec";
359
+ readonly license: "MIT";
360
+ readonly kind: "scanner";
361
+ };
362
+ readonly semgrep: {
363
+ readonly name: "Semgrep Registry rules";
364
+ readonly url: "https://github.com/semgrep/semgrep-rules";
365
+ readonly license: "Semgrep Rules License v1.0 (proprietary, not an SPDX id)";
366
+ readonly kind: "scanner";
367
+ };
368
+ };
369
+ export type PriorArtTool = keyof typeof PRIOR_ART;
370
+ /**
371
+ * Attach lineage to a catalog in place. A lexicon keeps its lineage in a
372
+ * sibling `audit-lineage.ts` (one `Record<ruleId, Lineage[]>`) and calls this
373
+ * once at the bottom of its `audit-catalog.ts`, so the prose metadata and the
374
+ * credits stay next to each other but the credits can be regenerated by the
375
+ * prior-art sweep without touching the rule text. Throws at module load if the
376
+ * lineage names a rule the catalog does not have: a stale id is a bug, not a
377
+ * silent no-op.
378
+ */
379
+ export declare function applyLineage<T extends {
380
+ id: string;
381
+ lineage?: Lineage[];
382
+ }>(catalog: Record<string, T>, lineage: Record<string, Lineage[]>): void;
383
+ /** Render one lineage entry as "tool rule (relation)" for prose contexts. */
384
+ export declare function lineageLabel(l: Lineage): string;
385
+ //# sourceMappingURL=prior-art.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prior-art.d.ts","sourceRoot":"","sources":["../../src/audit/prior-art.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,iEAAiE;AACjE,MAAM,MAAM,eAAe;AACzB,kCAAkC;AAChC,YAAY;AACd,iHAAiH;GAC/G,UAAU;AACZ,4DAA4D;GAC1D,SAAS,CAAC;AAEd,mFAAmF;AACnF,MAAM,WAAW,OAAO;IACtB,kCAAkC;IAClC,IAAI,EAAE,YAAY,CAAC;IACnB,uKAAuK;IACvK,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,qFAAqF;AACrF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,qFAAqF;IACrF,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,IAAI,EAAE,SAAS,GAAG,kBAAkB,GAAG,eAAe,CAAC;CACxD;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkE4B,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAC;AAElD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,EACxE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GACjC,IAAI,CAMN;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAG/C"}
@@ -46,6 +46,22 @@ export declare function extractUnpinnedActions(content: string): Array<{
46
46
  }>;
47
47
  /** Extract unpinned `image:` references (deduped) from CI YAML. */
48
48
  export declare function extractUnpinnedImages(content: string): string[];
49
+ /** One `name = "${expr}"` line, split into the parts the fix reassembles. */
50
+ export interface InterpolationOnlyLine {
51
+ /** The attribute's name. */
52
+ name: string;
53
+ /** The expression inside the interpolation, without the `${` and `}`. */
54
+ expr: string;
55
+ /** The same line with the quotes and the `${}` taken off. */
56
+ unwrapped: string;
57
+ }
58
+ /**
59
+ * Parse a line whose whole value is one interpolation. Exported because a rule
60
+ * and its fix have to agree on what counts: the terraform lexicon's TF016
61
+ * check calls this over a block's source text, and `unwrapInterpolations`
62
+ * below rewrites exactly the lines it accepts.
63
+ */
64
+ export declare function interpolationOnlyLine(line: string): InterpolationOnlyLine | undefined;
49
65
  /**
50
66
  * Produce a deterministic fix + diff for a finding, if one is mechanical.
51
67
  * Returns `applied: false` with guidance for non-deterministic findings.