@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,149 @@
1
+ import { diagnosticDoc } from '../expr/diagnostics.js';
2
+ import { liftOutcome } from '../expr/logic.js';
3
+ import { AxiomError } from '../model/errors.js';
4
+ import { isUndetermined, UNKNOWN } from '../model/types.js';
5
+ import { toEvaluationContext, toLookupPort } from '../model/wire.js';
6
+ import { assertExpressionReceipt } from './receipt.js';
7
+ import { createAccessWindow } from './access/window.js';
8
+ import { stillRedacted } from './access/projection.js';
9
+ import { contextRowCount, declaredRowCount, evaluationBudget } from './budget.js';
10
+ import { diagnosticOfEngineError } from './error-diagnostic.js';
11
+ import { ExpressionEvaluator } from './expression.js';
12
+ import { declaredColumnsOf } from './expr/host.js';
13
+ import { indexContextRoots, indexFields, NO_VISIBLE_RULES, RecordReader, reservedContextValues, } from './reader.js';
14
+ import { freezeTree } from './seal.js';
15
+ const DECLARATION_INDEXES = new WeakMap();
16
+ /**
17
+ * The field and context index of one declaration set, built once.
18
+ *
19
+ * A guard is evaluated once per interaction and the declaration set is the artifact's, not
20
+ * the record's, so rebuilding a 500-field index for every call was work the input could
21
+ * never change. The declarations are frozen when first indexed for the same reason the
22
+ * compiled schema is: a cache keyed by object identity is only sound while the object
23
+ * cannot change under it.
24
+ */
25
+ function declarationIndex(declarations) {
26
+ const cached = DECLARATION_INDEXES.get(declarations);
27
+ if (cached !== undefined)
28
+ return cached;
29
+ freezeTree(declarations);
30
+ const index = {
31
+ fieldsByPath: indexFields(declarations.fields ?? []),
32
+ contextRoots: indexContextRoots(declarations.context?.roots),
33
+ };
34
+ DECLARATION_INDEXES.set(declarations, index);
35
+ return index;
36
+ }
37
+ function diagnosticFor(error) {
38
+ // A guard has no rule around it, so its operation is the expression itself. The builder is the
39
+ // same one a rule uses, so a guard and a rule report one refusal the same way.
40
+ return diagnosticOfEngineError(error, { operation: 'expression' });
41
+ }
42
+ /**
43
+ * Evaluates a compiled expression against `record ⊕ context` and the environment's
44
+ * capability flags, `spec/semantics/context-v1.md`. It is a pure function of
45
+ * its arguments: no clock, locale, randomness or mutable global is read, and the input is
46
+ * never mutated.
47
+ *
48
+ * An absent top-level value is `UNKNOWN`, the same lifting gives a missing
49
+ * reading; a boolean value carries the guard `outcome` its type promises.
50
+ */
51
+ export function evaluateExpr(compiled, input, env = {}) {
52
+ assertExpressionReceipt(compiled);
53
+ // A guard reads declared datasets through the same port a schema evaluation does, and this
54
+ // door does not construct `Evaluation` (which is where the other doors read it), so the port
55
+ // is checked here: a partial one would otherwise fail inside the first `in_set` or `lookup`
56
+ // call rather than at the call that supplied it.
57
+ if (env.lookup !== undefined)
58
+ toLookupPort(env.lookup, '$.lookup');
59
+ const declarations = compiled.declarations;
60
+ // A guard reads its context through the same door a schema evaluation does: the record is
61
+ // closed by the declared roots, so a root nested under its first segment is refused at
62
+ // `$.context.<key>` rather than read as absent and reported `UNKNOWN` with no cause. The
63
+ // check throws here, as `evaluate()` does for the same malformed input.
64
+ const context = toEvaluationContext(declarations.context === undefined ? {} : { context: declarations.context }, input.context);
65
+ const checkedInput = {
66
+ ...input,
67
+ ...(context === undefined ? {} : { context }),
68
+ // A guard reads the same session value a form reads: the reference this session wrote is no
69
+ // longer the server's redaction, while every sibling and enclosing payload stays withheld.
70
+ ...(input.redacted === undefined
71
+ ? {}
72
+ : {
73
+ redacted: stillRedacted(declarations.fields ?? [], input.redacted, input.sessionWrites),
74
+ }),
75
+ };
76
+ const index = declarationIndex(declarations);
77
+ const diagnostics = [];
78
+ const columnsOf = declaredColumnsOf(env.lookup);
79
+ const reader = new RecordReader({
80
+ fieldsByPath: index.fieldsByPath,
81
+ contextRoots: index.contextRoots,
82
+ // A guard reads the reserved roots from the environment and the declarations it was
83
+ // compiled against, exactly as a rule inside a schema does.
84
+ reservedRoots: reservedContextValues(env.recordDate, declarations.schemaVersion),
85
+ }, checkedInput, createAccessWindow(declarations.fields ?? [], checkedInput, env), new Set(env.capabilities ?? []), (code, fieldId) => {
86
+ const doc = diagnosticDoc(code);
87
+ diagnostics.push({ code, severity: doc.severity, messageKey: doc.messageKey, fieldId });
88
+ },
89
+ // A guard is evaluated outside any schema's rules, so no `visible` rule can hide a
90
+ // field from it.
91
+ NO_VISIBLE_RULES);
92
+ const evaluator = new ExpressionEvaluator(reader, {
93
+ port: env.lookup,
94
+ ...(columnsOf === undefined ? {} : { columnsOf }),
95
+ recordDate: env.recordDate,
96
+ // A guard result is not an evaluation report, so a resolved hit's provenance has no
97
+ // destination here; the caller that needs seven-year provenance evaluates the rule in
98
+ // a report. A table the call could not resolve is still reported.
99
+ recordProvenance: () => undefined,
100
+ recordStaleData: (tableId, reason) => {
101
+ const doc = diagnosticDoc('STALE_DATA');
102
+ diagnostics.push({
103
+ code: 'STALE_DATA',
104
+ severity: doc.severity,
105
+ messageKey: doc.messageKey,
106
+ params: { tableId, reason },
107
+ });
108
+ },
109
+ }, undefined, evaluationBudget(declaredRowCount(declarations.fields, checkedInput.values) +
110
+ contextRowCount(declarations.context?.roots, checkedInput.context), 1));
111
+ try {
112
+ // One standalone expression is one rule's worth of work, so its allowance is the
113
+ // per-rule allowance and the pass ceiling is not separately reachable here.
114
+ evaluator.beginRule();
115
+ const evaluated = evaluator.evaluate(compiled.expr);
116
+ if (evaluated.kind === 'absent') {
117
+ return { kind: 'outcome', outcome: 'UNKNOWN', value: UNKNOWN, diagnostics };
118
+ }
119
+ if (isUndetermined(evaluated.value)) {
120
+ return {
121
+ kind: 'outcome',
122
+ outcome: evaluated.value.undetermined,
123
+ value: evaluated.value,
124
+ diagnostics,
125
+ };
126
+ }
127
+ if (typeof evaluated.value === 'boolean') {
128
+ return {
129
+ kind: 'outcome',
130
+ outcome: liftOutcome(evaluated.value),
131
+ value: evaluated.value,
132
+ diagnostics,
133
+ };
134
+ }
135
+ return { kind: 'value', value: evaluated.value, diagnostics };
136
+ }
137
+ catch (error) {
138
+ if (!(error instanceof AxiomError))
139
+ throw error;
140
+ const cause = diagnosticFor(error);
141
+ return {
142
+ kind: 'failed',
143
+ outcome: 'UNKNOWN',
144
+ diagnostic: cause,
145
+ diagnostics: [...diagnostics, cause],
146
+ };
147
+ }
148
+ }
149
+ //# sourceMappingURL=evaluate-expr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-expr.js","sourceRoot":"","sources":["../../src/eval/evaluate-expr.ts"],"names":[],"mappings":"AACA,O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K,EAAE,SAAS,CAAC,KAAK;gBACtB,WAAW;aACZ,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC;IAChE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,UAAU,CAAC;YAAE,MAAM,KAAK,CAAC;QAChD,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,CAAC,GAAG,WAAW,EAAE,KAAK,CAAC;SACrC,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import type { RuntimeValue } from '../expr/builtins.js';\nimport { diagnosticDoc } from '../expr/diagnostics.js';\nimport { liftOutcome } from '../expr/logic.js';\nimport { AxiomError } from '../model/errors.js';\nimport type {\n CompiledExpression,\n CompiledField,\n Diagnostic,\n ExpressionDeclarations,\n Outcome,\n} from '../model/types.js';\nimport type { EvaluationEnv, EvaluationInput } from '../model/access.js';\nimport { isUndetermined, UNKNOWN } from '../model/types.js';\nimport { toEvaluationContext, toLookupPort } from '../model/wire.js';\nimport { assertExpressionReceipt } from './receipt.js';\nimport { createAccessWindow } from './access/window.js';\nimport { stillRedacted } from './access/projection.js';\nimport { contextRowCount, declaredRowCount, evaluationBudget } from './budget.js';\nimport { diagnosticOfEngineError } from './error-diagnostic.js';\nimport { ExpressionEvaluator } from './expression.js';\nimport { declaredColumnsOf } from './expr/host.js';\nimport {\n indexContextRoots,\n indexFields,\n NO_VISIBLE_RULES,\n RecordReader,\n reservedContextValues,\n} from './reader.js';\nimport type { ContextRootDeclaration } from './reader.js';\nimport { freezeTree } from './seal.js';\n\n/** The declaration index a compiled expression is read through: input-independent. */\ninterface DeclarationIndex {\n readonly fieldsByPath: ReadonlyMap<string, CompiledField>;\n readonly contextRoots: ReadonlyMap<string, ContextRootDeclaration>;\n}\n\nconst DECLARATION_INDEXES: WeakMap<ExpressionDeclarations, DeclarationIndex> = new WeakMap();\n\n/**\n * The field and context index of one declaration set, built once.\n *\n * A guard is evaluated once per interaction and the declaration set is the artifact's, not\n * the record's, so rebuilding a 500-field index for every call was work the input could\n * never change. The declarations are frozen when first indexed for the same reason the\n * compiled schema is: a cache keyed by object identity is only sound while the object\n * cannot change under it.\n */\nfunction declarationIndex(declarations: ExpressionDeclarations): DeclarationIndex {\n const cached = DECLARATION_INDEXES.get(declarations);\n if (cached !== undefined) return cached;\n freezeTree(declarations);\n const index: DeclarationIndex = {\n fieldsByPath: indexFields(declarations.fields ?? []),\n contextRoots: indexContextRoots(declarations.context?.roots),\n };\n DECLARATION_INDEXES.set(declarations, index);\n return index;\n}\n\n/**\n * A standalone expression evaluation.\n *\n * The result is a tagged union rather than a value with a flag: a guard reads the\n * `outcome` member, a caller that compiled a scalar expression reads `value`, and a\n * refusal is its own variant carrying the diagnostic, so no caller can mistake a failed\n * evaluation for a decided one.\n */\nexport type ExprEvaluation =\n | {\n readonly kind: 'outcome';\n readonly outcome: Outcome;\n readonly value: RuntimeValue;\n readonly diagnostics: readonly Diagnostic[];\n }\n | {\n readonly kind: 'value';\n readonly value: RuntimeValue;\n readonly diagnostics: readonly Diagnostic[];\n }\n | {\n /**\n * The expression could not be decided: a construct that raised an\n * engine error decides nothing, so the guard outcome is `UNKNOWN` and the diagnostic\n * carries the cause instead of a plausible value. `diagnostics` keeps the trail the\n * expression recorded before it raised, the cause last: a guard that resolved a stale\n * table and then failed still says the table was missing.\n */\n readonly kind: 'failed';\n readonly outcome: 'UNKNOWN';\n readonly diagnostic: Diagnostic;\n readonly diagnostics: readonly Diagnostic[];\n };\n\nfunction diagnosticFor(error: AxiomError): Diagnostic {\n // A guard has no rule around it, so its operation is the expression itself. The builder is the\n // same one a rule uses, so a guard and a rule report one refusal the same way.\n return diagnosticOfEngineError(error, { operation: 'expression' });\n}\n\n/**\n * Evaluates a compiled expression against `record ⊕ context` and the environment's\n * capability flags, `spec/semantics/context-v1.md`. It is a pure function of\n * its arguments: no clock, locale, randomness or mutable global is read, and the input is\n * never mutated.\n *\n * An absent top-level value is `UNKNOWN`, the same lifting gives a missing\n * reading; a boolean value carries the guard `outcome` its type promises.\n */\nexport function evaluateExpr(\n compiled: CompiledExpression,\n input: EvaluationInput,\n env: EvaluationEnv = {},\n): ExprEvaluation {\n assertExpressionReceipt(compiled);\n // A guard reads declared datasets through the same port a schema evaluation does, and this\n // door does not construct `Evaluation` (which is where the other doors read it), so the port\n // is checked here: a partial one would otherwise fail inside the first `in_set` or `lookup`\n // call rather than at the call that supplied it.\n if (env.lookup !== undefined) toLookupPort(env.lookup, '$.lookup');\n const declarations: ExpressionDeclarations = compiled.declarations;\n // A guard reads its context through the same door a schema evaluation does: the record is\n // closed by the declared roots, so a root nested under its first segment is refused at\n // `$.context.<key>` rather than read as absent and reported `UNKNOWN` with no cause. The\n // check throws here, as `evaluate()` does for the same malformed input.\n const context = toEvaluationContext(\n declarations.context === undefined ? {} : { context: declarations.context },\n input.context,\n );\n const checkedInput: EvaluationInput = {\n ...input,\n ...(context === undefined ? {} : { context }),\n // A guard reads the same session value a form reads: the reference this session wrote is no\n // longer the server's redaction, while every sibling and enclosing payload stays withheld.\n ...(input.redacted === undefined\n ? {}\n : {\n redacted: stillRedacted(declarations.fields ?? [], input.redacted, input.sessionWrites),\n }),\n };\n const index = declarationIndex(declarations);\n const diagnostics: Diagnostic[] = [];\n const columnsOf = declaredColumnsOf(env.lookup);\n const reader = new RecordReader(\n {\n fieldsByPath: index.fieldsByPath,\n contextRoots: index.contextRoots,\n // A guard reads the reserved roots from the environment and the declarations it was\n // compiled against, exactly as a rule inside a schema does.\n reservedRoots: reservedContextValues(env.recordDate, declarations.schemaVersion),\n },\n checkedInput,\n createAccessWindow(declarations.fields ?? [], checkedInput, env),\n new Set(env.capabilities ?? []),\n (code, fieldId) => {\n const doc = diagnosticDoc(code);\n diagnostics.push({ code, severity: doc.severity, messageKey: doc.messageKey, fieldId });\n },\n // A guard is evaluated outside any schema's rules, so no `visible` rule can hide a\n // field from it.\n NO_VISIBLE_RULES,\n );\n const evaluator = new ExpressionEvaluator(\n reader,\n {\n port: env.lookup,\n ...(columnsOf === undefined ? {} : { columnsOf }),\n recordDate: env.recordDate,\n // A guard result is not an evaluation report, so a resolved hit's provenance has no\n // destination here; the caller that needs seven-year provenance evaluates the rule in\n // a report. A table the call could not resolve is still reported.\n recordProvenance: () => undefined,\n recordStaleData: (tableId, reason) => {\n const doc = diagnosticDoc('STALE_DATA');\n diagnostics.push({\n code: 'STALE_DATA',\n severity: doc.severity,\n messageKey: doc.messageKey,\n params: { tableId, reason },\n });\n },\n },\n undefined,\n evaluationBudget(\n declaredRowCount(declarations.fields, checkedInput.values) +\n contextRowCount(declarations.context?.roots, checkedInput.context),\n 1,\n ),\n );\n try {\n // One standalone expression is one rule's worth of work, so its allowance is the\n // per-rule allowance and the pass ceiling is not separately reachable here.\n evaluator.beginRule();\n const evaluated = evaluator.evaluate(compiled.expr);\n if (evaluated.kind === 'absent') {\n return { kind: 'outcome', outcome: 'UNKNOWN', value: UNKNOWN, diagnostics };\n }\n if (isUndetermined(evaluated.value)) {\n return {\n kind: 'outcome',\n outcome: evaluated.value.undetermined,\n value: evaluated.value,\n diagnostics,\n };\n }\n if (typeof evaluated.value === 'boolean') {\n return {\n kind: 'outcome',\n outcome: liftOutcome(evaluated.value),\n value: evaluated.value,\n diagnostics,\n };\n }\n return { kind: 'value', value: evaluated.value, diagnostics };\n } catch (error) {\n if (!(error instanceof AxiomError)) throw error;\n const cause = diagnosticFor(error);\n return {\n kind: 'failed',\n outcome: 'UNKNOWN',\n diagnostic: cause,\n diagnostics: [...diagnostics, cause],\n };\n }\n}\n"]}
@@ -0,0 +1,282 @@
1
+ import type { GateVerdict } from './gate.js';
2
+ import type { GateOverrideOutcome } from './overrides.js';
3
+ import type { FormStateOptions } from './state/options.js';
4
+ import type { Readiness } from './state/readiness.js';
5
+ import type { SubmissionProjectionOptions } from './submission.js';
6
+ import { submissionVerdict } from './verdict.js';
7
+ import type { EvaluationExplanation } from './report/assemble.js';
8
+ import type { EvaluationReport, GateReport } from '../model/types.js';
9
+ import type { EvaluationEnv, EvaluationInput, SubmissionAuthority } from '../model/access.js';
10
+ import type { CompiledSchema } from '../model/schema.js';
11
+ import type { HostOnlySubmissionMember } from '../model/wire.js';
12
+ import { artifactBehaviour, isArtifactBehaviourOf } from './rule/behaviour.js';
13
+ import type { SubmissionRefusal, SubmissionTrust, SubmissionTrustKind } from './submission/index.js';
14
+ export { artifactBehaviour, isArtifactBehaviourOf };
15
+ export type { ArtifactBehaviour, RuleBehaviour } from './rule/behaviour.js';
16
+ export { submissionVerdict };
17
+ export type { SubmissionDecision } from './verdict.js';
18
+ export type { EvaluationExplanation, RuleExplanation } from './report/assemble.js';
19
+ export type { CapturedSignature, SignatureRefusal, SubmissionRefusal, SubmissionRefusalCause, SubmissionRefusalCode, SubmissionTrust, SubmissionTrustKind, } from './submission/index.js';
20
+ /**
21
+ * Evaluates a compiled artifact against one record, `spec/semantics/context-v1.md`
22
+ * The function is pure: it reads no clock, no locale, no randomness and
23
+ * no mutable global, and it never mutates `input`. A compiled artifact is assumed to
24
+ * have passed the compiler's closed-schema validation; anything the walking skeleton
25
+ * cannot interpret is reported as `ENGINE_ERROR` and blocks rather than returning a
26
+ * plausible default.
27
+ *
28
+ * The version is read from the artifact and looked up in `EVALUATORS` before any rule runs: an
29
+ * artifact stating a version this build does not implement is refused by name, never evaluated
30
+ * as v1. `spec/release/expr-retention.json` records the arm and its evidence.
31
+ *
32
+ * The result is the sealed rules-only report. Admission is a separate answer:
33
+ * `evaluateReadiness(compiled, input, env, options)` states the `Readiness`
34
+ * (`SUBMIT`/`BLOCKED`/`UNDETERMINED`, its blockers and open checks), and
35
+ * `submissionVerdict()` states the same answer as its `outcome`. A host decides whether to
36
+ * submit from that answer, never from `report.status`.
37
+ */
38
+ export declare function evaluate(compiled: CompiledSchema, input: EvaluationInput, env?: EvaluationEnv, options?: FormStateOptions): EvaluationReport;
39
+ /**
40
+ * The one admission answer for a record already in the wire contract.
41
+ *
42
+ * It is `describeFormState` narrowed to what an admission decision reads: the verdict, the
43
+ * decided blockers, the open checks and whether a server handoff remains. `report.status` on the
44
+ * sealed report is the rules fold and can be `PASS` while this verdict is `BLOCKED`; a host gates
45
+ * on `readiness.verdict`, never on `status`. `submissionVerdict()` states the same facts as its
46
+ * `outcome` and `form`, and `evaluateSubmission().readiness` is the same shape for a body this
47
+ * process did not construct.
48
+ */
49
+ export declare function evaluateReadiness(compiled: CompiledSchema, input: EvaluationInput, env?: EvaluationEnv, options?: FormStateOptions): Readiness;
50
+ /**
51
+ * Evaluates a compiled artifact and explains it, `explain()`.
52
+ *
53
+ * The report is the canonical record; this adds the derivation behind it — the fields each
54
+ * rule read, the rules a gate folded, the diagnostics
55
+ * about that rule, and the seven-year provenance of every lookup *that rule* resolved
56
+ * A support engineer tracing an old decision reads this instead of
57
+ * replaying each rule by hand.
58
+ */
59
+ export declare function explain(compiled: CompiledSchema, input: EvaluationInput, env?: EvaluationEnv): EvaluationExplanation;
60
+ /**
61
+ * The host-only members a *typed* submission body states, if any.
62
+ *
63
+ * The conditional distributes, so a body typed as a union of shapes is caught when any arm states
64
+ * one. A member whose type is `never` cannot be present and states nothing; every other optional
65
+ * member may be present and counts. A body typed `unknown` — the untrusted input this door exists
66
+ * for — states no members at all, and neither does a type with a string index signature: its
67
+ * `keyof` collapses to `string | number`, so a member such a type also declares by name is still
68
+ * invisible here. An open record is this door's own input, so it crosses and the runtime refusal
69
+ * at `$.<member>` judges it.
70
+ */
71
+ type HostOnlyMemberOf<Body> = Body extends unknown ? {
72
+ [Member in Extract<keyof Body, HostOnlySubmissionMember>]: [
73
+ Required<Pick<Body, Member>>[Member]
74
+ ] extends [never] ? never : Member;
75
+ }[Extract<keyof Body, HostOnlySubmissionMember>] : never;
76
+ /**
77
+ * `unknown` for a body whose type states only the record, and a refusal naming the offending
78
+ * member otherwise.
79
+ *
80
+ * It is intersected with the body's own inferred type rather than used as the parameter type
81
+ * because TypeScript has no negation type: any non-generic parameter that admits an untrusted
82
+ * `unknown` admits every value, so the refusal has to be stated against what the caller's type
83
+ * says. The refusal is a message string — the runtime refusal's words, plus where the member
84
+ * does belong — so the compiler error names both instead of printing a bare `never`.
85
+ */
86
+ type SubmissionBodyGuard<Body> = [HostOnlyMemberOf<Body>] extends [never] ? unknown : `\`${HostOnlyMemberOf<Body> & string}\` is the host's answer about this submission, never a member of its body: state it as \`authority\``;
87
+ /**
88
+ * The answer to one untrusted submission: a sealed report, or the reason the body was refused.
89
+ *
90
+ * `outcome: 'evaluated'` is the *parse and authority* answer: the body was readable, the host
91
+ * facts were admitted, and every write the stated stance could judge was judged. It is not "the
92
+ * submission passed": `readiness.verdict` is the admission answer, and only `SUBMIT` is a record
93
+ * to store.
94
+ * `report.status` is the rules fold and can be `PASS` while a declared count, a media constraint or
95
+ * a hidden section still blocks; a `FAIL`, `UNKNOWN` or `DEFERRED` report is still the engine's
96
+ * answer about a record it read.
97
+ *
98
+ * The success arm carries the parsed `input` and `env` the report was decided from, so a host
99
+ * that exports the record exports the one this report describes rather than re-parsing a body
100
+ * that may have changed in between. The input is the merged record: the server's `heldValues`
101
+ * beneath the body's writable answers.
102
+ */
103
+ export type SubmissionEvaluation = {
104
+ /**
105
+ * The body was read, its authority was judged, and a sealed report exists.
106
+ *
107
+ * This is not admission. `readiness.verdict` is the admission answer, and only `SUBMIT`
108
+ * is a record to store. The discriminator is named for what happened rather than for a
109
+ * verdict, because `ok` reads as "the submission is fine", and storing the record is the
110
+ * one decision this door leaves to the host.
111
+ */
112
+ readonly outcome: 'evaluated';
113
+ /** The sealed rules-only report; admission is `readiness`. */
114
+ readonly report: EvaluationReport;
115
+ /** The one admission answer, beside the report rather than inside it. */
116
+ readonly readiness: Readiness;
117
+ readonly input: EvaluationInput;
118
+ readonly env: EvaluationEnv;
119
+ /**
120
+ * The stance this call stated over the body, so a host that logs the answer logs what it
121
+ * trusted. `unstated` is the default and means no write authority was claimed.
122
+ */
123
+ readonly trust: SubmissionTrustKind;
124
+ } | {
125
+ readonly outcome: 'refused';
126
+ readonly refusal: SubmissionRefusal;
127
+ };
128
+ /**
129
+ * Evaluates a request body this process did not construct, `evaluateSubmission()`.
130
+ *
131
+ * The body is the record and nothing else: every host-only fact — `context`, the access overlay
132
+ * or projection, `redacted` and `sessionWrites` — is refused at its own path when the body states
133
+ * it and is read only from `authority`, the typed facts the host passes.
134
+ *
135
+ * This is the door a backend puts behind an HTTP handler. `evaluate()` takes an
136
+ * `EvaluationInput` — a value the caller has already read into the wire contract — so handing it
137
+ * `JSON.parse(body)` is a type assertion, and the three ways that goes wrong are exactly what
138
+ * this function exists to remove: a container of the wrong shape was a raw `TypeError` from
139
+ * inside the evaluator, a member the wire cannot carry was silently carried (and only the export
140
+ * refused it), and an unparseable `tier` was silently evaluated as `client`.
141
+ *
142
+ * Every refusal is data — `{ code, path, detail }` from `toSubmissionInput`,
143
+ * `toEvaluationEnv`, the access window or the record reader — never a throw, and never a report:
144
+ *
145
+ * - a body that is not an object, or `values` that is not an object, is refused at `$` or
146
+ * `$.values`;
147
+ * - a body that states a host-only member is refused at `$.<member>` rather than having that
148
+ * answer honoured or silently dropped;
149
+ * - a declared field whose value the wire cannot carry is refused at `$.values.<fieldId>`, with
150
+ * the same code and path `exportSubmission` states for the same body;
151
+ * - a member the artifact does not declare is refused at `$.values.<fieldId>`;
152
+ * - a context key the artifact does not declare is refused at `$.context.<key>`, naming the
153
+ * declared root it probably meant — a root nested under its first segment would otherwise
154
+ * read `UNKNOWN` with every dependent rule and gate folded with no cause;
155
+ * - `tier` must be exactly `client` or `server`.
156
+ *
157
+ * `authority` supplies the facts the host decided about the submission: the hydrated context,
158
+ * the access answer (an overlay or a projection, never both), the references it withheld and the
159
+ * values this session wrote, plus the table port the environment carries. A client that supplied
160
+ * any of them would be stating the answer to the question it is being judged by.
161
+ *
162
+ * The record itself is never an authority member: a JavaScript caller that states
163
+ * `authority.values` is refused at `authority.values` instead of silently evaluating the body
164
+ * while believing it evaluated the record it passed. A lookup port is read at the door too, so
165
+ * a partial port is refused at `authority.lookup.<member>` rather than failing inside the first
166
+ * rule that resolves a table.
167
+ *
168
+ * `trust` states what this process trusts about the body, and it is never implied:
169
+ *
170
+ * - `{ kind: 'access', entries }` supplies the access answer for the whole call: the evaluation
171
+ * reads through it and every value the body carries is judged with `checkWrite`, so a
172
+ * `read_only` binding is refused with the predicate's own `ACCESS_DENIED`, naming the binding
173
+ * and the access it resolved. Stating an `authority.overlay` or `authority.access` beside it
174
+ * is refused at `trust.entries`, because the two answers could disagree.
175
+ * - `{ kind: 'verified', signatures }` — or `signatures` beside an `access` stance — requires
176
+ * every `signature_ref` the body carries to be the blob the host captured, covering exactly
177
+ * the field's declared `covers` at the record's schema version, and verifies its digest
178
+ * against the record it signs.
179
+ * - `{ kind: 'trusted-host', reason }` states that the caller authorised the body before this
180
+ * call. The reason is required so the decision is visible at the call site and in a log.
181
+ * - `{ kind: 'unstated' }` is the default when no stance is supplied. It refuses every signature
182
+ * the body carries (no capture was stated) and every table the artifact does not declare, and
183
+ * it does **not** claim to have checked write authority: the answer states
184
+ * `trust: 'unstated'`, so an omission is visible to the caller rather than read as a grant. A
185
+ * server that stores the record states `access` or `trusted-host`.
186
+ *
187
+ * The artifact's `datasets` list is the allow-list for every table an expression reads, in
188
+ * every stance. A rehydrated artifact has no compiler in front of it, so a rule naming a table
189
+ * it did not declare is refused here (`TABLE_NOT_DECLARED`) with the expression and the table.
190
+ *
191
+ * The client is untrusted, so the report this returns is a proposal: a server re-derives every
192
+ * decision it acts on (`[ACCESS-7.1.1]`–`[ACCESS-7.1.6]`), and a stated `access` stance is a
193
+ * check of the body it was handed, never authorisation for the store or the side effect.
194
+ *
195
+ * The two access questions `createAccessWindow` owns are answered inside the boundary as well:
196
+ * an authority that supplies an overlay and a flattened projection together, and an environment
197
+ * `accessVersion` that disagrees with the authority's overlay. `evaluate()` refuses each as a
198
+ * throw, which is right for a caller that assembled a typed input; a host body cannot reach
199
+ * either, but the door still answers a malformed authority as data at `authority.access` and
200
+ * `$.accessVersion`. The window resolved here is the one the evaluation reads, so the check and
201
+ * the evaluation cannot disagree.
202
+ *
203
+ * A body carries no gate overrides. `overrides` is not a member `toSubmissionInput` admits, so
204
+ * one in the body is refused at `$`: the approval set is the host's (`evaluateGate`'s fourth
205
+ * argument), never something a forwarded record can nominate for itself.
206
+ *
207
+ * The same closure is stated in the body's type, which is why this door is generic over it: a type
208
+ * that can state one of those members — an optional member counts unless its type is `never` — is
209
+ * not a body, so a stored projection or a request the host merged its authority into does not
210
+ * compile at the call and the mistake is caught where it was written instead of becoming a
211
+ * refusal of the request. An untrusted document the host has not narrowed (`body: unknown`, as
212
+ * `JSON.parse` and every HTTP body reader answer) states no members and crosses this door as it
213
+ * always has; the runtime refusal above is what judges it.
214
+ */
215
+ export declare function evaluateSubmission<Body>(compiled: CompiledSchema, body: Body & SubmissionBodyGuard<Body>, env?: unknown, authority?: SubmissionAuthority, trust?: SubmissionTrust, options?: FormStateOptions): SubmissionEvaluation;
216
+ /** A gate's stateless verdict, `evaluateGate()`. */
217
+ export type GateEvaluation = {
218
+ /** The artifact declares no gate this call can decide, so there is no verdict to state. */
219
+ readonly hasGate: false;
220
+ readonly reason: 'no_gate';
221
+ readonly report: EvaluationReport;
222
+ readonly overrides: GateOverrideOutcome;
223
+ } | {
224
+ readonly hasGate: true;
225
+ /** The gate this call decided: the report's primary gate. */
226
+ readonly gateId: string;
227
+ /** `OPEN` passes, `BLOCKED` refuses, `DEFERRED` awaits the server, `OVERRIDDEN` was approved. */
228
+ readonly outcome: GateVerdict;
229
+ readonly report: EvaluationReport;
230
+ readonly gate: GateReport;
231
+ readonly overrides: GateOverrideOutcome;
232
+ };
233
+ /**
234
+ * Evaluates a record and decides its close-out gate in one stateless call, `evaluateGate()`.
235
+ *
236
+ * The gate a call decides is the artifact's primary gate, and every override is weighed
237
+ * against the gate its `gateId` names. A host may pass approved `overrides`; each one
238
+ * crosses the override boundary first, so a malformed record is a refusal with its cause and
239
+ * an accepted one is the engine's own frozen copy. What an accepted override then satisfies
240
+ * is decided in `gate.ts`, and the waiver it grants is applied in `overrides.ts`.
241
+ *
242
+ * The `overrides` argument is the host's approval set, not a request field: the host's approval
243
+ * does not travel as a member — its presence in this set is the approval and its absence is not.
244
+ * Pass the approvals this host holds for this gate and record; never
245
+ * forward a client's list, because a client that can compute the input hash can approve its own
246
+ * verdict. `evaluateSubmission` has no such argument for that reason.
247
+ *
248
+ * The verdict is this device's answer, not evidence: a server re-derives the gate from its
249
+ * own overlay, environment and record date before accepting a submission (`[ACCESS-7.1.4]`).
250
+ *
251
+ * `options` is the same seam `submissionVerdict` and `describeFormState` take: an assigned
252
+ * array's host-owned `identity` names its rows, and a host-loaded `optionSource` domain is the
253
+ * domain a held value is judged against. Both are facts the artifact cannot derive, so a gate
254
+ * that could not read them answered `OPEN` where readiness answered `BLOCKED` for one record.
255
+ * Supplying them to one admission door and not the other is the disagreement this argument
256
+ * removes; omitting them states the documented limit that only the artifact's own facts fold.
257
+ */
258
+ export declare function evaluateGate(compiled: CompiledSchema, input: EvaluationInput, env?: EvaluationEnv, overrides?: readonly unknown[], options?: FormStateOptions): GateEvaluation;
259
+ /**
260
+ * The read-only submission projection (`spec/semantics/access-v1.md` `[ACCESS-1.3.2]`, `[ACCESS-5.1.1]`
261
+ * and `spec/semantics/rules-v1.md` `[RULES-2.1.10]`): a hydrated `write_only` value is omitted unless
262
+ * the host lists that target in `sessionWrites`, so a stored secret is never exported by a stateless
263
+ * caller that did not write it, and a value a `visible` rule hides is dropped only where the field's
264
+ * `onHide` policy says so.
265
+ *
266
+ * The projection derives its own snapshot. A caller cannot prove that a report it supplies was
267
+ * evaluated against the values it also supplies, so one call evaluates the record once and projects
268
+ * the access, visibility and tier that evaluation answered. A stale or forged snapshot is therefore
269
+ * not expressible here.
270
+ *
271
+ * A projection is not confidentiality: it keeps a client from exporting a value it may not
272
+ * read, and cannot recall one the host already sent (`[ACCESS-7.1.2]`). A server re-projects
273
+ * the submission it accepts rather than trusting this answer (`[ACCESS-7.1.4]`).
274
+ */
275
+ export declare function exportSubmission(compiled: CompiledSchema, input: EvaluationInput, env?: EvaluationEnv, options?: SubmissionProjectionOptions): Readonly<Record<string, unknown>>;
276
+ /**
277
+ * The cost budget arithmetic is part of the runtime's contract: an operator sizing a record
278
+ * and a benchmark gating a regression must derive the same allowance the evaluator does.
279
+ */
280
+ export { evaluationBudget } from './budget.js';
281
+ export type { EvaluationBudget } from './budget.js';
282
+ //# sourceMappingURL=evaluate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../src/eval/evaluate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAS1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAInE,OAAO,KAAK,EAAE,2BAA2B,EAAsB,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAgB,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,C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