@inventarch/compliance 0.0.0-stage → 1.0.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 (511) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +4 -0
  3. package/README.md +8 -2
  4. package/SPEC.md +128 -0
  5. package/dist/adoption.d.ts +18 -0
  6. package/dist/adoption.d.ts.map +1 -0
  7. package/dist/adoption.js +76 -0
  8. package/dist/adoption.js.map +1 -0
  9. package/dist/catalog.d.ts +112 -0
  10. package/dist/catalog.d.ts.map +1 -0
  11. package/dist/catalog.js +265 -0
  12. package/dist/catalog.js.map +1 -0
  13. package/dist/check-ids.d.ts +4 -0
  14. package/dist/check-ids.d.ts.map +1 -0
  15. package/dist/check-ids.js +22 -0
  16. package/dist/check-ids.js.map +1 -0
  17. package/dist/evidence.d.ts +145 -0
  18. package/dist/evidence.d.ts.map +1 -0
  19. package/dist/evidence.js +468 -0
  20. package/dist/evidence.js.map +1 -0
  21. package/dist/fixtures.d.ts +29 -0
  22. package/dist/fixtures.d.ts.map +1 -0
  23. package/dist/fixtures.js +107 -0
  24. package/dist/fixtures.js.map +1 -0
  25. package/dist/graph-checks.d.ts +27 -0
  26. package/dist/graph-checks.d.ts.map +1 -0
  27. package/dist/graph-checks.js +184 -0
  28. package/dist/graph-checks.js.map +1 -0
  29. package/dist/host-plugin.d.ts +23 -0
  30. package/dist/host-plugin.d.ts.map +1 -0
  31. package/dist/host-plugin.js +204 -0
  32. package/dist/host-plugin.js.map +1 -0
  33. package/dist/index.d.ts +31 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +18 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/obligations.d.ts +157 -0
  38. package/dist/obligations.d.ts.map +1 -0
  39. package/dist/obligations.js +301 -0
  40. package/dist/obligations.js.map +1 -0
  41. package/dist/profiles.d.ts +27 -0
  42. package/dist/profiles.d.ts.map +1 -0
  43. package/dist/profiles.js +40 -0
  44. package/dist/profiles.js.map +1 -0
  45. package/dist/projections.d.ts +51 -0
  46. package/dist/projections.d.ts.map +1 -0
  47. package/dist/projections.js +124 -0
  48. package/dist/projections.js.map +1 -0
  49. package/dist/record-text.d.ts +26 -0
  50. package/dist/record-text.d.ts.map +1 -0
  51. package/dist/record-text.js +73 -0
  52. package/dist/record-text.js.map +1 -0
  53. package/dist/report.d.ts +25 -0
  54. package/dist/report.d.ts.map +1 -0
  55. package/dist/report.js +80 -0
  56. package/dist/report.js.map +1 -0
  57. package/dist/schema.d.ts +23 -0
  58. package/dist/schema.d.ts.map +1 -0
  59. package/dist/schema.js +229 -0
  60. package/dist/schema.js.map +1 -0
  61. package/dist/shape.d.ts +18 -0
  62. package/dist/shape.d.ts.map +1 -0
  63. package/dist/shape.js +106 -0
  64. package/dist/shape.js.map +1 -0
  65. package/dist/steward-profile.d.ts +39 -0
  66. package/dist/steward-profile.d.ts.map +1 -0
  67. package/dist/steward-profile.js +143 -0
  68. package/dist/steward-profile.js.map +1 -0
  69. package/dist/systems.d.ts +11 -0
  70. package/dist/systems.d.ts.map +1 -0
  71. package/dist/systems.js +86 -0
  72. package/dist/systems.js.map +1 -0
  73. package/dist/types.d.ts +23 -0
  74. package/dist/types.d.ts.map +1 -0
  75. package/dist/types.js +92 -0
  76. package/dist/types.js.map +1 -0
  77. package/dist/values.d.ts +8 -0
  78. package/dist/values.d.ts.map +1 -0
  79. package/dist/values.js +47 -0
  80. package/dist/values.js.map +1 -0
  81. package/dist/variants.d.ts +4 -0
  82. package/dist/variants.d.ts.map +1 -0
  83. package/dist/variants.js +82 -0
  84. package/dist/variants.js.map +1 -0
  85. package/dist/workspace-projection.d.ts +22 -0
  86. package/dist/workspace-projection.d.ts.map +1 -0
  87. package/dist/workspace-projection.js +68 -0
  88. package/dist/workspace-projection.js.map +1 -0
  89. package/fixtures/language/cases/fail/duplicate-given.diagnostics.json +10 -0
  90. package/fixtures/language/cases/fail/duplicate-given.ia +72 -0
  91. package/fixtures/language/cases/fail/given-scalar.diagnostics.json +6 -0
  92. package/fixtures/language/cases/fail/given-scalar.ia +71 -0
  93. package/fixtures/language/cases/fail/head-verdict.diagnostics.json +6 -0
  94. package/fixtures/language/cases/fail/head-verdict.ia +72 -0
  95. package/fixtures/language/cases/fail/missing-evaluator.diagnostics.json +6 -0
  96. package/fixtures/language/cases/fail/missing-evaluator.ia +70 -0
  97. package/fixtures/language/cases/fail/missing-expected.diagnostics.json +6 -0
  98. package/fixtures/language/cases/fail/missing-expected.ia +70 -0
  99. package/fixtures/language/cases/fail/missing-given.diagnostics.json +6 -0
  100. package/fixtures/language/cases/fail/missing-given.ia +70 -0
  101. package/fixtures/language/cases/fail/missing-kind.diagnostics.json +6 -0
  102. package/fixtures/language/cases/fail/missing-kind.ia +70 -0
  103. package/fixtures/language/cases/fail/missing-request.diagnostics.json +6 -0
  104. package/fixtures/language/cases/fail/missing-request.ia +70 -0
  105. package/fixtures/language/cases/fail/scenario-conditioned-field.diagnostics.json +6 -0
  106. package/fixtures/language/cases/fail/scenario-conditioned-field.ia +71 -0
  107. package/fixtures/language/cases/fail/scenario-verdict.diagnostics.json +6 -0
  108. package/fixtures/language/cases/fail/scenario-verdict.ia +72 -0
  109. package/fixtures/language/cases/fail/unbound.diagnostics.json +6 -0
  110. package/fixtures/language/cases/fail/unbound.ia +71 -0
  111. package/fixtures/language/cases/fail/unknown-kind.diagnostics.json +6 -0
  112. package/fixtures/language/cases/fail/unknown-kind.ia +71 -0
  113. package/fixtures/language/cases/fail/verdict-block.diagnostics.json +6 -0
  114. package/fixtures/language/cases/fail/verdict-block.ia +73 -0
  115. package/fixtures/language/cases/fail/wrong-fragment.diagnostics.json +6 -0
  116. package/fixtures/language/cases/fail/wrong-fragment.ia +71 -0
  117. package/fixtures/language/cases/pass/all-scenario-kinds.ia +107 -0
  118. package/fixtures/language/cases/pass/all-scenario-kinds.records.json +1558 -0
  119. package/fixtures/language/cells/fail/duplicate-phase-sections.diagnostics.json +10 -0
  120. package/fixtures/language/cells/fail/duplicate-phase-sections.ia +64 -0
  121. package/fixtures/language/cells/fail/duplicate-primary.diagnostics.json +10 -0
  122. package/fixtures/language/cells/fail/duplicate-primary.ia +63 -0
  123. package/fixtures/language/cells/fail/duplicate-primitive.diagnostics.json +10 -0
  124. package/fixtures/language/cells/fail/duplicate-primitive.ia +63 -0
  125. package/fixtures/language/cells/fail/legacy-primary-move.diagnostics.json +6 -0
  126. package/fixtures/language/cells/fail/legacy-primary-move.ia +61 -0
  127. package/fixtures/language/cells/fail/means-list.diagnostics.json +6 -0
  128. package/fixtures/language/cells/fail/means-list.ia +61 -0
  129. package/fixtures/language/cells/fail/means-reference.diagnostics.json +6 -0
  130. package/fixtures/language/cells/fail/means-reference.ia +61 -0
  131. package/fixtures/language/cells/fail/means-scalar.diagnostics.json +6 -0
  132. package/fixtures/language/cells/fail/means-scalar.ia +61 -0
  133. package/fixtures/language/cells/fail/means-unsupported-child.diagnostics.json +6 -0
  134. package/fixtures/language/cells/fail/means-unsupported-child.ia +62 -0
  135. package/fixtures/language/cells/fail/phase-unknown.diagnostics.json +6 -0
  136. package/fixtures/language/cells/fail/phase-unknown.ia +61 -0
  137. package/fixtures/language/cells/fail/primary-quoted.diagnostics.json +6 -0
  138. package/fixtures/language/cells/fail/primary-quoted.ia +61 -0
  139. package/fixtures/language/cells/fail/primary-requires-means.diagnostics.json +6 -0
  140. package/fixtures/language/cells/fail/primary-requires-means.ia +61 -0
  141. package/fixtures/language/cells/fail/primary-unknown.diagnostics.json +6 -0
  142. package/fixtures/language/cells/fail/primary-unknown.ia +61 -0
  143. package/fixtures/language/cells/fail/primitive-case.diagnostics.json +6 -0
  144. package/fixtures/language/cells/fail/primitive-case.ia +61 -0
  145. package/fixtures/language/cells/fail/primitive-unknown.diagnostics.json +6 -0
  146. package/fixtures/language/cells/fail/primitive-unknown.ia +61 -0
  147. package/fixtures/language/cells/fail/unsupported-item.diagnostics.json +6 -0
  148. package/fixtures/language/cells/fail/unsupported-item.ia +61 -0
  149. package/fixtures/language/cells/pass/full-opal-grid.ia +92 -0
  150. package/fixtures/language/cells/pass/full-opal-grid.records.json +1450 -0
  151. package/fixtures/language/compile/fail/blocked-keyword.diagnostics.json +1 -0
  152. package/fixtures/language/compile/fail/blocked-keyword.ia +22 -0
  153. package/fixtures/language/compile/fail/discriminator-unregistered.diagnostics.json +1 -0
  154. package/fixtures/language/compile/fail/discriminator-unregistered.ia +19 -0
  155. package/fixtures/language/compile/pass/minimal-floor.ia +22 -0
  156. package/fixtures/language/compile/pass/minimal-floor.records.json +293 -0
  157. package/fixtures/language/compile/pass/nested-and-items.ia +27 -0
  158. package/fixtures/language/compile/pass/nested-and-items.records.json +373 -0
  159. package/fixtures/language/conditions/fail/conflicting-name.diagnostics.json +6 -0
  160. package/fixtures/language/conditions/fail/conflicting-name.ia +60 -0
  161. package/fixtures/language/conditions/fail/dangling-and.diagnostics.json +6 -0
  162. package/fixtures/language/conditions/fail/dangling-and.ia +60 -0
  163. package/fixtures/language/conditions/fail/empty-child.diagnostics.json +6 -0
  164. package/fixtures/language/conditions/fail/empty-child.ia +61 -0
  165. package/fixtures/language/conditions/fail/misplaced-head.diagnostics.json +6 -0
  166. package/fixtures/language/conditions/fail/misplaced-head.ia +59 -0
  167. package/fixtures/language/conditions/fail/misplaced-meaning.diagnostics.json +6 -0
  168. package/fixtures/language/conditions/fail/misplaced-meaning.ia +60 -0
  169. package/fixtures/language/conditions/fail/misplaced-ordinary-deep.diagnostics.json +6 -0
  170. package/fixtures/language/conditions/fail/misplaced-ordinary-deep.ia +61 -0
  171. package/fixtures/language/conditions/fail/misplaced-phase.diagnostics.json +6 -0
  172. package/fixtures/language/conditions/fail/misplaced-phase.ia +61 -0
  173. package/fixtures/language/conditions/fail/misplaced-primary.diagnostics.json +6 -0
  174. package/fixtures/language/conditions/fail/misplaced-primary.ia +62 -0
  175. package/fixtures/language/conditions/fail/misplaced-severity.diagnostics.json +6 -0
  176. package/fixtures/language/conditions/fail/misplaced-severity.ia +60 -0
  177. package/fixtures/language/conditions/fail/misplaced-standalone.diagnostics.json +6 -0
  178. package/fixtures/language/conditions/fail/misplaced-standalone.ia +60 -0
  179. package/fixtures/language/conditions/fail/missing-is.diagnostics.json +6 -0
  180. package/fixtures/language/conditions/fail/missing-is.ia +60 -0
  181. package/fixtures/language/conditions/fail/mixed-carriers.diagnostics.json +6 -0
  182. package/fixtures/language/conditions/fail/mixed-carriers.ia +61 -0
  183. package/fixtures/language/conditions/fail/quoted-value.diagnostics.json +6 -0
  184. package/fixtures/language/conditions/fail/quoted-value.ia +60 -0
  185. package/fixtures/language/conditions/fail/repeated-child.diagnostics.json +6 -0
  186. package/fixtures/language/conditions/fail/repeated-child.ia +62 -0
  187. package/fixtures/language/conditions/fail/repeated-name.diagnostics.json +6 -0
  188. package/fixtures/language/conditions/fail/repeated-name.ia +60 -0
  189. package/fixtures/language/conditions/fail/schema-when-block.diagnostics.json +6 -0
  190. package/fixtures/language/conditions/fail/schema-when-block.ia +64 -0
  191. package/fixtures/language/conditions/fail/unknown-term.diagnostics.json +6 -0
  192. package/fixtures/language/conditions/fail/unknown-term.ia +60 -0
  193. package/fixtures/language/conditions/fail/unknown-value.diagnostics.json +6 -0
  194. package/fixtures/language/conditions/fail/unknown-value.ia +60 -0
  195. package/fixtures/language/conditions/pass/all-carriers-and-dimensions.ia +71 -0
  196. package/fixtures/language/conditions/pass/all-carriers-and-dimensions.records.json +1131 -0
  197. package/fixtures/language/contracts/fail/duplicate-requirement-records.diagnostics.json +10 -0
  198. package/fixtures/language/contracts/fail/duplicate-requirement-records.ia +67 -0
  199. package/fixtures/language/contracts/fail/duplicate-requirement-sections.diagnostics.json +10 -0
  200. package/fixtures/language/contracts/fail/duplicate-requirement-sections.ia +64 -0
  201. package/fixtures/language/contracts/fail/extra-word.diagnostics.json +6 -0
  202. package/fixtures/language/contracts/fail/extra-word.ia +62 -0
  203. package/fixtures/language/contracts/fail/id-case.diagnostics.json +6 -0
  204. package/fixtures/language/contracts/fail/id-case.ia +62 -0
  205. package/fixtures/language/contracts/fail/id-empty.diagnostics.json +6 -0
  206. package/fixtures/language/contracts/fail/id-empty.ia +62 -0
  207. package/fixtures/language/contracts/fail/retired-binds.diagnostics.json +6 -0
  208. package/fixtures/language/contracts/fail/retired-binds.ia +59 -0
  209. package/fixtures/language/contracts/fail/retired-schema.diagnostics.json +6 -0
  210. package/fixtures/language/contracts/fail/retired-schema.ia +62 -0
  211. package/fixtures/language/contracts/fail/text-reference.diagnostics.json +6 -0
  212. package/fixtures/language/contracts/fail/text-reference.ia +62 -0
  213. package/fixtures/language/contracts/fail/text-scalar.diagnostics.json +6 -0
  214. package/fixtures/language/contracts/fail/text-scalar.ia +62 -0
  215. package/fixtures/language/contracts/fail/unbound.diagnostics.json +6 -0
  216. package/fixtures/language/contracts/fail/unbound.ia +60 -0
  217. package/fixtures/language/contracts/fail/unsupported-child.diagnostics.json +6 -0
  218. package/fixtures/language/contracts/fail/unsupported-child.ia +63 -0
  219. package/fixtures/language/contracts/pass/all-requirement-kinds.ia +76 -0
  220. package/fixtures/language/contracts/pass/all-requirement-kinds.records.json +1101 -0
  221. package/fixtures/language/edges/fail/identity-fragment.diagnostics.json +6 -0
  222. package/fixtures/language/edges/fail/identity-fragment.ia +60 -0
  223. package/fixtures/language/edges/fail/identity-kind.diagnostics.json +6 -0
  224. package/fixtures/language/edges/fail/identity-kind.ia +60 -0
  225. package/fixtures/language/edges/fail/identity-short.diagnostics.json +6 -0
  226. package/fixtures/language/edges/fail/identity-short.ia +60 -0
  227. package/fixtures/language/edges/fail/missing-target.diagnostics.json +6 -0
  228. package/fixtures/language/edges/fail/missing-target.ia +60 -0
  229. package/fixtures/language/edges/fail/source-side-unconsented.diagnostics.json +6 -0
  230. package/fixtures/language/edges/fail/source-side-unconsented.ia +60 -0
  231. package/fixtures/language/edges/fail/target-absent.diagnostics.json +6 -0
  232. package/fixtures/language/edges/fail/target-absent.ia +60 -0
  233. package/fixtures/language/edges/fail/target-ambiguous.diagnostics.json +6 -0
  234. package/fixtures/language/edges/fail/target-ambiguous.ia +60 -0
  235. package/fixtures/language/edges/fail/target-ambiguous.pool.json +26 -0
  236. package/fixtures/language/edges/fail/target-bare.diagnostics.json +6 -0
  237. package/fixtures/language/edges/fail/target-bare.ia +60 -0
  238. package/fixtures/language/edges/fail/target-list.diagnostics.json +6 -0
  239. package/fixtures/language/edges/fail/target-list.ia +60 -0
  240. package/fixtures/language/edges/fail/target-quoted.diagnostics.json +6 -0
  241. package/fixtures/language/edges/fail/target-quoted.ia +60 -0
  242. package/fixtures/language/edges/fail/target-side-unconsented.diagnostics.json +6 -0
  243. package/fixtures/language/edges/fail/target-side-unconsented.ia +60 -0
  244. package/fixtures/language/edges/fail/target-trailing-word.diagnostics.json +6 -0
  245. package/fixtures/language/edges/fail/target-trailing-word.ia +60 -0
  246. package/fixtures/language/edges/fail/unknown-verb.diagnostics.json +6 -0
  247. package/fixtures/language/edges/fail/unknown-verb.ia +60 -0
  248. package/fixtures/language/edges/pass/all-verbs-and-addresses.ia +114 -0
  249. package/fixtures/language/edges/pass/all-verbs-and-addresses.records.json +2221 -0
  250. package/fixtures/language/format/fail/lost-comment.candidate.txt +5 -0
  251. package/fixtures/language/format/fail/lost-comment.diagnostics.json +3 -0
  252. package/fixtures/language/format/fail/lost-comment.ia +5 -0
  253. package/fixtures/language/format/pass/token-spacing.ast.json +100 -0
  254. package/fixtures/language/format/pass/token-spacing.formatted.txt +7 -0
  255. package/fixtures/language/format/pass/token-spacing.ia +7 -0
  256. package/fixtures/language/identity/fail/facet-undeclared.diagnostics.json +1 -0
  257. package/fixtures/language/identity/fail/facet-undeclared.ia +20 -0
  258. package/fixtures/language/identity/fail/identity-collision.diagnostics.json +1 -0
  259. package/fixtures/language/identity/fail/identity-collision.ia +20 -0
  260. package/fixtures/language/identity/pass/facets.ia +21 -0
  261. package/fixtures/language/identity/pass/facets.records.json +300 -0
  262. package/fixtures/language/indent/fail/odd-block-with-prose.diagnostics.json +1 -0
  263. package/fixtures/language/indent/fail/odd-block-with-prose.ia +6 -0
  264. package/fixtures/language/indent/fail/odd-block.diagnostics.json +1 -0
  265. package/fixtures/language/indent/fail/odd-block.ia +4 -0
  266. package/fixtures/language/indent/fail/odd.diagnostics.json +1 -0
  267. package/fixtures/language/indent/fail/odd.ia +3 -0
  268. package/fixtures/language/indent/fail/step-block.diagnostics.json +1 -0
  269. package/fixtures/language/indent/fail/step-block.ia +4 -0
  270. package/fixtures/language/indent/fail/step-in-block.diagnostics.json +1 -0
  271. package/fixtures/language/indent/fail/step-in-block.ia +6 -0
  272. package/fixtures/language/indent/fail/step-under-header.diagnostics.json +1 -0
  273. package/fixtures/language/indent/fail/step-under-header.ia +3 -0
  274. package/fixtures/language/indent/fail/tab-block.diagnostics.json +1 -0
  275. package/fixtures/language/indent/fail/tab-block.ia +5 -0
  276. package/fixtures/language/indent/fail/tab.diagnostics.json +1 -0
  277. package/fixtures/language/indent/fail/tab.ia +3 -0
  278. package/fixtures/language/indent/fail/under-item.diagnostics.json +1 -0
  279. package/fixtures/language/indent/fail/under-item.ia +5 -0
  280. package/fixtures/language/indent/pass/blocks.ast.json +127 -0
  281. package/fixtures/language/indent/pass/blocks.ia +9 -0
  282. package/fixtures/language/lists/fail/dash-without-value.diagnostics.json +1 -0
  283. package/fixtures/language/lists/fail/dash-without-value.ia +4 -0
  284. package/fixtures/language/lists/fail/empty-item.diagnostics.json +1 -0
  285. package/fixtures/language/lists/fail/empty-item.ia +4 -0
  286. package/fixtures/language/lists/fail/item-line-list.diagnostics.json +1 -0
  287. package/fixtures/language/lists/fail/item-line-list.ia +4 -0
  288. package/fixtures/language/lists/fail/item-line-prose.diagnostics.json +1 -0
  289. package/fixtures/language/lists/fail/item-line-prose.ia +4 -0
  290. package/fixtures/language/lists/fail/missing-separator.diagnostics.json +1 -0
  291. package/fixtures/language/lists/fail/missing-separator.ia +4 -0
  292. package/fixtures/language/lists/fail/nested-list.diagnostics.json +1 -0
  293. package/fixtures/language/lists/fail/nested-list.ia +4 -0
  294. package/fixtures/language/lists/fail/unterminated.diagnostics.json +1 -0
  295. package/fixtures/language/lists/fail/unterminated.ia +5 -0
  296. package/fixtures/language/lists/pass/multi-line.ast.json +117 -0
  297. package/fixtures/language/lists/pass/multi-line.ia +9 -0
  298. package/fixtures/language/pragma/fail/missing.diagnostics.json +1 -0
  299. package/fixtures/language/pragma/fail/missing.ia +1 -0
  300. package/fixtures/language/pragma/fail/unsupported.diagnostics.json +1 -0
  301. package/fixtures/language/pragma/fail/unsupported.ia +2 -0
  302. package/fixtures/language/pragma/pass/minimal.ast.json +20 -0
  303. package/fixtures/language/pragma/pass/minimal.ia +2 -0
  304. package/fixtures/language/prose/fail/trailing.diagnostics.json +1 -0
  305. package/fixtures/language/prose/fail/trailing.ia +4 -0
  306. package/fixtures/language/prose/fail/unterminated.diagnostics.json +1 -0
  307. package/fixtures/language/prose/fail/unterminated.ia +5 -0
  308. package/fixtures/language/prose/pass/paragraphs.ast.json +48 -0
  309. package/fixtures/language/prose/pass/paragraphs.ia +7 -0
  310. package/fixtures/language/records/fail/head-after-section.diagnostics.json +1 -0
  311. package/fixtures/language/records/fail/head-after-section.ia +5 -0
  312. package/fixtures/language/records/fail/header-discriminator-class.diagnostics.json +1 -0
  313. package/fixtures/language/records/fail/header-discriminator-class.ia +2 -0
  314. package/fixtures/language/records/fail/header-extra-token.diagnostics.json +1 -0
  315. package/fixtures/language/records/fail/header-extra-token.ia +2 -0
  316. package/fixtures/language/records/fail/header-missing-name.diagnostics.json +1 -0
  317. package/fixtures/language/records/fail/header-missing-name.ia +2 -0
  318. package/fixtures/language/records/fail/header-name-class.diagnostics.json +1 -0
  319. package/fixtures/language/records/fail/header-name-class.ia +2 -0
  320. package/fixtures/language/records/fail/indented-preamble.diagnostics.json +1 -0
  321. package/fixtures/language/records/fail/indented-preamble.ia +3 -0
  322. package/fixtures/language/records/fail/item-under-header.diagnostics.json +1 -0
  323. package/fixtures/language/records/fail/item-under-header.ia +3 -0
  324. package/fixtures/language/records/fail/nested-under-header.diagnostics.json +1 -0
  325. package/fixtures/language/records/fail/nested-under-header.ia +3 -0
  326. package/fixtures/language/records/fail/toplevel.diagnostics.json +1 -0
  327. package/fixtures/language/records/fail/toplevel.ia +3 -0
  328. package/fixtures/language/records/pass/full.ast.json +31 -0
  329. package/fixtures/language/records/pass/full.ia +11 -0
  330. package/fixtures/language/refs/fail/discriminator-class.diagnostics.json +1 -0
  331. package/fixtures/language/refs/fail/discriminator-class.ia +4 -0
  332. package/fixtures/language/refs/fail/name-class.diagnostics.json +1 -0
  333. package/fixtures/language/refs/fail/name-class.ia +4 -0
  334. package/fixtures/language/refs/pass/cell-fragment.ast.json +50 -0
  335. package/fixtures/language/refs/pass/cell-fragment.ia +4 -0
  336. package/fixtures/language/refs/pass/fragments.ast.json +104 -0
  337. package/fixtures/language/refs/pass/fragments.ia +6 -0
  338. package/fixtures/language/registry/fail/category-missing.diagnostics.json +1 -0
  339. package/fixtures/language/registry/fail/category-missing.ia +8 -0
  340. package/fixtures/language/registry/fail/category-unknown.diagnostics.json +1 -0
  341. package/fixtures/language/registry/fail/category-unknown.ia +9 -0
  342. package/fixtures/language/registry/fail/condition-in-entry.diagnostics.json +1 -0
  343. package/fixtures/language/registry/fail/condition-in-entry.ia +9 -0
  344. package/fixtures/language/registry/fail/condition-on-head.diagnostics.json +1 -0
  345. package/fixtures/language/registry/fail/condition-on-head.ia +4 -0
  346. package/fixtures/language/registry/fail/consent-predicate-unknown.diagnostics.json +1 -0
  347. package/fixtures/language/registry/fail/consent-predicate-unknown.ia +6 -0
  348. package/fixtures/language/registry/fail/consent-row-malformed.diagnostics.json +1 -0
  349. package/fixtures/language/registry/fail/consent-row-malformed.ia +6 -0
  350. package/fixtures/language/registry/fail/discriminator-conflict.diagnostics.json +1 -0
  351. package/fixtures/language/registry/fail/discriminator-conflict.ia +21 -0
  352. package/fixtures/language/registry/fail/entry-malformed.diagnostics.json +1 -0
  353. package/fixtures/language/registry/fail/entry-malformed.ia +6 -0
  354. package/fixtures/language/registry/fail/facets-missing.diagnostics.json +1 -0
  355. package/fixtures/language/registry/fail/facets-missing.ia +9 -0
  356. package/fixtures/language/registry/fail/keyword-reserved.diagnostics.json +1 -0
  357. package/fixtures/language/registry/fail/keyword-reserved.ia +9 -0
  358. package/fixtures/language/registry/fail/kind-unknown.diagnostics.json +1 -0
  359. package/fixtures/language/registry/fail/kind-unknown.ia +9 -0
  360. package/fixtures/language/registry/fail/provider-missing.diagnostics.json +1 -0
  361. package/fixtures/language/registry/fail/provider-missing.ia +3 -0
  362. package/fixtures/language/registry/fail/requires-head-field.diagnostics.json +1 -0
  363. package/fixtures/language/registry/fail/requires-head-field.ia +5 -0
  364. package/fixtures/language/registry/fail/retired-interface.diagnostics.json +6 -0
  365. package/fixtures/language/registry/fail/retired-interface.ia +9 -0
  366. package/fixtures/language/registry/fail/retired-protocol.diagnostics.json +6 -0
  367. package/fixtures/language/registry/fail/retired-protocol.ia +9 -0
  368. package/fixtures/language/registry/fail/retired-shape.diagnostics.json +6 -0
  369. package/fixtures/language/registry/fail/retired-shape.ia +9 -0
  370. package/fixtures/language/registry/fail/schema-entry-missing.diagnostics.json +1 -0
  371. package/fixtures/language/registry/fail/schema-entry-missing.ia +9 -0
  372. package/fixtures/language/registry/fail/schema-kind-mismatch.diagnostics.json +1 -0
  373. package/fixtures/language/registry/fail/schema-kind-mismatch.ia +13 -0
  374. package/fixtures/language/registry/fail/schema-missing.diagnostics.json +1 -0
  375. package/fixtures/language/registry/fail/schema-missing.ia +9 -0
  376. package/fixtures/language/registry/fail/system-cycle.diagnostics.json +1 -0
  377. package/fixtures/language/registry/fail/system-cycle.ia +11 -0
  378. package/fixtures/language/registry/fail/system-missing.diagnostics.json +1 -0
  379. package/fixtures/language/registry/fail/system-missing.ia +6 -0
  380. package/fixtures/language/registry/fail/version-not-semver.diagnostics.json +1 -0
  381. package/fixtures/language/registry/fail/version-not-semver.ia +4 -0
  382. package/fixtures/language/registry/pass/requires-order.ia +44 -0
  383. package/fixtures/language/registry/pass/requires-order.records.json +633 -0
  384. package/fixtures/language/schema/fail/edge-as-field.diagnostics.json +1 -0
  385. package/fixtures/language/schema/fail/edge-as-field.ia +7 -0
  386. package/fixtures/language/schema/fail/edge-cardinality-unknown.diagnostics.json +1 -0
  387. package/fixtures/language/schema/fail/edge-cardinality-unknown.ia +7 -0
  388. package/fixtures/language/schema/fail/edge-predicate-unknown.diagnostics.json +1 -0
  389. package/fixtures/language/schema/fail/edge-predicate-unknown.ia +7 -0
  390. package/fixtures/language/schema/fail/field-form-unknown.diagnostics.json +1 -0
  391. package/fixtures/language/schema/fail/field-form-unknown.ia +7 -0
  392. package/fixtures/language/schema/fail/field-path-malformed.diagnostics.json +1 -0
  393. package/fixtures/language/schema/fail/field-path-malformed.ia +7 -0
  394. package/fixtures/language/schema/fail/field-set-not-id.diagnostics.json +1 -0
  395. package/fixtures/language/schema/fail/field-set-not-id.ia +7 -0
  396. package/fixtures/language/schema/fail/field-type-unknown.diagnostics.json +1 -0
  397. package/fixtures/language/schema/fail/field-type-unknown.ia +7 -0
  398. package/fixtures/language/schema/fail/kind-unknown.diagnostics.json +1 -0
  399. package/fixtures/language/schema/fail/kind-unknown.ia +5 -0
  400. package/fixtures/language/schema/fail/lowers-to-missing.diagnostics.json +1 -0
  401. package/fixtures/language/schema/fail/lowers-to-missing.ia +4 -0
  402. package/fixtures/language/schema/fail/sections-unclosed.diagnostics.json +1 -0
  403. package/fixtures/language/schema/fail/sections-unclosed.ia +5 -0
  404. package/fixtures/language/schema/pass/field-narrowing.ia +13 -0
  405. package/fixtures/language/schema/pass/field-narrowing.records.json +170 -0
  406. package/fixtures/language/schema/pass/full-dialect.ia +16 -0
  407. package/fixtures/language/schema/pass/full-dialect.records.json +179 -0
  408. package/fixtures/language/selectors/fail/child-condition.diagnostics.json +6 -0
  409. package/fixtures/language/selectors/fail/child-condition.ia +61 -0
  410. package/fixtures/language/selectors/fail/dangling-and.diagnostics.json +6 -0
  411. package/fixtures/language/selectors/fail/dangling-and.ia +60 -0
  412. package/fixtures/language/selectors/fail/dimension-not-axis.diagnostics.json +6 -0
  413. package/fixtures/language/selectors/fail/dimension-not-axis.ia +60 -0
  414. package/fixtures/language/selectors/fail/missing-is.diagnostics.json +6 -0
  415. package/fixtures/language/selectors/fail/missing-is.ia +60 -0
  416. package/fixtures/language/selectors/fail/quoted-value.diagnostics.json +6 -0
  417. package/fixtures/language/selectors/fail/quoted-value.ia +60 -0
  418. package/fixtures/language/selectors/fail/repeated-axis.diagnostics.json +6 -0
  419. package/fixtures/language/selectors/fail/repeated-axis.ia +60 -0
  420. package/fixtures/language/selectors/fail/unknown-axis.diagnostics.json +6 -0
  421. package/fixtures/language/selectors/fail/unknown-axis.ia +60 -0
  422. package/fixtures/language/selectors/fail/unknown-value.diagnostics.json +6 -0
  423. package/fixtures/language/selectors/fail/unknown-value.ia +60 -0
  424. package/fixtures/language/selectors/fail/wrong-grammar-case.diagnostics.json +6 -0
  425. package/fixtures/language/selectors/fail/wrong-grammar-case.ia +60 -0
  426. package/fixtures/language/selectors/pass/all-axes-canonical-values.ia +136 -0
  427. package/fixtures/language/selectors/pass/all-axes-canonical-values.records.json +2437 -0
  428. package/fixtures/language/strings/fail/unterminated-block.diagnostics.json +1 -0
  429. package/fixtures/language/strings/fail/unterminated-block.ia +6 -0
  430. package/fixtures/language/strings/fail/unterminated.diagnostics.json +1 -0
  431. package/fixtures/language/strings/fail/unterminated.ia +4 -0
  432. package/fixtures/language/strings/pass/structural-words.ast.json +21 -0
  433. package/fixtures/language/strings/pass/structural-words.ia +4 -0
  434. package/fixtures/language/values/fail/key-missing.diagnostics.json +1 -0
  435. package/fixtures/language/values/fail/key-missing.ia +4 -0
  436. package/fixtures/language/values/fail/trailing.diagnostics.json +1 -0
  437. package/fixtures/language/values/fail/trailing.ia +4 -0
  438. package/fixtures/language/values/fail/when-empty.diagnostics.json +1 -0
  439. package/fixtures/language/values/fail/when-empty.ia +4 -0
  440. package/fixtures/language/values/fail/when-list.diagnostics.json +1 -0
  441. package/fixtures/language/values/fail/when-list.ia +4 -0
  442. package/fixtures/language/values/pass/forms.ast.json +177 -0
  443. package/fixtures/language/values/pass/forms.ia +11 -0
  444. package/fixtures/language/variants/fail/duplicate-canonical-conjunction.diagnostics.json +14 -0
  445. package/fixtures/language/variants/fail/duplicate-canonical-conjunction.ia +63 -0
  446. package/fixtures/language/variants/fail/duplicate-fallback.diagnostics.json +10 -0
  447. package/fixtures/language/variants/fail/duplicate-fallback.ia +61 -0
  448. package/fixtures/language/variants/pass/fallback-and-coordinate-families.ia +65 -0
  449. package/fixtures/language/variants/pass/fallback-and-coordinate-families.records.json +971 -0
  450. package/fixtures/loop/.ia/src/blocking.ia +8 -0
  451. package/fixtures/loop/.ia/src/choice-a.ia +9 -0
  452. package/fixtures/loop/.ia/src/choice-b.ia +9 -0
  453. package/fixtures/loop/.ia/src/declared-decision.ia +12 -0
  454. package/fixtures/loop/.ia/src/fallback.ia +9 -0
  455. package/fixtures/loop/.ia/src/floor/artifact-set.ia +65 -0
  456. package/fixtures/loop/.ia/src/floor/axis.ia +74 -0
  457. package/fixtures/loop/.ia/src/floor/cardinality.ia +23 -0
  458. package/fixtures/loop/.ia/src/floor/category.ia +107 -0
  459. package/fixtures/loop/.ia/src/floor/dimension.ia +29 -0
  460. package/fixtures/loop/.ia/src/floor/floor.schema.ia +23 -0
  461. package/fixtures/loop/.ia/src/floor/intent-shape.ia +73 -0
  462. package/fixtures/loop/.ia/src/floor/kernel.schema.ia +173 -0
  463. package/fixtures/loop/.ia/src/floor/kind.ia +59 -0
  464. package/fixtures/loop/.ia/src/floor/lane.ia +44 -0
  465. package/fixtures/loop/.ia/src/floor/move.ia +37 -0
  466. package/fixtures/loop/.ia/src/floor/phase.ia +30 -0
  467. package/fixtures/loop/.ia/src/floor/placement.ia +42 -0
  468. package/fixtures/loop/.ia/src/floor/predicate.ia +164 -0
  469. package/fixtures/loop/.ia/src/floor/primitive.ia +50 -0
  470. package/fixtures/loop/.ia/src/floor/taxonomy.system.ia +67 -0
  471. package/fixtures/loop/.ia/src/floor/value-type.ia +44 -0
  472. package/fixtures/loop/.ia/src/systems/agent-system/records/foreign.ia +9 -0
  473. package/fixtures/loop/.ia/src/systems/agent-system/records/sample-mandate.ia +8 -0
  474. package/fixtures/loop/.ia/src/systems/agent-system/schemas/agent.schema.ia +13 -0
  475. package/fixtures/loop/.ia/src/systems/agent-system/schemas/mandate.schema.ia +12 -0
  476. package/fixtures/loop/.ia/src/systems/agent-system/steward.ia +9 -0
  477. package/fixtures/loop/.ia/src/systems/agent-system/system.ia +25 -0
  478. package/fixtures/loop/.ia/src/systems/compliance-system/cases/foreign-vocabulary.ia +14 -0
  479. package/fixtures/loop/.ia/src/systems/compliance-system/cases/missing-required-field.ia +14 -0
  480. package/fixtures/loop/.ia/src/systems/compliance-system/cases/valid-native-record.ia +15 -0
  481. package/fixtures/loop/.ia/src/systems/compliance-system/checks/instance-schema-check.ia +13 -0
  482. package/fixtures/loop/.ia/src/systems/compliance-system/contracts/foundation-authoring-contract.ia +15 -0
  483. package/fixtures/loop/.ia/src/systems/compliance-system/schemas/case.schema.ia +17 -0
  484. package/fixtures/loop/.ia/src/systems/compliance-system/schemas/check.schema.ia +15 -0
  485. package/fixtures/loop/.ia/src/systems/compliance-system/schemas/contract.schema.ia +20 -0
  486. package/fixtures/loop/.ia/src/systems/compliance-system/steward.ia +9 -0
  487. package/fixtures/loop/.ia/src/systems/compliance-system/system.ia +29 -0
  488. package/fixtures/loop/.ia/src/systems/governance-system/records/sample-convention.ia +9 -0
  489. package/fixtures/loop/.ia/src/systems/governance-system/records/sample-principle.ia +9 -0
  490. package/fixtures/loop/.ia/src/systems/governance-system/records/sample-procedure.ia +44 -0
  491. package/fixtures/loop/.ia/src/systems/governance-system/records/sample-rule.ia +13 -0
  492. package/fixtures/loop/.ia/src/systems/governance-system/schemas/convention.schema.ia +13 -0
  493. package/fixtures/loop/.ia/src/systems/governance-system/schemas/law.schema.ia +13 -0
  494. package/fixtures/loop/.ia/src/systems/governance-system/schemas/playbook.schema.ia +14 -0
  495. package/fixtures/loop/.ia/src/systems/governance-system/schemas/principle.schema.ia +13 -0
  496. package/fixtures/loop/.ia/src/systems/governance-system/steward.ia +9 -0
  497. package/fixtures/loop/.ia/src/systems/governance-system/system.ia +35 -0
  498. package/fixtures/loop/.ia/src/systems/session-system/records/sample-session.ia +10 -0
  499. package/fixtures/loop/.ia/src/systems/session-system/schemas/run.schema.ia +15 -0
  500. package/fixtures/loop/.ia/src/systems/session-system/steward.ia +9 -0
  501. package/fixtures/loop/.ia/src/systems/session-system/system.ia +23 -0
  502. package/fixtures/loop/.ia/src/systems/workspace-system/records/foundation-distribution.ia +8 -0
  503. package/fixtures/loop/.ia/src/systems/workspace-system/records/foundation-workspace.ia +10 -0
  504. package/fixtures/loop/.ia/src/systems/workspace-system/schemas/distribution.schema.ia +13 -0
  505. package/fixtures/loop/.ia/src/systems/workspace-system/schemas/workspace.schema.ia +13 -0
  506. package/fixtures/loop/.ia/src/systems/workspace-system/steward.ia +9 -0
  507. package/fixtures/loop/.ia/src/systems/workspace-system/system.ia +26 -0
  508. package/fixtures/loop/README.md +3 -0
  509. package/fixtures/loop/SPEC.md +9 -0
  510. package/fixtures/refusals.ts +434 -0
  511. package/package.json +129 -3
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ InventArch
2
+ Copyright (c) 2026 InventArch contributors
3
+
4
+ Licensed under the Apache License, Version 2.0. See LICENSE.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # @inventarch/compliance
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Pure checks over compiled IA records and graph views. validateSchema supports bootstrap; validateGraphSchema uses admitted active graph relationships. Schema/system admission, fragments, declared coverage, selectors, exact variant ambiguity, check declarations and structural adoption feed evaluate(graph, options), which returns a stable immutable revision report.
4
+
5
+ Supply source diagnostics, discovered system folders and matching-revision kernel/fixture evidence explicitly. Missing observations or adoption clause evaluators produce not-evaluated. Case declarations establish coverage, not execution. Only supplied clause evaluators can establish adoption results. No filesystem I/O, model loop or capability execution occurs here.
6
+
7
+ An optional trusted evaluator catalog (createEvaluatorCatalog, SPEC C25–C29) lets a host register namespaced evaluators for check.runs, resolve adopted obligations (including the strict-typing-v1 profile), validate evidence receipts and decide whether a transition may be admitted. These are pure functions. The host supplies implementations, codecs, predicates, facts, receipts, the minimum receipt trust, a service-receipt verifier and the current time. It owns execution, scheduling and persistence. Calls without a catalog behave exactly as before. The exported Finding code union now also includes EVIDENCE_CODES; those codes are outside the repository fixture gate (SPEC C29).
8
+
9
+ [SPEC.md](SPEC.md) owns interfaces, refusal codes and delivery evidence. The package depends on @inventarch/language and @inventarch/graph. Run pnpm compliance:check at the workspace root to verify the real native corpus, kernel, conformance pairs and refusal-code boundaries. --json emits the report; the command prints unavailable checks and exits unsuccessfully on failed checks.
package/SPEC.md ADDED
@@ -0,0 +1,128 @@
1
+ # Compliance specification
2
+
3
+ Evaluator catalog extension: the producer side of trusted evaluator catalog and obligations is implemented by C25–C29 below (EVAL-01..04, OBL-01..03 including the strict-typing-v1 profile mapping; qualification cases EVAL-Q01, Q02, Q07 and Q08, and the producer side of Q03, in tests/evaluator-catalog.test.ts). It is explicit and optional: calls without a catalog keep the built-in-only behavior, and unknown check.runs ids still refuse. Still open and owned elsewhere: the API transactional controller and managed transition seam (spec §4, LK-06), the ia-apps fixed-to-catalog consumer (LK-05), the consumer-side cases EVAL-Q04–Q06 (late edit/reevaluation, concurrent workers and durable intent, silent agents), the consumer side of EVAL-Q03 (a real compiler evaluator and excluded-source detection), and enrolment of the new codes in the repository fixture gate (C29). No scheduler, execution, persistence or native word is added here.
4
+
5
+ Status: implemented through stage C and the D/R/E integration clauses C21–C23. Task evidence below is chronological; statements of later work within early checkpoints describe that checkpoint only. Shared owners: systems design sections 3–5 and language section 4.3.
6
+
7
+ ## Instance schemas
8
+
9
+ C01. Pure `validateSchema(record, registry, pool)` returns a `COMP-SCHEMA` assessment with outcome pass, fail or not-evaluated and namespaced findings. `pool` contains admitted target occurrences, including the subject where needed. No I/O or parsing occurs here. Callers exclude language-error previews before validation. A separate verdict constructor adds the caller's explicit revision to assessments; no clock-derived revision. Only compliance emits verdicts.
10
+
11
+ C02. Resolve the subject's schema through its registered discriminator. A missing registration/schema or mismatched kind is one failure for that subject and consumes its subordinate checks. The floor's system/schema registrations use their actual native schema declarations when present; absence is not waived by this checker.
12
+
13
+ C03. Require each `must have` section. Under closed, diagnose every unlisted section. Repeated sections form one logical field collection. Cognition and activation are floor-owned and always admitted even under closed; their validity remains language-owned. Head is a virtual field section, never a required body section. Closed applies to keys as well as section names (C04b); open admits any key.
14
+
15
+ C04. For each schema field, use its section and exact key. The current dialect admits exactly section.key with a single-token key; nested paths and schema spelling of multiword keys are not added here. Must fields require a present field. An absent optional section creates no subordinate field obligation. A missing required section consumes missing-field reports beneath it. Validate every occurrence, so one valid duplicate does not mask a wrong-typed duplicate. A declared key whose type is not `list of T` is exactly one field: `must have` means exactly one for non-list types and `may have` at most one. A second occurrence of such a key, counted across repeated sections and in the virtual head section, is FIELD-DUPLICATE, reported once per schema row at the second occurrence's span, while every occurrence is still type-checked and narrowed (C04a). Only a `list of T` key may repeat. Undeclared keys are not counted (D3, work-system design O-6, 2026-09-25); under open they remain admitted, under closed they are FIELD-UNKNOWN (C04b). Missing required field: FIELD-MISSING; bad present value: FIELD-TYPE. One failed value, including a bad list member, yields one finding at the field.
16
+
17
+ C04b. Under `closed`, a declared body section admits only the keys the schema declares for it (D1 / W0-L4, work-system design O-6, 2026-09-25). Every other ordinary field is FIELD-UNKNOWN (error) at its own span, `closed @schema <name> does not declare '<section>.<key>'`; the children of an undeclared block fold into its one finding, `- item` lines are not keys, and W0 narrowing still applies to the declared keys beside it. An ordinary field is a compiled field the compiler left as a field. Exempt, because the language reads them itself: the head (virtual, open); the floor grammar sections `relationships`, `cognition` and `activation` (edges, cells, selectors); a field the compiler consumed as a semantic product, decided by span, namely a governance variant clause (`record.variants`; `readVariants` takes every `governance` field except `severity` and `when`) or a contract requirement clause (`record.requirements`, the `REQ-*` lines); and a `section.key` path listed in the kernel `DIMENSION_PATHS` (today `governance.severity`), which the graph reads as a coordinate. Records of the two floor dialect words `schema` and `system` are exempt whole: their body is the schema/system dialect (`sections.must have`, `fields.may have`, `edges.may`, `closed`), and `@schema schema` is closed with no declared field. The two dialect words and the three grammar sections are the only name-based exemptions; every other carrier is recognised by what the compiler emitted for it.
18
+
19
+ C04a. A field whose schema row carries a W0 narrowing (language L19a) is checked further once its value matches its type, each narrowing yielding at most one finding per field occurrence, list items included: `values` (from `id in [...]`) requires every scalar or quoted text to be a member, compared exactly, else FIELD-VALUE; `target` (from `ref to <word>`) requires every reference's discriminator to equal the word, else FIELD-REF-TARGET, and otherwise, when the caller supplied a reference lookup, warns FIELD-REF-MISSING for a reference no admitted record declares; `form` (from `text form <form>`) requires every text to match the form, else FIELD-FORM. `validateSchema` looks references up in its pool (the subject included) through `resolveTarget` over the candidates sharing the reference's word and name; `validateGraphSchema` looks them up in the admitted graph. An ambiguous target is not missing: identity ties are graph-owned. A narrowed field with no matching value, an absent optional section, or a value that already failed its type raises no narrowing finding.
20
+
21
+ C05. Value semantics (`matchesType`) and text forms (`matchesForm`, C04a): `iso-date` admits exactly `YYYY-MM-DD` where the month is 01–12 and the day exists in that month, leap years by the Gregorian rule; no time, zone or single-digit part. Text admits scalar, string or prose (including empty quoted text); id admits scalar/string matching an ASCII letter followed by letters/digits/hyphens; qname admits scalar/string with exactly four nonempty canonical identity slots (lowercase system/kind/facet/name, closed kind); number admits a finite decimal scalar/string with optional sign, fraction and exponent, no empty/hex/Infinity; ref admits only typed sigil references; flag admits none (a bare key) or scalar true/false. Block is not a flag. `list of T` requires a list and validates every item against T; an empty list is valid because the dialect has no nonempty-list constraint. Type recognition is over compiled values, not lexical matching of IA source.
22
+
23
+ C06. Edge obligations use logical outbound active predicates, including inbound assertions authored on other admitted records. Count distinct (target identity, fragment) pairs; equivalent reciprocal assertions do not inflate cardinality. Match target by closed kind or discriminator. Required one/one-or-more means at least one; one and optional cap at one even for a may row. A required field with type flag is present when its bare key occurs. A must optional row has zero minimum (optional explicitly permits absence). A may one-or-more row permits absence but has no maximum. Unconditional edges can establish a static obligation. Conditioned edges or unresolved/ambiguous targets that could change its answer produce EDGE-UNRESOLVED and not-evaluated unless an independently certain failure already establishes fail. A dangling edge cannot be counted as a pass. This checker does not select a coordinate or execute contracts.
24
+
25
+ C07. Findings use language's location/severity/message shape with IA-COMP codes; stable order is path, line, code, message. Codes: SCHEMA-MISSING, SCHEMA-KIND-MISMATCH, SECTION-MISSING, SECTION-UNKNOWN, FIELD-MISSING, FIELD-UNKNOWN, FIELD-DUPLICATE, FIELD-TYPE, FIELD-VALUE, FIELD-REF-TARGET, FIELD-REF-MISSING, FIELD-FORM, EDGE-CARDINALITY, EDGE-UNRESOLVED. All are errors except EDGE-UNRESOLVED (warning with not-evaluated) and FIELD-REF-MISSING (warning; the assessment still passes, so admission is not blocked by a dangling typed reference). A failed check dominates not-evaluated. Source spans refer to the offending instance; missing structure refers to the containing record or section/block.
26
+
27
+ ## Delivery boundary and evidence
28
+
29
+ Task 1 must cover all C01–C07 branches with native language compilation, plus direct boundary cases where graph admission is the caller's job. Schema validation is the early reusable part of COMP-SCHEMA/COMP-KERNEL. Enrollment, consent, fragments, coverage, adoption, fixtures, steward/bootstrap, scenario execution and a full revision report remain later work and must never be reported as passing by this API.
30
+
31
+ Task 1 evidence: 62 compliance tests (native parse/registry/compile instances and scalar boundary tests), 1001 language tests, workspace typecheck/build and a built-package success/refusal consumer pass. The initial nested-path proposal was removed after native dialect probes; no grammar expansion was made.
32
+
33
+ ## Native system admission (Plan 4 Task 3)
34
+
35
+ C08. `validateSystems(folders, registry, pool)` is pure. A folder supplies its canonical relative path, name, parsed sources and admitted compiled records. The host supplies all discovered folders, including empty ones. Each must contain exactly one system declaration, located at its direct system.ia with the same name. A malformed folder receives SYSTEM-MALFORMED once and consumes its subordinate ownership/steward checks. Parser/registry faults remain owned by language; the host excludes their previews before this check.
36
+
37
+ C09. Every admitted record in a valid folder uses the folder's own registered word, a word from a directly required system, or a fixed floor word. Floor system/schema are always visible and need no extra requires item. Unregistered words remain language-owned. A foreign registered word yields DISCRIMINATOR-FOREIGN at that record. Nested records are independent subjects. Full resolved dependency order must place each declared requirement before its dependent; a missing registration/system remains language-owned. BOOTSTRAP-ORDER diagnoses a supplied inconsistent order, not a separate hardcoded sorting policy.
38
+
39
+ C10. A steward reference must be @agent, resolve to exactly one admitted agent occurrence inside that folder, and have an unconditioned governance.applies whose value is a list of discriminator ids including every word minted there. Missing/ambiguous/wrong-kind/foreign steward or missing applies coverage yields one STEWARD-MISSING per system naming missing coverage. This list is an ownership declaration, not execution permission. Agent-system self-steward is admitted; other folders require agent-system directly. The kernel is not a system folder and has its separate exemption.
40
+
41
+ C11. Each active registration's word must occur on either side of at least one consent row, with wildcard matching; absence yields CONSENT-EMPTY warning and does not invalidate structural admission. Each visible schema is enrolled by exactly one active registration, counting fixed floor registrations. Zero yields SCHEMA-UNREFERENCED; more than one yields SCHEMA-MULTIPLE. Independent warning evidence can coexist with pass; only an unavailable evaluation is not-evaluated. Assessments returned are COMP-SYSTEM, COMP-STEWARD, COMP-BOOTSTRAP, COMP-SCHEMA-ENROLLED and COMP-CONSENT-DECLARED. Actual edge consent remains a separate check.
42
+
43
+ C12. Native systems own README/SPEC next to their records. The first five and their record closure must compile and pass instance/admission checks without substitute TypeScript providers. Their stewards and methods are authored roles/procedures; this task does not launch agents, execute scenarios or install a hook. Success/refusal mutation tests must use the real floor/system sources. Native sources are authored, not generated from legacy catalogs.
44
+
45
+ Task 3 evidence: native system admission is exported and consumed by pnpm native:check. The five-system closure has 153 records and 170 passing structural assessments. Nineteen native mutation/connection tests cover C08-C12, alongside 62 schema tests and 21 kernel tests; the language suite remains 1001 passing tests. Typecheck/build pass. No scenario engine or host execution is claimed.
46
+
47
+ ## Full graph and revision checks (stage C)
48
+
49
+ C13. The full suite consumes an immutable Graph and explicit source diagnostics/folder descriptions. Its registry is graph.registry, and graph winners alone supply semantic subjects. A report retains verdicts keyed by check/scope with graph.revision and a stable aggregate outcome (fail dominates not-evaluated, which dominates pass). Language and graph findings retain their original codes, spans and severity; no second wrapper finding repeats the same fault. Findings sort by path, line, code and message. Exposed results are immutable snapshots. Source diagnostics are supplied explicitly, so absence of source evaluation evidence is not a parse pass.
50
+
51
+ C14. Full graph schema validation shares C02-C05 field rules but counts admitted graph active edges under C06. Late-resolved edges count, rejected-consent edges do not. A graph-owned edge refusal leaves the dependent predicate obligation not-evaluated without a second absence diagnostic. Fragment cardinality keys use the endpoint the fragment actually addresses. Unresolved/conditioned edges retain uncertainty; do not count a condition as unconditional satisfaction. The early validateSchema(record,registry,pool) API remains for bootstrap without a graph.
52
+
53
+ C15. COMP-FRAGMENT checks resolved references on every graph edge: phase/Primitive must name an existing target cell and a requirement fragment must name an existing target requirement. Use fragmentEndpoint after inverse normalization. A missing target remains graph-owned; no duplicate missing-fragment error is added. Invalid resolved fragment: FRAGMENT-MISSING. Coverage accepts unconditional active implement edges from a case to a contract requirement, using active direction; the fragment must address the contract endpoint rather than an inverse assertion's case endpoint. Every contract requirement needs a declared case; each contract needs a success case and a failure or refusal case. Conditional/dangling edges cannot establish that static coverage. COVERAGE-MISSING names uncovered requirements; COVERAGE-KIND names missing case classes when requirement coverage itself is complete; uncovered requirements consume subordinate case-class reports. Coverage does not execute cases or satisfy adoption.
54
+
55
+ C16. COMP-CONSENT and COMP-IDENTITY retain graph-owned refusal findings and report unresolved relationships as not-evaluated where consent cannot be determined. Shadowing is retained as report evidence, not a tie error. COMP-SELECTOR checks compiled terms against closed language axes/values; invalid caller-supplied products cannot establish a pass. COMP-PARSE consumes supplied language diagnostics; a missing set of observations is not-evaluated. COMP-CHECK validates each check.runs id against the implemented inventory; malformed/missing/unknown ids produce CHECK-UNKNOWN once per declaration. Check declarations do not turn a check on or supply execution evidence.
56
+
57
+ C17. COMP-VARIANT performs exact finite satisfiability per record/key family. Search equal-specificity pairs for overlap not covered by higher-specificity clauses, with absent routing axes included and dimensions read as graph G08. One witness per ambiguous family produces VARIANT-AMBIGUOUS at the first conflicting clause and names the competing source lines and canonical request coordinate. No arbitrary domain-product bound or cutoff; prune impossible/dominated regions. A lower tie covered at every coordinate by stronger clauses is valid. An unconditional family can tie at a coordinate with omitted axes even when every fully supplied coordinate has a stronger clause.
58
+
59
+ C18. COMP-ADOPTION concerns each admitted active require relationship from an adopter to an @contract. Resolve its requirement clauses using their conditions only when an explicit coordinate is supplied; otherwise a conditional clause remains not-evaluated. Evaluators are supplied explicitly by contract identity and requirement id, receive the graph/adopter/contract/requirement and return pass/fail/not-evaluated plus explanatory text. Missing evaluators and thrown evaluator errors are not-evaluated with named evidence; a reported violation is ADOPTION-FAILED. This is structural verification only, not a code interpreter or permission to execute capability effects. No requirements is not proof of an authored contract; language owns contract shape.
60
+
61
+ C18 repository consumer: [tools/compliance](../../tools/compliance/SPEC.md#foundation-authoring-adoption) supplies the three foundation-authoring callbacks from actually executed native source scenarios. That adapter checks source revision, adopter and view before using observations, retains missing/stale evidence as not-evaluated, and reports observed violations as failures. This is explicit host registration, not a package default. Database/runtime reports without callbacks remain not-evaluated, and declaration-only COMP-COVERAGE never satisfies COMP-ADOPTION.
62
+
63
+ C19. COMP-KERNEL and COMP-FIXTURES require caller-supplied matching-revision assessments from actual verification. No supplied result or a stale result produces NOT-EVALUATED. A pure language-fixture runner can consume source and expected products/diagnostics/format companions without reading files; tools discover fixtures and record observed results. Every named refusal must have a tested failing case; unavailable fixture coverage stays explicit. General prose scenario execution remains outside this stage.
64
+
65
+ C20. Public checks use IA-COMP-FRAGMENT-MISSING, COVERAGE-MISSING, COVERAGE-KIND, SELECTOR-INVALID, CHECK-UNKNOWN, VARIANT-AMBIGUOUS, ADOPTION-FAILED, NOT-EVALUATED and FIXTURE-MISMATCH in addition to C07/C11. NOT-EVALUATED is warning evidence that changes the outcome; warning consent-empty/shadow evidence does not fail an otherwise completed check. Source parse/graph codes remain namespaced by their owners. Every implementation delivery records full-suite, negative/native and built-consumer evidence here.
66
+
67
+ Stage C Task1 delivered: graph schema/fragment/coverage, selector/check-id/source/consent/identity checks and immutable assessments. Native 153-node closure passes these checks. Thirteen graph-check tests cover removed cases, conditional coverage, missing targets/fragments, inverse cell fragments, late resolution, source-code preservation, malformed selectors/runners and consent-refusal diagnostic consumption. Full suite: 1453 tests/48files; typecheck/build/kernel/dependency pass. Exact variant ambiguity, adoption and assembled revision reports remain next.
68
+
69
+ Stage C Task2 delivered: exact finite ambiguity with witness coordinates and explicit structural adoption evaluators. Thirteen new tests include 128 bounded families compared against exhaustive graph-query evaluation, partial/full domination, missing axes, fixed dimensions, a nine-axis family, absent/throwing/failed evaluators and conditional/unresolved adoption. 88 compliance tests; 1466 workspace tests/49files, typecheck/build/kernel/dependencies pass. Native declarations alone intentionally leave adoption not-evaluated. Full revision reports and executable fixture evidence remain next.
70
+
71
+ Stage C Tasks3/acceptance delivered: evaluate produces immutable revision reports, preserving originating codes, graph dimension refusals and shadows. Provisional compile missing-target warnings are replaced by graph resolution for the same assertion. Reports restrict folder semantic checks to graph winners. The pure fixture runner consumes supplied source/companions; tools/compliance reads the real tree, verifies generated kernel bytes and executes 176 language plus 34 boundary fixtures covering every current language/graph/compliance code. The native report has 485 verdicts: 484 pass and one adoption not-evaluated without clause evaluators. No executed prose scenarios are claimed.
72
+
73
+ Verified 1472 tests/51files (1241 language,92 graph,92 compliance,47 tools), typecheck/build/native/kernel/dependency checks and built-package runtime/declaration consumer. Compliance stage C is delivered; database admission/publication, runtime packets and specialized execution retain their next-plan owners.
74
+
75
+ C21 (database admission integration). The report assembler may receive prior failed/unavailable admission assessments for subjects subsequently removed from its graph. Retain those observations, coalescing a repeated check/scope at the worst outcome and deduplicating findings. Do not retain earlier candidate-only passes as final evidence. This lets db publish an admitted subset while the compliance report still names refused source subjects. Coverage and adoption are evaluated on the final graph.
76
+
77
+ C21 delivered with database Task2: report options accept prior non-pass admission observations, coalesce identical check/scope at the worst outcome and deduplicate findings. Candidate-only passes are ignored. The regression test retains removed-subject evidence without duplicate verdicts.
78
+
79
+ C22. renderHostArtifacts projects admitted systems and their steward declarations into language-reference host artifacts. It validates revision-bound membership and unique host-safe identities. No named authoring procedure or expert methodology is required.
80
+
81
+ C23. Stage E projections additionally cite and render unconditional cells of the steward's domain playbooks, in stable identity order. Since plan 2026-09-24 §0.1 these are the playbooks the steward `uses` plus those its profile's capabilities list, not every playbook physically in the steward folder; tools/projections/SPEC.md P05-P10 own the steward composition, block-clause and host-table rules. This exposes specialised operation methods without replacing the shared24-cell method. Conditional instructions are not silently rendered as unconditional.
82
+
83
+ C24 (PT1 source subset). `renderHostArtifacts(records, revision, membership?)` accepts optional `ProjectionMembership`: the matching revision and unique `{path, system, root}` observations for every source path in the supplied admitted view, with both system/root null outside physical system folders. The composition root obtains these through public db `systemMember`; compliance never imports db or resolves source mounts. Validate observations against supplied records, canonical relative paths, direct declaration location and unique system/steward occurrences. Associate admitted project contributions by logical system membership across physical roots; retain exact adopted citations and mark adopted definitions immutable. Missing/stale/conflicting observations or required scope-excluded records refuse with the existing single projection diagnostic and no partial output. The two-argument compatibility form supports only the existing authored local layout; adopted callers supply observations. Equal local inputs preserve artifact bytes. This does not implement resource loading, arbitrary plugin compilation or installed-generation admission.
84
+
85
+ ## Trusted evaluator catalog, obligations and evidence (spec-0007 producer)
86
+
87
+ C25 (catalog v1, EVAL-01). Pure `createEvaluatorCatalog({format, entries}, {codecs, builtins?})`. The top level must be exactly `{format, entries}` with format `ia-evaluator-catalog/1.<minor>`; an unknown key (e.g. `revocations`), another major or another shape is CATALOG-VERSION. Minor-version handling: any minor of major 1 is accepted, but every entry must use exactly the v1 fields, so a later minor that adds behavior is refused rather than silently ignored; the declared format, minor included, is part of the digest. An entry has exactly id, contractVersion, implementationVersion, implementationDigest, inputSchemaId, outputSchemaId, supportedScopes, effects, environmentProfile, limits, evidencePolicy and availability; an unknown or missing field is CATALOG-ENTRY-INVALID. The id is a lowercase namespaced `id` (at least one hyphen, e.g. `acme-strict-typing`) so it stays a valid native `check.runs` value. Only CHECK_IDS are built in (D4). `options.builtins` lists host-reserved ids (validated as `A-Z`/`a-z` ids, otherwise TypeError); an entry id equal case-insensitively to a CHECK_IDS or reserved id, or in the reserved `comp` namespace, is CATALOG-BUILTIN-OVERRIDE. Reserved ids are recorded as `catalog.reserved`; they never pass COMP-CHECK and never resolve as evaluators. Versions are MAJOR.MINOR.PATCH; a contractVersion major outside EVALUATOR_CONTRACT_MAJORS (1) is CATALOG-VERSION. implementationDigest is `sha256:<64 hex>`. inputSchemaId/outputSchemaId are `name@major` ids that must be in the host codec registry, otherwise CATALOG-CODEC-UNKNOWN; a codec is trusted host code with `validate` and an optional `normalize`. supportedScopes (nonempty) and effects are unique ids. environmentProfile is `{id, credentials: none | scoped}`; ambient credentials are not expressible. limits require positive safe-integer timeoutMs, memoryBytes, outputBytes and concurrency (CATALOG-LIMITS). evidencePolicy is `{kind: fresh-run}` or `{kind: reusable, maxAgeMs, environmentSensitive}`. availability is `{status: supported}` or `{status: unavailable | revoked, reason}` with a printable single-line reason of at most 200 characters and no credential assignment. A repeated id@implementationVersion is CATALOG-DUPLICATE when the digests agree and CATALOG-DIGEST-CONFLICT when they differ; more than one supported version of one id is CATALOG-DUPLICATE. Findings carry the 1-based input index of the offending entry. Any finding refuses the whole catalog with no partial result. The accepted catalog is deeply frozen, entries sorted by id and version, with digest `sha256` of the canonical serialization of the format, entries, built-in and reserved ids; equal inputs in any entry order give equal digests. Only objects returned by this constructor are accepted by the functions below (`isEvaluatorCatalog`); a copied or hand-built object is a TypeError.
88
+
89
+ C26 (check.runs with a catalog, EVAL-02, EVAL-Q01/Q02). `validateCheck(node, catalog?)` and `evaluate(graph, {catalog})`. Without a catalog the result is byte-identical to C16. With one, a CHECK_IDS id passes as before; otherwise `selectEvaluator` picks the id's supported entry, else its highest listed version. Supported passes. Revoked is EVALUATOR-REVOKED, a blocking error. Unavailable is an EVALUATOR-UNAVAILABLE warning and the assessment is not-evaluated (D5): an unavailable evaluator does not refute the declaration, and blocking belongs to admission of a required obligation, while an optional one stays visibly unevaluated (EVAL-02). An id in neither set, including a host-reserved id, is still CHECK-UNKNOWN. Native `check.runs` records and schemas are unchanged. Catalog text never names a callback, command or path: `bindEvaluators(catalog, implementations)` associates trusted host implementations keyed `${id}@${implementationDigest}`, and any key naming an unknown, substituted, unavailable or revoked implementation is EVALUATOR-SUBSTITUTED and refuses the whole binding. The host must bind before invoking; binding invokes nothing, and admission independently checks each receipt's evaluator id, version and digest against the catalog (C28).
90
+
91
+ C27 (obligation resolution, OBL-01..03, EVAL-02). Pure `resolveObligations(input)` takes the subject, policy revision, catalog, the catalog digest the policy pins, captured scope facts (JSON data), the root adoption set, the selected law/contract/check occurrences (identity, word, adoption, requirement fragment, runs, provenance `{path, line}`, optional applicability predicate id, required flag and JSON input), trusted versioned applicability predicates (`name@version`) and package metadata directives. It returns a deeply frozen resolution sorted by `obligationId` (`obl:` sha256 of subject, occurrence, requirement and runs), each with subject, requirement, provenance (path, line, adoption, source), applicability, required, evaluator identity (built-ins use version `builtin`, digest `builtin:<id>` and fresh-run evidence), `inputDigest` and evidence policy. The input must be JSON data and must satisfy the evaluator's input codec; the digest covers the codec-normalized value, so equivalent inputs share a digest. Predicates receive a deeply frozen copy of the facts, never the caller's object. Applicability is applicable, not-applicable or undetermined. not-applicable always carries resolver evidence: `basis: predicate` with the predicate id@version, or `basis: package-metadata` with the directive source. A missing, throwing or malformed predicate is undetermined with a fixed message that never echoes predicate output. Undetermined required applicability is OBLIGATION-UNDETERMINED (blocking). OBLIGATION-UNRESOLVED covers: a malformed occurrence (missing provenance included) or adoption; an adoption or runs id that does not resolve (a reserved id never resolves, D4); an input that is not JSON or fails its codec; a package directive that is malformed (the action set is closed to `optional` and `disable`, and the source must be sanitized) or names no selected obligation (M3). OBLIGATION-CONFLICT covers a pinned catalog digest that differs, one adoption declared with conflicting source or mandatory status, and one obligation selected twice with different content. Either refuses with status `refused` and no obligations. A root-adopted mandatory obligation is always required. Package metadata never changes any root-adopted obligation, whether the root made it required, optional or mandatory: the directive is ignored with an OBLIGATION-WEAKENED warning (D1; spec-0007 OBL-01, source precedence cannot silently weaken root requirements). Metadata may relax or disable package-adopted obligations only. Every resolution carries `digest = resolutionDigest(content)` over its canonical content, which includes the catalog digest and policy revision, and is recorded as issued by this module (D2). `inspectObligations(input)` returns the same selection as rows with support (builtin, supported, unavailable, revoked or unknown), versions, applicability and required flag, including unresolved rows, and never calls an evaluator. Predicates and codecs are the only host code called.
92
+
93
+ C28 (receipts and admission, EVAL-03/04, EVAL-Q07/Q08). Receipt format `ia-evidence-receipt/1` has exactly format, receiptId, attemptId, obligationId, subject, inputDigest, digests {candidate, native, code, policy, dependency}, environment {id, toolchain}, evaluator {id, implementationVersion, implementationDigest}, catalogDigest, policyRevision, observedAt, completedAt, result (passed, failed, unavailable, error, cancelled, not-evaluated, not-applicable), evidenceDigest, issuer and trust (local-unsigned or service-associated). Text fields, receiptId and issuer included, must be sanitized single-line text. `validateReceipt(receipt, expectation, now)` takes an explicit ISO-8601 UTC `now`; it and every receipt time must be a real calendar instant (round-trip checked, so 2026-02-30 is invalid). The checks run in this order:
94
+ - shape and time order: RECEIPT-INVALID
95
+ - obligation and subject: RECEIPT-SUBJECT
96
+ - evaluator known to the catalog with the same digest: RECEIPT-EVALUATOR
97
+ - evaluator not revoked: RECEIPT-REVOKED
98
+ - evaluator equal to the obligation's evaluator: RECEIPT-EVALUATOR
99
+ - code digest: RECEIPT-CODE
100
+ - toolchain: RECEIPT-TOOLCHAIN
101
+ - trust: RECEIPT-UNTRUSTED (D3). Trust is never self-asserted. A service-associated receipt counts only when the host passed an explicit `verifyServiceReceipt` callback that returns true for a frozen copy of it; the issuer string alone never elevates trust. `minimumTrust` is required, with no default: `service-associated` refuses local receipts.
102
+ - candidate, native, policy, dependency and input digests, policy revision, catalog digest and, for fresh-run or environment-sensitive policy, environment id: RECEIPT-STALE
103
+ - fresh-run attempt identity: RECEIPT-FRESH-RUN
104
+ - reusable maximum age: RECEIPT-EXPIRED
105
+
106
+ `evidenceKey` is the EVAL-04 deduplication key over candidate, obligation, evaluator, policy revision and digest, the environment `{id, toolchain}` (toolchain only when environment-insensitive; no other fields) and, for fresh-run, the attempt.
107
+
108
+ `acceptEvaluatorOutput(catalog, obligation, observation, {secrets?})` never throws for evaluator output. It maps a host observation to a result:
109
+ - unsupported evaluators are `unavailable`;
110
+ - timeouts, crashes, a missing or oversized byte length, output that is not JSON data (a Date, Map, function, cycle or non-finite number), an envelope other than `{result: passed | failed, evidence, diagnostics?}`, a hostile object that throws on read, and codec rejection or throw are all `error`, with EVALUATOR-OUTPUT-INVALID and fixed messages.
111
+
112
+ Failed diagnostics are sliced to 20 entries before filtering, and each line is redacted and then truncated to 240 characters. Redaction runs in this order: control characters are normalized to spaces (in the lines and in the supplied secrets, M2), then supplied secret values, bearer tokens, quoted keys (`"password":"x"`), `KEY=value` or `KEY: value` where the key contains token, secret, password, passwd, api_key, credential, auth or private_key as a substring (e.g. `GITHUB_TOKEN=`, `AWS_SECRET_ACCESS_KEY=`), and `key 'value'` forms are replaced by `[redacted]`. A built-in obligation is a TypeError there. `adaptBuiltinVerdict(obligation, verdict?)` maps a built-in verdict to the envelope: pass is passed, fail is failed, not-evaluated or absent is not-evaluated (spec §5 preserves unevaluated built-in outcomes).
113
+
114
+ `admitTransition(resolution, receipts, context, now)` first verifies the resolution (D2): its digest must recompute from its content, and it must either be resolver-issued in this process (the frozen, branded object) or match `context.expectedResolutionDigest` pinned by the host. Every obligation must be structurally sound: the id recomputes; built-in evaluators are CHECK_IDS with the built-in digest; catalog evaluators match the catalog's id, version, digest, contract version and evidence policy; not-applicable carries predicate or package-metadata evidence and never package-metadata on a root adoption. Otherwise the decision is OBLIGATION-UNVERIFIED and not admitted. The digest is an integrity check, not authentication: a resolution that crosses a trust boundary must have its digest pinned by the host. Admission then requires the same catalog and policy, and that every required applicable obligation has a valid passed receipt of at least `minimumTrust` as its latest valid result (a same-time non-pass wins). The following block a required obligation:
115
+ - failed (OBLIGATION-FAILED);
116
+ - unavailable, error, cancelled, not-evaluated, evaluator-claimed not-applicable, or missing or invalid evidence (OBLIGATION-BLOCKED);
117
+ - undetermined applicability;
118
+ - an unavailable or revoked evaluator.
119
+
120
+ Resolver not-applicable with evidence does not block. An optional obligation never blocks and is reported as `optional-unevaluated`, or `optional-failed` when its latest valid receipt failed. Each decision records the trust of the receipt it relied on, and the transition records `minimumTrust` and `reliedTrust` (the weakest trust among satisfying receipts, or none). A local unsigned receipt is a local diagnostic. None of these functions reads files, a clock or the network, schedules or executes anything, or persists receipts.
121
+
122
+ C29 (evaluation profiles, OBL-02; facilitator decision D6). `EVALUATION_PROFILES['strict-typing-v1']` is the consumer contract id mapping to three requirements: `configuration`, `included-file-coverage` and `compiler-run`. `profileOccurrences('strict-typing-v1', binding)` expands one selected law or contract occurrence into three required occurrences with requirements `strict-typing-v1/<name>`, each discharged by a host catalog evaluator named in the binding. A built-in id, a non-catalog id, an unknown profile or a missing or extra mapping is a TypeError. The profile is not a native word. Declarations, native cases and check records never become results by presence: the three obligations are admitted only with valid passed receipts, so a real compiler run requires an installed evaluator and its receipt.
123
+
124
+ Facilitator decisions recorded for LK-04 repair (2026-09-28): D1 package metadata never weakens a root-adopted obligation (C27); D2 admission is bound to a verified resolver-issued resolution (C27, C28); D3 service trust needs a host verifier, `minimumTrust` is required and trust is recorded (C28); D4 only CHECK_IDS are built in, `options.builtins` only reserves ids (C25, C26); D5 COMP-CHECK treats revoked as an error and unavailable as not-evaluated (C26); D6 the strict-typing-v1 producer mapping belongs to this package (C29).
125
+
126
+ Public type note: `Finding['code']` now also admits `EvidenceCode`, an additive widening of the exported union; consumers that switch exhaustively over `Finding['code']` must handle the new codes. C25–C29 codes are exported as `EVIDENCE_CODES`, separate from COMP_CODES. They are outside the repository fixture gate: tools/compliance/check.ts requires a boundary fixture for every COMP_CODES code, and tools/compliance/check.test.ts pins the boundary count. Open follow-up (repository-tool owner): enrol EVIDENCE_CODES there with boundary fixtures, and qualify the coverage claim beside tools/compliance/check.ts:63, which today covers COMP_CODES only. Their refusals are covered by tests/evaluator-catalog.test.ts.
127
+
128
+ LK-04 delivered (2026-09-28): C25–C28 with 23 tests. LK-04 repair (2026-09-28) added D1–D6, the M2/M3 fixes and C29, bringing tests/evaluator-catalog.test.ts to 35 tests. They cover EVAL-Q01, Q02, Q07, Q08, the producer side of Q03, OBL-01..03 and each catalog, binding, resolution, receipt and admission refusal, plus a byte-identical report regression without a catalog. The pre-change report digests on the native corpus (with and without supplied observations) were unchanged after the original change and after the repair.
@@ -0,0 +1,18 @@
1
+ import type { Requirement } from '@inventarch/language';
2
+ import type { Coordinate, Graph, Node } from '@inventarch/graph';
3
+ import type { Assessment } from './types.js';
4
+ export interface ClauseContext {
5
+ readonly graph: Graph;
6
+ readonly adopter: Node;
7
+ readonly contract: Node;
8
+ readonly requirement: Requirement;
9
+ readonly coordinate?: Coordinate;
10
+ }
11
+ export interface ClauseResult {
12
+ readonly outcome: Assessment['outcome'];
13
+ readonly message: string;
14
+ }
15
+ export type ClauseEvaluator = (context: ClauseContext) => ClauseResult;
16
+ export type AdoptionEvaluators = ReadonlyMap<string, ReadonlyMap<string, ClauseEvaluator>>;
17
+ export declare function validateAdoption(graph: Graph, evaluators?: AdoptionEvaluators, input?: Coordinate): readonly Assessment[];
18
+ //# sourceMappingURL=adoption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adoption.d.ts","sourceRoot":"","sources":["../src/adoption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGjE,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,YAAY,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CAClC;AACD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,YAAY,CAAC;AACvE,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;AAC3F,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,EACZ,UAAU,GAAE,kBAA8B,EAC1C,KAAK,CAAC,EAAE,UAAU,GACjB,SAAS,UAAU,EAAE,CAwGvB"}
@@ -0,0 +1,76 @@
1
+ import { conditionHolds, validateCoordinate } from '@inventarch/graph';
2
+ import { finding } from './graph-checks.js';
3
+ import { assess } from './types.js';
4
+ export function validateAdoption(graph, evaluators = new Map(), input) {
5
+ const coordinate = input === undefined ? undefined : validateCoordinate(input), assessments = [];
6
+ for (const adopter of graph.nodes.values()) {
7
+ const adoptions = graph.out.get(adopter.identity)?.get('require') ?? [];
8
+ // Several assertions of one adoption cannot execute a clause twice.
9
+ const byContract = new Map();
10
+ for (const edge of adoptions) {
11
+ if (edge.to === null) {
12
+ const registration = graph.registry.registrations.get('contract');
13
+ const refersToContract = edge.reference.kind === 'ref'
14
+ ? edge.reference.discriminator === 'contract'
15
+ : registration !== undefined &&
16
+ edge.reference.identity.startsWith(`${registration.system}/${registration.kind}/`) &&
17
+ registration.facets.includes(edge.reference.identity.split('/')[2] ?? '');
18
+ if (refersToContract)
19
+ assessments.push(assess('COMP-ADOPTION', `${adopter.identity}->${edge.reference.kind === 'ref' ? `@contract ${edge.reference.name}` : edge.reference.identity}`, [], true));
20
+ continue; // graph consent assessment retains the missing-target finding
21
+ }
22
+ if (graph.nodes.get(edge.to)?.discriminator !== 'contract')
23
+ continue;
24
+ const edges = byContract.get(edge.to) ?? [];
25
+ byContract.set(edge.to, [...edges, edge]);
26
+ }
27
+ for (const [identity, edges] of byContract) {
28
+ const contract = graph.nodes.get(identity), findings = [];
29
+ const active = edges.some((edge) => edge.condition === undefined ||
30
+ (coordinate !== undefined &&
31
+ conditionHolds(edge.condition, graph.nodes.get(edge.conditionSubject).dimensions, coordinate)));
32
+ if (!active) {
33
+ if (coordinate === undefined)
34
+ findings.push(finding('IA-COMP-NOT-EVALUATED', adopter, `Conditional adoption of ${identity} needs an explicit coordinate`, edges[0].source.line, true));
35
+ else
36
+ continue; // this coordinate does not adopt the contract
37
+ }
38
+ else
39
+ for (const requirement of contract.requirements) {
40
+ if (requirement.condition !== undefined && coordinate === undefined) {
41
+ findings.push(finding('IA-COMP-NOT-EVALUATED', adopter, `${identity}#${requirement.id}: conditional clause needs an explicit coordinate`, edges[0].source.line, true));
42
+ continue;
43
+ }
44
+ if (coordinate !== undefined && !conditionHolds(requirement.condition, contract.dimensions, coordinate))
45
+ continue;
46
+ const evaluator = evaluators.get(identity)?.get(requirement.id);
47
+ let result;
48
+ if (evaluator === undefined)
49
+ result = { outcome: 'not-evaluated', message: 'No structural evaluator is supplied' };
50
+ else
51
+ try {
52
+ result = evaluator({
53
+ graph,
54
+ adopter,
55
+ contract,
56
+ requirement,
57
+ ...(coordinate === undefined ? {} : { coordinate }),
58
+ });
59
+ if (!['pass', 'fail', 'not-evaluated'].includes(result.outcome) || typeof result.message !== 'string')
60
+ throw new Error('Invalid evaluator result');
61
+ }
62
+ catch (error) {
63
+ result = {
64
+ outcome: 'not-evaluated',
65
+ message: `Evaluator unavailable: ${error instanceof Error ? error.message : String(error)}`,
66
+ };
67
+ }
68
+ if (result.outcome !== 'pass')
69
+ findings.push(finding(result.outcome === 'fail' ? 'IA-COMP-ADOPTION-FAILED' : 'IA-COMP-NOT-EVALUATED', adopter, `${identity}#${requirement.id}: ${result.message}`, edges[0].source.line, result.outcome !== 'fail'));
70
+ }
71
+ assessments.push(assess('COMP-ADOPTION', `${adopter.identity}->${identity}`, findings));
72
+ }
73
+ }
74
+ return Object.freeze(assessments.sort((a, b) => (a.scope < b.scope ? -1 : a.scope > b.scope ? 1 : 0)));
75
+ }
76
+ //# sourceMappingURL=adoption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adoption.js","sourceRoot":"","sources":["../src/adoption.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAgBpC,MAAM,UAAU,gBAAgB,CAC9B,KAAY,EACZ,aAAiC,IAAI,GAAG,EAAE,EAC1C,KAAkB;IAElB,MAAM,UAAU,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAC5E,WAAW,GAAiB,EAAE,CAAC;IACjC,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;QAC3C,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACxE,oEAAoE;QACpE,MAAM,UAAU,GAAG,IAAI,GAAG,EAA4B,CAAC;QACvD,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;YAC7B,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;gBACrB,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAClE,MAAM,gBAAgB,GACpB,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,KAAK;oBAC3B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,KAAK,UAAU;oBAC7C,CAAC,CAAC,YAAY,KAAK,SAAS;wBAC1B,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,MAAM,IAAI,YAAY,CAAC,IAAI,GAAG,CAAC;wBAClF,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAChF,IAAI,gBAAgB;oBAClB,WAAW,CAAC,IAAI,CACd,MAAM,CACJ,eAAe,EACf,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EACtH,EAAE,EACF,IAAI,CACL,CACF,CAAC;gBACJ,SAAS,CAAC,8DAA8D;YAC1E,CAAC;YACD,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,aAAa,KAAK,UAAU;gBAAE,SAAS;YACrE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC5C,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;QAC5C,CAAC;QACD,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,UAAU,EAAE,CAAC;YAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAE,EACzC,QAAQ,GAAc,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CACvB,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,SAAS,KAAK,SAAS;gBAC5B,CAAC,UAAU,KAAK,SAAS;oBACvB,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CACpG,CAAC;YACF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,IAAI,UAAU,KAAK,SAAS;oBAC1B,QAAQ,CAAC,IAAI,CACX,OAAO,CACL,uBAAuB,EACvB,OAAO,EACP,2BAA2B,QAAQ,+BAA+B,EAClE,KAAK,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,IAAI,EACrB,IAAI,CACL,CACF,CAAC;;oBACC,SAAS,CAAC,8CAA8C;YAC/D,CAAC;;gBACC,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;oBAChD,IAAI,WAAW,CAAC,SAAS,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;wBACpE,QAAQ,CAAC,IAAI,CACX,OAAO,CACL,uBAAuB,EACvB,OAAO,EACP,GAAG,QAAQ,IAAI,WAAW,CAAC,EAAE,mDAAmD,EAChF,KAAK,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,IAAI,EACrB,IAAI,CACL,CACF,CAAC;wBACF,SAAS;oBACX,CAAC;oBACD,IAAI,UAAU,KAAK,SAAS,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;wBACrG,SAAS;oBACX,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;oBAChE,IAAI,MAAoB,CAAC;oBACzB,IAAI,SAAS,KAAK,SAAS;wBACzB,MAAM,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,qCAAqC,EAAE,CAAC;;wBAEtF,IAAI,CAAC;4BACH,MAAM,GAAG,SAAS,CAAC;gCACjB,KAAK;gCACL,OAAO;gCACP,QAAQ;gCACR,WAAW;gCACX,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;6BACpD,CAAC,CAAC;4BACH,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ;gCACnG,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;wBAChD,CAAC;wBAAC,OAAO,KAAK,EAAE,CAAC;4BACf,MAAM,GAAG;gCACP,OAAO,EAAE,eAAe;gCACxB,OAAO,EAAE,0BAA0B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;6BAC5F,CAAC;wBACJ,CAAC;oBACH,IAAI,MAAM,CAAC,OAAO,KAAK,MAAM;wBAC3B,QAAQ,CAAC,IAAI,CACX,OAAO,CACL,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,uBAAuB,EAC/E,OAAO,EACP,GAAG,QAAQ,IAAI,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC,OAAO,EAAE,EAClD,KAAK,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,IAAI,EACrB,MAAM,CAAC,OAAO,KAAK,MAAM,CAC1B,CACF,CAAC;gBACN,CAAC;YACH,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC1F,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzG,CAAC"}
@@ -0,0 +1,112 @@
1
+ import type { Assessment } from './types.js';
2
+ /**
3
+ * Current catalog format (C25). Any minor of major 1 is accepted but must use exactly the v1 fields, so a minor
4
+ * that adds behavior is refused rather than ignored; the declared minor is part of the catalog digest.
5
+ */
6
+ export declare const EVALUATOR_CATALOG_FORMAT = "ia-evaluator-catalog/1.0";
7
+ /** Evaluator invocation-contract majors this package understands. */
8
+ export declare const EVALUATOR_CONTRACT_MAJORS: readonly [1];
9
+ export interface EvaluatorLimits {
10
+ readonly timeoutMs: number;
11
+ readonly memoryBytes: number;
12
+ readonly outputBytes: number;
13
+ readonly concurrency: number;
14
+ }
15
+ export type EvidencePolicy = {
16
+ readonly kind: 'fresh-run';
17
+ } | {
18
+ readonly kind: 'reusable';
19
+ readonly maxAgeMs: number;
20
+ readonly environmentSensitive: boolean;
21
+ };
22
+ export type EvaluatorAvailability = {
23
+ readonly status: 'supported';
24
+ } | {
25
+ readonly status: 'unavailable' | 'revoked';
26
+ readonly reason: string;
27
+ };
28
+ export interface EnvironmentProfile {
29
+ readonly id: string;
30
+ readonly credentials: 'none' | 'scoped';
31
+ }
32
+ export interface EvaluatorEntry {
33
+ readonly id: string;
34
+ readonly contractVersion: string;
35
+ readonly implementationVersion: string;
36
+ readonly implementationDigest: string;
37
+ readonly inputSchemaId: string;
38
+ readonly outputSchemaId: string;
39
+ readonly supportedScopes: readonly string[];
40
+ readonly effects: readonly string[];
41
+ readonly environmentProfile: EnvironmentProfile;
42
+ readonly limits: EvaluatorLimits;
43
+ readonly evidencePolicy: EvidencePolicy;
44
+ readonly availability: EvaluatorAvailability;
45
+ }
46
+ /**
47
+ * A host-registered codec. `validate` and optional `normalize` are trusted host code; they never come from catalog
48
+ * text. The input codec validates and normalizes obligation inputs (C27); the output codec validates evidence (C28).
49
+ */
50
+ export interface EvaluatorCodec {
51
+ readonly id: string;
52
+ readonly validate: (value: unknown) => boolean;
53
+ readonly normalize?: (value: unknown) => unknown;
54
+ }
55
+ export interface CatalogInput {
56
+ readonly format: string;
57
+ readonly entries: readonly unknown[];
58
+ }
59
+ export interface CatalogOptions {
60
+ readonly codecs: ReadonlyMap<string, EvaluatorCodec> | readonly EvaluatorCodec[];
61
+ /**
62
+ * Additional host-reserved ids (D4). They only block catalog overrides; they never pass COMP-CHECK and never
63
+ * resolve as evaluators. Only CHECK_IDS are built in.
64
+ */
65
+ readonly builtins?: readonly string[];
66
+ }
67
+ export interface EvaluatorCatalog {
68
+ readonly format: string;
69
+ readonly digest: string;
70
+ readonly entries: readonly EvaluatorEntry[];
71
+ /** Always exactly CHECK_IDS. */
72
+ readonly builtins: readonly string[];
73
+ /** Host-reserved ids from options.builtins, excluding CHECK_IDS, sorted. */
74
+ readonly reserved: readonly string[];
75
+ }
76
+ export type CatalogResult = {
77
+ readonly ok: true;
78
+ readonly catalog: EvaluatorCatalog;
79
+ readonly assessment: Assessment;
80
+ } | {
81
+ readonly ok: false;
82
+ readonly assessment: Assessment;
83
+ };
84
+ export interface EvaluatorBinding<T> {
85
+ readonly assessment: Assessment;
86
+ /** The host implementation for an exact supported id and implementation digest, or undefined. */
87
+ readonly implementation: (id: string, implementationDigest: string) => T | undefined;
88
+ }
89
+ export declare const EVALUATOR_ID: RegExp;
90
+ export declare const DIGEST: RegExp;
91
+ export declare function compareVersions(a: string, b: string): number;
92
+ /**
93
+ * Pure v1 catalog constructor (C25). Refuses unknown format majors, malformed entries, invalid limits,
94
+ * unknown codecs, built-in overrides, duplicate id/version, digest disagreement and more than one
95
+ * supported implementation of an id. The result is frozen and carries a deterministic digest.
96
+ */
97
+ export declare function createEvaluatorCatalog(input: CatalogInput, options: CatalogOptions): CatalogResult;
98
+ /** True only for a catalog returned by createEvaluatorCatalog in this module instance. */
99
+ export declare function isEvaluatorCatalog(value: unknown): value is EvaluatorCatalog;
100
+ export declare function assertCatalog(value: unknown): asserts value is EvaluatorCatalog;
101
+ export declare function codecOf(catalog: EvaluatorCatalog, id: string): EvaluatorCodec | undefined;
102
+ /** The entry check.runs selects: the supported implementation, else the highest listed version. */
103
+ export declare function selectEvaluator(catalog: EvaluatorCatalog, id: string): EvaluatorEntry | undefined;
104
+ export declare function catalogEntry(catalog: EvaluatorCatalog, id: string, implementationVersion: string): EvaluatorEntry | undefined;
105
+ /**
106
+ * Associate trusted host implementations with supported entries, keyed `${id}@${implementationDigest}` (EVAL-02).
107
+ * Any key naming an unknown, substituted, unavailable or revoked implementation refuses the whole binding. The host
108
+ * must bind before it invokes anything; binding invokes nothing, and admission separately checks every receipt's
109
+ * evaluator id, version and digest against the catalog (C28), so an unbound or substituted run cannot pass.
110
+ */
111
+ export declare function bindEvaluators<T>(catalog: EvaluatorCatalog, implementations: ReadonlyMap<string, T>): EvaluatorBinding<T>;
112
+ //# sourceMappingURL=catalog.d.ts.map