@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,391 @@
1
+ import { decideGate, gateInputHashOrNone } from './gate.js';
2
+ import { readGateOverrides } from './overrides.js';
3
+ import { Evaluation } from './rule/runner.js';
4
+ import { assertArtifactReceipt } from './receipt.js';
5
+ import { evaluatorFor, readArtifactVersion } from './version-dispatch.js';
6
+ import { deriveFormState, readinessOf } from './state/derive.js';
7
+ import { describeFormState } from './state/describe.js';
8
+ import { NO_FORM_STATE_OPTIONS } from './state/options.js';
9
+ import { sealReport } from './seal.js';
10
+ import { projectSubmission } from './submission.js';
11
+ import { submissionVerdict } from './verdict.js';
12
+ import { toEvaluationInput } from '../model/wire.js';
13
+ import { isRecord } from '../model/values.js';
14
+ import { artifactBehaviour, isArtifactBehaviourOf } from './rule/behaviour.js';
15
+ import { admitSubmission } from './submission/admission.js';
16
+ import { auditSignatures, auditWrites, datasetRefusal, UNSTATED_TRUST, undeclaredDataset, } from './submission/index.js';
17
+ export { artifactBehaviour, isArtifactBehaviourOf };
18
+ // The one submission verdict a host gates on, beside the stateless doors it folds.
19
+ export { submissionVerdict };
20
+ /**
21
+ * The v1 arm: the evaluation path `exprVersion: 1` has always named.
22
+ *
23
+ * The receipt stays inside the arm, so it checks the version this arm actually implements. A v2
24
+ * arm added later calls its own receipt; neither widens the other, which is what keeps a retained
25
+ * v1 artifact running the code it was retained for.
26
+ */
27
+ const evaluateV1 = (compiled, input, env, options = NO_FORM_STATE_OPTIONS) => {
28
+ assertArtifactReceipt(compiled);
29
+ // The door narrows its input again, not only the types: a JavaScript caller can pass the
30
+ // request body straight through, and an unread `values` member would decide an empty record
31
+ // as `PASS` rather than refuse the wrong shape. `toEvaluationInput` is the one boundary
32
+ // reader the submission door already uses, so the two cannot disagree about what an input is.
33
+ const parsed = toEvaluationInput(input);
34
+ const evaluation = new Evaluation(compiled, parsed, env, evaluationOptions(options));
35
+ return sealReport(evaluation.runBody());
36
+ };
37
+ /** The evaluation options the derivation seam states for an assigned array's manifest. */
38
+ function evaluationOptions(options) {
39
+ const identity = options.identity;
40
+ return identity === undefined ? {} : { assignedRowKeys: (fieldId) => identity.get(fieldId) };
41
+ }
42
+ /** One evaluated record's derived form state, from the evaluation that produced its report. */
43
+ function formStateOf(compiled, evaluation, input, options) {
44
+ return deriveFormState(compiled, {
45
+ report: evaluation.runBody(),
46
+ access: evaluation.accessWindow(),
47
+ computed: evaluation.computedValues(),
48
+ input,
49
+ rowCounts: evaluation.rowCounts(),
50
+ optionAvailability: evaluation.optionAvailability(),
51
+ undecided: evaluation.undecidedCauses(),
52
+ layoutHidden: evaluation.layoutHidden(),
53
+ }, options);
54
+ }
55
+ /**
56
+ * The one table `evaluate` dispatches through, keyed by the version an artifact states.
57
+ *
58
+ * A v2 entry is added beside v1, never in place of it (`EXPR-1.1.4`): the keyed lookup is what
59
+ * makes a retained v1 artifact answer with v1 after v2 lands. The table is deliberately private;
60
+ * `test/retention/version-dispatch.test.ts` proves the lookup with its own two-arm table and
61
+ * `test/retention/expr-version-retention.test.ts` keeps the shipped v1 arm evaluating a sealed
62
+ * artifact.
63
+ */
64
+ const EVALUATORS = { 1: evaluateV1 };
65
+ /**
66
+ * Evaluates a compiled artifact against one record, `spec/semantics/context-v1.md`
67
+ * The function is pure: it reads no clock, no locale, no randomness and
68
+ * no mutable global, and it never mutates `input`. A compiled artifact is assumed to
69
+ * have passed the compiler's closed-schema validation; anything the walking skeleton
70
+ * cannot interpret is reported as `ENGINE_ERROR` and blocks rather than returning a
71
+ * plausible default.
72
+ *
73
+ * The version is read from the artifact and looked up in `EVALUATORS` before any rule runs: an
74
+ * artifact stating a version this build does not implement is refused by name, never evaluated
75
+ * as v1. `spec/release/expr-retention.json` records the arm and its evidence.
76
+ *
77
+ * The result is the sealed rules-only report. Admission is a separate answer:
78
+ * `evaluateReadiness(compiled, input, env, options)` states the `Readiness`
79
+ * (`SUBMIT`/`BLOCKED`/`UNDETERMINED`, its blockers and open checks), and
80
+ * `submissionVerdict()` states the same answer as its `outcome`. A host decides whether to
81
+ * submit from that answer, never from `report.status`.
82
+ */
83
+ export function evaluate(compiled, input,
84
+ // Absent means "no environment stated", which the evaluation default answers: the same shape
85
+ // `evaluatePresentation`, `evaluateSubmission`, `describeFormState` and `submissionVerdict`
86
+ // already take.
87
+ env = {},
88
+ // The same derivation seam the readiness door takes, so an assigned array's manifest names the
89
+ // same rows here as it does for `evaluateReadiness` and `submissionVerdict`.
90
+ options = NO_FORM_STATE_OPTIONS) {
91
+ assertArtifactReceipt(compiled);
92
+ return evaluatorFor(EVALUATORS, readArtifactVersion(compiled))(compiled, input, env, options);
93
+ }
94
+ /**
95
+ * The one admission answer for a record already in the wire contract.
96
+ *
97
+ * It is `describeFormState` narrowed to what an admission decision reads: the verdict, the
98
+ * decided blockers, the open checks and whether a server handoff remains. `report.status` on the
99
+ * sealed report is the rules fold and can be `PASS` while this verdict is `BLOCKED`; a host gates
100
+ * on `readiness.verdict`, never on `status`. `submissionVerdict()` states the same facts as its
101
+ * `outcome` and `form`, and `evaluateSubmission().readiness` is the same shape for a body this
102
+ * process did not construct.
103
+ */
104
+ export function evaluateReadiness(compiled, input, env = {}, options = NO_FORM_STATE_OPTIONS) {
105
+ return readinessOf(describeFormState(compiled, input, env, options));
106
+ }
107
+ /**
108
+ * Evaluates a compiled artifact and explains it, `explain()`.
109
+ *
110
+ * The report is the canonical record; this adds the derivation behind it — the fields each
111
+ * rule read, the rules a gate folded, the diagnostics
112
+ * about that rule, and the seven-year provenance of every lookup *that rule* resolved
113
+ * A support engineer tracing an old decision reads this instead of
114
+ * replaying each rule by hand.
115
+ */
116
+ export function explain(compiled, input, env = {}) {
117
+ assertArtifactReceipt(compiled);
118
+ return new Evaluation(compiled, toEvaluationInput(input), env).explanation();
119
+ }
120
+ /**
121
+ * Evaluates a request body this process did not construct, `evaluateSubmission()`.
122
+ *
123
+ * The body is the record and nothing else: every host-only fact — `context`, the access overlay
124
+ * or projection, `redacted` and `sessionWrites` — is refused at its own path when the body states
125
+ * it and is read only from `authority`, the typed facts the host passes.
126
+ *
127
+ * This is the door a backend puts behind an HTTP handler. `evaluate()` takes an
128
+ * `EvaluationInput` — a value the caller has already read into the wire contract — so handing it
129
+ * `JSON.parse(body)` is a type assertion, and the three ways that goes wrong are exactly what
130
+ * this function exists to remove: a container of the wrong shape was a raw `TypeError` from
131
+ * inside the evaluator, a member the wire cannot carry was silently carried (and only the export
132
+ * refused it), and an unparseable `tier` was silently evaluated as `client`.
133
+ *
134
+ * Every refusal is data — `{ code, path, detail }` from `toSubmissionInput`,
135
+ * `toEvaluationEnv`, the access window or the record reader — never a throw, and never a report:
136
+ *
137
+ * - a body that is not an object, or `values` that is not an object, is refused at `$` or
138
+ * `$.values`;
139
+ * - a body that states a host-only member is refused at `$.<member>` rather than having that
140
+ * answer honoured or silently dropped;
141
+ * - a declared field whose value the wire cannot carry is refused at `$.values.<fieldId>`, with
142
+ * the same code and path `exportSubmission` states for the same body;
143
+ * - a member the artifact does not declare is refused at `$.values.<fieldId>`;
144
+ * - a context key the artifact does not declare is refused at `$.context.<key>`, naming the
145
+ * declared root it probably meant — a root nested under its first segment would otherwise
146
+ * read `UNKNOWN` with every dependent rule and gate folded with no cause;
147
+ * - `tier` must be exactly `client` or `server`.
148
+ *
149
+ * `authority` supplies the facts the host decided about the submission: the hydrated context,
150
+ * the access answer (an overlay or a projection, never both), the references it withheld and the
151
+ * values this session wrote, plus the table port the environment carries. A client that supplied
152
+ * any of them would be stating the answer to the question it is being judged by.
153
+ *
154
+ * The record itself is never an authority member: a JavaScript caller that states
155
+ * `authority.values` is refused at `authority.values` instead of silently evaluating the body
156
+ * while believing it evaluated the record it passed. A lookup port is read at the door too, so
157
+ * a partial port is refused at `authority.lookup.<member>` rather than failing inside the first
158
+ * rule that resolves a table.
159
+ *
160
+ * `trust` states what this process trusts about the body, and it is never implied:
161
+ *
162
+ * - `{ kind: 'access', entries }` supplies the access answer for the whole call: the evaluation
163
+ * reads through it and every value the body carries is judged with `checkWrite`, so a
164
+ * `read_only` binding is refused with the predicate's own `ACCESS_DENIED`, naming the binding
165
+ * and the access it resolved. Stating an `authority.overlay` or `authority.access` beside it
166
+ * is refused at `trust.entries`, because the two answers could disagree.
167
+ * - `{ kind: 'verified', signatures }` — or `signatures` beside an `access` stance — requires
168
+ * every `signature_ref` the body carries to be the blob the host captured, covering exactly
169
+ * the field's declared `covers` at the record's schema version, and verifies its digest
170
+ * against the record it signs.
171
+ * - `{ kind: 'trusted-host', reason }` states that the caller authorised the body before this
172
+ * call. The reason is required so the decision is visible at the call site and in a log.
173
+ * - `{ kind: 'unstated' }` is the default when no stance is supplied. It refuses every signature
174
+ * the body carries (no capture was stated) and every table the artifact does not declare, and
175
+ * it does **not** claim to have checked write authority: the answer states
176
+ * `trust: 'unstated'`, so an omission is visible to the caller rather than read as a grant. A
177
+ * server that stores the record states `access` or `trusted-host`.
178
+ *
179
+ * The artifact's `datasets` list is the allow-list for every table an expression reads, in
180
+ * every stance. A rehydrated artifact has no compiler in front of it, so a rule naming a table
181
+ * it did not declare is refused here (`TABLE_NOT_DECLARED`) with the expression and the table.
182
+ *
183
+ * The client is untrusted, so the report this returns is a proposal: a server re-derives every
184
+ * decision it acts on (`[ACCESS-7.1.1]`–`[ACCESS-7.1.6]`), and a stated `access` stance is a
185
+ * check of the body it was handed, never authorisation for the store or the side effect.
186
+ *
187
+ * The two access questions `createAccessWindow` owns are answered inside the boundary as well:
188
+ * an authority that supplies an overlay and a flattened projection together, and an environment
189
+ * `accessVersion` that disagrees with the authority's overlay. `evaluate()` refuses each as a
190
+ * throw, which is right for a caller that assembled a typed input; a host body cannot reach
191
+ * either, but the door still answers a malformed authority as data at `authority.access` and
192
+ * `$.accessVersion`. The window resolved here is the one the evaluation reads, so the check and
193
+ * the evaluation cannot disagree.
194
+ *
195
+ * A body carries no gate overrides. `overrides` is not a member `toSubmissionInput` admits, so
196
+ * one in the body is refused at `$`: the approval set is the host's (`evaluateGate`'s fourth
197
+ * argument), never something a forwarded record can nominate for itself.
198
+ *
199
+ * The same closure is stated in the body's type, which is why this door is generic over it: a type
200
+ * that can state one of those members — an optional member counts unless its type is `never` — is
201
+ * not a body, so a stored projection or a request the host merged its authority into does not
202
+ * compile at the call and the mistake is caught where it was written instead of becoming a
203
+ * refusal of the request. An untrusted document the host has not narrowed (`body: unknown`, as
204
+ * `JSON.parse` and every HTTP body reader answer) states no members and crosses this door as it
205
+ * always has; the runtime refusal above is what judges it.
206
+ */
207
+ export function evaluateSubmission(compiled, body, env = {}, authority = {}, trust = UNSTATED_TRUST, options = NO_FORM_STATE_OPTIONS) {
208
+ assertArtifactReceipt(compiled);
209
+ const admission = admitSubmission(compiled, body, env, authority, trust, options, false);
210
+ if (!admission.ok)
211
+ return { outcome: 'refused', refusal: admission.refusal };
212
+ const { input, env: parsedEnv, trust: stated, writeAuthority, accessWindow } = admission.value;
213
+ // The artifact's own scope: a table it never declared cannot be read, whatever the caller
214
+ // trusts about the body. This runs before any rule can resolve a table.
215
+ const undeclared = undeclaredDataset(compiled);
216
+ if (undeclared !== undefined)
217
+ return { outcome: 'refused', refusal: datasetRefusal(undeclared) };
218
+ const signatureRefusal = auditSignatures(compiled, input, stated);
219
+ if (signatureRefusal !== undefined)
220
+ return { outcome: 'refused', refusal: signatureRefusal };
221
+ const evaluation = new Evaluation(compiled, input, parsedEnv, {
222
+ accessWindow,
223
+ ...evaluationOptions(options),
224
+ });
225
+ const reportBody = evaluation.runBody();
226
+ if (writeAuthority !== undefined) {
227
+ // The `enabled` half of the audit needs the report; the access half already ran in the
228
+ // boundary, so an unauthorised body never reached a rule or a table.
229
+ const refusal = auditWrites(compiled, admission.value.bodyValues, reportBody, writeAuthority, options.identity);
230
+ if (refusal !== undefined)
231
+ return { outcome: 'refused', refusal };
232
+ }
233
+ const report = sealReport(reportBody);
234
+ const readiness = Object.freeze(readinessOf(formStateOf(compiled, evaluation, input, options)));
235
+ return { outcome: 'evaluated', report, readiness, input, env: parsedEnv, trust: stated.kind };
236
+ }
237
+ /**
238
+ * Evaluates a record and decides its close-out gate in one stateless call, `evaluateGate()`.
239
+ *
240
+ * The gate a call decides is the artifact's primary gate, and every override is weighed
241
+ * against the gate its `gateId` names. A host may pass approved `overrides`; each one
242
+ * crosses the override boundary first, so a malformed record is a refusal with its cause and
243
+ * an accepted one is the engine's own frozen copy. What an accepted override then satisfies
244
+ * is decided in `gate.ts`, and the waiver it grants is applied in `overrides.ts`.
245
+ *
246
+ * The `overrides` argument is the host's approval set, not a request field: the host's approval
247
+ * does not travel as a member — its presence in this set is the approval and its absence is not.
248
+ * Pass the approvals this host holds for this gate and record; never
249
+ * forward a client's list, because a client that can compute the input hash can approve its own
250
+ * verdict. `evaluateSubmission` has no such argument for that reason.
251
+ *
252
+ * The verdict is this device's answer, not evidence: a server re-derives the gate from its
253
+ * own overlay, environment and record date before accepting a submission (`[ACCESS-7.1.4]`).
254
+ *
255
+ * `options` is the same seam `submissionVerdict` and `describeFormState` take: an assigned
256
+ * array's host-owned `identity` names its rows, and a host-loaded `optionSource` domain is the
257
+ * domain a held value is judged against. Both are facts the artifact cannot derive, so a gate
258
+ * that could not read them answered `OPEN` where readiness answered `BLOCKED` for one record.
259
+ * Supplying them to one admission door and not the other is the disagreement this argument
260
+ * removes; omitting them states the documented limit that only the artifact's own facts fold.
261
+ */
262
+ export function evaluateGate(compiled, input, env = {}, overrides = [], options = NO_FORM_STATE_OPTIONS) {
263
+ assertArtifactReceipt(compiled);
264
+ const identity = options.identity;
265
+ // The manifest reaches the evaluation as well as the fold: an assigned array's rows are
266
+ // named by the host, so an evaluation without it states one row-less result where the fold —
267
+ // handed the manifest — states one per row.
268
+ const evaluation = new Evaluation(compiled, input, env, identity === undefined ? {} : { assignedRowKeys: (fieldId) => identity.get(fieldId) });
269
+ const report = evaluation.run();
270
+ const boundary = readGateOverrides(overrides);
271
+ const gateRules = gateRulesOf(compiled);
272
+ const gateId = report.primaryGateId;
273
+ if (gateId === undefined || !gateRules.has(gateId)) {
274
+ return {
275
+ hasGate: false,
276
+ reason: 'no_gate',
277
+ report,
278
+ overrides: {
279
+ accepted: [],
280
+ refused: [
281
+ ...boundary.refused,
282
+ ...boundary.wellFormed.map((override) => ({ override, reason: 'no_gate' })),
283
+ ],
284
+ },
285
+ };
286
+ }
287
+ // The projection walks the whole record, so it runs once per gate that has an override to
288
+ // weigh, and not at all when the call carries none.
289
+ const decision = decideGate({
290
+ gateRules,
291
+ primaryGateId: gateId,
292
+ report,
293
+ inputHashOf: (namedGate) => gateInputHashOrNone(compiled, input, env, report, namedGate),
294
+ candidates: boundary,
295
+ deniedFieldsOf: (namedGate) => evaluation.gateDenials(namedGate),
296
+ });
297
+ // A declared fact — an array's cardinality, a media constraint, a `rowsFrom` count, a held
298
+ // value the option domain refuses — is a decided blocker readiness states but no rule result
299
+ // expresses. The gate door must not answer `OPEN` where `describeFormState` answers
300
+ // `BLOCKED`: the same record cannot have two admission answers (`MODEL-2.1.17/20/22`).
301
+ const snapshot = {
302
+ report,
303
+ access: evaluation.accessWindow(),
304
+ computed: evaluation.computedValues(),
305
+ input,
306
+ rowCounts: evaluation.rowCounts(),
307
+ optionAvailability: evaluation.optionAvailability(),
308
+ undecided: evaluation.undecidedCauses(),
309
+ layoutHidden: evaluation.layoutHidden(),
310
+ };
311
+ const factBlocked = (declaresFactBlocker(compiled) || holdsDeclaredValue(compiled, input.values)) &&
312
+ declaredFactBlockers(compiled, snapshot, options).length > 0;
313
+ return {
314
+ hasGate: true,
315
+ gateId,
316
+ outcome: factBlocked ? 'BLOCKED' : decision.outcome,
317
+ report: decision.report,
318
+ gate: decision.gate,
319
+ overrides: decision.overrides,
320
+ };
321
+ }
322
+ /** The artifact's declared gate rules, keyed by the id their report entry is keyed by. */
323
+ function gateRulesOf(compiled) {
324
+ return new Map((compiled.rules ?? [])
325
+ .filter((rule) => rule.kind === 'gate')
326
+ .map((rule) => [rule.ruleId, rule]));
327
+ }
328
+ /** Whether any declaration can produce a derived blocking fact, so the fold is worth running. */
329
+ function declaresFactBlocker(compiled) {
330
+ const visit = (fields) => fields.some((field) => field.minItems !== undefined ||
331
+ field.maxItems !== undefined ||
332
+ field.maxScale !== undefined ||
333
+ field.accept !== undefined ||
334
+ field.minBytes !== undefined ||
335
+ field.maxBytes !== undefined ||
336
+ field.rowsFromSource !== undefined ||
337
+ field.options !== undefined ||
338
+ field.optionSource !== undefined ||
339
+ visit(field.fields ?? []));
340
+ return visit(compiled.fields);
341
+ }
342
+ /** The declared, decided blocking facts readiness states, for the gate door's fold. */
343
+ function declaredFactBlockers(compiled, snapshot, options) {
344
+ return deriveFormState(compiled, snapshot, options).blockers.filter((blocker) => blocker.kind === 'cardinality' ||
345
+ blocker.kind === 'scale' ||
346
+ blocker.kind === 'media' ||
347
+ blocker.kind === 'rowCount' ||
348
+ blocker.kind === 'invalidOption' ||
349
+ blocker.kind === 'unavailableOption');
350
+ }
351
+ /**
352
+ * Whether the record holds a value at any declared field's path, so a declaration could refuse it.
353
+ *
354
+ * Every value lives under a top-level declared field, so this is a necessary condition for the
355
+ * `invalidOption` blocker the fold above reads: a record holding no declared value has no value to
356
+ * refuse. It is the cheap half of the guard `declaresFactBlocker` supplies for the declared facts.
357
+ */
358
+ function holdsDeclaredValue(compiled, values) {
359
+ if (!isRecord(values))
360
+ return false;
361
+ return compiled.fields.some((field) => Object.hasOwn(values, field.fieldId));
362
+ }
363
+ /**
364
+ * The read-only submission projection (`spec/semantics/access-v1.md` `[ACCESS-1.3.2]`, `[ACCESS-5.1.1]`
365
+ * and `spec/semantics/rules-v1.md` `[RULES-2.1.10]`): a hydrated `write_only` value is omitted unless
366
+ * the host lists that target in `sessionWrites`, so a stored secret is never exported by a stateless
367
+ * caller that did not write it, and a value a `visible` rule hides is dropped only where the field's
368
+ * `onHide` policy says so.
369
+ *
370
+ * The projection derives its own snapshot. A caller cannot prove that a report it supplies was
371
+ * evaluated against the values it also supplies, so one call evaluates the record once and projects
372
+ * the access, visibility and tier that evaluation answered. A stale or forged snapshot is therefore
373
+ * not expressible here.
374
+ *
375
+ * A projection is not confidentiality: it keeps a client from exporting a value it may not
376
+ * read, and cannot recall one the host already sent (`[ACCESS-7.1.2]`). A server re-projects
377
+ * the submission it accepts rather than trusting this answer (`[ACCESS-7.1.4]`).
378
+ */
379
+ export function exportSubmission(compiled, input, env = {}, options = {}) {
380
+ assertArtifactReceipt(compiled);
381
+ const evaluation = new Evaluation(compiled, input, env);
382
+ const report = evaluation.run();
383
+ const snapshot = { report, access: evaluation.snapshotAccess() };
384
+ return projectSubmission(compiled, input, snapshot, options);
385
+ }
386
+ /**
387
+ * The cost budget arithmetic is part of the runtime's contract: an operator sizing a record
388
+ * and a benchmark gating a regression must derive the same allowance the evaluator does.
389
+ */
390
+ export { evaluationBudget } from './budget.js';
391
+ //# sourceMappingURL=evaluate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate.js","sourceRoot":"","sources":["../../src/eval/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,WAA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,GAAG,IAAI,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IACxD,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,EAAE,CAAC;IACrF,OAAO,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["import { decideGate, gateInputHashOrNone } from './gate.js';\nimport type { GateVerdict } from './gate.js';\nimport { readGateOverrides } from './overrides.js';\nimport type { GateOverrideOutcome } from './overrides.js';\nimport { Evaluation } from './rule/runner.js';\nimport { assertArtifactReceipt } from './receipt.js';\nimport { evaluatorFor, readArtifactVersion } from './version-dispatch.js';\nimport type { ArtifactEvaluator, EvaluatorTable } from './version-dispatch.js';\nimport { deriveFormState, readinessOf } from './state/derive.js';\nimport type { FormState } from './state/derive.js';\nimport { describeFormState } from './state/describe.js';\nimport { NO_FORM_STATE_OPTIONS } from './state/options.js';\nimport type { FormStateOptions } from './state/options.js';\nimport type { FormBlocker, Readiness } from './state/readiness.js';\nimport type { FormSnapshot } from './state/snapshot.js';\nimport { sealReport } from './seal.js';\nimport { projectSubmission } from './submission.js';\nimport type { SubmissionProjectionOptions, SubmissionSnapshot } from './submission.js';\nimport { submissionVerdict } from './verdict.js';\nimport type { EvaluationExplanation } from './report/assemble.js';\nimport type { CompiledRule, EvaluationReport, GateReport } from '../model/types.js';\nimport type { EvaluationEnv, EvaluationInput, SubmissionAuthority } from '../model/access.js';\nimport type { CompiledSchema } from '../model/schema.js';\nimport { toEvaluationInput } from '../model/wire.js';\nimport type { HostOnlySubmissionMember } from '../model/wire.js';\nimport { isRecord } from '../model/values.js';\nimport { artifactBehaviour, isArtifactBehaviourOf } from './rule/behaviour.js';\nimport { admitSubmission } from './submission/admission.js';\nimport {\n auditSignatures,\n auditWrites,\n datasetRefusal,\n UNSTATED_TRUST,\n undeclaredDataset,\n} from './submission/index.js';\nimport type {\n SubmissionRefusal,\n SubmissionTrust,\n SubmissionTrustKind,\n} from './submission/index.js';\n\nexport { artifactBehaviour, isArtifactBehaviourOf };\nexport type { ArtifactBehaviour, RuleBehaviour } from './rule/behaviour.js';\n// The one submission verdict a host gates on, beside the stateless doors it folds.\nexport { submissionVerdict };\nexport type { SubmissionDecision } from './verdict.js';\nexport type { EvaluationExplanation, RuleExplanation } from './report/assemble.js';\n// What a caller states it trusts about a body, and the structured refusal each check returns.\nexport type {\n CapturedSignature,\n SignatureRefusal,\n SubmissionRefusal,\n SubmissionRefusalCause,\n SubmissionRefusalCode,\n SubmissionTrust,\n SubmissionTrustKind,\n} from './submission/index.js';\n\n/**\n * The v1 arm: the evaluation path `exprVersion: 1` has always named.\n *\n * The receipt stays inside the arm, so it checks the version this arm actually implements. A v2\n * arm added later calls its own receipt; neither widens the other, which is what keeps a retained\n * v1 artifact running the code it was retained for.\n */\nconst evaluateV1: ArtifactEvaluator = (compiled, input, env, options = NO_FORM_STATE_OPTIONS) => {\n assertArtifactReceipt(compiled);\n // The door narrows its input again, not only the types: a JavaScript caller can pass the\n // request body straight through, and an unread `values` member would decide an empty record\n // as `PASS` rather than refuse the wrong shape. `toEvaluationInput` is the one boundary\n // reader the submission door already uses, so the two cannot disagree about what an input is.\n const parsed = toEvaluationInput(input);\n const evaluation = new Evaluation(compiled, parsed, env, evaluationOptions(options));\n return sealReport(evaluation.runBody());\n};\n\n/** The evaluation options the derivation seam states for an assigned array's manifest. */\nfunction evaluationOptions(options: FormStateOptions): {\n readonly assignedRowKeys?: (fieldId: string) => readonly (string | number)[] | undefined;\n} {\n const identity = options.identity;\n return identity === undefined ? {} : { assignedRowKeys: (fieldId) => identity.get(fieldId) };\n}\n\n/** One evaluated record's derived form state, from the evaluation that produced its report. */\nfunction formStateOf(\n compiled: CompiledSchema,\n evaluation: Evaluation,\n input: EvaluationInput,\n options: FormStateOptions,\n): FormState {\n return deriveFormState(\n compiled,\n {\n report: evaluation.runBody(),\n access: evaluation.accessWindow(),\n computed: evaluation.computedValues(),\n input,\n rowCounts: evaluation.rowCounts(),\n optionAvailability: evaluation.optionAvailability(),\n undecided: evaluation.undecidedCauses(),\n layoutHidden: evaluation.layoutHidden(),\n },\n options,\n );\n}\n\n/**\n * The one table `evaluate` dispatches through, keyed by the version an artifact states.\n *\n * A v2 entry is added beside v1, never in place of it (`EXPR-1.1.4`): the keyed lookup is what\n * makes a retained v1 artifact answer with v1 after v2 lands. The table is deliberately private;\n * `test/retention/version-dispatch.test.ts` proves the lookup with its own two-arm table and\n * `test/retention/expr-version-retention.test.ts` keeps the shipped v1 arm evaluating a sealed\n * artifact.\n */\nconst EVALUATORS: EvaluatorTable = { 1: evaluateV1 };\n\n/**\n * Evaluates a compiled artifact against one record, `spec/semantics/context-v1.md`\n * The function is pure: it reads no clock, no locale, no randomness and\n * no mutable global, and it never mutates `input`. A compiled artifact is assumed to\n * have passed the compiler's closed-schema validation; anything the walking skeleton\n * cannot interpret is reported as `ENGINE_ERROR` and blocks rather than returning a\n * plausible default.\n *\n * The version is read from the artifact and looked up in `EVALUATORS` before any rule runs: an\n * artifact stating a version this build does not implement is refused by name, never evaluated\n * as v1. `spec/release/expr-retention.json` records the arm and its evidence.\n *\n * The result is the sealed rules-only report. Admission is a separate answer:\n * `evaluateReadiness(compiled, input, env, options)` states the `Readiness`\n * (`SUBMIT`/`BLOCKED`/`UNDETERMINED`, its blockers and open checks), and\n * `submissionVerdict()` states the same answer as its `outcome`. A host decides whether to\n * submit from that answer, never from `report.status`.\n */\nexport function evaluate(\n compiled: CompiledSchema,\n input: EvaluationInput,\n // Absent means \"no environment stated\", which the evaluation default answers: the same shape\n // `evaluatePresentation`, `evaluateSubmission`, `describeFormState` and `submissionVerdict`\n // already take.\n env: EvaluationEnv = {},\n // The same derivation seam the readiness door takes, so an assigned array's manifest names the\n // same rows here as it does for `evaluateReadiness` and `submissionVerdict`.\n options: FormStateOptions = NO_FORM_STATE_OPTIONS,\n): EvaluationReport {\n assertArtifactReceipt(compiled);\n return evaluatorFor(EVALUATORS, readArtifactVersion(compiled))(compiled, input, env, options);\n}\n\n/**\n * The one admission answer for a record already in the wire contract.\n *\n * It is `describeFormState` narrowed to what an admission decision reads: the verdict, the\n * decided blockers, the open checks and whether a server handoff remains. `report.status` on the\n * sealed report is the rules fold and can be `PASS` while this verdict is `BLOCKED`; a host gates\n * on `readiness.verdict`, never on `status`. `submissionVerdict()` states the same facts as its\n * `outcome` and `form`, and `evaluateSubmission().readiness` is the same shape for a body this\n * process did not construct.\n */\nexport function evaluateReadiness(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv = {},\n options: FormStateOptions = NO_FORM_STATE_OPTIONS,\n): Readiness {\n return readinessOf(describeFormState(compiled, input, env, options));\n}\n\n/**\n * Evaluates a compiled artifact and explains it, `explain()`.\n *\n * The report is the canonical record; this adds the derivation behind it — the fields each\n * rule read, the rules a gate folded, the diagnostics\n * about that rule, and the seven-year provenance of every lookup *that rule* resolved\n * A support engineer tracing an old decision reads this instead of\n * replaying each rule by hand.\n */\nexport function explain(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv = {},\n): EvaluationExplanation {\n assertArtifactReceipt(compiled);\n return new Evaluation(compiled, toEvaluationInput(input), env).explanation();\n}\n\n/**\n * The host-only members a *typed* submission body states, if any.\n *\n * The conditional distributes, so a body typed as a union of shapes is caught when any arm states\n * one. A member whose type is `never` cannot be present and states nothing; every other optional\n * member may be present and counts. A body typed `unknown` — the untrusted input this door exists\n * for — states no members at all, and neither does a type with a string index signature: its\n * `keyof` collapses to `string | number`, so a member such a type also declares by name is still\n * invisible here. An open record is this door's own input, so it crosses and the runtime refusal\n * at `$.<member>` judges it.\n */\ntype HostOnlyMemberOf<Body> = Body extends unknown\n ? {\n [Member in Extract<keyof Body, HostOnlySubmissionMember>]: [\n Required<Pick<Body, Member>>[Member],\n ] extends [never]\n ? never\n : Member;\n }[Extract<keyof Body, HostOnlySubmissionMember>]\n : never;\n\n/**\n * `unknown` for a body whose type states only the record, and a refusal naming the offending\n * member otherwise.\n *\n * It is intersected with the body's own inferred type rather than used as the parameter type\n * because TypeScript has no negation type: any non-generic parameter that admits an untrusted\n * `unknown` admits every value, so the refusal has to be stated against what the caller's type\n * says. The refusal is a message string — the runtime refusal's words, plus where the member\n * does belong — so the compiler error names both instead of printing a bare `never`.\n */\ntype SubmissionBodyGuard<Body> = [HostOnlyMemberOf<Body>] extends [never]\n ? unknown\n : `\\`${HostOnlyMemberOf<Body> & string}\\` is the host's answer about this submission, never a member of its body: state it as \\`authority\\``;\n\n/**\n * The answer to one untrusted submission: a sealed report, or the reason the body was refused.\n *\n * `outcome: 'evaluated'` is the *parse and authority* answer: the body was readable, the host\n * facts were admitted, and every write the stated stance could judge was judged. It is not \"the\n * submission passed\": `readiness.verdict` is the admission answer, and only `SUBMIT` is a record\n * to store.\n * `report.status` is the rules fold and can be `PASS` while a declared count, a media constraint or\n * a hidden section still blocks; a `FAIL`, `UNKNOWN` or `DEFERRED` report is still the engine's\n * answer about a record it read.\n *\n * The success arm carries the parsed `input` and `env` the report was decided from, so a host\n * that exports the record exports the one this report describes rather than re-parsing a body\n * that may have changed in between. The input is the merged record: the server's `heldValues`\n * beneath the body's writable answers.\n */\nexport type SubmissionEvaluation =\n | {\n /**\n * The body was read, its authority was judged, and a sealed report exists.\n *\n * This is not admission. `readiness.verdict` is the admission answer, and only `SUBMIT`\n * is a record to store. The discriminator is named for what happened rather than for a\n * verdict, because `ok` reads as \"the submission is fine\", and storing the record is the\n * one decision this door leaves to the host.\n */\n readonly outcome: 'evaluated';\n /** The sealed rules-only report; admission is `readiness`. */\n readonly report: EvaluationReport;\n /** The one admission answer, beside the report rather than inside it. */\n readonly readiness: Readiness;\n readonly input: EvaluationInput;\n readonly env: EvaluationEnv;\n /**\n * The stance this call stated over the body, so a host that logs the answer logs what it\n * trusted. `unstated` is the default and means no write authority was claimed.\n */\n readonly trust: SubmissionTrustKind;\n }\n | { readonly outcome: 'refused'; readonly refusal: SubmissionRefusal };\n\n/**\n * Evaluates a request body this process did not construct, `evaluateSubmission()`.\n *\n * The body is the record and nothing else: every host-only fact — `context`, the access overlay\n * or projection, `redacted` and `sessionWrites` — is refused at its own path when the body states\n * it and is read only from `authority`, the typed facts the host passes.\n *\n * This is the door a backend puts behind an HTTP handler. `evaluate()` takes an\n * `EvaluationInput` — a value the caller has already read into the wire contract — so handing it\n * `JSON.parse(body)` is a type assertion, and the three ways that goes wrong are exactly what\n * this function exists to remove: a container of the wrong shape was a raw `TypeError` from\n * inside the evaluator, a member the wire cannot carry was silently carried (and only the export\n * refused it), and an unparseable `tier` was silently evaluated as `client`.\n *\n * Every refusal is data — `{ code, path, detail }` from `toSubmissionInput`,\n * `toEvaluationEnv`, the access window or the record reader — never a throw, and never a report:\n *\n * - a body that is not an object, or `values` that is not an object, is refused at `$` or\n * `$.values`;\n * - a body that states a host-only member is refused at `$.<member>` rather than having that\n * answer honoured or silently dropped;\n * - a declared field whose value the wire cannot carry is refused at `$.values.<fieldId>`, with\n * the same code and path `exportSubmission` states for the same body;\n * - a member the artifact does not declare is refused at `$.values.<fieldId>`;\n * - a context key the artifact does not declare is refused at `$.context.<key>`, naming the\n * declared root it probably meant — a root nested under its first segment would otherwise\n * read `UNKNOWN` with every dependent rule and gate folded with no cause;\n * - `tier` must be exactly `client` or `server`.\n *\n * `authority` supplies the facts the host decided about the submission: the hydrated context,\n * the access answer (an overlay or a projection, never both), the references it withheld and the\n * values this session wrote, plus the table port the environment carries. A client that supplied\n * any of them would be stating the answer to the question it is being judged by.\n *\n * The record itself is never an authority member: a JavaScript caller that states\n * `authority.values` is refused at `authority.values` instead of silently evaluating the body\n * while believing it evaluated the record it passed. A lookup port is read at the door too, so\n * a partial port is refused at `authority.lookup.<member>` rather than failing inside the first\n * rule that resolves a table.\n *\n * `trust` states what this process trusts about the body, and it is never implied:\n *\n * - `{ kind: 'access', entries }` supplies the access answer for the whole call: the evaluation\n * reads through it and every value the body carries is judged with `checkWrite`, so a\n * `read_only` binding is refused with the predicate's own `ACCESS_DENIED`, naming the binding\n * and the access it resolved. Stating an `authority.overlay` or `authority.access` beside it\n * is refused at `trust.entries`, because the two answers could disagree.\n * - `{ kind: 'verified', signatures }` — or `signatures` beside an `access` stance — requires\n * every `signature_ref` the body carries to be the blob the host captured, covering exactly\n * the field's declared `covers` at the record's schema version, and verifies its digest\n * against the record it signs.\n * - `{ kind: 'trusted-host', reason }` states that the caller authorised the body before this\n * call. The reason is required so the decision is visible at the call site and in a log.\n * - `{ kind: 'unstated' }` is the default when no stance is supplied. It refuses every signature\n * the body carries (no capture was stated) and every table the artifact does not declare, and\n * it does **not** claim to have checked write authority: the answer states\n * `trust: 'unstated'`, so an omission is visible to the caller rather than read as a grant. A\n * server that stores the record states `access` or `trusted-host`.\n *\n * The artifact's `datasets` list is the allow-list for every table an expression reads, in\n * every stance. A rehydrated artifact has no compiler in front of it, so a rule naming a table\n * it did not declare is refused here (`TABLE_NOT_DECLARED`) with the expression and the table.\n *\n * The client is untrusted, so the report this returns is a proposal: a server re-derives every\n * decision it acts on (`[ACCESS-7.1.1]`–`[ACCESS-7.1.6]`), and a stated `access` stance is a\n * check of the body it was handed, never authorisation for the store or the side effect.\n *\n * The two access questions `createAccessWindow` owns are answered inside the boundary as well:\n * an authority that supplies an overlay and a flattened projection together, and an environment\n * `accessVersion` that disagrees with the authority's overlay. `evaluate()` refuses each as a\n * throw, which is right for a caller that assembled a typed input; a host body cannot reach\n * either, but the door still answers a malformed authority as data at `authority.access` and\n * `$.accessVersion`. The window resolved here is the one the evaluation reads, so the check and\n * the evaluation cannot disagree.\n *\n * A body carries no gate overrides. `overrides` is not a member `toSubmissionInput` admits, so\n * one in the body is refused at `$`: the approval set is the host's (`evaluateGate`'s fourth\n * argument), never something a forwarded record can nominate for itself.\n *\n * The same closure is stated in the body's type, which is why this door is generic over it: a type\n * that can state one of those members — an optional member counts unless its type is `never` — is\n * not a body, so a stored projection or a request the host merged its authority into does not\n * compile at the call and the mistake is caught where it was written instead of becoming a\n * refusal of the request. An untrusted document the host has not narrowed (`body: unknown`, as\n * `JSON.parse` and every HTTP body reader answer) states no members and crosses this door as it\n * always has; the runtime refusal above is what judges it.\n */\nexport function evaluateSubmission<Body>(\n compiled: CompiledSchema,\n body: Body & SubmissionBodyGuard<Body>,\n env: unknown = {},\n authority: SubmissionAuthority = {},\n trust: SubmissionTrust = UNSTATED_TRUST,\n options: FormStateOptions = NO_FORM_STATE_OPTIONS,\n): SubmissionEvaluation {\n assertArtifactReceipt(compiled);\n const admission = admitSubmission(compiled, body, env, authority, trust, options, false);\n if (!admission.ok) return { outcome: 'refused', refusal: admission.refusal };\n const { input, env: parsedEnv, trust: stated, writeAuthority, accessWindow } = admission.value;\n // The artifact's own scope: a table it never declared cannot be read, whatever the caller\n // trusts about the body. This runs before any rule can resolve a table.\n const undeclared = undeclaredDataset(compiled);\n if (undeclared !== undefined) return { outcome: 'refused', refusal: datasetRefusal(undeclared) };\n const signatureRefusal = auditSignatures(compiled, input, stated);\n if (signatureRefusal !== undefined) return { outcome: 'refused', refusal: signatureRefusal };\n const evaluation = new Evaluation(compiled, input, parsedEnv, {\n accessWindow,\n ...evaluationOptions(options),\n });\n const reportBody = evaluation.runBody();\n if (writeAuthority !== undefined) {\n // The `enabled` half of the audit needs the report; the access half already ran in the\n // boundary, so an unauthorised body never reached a rule or a table.\n const refusal = auditWrites(\n compiled,\n admission.value.bodyValues,\n reportBody,\n writeAuthority,\n options.identity,\n );\n if (refusal !== undefined) return { outcome: 'refused', refusal };\n }\n const report = sealReport(reportBody);\n const readiness = Object.freeze(readinessOf(formStateOf(compiled, evaluation, input, options)));\n return { outcome: 'evaluated', report, readiness, input, env: parsedEnv, trust: stated.kind };\n}\n\n/** A gate's stateless verdict, `evaluateGate()`. */\nexport type GateEvaluation =\n | {\n /** The artifact declares no gate this call can decide, so there is no verdict to state. */\n readonly hasGate: false;\n readonly reason: 'no_gate';\n readonly report: EvaluationReport;\n readonly overrides: GateOverrideOutcome;\n }\n | {\n readonly hasGate: true;\n /** The gate this call decided: the report's primary gate. */\n readonly gateId: string;\n /** `OPEN` passes, `BLOCKED` refuses, `DEFERRED` awaits the server, `OVERRIDDEN` was approved. */\n readonly outcome: GateVerdict;\n readonly report: EvaluationReport;\n readonly gate: GateReport;\n readonly overrides: GateOverrideOutcome;\n };\n\n/**\n * Evaluates a record and decides its close-out gate in one stateless call, `evaluateGate()`.\n *\n * The gate a call decides is the artifact's primary gate, and every override is weighed\n * against the gate its `gateId` names. A host may pass approved `overrides`; each one\n * crosses the override boundary first, so a malformed record is a refusal with its cause and\n * an accepted one is the engine's own frozen copy. What an accepted override then satisfies\n * is decided in `gate.ts`, and the waiver it grants is applied in `overrides.ts`.\n *\n * The `overrides` argument is the host's approval set, not a request field: the host's approval\n * does not travel as a member — its presence in this set is the approval and its absence is not.\n * Pass the approvals this host holds for this gate and record; never\n * forward a client's list, because a client that can compute the input hash can approve its own\n * verdict. `evaluateSubmission` has no such argument for that reason.\n *\n * The verdict is this device's answer, not evidence: a server re-derives the gate from its\n * own overlay, environment and record date before accepting a submission (`[ACCESS-7.1.4]`).\n *\n * `options` is the same seam `submissionVerdict` and `describeFormState` take: an assigned\n * array's host-owned `identity` names its rows, and a host-loaded `optionSource` domain is the\n * domain a held value is judged against. Both are facts the artifact cannot derive, so a gate\n * that could not read them answered `OPEN` where readiness answered `BLOCKED` for one record.\n * Supplying them to one admission door and not the other is the disagreement this argument\n * removes; omitting them states the documented limit that only the artifact's own facts fold.\n */\nexport function evaluateGate(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv = {},\n overrides: readonly unknown[] = [],\n options: FormStateOptions = NO_FORM_STATE_OPTIONS,\n): GateEvaluation {\n assertArtifactReceipt(compiled);\n const identity = options.identity;\n // The manifest reaches the evaluation as well as the fold: an assigned array's rows are\n // named by the host, so an evaluation without it states one row-less result where the fold —\n // handed the manifest — states one per row.\n const evaluation = new Evaluation(\n compiled,\n input,\n env,\n identity === undefined ? {} : { assignedRowKeys: (fieldId: string) => identity.get(fieldId) },\n );\n const report = evaluation.run();\n const boundary = readGateOverrides(overrides);\n const gateRules = gateRulesOf(compiled);\n const gateId = report.primaryGateId;\n if (gateId === undefined || !gateRules.has(gateId)) {\n return {\n hasGate: false,\n reason: 'no_gate',\n report,\n overrides: {\n accepted: [],\n refused: [\n ...boundary.refused,\n ...boundary.wellFormed.map((override) => ({ override, reason: 'no_gate' as const })),\n ],\n },\n };\n }\n // The projection walks the whole record, so it runs once per gate that has an override to\n // weigh, and not at all when the call carries none.\n const decision = decideGate({\n gateRules,\n primaryGateId: gateId,\n report,\n inputHashOf: (namedGate) => gateInputHashOrNone(compiled, input, env, report, namedGate),\n candidates: boundary,\n deniedFieldsOf: (namedGate) => evaluation.gateDenials(namedGate),\n });\n // A declared fact — an array's cardinality, a media constraint, a `rowsFrom` count, a held\n // value the option domain refuses — is a decided blocker readiness states but no rule result\n // expresses. The gate door must not answer `OPEN` where `describeFormState` answers\n // `BLOCKED`: the same record cannot have two admission answers (`MODEL-2.1.17/20/22`).\n const snapshot: FormSnapshot = {\n report,\n access: evaluation.accessWindow(),\n computed: evaluation.computedValues(),\n input,\n rowCounts: evaluation.rowCounts(),\n optionAvailability: evaluation.optionAvailability(),\n undecided: evaluation.undecidedCauses(),\n layoutHidden: evaluation.layoutHidden(),\n };\n const factBlocked =\n (declaresFactBlocker(compiled) || holdsDeclaredValue(compiled, input.values)) &&\n declaredFactBlockers(compiled, snapshot, options).length > 0;\n return {\n hasGate: true,\n gateId,\n outcome: factBlocked ? 'BLOCKED' : decision.outcome,\n report: decision.report,\n gate: decision.gate,\n overrides: decision.overrides,\n };\n}\n\n/** The artifact's declared gate rules, keyed by the id their report entry is keyed by. */\nfunction gateRulesOf(compiled: CompiledSchema): ReadonlyMap<string, CompiledRule> {\n return new Map(\n (compiled.rules ?? [])\n .filter((rule) => rule.kind === 'gate')\n .map((rule) => [rule.ruleId, rule]),\n );\n}\n\n/** Whether any declaration can produce a derived blocking fact, so the fold is worth running. */\nfunction declaresFactBlocker(compiled: CompiledSchema): boolean {\n const visit = (fields: CompiledSchema['fields']): boolean =>\n fields.some(\n (field) =>\n field.minItems !== undefined ||\n field.maxItems !== undefined ||\n field.maxScale !== undefined ||\n field.accept !== undefined ||\n field.minBytes !== undefined ||\n field.maxBytes !== undefined ||\n field.rowsFromSource !== undefined ||\n field.options !== undefined ||\n field.optionSource !== undefined ||\n visit(field.fields ?? []),\n );\n return visit(compiled.fields);\n}\n\n/** The declared, decided blocking facts readiness states, for the gate door's fold. */\nfunction declaredFactBlockers(\n compiled: CompiledSchema,\n snapshot: FormSnapshot,\n options: FormStateOptions,\n): readonly FormBlocker[] {\n return deriveFormState(compiled, snapshot, options).blockers.filter(\n (blocker) =>\n blocker.kind === 'cardinality' ||\n blocker.kind === 'scale' ||\n blocker.kind === 'media' ||\n blocker.kind === 'rowCount' ||\n blocker.kind === 'invalidOption' ||\n blocker.kind === 'unavailableOption',\n );\n}\n\n/**\n * Whether the record holds a value at any declared field's path, so a declaration could refuse it.\n *\n * Every value lives under a top-level declared field, so this is a necessary condition for the\n * `invalidOption` blocker the fold above reads: a record holding no declared value has no value to\n * refuse. It is the cheap half of the guard `declaresFactBlocker` supplies for the declared facts.\n */\nfunction holdsDeclaredValue(compiled: CompiledSchema, values: unknown): boolean {\n if (!isRecord(values)) return false;\n return compiled.fields.some((field) => Object.hasOwn(values, field.fieldId));\n}\n\n/**\n * The read-only submission projection (`spec/semantics/access-v1.md` `[ACCESS-1.3.2]`, `[ACCESS-5.1.1]`\n * and `spec/semantics/rules-v1.md` `[RULES-2.1.10]`): a hydrated `write_only` value is omitted unless\n * the host lists that target in `sessionWrites`, so a stored secret is never exported by a stateless\n * caller that did not write it, and a value a `visible` rule hides is dropped only where the field's\n * `onHide` policy says so.\n *\n * The projection derives its own snapshot. A caller cannot prove that a report it supplies was\n * evaluated against the values it also supplies, so one call evaluates the record once and projects\n * the access, visibility and tier that evaluation answered. A stale or forged snapshot is therefore\n * not expressible here.\n *\n * A projection is not confidentiality: it keeps a client from exporting a value it may not\n * read, and cannot recall one the host already sent (`[ACCESS-7.1.2]`). A server re-projects\n * the submission it accepts rather than trusting this answer (`[ACCESS-7.1.4]`).\n */\nexport function exportSubmission(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv = {},\n options: SubmissionProjectionOptions = {},\n): Readonly<Record<string, unknown>> {\n assertArtifactReceipt(compiled);\n const evaluation = new Evaluation(compiled, input, env);\n const report = evaluation.run();\n const snapshot: SubmissionSnapshot = { report, access: evaluation.snapshotAccess() };\n return projectSubmission(compiled, input, snapshot, options);\n}\n\n/**\n * The cost budget arithmetic is part of the runtime's contract: an operator sizing a record\n * and a benchmark gating a regression must derive the same allowance the evaluator does.\n */\nexport { evaluationBudget } from './budget.js';\nexport type { EvaluationBudget } from './budget.js';\n"]}
@@ -0,0 +1,72 @@
1
+ import type { ValueDomainDeclaration } from '../../model/domain.js';
2
+ import type { UpcastContext, Upcaster } from '../../model/evolution.js';
3
+ import type { CompiledSchema } from '../../model/schema.js';
4
+ /** Why one declaration could not be carried into the target version. */
5
+ export type RelocationRefusal = {
6
+ readonly kind: 'field_unresolved';
7
+ readonly fieldId: string;
8
+ readonly detail: string;
9
+ } | {
10
+ readonly kind: 'value_refused';
11
+ readonly fieldId: string;
12
+ readonly detail: string;
13
+ };
14
+ /** What one version hop does to a record now that its values are located by `fieldId`. */
15
+ export interface RelocationHop {
16
+ /** The upcasters this hop declares, keyed by `fieldId`; absent is an identity hop. */
17
+ readonly upcasters: ReadonlyMap<string, Upcaster> | undefined;
18
+ /** The hop, and the host conversion input, an upcaster runs in. */
19
+ readonly context: UpcastContext;
20
+ }
21
+ /** The result of relocating a record across one hop. */
22
+ export type RelocationOutcome = {
23
+ readonly kind: 'relocated';
24
+ readonly values: Readonly<Record<string, unknown>>;
25
+ } | RelocationRefusal;
26
+ /**
27
+ * Every declaration both revisions carry whose recorded rows cannot be paired between them.
28
+ *
29
+ * A value is carried row for row within the array containers its declaration sits under, and a row
30
+ * is never an upcaster key (`[EVOL-2.1.6]`), so a declaration that changes which array scope holds
31
+ * it — out of an array into the record root, or between arrays — has no pairing a transform could
32
+ * express. Exported for the revision diff, which must not call such a transition publishable when
33
+ * the upcast refuses it: the host re-establishes where the value belongs. A declaration the target
34
+ * no longer carries is a different refusal and is not reported here.
35
+ */
36
+ export declare function unpairableRows(source: CompiledSchema, target: CompiledSchema): readonly string[];
37
+ /**
38
+ * Whether two declarations of one name admit the same value domain.
39
+ *
40
+ * Exported because two callers answer the same question from different evidence: the upcast
41
+ * refuses a recorded value carried across a domain change it has no transform for, and the
42
+ * revision diff classifies the change as one recorded values need a transform for
43
+ * (`[EVOL-2.1.4]`), without upcasting anything. They read one definition, so they cannot
44
+ * disagree about which changes are a domain change.
45
+ */
46
+ export declare function sameValueDomain(left: ValueDomainDeclaration, right: ValueDomainDeclaration): boolean;
47
+ /**
48
+ * The first raw member a record holds that its declarations do not name.
49
+ *
50
+ * A stored record's shape is the artifact's claim about it; a member no declaration names is a
51
+ * value the upcast has nowhere to put, so it is refused rather than dropped. Only record
52
+ * containers are inspected: a leaf's value is opaque here and validated where it is read.
53
+ */
54
+ export declare function unresolvedMembers(compiled: CompiledSchema, values: Readonly<Record<string, unknown>>): RelocationRefusal | undefined;
55
+ /**
56
+ * Transform ids a hop cannot apply because one version does not carry that value-bearing field.
57
+ *
58
+ * The revision diff reads the same predicate as the upcast, so a stale catalogue entry cannot be
59
+ * ignored by the publish answer and then refused only when a recorded value is migrated.
60
+ */
61
+ export declare function unresolvedUpcasters(source: CompiledSchema, target: CompiledSchema, upcasters?: ReadonlyMap<string, Upcaster>): readonly string[];
62
+ /**
63
+ * Carries a record's values from one version's declarations to the next's, by `fieldId`.
64
+ *
65
+ * A declaration the target does not carry, a value whose row structure cannot be paired, and a
66
+ * value domain that changed without an upcaster are all refusals: the upcast never drops a
67
+ * recorded value, never invents one, and never converts one silently. Every structural refusal is
68
+ * decided before the draft is written, so none of them depends on the order declarations are
69
+ * visited; an upcaster's own refusal is raised at the value that declined.
70
+ */
71
+ export declare function relocateRecord(source: CompiledSchema, target: CompiledSchema, values: Readonly<Record<string, unknown>>, hop: RelocationHop): RelocationOutcome;
72
+ //# sourceMappingURL=relocate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relocate.d.ts","sourceRoot":"","sources":["../../../src/eval/evolution/relocate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgC,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,KAAK,EAAE,aAAa,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAsD5D,wEAAwE;AACxE,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACxF;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F,0FAA0F;AAC1F,MAAM,WAAW,aAAa;IAC5B,sFAAsF;IACtF,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC;IAC9D,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;CACjC;AAED,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW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