@azx-pbc/axiom-runtime 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (755) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +714 -2
  3. package/dist/cache/index.d.ts +191 -0
  4. package/dist/cache/index.d.ts.map +1 -0
  5. package/dist/cache/index.js +361 -0
  6. package/dist/cache/index.js.map +1 -0
  7. package/dist/canonical/jcs.d.ts +78 -0
  8. package/dist/canonical/jcs.d.ts.map +1 -0
  9. package/dist/canonical/jcs.js +500 -0
  10. package/dist/canonical/jcs.js.map +1 -0
  11. package/dist/canonical/restricted-json.d.ts +7 -0
  12. package/dist/canonical/restricted-json.d.ts.map +1 -0
  13. package/dist/canonical/restricted-json.js +318 -0
  14. package/dist/canonical/restricted-json.js.map +1 -0
  15. package/dist/canonical/restricted-value.d.ts +59 -0
  16. package/dist/canonical/restricted-value.d.ts.map +1 -0
  17. package/dist/canonical/restricted-value.js +156 -0
  18. package/dist/canonical/restricted-value.js.map +1 -0
  19. package/dist/canonical/restricted.d.ts +85 -0
  20. package/dist/canonical/restricted.d.ts.map +1 -0
  21. package/dist/canonical/restricted.js +163 -0
  22. package/dist/canonical/restricted.js.map +1 -0
  23. package/dist/canonical/signature.d.ts +38 -0
  24. package/dist/canonical/signature.d.ts.map +1 -0
  25. package/dist/canonical/signature.js +47 -0
  26. package/dist/canonical/signature.js.map +1 -0
  27. package/dist/eval/access/delivery.d.ts +63 -0
  28. package/dist/eval/access/delivery.d.ts.map +1 -0
  29. package/dist/eval/access/delivery.js +98 -0
  30. package/dist/eval/access/delivery.js.map +1 -0
  31. package/dist/eval/access/overlay.d.ts +72 -0
  32. package/dist/eval/access/overlay.d.ts.map +1 -0
  33. package/dist/eval/access/overlay.js +402 -0
  34. package/dist/eval/access/overlay.js.map +1 -0
  35. package/dist/eval/access/projection.d.ts +159 -0
  36. package/dist/eval/access/projection.d.ts.map +1 -0
  37. package/dist/eval/access/projection.js +211 -0
  38. package/dist/eval/access/projection.js.map +1 -0
  39. package/dist/eval/access/window.d.ts +128 -0
  40. package/dist/eval/access/window.d.ts.map +1 -0
  41. package/dist/eval/access/window.js +254 -0
  42. package/dist/eval/access/window.js.map +1 -0
  43. package/dist/eval/access/write.d.ts +113 -0
  44. package/dist/eval/access/write.d.ts.map +1 -0
  45. package/dist/eval/access/write.js +119 -0
  46. package/dist/eval/access/write.js.map +1 -0
  47. package/dist/eval/addressing.d.ts +131 -0
  48. package/dist/eval/addressing.d.ts.map +1 -0
  49. package/dist/eval/addressing.js +270 -0
  50. package/dist/eval/addressing.js.map +1 -0
  51. package/dist/eval/budget.d.ts +143 -0
  52. package/dist/eval/budget.d.ts.map +1 -0
  53. package/dist/eval/budget.js +387 -0
  54. package/dist/eval/budget.js.map +1 -0
  55. package/dist/eval/computed.d.ts +46 -0
  56. package/dist/eval/computed.d.ts.map +1 -0
  57. package/dist/eval/computed.js +89 -0
  58. package/dist/eval/computed.js.map +1 -0
  59. package/dist/eval/denials.d.ts +64 -0
  60. package/dist/eval/denials.d.ts.map +1 -0
  61. package/dist/eval/denials.js +87 -0
  62. package/dist/eval/denials.js.map +1 -0
  63. package/dist/eval/engine/cancellation.d.ts +12 -0
  64. package/dist/eval/engine/cancellation.d.ts.map +1 -0
  65. package/dist/eval/engine/cancellation.js +56 -0
  66. package/dist/eval/engine/cancellation.js.map +1 -0
  67. package/dist/eval/engine/delta.d.ts +104 -0
  68. package/dist/eval/engine/delta.d.ts.map +1 -0
  69. package/dist/eval/engine/delta.js +466 -0
  70. package/dist/eval/engine/delta.js.map +1 -0
  71. package/dist/eval/engine/deps.d.ts +136 -0
  72. package/dist/eval/engine/deps.d.ts.map +1 -0
  73. package/dist/eval/engine/deps.js +345 -0
  74. package/dist/eval/engine/deps.js.map +1 -0
  75. package/dist/eval/engine/identity.d.ts +128 -0
  76. package/dist/eval/engine/identity.d.ts.map +1 -0
  77. package/dist/eval/engine/identity.js +398 -0
  78. package/dist/eval/engine/identity.js.map +1 -0
  79. package/dist/eval/engine/index.d.ts +200 -0
  80. package/dist/eval/engine/index.d.ts.map +1 -0
  81. package/dist/eval/engine/index.js +1242 -0
  82. package/dist/eval/engine/index.js.map +1 -0
  83. package/dist/eval/engine/measurement.d.ts +23 -0
  84. package/dist/eval/engine/measurement.d.ts.map +1 -0
  85. package/dist/eval/engine/measurement.js +42 -0
  86. package/dist/eval/engine/measurement.js.map +1 -0
  87. package/dist/eval/engine/naive.d.ts +19 -0
  88. package/dist/eval/engine/naive.d.ts.map +1 -0
  89. package/dist/eval/engine/naive.js +59 -0
  90. package/dist/eval/engine/naive.js.map +1 -0
  91. package/dist/eval/engine/ops.d.ts +214 -0
  92. package/dist/eval/engine/ops.d.ts.map +1 -0
  93. package/dist/eval/engine/ops.js +1422 -0
  94. package/dist/eval/engine/ops.js.map +1 -0
  95. package/dist/eval/engine/patches.d.ts +40 -0
  96. package/dist/eval/engine/patches.d.ts.map +1 -0
  97. package/dist/eval/engine/patches.js +125 -0
  98. package/dist/eval/engine/patches.js.map +1 -0
  99. package/dist/eval/engine/ports.d.ts +71 -0
  100. package/dist/eval/engine/ports.d.ts.map +1 -0
  101. package/dist/eval/engine/ports.js +2 -0
  102. package/dist/eval/engine/ports.js.map +1 -0
  103. package/dist/eval/engine/session.d.ts +116 -0
  104. package/dist/eval/engine/session.d.ts.map +1 -0
  105. package/dist/eval/engine/session.js +653 -0
  106. package/dist/eval/engine/session.js.map +1 -0
  107. package/dist/eval/engine/snapshot.d.ts +97 -0
  108. package/dist/eval/engine/snapshot.d.ts.map +1 -0
  109. package/dist/eval/engine/snapshot.js +221 -0
  110. package/dist/eval/engine/snapshot.js.map +1 -0
  111. package/dist/eval/engine/subscriptions.d.ts +47 -0
  112. package/dist/eval/engine/subscriptions.d.ts.map +1 -0
  113. package/dist/eval/engine/subscriptions.js +103 -0
  114. package/dist/eval/engine/subscriptions.js.map +1 -0
  115. package/dist/eval/engine/trace.d.ts +77 -0
  116. package/dist/eval/engine/trace.d.ts.map +1 -0
  117. package/dist/eval/engine/trace.js +140 -0
  118. package/dist/eval/engine/trace.js.map +1 -0
  119. package/dist/eval/error-diagnostic.d.ts +26 -0
  120. package/dist/eval/error-diagnostic.d.ts.map +1 -0
  121. package/dist/eval/error-diagnostic.js +63 -0
  122. package/dist/eval/error-diagnostic.js.map +1 -0
  123. package/dist/eval/evaluate-expr.d.ts +44 -0
  124. package/dist/eval/evaluate-expr.d.ts.map +1 -0
  125. package/dist/eval/evaluate-expr.js +149 -0
  126. package/dist/eval/evaluate-expr.js.map +1 -0
  127. package/dist/eval/evaluate.d.ts +282 -0
  128. package/dist/eval/evaluate.d.ts.map +1 -0
  129. package/dist/eval/evaluate.js +391 -0
  130. package/dist/eval/evaluate.js.map +1 -0
  131. package/dist/eval/evolution/relocate.d.ts +72 -0
  132. package/dist/eval/evolution/relocate.d.ts.map +1 -0
  133. package/dist/eval/evolution/relocate.js +427 -0
  134. package/dist/eval/evolution/relocate.js.map +1 -0
  135. package/dist/eval/evolution/select.d.ts +11 -0
  136. package/dist/eval/evolution/select.d.ts.map +1 -0
  137. package/dist/eval/evolution/select.js +53 -0
  138. package/dist/eval/evolution/select.js.map +1 -0
  139. package/dist/eval/evolution/upcast.d.ts +13 -0
  140. package/dist/eval/evolution/upcast.d.ts.map +1 -0
  141. package/dist/eval/evolution/upcast.js +88 -0
  142. package/dist/eval/evolution/upcast.js.map +1 -0
  143. package/dist/eval/expr/aggregates.d.ts +75 -0
  144. package/dist/eval/expr/aggregates.d.ts.map +1 -0
  145. package/dist/eval/expr/aggregates.js +991 -0
  146. package/dist/eval/expr/aggregates.js.map +1 -0
  147. package/dist/eval/expr/arithmetic.d.ts +26 -0
  148. package/dist/eval/expr/arithmetic.d.ts.map +1 -0
  149. package/dist/eval/expr/arithmetic.js +387 -0
  150. package/dist/eval/expr/arithmetic.js.map +1 -0
  151. package/dist/eval/expr/between.d.ts +17 -0
  152. package/dist/eval/expr/between.d.ts.map +1 -0
  153. package/dist/eval/expr/between.js +46 -0
  154. package/dist/eval/expr/between.js.map +1 -0
  155. package/dist/eval/expr/binder.d.ts +96 -0
  156. package/dist/eval/expr/binder.d.ts.map +1 -0
  157. package/dist/eval/expr/binder.js +253 -0
  158. package/dist/eval/expr/binder.js.map +1 -0
  159. package/dist/eval/expr/call-dispatch.d.ts +28 -0
  160. package/dist/eval/expr/call-dispatch.d.ts.map +1 -0
  161. package/dist/eval/expr/call-dispatch.js +114 -0
  162. package/dist/eval/expr/call-dispatch.js.map +1 -0
  163. package/dist/eval/expr/collections.d.ts +20 -0
  164. package/dist/eval/expr/collections.d.ts.map +1 -0
  165. package/dist/eval/expr/collections.js +66 -0
  166. package/dist/eval/expr/collections.js.map +1 -0
  167. package/dist/eval/expr/compare.d.ts +36 -0
  168. package/dist/eval/expr/compare.d.ts.map +1 -0
  169. package/dist/eval/expr/compare.js +115 -0
  170. package/dist/eval/expr/compare.js.map +1 -0
  171. package/dist/eval/expr/datasets.d.ts +28 -0
  172. package/dist/eval/expr/datasets.d.ts.map +1 -0
  173. package/dist/eval/expr/datasets.js +304 -0
  174. package/dist/eval/expr/datasets.js.map +1 -0
  175. package/dist/eval/expr/digest.d.ts +23 -0
  176. package/dist/eval/expr/digest.d.ts.map +1 -0
  177. package/dist/eval/expr/digest.js +89 -0
  178. package/dist/eval/expr/digest.js.map +1 -0
  179. package/dist/eval/expr/domains.d.ts +19 -0
  180. package/dist/eval/expr/domains.d.ts.map +1 -0
  181. package/dist/eval/expr/domains.js +18 -0
  182. package/dist/eval/expr/domains.js.map +1 -0
  183. package/dist/eval/expr/host.d.ts +152 -0
  184. package/dist/eval/expr/host.d.ts.map +1 -0
  185. package/dist/eval/expr/host.js +36 -0
  186. package/dist/eval/expr/host.js.map +1 -0
  187. package/dist/eval/expr/lists.d.ts +24 -0
  188. package/dist/eval/expr/lists.d.ts.map +1 -0
  189. package/dist/eval/expr/lists.js +155 -0
  190. package/dist/eval/expr/lists.js.map +1 -0
  191. package/dist/eval/expr/member.d.ts +15 -0
  192. package/dist/eval/expr/member.d.ts.map +1 -0
  193. package/dist/eval/expr/member.js +32 -0
  194. package/dist/eval/expr/member.js.map +1 -0
  195. package/dist/eval/expr/money-ops.d.ts +10 -0
  196. package/dist/eval/expr/money-ops.d.ts.map +1 -0
  197. package/dist/eval/expr/money-ops.js +17 -0
  198. package/dist/eval/expr/money-ops.js.map +1 -0
  199. package/dist/eval/expr/operands.d.ts +27 -0
  200. package/dist/eval/expr/operands.d.ts.map +1 -0
  201. package/dist/eval/expr/operands.js +167 -0
  202. package/dist/eval/expr/operands.js.map +1 -0
  203. package/dist/eval/expr/presence.d.ts +27 -0
  204. package/dist/eval/expr/presence.d.ts.map +1 -0
  205. package/dist/eval/expr/presence.js +140 -0
  206. package/dist/eval/expr/presence.js.map +1 -0
  207. package/dist/eval/expr/records.d.ts +22 -0
  208. package/dist/eval/expr/records.d.ts.map +1 -0
  209. package/dist/eval/expr/records.js +101 -0
  210. package/dist/eval/expr/records.js.map +1 -0
  211. package/dist/eval/expr/rule-refs.d.ts +25 -0
  212. package/dist/eval/expr/rule-refs.d.ts.map +1 -0
  213. package/dist/eval/expr/rule-refs.js +60 -0
  214. package/dist/eval/expr/rule-refs.js.map +1 -0
  215. package/dist/eval/expr/sequences.d.ts +26 -0
  216. package/dist/eval/expr/sequences.d.ts.map +1 -0
  217. package/dist/eval/expr/sequences.js +151 -0
  218. package/dist/eval/expr/sequences.js.map +1 -0
  219. package/dist/eval/expr/value.d.ts +99 -0
  220. package/dist/eval/expr/value.d.ts.map +1 -0
  221. package/dist/eval/expr/value.js +14 -0
  222. package/dist/eval/expr/value.js.map +1 -0
  223. package/dist/eval/expression.d.ts +142 -0
  224. package/dist/eval/expression.d.ts.map +1 -0
  225. package/dist/eval/expression.js +446 -0
  226. package/dist/eval/expression.js.map +1 -0
  227. package/dist/eval/firing.d.ts +68 -0
  228. package/dist/eval/firing.d.ts.map +1 -0
  229. package/dist/eval/firing.js +222 -0
  230. package/dist/eval/firing.js.map +1 -0
  231. package/dist/eval/gate.d.ts +110 -0
  232. package/dist/eval/gate.d.ts.map +1 -0
  233. package/dist/eval/gate.js +278 -0
  234. package/dist/eval/gate.js.map +1 -0
  235. package/dist/eval/layout-visibility.d.ts +18 -0
  236. package/dist/eval/layout-visibility.d.ts.map +1 -0
  237. package/dist/eval/layout-visibility.js +61 -0
  238. package/dist/eval/layout-visibility.js.map +1 -0
  239. package/dist/eval/option-availability.d.ts +26 -0
  240. package/dist/eval/option-availability.d.ts.map +1 -0
  241. package/dist/eval/option-availability.js +580 -0
  242. package/dist/eval/option-availability.js.map +1 -0
  243. package/dist/eval/options-boundary.d.ts +15 -0
  244. package/dist/eval/options-boundary.d.ts.map +1 -0
  245. package/dist/eval/options-boundary.js +40 -0
  246. package/dist/eval/options-boundary.js.map +1 -0
  247. package/dist/eval/options.d.ts +99 -0
  248. package/dist/eval/options.d.ts.map +1 -0
  249. package/dist/eval/options.js +96 -0
  250. package/dist/eval/options.js.map +1 -0
  251. package/dist/eval/overrides.d.ts +116 -0
  252. package/dist/eval/overrides.d.ts.map +1 -0
  253. package/dist/eval/overrides.js +176 -0
  254. package/dist/eval/overrides.js.map +1 -0
  255. package/dist/eval/paths.d.ts +25 -0
  256. package/dist/eval/paths.d.ts.map +1 -0
  257. package/dist/eval/paths.js +47 -0
  258. package/dist/eval/paths.js.map +1 -0
  259. package/dist/eval/presentation-reads.d.ts +20 -0
  260. package/dist/eval/presentation-reads.d.ts.map +1 -0
  261. package/dist/eval/presentation-reads.js +2 -0
  262. package/dist/eval/presentation-reads.js.map +1 -0
  263. package/dist/eval/presentation.d.ts +122 -0
  264. package/dist/eval/presentation.d.ts.map +1 -0
  265. package/dist/eval/presentation.js +255 -0
  266. package/dist/eval/presentation.js.map +1 -0
  267. package/dist/eval/reader/context-value.d.ts +41 -0
  268. package/dist/eval/reader/context-value.d.ts.map +1 -0
  269. package/dist/eval/reader/context-value.js +129 -0
  270. package/dist/eval/reader/context-value.js.map +1 -0
  271. package/dist/eval/reader/covered.d.ts +53 -0
  272. package/dist/eval/reader/covered.d.ts.map +1 -0
  273. package/dist/eval/reader/covered.js +139 -0
  274. package/dist/eval/reader/covered.js.map +1 -0
  275. package/dist/eval/reader/declarations.d.ts +182 -0
  276. package/dist/eval/reader/declarations.d.ts.map +1 -0
  277. package/dist/eval/reader/declarations.js +153 -0
  278. package/dist/eval/reader/declarations.js.map +1 -0
  279. package/dist/eval/reader/member-access.d.ts +87 -0
  280. package/dist/eval/reader/member-access.d.ts.map +1 -0
  281. package/dist/eval/reader/member-access.js +212 -0
  282. package/dist/eval/reader/member-access.js.map +1 -0
  283. package/dist/eval/reader/memo.d.ts +34 -0
  284. package/dist/eval/reader/memo.d.ts.map +1 -0
  285. package/dist/eval/reader/memo.js +67 -0
  286. package/dist/eval/reader/memo.js.map +1 -0
  287. package/dist/eval/reader/overlay.d.ts +74 -0
  288. package/dist/eval/reader/overlay.d.ts.map +1 -0
  289. package/dist/eval/reader/overlay.js +365 -0
  290. package/dist/eval/reader/overlay.js.map +1 -0
  291. package/dist/eval/reader/questions.d.ts +37 -0
  292. package/dist/eval/reader/questions.d.ts.map +1 -0
  293. package/dist/eval/reader/questions.js +78 -0
  294. package/dist/eval/reader/questions.js.map +1 -0
  295. package/dist/eval/reader/resolve.d.ts +84 -0
  296. package/dist/eval/reader/resolve.d.ts.map +1 -0
  297. package/dist/eval/reader/resolve.js +310 -0
  298. package/dist/eval/reader/resolve.js.map +1 -0
  299. package/dist/eval/reader/value-read.d.ts +50 -0
  300. package/dist/eval/reader/value-read.d.ts.map +1 -0
  301. package/dist/eval/reader/value-read.js +133 -0
  302. package/dist/eval/reader/value-read.js.map +1 -0
  303. package/dist/eval/reader/withheld.d.ts +48 -0
  304. package/dist/eval/reader/withheld.d.ts.map +1 -0
  305. package/dist/eval/reader/withheld.js +108 -0
  306. package/dist/eval/reader/withheld.js.map +1 -0
  307. package/dist/eval/reader-paths.d.ts +24 -0
  308. package/dist/eval/reader-paths.d.ts.map +1 -0
  309. package/dist/eval/reader-paths.js +23 -0
  310. package/dist/eval/reader-paths.js.map +1 -0
  311. package/dist/eval/reader.d.ts +281 -0
  312. package/dist/eval/reader.d.ts.map +1 -0
  313. package/dist/eval/reader.js +560 -0
  314. package/dist/eval/reader.js.map +1 -0
  315. package/dist/eval/receipt.d.ts +37 -0
  316. package/dist/eval/receipt.d.ts.map +1 -0
  317. package/dist/eval/receipt.js +222 -0
  318. package/dist/eval/receipt.js.map +1 -0
  319. package/dist/eval/report/assemble.d.ts +84 -0
  320. package/dist/eval/report/assemble.d.ts.map +1 -0
  321. package/dist/eval/report/assemble.js +277 -0
  322. package/dist/eval/report/assemble.js.map +1 -0
  323. package/dist/eval/report/fold.d.ts +18 -0
  324. package/dist/eval/report/fold.d.ts.map +1 -0
  325. package/dist/eval/report/fold.js +58 -0
  326. package/dist/eval/report/fold.js.map +1 -0
  327. package/dist/eval/rule/alternatives.d.ts +23 -0
  328. package/dist/eval/rule/alternatives.d.ts.map +1 -0
  329. package/dist/eval/rule/alternatives.js +46 -0
  330. package/dist/eval/rule/alternatives.js.map +1 -0
  331. package/dist/eval/rule/behaviour.d.ts +47 -0
  332. package/dist/eval/rule/behaviour.d.ts.map +1 -0
  333. package/dist/eval/rule/behaviour.js +249 -0
  334. package/dist/eval/rule/behaviour.js.map +1 -0
  335. package/dist/eval/rule/compute.d.ts +46 -0
  336. package/dist/eval/rule/compute.d.ts.map +1 -0
  337. package/dist/eval/rule/compute.js +158 -0
  338. package/dist/eval/rule/compute.js.map +1 -0
  339. package/dist/eval/rule/create-state.d.ts +42 -0
  340. package/dist/eval/rule/create-state.d.ts.map +1 -0
  341. package/dist/eval/rule/create-state.js +134 -0
  342. package/dist/eval/rule/create-state.js.map +1 -0
  343. package/dist/eval/rule/diagnostics.d.ts +24 -0
  344. package/dist/eval/rule/diagnostics.d.ts.map +1 -0
  345. package/dist/eval/rule/diagnostics.js +45 -0
  346. package/dist/eval/rule/diagnostics.js.map +1 -0
  347. package/dist/eval/rule/execution.d.ts +24 -0
  348. package/dist/eval/rule/execution.d.ts.map +1 -0
  349. package/dist/eval/rule/execution.js +495 -0
  350. package/dist/eval/rule/execution.js.map +1 -0
  351. package/dist/eval/rule/gate.d.ts +12 -0
  352. package/dist/eval/rule/gate.d.ts.map +1 -0
  353. package/dist/eval/rule/gate.js +34 -0
  354. package/dist/eval/rule/gate.js.map +1 -0
  355. package/dist/eval/rule/item.d.ts +11 -0
  356. package/dist/eval/rule/item.d.ts.map +1 -0
  357. package/dist/eval/rule/item.js +265 -0
  358. package/dist/eval/rule/item.js.map +1 -0
  359. package/dist/eval/rule/prepare.d.ts +64 -0
  360. package/dist/eval/rule/prepare.d.ts.map +1 -0
  361. package/dist/eval/rule/prepare.js +131 -0
  362. package/dist/eval/rule/prepare.js.map +1 -0
  363. package/dist/eval/rule/result.d.ts +97 -0
  364. package/dist/eval/rule/result.d.ts.map +1 -0
  365. package/dist/eval/rule/result.js +347 -0
  366. package/dist/eval/rule/result.js.map +1 -0
  367. package/dist/eval/rule/runner.d.ts +128 -0
  368. package/dist/eval/rule/runner.d.ts.map +1 -0
  369. package/dist/eval/rule/runner.js +296 -0
  370. package/dist/eval/rule/runner.js.map +1 -0
  371. package/dist/eval/rule/screen.d.ts +32 -0
  372. package/dist/eval/rule/screen.d.ts.map +1 -0
  373. package/dist/eval/rule/screen.js +73 -0
  374. package/dist/eval/rule/screen.js.map +1 -0
  375. package/dist/eval/rule/state.d.ts +137 -0
  376. package/dist/eval/rule/state.d.ts.map +1 -0
  377. package/dist/eval/rule/state.js +2 -0
  378. package/dist/eval/rule/state.js.map +1 -0
  379. package/dist/eval/rule/steps.d.ts +44 -0
  380. package/dist/eval/rule/steps.d.ts.map +1 -0
  381. package/dist/eval/rule/steps.js +367 -0
  382. package/dist/eval/rule/steps.js.map +1 -0
  383. package/dist/eval/rule/visibility.d.ts +18 -0
  384. package/dist/eval/rule/visibility.d.ts.map +1 -0
  385. package/dist/eval/rule/visibility.js +79 -0
  386. package/dist/eval/rule/visibility.js.map +1 -0
  387. package/dist/eval/seal.d.ts +74 -0
  388. package/dist/eval/seal.d.ts.map +1 -0
  389. package/dist/eval/seal.js +154 -0
  390. package/dist/eval/seal.js.map +1 -0
  391. package/dist/eval/signature-coverage.d.ts +19 -0
  392. package/dist/eval/signature-coverage.d.ts.map +1 -0
  393. package/dist/eval/signature-coverage.js +160 -0
  394. package/dist/eval/signature-coverage.js.map +1 -0
  395. package/dist/eval/state/derive.d.ts +72 -0
  396. package/dist/eval/state/derive.d.ts.map +1 -0
  397. package/dist/eval/state/derive.js +61 -0
  398. package/dist/eval/state/derive.js.map +1 -0
  399. package/dist/eval/state/describe.d.ts +18 -0
  400. package/dist/eval/state/describe.d.ts.map +1 -0
  401. package/dist/eval/state/describe.js +19 -0
  402. package/dist/eval/state/describe.js.map +1 -0
  403. package/dist/eval/state/field-state.d.ts +471 -0
  404. package/dist/eval/state/field-state.d.ts.map +1 -0
  405. package/dist/eval/state/field-state.js +1604 -0
  406. package/dist/eval/state/field-state.js.map +1 -0
  407. package/dist/eval/state/measurement.d.ts +136 -0
  408. package/dist/eval/state/measurement.d.ts.map +1 -0
  409. package/dist/eval/state/measurement.js +209 -0
  410. package/dist/eval/state/measurement.js.map +1 -0
  411. package/dist/eval/state/options.d.ts +21 -0
  412. package/dist/eval/state/options.d.ts.map +1 -0
  413. package/dist/eval/state/options.js +3 -0
  414. package/dist/eval/state/options.js.map +1 -0
  415. package/dist/eval/state/readiness.d.ts +400 -0
  416. package/dist/eval/state/readiness.d.ts.map +1 -0
  417. package/dist/eval/state/readiness.js +1067 -0
  418. package/dist/eval/state/readiness.js.map +1 -0
  419. package/dist/eval/state/snapshot.d.ts +130 -0
  420. package/dist/eval/state/snapshot.d.ts.map +1 -0
  421. package/dist/eval/state/snapshot.js +35 -0
  422. package/dist/eval/state/snapshot.js.map +1 -0
  423. package/dist/eval/state/unavailable-options.d.ts +54 -0
  424. package/dist/eval/state/unavailable-options.d.ts.map +1 -0
  425. package/dist/eval/state/unavailable-options.js +82 -0
  426. package/dist/eval/state/unavailable-options.js.map +1 -0
  427. package/dist/eval/state/value-state.d.ts +38 -0
  428. package/dist/eval/state/value-state.d.ts.map +1 -0
  429. package/dist/eval/state/value-state.js +52 -0
  430. package/dist/eval/state/value-state.js.map +1 -0
  431. package/dist/eval/submission/admission.d.ts +50 -0
  432. package/dist/eval/submission/admission.d.ts.map +1 -0
  433. package/dist/eval/submission/admission.js +174 -0
  434. package/dist/eval/submission/admission.js.map +1 -0
  435. package/dist/eval/submission/authority.d.ts +71 -0
  436. package/dist/eval/submission/authority.d.ts.map +1 -0
  437. package/dist/eval/submission/authority.js +118 -0
  438. package/dist/eval/submission/authority.js.map +1 -0
  439. package/dist/eval/submission/datasets.d.ts +28 -0
  440. package/dist/eval/submission/datasets.d.ts.map +1 -0
  441. package/dist/eval/submission/datasets.js +109 -0
  442. package/dist/eval/submission/datasets.js.map +1 -0
  443. package/dist/eval/submission/index.d.ts +15 -0
  444. package/dist/eval/submission/index.d.ts.map +1 -0
  445. package/dist/eval/submission/index.js +13 -0
  446. package/dist/eval/submission/index.js.map +1 -0
  447. package/dist/eval/submission/refusals.d.ts +103 -0
  448. package/dist/eval/submission/refusals.d.ts.map +1 -0
  449. package/dist/eval/submission/refusals.js +15 -0
  450. package/dist/eval/submission/refusals.js.map +1 -0
  451. package/dist/eval/submission/signatures.d.ts +7 -0
  452. package/dist/eval/submission/signatures.d.ts.map +1 -0
  453. package/dist/eval/submission/signatures.js +215 -0
  454. package/dist/eval/submission/signatures.js.map +1 -0
  455. package/dist/eval/submission/writes.d.ts +51 -0
  456. package/dist/eval/submission/writes.d.ts.map +1 -0
  457. package/dist/eval/submission/writes.js +203 -0
  458. package/dist/eval/submission/writes.js.map +1 -0
  459. package/dist/eval/submission.d.ts +53 -0
  460. package/dist/eval/submission.d.ts.map +1 -0
  461. package/dist/eval/submission.js +521 -0
  462. package/dist/eval/submission.js.map +1 -0
  463. package/dist/eval/suggestions-to-engine.d.ts +18 -0
  464. package/dist/eval/suggestions-to-engine.d.ts.map +1 -0
  465. package/dist/eval/suggestions-to-engine.js +40 -0
  466. package/dist/eval/suggestions-to-engine.js.map +1 -0
  467. package/dist/eval/suggestions.d.ts +17 -0
  468. package/dist/eval/suggestions.d.ts.map +1 -0
  469. package/dist/eval/suggestions.js +314 -0
  470. package/dist/eval/suggestions.js.map +1 -0
  471. package/dist/eval/undecided.d.ts +64 -0
  472. package/dist/eval/undecided.d.ts.map +1 -0
  473. package/dist/eval/undecided.js +101 -0
  474. package/dist/eval/undecided.js.map +1 -0
  475. package/dist/eval/verdict.d.ts +66 -0
  476. package/dist/eval/verdict.d.ts.map +1 -0
  477. package/dist/eval/verdict.js +106 -0
  478. package/dist/eval/verdict.js.map +1 -0
  479. package/dist/eval/verify-signature.d.ts +78 -0
  480. package/dist/eval/verify-signature.d.ts.map +1 -0
  481. package/dist/eval/verify-signature.js +185 -0
  482. package/dist/eval/verify-signature.js.map +1 -0
  483. package/dist/eval/version-dispatch.d.ts +38 -0
  484. package/dist/eval/version-dispatch.d.ts.map +1 -0
  485. package/dist/eval/version-dispatch.js +61 -0
  486. package/dist/eval/version-dispatch.js.map +1 -0
  487. package/dist/eval/visibility.d.ts +33 -0
  488. package/dist/eval/visibility.d.ts.map +1 -0
  489. package/dist/eval/visibility.js +83 -0
  490. package/dist/eval/visibility.js.map +1 -0
  491. package/dist/evaluate.d.ts +24 -0
  492. package/dist/evaluate.d.ts.map +1 -0
  493. package/dist/evaluate.js +18 -0
  494. package/dist/evaluate.js.map +1 -0
  495. package/dist/expr/builtin-docs.d.ts +51 -0
  496. package/dist/expr/builtin-docs.d.ts.map +1 -0
  497. package/dist/expr/builtin-docs.js +874 -0
  498. package/dist/expr/builtin-docs.js.map +1 -0
  499. package/dist/expr/builtins.d.ts +50 -0
  500. package/dist/expr/builtins.d.ts.map +1 -0
  501. package/dist/expr/builtins.js +966 -0
  502. package/dist/expr/builtins.js.map +1 -0
  503. package/dist/expr/decimal-precision.d.ts +39 -0
  504. package/dist/expr/decimal-precision.d.ts.map +1 -0
  505. package/dist/expr/decimal-precision.js +62 -0
  506. package/dist/expr/decimal-precision.js.map +1 -0
  507. package/dist/expr/decimal.d.ts +172 -0
  508. package/dist/expr/decimal.d.ts.map +1 -0
  509. package/dist/expr/decimal.js +782 -0
  510. package/dist/expr/decimal.js.map +1 -0
  511. package/dist/expr/deprecations.d.ts +34 -0
  512. package/dist/expr/deprecations.d.ts.map +1 -0
  513. package/dist/expr/deprecations.js +17 -0
  514. package/dist/expr/deprecations.js.map +1 -0
  515. package/dist/expr/diagnostics.d.ts +21 -0
  516. package/dist/expr/diagnostics.d.ts.map +1 -0
  517. package/dist/expr/diagnostics.js +231 -0
  518. package/dist/expr/diagnostics.js.map +1 -0
  519. package/dist/expr/direction.d.ts +30 -0
  520. package/dist/expr/direction.d.ts.map +1 -0
  521. package/dist/expr/direction.js +77 -0
  522. package/dist/expr/direction.js.map +1 -0
  523. package/dist/expr/example-expression.d.ts +62 -0
  524. package/dist/expr/example-expression.d.ts.map +1 -0
  525. package/dist/expr/example-expression.js +670 -0
  526. package/dist/expr/example-expression.js.map +1 -0
  527. package/dist/expr/instant.d.ts +49 -0
  528. package/dist/expr/instant.d.ts.map +1 -0
  529. package/dist/expr/instant.js +111 -0
  530. package/dist/expr/instant.js.map +1 -0
  531. package/dist/expr/logic.d.ts +17 -0
  532. package/dist/expr/logic.d.ts.map +1 -0
  533. package/dist/expr/logic.js +65 -0
  534. package/dist/expr/logic.js.map +1 -0
  535. package/dist/expr/messages.d.ts +45 -0
  536. package/dist/expr/messages.d.ts.map +1 -0
  537. package/dist/expr/messages.js +280 -0
  538. package/dist/expr/messages.js.map +1 -0
  539. package/dist/expr/money.d.ts +38 -0
  540. package/dist/expr/money.d.ts.map +1 -0
  541. package/dist/expr/money.js +127 -0
  542. package/dist/expr/money.js.map +1 -0
  543. package/dist/expr/ordering.d.ts +56 -0
  544. package/dist/expr/ordering.d.ts.map +1 -0
  545. package/dist/expr/ordering.js +167 -0
  546. package/dist/expr/ordering.js.map +1 -0
  547. package/dist/expr/pattern.d.ts +44 -0
  548. package/dist/expr/pattern.d.ts.map +1 -0
  549. package/dist/expr/pattern.js +458 -0
  550. package/dist/expr/pattern.js.map +1 -0
  551. package/dist/expr/plain-date.d.ts +90 -0
  552. package/dist/expr/plain-date.d.ts.map +1 -0
  553. package/dist/expr/plain-date.js +230 -0
  554. package/dist/expr/plain-date.js.map +1 -0
  555. package/dist/expr/plural-categories.d.ts +8 -0
  556. package/dist/expr/plural-categories.d.ts.map +1 -0
  557. package/dist/expr/plural-categories.js +15 -0
  558. package/dist/expr/plural-categories.js.map +1 -0
  559. package/dist/expr/plural-keys.d.ts +39 -0
  560. package/dist/expr/plural-keys.d.ts.map +1 -0
  561. package/dist/expr/plural-keys.js +46 -0
  562. package/dist/expr/plural-keys.js.map +1 -0
  563. package/dist/expr/plural.d.ts +33 -0
  564. package/dist/expr/plural.d.ts.map +1 -0
  565. package/dist/expr/plural.js +50 -0
  566. package/dist/expr/plural.js.map +1 -0
  567. package/dist/expr/quantity.d.ts +31 -0
  568. package/dist/expr/quantity.d.ts.map +1 -0
  569. package/dist/expr/quantity.js +83 -0
  570. package/dist/expr/quantity.js.map +1 -0
  571. package/dist/expr/reduce.d.ts +50 -0
  572. package/dist/expr/reduce.d.ts.map +1 -0
  573. package/dist/expr/reduce.js +236 -0
  574. package/dist/expr/reduce.js.map +1 -0
  575. package/dist/expr/regex.d.ts +108 -0
  576. package/dist/expr/regex.d.ts.map +1 -0
  577. package/dist/expr/regex.js +1207 -0
  578. package/dist/expr/regex.js.map +1 -0
  579. package/dist/expr/select-locale.d.ts +67 -0
  580. package/dist/expr/select-locale.d.ts.map +1 -0
  581. package/dist/expr/select-locale.js +219 -0
  582. package/dist/expr/select-locale.js.map +1 -0
  583. package/dist/expr/sequences.d.ts +123 -0
  584. package/dist/expr/sequences.d.ts.map +1 -0
  585. package/dist/expr/sequences.js +234 -0
  586. package/dist/expr/sequences.js.map +1 -0
  587. package/dist/expr/strings.d.ts +50 -0
  588. package/dist/expr/strings.d.ts.map +1 -0
  589. package/dist/expr/strings.js +184 -0
  590. package/dist/expr/strings.js.map +1 -0
  591. package/dist/expr/validation.d.ts +32 -0
  592. package/dist/expr/validation.d.ts.map +1 -0
  593. package/dist/expr/validation.js +182 -0
  594. package/dist/expr/validation.js.map +1 -0
  595. package/dist/graph/freeze.d.ts +4 -0
  596. package/dist/graph/freeze.d.ts.map +1 -0
  597. package/dist/graph/freeze.js +52 -0
  598. package/dist/graph/freeze.js.map +1 -0
  599. package/dist/graph/index.d.ts +15 -0
  600. package/dist/graph/index.d.ts.map +1 -0
  601. package/dist/graph/index.js +13 -0
  602. package/dist/graph/index.js.map +1 -0
  603. package/dist/graph/inspect.d.ts +76 -0
  604. package/dist/graph/inspect.d.ts.map +1 -0
  605. package/dist/graph/inspect.js +263 -0
  606. package/dist/graph/inspect.js.map +1 -0
  607. package/dist/graph/read-walk.d.ts +101 -0
  608. package/dist/graph/read-walk.d.ts.map +1 -0
  609. package/dist/graph/read-walk.js +358 -0
  610. package/dist/graph/read-walk.js.map +1 -0
  611. package/dist/graph/record-index.d.ts +24 -0
  612. package/dist/graph/record-index.d.ts.map +1 -0
  613. package/dist/graph/record-index.js +35 -0
  614. package/dist/graph/record-index.js.map +1 -0
  615. package/dist/index.d.ts +104 -0
  616. package/dist/index.d.ts.map +1 -0
  617. package/dist/index.js +139 -0
  618. package/dist/index.js.map +1 -0
  619. package/dist/lookup/digest.d.ts +51 -0
  620. package/dist/lookup/digest.d.ts.map +1 -0
  621. package/dist/lookup/digest.js +46 -0
  622. package/dist/lookup/digest.js.map +1 -0
  623. package/dist/lookup/index.d.ts +28 -0
  624. package/dist/lookup/index.d.ts.map +1 -0
  625. package/dist/lookup/index.js +27 -0
  626. package/dist/lookup/index.js.map +1 -0
  627. package/dist/lookup/install.d.ts +48 -0
  628. package/dist/lookup/install.d.ts.map +1 -0
  629. package/dist/lookup/install.js +315 -0
  630. package/dist/lookup/install.js.map +1 -0
  631. package/dist/lookup/pass.d.ts +55 -0
  632. package/dist/lookup/pass.d.ts.map +1 -0
  633. package/dist/lookup/pass.js +212 -0
  634. package/dist/lookup/pass.js.map +1 -0
  635. package/dist/lookup/pins.d.ts +34 -0
  636. package/dist/lookup/pins.d.ts.map +1 -0
  637. package/dist/lookup/pins.js +39 -0
  638. package/dist/lookup/pins.js.map +1 -0
  639. package/dist/lookup/provenance.d.ts +23 -0
  640. package/dist/lookup/provenance.d.ts.map +1 -0
  641. package/dist/lookup/provenance.js +78 -0
  642. package/dist/lookup/provenance.js.map +1 -0
  643. package/dist/lookup/readiness.d.ts +13 -0
  644. package/dist/lookup/readiness.d.ts.map +1 -0
  645. package/dist/lookup/readiness.js +57 -0
  646. package/dist/lookup/readiness.js.map +1 -0
  647. package/dist/lookup/resolve.d.ts +24 -0
  648. package/dist/lookup/resolve.d.ts.map +1 -0
  649. package/dist/lookup/resolve.js +201 -0
  650. package/dist/lookup/resolve.js.map +1 -0
  651. package/dist/lookup/store.d.ts +41 -0
  652. package/dist/lookup/store.d.ts.map +1 -0
  653. package/dist/lookup/store.js +74 -0
  654. package/dist/lookup/store.js.map +1 -0
  655. package/dist/model/access.d.ts +200 -0
  656. package/dist/model/access.d.ts.map +1 -0
  657. package/dist/model/access.js +125 -0
  658. package/dist/model/access.js.map +1 -0
  659. package/dist/model/artifact-members.d.ts +3 -0
  660. package/dist/model/artifact-members.d.ts.map +1 -0
  661. package/dist/model/artifact-members.js +38 -0
  662. package/dist/model/artifact-members.js.map +1 -0
  663. package/dist/model/composition.d.ts +47 -0
  664. package/dist/model/composition.d.ts.map +1 -0
  665. package/dist/model/composition.js +66 -0
  666. package/dist/model/composition.js.map +1 -0
  667. package/dist/model/domain.d.ts +51 -0
  668. package/dist/model/domain.d.ts.map +1 -0
  669. package/dist/model/domain.js +75 -0
  670. package/dist/model/domain.js.map +1 -0
  671. package/dist/model/duration.d.ts +31 -0
  672. package/dist/model/duration.d.ts.map +1 -0
  673. package/dist/model/duration.js +136 -0
  674. package/dist/model/duration.js.map +1 -0
  675. package/dist/model/errors.d.ts +58 -0
  676. package/dist/model/errors.d.ts.map +1 -0
  677. package/dist/model/errors.js +81 -0
  678. package/dist/model/errors.js.map +1 -0
  679. package/dist/model/evolution.d.ts +177 -0
  680. package/dist/model/evolution.d.ts.map +1 -0
  681. package/dist/model/evolution.js +5 -0
  682. package/dist/model/evolution.js.map +1 -0
  683. package/dist/model/expr-children.d.ts +15 -0
  684. package/dist/model/expr-children.d.ts.map +1 -0
  685. package/dist/model/expr-children.js +45 -0
  686. package/dist/model/expr-children.js.map +1 -0
  687. package/dist/model/guards.d.ts +9 -0
  688. package/dist/model/guards.d.ts.map +1 -0
  689. package/dist/model/guards.js +11 -0
  690. package/dist/model/guards.js.map +1 -0
  691. package/dist/model/input.d.ts +42 -0
  692. package/dist/model/input.d.ts.map +1 -0
  693. package/dist/model/input.js +26 -0
  694. package/dist/model/input.js.map +1 -0
  695. package/dist/model/integer.d.ts +14 -0
  696. package/dist/model/integer.d.ts.map +1 -0
  697. package/dist/model/integer.js +16 -0
  698. package/dist/model/integer.js.map +1 -0
  699. package/dist/model/intrinsic.d.ts +18 -0
  700. package/dist/model/intrinsic.d.ts.map +1 -0
  701. package/dist/model/intrinsic.js +21 -0
  702. package/dist/model/intrinsic.js.map +1 -0
  703. package/dist/model/layout.d.ts +129 -0
  704. package/dist/model/layout.d.ts.map +1 -0
  705. package/dist/model/layout.js +2 -0
  706. package/dist/model/layout.js.map +1 -0
  707. package/dist/model/media.d.ts +33 -0
  708. package/dist/model/media.d.ts.map +1 -0
  709. package/dist/model/media.js +86 -0
  710. package/dist/model/media.js.map +1 -0
  711. package/dist/model/members.generated.d.ts +11 -0
  712. package/dist/model/members.generated.d.ts.map +1 -0
  713. package/dist/model/members.generated.js +71 -0
  714. package/dist/model/members.generated.js.map +1 -0
  715. package/dist/model/row-address.d.ts +27 -0
  716. package/dist/model/row-address.d.ts.map +1 -0
  717. package/dist/model/row-address.js +146 -0
  718. package/dist/model/row-address.js.map +1 -0
  719. package/dist/model/schema.d.ts +108 -0
  720. package/dist/model/schema.d.ts.map +1 -0
  721. package/dist/model/schema.js +2 -0
  722. package/dist/model/schema.js.map +1 -0
  723. package/dist/model/shape.d.ts +193 -0
  724. package/dist/model/shape.d.ts.map +1 -0
  725. package/dist/model/shape.js +2 -0
  726. package/dist/model/shape.js.map +1 -0
  727. package/dist/model/time.d.ts +61 -0
  728. package/dist/model/time.d.ts.map +1 -0
  729. package/dist/model/time.js +110 -0
  730. package/dist/model/time.js.map +1 -0
  731. package/dist/model/types.d.ts +1329 -0
  732. package/dist/model/types.d.ts.map +1 -0
  733. package/dist/model/types.js +424 -0
  734. package/dist/model/types.js.map +1 -0
  735. package/dist/model/values.d.ts +91 -0
  736. package/dist/model/values.d.ts.map +1 -0
  737. package/dist/model/values.js +195 -0
  738. package/dist/model/values.js.map +1 -0
  739. package/dist/model/wire.d.ts +356 -0
  740. package/dist/model/wire.d.ts.map +1 -0
  741. package/dist/model/wire.js +1504 -0
  742. package/dist/model/wire.js.map +1 -0
  743. package/dist/offline/index.d.ts +374 -0
  744. package/dist/offline/index.d.ts.map +1 -0
  745. package/dist/offline/index.js +422 -0
  746. package/dist/offline/index.js.map +1 -0
  747. package/dist/testing.d.ts +30 -0
  748. package/dist/testing.d.ts.map +1 -0
  749. package/dist/testing.js +42 -0
  750. package/dist/testing.js.map +1 -0
  751. package/dist/version.d.ts +30 -0
  752. package/dist/version.d.ts.map +1 -0
  753. package/dist/version.js +116 -0
  754. package/dist/version.js.map +1 -0
  755. package/package.json +98 -3
@@ -0,0 +1,176 @@
1
+ import { AxiomError } from '../model/errors.js';
2
+ import { refusalOf, toGateOverride } from '../model/wire.js';
3
+ import { reportStatus, sealReport } from './seal.js';
4
+ /**
5
+ * Reads every host-supplied override through the boundary.
6
+ *
7
+ * A malformed record is refused with its cause rather than thrown: an approval step that
8
+ * stored a broken record is a fact about that record, not a failure of the gate call, and
9
+ * the well-formed overrides beside it still stand.
10
+ *
11
+ * The record states no approval state of its own (`RULES-4.1.1`): that state is the host's
12
+ * record, and a member here could only invite a reader to treat it as the engine's verdict. What
13
+ * approves an override is its presence in the set the host hands `evaluateGate`, and the three
14
+ * hashes then bind that approval to the one gate decision it was recorded against. A client that
15
+ * computes a matching hash can therefore
16
+ * satisfy its own client verdict — which is why that verdict is a proposal the server re-derives
17
+ * (`[ACCESS-7.1.4]`) — and `evaluateSubmission` admits no `overrides` member at all, so a
18
+ * forwarded body cannot nominate an approval set for itself.
19
+ */
20
+ export function readGateOverrides(overrides) {
21
+ const wellFormed = [];
22
+ const refused = [];
23
+ overrides.forEach((raw, index) => {
24
+ try {
25
+ wellFormed.push(toGateOverride(raw, `$.overrides[${String(index)}]`));
26
+ }
27
+ catch (error) {
28
+ if (!(error instanceof AxiomError))
29
+ throw error;
30
+ // The one data form the wire boundary already answers with, so a malformed override names
31
+ // its member the same way a bad submitted value does. `detail` no longer repeats the path;
32
+ // the path is a member of the refusal and a host can branch on it.
33
+ const refusal = refusalOf(error);
34
+ refused.push({
35
+ override: raw,
36
+ reason: 'malformed',
37
+ path: refusal.path,
38
+ detail: refusal.detail,
39
+ });
40
+ }
41
+ });
42
+ return { wellFormed, refused };
43
+ }
44
+ /**
45
+ * The diagnostics an accepted override waives.
46
+ *
47
+ * An approval decides the gate, so it waives exactly the causes of that gate's decision: the
48
+ * gate rule's own `UNDETERMINED`, and the refusals the gate's own reads observed. Everything
49
+ * else stays folded into the report status — an override says "a human accepted this gate's
50
+ * verdict", never "a table the record could not be checked against no longer matters", and
51
+ * never "the engine's failure is not a failure".
52
+ */
53
+ const WAIVED_CODES = new Set(['UNDETERMINED', 'ACCESS_DENIED']);
54
+ function waivedDiagnostics(diagnostics, gateRuleId, deniedFields) {
55
+ const denied = new Set(deniedFields);
56
+ const waived = new Set();
57
+ for (const diagnostic of diagnostics) {
58
+ if (!WAIVED_CODES.has(diagnostic.code))
59
+ continue;
60
+ if (diagnostic.code === 'UNDETERMINED' && diagnostic.ruleId === gateRuleId) {
61
+ waived.add(diagnostic);
62
+ }
63
+ else if (diagnostic.code === 'ACCESS_DENIED' &&
64
+ diagnostic.fieldId !== undefined &&
65
+ denied.has(diagnostic.fieldId)) {
66
+ waived.add(diagnostic);
67
+ }
68
+ }
69
+ return waived;
70
+ }
71
+ /**
72
+ * The report status once the waived gates are `PASS`: every other block-severity rule and every
73
+ * unwaived block diagnostic still folds, so the report never says `PASS` over evidence it
74
+ * could not resolve. The kind travels with each result because the fold reads it: a
75
+ * `visible`/`required`/`enabled` `FAIL` is a branch that blocks nothing (`RULES-1.1.5`), and an
76
+ * override must not fold the record differently from the report it rewrote.
77
+ */
78
+ function waivedStatus(rules, diagnostics, waived) {
79
+ return reportStatus(rules, diagnostics.filter((diagnostic) => !waived.has(diagnostic)));
80
+ }
81
+ /**
82
+ * The report with every approved gate marked `PASS` and every approval recorded.
83
+ *
84
+ * The waiver sets are unioned before the status is computed. Rewriting one gate at a time would
85
+ * make the next gate fold the retained diagnostic stream afresh and resurrect the previous gate's
86
+ * waiver. Every diagnostic stays as evidence; only its contribution to the status is waived.
87
+ *
88
+ * This is the trusted applier: every entry must already have been weighed against the report and
89
+ * the gate it names. `decideGate` does that weighing, and `applyApprovedOverrides` now does it too
90
+ * rather than leaving it to its caller, so neither public door forwards an unweighed record here.
91
+ * It rewrites the gate id it is handed without re-reading the approval.
92
+ */
93
+ export function applyApprovedOverrideBatch(report, approvals) {
94
+ const approvedGateIds = new Set(approvals.map((approval) => approval.gateRuleId));
95
+ const rules = report.rules.map((result) => approvedGateIds.has(result.ruleId) ? { ...result, status: 'PASS' } : result);
96
+ let gates = report.gates;
97
+ const waived = new Set();
98
+ for (const approval of approvals) {
99
+ const gate = gates?.[approval.gateRuleId];
100
+ if (gate !== undefined) {
101
+ gates = {
102
+ ...gates,
103
+ [approval.gateRuleId]: { ...gate, overrides: approval.accepted },
104
+ };
105
+ }
106
+ for (const diagnostic of waivedDiagnostics(report.diagnostics, approval.gateRuleId, approval.deniedFields)) {
107
+ waived.add(diagnostic);
108
+ }
109
+ }
110
+ // An approval changes the verdict, the rule results it waives and the gate entries it records;
111
+ // every other member is evidence the evaluation produced and must survive verbatim. Rebuilding
112
+ // the body from an allowlist silently dropped `composition`, so the re-sealed hash no longer
113
+ // covered which configuration produced the report (`[EVOL-4.1.4]`). The spread keeps the whole
114
+ // report and only the digest is removed, because the seal must hash the body without it.
115
+ const { reportHash: _previousHash, ...facts } = report;
116
+ const body = {
117
+ ...facts,
118
+ status: waivedStatus(rules, report.diagnostics, waived),
119
+ rules,
120
+ ...(gates === undefined ? {} : { gates }),
121
+ };
122
+ return sealReport(body);
123
+ }
124
+ /**
125
+ * Whether one accepted record approves this gate of this report.
126
+ *
127
+ * The report alone states three of the four facts an approval is bound to: the record names the
128
+ * gate, the gate result's `ruleHash` is the one the record was minted against, and the report's
129
+ * `behaviorHash` is the artifact's. The fourth, `inputHash`, is the record's own values, which
130
+ * the report deliberately does not carry, so only `evaluateGate` — which holds the record and the
131
+ * environment — can weigh it.
132
+ *
133
+ * `gateResult` is the named gate's entry in `report.rules`, so a caller that already found it
134
+ * does not re-scan the report once per record. Sharing this predicate is what keeps the trusted
135
+ * applier and the untrusted door from disagreeing about which records belong to a gate.
136
+ */
137
+ export function approvalMatchesReport(report, gateResult, override) {
138
+ return (override.gateId === gateResult.ruleId &&
139
+ override.ruleHash === gateResult.ruleHash &&
140
+ override.behaviorHash === report.behaviorHash);
141
+ }
142
+ /**
143
+ * The report with one gate's accepted overrides applied, or a refusal that changes nothing.
144
+ *
145
+ * This is a replay for a host that has already decided an approval, not the door for an untrusted
146
+ * record. It weighs the three facts a report can state about the records it is handed — each
147
+ * names the gate, the gate's `ruleHash` and the artifact's `behaviorHash` still match — and it
148
+ * applies only those records. When none survives, it refuses the whole call with a typed
149
+ * `AxiomError` at `$.accepted`; the report the caller passed is unchanged, because nothing is
150
+ * built until a record has proved it belongs to this gate.
151
+ *
152
+ * It cannot weigh `inputHash` (the report does not carry the record it was decided from) or a
153
+ * gate's `hard` declaration (the report does not carry the artifact), so a host holding an
154
+ * unvetted record calls `evaluateGate`, which weighs all three hashes and the declaration and
155
+ * reports each refusal as data. This helper's throw is the same boundary one level up:
156
+ * `readGateOverrides` reports a malformed *record* as data because the record crossed from an
157
+ * untrusted store, while a call that proves nothing about the gate it names violates this
158
+ * helper's precondition — and returning the report unchanged would make "nothing was approved"
159
+ * indistinguishable from "this gate was approved".
160
+ *
161
+ * An accepted record can no more approve itself here than at `evaluateGate`: a record minted for
162
+ * another gate, another artifact or another version of the gate rule is not applied, and the
163
+ * gate keeps the verdict the evaluation decided.
164
+ */
165
+ export function applyApprovedOverrides(report, gateRuleId, accepted, deniedFields) {
166
+ const gateResult = report.rules.find((result) => result.ruleId === gateRuleId);
167
+ if (gateResult === undefined || report.gates?.[gateRuleId] === undefined) {
168
+ throw new AxiomError('ENGINE_ERROR', `the report carries no gate ${gateRuleId}`, '$.gateRuleId');
169
+ }
170
+ const approved = accepted.filter((override) => approvalMatchesReport(report, gateResult, override));
171
+ if (approved.length === 0) {
172
+ throw new AxiomError('ENGINE_ERROR', `no accepted override approves gate ${gateRuleId} of this report`, '$.accepted');
173
+ }
174
+ return applyApprovedOverrideBatch(report, [{ gateRuleId, accepted: approved, deniedFields }]);
175
+ }
176
+ //# sourceMappingURL=overrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../src/eval/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAShD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAyDrD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAA6B;I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YAA+B;IAE/B,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;IAC/E,IAAI,UAAU,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE,CAAC;QACzE,MAAM,IAAI,UAAU,CAClB,cAAc,EACd,8BAA8B,UAAU,EAAE,EAC1C,cAAc,CACf,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC5C,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CACpD,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,UAAU,CAClB,cAAc,EACd,sCAAsC,UAAU,iBAAiB,EACjE,YAAY,CACb,CAAC;IACJ,CAAC;IACD,OAAO,0BAA0B,CAAC,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AAChG,CAAC","sourcesContent":["import { AxiomError } from '../model/errors.js';\nimport type {\n Diagnostic,\n DiagnosticCode,\n EvaluationReport,\n GateOverride,\n Outcome,\n RuleResult,\n} from '../model/types.js';\nimport { refusalOf, toGateOverride } from '../model/wire.js';\nimport { reportStatus, sealReport } from './seal.js';\nimport type { FoldableResult } from './seal.js';\n\n/**\n * Gate overrides at the stateless boundary: reading what a host approved, and what an\n * approval waives.\n *\n * Axiom never approves an override — the host does — so the record arrives untrusted. It is\n * read into the closed `gateOverride` shape here, and an accepted one is the reader's own\n * frozen record rather than the caller's object, so a host that keeps writing to its copy\n * cannot rewrite a decision the report already binds.\n */\n\n/** Why a gate call would not accept one override. */\nexport type GateOverrideRefusal =\n | 'malformed'\n | 'hard_gate'\n | 'inactive_gate'\n | 'stale'\n | 'unknown_gate'\n | 'no_gate'\n | 'unreadable_input';\n\n/**\n * One override the call would not accept, with the reason it was refused.\n *\n * `override` is the caller's value as supplied: a malformed record has no `GateOverride`\n * shape to report, and stating what arrived is what lets a host find the record it stored\n * wrong. A refusal that only says \"malformed\" names neither the member nor the rule, which is\n * the least an operator repairing the record that a credit decision was recorded against needs,\n * so the malformed arm carries the same `path` and `detail` the wire door states for a bad value.\n */\nexport interface GateRefusal {\n readonly override: unknown;\n readonly reason: GateOverrideRefusal;\n /**\n * The member a malformed record broke, in the request's own path spelling: a lower-case\n * `reasonCode` is refused at `$.overrides[i].reasonCode`, a missing one at `$.overrides[i]`.\n * Absent when the refusal is about the gate rather than a record's shape.\n */\n readonly path?: string;\n /** Why a malformed record was refused, without the path; absent for a well-formed record. */\n readonly detail?: string;\n}\n\n/** What a gate call accepted and refused. */\nexport interface GateOverrideOutcome {\n readonly accepted: readonly GateOverride[];\n readonly refused: readonly GateRefusal[];\n}\n\n/** The overrides that crossed the boundary, before any of them is weighed against the gate. */\nexport interface ReadOverrides {\n readonly wellFormed: readonly GateOverride[];\n readonly refused: readonly GateRefusal[];\n}\n\n/**\n * Reads every host-supplied override through the boundary.\n *\n * A malformed record is refused with its cause rather than thrown: an approval step that\n * stored a broken record is a fact about that record, not a failure of the gate call, and\n * the well-formed overrides beside it still stand.\n *\n * The record states no approval state of its own (`RULES-4.1.1`): that state is the host's\n * record, and a member here could only invite a reader to treat it as the engine's verdict. What\n * approves an override is its presence in the set the host hands `evaluateGate`, and the three\n * hashes then bind that approval to the one gate decision it was recorded against. A client that\n * computes a matching hash can therefore\n * satisfy its own client verdict — which is why that verdict is a proposal the server re-derives\n * (`[ACCESS-7.1.4]`) — and `evaluateSubmission` admits no `overrides` member at all, so a\n * forwarded body cannot nominate an approval set for itself.\n */\nexport function readGateOverrides(overrides: readonly unknown[]): ReadOverrides {\n const wellFormed: GateOverride[] = [];\n const refused: GateRefusal[] = [];\n overrides.forEach((raw, index) => {\n try {\n wellFormed.push(toGateOverride(raw, `$.overrides[${String(index)}]`));\n } catch (error) {\n if (!(error instanceof AxiomError)) throw error;\n // The one data form the wire boundary already answers with, so a malformed override names\n // its member the same way a bad submitted value does. `detail` no longer repeats the path;\n // the path is a member of the refusal and a host can branch on it.\n const refusal = refusalOf(error);\n refused.push({\n override: raw,\n reason: 'malformed',\n path: refusal.path,\n detail: refusal.detail,\n });\n }\n });\n return { wellFormed, refused };\n}\n\n/**\n * The diagnostics an accepted override waives.\n *\n * An approval decides the gate, so it waives exactly the causes of that gate's decision: the\n * gate rule's own `UNDETERMINED`, and the refusals the gate's own reads observed. Everything\n * else stays folded into the report status — an override says \"a human accepted this gate's\n * verdict\", never \"a table the record could not be checked against no longer matters\", and\n * never \"the engine's failure is not a failure\".\n */\nconst WAIVED_CODES: ReadonlySet<DiagnosticCode> = new Set(['UNDETERMINED', 'ACCESS_DENIED']);\n\nfunction waivedDiagnostics(\n diagnostics: readonly Diagnostic[],\n gateRuleId: string,\n deniedFields: readonly string[],\n): ReadonlySet<Diagnostic> {\n const denied = new Set(deniedFields);\n const waived = new Set<Diagnostic>();\n for (const diagnostic of diagnostics) {\n if (!WAIVED_CODES.has(diagnostic.code)) continue;\n if (diagnostic.code === 'UNDETERMINED' && diagnostic.ruleId === gateRuleId) {\n waived.add(diagnostic);\n } else if (\n diagnostic.code === 'ACCESS_DENIED' &&\n diagnostic.fieldId !== undefined &&\n denied.has(diagnostic.fieldId)\n ) {\n waived.add(diagnostic);\n }\n }\n return waived;\n}\n\n/**\n * The report status once the waived gates are `PASS`: every other block-severity rule and every\n * unwaived block diagnostic still folds, so the report never says `PASS` over evidence it\n * could not resolve. The kind travels with each result because the fold reads it: a\n * `visible`/`required`/`enabled` `FAIL` is a branch that blocks nothing (`RULES-1.1.5`), and an\n * override must not fold the record differently from the report it rewrote.\n */\nfunction waivedStatus(\n rules: readonly FoldableResult[],\n diagnostics: readonly Diagnostic[],\n waived: ReadonlySet<Diagnostic>,\n): Outcome {\n return reportStatus(\n rules,\n diagnostics.filter((diagnostic) => !waived.has(diagnostic)),\n );\n}\n\n/**\n * The report with every approved gate marked `PASS` and every approval recorded.\n *\n * The waiver sets are unioned before the status is computed. Rewriting one gate at a time would\n * make the next gate fold the retained diagnostic stream afresh and resurrect the previous gate's\n * waiver. Every diagnostic stays as evidence; only its contribution to the status is waived.\n *\n * This is the trusted applier: every entry must already have been weighed against the report and\n * the gate it names. `decideGate` does that weighing, and `applyApprovedOverrides` now does it too\n * rather than leaving it to its caller, so neither public door forwards an unweighed record here.\n * It rewrites the gate id it is handed without re-reading the approval.\n */\nexport function applyApprovedOverrideBatch(\n report: EvaluationReport,\n approvals: readonly {\n readonly gateRuleId: string;\n readonly accepted: readonly GateOverride[];\n readonly deniedFields: readonly string[];\n }[],\n): EvaluationReport {\n const approvedGateIds = new Set(approvals.map((approval) => approval.gateRuleId));\n const rules = report.rules.map((result) =>\n approvedGateIds.has(result.ruleId) ? { ...result, status: 'PASS' as const } : result,\n );\n let gates = report.gates;\n const waived = new Set<Diagnostic>();\n for (const approval of approvals) {\n const gate = gates?.[approval.gateRuleId];\n if (gate !== undefined) {\n gates = {\n ...gates,\n [approval.gateRuleId]: { ...gate, overrides: approval.accepted },\n };\n }\n for (const diagnostic of waivedDiagnostics(\n report.diagnostics,\n approval.gateRuleId,\n approval.deniedFields,\n )) {\n waived.add(diagnostic);\n }\n }\n // An approval changes the verdict, the rule results it waives and the gate entries it records;\n // every other member is evidence the evaluation produced and must survive verbatim. Rebuilding\n // the body from an allowlist silently dropped `composition`, so the re-sealed hash no longer\n // covered which configuration produced the report (`[EVOL-4.1.4]`). The spread keeps the whole\n // report and only the digest is removed, because the seal must hash the body without it.\n const { reportHash: _previousHash, ...facts } = report;\n const body = {\n ...facts,\n status: waivedStatus(rules, report.diagnostics, waived),\n rules,\n ...(gates === undefined ? {} : { gates }),\n } satisfies Omit<EvaluationReport, 'reportHash'>;\n return sealReport(body);\n}\n\n/**\n * Whether one accepted record approves this gate of this report.\n *\n * The report alone states three of the four facts an approval is bound to: the record names the\n * gate, the gate result's `ruleHash` is the one the record was minted against, and the report's\n * `behaviorHash` is the artifact's. The fourth, `inputHash`, is the record's own values, which\n * the report deliberately does not carry, so only `evaluateGate` — which holds the record and the\n * environment — can weigh it.\n *\n * `gateResult` is the named gate's entry in `report.rules`, so a caller that already found it\n * does not re-scan the report once per record. Sharing this predicate is what keeps the trusted\n * applier and the untrusted door from disagreeing about which records belong to a gate.\n */\nexport function approvalMatchesReport(\n report: EvaluationReport,\n gateResult: RuleResult,\n override: GateOverride,\n): boolean {\n return (\n override.gateId === gateResult.ruleId &&\n override.ruleHash === gateResult.ruleHash &&\n override.behaviorHash === report.behaviorHash\n );\n}\n\n/**\n * The report with one gate's accepted overrides applied, or a refusal that changes nothing.\n *\n * This is a replay for a host that has already decided an approval, not the door for an untrusted\n * record. It weighs the three facts a report can state about the records it is handed — each\n * names the gate, the gate's `ruleHash` and the artifact's `behaviorHash` still match — and it\n * applies only those records. When none survives, it refuses the whole call with a typed\n * `AxiomError` at `$.accepted`; the report the caller passed is unchanged, because nothing is\n * built until a record has proved it belongs to this gate.\n *\n * It cannot weigh `inputHash` (the report does not carry the record it was decided from) or a\n * gate's `hard` declaration (the report does not carry the artifact), so a host holding an\n * unvetted record calls `evaluateGate`, which weighs all three hashes and the declaration and\n * reports each refusal as data. This helper's throw is the same boundary one level up:\n * `readGateOverrides` reports a malformed *record* as data because the record crossed from an\n * untrusted store, while a call that proves nothing about the gate it names violates this\n * helper's precondition — and returning the report unchanged would make \"nothing was approved\"\n * indistinguishable from \"this gate was approved\".\n *\n * An accepted record can no more approve itself here than at `evaluateGate`: a record minted for\n * another gate, another artifact or another version of the gate rule is not applied, and the\n * gate keeps the verdict the evaluation decided.\n */\nexport function applyApprovedOverrides(\n report: EvaluationReport,\n gateRuleId: string,\n accepted: readonly GateOverride[],\n deniedFields: readonly string[],\n): EvaluationReport {\n const gateResult = report.rules.find((result) => result.ruleId === gateRuleId);\n if (gateResult === undefined || report.gates?.[gateRuleId] === undefined) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `the report carries no gate ${gateRuleId}`,\n '$.gateRuleId',\n );\n }\n const approved = accepted.filter((override) =>\n approvalMatchesReport(report, gateResult, override),\n );\n if (approved.length === 0) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `no accepted override approves gate ${gateRuleId} of this report`,\n '$.accepted',\n );\n }\n return applyApprovedOverrideBatch(report, [{ gateRuleId, accepted: approved, deniedFields }]);\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import type { LiteralDomain } from '../model/types.js';
2
+ /**
3
+ * The path answers a binder scope gives, memoised for one evaluation.
4
+ *
5
+ * A comprehension asks the same question of the same path once per element — what segments
6
+ * it spells, which declared path the binder maps it to, and the primitive that declaration
7
+ * pins — while the declaration cannot change during the evaluation. Splitting and joining
8
+ * the text again was pure per-element allocation. The memo is per evaluator, so it never
9
+ * outlives the artifact and record it was derived for.
10
+ */
11
+ export declare class BinderPaths {
12
+ private readonly segments;
13
+ private readonly declarations;
14
+ private readonly domains;
15
+ /** The segments of a dotted path. */
16
+ segmentsOf(path: string): readonly string[];
17
+ /**
18
+ * The declared path a binder path names. A binder alone has no member path to descend
19
+ * through; only a member below it is resolved against the array's declaration.
20
+ */
21
+ declarationOf(path: string, origin: string, head: string): string | undefined;
22
+ /** The primitive a declaration pins, memoised by the declaration path. */
23
+ domainOf(declaration: string, declaredDomain: (path: string) => LiteralDomain | undefined): LiteralDomain | undefined;
24
+ }
25
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/eval/paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwC;IACjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyC;IACtE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgD;IAExE,qCAAqC;IACrC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAM1C;IAED;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ5E;IAED,0EAA0E;IAC1E,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,GAC1D,aAAa,GAAG,SAAS,CAK3B;CACF"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The path answers a binder scope gives, memoised for one evaluation.
3
+ *
4
+ * A comprehension asks the same question of the same path once per element — what segments
5
+ * it spells, which declared path the binder maps it to, and the primitive that declaration
6
+ * pins — while the declaration cannot change during the evaluation. Splitting and joining
7
+ * the text again was pure per-element allocation. The memo is per evaluator, so it never
8
+ * outlives the artifact and record it was derived for.
9
+ */
10
+ export class BinderPaths {
11
+ segments = new Map();
12
+ declarations = new Map();
13
+ domains = new Map();
14
+ /** The segments of a dotted path. */
15
+ segmentsOf(path) {
16
+ const cached = this.segments.get(path);
17
+ if (cached !== undefined)
18
+ return cached;
19
+ const segments = path.split('.');
20
+ this.segments.set(path, segments);
21
+ return segments;
22
+ }
23
+ /**
24
+ * The declared path a binder path names. A binder alone has no member path to descend
25
+ * through; only a member below it is resolved against the array's declaration.
26
+ */
27
+ declarationOf(path, origin, head) {
28
+ if (head === '$i')
29
+ return undefined;
30
+ const key = `${origin}\u0000${path}`;
31
+ if (this.declarations.has(key))
32
+ return this.declarations.get(key);
33
+ const rest = this.segmentsOf(path).slice(1);
34
+ const declaration = rest.length === 0 ? undefined : `${origin}.${rest.join('.')}`;
35
+ this.declarations.set(key, declaration);
36
+ return declaration;
37
+ }
38
+ /** The primitive a declaration pins, memoised by the declaration path. */
39
+ domainOf(declaration, declaredDomain) {
40
+ if (this.domains.has(declaration))
41
+ return this.domains.get(declaration);
42
+ const domain = declaredDomain(declaration);
43
+ this.domains.set(declaration, domain);
44
+ return domain;
45
+ }
46
+ }
47
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/eval/paths.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAW;IACL,QAAQ,GAAG,IAAI,GAAG,EAA6B,CAAC;IAChD,YAAY,GAAG,IAAI,GAAG,EAA8B,CAAC;IACrD,OAAO,GAAG,IAAI,GAAG,EAAqC,CAAC;IAExE,qCAAqC;IACrC,UAAU,CAAC,IAAY;QACrB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAClC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY;QACtD,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,SAAS,CAAC;QACpC,MAAM,GAAG,GAAG,GAAG,MAAM,SAAS,IAAI,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClE,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClF,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QACxC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,0EAA0E;IAC1E,QAAQ,CACN,WAAmB,EACnB,cAA2D;QAE3D,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["import type { LiteralDomain } from '../model/types.js';\n\n/**\n * The path answers a binder scope gives, memoised for one evaluation.\n *\n * A comprehension asks the same question of the same path once per element — what segments\n * it spells, which declared path the binder maps it to, and the primitive that declaration\n * pins — while the declaration cannot change during the evaluation. Splitting and joining\n * the text again was pure per-element allocation. The memo is per evaluator, so it never\n * outlives the artifact and record it was derived for.\n */\nexport class BinderPaths {\n private readonly segments = new Map<string, readonly string[]>();\n private readonly declarations = new Map<string, string | undefined>();\n private readonly domains = new Map<string, LiteralDomain | undefined>();\n\n /** The segments of a dotted path. */\n segmentsOf(path: string): readonly string[] {\n const cached = this.segments.get(path);\n if (cached !== undefined) return cached;\n const segments = path.split('.');\n this.segments.set(path, segments);\n return segments;\n }\n\n /**\n * The declared path a binder path names. A binder alone has no member path to descend\n * through; only a member below it is resolved against the array's declaration.\n */\n declarationOf(path: string, origin: string, head: string): string | undefined {\n if (head === '$i') return undefined;\n const key = `${origin}\\u0000${path}`;\n if (this.declarations.has(key)) return this.declarations.get(key);\n const rest = this.segmentsOf(path).slice(1);\n const declaration = rest.length === 0 ? undefined : `${origin}.${rest.join('.')}`;\n this.declarations.set(key, declaration);\n return declaration;\n }\n\n /** The primitive a declaration pins, memoised by the declaration path. */\n domainOf(\n declaration: string,\n declaredDomain: (path: string) => LiteralDomain | undefined,\n ): LiteralDomain | undefined {\n if (this.domains.has(declaration)) return this.domains.get(declaration);\n const domain = declaredDomain(declaration);\n this.domains.set(declaration, domain);\n return domain;\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import type { ExprNode, Outcome, WireValue } from '../model/types.js';
2
+ /**
3
+ * The answers the presentation-only channel needs from one evaluation, `MODEL-3.1.11`.
4
+ *
5
+ * The channel is its own projection: it asks an evaluation for a field's visibility and
6
+ * access, and it evaluates the layout's expressions through the same reader and evaluator a
7
+ * rule uses. Nothing it reads reaches a report — the evaluation it asks is one this channel
8
+ * owns, and its diagnostics, provenance and considered refs are discarded with it.
9
+ */
10
+ export interface PresentationReads {
11
+ /** Whether the `visible` rules leave this field visible; a decided `FAIL` is the only hide. */
12
+ fieldVisible(fieldId: string): boolean;
13
+ /** Whether this field or a record container above it is hidden from the presentation. */
14
+ fieldHidden(fieldId: string): boolean;
15
+ /** The lattice outcome of a chrome predicate, where only a decided `FAIL` hides. */
16
+ outcomeOf(node: ExprNode): Outcome;
17
+ /** The decided canonical value of a readout or message argument, or `undefined`. */
18
+ valueOf(node: ExprNode): WireValue | undefined;
19
+ }
20
+ //# sourceMappingURL=presentation-reads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation-reads.d.ts","sourceRoot":"","sources":["../../src/eval/presentation-reads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,+FAA+F;IAC/F,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,yFAAyF;IACzF,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC,oFAAoF;IACpF,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACnC,oFAAoF;IACpF,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;CAChD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=presentation-reads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation-reads.js","sourceRoot":"","sources":["../../src/eval/presentation-reads.ts"],"names":[],"mappings":"","sourcesContent":["import type { ExprNode, Outcome, WireValue } from '../model/types.js';\n\n/**\n * The answers the presentation-only channel needs from one evaluation, `MODEL-3.1.11`.\n *\n * The channel is its own projection: it asks an evaluation for a field's visibility and\n * access, and it evaluates the layout's expressions through the same reader and evaluator a\n * rule uses. Nothing it reads reaches a report — the evaluation it asks is one this channel\n * owns, and its diagnostics, provenance and considered refs are discarded with it.\n */\nexport interface PresentationReads {\n /** Whether the `visible` rules leave this field visible; a decided `FAIL` is the only hide. */\n fieldVisible(fieldId: string): boolean;\n /** Whether this field or a record container above it is hidden from the presentation. */\n fieldHidden(fieldId: string): boolean;\n /** The lattice outcome of a chrome predicate, where only a decided `FAIL` hides. */\n outcomeOf(node: ExprNode): Outcome;\n /** The decided canonical value of a readout or message argument, or `undefined`. */\n valueOf(node: ExprNode): WireValue | undefined;\n}\n"]}
@@ -0,0 +1,122 @@
1
+ import type { LayoutTone } from '../model/layout.js';
2
+ import type { WireValue } from '../model/types.js';
3
+ import type { EvaluationEnv, EvaluationInput } from '../model/access.js';
4
+ import type { CompiledSchema } from '../model/schema.js';
5
+ /**
6
+ * The presentation-only channel, `spec/semantics/model-v1.md` `MODEL-3.1.11`.
7
+ *
8
+ * A layout is chrome: its `visibleWhen`, message `params` and summary-card `readouts` read the
9
+ * record to decide what to show, and none of that may reach the evaluation report. So the
10
+ * channel owns a dedicated evaluation and asks it for the presentation projection: the reads
11
+ * are made through the same access-safe and visibility-safe reader a rule uses, and the
12
+ * evaluation's diagnostics, provenance and considered refs are discarded with it.
13
+ *
14
+ * Visibility fails open. A `visibleWhen` hides only when it decides `FAIL`; `UNKNOWN`,
15
+ * `DEFERRED` and an evaluation error leave the chrome visible, because hiding is never how an
16
+ * undetermined presentation condition is allowed to answer. `hideWhenEmpty` counts a field's
17
+ * presence, not its readability: a `write_only` or `masked` field is present, and only
18
+ * `hidden` access or a `visible` rule that decided `FAIL` makes a container empty.
19
+ *
20
+ * One view is produced per layout node, carrying the message keys the caller resolves with
21
+ * `resolveSchemaLocale` and `formatMessage`, the evaluated parameters and readouts, and the
22
+ * derived `visible`/`empty` flags. The wizard cursor is the host's: step views carry their
23
+ * visibility, never a selected step.
24
+ */
25
+ /** One readout's label and the value the channel could decide for it. */
26
+ export interface LayoutReadoutView {
27
+ readonly labelKey: string;
28
+ /** Absent when the expression was undetermined, absent or refused; never a plaintext leak. */
29
+ readonly value?: WireValue;
30
+ }
31
+ interface LayoutNodeViewBase {
32
+ readonly nodeId: string;
33
+ /** Ancestor visibility and this node's own chrome predicate, folded into one answer. */
34
+ readonly visible: boolean;
35
+ readonly sectionId?: string;
36
+ }
37
+ export interface LayoutSectionView extends LayoutNodeViewBase {
38
+ readonly kind: 'section';
39
+ readonly titleKey: string;
40
+ readonly descriptionKey?: string;
41
+ readonly columns: number;
42
+ readonly collapsible: boolean;
43
+ /** The author's expanded state, absent when they stated none; the renderer chooses then. */
44
+ readonly defaultExpanded?: boolean;
45
+ readonly hideWhenEmpty: boolean;
46
+ /** Whether this container places no visible field leaf. */
47
+ readonly empty: boolean;
48
+ readonly children: readonly LayoutNodeView[];
49
+ }
50
+ export interface LayoutGroupView extends LayoutNodeViewBase {
51
+ readonly kind: 'group';
52
+ readonly titleKey?: string;
53
+ readonly descriptionKey?: string;
54
+ readonly columns: number;
55
+ readonly collapsible: boolean;
56
+ /** The author's expanded state, absent when they stated none; the renderer chooses then. */
57
+ readonly defaultExpanded?: boolean;
58
+ readonly hideWhenEmpty: boolean;
59
+ readonly empty: boolean;
60
+ readonly children: readonly LayoutNodeView[];
61
+ }
62
+ export interface LayoutWizardView extends LayoutNodeViewBase {
63
+ readonly kind: 'wizard';
64
+ readonly children: readonly LayoutStepView[];
65
+ }
66
+ export interface LayoutStepView extends LayoutNodeViewBase {
67
+ readonly kind: 'step';
68
+ readonly stepId: string;
69
+ readonly titleKey: string;
70
+ readonly descriptionKey?: string;
71
+ readonly gateId?: string;
72
+ readonly columns: number;
73
+ readonly hideWhenEmpty: boolean;
74
+ readonly empty: boolean;
75
+ readonly children: readonly LayoutNodeView[];
76
+ }
77
+ export interface LayoutFieldView extends LayoutNodeViewBase {
78
+ readonly kind: 'field';
79
+ readonly fieldId: string;
80
+ readonly colSpan: number;
81
+ }
82
+ export interface LayoutHeadingView extends LayoutNodeViewBase {
83
+ readonly kind: 'heading';
84
+ readonly titleKey: string;
85
+ readonly textKey?: string;
86
+ }
87
+ export interface LayoutCalloutView extends LayoutNodeViewBase {
88
+ readonly kind: 'callout';
89
+ readonly tone: LayoutTone;
90
+ readonly titleKey?: string;
91
+ readonly textKey: string;
92
+ readonly params?: Readonly<Record<string, WireValue>>;
93
+ }
94
+ export interface LayoutDividerView extends LayoutNodeViewBase {
95
+ readonly kind: 'divider';
96
+ }
97
+ export interface LayoutSopBlockView extends LayoutNodeViewBase {
98
+ readonly kind: 'sop_block';
99
+ readonly titleKey: string;
100
+ readonly textKey?: string;
101
+ readonly params?: Readonly<Record<string, WireValue>>;
102
+ }
103
+ export interface LayoutSummaryCardView extends LayoutNodeViewBase {
104
+ readonly kind: 'summary_card';
105
+ readonly titleKey: string;
106
+ readonly textKey?: string;
107
+ readonly params?: Readonly<Record<string, WireValue>>;
108
+ readonly readouts?: readonly LayoutReadoutView[];
109
+ readonly fields?: readonly string[];
110
+ }
111
+ /** One node of the presentation view, tagged by the same closed kinds as the artifact. */
112
+ export type LayoutNodeView = LayoutSectionView | LayoutGroupView | LayoutWizardView | LayoutStepView | LayoutFieldView | LayoutHeadingView | LayoutCalloutView | LayoutDividerView | LayoutSopBlockView | LayoutSummaryCardView;
113
+ /**
114
+ * The layout view for one record: presentation only, carrying no report.
115
+ *
116
+ * The evaluation this builds is the channel's own, so a chrome predicate that reads a stored
117
+ * `write_only` or a `masked` value resolves `UNKNOWN` without delivering it and no read appears
118
+ * in any caller's `report.access`, `report.lookups` or `report.diagnostics`.
119
+ */
120
+ export declare function evaluatePresentation(compiled: CompiledSchema, input: EvaluationInput, env?: EvaluationEnv): readonly LayoutNodeView[];
121
+ export {};
122
+ //# sourceMappingURL=presentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/eval/presentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6B,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKzD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8FAA8F;IAC9F,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;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