@intentius/chant 0.46.0 → 0.50.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 (377) hide show
  1. package/dist/audit/catalog.d.ts +13 -3
  2. package/dist/audit/catalog.d.ts.map +1 -1
  3. package/dist/audit/core.d.ts +30 -3
  4. package/dist/audit/core.d.ts.map +1 -1
  5. package/dist/audit/discover.d.ts +9 -2
  6. package/dist/audit/discover.d.ts.map +1 -1
  7. package/dist/audit/fetch.d.ts.map +1 -1
  8. package/dist/audit/report-html.d.ts.map +1 -1
  9. package/dist/audit/report-model.d.ts +6 -0
  10. package/dist/audit/report-model.d.ts.map +1 -1
  11. package/dist/audit/report.d.ts.map +1 -1
  12. package/dist/audit/rules-doc.d.ts.map +1 -1
  13. package/dist/audit/secrets.d.ts +95 -0
  14. package/dist/audit/secrets.d.ts.map +1 -0
  15. package/dist/audit/wrangler.d.ts +33 -0
  16. package/dist/audit/wrangler.d.ts.map +1 -0
  17. package/dist/build.d.ts +3 -3
  18. package/dist/build.d.ts.map +1 -1
  19. package/dist/cli/commands/audit.d.ts +7 -0
  20. package/dist/cli/commands/audit.d.ts.map +1 -1
  21. package/dist/cli/commands/build.d.ts +23 -0
  22. package/dist/cli/commands/build.d.ts.map +1 -1
  23. package/dist/cli/commands/lint.d.ts.map +1 -1
  24. package/dist/cli/handlers/build.d.ts.map +1 -1
  25. package/dist/cli/handlers/components.d.ts +31 -0
  26. package/dist/cli/handlers/components.d.ts.map +1 -1
  27. package/dist/cli/handlers/lifecycle.d.ts +12 -1
  28. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  29. package/dist/cli/handlers/operator.d.ts +32 -0
  30. package/dist/cli/handlers/operator.d.ts.map +1 -0
  31. package/dist/cli/handlers/scenario.d.ts +39 -0
  32. package/dist/cli/handlers/scenario.d.ts.map +1 -0
  33. package/dist/cli/main.d.ts.map +1 -1
  34. package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
  35. package/dist/cli/mcp/server.d.ts +35 -2
  36. package/dist/cli/mcp/server.d.ts.map +1 -1
  37. package/dist/cli/mcp/tools/explain.d.ts +6 -0
  38. package/dist/cli/mcp/tools/explain.d.ts.map +1 -1
  39. package/dist/cli/mcp/types.d.ts +29 -1
  40. package/dist/cli/mcp/types.d.ts.map +1 -1
  41. package/dist/cli/plugins.d.ts +1 -1
  42. package/dist/cli/plugins.d.ts.map +1 -1
  43. package/dist/cli/registry.d.ts +14 -2
  44. package/dist/cli/registry.d.ts.map +1 -1
  45. package/dist/cli/reporters/stylish.d.ts +15 -1
  46. package/dist/cli/reporters/stylish.d.ts.map +1 -1
  47. package/dist/codegen/docs-rule-scanning.d.ts.map +1 -1
  48. package/dist/components/auto-release.d.ts +4 -0
  49. package/dist/components/auto-release.d.ts.map +1 -1
  50. package/dist/components/capability.d.ts +17 -2
  51. package/dist/components/capability.d.ts.map +1 -1
  52. package/dist/components/cli-support.d.ts +7 -0
  53. package/dist/components/cli-support.d.ts.map +1 -1
  54. package/dist/components/component.d.ts +15 -0
  55. package/dist/components/component.d.ts.map +1 -1
  56. package/dist/components/driver.d.ts.map +1 -1
  57. package/dist/components/starter-plugin.d.ts +2 -0
  58. package/dist/components/starter-plugin.d.ts.map +1 -1
  59. package/dist/components/verbs/ensure-secret.d.ts +50 -0
  60. package/dist/components/verbs/ensure-secret.d.ts.map +1 -0
  61. package/dist/components/verbs/index.d.ts +13 -0
  62. package/dist/components/verbs/index.d.ts.map +1 -1
  63. package/dist/components/verbs/r2-sync.d.ts +76 -0
  64. package/dist/components/verbs/r2-sync.d.ts.map +1 -0
  65. package/dist/components/verbs/run-agent.d.ts +499 -0
  66. package/dist/components/verbs/run-agent.d.ts.map +1 -0
  67. package/dist/components/verbs/sign.d.ts +30 -0
  68. package/dist/components/verbs/sign.d.ts.map +1 -1
  69. package/dist/components/verbs/wrangler.d.ts +108 -0
  70. package/dist/components/verbs/wrangler.d.ts.map +1 -0
  71. package/dist/composite.d.ts +6 -1
  72. package/dist/composite.d.ts.map +1 -1
  73. package/dist/config.d.ts +26 -0
  74. package/dist/config.d.ts.map +1 -1
  75. package/dist/deep-observation.d.ts +14 -0
  76. package/dist/deep-observation.d.ts.map +1 -1
  77. package/dist/discovery/collect.d.ts.map +1 -1
  78. package/dist/discovery/fold-import.d.ts +15 -1
  79. package/dist/discovery/fold-import.d.ts.map +1 -1
  80. package/dist/discovery/fold-rank.d.ts +66 -0
  81. package/dist/discovery/fold-rank.d.ts.map +1 -0
  82. package/dist/discovery/index.d.ts +15 -0
  83. package/dist/discovery/index.d.ts.map +1 -1
  84. package/dist/discovery/param-deps.d.ts +17 -0
  85. package/dist/discovery/param-deps.d.ts.map +1 -0
  86. package/dist/effect-receipt.d.ts +177 -0
  87. package/dist/effect-receipt.d.ts.map +1 -0
  88. package/dist/fold/fold.d.ts +55 -2
  89. package/dist/fold/fold.d.ts.map +1 -1
  90. package/dist/fold/subset.d.ts +20 -0
  91. package/dist/fold/subset.d.ts.map +1 -1
  92. package/dist/index.d.ts +4 -0
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/lexicon-schema.d.ts +2 -0
  95. package/dist/lexicon-schema.d.ts.map +1 -1
  96. package/dist/lexicon.d.ts +137 -3
  97. package/dist/lexicon.d.ts.map +1 -1
  98. package/dist/lifecycle/change-set.d.ts +33 -5
  99. package/dist/lifecycle/change-set.d.ts.map +1 -1
  100. package/dist/lifecycle/converge-ledger.d.ts +90 -0
  101. package/dist/lifecycle/converge-ledger.d.ts.map +1 -0
  102. package/dist/lifecycle/deep-diff.d.ts +18 -0
  103. package/dist/lifecycle/deep-diff.d.ts.map +1 -1
  104. package/dist/lifecycle/deep-observe.d.ts +9 -1
  105. package/dist/lifecycle/deep-observe.d.ts.map +1 -1
  106. package/dist/lifecycle/gate-ledger.d.ts +33 -0
  107. package/dist/lifecycle/gate-ledger.d.ts.map +1 -0
  108. package/dist/lifecycle/git.d.ts +145 -21
  109. package/dist/lifecycle/git.d.ts.map +1 -1
  110. package/dist/lifecycle/index.d.ts +6 -0
  111. package/dist/lifecycle/index.d.ts.map +1 -1
  112. package/dist/lifecycle/lease.d.ts +113 -0
  113. package/dist/lifecycle/lease.d.ts.map +1 -0
  114. package/dist/lifecycle/observation-baseline.d.ts +21 -3
  115. package/dist/lifecycle/observation-baseline.d.ts.map +1 -1
  116. package/dist/lifecycle/receipt-plan.d.ts +62 -0
  117. package/dist/lifecycle/receipt-plan.d.ts.map +1 -0
  118. package/dist/lifecycle/release-ledger.d.ts +20 -0
  119. package/dist/lifecycle/release-ledger.d.ts.map +1 -1
  120. package/dist/lifecycle/scenario-eval.d.ts +42 -0
  121. package/dist/lifecycle/scenario-eval.d.ts.map +1 -0
  122. package/dist/lifecycle/scenario.d.ts +163 -0
  123. package/dist/lifecycle/scenario.d.ts.map +1 -0
  124. package/dist/lifecycle/symptoms.d.ts +63 -0
  125. package/dist/lifecycle/symptoms.d.ts.map +1 -0
  126. package/dist/lifecycle/teardown.d.ts +6 -4
  127. package/dist/lifecycle/teardown.d.ts.map +1 -1
  128. package/dist/lifecycle/unobserved-gate.d.ts +67 -0
  129. package/dist/lifecycle/unobserved-gate.d.ts.map +1 -0
  130. package/dist/lint/knowledge-checks.d.ts +48 -0
  131. package/dist/lint/knowledge-checks.d.ts.map +1 -0
  132. package/dist/lint/output-checks.d.ts +5 -0
  133. package/dist/lint/output-checks.d.ts.map +1 -0
  134. package/dist/lint/output-docs.d.ts +94 -0
  135. package/dist/lint/output-docs.d.ts.map +1 -0
  136. package/dist/lint/pipeline-change-gate.d.ts +101 -0
  137. package/dist/lint/pipeline-change-gate.d.ts.map +1 -0
  138. package/dist/lint/post-synth.d.ts +41 -0
  139. package/dist/lint/post-synth.d.ts.map +1 -1
  140. package/dist/lint/receipt-checks.d.ts +9 -0
  141. package/dist/lint/receipt-checks.d.ts.map +1 -0
  142. package/dist/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.d.ts +11 -0
  143. package/dist/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.d.ts.map +1 -0
  144. package/dist/lint/rules/cor022-receipt-leaf.d.ts +13 -0
  145. package/dist/lint/rules/cor022-receipt-leaf.d.ts.map +1 -0
  146. package/dist/lint/rules/cor024-receipt-secret-pointer.d.ts +3 -0
  147. package/dist/lint/rules/cor024-receipt-secret-pointer.d.ts.map +1 -0
  148. package/dist/lint/rules/evl001-non-literal-expression.d.ts.map +1 -1
  149. package/dist/lint/rules/index.d.ts +3 -1
  150. package/dist/lint/rules/index.d.ts.map +1 -1
  151. package/dist/lsp/lexicon-providers.d.ts +7 -0
  152. package/dist/lsp/lexicon-providers.d.ts.map +1 -1
  153. package/dist/okf-read.d.ts +78 -0
  154. package/dist/okf-read.d.ts.map +1 -0
  155. package/dist/op/activity-contract.d.ts +139 -0
  156. package/dist/op/activity-contract.d.ts.map +1 -0
  157. package/dist/op/builders.d.ts +140 -3
  158. package/dist/op/builders.d.ts.map +1 -1
  159. package/dist/op/converge-rule.d.ts +161 -0
  160. package/dist/op/converge-rule.d.ts.map +1 -0
  161. package/dist/op/generate-pipeline.d.ts +39 -0
  162. package/dist/op/generate-pipeline.d.ts.map +1 -0
  163. package/dist/op/index.d.ts +18 -2
  164. package/dist/op/index.d.ts.map +1 -1
  165. package/dist/op/local-executor.d.ts +2 -1
  166. package/dist/op/local-executor.d.ts.map +1 -1
  167. package/dist/op/op-verb-class.d.ts +42 -0
  168. package/dist/op/op-verb-class.d.ts.map +1 -0
  169. package/dist/op/operator.d.ts +128 -0
  170. package/dist/op/operator.d.ts.map +1 -0
  171. package/dist/op/receipt-store.d.ts +138 -0
  172. package/dist/op/receipt-store.d.ts.map +1 -0
  173. package/dist/op/step-output-ref.d.ts +187 -0
  174. package/dist/op/step-output-ref.d.ts.map +1 -0
  175. package/dist/op/types.d.ts +49 -2
  176. package/dist/op/types.d.ts.map +1 -1
  177. package/dist/provenance.d.ts +73 -3
  178. package/dist/provenance.d.ts.map +1 -1
  179. package/dist/runtime-adapter.d.ts +7 -1
  180. package/dist/runtime-adapter.d.ts.map +1 -1
  181. package/dist/secret-materialization.d.ts +138 -0
  182. package/dist/secret-materialization.d.ts.map +1 -0
  183. package/dist/secret-provenance.d.ts +218 -0
  184. package/dist/secret-provenance.d.ts.map +1 -0
  185. package/dist/serializer.d.ts +29 -0
  186. package/dist/serializer.d.ts.map +1 -1
  187. package/dist/toml.d.ts +40 -5
  188. package/dist/toml.d.ts.map +1 -1
  189. package/dist/yaml.d.ts.map +1 -1
  190. package/package.json +4 -1
  191. package/src/audit/catalog.test.ts +1 -1
  192. package/src/audit/catalog.ts +75 -3
  193. package/src/audit/core.test.ts +57 -0
  194. package/src/audit/core.ts +0 -0
  195. package/src/audit/detect-bundle.test.ts +1 -1
  196. package/src/audit/discover.test.ts +24 -0
  197. package/src/audit/discover.ts +40 -4
  198. package/src/audit/fetch.test.ts +216 -3
  199. package/src/audit/fetch.ts +270 -59
  200. package/src/audit/report-html.ts +5 -2
  201. package/src/audit/report-model.ts +9 -0
  202. package/src/audit/report.test.ts +22 -0
  203. package/src/audit/report.ts +3 -2
  204. package/src/audit/rules-doc.ts +13 -1
  205. package/src/audit/secrets.test.ts +303 -0
  206. package/src/audit/secrets.ts +406 -0
  207. package/src/audit/wrangler.test.ts +230 -0
  208. package/src/audit/wrangler.ts +290 -0
  209. package/src/build.test.ts +41 -0
  210. package/src/build.ts +39 -6
  211. package/src/cli/command-group.ts +1 -1
  212. package/src/cli/commands/__fixtures__/audit-fountain/agents/fleet.yaml +27 -0
  213. package/src/cli/commands/__fixtures__/audit-fountain/k8s/deploy.yaml +16 -0
  214. package/src/cli/commands/__fixtures__/audit-fountain-clean/fleet.yaml +20 -0
  215. package/src/cli/commands/__fixtures__/schemas/sarif-2.1.0.schema.json +2882 -0
  216. package/src/cli/commands/audit.test.ts +268 -1
  217. package/src/cli/commands/audit.ts +87 -18
  218. package/src/cli/commands/build.test.ts +245 -0
  219. package/src/cli/commands/build.ts +210 -21
  220. package/src/cli/commands/lint.ts +15 -3
  221. package/src/cli/handlers/build.ts +2 -0
  222. package/src/cli/handlers/components.test.ts +199 -1
  223. package/src/cli/handlers/components.ts +160 -3
  224. package/src/cli/handlers/explain.test.ts +70 -1
  225. package/src/cli/handlers/graph.test.ts +20 -0
  226. package/src/cli/handlers/graph.ts +12 -3
  227. package/src/cli/handlers/lifecycle.test.ts +115 -1
  228. package/src/cli/handlers/lifecycle.ts +96 -15
  229. package/src/cli/handlers/operator.test.ts +255 -0
  230. package/src/cli/handlers/operator.ts +240 -0
  231. package/src/cli/handlers/scenario.test.ts +456 -0
  232. package/src/cli/handlers/scenario.ts +330 -0
  233. package/src/cli/main.test.ts +23 -0
  234. package/src/cli/main.ts +72 -1
  235. package/src/cli/mcp/resource-handlers.ts +38 -1
  236. package/src/cli/mcp/server.test.ts +323 -3
  237. package/src/cli/mcp/server.ts +84 -7
  238. package/src/cli/mcp/tools/explain.ts +51 -2
  239. package/src/cli/mcp/types.ts +27 -1
  240. package/src/cli/plugins.ts +4 -2
  241. package/src/cli/registry.ts +14 -2
  242. package/src/cli/reporters/stylish.test.ts +154 -0
  243. package/src/cli/reporters/stylish.ts +154 -33
  244. package/src/codegen/docs-rule-scanning.test.ts +42 -0
  245. package/src/codegen/docs-rule-scanning.ts +25 -2
  246. package/src/components/README.md +7 -0
  247. package/src/components/auto-release.ts +6 -0
  248. package/src/components/capability.ts +17 -2
  249. package/src/components/cli-support.test.ts +17 -0
  250. package/src/components/cli-support.ts +13 -1
  251. package/src/components/component-schema.test.ts +32 -0
  252. package/src/components/component.schema.json +6 -0
  253. package/src/components/component.test.ts +21 -0
  254. package/src/components/component.ts +15 -0
  255. package/src/components/driver.ts +12 -4
  256. package/src/components/registry.test.ts +7 -2
  257. package/src/components/starter-plugin.ts +17 -0
  258. package/src/components/verbs/ensure-secret.test.ts +130 -0
  259. package/src/components/verbs/ensure-secret.ts +79 -0
  260. package/src/components/verbs/index.ts +13 -0
  261. package/src/components/verbs/r2-sync.test.ts +107 -0
  262. package/src/components/verbs/r2-sync.ts +124 -0
  263. package/src/components/verbs/run-agent.test.ts +683 -0
  264. package/src/components/verbs/run-agent.ts +786 -0
  265. package/src/components/verbs/sign.test.ts +19 -0
  266. package/src/components/verbs/sign.ts +34 -2
  267. package/src/components/verbs/wrangler.test.ts +170 -0
  268. package/src/components/verbs/wrangler.ts +241 -0
  269. package/src/composite.ts +31 -2
  270. package/src/config.test.ts +15 -0
  271. package/src/config.ts +30 -0
  272. package/src/deep-observation.test.ts +19 -0
  273. package/src/deep-observation.ts +17 -0
  274. package/src/discovery/collect.ts +11 -2
  275. package/src/discovery/fold-import.test.ts +54 -0
  276. package/src/discovery/fold-import.ts +178 -38
  277. package/src/discovery/fold-rank.test.ts +197 -0
  278. package/src/discovery/fold-rank.ts +346 -0
  279. package/src/discovery/index.ts +16 -1
  280. package/src/discovery/param-deps.test.ts +118 -0
  281. package/src/discovery/param-deps.ts +170 -0
  282. package/src/effect-receipt-exclusion.test.ts +190 -0
  283. package/src/effect-receipt.test.ts +419 -0
  284. package/src/effect-receipt.ts +412 -0
  285. package/src/fold/fold.test.ts +6 -2
  286. package/src/fold/fold.ts +184 -3
  287. package/src/fold/subset.test.ts +95 -6
  288. package/src/fold/subset.ts +66 -2
  289. package/src/index.ts +4 -0
  290. package/src/lexicon-schema.ts +3 -0
  291. package/src/lexicon.ts +151 -5
  292. package/src/lifecycle/change-set.ts +46 -7
  293. package/src/lifecycle/converge-ledger.test.ts +199 -0
  294. package/src/lifecycle/converge-ledger.ts +179 -0
  295. package/src/lifecycle/deep-diff.test.ts +79 -1
  296. package/src/lifecycle/deep-diff.ts +23 -0
  297. package/src/lifecycle/deep-observe.ts +13 -2
  298. package/src/lifecycle/gate-ledger.test.ts +103 -0
  299. package/src/lifecycle/gate-ledger.ts +140 -0
  300. package/src/lifecycle/git.test.ts +430 -0
  301. package/src/lifecycle/git.ts +446 -84
  302. package/src/lifecycle/index.ts +6 -0
  303. package/src/lifecycle/lease.test.ts +343 -0
  304. package/src/lifecycle/lease.ts +270 -0
  305. package/src/lifecycle/observation-baseline.test.ts +46 -0
  306. package/src/lifecycle/observation-baseline.ts +33 -1
  307. package/src/lifecycle/receipt-plan.test.ts +250 -0
  308. package/src/lifecycle/receipt-plan.ts +249 -0
  309. package/src/lifecycle/release-ledger.ts +20 -0
  310. package/src/lifecycle/scenario-eval.test.ts +199 -0
  311. package/src/lifecycle/scenario-eval.ts +158 -0
  312. package/src/lifecycle/scenario.test.ts +195 -0
  313. package/src/lifecycle/scenario.ts +321 -0
  314. package/src/lifecycle/symptoms.test.ts +116 -0
  315. package/src/lifecycle/symptoms.ts +126 -0
  316. package/src/lifecycle/teardown.test.ts +31 -0
  317. package/src/lifecycle/teardown.ts +6 -4
  318. package/src/lifecycle/unobserved-gate.test.ts +109 -0
  319. package/src/lifecycle/unobserved-gate.ts +102 -0
  320. package/src/lint/knowledge-checks.test.ts +80 -0
  321. package/src/lint/knowledge-checks.ts +74 -0
  322. package/src/lint/output-checks.test.ts +85 -0
  323. package/src/lint/output-checks.ts +99 -0
  324. package/src/lint/output-docs.test.ts +220 -0
  325. package/src/lint/output-docs.ts +204 -0
  326. package/src/lint/pipeline-change-gate.test.ts +144 -0
  327. package/src/lint/pipeline-change-gate.ts +153 -0
  328. package/src/lint/post-synth.test.ts +97 -0
  329. package/src/lint/post-synth.ts +60 -0
  330. package/src/lint/receipt-checks.test.ts +101 -0
  331. package/src/lint/receipt-checks.ts +93 -0
  332. package/src/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.ts +26 -0
  333. package/src/lint/rules/comp/comp.test.ts +49 -1
  334. package/src/lint/rules/cor022-receipt-leaf.test.ts +116 -0
  335. package/src/lint/rules/cor022-receipt-leaf.ts +130 -0
  336. package/src/lint/rules/cor024-receipt-secret-pointer.test.ts +121 -0
  337. package/src/lint/rules/cor024-receipt-secret-pointer.ts +218 -0
  338. package/src/lint/rules/evl001-non-literal-expression.test.ts +35 -3
  339. package/src/lint/rules/evl001-non-literal-expression.ts +7 -0
  340. package/src/lint/rules/index.ts +7 -1
  341. package/src/lsp/lexicon-providers.test.ts +44 -0
  342. package/src/lsp/lexicon-providers.ts +11 -1
  343. package/src/okf-read.test.ts +149 -0
  344. package/src/okf-read.ts +197 -0
  345. package/src/op/activity-contract.test.ts +180 -0
  346. package/src/op/activity-contract.ts +278 -0
  347. package/src/op/builders-exports.test.ts +17 -1
  348. package/src/op/builders.ts +198 -6
  349. package/src/op/converge-rule.test.ts +179 -0
  350. package/src/op/converge-rule.ts +311 -0
  351. package/src/op/effect-step.test.ts +311 -0
  352. package/src/op/generate-pipeline.test.ts +53 -0
  353. package/src/op/generate-pipeline.ts +99 -0
  354. package/src/op/index.ts +40 -3
  355. package/src/op/local-executor.test.ts +92 -0
  356. package/src/op/local-executor.ts +212 -29
  357. package/src/op/op-verb-class.test.ts +126 -0
  358. package/src/op/op-verb-class.ts +115 -0
  359. package/src/op/op.test.ts +25 -2
  360. package/src/op/operator.test.ts +346 -0
  361. package/src/op/operator.ts +213 -0
  362. package/src/op/receipt-store.ts +211 -0
  363. package/src/op/step-output-ref.test.ts +334 -0
  364. package/src/op/step-output-ref.ts +453 -0
  365. package/src/op/types.ts +51 -2
  366. package/src/provenance.test.ts +151 -4
  367. package/src/provenance.ts +118 -4
  368. package/src/runtime-adapter.ts +31 -10
  369. package/src/secret-materialization.test.ts +199 -0
  370. package/src/secret-materialization.ts +235 -0
  371. package/src/secret-provenance.test.ts +388 -0
  372. package/src/secret-provenance.ts +475 -0
  373. package/src/serializer.ts +30 -0
  374. package/src/toml.test.ts +157 -384
  375. package/src/toml.ts +371 -5
  376. package/src/yaml.test.ts +88 -0
  377. package/src/yaml.ts +76 -6
@@ -0,0 +1,67 @@
1
+ /**
2
+ * The unobserved gate predicate (#1568): a plan containing unobserved
3
+ * entities must not pass as clean.
4
+ *
5
+ * `buildChangeSet` (./change-set.ts) already refuses to guess when a lexicon
6
+ * could not look (#1089) — entries land as `action: "unobserved"`, carrying a
7
+ * total `unobservedReason` (`read-failed`, `no-credentials`, `no-binding`,
8
+ * `unsupported-kind`, `filtered`; see ../observation.ts). But nothing
9
+ * downstream is *required* to look: a gate that checks lint-clean,
10
+ * owned-only, and a blast-radius budget can walk right past a change set
11
+ * whose live read partially failed and call it clean, because none of those
12
+ * checks reads `unobserved` at all. A gate over an incomplete read is a gate
13
+ * over a guess.
14
+ *
15
+ * This is a reusable predicate, not a runtime — evaluate a `ChangeSet`
16
+ * against a policy and get back a verdict; the caller (a `lint.policies`
17
+ * check routed through `policyGate`, an Op step, #1487's gate-as-fact once it
18
+ * lands) decides what to do with a refusal (throw, diagnostic, a durable
19
+ * gated-run fact). Same instinct #1484 already adopts for `unknown` in the
20
+ * operating loop ("`unknown` never remediates"), surfaced here as something
21
+ * any gate can declare rather than a property of one runtime.
22
+ */
23
+ import type { ChangeSet } from "./change-set.js";
24
+ import { type UnobservedReason } from "../observation.js";
25
+ /**
26
+ * How the gate treats the change set's unobserved set.
27
+ *
28
+ * - `"refuse"` (the default) — any unobserved entry not covered by `allow`
29
+ * fails the gate outright. Fail-closed, the right default for a policy set
30
+ * aimed at agent-proposed change sets: a hole must never launder into a
31
+ * clean verdict just because nobody configured otherwise.
32
+ * - `"escalate"` — the gate does not fail here; instead the verdict reports
33
+ * `escalate: true` so a caller can route the plan to a stricter gate class
34
+ * rather than the ordinary path (the same shape of routing decision #1569
35
+ * makes for pipeline changes).
36
+ * - `{ allow: [...] }` — the listed reasons are tolerated (e.g. `"filtered"`,
37
+ * intentional in a scoped run) and never fail or escalate the gate; any
38
+ * reason NOT in the list still refuses. `no-credentials` — a hole that must
39
+ * never launder into a clean verdict — should never appear in an `allow`
40
+ * list for a policy aimed at agent-proposed change sets.
41
+ */
42
+ export type UnobservedGatePolicy = "refuse" | "escalate" | {
43
+ allow: UnobservedReason[];
44
+ };
45
+ /** One unobserved hole the gate found, carried into the refusal. */
46
+ export interface UnobservedGateFinding {
47
+ name: string;
48
+ type?: string;
49
+ reason: UnobservedReason;
50
+ detail?: string;
51
+ }
52
+ export interface UnobservedGateVerdict {
53
+ /** False when the policy is `"refuse"` (default) and an unallowed unobserved entry exists. */
54
+ pass: boolean;
55
+ /** True when the policy is `"escalate"` and an unallowed unobserved entry exists — route to a stricter gate instead of failing here. */
56
+ escalate: boolean;
57
+ /** Every unobserved entry the policy did not allow. Empty when `pass` is true and `escalate` is false. */
58
+ findings: UnobservedGateFinding[];
59
+ /** Human-readable summary carrying the reasons into a refusal — the message a caller can surface as-is. Undefined when `findings` is empty. */
60
+ detail?: string;
61
+ }
62
+ /**
63
+ * Evaluate a `ChangeSet`'s unobserved set against `policy`. Pure — reads only
64
+ * `cs.entries`, no I/O. Defaults to `"refuse"`.
65
+ */
66
+ export declare function evaluateUnobservedGate(cs: ChangeSet, policy?: UnobservedGatePolicy): UnobservedGateVerdict;
67
+ //# sourceMappingURL=unobserved-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unobserved-gate.d.ts","sourceRoot":"","sources":["../../src/lifecycle/unobserved-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,UAAU,GAAG;IAAE,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAEzF,oEAAoE;AACpE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,IAAI,EAAE,OAAO,CAAC;IACd,wIAAwI;IACxI,QAAQ,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,QAAQ,EAAE,qBAAqB,EAAE,CAAC;IAClC,+IAA+I;IAC/I,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,SAAS,EACb,MAAM,GAAE,oBAA+B,GACtC,qBAAqB,CA+BvB"}
@@ -0,0 +1,48 @@
1
+ import type { PostSynthCheck } from "./post-synth.js";
2
+ import type { OkfBundle } from "../okf-read.js";
3
+ /**
4
+ * COR026: Stale Knowledge Binding (#1865, design #1059, epic #1057)
5
+ *
6
+ * A concept's `binds` frontmatter key names a discovered entity's logical
7
+ * name (#1864, `../okf-read.ts`'s `bindConcepts`). A name that resolves to
8
+ * nothing is a stale binding — the entity was renamed or removed, or the
9
+ * concept was authored against a name that never existed — and per #1059's
10
+ * stated failure posture ("the spec permits broken links, which argues for
11
+ * warn") that is a warning, never a build failure: knowledge is deliberately
12
+ * softer than the typed graph it describes, and OKF itself tolerates broken
13
+ * links (epic #1057).
14
+ *
15
+ * The converse is deliberately silent: a concept with no `binds` at all is
16
+ * orphaned knowledge, not an omission (a runbook, a decision about the
17
+ * project as a whole), and `bindConcepts` never reports it as unresolved in
18
+ * the first place — see its own doc comment. A project with no knowledge
19
+ * bundle loads an empty one (`loadOkfBundle`), so this check produces no
20
+ * diagnostics either.
21
+ *
22
+ * Wired into `chant build` (`../cli/commands/build.ts`) alongside
23
+ * `coreReceiptChecks` — same reasons COR023/COR024 are build-owned rather
24
+ * than a per-file `LintRule`: the check needs the full discovered entity map
25
+ * (`ctx.entities`), not one `ts.SourceFile`, and that map only exists after
26
+ * discovery has run. Unlike COR023/024 it never reads `ctx.outputs` — the
27
+ * bundle is loaded once, up front (async — `loadOkfBundle` reads the
28
+ * filesystem), and closed over here so the check itself stays the same sync
29
+ * shape every other `PostSynthCheck` has.
30
+ */
31
+ export declare const STALE_KNOWLEDGE_BINDING_CHECK_ID = "COR026";
32
+ /**
33
+ * Build the COR026 check for one loaded bundle. A factory, not a bare
34
+ * constant, because — unlike `coreReceiptChecks`, which needs nothing but
35
+ * `ctx.entities` — this check needs the bundle loaded from disk, and
36
+ * `loadOkfBundle` is async while `PostSynthCheck#check` is not. The caller
37
+ * loads the bundle once (`resolveKnowledgeDir` + `loadOkfBundle`) and passes
38
+ * it in; see `../cli/commands/build.ts`.
39
+ */
40
+ export declare function staleKnowledgeBindingCheck(bundle: OkfBundle): PostSynthCheck;
41
+ /**
42
+ * Core's own post-synth check over knowledge bindings, run by `chant build`
43
+ * over the full build result — unscoped, like `coreReceiptChecks`, since a
44
+ * concept's `binds` can name any discovered entity regardless of which
45
+ * lexicon owns it.
46
+ */
47
+ export declare function coreKnowledgeChecks(bundle: OkfBundle): PostSynthCheck[];
48
+ //# sourceMappingURL=knowledge-checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge-checks.d.ts","sourceRoot":"","sources":["../../src/lint/knowledge-checks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,gCAAgC,WAAW,CAAC;AAEzD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,CAoB5E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,EAAE,CAEvE"}
@@ -0,0 +1,5 @@
1
+ import type { PostSynthCheck } from "./post-synth.js";
2
+ export declare const STRINGIFIED_REFERENCE_CHECK_ID = "COR025";
3
+ /** Core-owned post-synth checks over serialized output text (#1526). */
4
+ export declare function coreOutputChecks(): PostSynthCheck[];
5
+ //# sourceMappingURL=output-checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-checks.d.ts","sourceRoot":"","sources":["../../src/lint/output-checks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AAoCxE,eAAO,MAAM,8BAA8B,WAAW,CAAC;AA0DvD,wEAAwE;AACxE,wBAAgB,gBAAgB,IAAI,cAAc,EAAE,CAEnD"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Parsed-output view for post-synth checks (chant #975).
3
+ *
4
+ * `PostSynthContext.outputs` carries raw serialized strings — a `chant build`
5
+ * consumer has to parse YAML/JSON itself before it can reason about
6
+ * structure. Every lexicon that needs this today rolls its own splitter
7
+ * (`parseK8sManifests` in k8s, hand-rolled `JSON.parse` in aws's
8
+ * `cf-refs.ts`), and each of the ~30 k8s post-synth checks reparses the same
9
+ * output independently. This module is the shared, parse-once primitive:
10
+ * `parseOutputDocs` turns `ctx.outputs` into a flat list of `OutputDoc`s,
11
+ * and `PostSynthContext.docs` (see `./post-synth.ts`) memoizes one call to it
12
+ * per build so every check — lexicon-shipped or project-authored policy —
13
+ * shares the same parse.
14
+ *
15
+ * `pick`/`get` are the "look at only the fields you care about" ergonomic
16
+ * from the issue's `,remain`-style framing — a partial, unvalidated view of
17
+ * an already-parsed tree, not a query DSL. Selector languages over the
18
+ * *source* AST stay in `./declarative.ts`; this module is output-side only.
19
+ */
20
+ import type { SerializerResult } from "../serializer.js";
21
+ /**
22
+ * One parsed document from a build's serialized output.
23
+ *
24
+ * A single `ctx.outputs` entry can yield more than one `OutputDoc`: a
25
+ * multi-document YAML stream (`---`-separated) yields one per document, and
26
+ * a `SerializerResult` with `files` yields further docs for each nested
27
+ * file (a CloudFormation nested stack template, a sidecar manifest).
28
+ */
29
+ export interface OutputDoc {
30
+ /** The `ctx.outputs` map key this document came from. */
31
+ lexicon: string;
32
+ /** Position of this document within its source (primary output or one
33
+ * `files` entry) — 0 for a single-document source, 0..n-1 for a
34
+ * multi-document YAML stream. */
35
+ index: number;
36
+ /** Whether this document was decoded as YAML or as whole-content JSON. */
37
+ format: "yaml" | "json";
38
+ /** The parsed tree. `undefined` when parsing failed — see `error`. */
39
+ value: unknown;
40
+ /**
41
+ * Set when this document came from a `SerializerResult.files` entry rather
42
+ * than the primary output — the file's key in that map (e.g. a nested
43
+ * stack template's filename).
44
+ */
45
+ file?: string;
46
+ /**
47
+ * Set when this document could not be parsed into a usable tree. The
48
+ * document is still returned (a marker, not a throw) so a caller can see
49
+ * that something in the build output failed to parse, rather than the
50
+ * failure disappearing silently the way `parseK8sManifests` has always
51
+ * swallowed it. `value` is `undefined` on an errored document. Filter with
52
+ * `ctx.docs.filter((d) => !d.error)` to get only usable documents.
53
+ */
54
+ error?: string;
55
+ }
56
+ /**
57
+ * Parse every output in `outputs` into a flat list of `OutputDoc`s: one call,
58
+ * shared by every post-synth check via `PostSynthContext.docs`.
59
+ *
60
+ * Format detection is whole-source, not per-document: if the entire source
61
+ * parses as JSON, it is one `"json"` document (CloudFormation, most non-k8s
62
+ * serializers). Otherwise the source is treated as a YAML stream — split on
63
+ * `---` document separators — and each resulting document is parsed as YAML
64
+ * (`format: "yaml"`), even one that happens to also be valid JSON, since
65
+ * JSON is a YAML subset. `SerializerResult.files` entries (nested templates,
66
+ * sidecar manifests) are parsed the same way, tagged with `file`.
67
+ *
68
+ * A document that fails to parse into a non-null object/array — malformed
69
+ * input, or a bare scalar where a manifest was expected — is not thrown:
70
+ * it is included with `error` set and `value: undefined`. See `OutputDoc`.
71
+ */
72
+ export declare function parseOutputDocs(outputs: Map<string, string | SerializerResult>): OutputDoc[];
73
+ /**
74
+ * Partial typed decode — the `,remain`-style ergonomic from `ma91n/tfpolicy`:
75
+ * decode the fields you care about, leave everything else in place,
76
+ * unvalidated. Returns a shallow, top-level view of `value` narrowed to the
77
+ * keys named in `shape`. A key absent from `value` (or `value` not being a
78
+ * plain object) is simply absent from the result — no default is invented.
79
+ *
80
+ * This is NOT runtime validation: a key that IS present is copied as-is,
81
+ * whatever its actual shape, and cast to `T`'s declared type for that key.
82
+ * Use `get` for a deeper walk into one of the picked values.
83
+ */
84
+ export declare function pick<T extends object>(value: unknown, shape: (keyof T)[]): Partial<T>;
85
+ /**
86
+ * Dotted-path getter for the common walk over a parsed doc, e.g.
87
+ * `get(doc.value, "spec.template.spec")`. Not a query DSL — no wildcards,
88
+ * no predicates, no array-flattening. An array index is just a numeric path
89
+ * segment (`get(value, "items.0.name")`), since JS indexes arrays by string
90
+ * key underneath. Returns `undefined` as soon as any segment is missing or
91
+ * the value at that point isn't indexable — it never throws on a bad path.
92
+ */
93
+ export declare function get(value: unknown, path: string): unknown;
94
+ //# sourceMappingURL=output-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-docs.d.ts","sourceRoot":"","sources":["../../src/lint/output-docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB;;sCAEkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,sEAAsE;IACtE,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,GAAG,SAAS,EAAE,CAY5F;AA4ED;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAWrF;AAED;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAQzD"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * The pipeline-change gate class (#1569): changes to the pipeline itself
3
+ * route to a stricter gate.
4
+ *
5
+ * The honest concession in the PR-flow teardown (rubric-product-research,
6
+ * 06-objections §1): chant Ops have a `shell` step, so a governed plane is
7
+ * not automatically immune to "the change edits the machinery that applies
8
+ * changes." What chant *can* claim — and a plain PR flow structurally cannot
9
+ * — is that pipeline changes are distinguishable: a composition is data over
10
+ * a bounded verb registry, and the COMP rules already police the escape
11
+ * hatches (COMP006 — every `shell` step carries a declared reason;
12
+ * COMP005 — no noun-shaped escape hatches, `./rules/comp/`). What was missing
13
+ * was the routing: nothing classified a change as "touches the pipeline" and
14
+ * required a stricter gate for it, so a change to a composition rode through
15
+ * the same gate as a replica-count bump.
16
+ *
17
+ * This is the cheap first cut #1569 asks for: the registry-only predicate.
18
+ * A composition that contains only registry verbs is ordinary; a `shell`
19
+ * step (the deliberate escape hatch) or a change to the set of verbs a
20
+ * composition invokes trips the stricter class. comp005/comp006 already make
21
+ * both decidable from the text — this module reuses the same walk
22
+ * (`./rules/comp/support.ts`) rather than re-deriving it.
23
+ *
24
+ * Like #1568's `evaluateUnobservedGate`
25
+ * (../lifecycle/unobserved-gate.ts), this is a reusable predicate, not a
26
+ * runtime: classify a change and get back a verdict; the caller (a
27
+ * `lint.policies` check routed through `policyGate`, an Op step, #1487's
28
+ * gate-as-fact once it lands) decides what "stricter" means in its own
29
+ * context. The stricter class composes with #1487's principle that
30
+ * destructive verbs always wait for a person — pipeline changes are the
31
+ * second category that should never free-run, because they change what
32
+ * "gated" means for everything after them. That is why the default policy
33
+ * below is `"human-always"`, not `"stricter-gate"`.
34
+ */
35
+ import type { Component } from "../components/component.js";
36
+ /** Why a composition (or a change to one) tripped the pipeline-change class. */
37
+ export type PipelineChangeReason = {
38
+ kind: "shell-step";
39
+ phaseName: string;
40
+ } | {
41
+ kind: "unregistered-verb";
42
+ stepKind: string;
43
+ phaseName: string;
44
+ } | {
45
+ kind: "verb-set-changed";
46
+ added: string[];
47
+ removed: string[];
48
+ };
49
+ export interface PipelineChangeClassification {
50
+ /** True when any reason below applies. */
51
+ pipelineChange: boolean;
52
+ reasons: PipelineChangeReason[];
53
+ }
54
+ /** Every non-gate step kind a component's composition invokes, across `deploy` and `rollback` (nested fan-out phases included, via `walkComponent`). `gate` steps are excluded — they are not a capability verb. */
55
+ export declare function componentVerbSet(component: Component): Set<string>;
56
+ /**
57
+ * Classify a single component's composition (the "cheap first cut", no
58
+ * before/after needed): a `shell` step trips the class unconditionally — it
59
+ * is the escape hatch by construction (COMP006) — and any step whose `kind`
60
+ * is outside `knownKinds` trips it too, since an unregistered verb is,
61
+ * structurally, the same kind of hole a `shell` step is: something the
62
+ * bounded registry does not account for.
63
+ */
64
+ export declare function classifyComponentPipelineChange(component: Component, opts?: {
65
+ knownKinds?: ReadonlySet<string>;
66
+ }): PipelineChangeClassification;
67
+ /**
68
+ * Classify a *change* to a component's composition between two revisions
69
+ * (#1569's "add or modify a shell step ... or the composition graph
70
+ * itself"): on top of `classifyComponentPipelineChange`'s single-composition
71
+ * check on `after`, a change also trips the class when the verb set itself
72
+ * changed — a verb added or removed changes what the composition can invoke,
73
+ * which is the routing signal even when every individual verb, before and
74
+ * after, is registry-clean. `before: undefined` (a brand-new component) never
75
+ * reports a verb-set change — there is nothing to diff against, and the
76
+ * single-composition check already covers a new component's own shell/
77
+ * unregistered-verb findings.
78
+ */
79
+ export declare function classifyPipelineChange(before: Component | undefined, after: Component, opts?: {
80
+ knownKinds?: ReadonlySet<string>;
81
+ }): PipelineChangeClassification;
82
+ /**
83
+ * How the gate routes a classified pipeline change.
84
+ *
85
+ * - `"human-always"` (the recommended default — see this module's doc
86
+ * comment) — a pipeline change never free-runs, mirroring #1487's "a
87
+ * destructive verb always waits for a person."
88
+ * - `"stricter-gate"` — route to a named stricter gate class rather than
89
+ * requiring a person on every run; the caller supplies what "stricter"
90
+ * means (an additional approval, a narrower blast-radius budget, ...).
91
+ */
92
+ export type PipelineChangeGatePolicy = "stricter-gate" | "human-always";
93
+ export interface PipelineChangeGateVerdict extends PipelineChangeClassification {
94
+ /** What the policy says to do about it. `"none"` when the change is not a pipeline change at all. */
95
+ route: PipelineChangeGatePolicy | "none";
96
+ }
97
+ /** Evaluate a component composition change against a routing policy. Pure — no I/O. */
98
+ export declare function evaluatePipelineChangeGate(before: Component | undefined, after: Component, policy?: PipelineChangeGatePolicy, opts?: {
99
+ knownKinds?: ReadonlySet<string>;
100
+ }): PipelineChangeGateVerdict;
101
+ //# sourceMappingURL=pipeline-change-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-change-gate.d.ts","sourceRoot":"","sources":["../../src/lint/pipeline-change-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAczD,gFAAgF;AAChF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAClE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAErE,MAAM,WAAW,4BAA4B;IAC3C,0CAA0C;IAC1C,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAED,oNAAoN;AACpN,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,CAGlE;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,SAAS,EACpB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,GAC1C,4BAA4B,CAc9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,KAAK,EAAE,SAAS,EAChB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,GAC1C,4BAA4B,CAe9B;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,wBAAwB,GAAG,eAAe,GAAG,cAAc,CAAC;AAExE,MAAM,WAAW,yBAA0B,SAAQ,4BAA4B;IAC7E,qGAAqG;IACrG,KAAK,EAAE,wBAAwB,GAAG,MAAM,CAAC;CAC1C;AAED,uFAAuF;AACvF,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,KAAK,EAAE,SAAS,EAChB,MAAM,GAAE,wBAAyC,EACjD,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,GAC1C,yBAAyB,CAG3B"}
@@ -1,6 +1,8 @@
1
1
  import type { Declarable } from "../declarable.js";
2
2
  import type { SerializerResult } from "../serializer.js";
3
3
  import type { Severity } from "./rule.js";
4
+ import { type OutputDoc } from "./output-docs.js";
5
+ export { parseOutputDocs, pick, get, type OutputDoc } from "./output-docs.js";
4
6
  /**
5
7
  * Context provided to post-synthesis checks.
6
8
  */
@@ -15,6 +17,25 @@ export interface PostSynthContext {
15
17
  * e.g. "no public buckets in prod". Undefined when no environment is set.
16
18
  */
17
19
  env?: string;
20
+ /**
21
+ * Parsed output documents (chant #975) — `ctx.outputs` run through
22
+ * `parseOutputDocs` once and cached. A lazy `readonly` getter, not a plain
23
+ * field: computed on first access and shared across every check in the
24
+ * run, so a check that only reads `entities` pays nothing, and no two
25
+ * checks re-parse the same YAML/JSON. See `./output-docs.ts`.
26
+ *
27
+ * Optional at the type level — NOT because it can be absent from a real
28
+ * build. Every context chant itself constructs (`runPostSynthChecks`
29
+ * below, `@intentius/chant-test-utils`'s `createPostSynthContext` and
30
+ * `makePostSynthCtx*`) wires it up via `createDocsAccessor` and it is
31
+ * always present there. It is typed optional only so the many lexicon
32
+ * tests that build a `PostSynthContext` object literal by hand (predating
33
+ * this field) keep compiling unchanged, per this issue's own "existing
34
+ * checks compile unchanged" constraint — a new check that wants `ctx.docs`
35
+ * should still get a real array from every context chant builds; guard
36
+ * with `ctx.docs ?? []` only when a context's provenance is unknown.
37
+ */
38
+ readonly docs?: OutputDoc[];
18
39
  /** Raw build result object */
19
40
  buildResult: {
20
41
  outputs: Map<string, string | SerializerResult>;
@@ -27,10 +48,30 @@ export interface PostSynthContext {
27
48
  sourceFileCount: number;
28
49
  };
29
50
  }
51
+ /**
52
+ * Build the lazy, memoized `docs` accessor shared by `runPostSynthChecks`
53
+ * (below) and `@intentius/chant-test-utils`'s `createPostSynthContext` — the
54
+ * two places a `PostSynthContext` gets constructed. Returns a zero-arg
55
+ * function suitable for a `get docs()` object-literal accessor; the first
56
+ * call parses, every later call returns the same cached array.
57
+ */
58
+ export declare function createDocsAccessor(outputs: Map<string, string | SerializerResult>): () => OutputDoc[];
30
59
  /**
31
60
  * Extract the primary content string from a serializer output.
32
61
  */
33
62
  export declare function getPrimaryOutput(output: string | SerializerResult): string;
63
+ /**
64
+ * Extract the ADDITIONAL files from a serializer output — everything
65
+ * {@link getPrimaryOutput} discards.
66
+ *
67
+ * Every post-synth check shipped before this one reads the primary output
68
+ * only, which means a sidecar file (a nested stack template, committed SOPS
69
+ * ciphertext) is invisible to all of them. That is the right default — the
70
+ * primary output is what appliers read — but a rule ABOUT a sidecar has to
71
+ * be able to see it, and `PostSynthContext.outputs` has carried the data all
72
+ * along. WK8504 (k8s) is the first caller.
73
+ */
74
+ export declare function getAdditionalFiles(output: string | SerializerResult): Record<string, string>;
34
75
  /**
35
76
  * A diagnostic from a post-synthesis check.
36
77
  *
@@ -1 +1 @@
1
- {"version":3,"file":"post-synth.d.ts","sourceRoot":"","sources":["../../src/lint/post-synth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAChD,8CAA8C;IAC9C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,WAAW,EAAE;QACX,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;QAChD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACjD,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAE1E;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BA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AiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;CACrD;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAQxE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EAAE,EACxB,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,EAC5C,GAAG,CAAC,EAAE,MAAM,GACX,mBAAmB,EAAE,CAiBvB"}
@@ -0,0 +1,9 @@
1
+ import type { PostSynthCheck } from "./post-synth.js";
2
+ export declare const RECEIPT_PLAIN_STORE_CHECK_ID = "COR023";
3
+ /**
4
+ * Core's own post-synth checks over effect receipts, run by `chant build`
5
+ * over the full build result (plugin checks are lexicon-scoped; receipts are
6
+ * recognized by marker, so this set is deliberately not).
7
+ */
8
+ export declare function coreReceiptChecks(): PostSynthCheck[];
9
+ //# sourceMappingURL=receipt-checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt-checks.d.ts","sourceRoot":"","sources":["../../src/lint/receipt-checks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AAqCxE,eAAO,MAAM,4BAA4B,WAAW,CAAC;AAgDrD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,EAAE,CAEpD"}
@@ -0,0 +1,11 @@
1
+ import type { Component } from "../../../../../../components/component.js";
2
+ /**
3
+ * COMP003 pass case (#1944): a bare "run-agent" step with no "noRollback"
4
+ * opt-out and no component-level "rollback" — must pass COMP003 because
5
+ * "run-agent"'s rollbackPolicy is "native" (#1941), not "needs-opt-out". This
6
+ * is the regression test proving the registry's declared rollbackPolicy for
7
+ * "run-agent" is wired correctly into ctx.rollbackPolicies, the same seam
8
+ * COMP005 uses for ctx.knownKinds — see comp.test.ts's FIXTURE_ROLLBACK_POLICIES.
9
+ */
10
+ export declare const agentTurn: Component;
11
+ //# sourceMappingURL=agent-turn.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-turn.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGxE;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,EAAE,SAcvB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import * as ts from "typescript";
2
+ import type { LintRule } from "../rule.js";
3
+ /** A variable declaration's `EffectReceipt(...)` initializer, if that is what it is. */
4
+ export declare function receiptFactoryCall(decl: ts.VariableDeclaration): ts.CallExpression | undefined;
5
+ /**
6
+ * Every variable name bound to an effect receipt in this file: direct
7
+ * `EffectReceipt(...)` initializers plus identifier aliases, resolved to a
8
+ * fixpoint so declaration order does not matter. Scope-naive by design, the
9
+ * same trade COR011 makes — a chant source file is flat declarations.
10
+ */
11
+ export declare function collectReceiptVariables(sourceFile: ts.SourceFile): Set<string>;
12
+ export declare const cor022ReceiptLeafRule: LintRule;
13
+ //# sourceMappingURL=cor022-receipt-leaf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cor022-receipt-leaf.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/cor022-receipt-leaf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAsCrE,wFAAwF;AACxF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,GAAG,EAAE,CAAC,cAAc,GAAG,SAAS,CAG9F;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CA2B9E;AASD,eAAO,MAAM,qBAAqB,EAAE,QA0CnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { LintRule } from "../rule.js";
2
+ export declare const cor024ReceiptSecretPointerRule: LintRule;
3
+ //# sourceMappingURL=cor024-receipt-secret-pointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cor024-receipt-secret-pointer.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/cor024-receipt-secret-pointer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AA2IrE,eAAO,MAAM,8BAA8B,EAAE,QA6E5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"evl001-non-literal-expression.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl001-non-literal-expression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAsDrE,eAAO,MAAM,8BAA8B,EAAE,QAU5C,CAAC"}
1
+ {"version":3,"file":"evl001-non-literal-expression.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/evl001-non-literal-expression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AA6DrE,eAAO,MAAM,8BAA8B,EAAE,QAU5C,CAAC"}
@@ -24,9 +24,11 @@ export { evl010CompositeNoTransformRule } from "./evl010-composite-no-transform.
24
24
  export { cor017CompositeNameMatchRule } from "./cor017-composite-name-match.js";
25
25
  export { cor018CompositePreferLexiconTypeRule } from "./cor018-composite-prefer-lexicon-type.js";
26
26
  export { cor021EnvLiteralNameRule } from "./cor021-env-literal-name.js";
27
+ export { cor022ReceiptLeafRule, collectReceiptVariables, receiptFactoryCall } from "./cor022-receipt-leaf.js";
28
+ export { cor024ReceiptSecretPointerRule } from "./cor024-receipt-secret-pointer.js";
27
29
  export { isInsideCompositeFactory } from "./composite-scope.js";
28
30
  /**
29
- * Load all 22 core lint rules (COR + EVL).
31
+ * Load all 24 core lint rules (COR + EVL).
30
32
  */
31
33
  export declare function loadCoreRules(): LintRule[];
32
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;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EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AA2B7D;;GAEG;AACH,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CA2B1C"}
@@ -16,6 +16,13 @@ export interface LexiconEntry {
16
16
  writeOnly?: string[];
17
17
  primaryIdentifier?: string[];
18
18
  deprecatedProperties?: string[];
19
+ /**
20
+ * Subset of `deprecatedProperties` that only prose supports — a lexicon
21
+ * generator matched the property description against a deprecation regex
22
+ * rather than reading an upstream declaration (#1701). Editors do not strike
23
+ * these through; the basis is too weak to mark a property dead.
24
+ */
25
+ inferredDeprecations?: string[];
19
26
  conditionalCreateOnly?: string[];
20
27
  replacementStrategy?: "delete_then_create" | "create_then_delete";
21
28
  tagging?: {
@@ -1 +1 @@
1
- {"version":3,"file":"lexicon-providers.d.ts","sourceRoot":"","sources":["../../src/lsp/lexicon-providers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAI1F,MA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DAA8D;IAC9D,gBAAgB,IAAI,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAUtE,0DAA0D;IAC1D,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE;IAqB7C,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;CAGjD;AAID;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,YAAY,EACnB,YAAY,EAAE,MAAM,GACnB,cAAc,EAAE,CAyDlB;AAID;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,YAAY,EACnB,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,SAAS,GAAG,SAAS,GAC9E,SAAS,GAAG,SAAS,CAiBvB"}
@@ -0,0 +1,78 @@
1
+ import type { Declarable } from "./declarable.js";
2
+ /**
3
+ * One authored concept document, parsed from a bundle. Deliberately thinner
4
+ * than the emit side's internal `Concept` (`./okf.ts`) — this is what a
5
+ * *reader* trusts, and per the #1059 design that is `type`/`title` plus the
6
+ * single frontmatter key chant interprets, `binds`. Everything else an
7
+ * author wrote rides along in {@link frontmatter} unexamined, so a consumer
8
+ * that needs a project-specific key (a future `category`, say) can still
9
+ * reach it without a reader change.
10
+ */
11
+ export interface OkfConcept {
12
+ /** Bundle-relative path (forward-slash separated), e.g. "decisions/public-assets.md". */
13
+ path: string;
14
+ /** The frontmatter `type`. May be empty — the reader never rejects a concept for it, unlike the emitter's conformance check. */
15
+ type: string;
16
+ /** Frontmatter `title`, when the author set one. */
17
+ title?: string;
18
+ /**
19
+ * This concept's `binds` frontmatter key, normalized to a list — one name,
20
+ * several, or `[]` for "declared no binding, and that's legitimate."
21
+ * Structural-looking keys (`name`, `lexicon`, `kind`) are deliberately
22
+ * *not* surfaced here or anywhere else on this type: the reader interprets
23
+ * exactly `binds` (#1059's precedence-by-construction), so authored and
24
+ * inferred knowledge cannot conflict at the fact level.
25
+ */
26
+ binds: string[];
27
+ /** Every frontmatter key this concept's document carries, `binds` included, verbatim. */
28
+ frontmatter: Record<string, unknown>;
29
+ /** Markdown body (everything after the closing `---`), unchanged. */
30
+ body: string;
31
+ }
32
+ /** A loaded OKF knowledge bundle: every authored concept found, reserved files already excluded. */
33
+ export interface OkfBundle {
34
+ concepts: OkfConcept[];
35
+ }
36
+ /**
37
+ * Load every authored concept from an OKF knowledge bundle directory.
38
+ * `index.md`/`log.md` are skipped (reserved, by basename, at any depth —
39
+ * matching `okfConformanceProblems`'s check on the emit side). A directory
40
+ * that does not exist yields an empty bundle, not an error: the #1059 design
41
+ * treats a missing `knowledge/` as "this project has none yet," the same
42
+ * posture as a project with no lexicons configured.
43
+ *
44
+ * A file that fails to parse — no frontmatter block, unparseable YAML, or
45
+ * frontmatter that isn't a mapping — is skipped with a `console.warn` and
46
+ * does not affect any other file. Nothing here throws.
47
+ */
48
+ export declare function loadOkfBundle(dir: string): Promise<OkfBundle>;
49
+ /** {@link bindConcepts}'s result: bound concepts per entity, plus every binding that resolved nothing. */
50
+ export interface BindConceptsResult {
51
+ /**
52
+ * Bound concepts keyed by entity logical name — the same names that key
53
+ * `DiscoveryResult.entities` (`./discovery/index.ts`). An entity with no
54
+ * bound concepts is absent from the map, never present with `[]`.
55
+ */
56
+ bound: Map<string, OkfConcept[]>;
57
+ /** Every `binds` entry that named no entity in `entities` — chant's own broken-link posture (#1059): a warning for the caller to surface (COR022, #1865), never a load failure. */
58
+ unresolved: UnresolvedBinding[];
59
+ }
60
+ /** One `binds` entry that resolved to nothing. */
61
+ export interface UnresolvedBinding {
62
+ /** The concept whose `binds` named this entity. */
63
+ concept: OkfConcept;
64
+ /** The unresolved logical name. */
65
+ name: string;
66
+ }
67
+ /**
68
+ * Resolve every concept's `binds` against a project's discovered entities.
69
+ * `entities` is the same shape `./okf.ts`'s emitter takes, `DiscoveryResult`'s
70
+ * own `entities` map — a bare logical name is unambiguous within one
71
+ * discovery pass (#1059's "Rejected options" on binding ambiguity).
72
+ *
73
+ * A concept with no `binds` contributes to neither `bound` nor `unresolved`;
74
+ * an unbound concept is legitimate, not an omission (a runbook, a decision
75
+ * about the project as a whole).
76
+ */
77
+ export declare function bindConcepts(bundle: OkfBundle, entities: Map<string, Declarable>): BindConceptsResult;
78
+ //# sourceMappingURL=okf-read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"okf-read.d.ts","sourceRoot":"","sources":["../src/okf-read.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAkB/C;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,gIAAgI;IAChI,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oGAAoG;AACpG,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAmCD;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CA8CnE;AAED,0GAA0G;AAC1G,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IACjC,mLAAmL;IACnL,UAAU,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,OAAO,EAAE,UAAU,CAAC;IACpB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,kBAAkB,CAgBrG"}