@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,84 @@
1
+ import type { CompiledField, FieldAccess, FieldRef, WireValue } from '../../model/types.js';
2
+ import type { EvaluationInput } from '../../model/access.js';
3
+ import type { DeclaredPath } from '../reader-paths.js';
4
+ import type { RecordIndex, Resolved, Submitted } from './declarations.js';
5
+ /** The reader state one path resolution needs, including the questions it must report. */
6
+ export interface PathResolution {
7
+ readonly index: RecordIndex;
8
+ readonly input: EvaluationInput;
9
+ readonly redactedFields: ReadonlySet<string>;
10
+ isContextPath(path: string): boolean;
11
+ contextValue(rootPath: string): {
12
+ readonly present: boolean;
13
+ readonly value: unknown;
14
+ };
15
+ walked(path: string): DeclaredPath | undefined;
16
+ markConsidered(fieldId: string): void;
17
+ isReadable(ref: FieldRef): boolean;
18
+ /**
19
+ * Whether a *rule* may read a container's own value, before a per-row entry narrows it. A
20
+ * row-exact restriction withholds that row, and the row walk decides each one.
21
+ */
22
+ isReadableOwn(fieldId: string): boolean;
23
+ /** Whether one reference is redacted, which the row walk states as `DEFERRED`. */
24
+ isRedacted(ref: FieldRef): boolean;
25
+ /** The resolved access of one reference, so a container can ask a member's own state. */
26
+ accessFor(ref: FieldRef): FieldAccess;
27
+ recordDenied(fieldId: string, rowKey?: string | number): void;
28
+ noteUnreadable(path: string, fields: readonly FieldRef[]): void;
29
+ /**
30
+ * The members one array read withheld from each row, in array order, so the binder over that
31
+ * array can answer `UNKNOWN` for a member the row no longer carries.
32
+ */
33
+ noteWithheldRows(path: string, rows: readonly (readonly string[])[]): void;
34
+ /**
35
+ * The members one array read redacted from each row, in array order, so the binder over that
36
+ * array answers `DEFERRED` for a value the server holds.
37
+ */
38
+ noteDeferredRows(path: string, rows: readonly (readonly string[])[]): void;
39
+ denyUnreadableMember(field: CompiledField): string | undefined;
40
+ hasRedactedMember(field: CompiledField): boolean;
41
+ overlayAt(walked: DeclaredPath, segments: readonly string[]): Resolved | undefined;
42
+ mergeRecord(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;
43
+ mergeRows(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;
44
+ /** The submission's validated answer for `path`, remembered for this pass. */
45
+ submittedValue(path: string, walked: DeclaredPath, segments: readonly string[]): Submitted;
46
+ }
47
+ /**
48
+ * The submission's answer for `path`, validated against the declaration it reaches.
49
+ *
50
+ * This is the one place a submitted value becomes a value the engine may read: the wire
51
+ * reader copies it and refuses anything outside the profile, so every expression, every
52
+ * report and every hash downstream works from a canonical value. The caller resolves a path
53
+ * once per pass and re-applies the overlay over this answer, because the submission cannot
54
+ * change while the evaluation runs.
55
+ */
56
+ export declare function resolveSubmission(resolver: PathResolution, path: string, walked: DeclaredPath, segments: readonly string[]): Submitted;
57
+ /**
58
+ * Resolves the paths of one record and context, `spec/semantics/context-v1.md`.
59
+ *
60
+ * The reader owns the trust boundary between a caller's values and an expression: it
61
+ * applies the access projection, redaction, absence and the canonical wire reader, and
62
+ * it answers presence and relevance without pretending either is a value. Expressions
63
+ * read through it; no construct reaches around it.
64
+ *
65
+ * A path that crosses a computed writer is resolved in three steps that each have their own
66
+ * lifetime: admission and access are decided per read, the submission is validated once per
67
+ * path, and the overlay is applied per read. A writer's entry appears while the overlay is
68
+ * being built in dependency order, which is why the merged answer itself cannot be cached.
69
+ */
70
+ export declare function resolvePath(resolver: PathResolution, path: string): Resolved;
71
+ /**
72
+ * One array read for a rule that answers per row, `ACCESS-1.3.1`.
73
+ *
74
+ * An item rule asks about one row at a time, so a row-exact restriction is that row's answer and
75
+ * never the list's: the container is admitted by its own field-wide answer, every row's cells are
76
+ * stated by their own entries, and a member the server holds is carried as `DEFERRED` for its row.
77
+ * A container the host redacted outright, or one whose rows cannot be named, is still refused or
78
+ * deferred whole, because no row of it can be addressed (`ACCESS-1.3.4`).
79
+ *
80
+ * A container read by an expression keeps the stricter contract in `resolvePath`: the list it
81
+ * receives would carry a row whose member is missing, so it is refused or deferred instead.
82
+ */
83
+ export declare function resolveRows(resolver: PathResolution, walked: DeclaredPath, segments: readonly string[]): Resolved;
84
+ //# sourceMappingURL=resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/eval/reader/resolve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,E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V"}
@@ -0,0 +1,310 @@
1
+ import { AxiomError } from '../../model/errors.js';
2
+ import { UNKNOWN } from '../../model/types.js';
3
+ import { isRecord, isWireArray } from '../../model/values.js';
4
+ import { toCoveredTargetsWireValue, toHostWireValue, toWireValue, wireDeclarationOf, wireDeclarationOfDomain, } from '../../model/wire.js';
5
+ import { valueDomainOf } from '../../model/domain.js';
6
+ import { rowKeyOfItem } from '../addressing.js';
7
+ import { membersAreFullyReadable, withoutUnreadableMembers } from './member-access.js';
8
+ /** The declaration a context root's value is read against. */
9
+ function contextDeclaration(root) {
10
+ // The same derivation a field and an item use: the root declares the same four domain
11
+ // members, so a value outside them is refused at its own path rather than read as if the
12
+ // artifact had stated no domain at all.
13
+ return wireDeclarationOfDomain(valueDomainOf(root));
14
+ }
15
+ /**
16
+ * The value one context root supplies, validated against the root's declaration.
17
+ *
18
+ * A reserved root with no value is undetermined rather than absent: a rule that depends on
19
+ * the record date fails closed instead of reading an invented one, so the sentinel is
20
+ * returned as it stands and is not a value of the declared primitive.
21
+ */
22
+ function resolveContextPath(resolver, path, segments) {
23
+ const rootPath = segments.slice(1).join('.');
24
+ const declared = resolver.index.contextRoots.get(rootPath);
25
+ if (declared === undefined) {
26
+ throw new AxiomError('ENGINE_ERROR', `undeclared context root: ${path}`, path);
27
+ }
28
+ const supplied = resolver.contextValue(rootPath);
29
+ if (supplied.present && supplied.value === undefined) {
30
+ throw new AxiomError('ENGINE_ERROR', 'a context root present with value undefined is not a wire value', path);
31
+ }
32
+ if (!supplied.present) {
33
+ return declared.nullability === 'required'
34
+ ? { kind: 'value', value: UNKNOWN, primitive: declared.primitive }
35
+ : { kind: 'absent', primitive: declared.primitive };
36
+ }
37
+ return {
38
+ kind: 'value',
39
+ value: toHostWireValue(supplied.value, path, contextDeclaration(declared)),
40
+ primitive: declared.primitive,
41
+ };
42
+ }
43
+ /**
44
+ * The submission's answer for `path`, validated against the declaration it reaches.
45
+ *
46
+ * This is the one place a submitted value becomes a value the engine may read: the wire
47
+ * reader copies it and refuses anything outside the profile, so every expression, every
48
+ * report and every hash downstream works from a canonical value. The caller resolves a path
49
+ * once per pass and re-applies the overlay over this answer, because the submission cannot
50
+ * change while the evaluation runs.
51
+ */
52
+ export function resolveSubmission(resolver, path, walked, segments) {
53
+ const field = walked.field;
54
+ const fieldId = segments[0] ?? path;
55
+ const hasField = Object.hasOwn(resolver.input.values, fieldId);
56
+ let raw = hasField ? resolver.input.values[fieldId] : undefined;
57
+ if (hasField && raw === undefined) {
58
+ // An own property whose value is `undefined` is not an absent field:
59
+ // makes it invalid input, and treating it as absent would let a caller turn
60
+ // `absent(p)` true by supplying a malformed value instead of omitting it.
61
+ throw new AxiomError('ENGINE_ERROR', 'a field present with value undefined is not a wire value', path);
62
+ }
63
+ for (const segment of segments.slice(1)) {
64
+ // Expr v1 has no index node: an element is reached through a
65
+ // comprehension binder or an item scope, so a path that descends into a list is
66
+ // refused rather than answered as absent.
67
+ if (Array.isArray(raw)) {
68
+ throw new AxiomError('ENGINE_ERROR', `array ${field.fieldId} has no member \`${segment}\`; element access uses a comprehension binder`, path);
69
+ }
70
+ if (!isRecord(raw))
71
+ return { kind: 'missing', primitive: field.primitive };
72
+ const hasMember = Object.hasOwn(raw, segment);
73
+ raw = hasMember ? raw[segment] : undefined;
74
+ if (hasMember && raw === undefined) {
75
+ throw new AxiomError('ENGINE_ERROR', `a member present with value undefined is not a wire value`, `${path}.${segment}`);
76
+ }
77
+ }
78
+ if (raw === undefined)
79
+ return { kind: 'absent', primitive: field.primitive };
80
+ const owner = walked.declared.length < segments.length
81
+ ? resolver.index.fieldsByPath.get(walked.declared.join('.'))
82
+ : undefined;
83
+ const value = owner?.primitive === 'signature_ref' && field.fieldId === 'coveredTargets'
84
+ ? toCoveredTargetsWireValue(raw, path)
85
+ : toWireValue(raw, path, wireDeclarationOf(field));
86
+ return {
87
+ kind: 'value',
88
+ value,
89
+ primitive: field.primitive,
90
+ };
91
+ }
92
+ /**
93
+ * A validated submission with the computed members a writer owns merged over it.
94
+ *
95
+ * Both sides are canonical already — the submission by `resolveSubmission`, a writer's
96
+ * result by the write boundary that rendered it against its target declaration — so the
97
+ * merge cannot produce a value the profile would refuse, and the read does not copy and
98
+ * check the tree a second time.
99
+ */
100
+ function withComputed(resolver, field, submitted) {
101
+ switch (submitted.kind) {
102
+ case 'missing':
103
+ // No value exists below an absent parent, so no writer can have replaced a member of
104
+ // one: the path is absent, exactly as an input read found it.
105
+ return { kind: 'absent', primitive: submitted.primitive };
106
+ case 'absent': {
107
+ // A record absent from the submission may still hold a computed member: the writer's
108
+ // value exists even though the caller supplied no container, so the parent read carries
109
+ // it rather than reporting the whole record absent. A list is not that case: a writer
110
+ // owns a member of a row, and an absent list has no row for one to belong to, so it stays
111
+ // absent and an `item` rule answers once against it (`RULES-2.1.15`).
112
+ const merged = field.primitive === 'record' ? resolver.mergeRecord(field, undefined) : undefined;
113
+ return merged ?? { kind: 'absent', primitive: submitted.primitive };
114
+ }
115
+ case 'value': {
116
+ if (field.primitive === 'record') {
117
+ const merged = resolver.mergeRecord(field, submitted.value);
118
+ if (merged !== undefined)
119
+ return merged;
120
+ }
121
+ if (field.primitive === 'array') {
122
+ const merged = resolver.mergeRows(field, submitted.value);
123
+ if (merged !== undefined)
124
+ return merged;
125
+ }
126
+ return submitted;
127
+ }
128
+ }
129
+ }
130
+ /**
131
+ * Resolves the paths of one record and context, `spec/semantics/context-v1.md`.
132
+ *
133
+ * The reader owns the trust boundary between a caller's values and an expression: it
134
+ * applies the access projection, redaction, absence and the canonical wire reader, and
135
+ * it answers presence and relevance without pretending either is a value. Expressions
136
+ * read through it; no construct reaches around it.
137
+ *
138
+ * A path that crosses a computed writer is resolved in three steps that each have their own
139
+ * lifetime: admission and access are decided per read, the submission is validated once per
140
+ * path, and the overlay is applied per read. A writer's entry appears while the overlay is
141
+ * being built in dependency order, which is why the merged answer itself cannot be cached.
142
+ */
143
+ export function resolvePath(resolver, path) {
144
+ if (path.startsWith('$')) {
145
+ throw new AxiomError('ENGINE_ERROR', 'a comprehension binder path is not in scope here', path);
146
+ }
147
+ const segments = path.split('.');
148
+ if (resolver.isContextPath(path))
149
+ return resolveContextPath(resolver, path, segments);
150
+ const walked = resolver.walked(path);
151
+ if (walked === undefined) {
152
+ throw new AxiomError('ENGINE_ERROR', `undeclared field: ${path}`, path);
153
+ }
154
+ const field = walked.field;
155
+ const readFields = walked.declared;
156
+ // A nested read traverses every container on the way to the member it lands on, and
157
+ // each of them is a field the evaluation considered whose own state
158
+ // can refuse the read: a `hidden` field is not delivered at all, so
159
+ // reading *through* one has to be refused rather than only reading it as a target.
160
+ // An intrinsic member is not one of those containers: `f_fee.currency` reads the value
161
+ // of `f_fee`, so the field it considered is `f_fee`.
162
+ for (const id of readFields)
163
+ resolver.markConsidered(id);
164
+ const denied = [];
165
+ for (const id of readFields) {
166
+ if (resolver.isReadable({ fieldId: id }))
167
+ continue;
168
+ denied.push({ fieldId: id });
169
+ resolver.recordDenied(id);
170
+ }
171
+ if (denied.length > 0) {
172
+ resolver.noteUnreadable(path, denied);
173
+ return { kind: 'unreadable', primitive: field.primitive };
174
+ }
175
+ // Redaction is resolved per field, never inherited from a container.
176
+ if (readFields.some((id) => resolver.redactedFields.has(id))) {
177
+ return { kind: 'redacted', primitive: field.primitive };
178
+ }
179
+ // A record read carries every member it holds, so a member this device may not read refuses
180
+ // the whole read instead of travelling inside the container value. An array is decided per
181
+ // row below, once its value (and the overlay over it) is in hand: access is answered for a
182
+ // `(member, rowKey)` reference, so one row's restriction withholds that row's value and not
183
+ // the rows and members the device may read (`ACCESS-1.3.1`, `ACCESS-1.3.3`). A value the
184
+ // server holds refuses the container the same way: a list carrying a row whose member it holds
185
+ // is one this device was not given (`ACCESS-3.1.2`).
186
+ if (field.primitive !== 'array') {
187
+ const deniedMember = resolver.denyUnreadableMember(field);
188
+ if (deniedMember !== undefined) {
189
+ resolver.noteUnreadable(path, [{ fieldId: deniedMember }]);
190
+ return { kind: 'unreadable', primitive: field.primitive };
191
+ }
192
+ }
193
+ if (resolver.hasRedactedMember(field))
194
+ return { kind: 'redacted', primitive: field.primitive };
195
+ // Access, redaction and container membership are decided before the overlay is consulted,
196
+ // so a writer never answers a read the device may not make. Past this point the overlay is
197
+ // authoritative for a field a writer owns.
198
+ const overlaid = resolver.overlayAt(walked, segments);
199
+ if (overlaid !== undefined)
200
+ return withheldRowMembers(resolver, field, path, overlaid);
201
+ // A writer that owns the whole field answered above, so the submitted value is only read
202
+ // when it can still decide the answer: a stale submission under a wholly computed field
203
+ // never refuses the read its writer replaced.
204
+ return withheldRowMembers(resolver, field, path, withComputed(resolver, field, resolver.submittedValue(path, walked, segments)));
205
+ }
206
+ /**
207
+ * One array read for a rule that answers per row, `ACCESS-1.3.1`.
208
+ *
209
+ * An item rule asks about one row at a time, so a row-exact restriction is that row's answer and
210
+ * never the list's: the container is admitted by its own field-wide answer, every row's cells are
211
+ * stated by their own entries, and a member the server holds is carried as `DEFERRED` for its row.
212
+ * A container the host redacted outright, or one whose rows cannot be named, is still refused or
213
+ * deferred whole, because no row of it can be addressed (`ACCESS-1.3.4`).
214
+ *
215
+ * A container read by an expression keeps the stricter contract in `resolvePath`: the list it
216
+ * receives would carry a row whose member is missing, so it is refused or deferred instead.
217
+ */
218
+ export function resolveRows(resolver, walked, segments) {
219
+ const field = walked.field;
220
+ const path = segments.join('.');
221
+ for (const id of walked.declared)
222
+ resolver.markConsidered(id);
223
+ // Every enclosing declaration carries the rows. The container's own answer admits the row walk;
224
+ // an ancestor's answer still refuses the read, exactly as an ordinary path read does.
225
+ const denied = [];
226
+ for (const id of walked.declared) {
227
+ const readable = id === field.fieldId
228
+ ? resolver.isReadableOwn(field.fieldId)
229
+ : resolver.isReadable({ fieldId: id });
230
+ if (readable)
231
+ continue;
232
+ resolver.recordDenied(id);
233
+ denied.push({ fieldId: id });
234
+ }
235
+ if (denied.length > 0) {
236
+ resolver.noteUnreadable(path, denied);
237
+ return { kind: 'unreadable', primitive: field.primitive };
238
+ }
239
+ if (walked.declared.some((id) => resolver.redactedFields.has(id))) {
240
+ return { kind: 'redacted', primitive: field.primitive };
241
+ }
242
+ const overlaid = resolver.overlayAt(walked, segments);
243
+ const resolved = overlaid ?? withComputed(resolver, field, resolver.submittedValue(path, walked, segments));
244
+ return withheldRowMembers(resolver, field, path, resolved, true);
245
+ }
246
+ /**
247
+ * One array read with the row members access withholds removed, and the members stated.
248
+ *
249
+ * `membersAreFullyReadable` is the fast path: an alias-free member is readable in every row it
250
+ * belongs to, so a container whose members are all `read_write` or `read_only` is returned as
251
+ * it stands and no row is walked.
252
+ *
253
+ * The slow path asks the question for each `(member, rowKey)` reference, so a member readable in
254
+ * one row is delivered in that row and withheld in another: one `masked` member no longer makes
255
+ * the whole array undecidable, and a `write_only` value this session wrote is readable in the
256
+ * row it wrote (`ACCESS-1.3.1`, `ACCESS-1.3.3`). A container whose rows cannot be named — no
257
+ * natural key, an assigned manifest that does not reconcile, or a withheld key member — is
258
+ * refused whole, because matching a member to a row this engine cannot name is exactly the
259
+ * positional reconciliation `IDENT-3.1.2` forbids.
260
+ */
261
+ function withheldRowMembers(resolver, field, path, resolved, rowsOnly = false) {
262
+ if (field.primitive !== 'array' || (field.fields ?? []).length === 0)
263
+ return resolved;
264
+ if (resolved.kind !== 'value' || !isWireArray(resolved.value)) {
265
+ return refuseUnnameableRows(resolver, field, path, resolved);
266
+ }
267
+ // A per-row read walks the rows even when every member's own answer would deliver: one row may
268
+ // narrow or redact a cell, and a row-exact restriction is that row's answer.
269
+ if (!rowsOnly && membersAreFullyReadable(resolver, field))
270
+ return resolved;
271
+ const manifest = field.rowKey?.mode === 'assigned' ? resolver.index.assignedRowKeys?.(field.fieldId) : undefined;
272
+ const rows = resolved.value;
273
+ const withheld = withoutUnreadableMembers({
274
+ field,
275
+ rows,
276
+ // The row key is the addressing authority's answer for this list, never a position: a
277
+ // manifest that does not reconcile with the rows it is read beside names none of them.
278
+ rowKeyOf: (_row, index) => rowKeyOfItem(field, rows, index, manifest),
279
+ isReadable: (ref) => resolver.isReadable(ref),
280
+ isRowReadable: (rowKey) => resolver.isReadable({ fieldId: field.fieldId, rowKey }),
281
+ isRedacted: (ref) => resolver.isRedacted(ref),
282
+ recordDenied: (fieldId, rowKey) => {
283
+ resolver.recordDenied(fieldId, rowKey);
284
+ },
285
+ });
286
+ if (withheld === undefined)
287
+ return refuseUnnameableRows(resolver, field, path, resolved);
288
+ if (withheld.denied.length > 0)
289
+ resolver.noteUnreadable(path, withheld.denied);
290
+ if (withheld.withheld.some((members) => members.length > 0)) {
291
+ resolver.noteWithheldRows(path, withheld.withheld);
292
+ }
293
+ if (withheld.deferred.some((members) => members.length > 0)) {
294
+ resolver.noteDeferredRows(path, withheld.deferred);
295
+ }
296
+ if (withheld.rows === resolved.value)
297
+ return resolved;
298
+ return { ...resolved, value: withheld.rows };
299
+ }
300
+ /** The whole-read refusal a container whose rows cannot be named keeps, when a member is refused. */
301
+ function refuseUnnameableRows(resolver, field, path, resolved) {
302
+ if (field.primitive !== 'array')
303
+ return resolved;
304
+ const deniedMember = resolver.denyUnreadableMember(field);
305
+ if (deniedMember === undefined)
306
+ return resolved;
307
+ resolver.noteUnreadable(path, [{ fieldId: deniedMember }]);
308
+ return { kind: 'unreadable', primitive: field.primitive };
309
+ }
310
+ //# sourceMappingURL=resolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../src/eval/reader/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;A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AAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QAC5D,QAAQ,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;IACD,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,KAAK;QAAE,OAAO,QAAQ,CAAC;IACtD,OAAO,EAAE,GAAG,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/C,CAAC;AAED,qGAAqG;AACrG,SAAS,oBAAoB,CAC3B,QAAwB,EACxB,KAAoB,EACpB,IAAY,EACZ,QAAkB;IAElB,IAAI,KAAK,CAAC,SAAS,KAAK,OAAO;QAAE,OAAO,QAAQ,CAAC;IACjD,MAAM,YAAY,GAAG,QAAQ,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC1D,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAChD,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAC3D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;AAC5D,CAAC","sourcesContent":["import { AxiomError } from '../../model/errors.js';\nimport type { CompiledField, FieldAccess, FieldRef, WireValue } from '../../model/types.js';\nimport type { EvaluationInput } from '../../model/access.js';\nimport { UNKNOWN } from '../../model/types.js';\nimport { isRecord, isWireArray } from '../../model/values.js';\nimport {\n toCoveredTargetsWireValue,\n toHostWireValue,\n toWireValue,\n wireDeclarationOf,\n wireDeclarationOfDomain,\n} from '../../model/wire.js';\nimport type { WireDeclaration } from '../../model/wire.js';\nimport { valueDomainOf } from '../../model/domain.js';\nimport { rowKeyOfItem } from '../addressing.js';\nimport type { DeclaredPath } from '../reader-paths.js';\nimport type { ContextRootDeclaration, RecordIndex, Resolved, Submitted } from './declarations.js';\nimport { membersAreFullyReadable, withoutUnreadableMembers } from './member-access.js';\n\n/** The reader state one path resolution needs, including the questions it must report. */\nexport interface PathResolution {\n readonly index: RecordIndex;\n readonly input: EvaluationInput;\n readonly redactedFields: ReadonlySet<string>;\n isContextPath(path: string): boolean;\n contextValue(rootPath: string): { readonly present: boolean; readonly value: unknown };\n walked(path: string): DeclaredPath | undefined;\n markConsidered(fieldId: string): void;\n isReadable(ref: FieldRef): boolean;\n /**\n * Whether a *rule* may read a container's own value, before a per-row entry narrows it. A\n * row-exact restriction withholds that row, and the row walk decides each one.\n */\n isReadableOwn(fieldId: string): boolean;\n /** Whether one reference is redacted, which the row walk states as `DEFERRED`. */\n isRedacted(ref: FieldRef): boolean;\n /** The resolved access of one reference, so a container can ask a member's own state. */\n accessFor(ref: FieldRef): FieldAccess;\n recordDenied(fieldId: string, rowKey?: string | number): void;\n noteUnreadable(path: string, fields: readonly FieldRef[]): void;\n /**\n * The members one array read withheld from each row, in array order, so the binder over that\n * array can answer `UNKNOWN` for a member the row no longer carries.\n */\n noteWithheldRows(path: string, rows: readonly (readonly string[])[]): void;\n /**\n * The members one array read redacted from each row, in array order, so the binder over that\n * array answers `DEFERRED` for a value the server holds.\n */\n noteDeferredRows(path: string, rows: readonly (readonly string[])[]): void;\n denyUnreadableMember(field: CompiledField): string | undefined;\n hasRedactedMember(field: CompiledField): boolean;\n overlayAt(walked: DeclaredPath, segments: readonly string[]): Resolved | undefined;\n mergeRecord(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;\n mergeRows(field: CompiledField, raw: WireValue | undefined): Resolved | undefined;\n /** The submission's validated answer for `path`, remembered for this pass. */\n submittedValue(path: string, walked: DeclaredPath, segments: readonly string[]): Submitted;\n}\n\n/** The declaration a context root's value is read against. */\nfunction contextDeclaration(root: ContextRootDeclaration): WireDeclaration {\n // The same derivation a field and an item use: the root declares the same four domain\n // members, so a value outside them is refused at its own path rather than read as if the\n // artifact had stated no domain at all.\n return wireDeclarationOfDomain(valueDomainOf(root));\n}\n\n/**\n * The value one context root supplies, validated against the root's declaration.\n *\n * A reserved root with no value is undetermined rather than absent: a rule that depends on\n * the record date fails closed instead of reading an invented one, so the sentinel is\n * returned as it stands and is not a value of the declared primitive.\n */\nfunction resolveContextPath(\n resolver: PathResolution,\n path: string,\n segments: readonly string[],\n): Resolved {\n const rootPath = segments.slice(1).join('.');\n const declared = resolver.index.contextRoots.get(rootPath);\n if (declared === undefined) {\n throw new AxiomError('ENGINE_ERROR', `undeclared context root: ${path}`, path);\n }\n const supplied = resolver.contextValue(rootPath);\n if (supplied.present && supplied.value === undefined) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n 'a context root present with value undefined is not a wire value',\n path,\n );\n }\n if (!supplied.present) {\n return declared.nullability === 'required'\n ? { kind: 'value', value: UNKNOWN, primitive: declared.primitive }\n : { kind: 'absent', primitive: declared.primitive };\n }\n return {\n kind: 'value',\n value: toHostWireValue(supplied.value, path, contextDeclaration(declared)),\n primitive: declared.primitive,\n };\n}\n\n/**\n * The submission's answer for `path`, validated against the declaration it reaches.\n *\n * This is the one place a submitted value becomes a value the engine may read: the wire\n * reader copies it and refuses anything outside the profile, so every expression, every\n * report and every hash downstream works from a canonical value. The caller resolves a path\n * once per pass and re-applies the overlay over this answer, because the submission cannot\n * change while the evaluation runs.\n */\nexport function resolveSubmission(\n resolver: PathResolution,\n path: string,\n walked: DeclaredPath,\n segments: readonly string[],\n): Submitted {\n const field = walked.field;\n const fieldId = segments[0] ?? path;\n const hasField = Object.hasOwn(resolver.input.values, fieldId);\n let raw: unknown = hasField ? resolver.input.values[fieldId] : undefined;\n if (hasField && raw === undefined) {\n // An own property whose value is `undefined` is not an absent field:\n // makes it invalid input, and treating it as absent would let a caller turn\n // `absent(p)` true by supplying a malformed value instead of omitting it.\n throw new AxiomError(\n 'ENGINE_ERROR',\n 'a field present with value undefined is not a wire value',\n path,\n );\n }\n for (const segment of segments.slice(1)) {\n // Expr v1 has no index node: an element is reached through a\n // comprehension binder or an item scope, so a path that descends into a list is\n // refused rather than answered as absent.\n if (Array.isArray(raw)) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `array ${field.fieldId} has no member \\`${segment}\\`; element access uses a comprehension binder`,\n path,\n );\n }\n if (!isRecord(raw)) return { kind: 'missing', primitive: field.primitive };\n const hasMember = Object.hasOwn(raw, segment);\n raw = hasMember ? raw[segment] : undefined;\n if (hasMember && raw === undefined) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `a member present with value undefined is not a wire value`,\n `${path}.${segment}`,\n );\n }\n }\n if (raw === undefined) return { kind: 'absent', primitive: field.primitive };\n const owner =\n walked.declared.length < segments.length\n ? resolver.index.fieldsByPath.get(walked.declared.join('.'))\n : undefined;\n const value =\n owner?.primitive === 'signature_ref' && field.fieldId === 'coveredTargets'\n ? toCoveredTargetsWireValue(raw, path)\n : toWireValue(raw, path, wireDeclarationOf(field));\n return {\n kind: 'value',\n value,\n primitive: field.primitive,\n };\n}\n\n/**\n * A validated submission with the computed members a writer owns merged over it.\n *\n * Both sides are canonical already — the submission by `resolveSubmission`, a writer's\n * result by the write boundary that rendered it against its target declaration — so the\n * merge cannot produce a value the profile would refuse, and the read does not copy and\n * check the tree a second time.\n */\nfunction withComputed(\n resolver: PathResolution,\n field: CompiledField,\n submitted: Submitted,\n): Resolved {\n switch (submitted.kind) {\n case 'missing':\n // No value exists below an absent parent, so no writer can have replaced a member of\n // one: the path is absent, exactly as an input read found it.\n return { kind: 'absent', primitive: submitted.primitive };\n case 'absent': {\n // A record absent from the submission may still hold a computed member: the writer's\n // value exists even though the caller supplied no container, so the parent read carries\n // it rather than reporting the whole record absent. A list is not that case: a writer\n // owns a member of a row, and an absent list has no row for one to belong to, so it stays\n // absent and an `item` rule answers once against it (`RULES-2.1.15`).\n const merged =\n field.primitive === 'record' ? resolver.mergeRecord(field, undefined) : undefined;\n return merged ?? { kind: 'absent', primitive: submitted.primitive };\n }\n case 'value': {\n if (field.primitive === 'record') {\n const merged = resolver.mergeRecord(field, submitted.value);\n if (merged !== undefined) return merged;\n }\n if (field.primitive === 'array') {\n const merged = resolver.mergeRows(field, submitted.value);\n if (merged !== undefined) return merged;\n }\n return submitted;\n }\n }\n}\n\n/**\n * Resolves the paths of one record and context, `spec/semantics/context-v1.md`.\n *\n * The reader owns the trust boundary between a caller's values and an expression: it\n * applies the access projection, redaction, absence and the canonical wire reader, and\n * it answers presence and relevance without pretending either is a value. Expressions\n * read through it; no construct reaches around it.\n *\n * A path that crosses a computed writer is resolved in three steps that each have their own\n * lifetime: admission and access are decided per read, the submission is validated once per\n * path, and the overlay is applied per read. A writer's entry appears while the overlay is\n * being built in dependency order, which is why the merged answer itself cannot be cached.\n */\nexport function resolvePath(resolver: PathResolution, path: string): Resolved {\n if (path.startsWith('$')) {\n throw new AxiomError('ENGINE_ERROR', 'a comprehension binder path is not in scope here', path);\n }\n const segments = path.split('.');\n if (resolver.isContextPath(path)) return resolveContextPath(resolver, path, segments);\n\n const walked = resolver.walked(path);\n if (walked === undefined) {\n throw new AxiomError('ENGINE_ERROR', `undeclared field: ${path}`, path);\n }\n const field = walked.field;\n const readFields = walked.declared;\n // A nested read traverses every container on the way to the member it lands on, and\n // each of them is a field the evaluation considered whose own state\n // can refuse the read: a `hidden` field is not delivered at all, so\n // reading *through* one has to be refused rather than only reading it as a target.\n // An intrinsic member is not one of those containers: `f_fee.currency` reads the value\n // of `f_fee`, so the field it considered is `f_fee`.\n for (const id of readFields) resolver.markConsidered(id);\n const denied: FieldRef[] = [];\n for (const id of readFields) {\n if (resolver.isReadable({ fieldId: id })) continue;\n denied.push({ fieldId: id });\n resolver.recordDenied(id);\n }\n if (denied.length > 0) {\n resolver.noteUnreadable(path, denied);\n return { kind: 'unreadable', primitive: field.primitive };\n }\n // Redaction is resolved per field, never inherited from a container.\n if (readFields.some((id) => resolver.redactedFields.has(id))) {\n return { kind: 'redacted', primitive: field.primitive };\n }\n // A record read carries every member it holds, so a member this device may not read refuses\n // the whole read instead of travelling inside the container value. An array is decided per\n // row below, once its value (and the overlay over it) is in hand: access is answered for a\n // `(member, rowKey)` reference, so one row's restriction withholds that row's value and not\n // the rows and members the device may read (`ACCESS-1.3.1`, `ACCESS-1.3.3`). A value the\n // server holds refuses the container the same way: a list carrying a row whose member it holds\n // is one this device was not given (`ACCESS-3.1.2`).\n if (field.primitive !== 'array') {\n const deniedMember = resolver.denyUnreadableMember(field);\n if (deniedMember !== undefined) {\n resolver.noteUnreadable(path, [{ fieldId: deniedMember }]);\n return { kind: 'unreadable', primitive: field.primitive };\n }\n }\n if (resolver.hasRedactedMember(field)) return { kind: 'redacted', primitive: field.primitive };\n\n // Access, redaction and container membership are decided before the overlay is consulted,\n // so a writer never answers a read the device may not make. Past this point the overlay is\n // authoritative for a field a writer owns.\n const overlaid = resolver.overlayAt(walked, segments);\n if (overlaid !== undefined) return withheldRowMembers(resolver, field, path, overlaid);\n\n // A writer that owns the whole field answered above, so the submitted value is only read\n // when it can still decide the answer: a stale submission under a wholly computed field\n // never refuses the read its writer replaced.\n return withheldRowMembers(\n resolver,\n field,\n path,\n withComputed(resolver, field, resolver.submittedValue(path, walked, segments)),\n );\n}\n\n/**\n * One array read for a rule that answers per row, `ACCESS-1.3.1`.\n *\n * An item rule asks about one row at a time, so a row-exact restriction is that row's answer and\n * never the list's: the container is admitted by its own field-wide answer, every row's cells are\n * stated by their own entries, and a member the server holds is carried as `DEFERRED` for its row.\n * A container the host redacted outright, or one whose rows cannot be named, is still refused or\n * deferred whole, because no row of it can be addressed (`ACCESS-1.3.4`).\n *\n * A container read by an expression keeps the stricter contract in `resolvePath`: the list it\n * receives would carry a row whose member is missing, so it is refused or deferred instead.\n */\nexport function resolveRows(\n resolver: PathResolution,\n walked: DeclaredPath,\n segments: readonly string[],\n): Resolved {\n const field = walked.field;\n const path = segments.join('.');\n for (const id of walked.declared) resolver.markConsidered(id);\n // Every enclosing declaration carries the rows. The container's own answer admits the row walk;\n // an ancestor's answer still refuses the read, exactly as an ordinary path read does.\n const denied: FieldRef[] = [];\n for (const id of walked.declared) {\n const readable =\n id === field.fieldId\n ? resolver.isReadableOwn(field.fieldId)\n : resolver.isReadable({ fieldId: id });\n if (readable) continue;\n resolver.recordDenied(id);\n denied.push({ fieldId: id });\n }\n if (denied.length > 0) {\n resolver.noteUnreadable(path, denied);\n return { kind: 'unreadable', primitive: field.primitive };\n }\n if (walked.declared.some((id) => resolver.redactedFields.has(id))) {\n return { kind: 'redacted', primitive: field.primitive };\n }\n const overlaid = resolver.overlayAt(walked, segments);\n const resolved =\n overlaid ?? withComputed(resolver, field, resolver.submittedValue(path, walked, segments));\n return withheldRowMembers(resolver, field, path, resolved, true);\n}\n\n/**\n * One array read with the row members access withholds removed, and the members stated.\n *\n * `membersAreFullyReadable` is the fast path: an alias-free member is readable in every row it\n * belongs to, so a container whose members are all `read_write` or `read_only` is returned as\n * it stands and no row is walked.\n *\n * The slow path asks the question for each `(member, rowKey)` reference, so a member readable in\n * one row is delivered in that row and withheld in another: one `masked` member no longer makes\n * the whole array undecidable, and a `write_only` value this session wrote is readable in the\n * row it wrote (`ACCESS-1.3.1`, `ACCESS-1.3.3`). A container whose rows cannot be named — no\n * natural key, an assigned manifest that does not reconcile, or a withheld key member — is\n * refused whole, because matching a member to a row this engine cannot name is exactly the\n * positional reconciliation `IDENT-3.1.2` forbids.\n */\nfunction withheldRowMembers(\n resolver: PathResolution,\n field: CompiledField,\n path: string,\n resolved: Resolved,\n rowsOnly = false,\n): Resolved {\n if (field.primitive !== 'array' || (field.fields ?? []).length === 0) return resolved;\n if (resolved.kind !== 'value' || !isWireArray(resolved.value)) {\n return refuseUnnameableRows(resolver, field, path, resolved);\n }\n // A per-row read walks the rows even when every member's own answer would deliver: one row may\n // narrow or redact a cell, and a row-exact restriction is that row's answer.\n if (!rowsOnly && membersAreFullyReadable(resolver, field)) return resolved;\n const manifest =\n field.rowKey?.mode === 'assigned' ? resolver.index.assignedRowKeys?.(field.fieldId) : undefined;\n const rows = resolved.value;\n const withheld = withoutUnreadableMembers({\n field,\n rows,\n // The row key is the addressing authority's answer for this list, never a position: a\n // manifest that does not reconcile with the rows it is read beside names none of them.\n rowKeyOf: (_row, index) => rowKeyOfItem(field, rows, index, manifest),\n isReadable: (ref) => resolver.isReadable(ref),\n isRowReadable: (rowKey) => resolver.isReadable({ fieldId: field.fieldId, rowKey }),\n isRedacted: (ref) => resolver.isRedacted(ref),\n recordDenied: (fieldId, rowKey) => {\n resolver.recordDenied(fieldId, rowKey);\n },\n });\n if (withheld === undefined) return refuseUnnameableRows(resolver, field, path, resolved);\n if (withheld.denied.length > 0) resolver.noteUnreadable(path, withheld.denied);\n if (withheld.withheld.some((members) => members.length > 0)) {\n resolver.noteWithheldRows(path, withheld.withheld);\n }\n if (withheld.deferred.some((members) => members.length > 0)) {\n resolver.noteDeferredRows(path, withheld.deferred);\n }\n if (withheld.rows === resolved.value) return resolved;\n return { ...resolved, value: withheld.rows };\n}\n\n/** The whole-read refusal a container whose rows cannot be named keeps, when a member is refused. */\nfunction refuseUnnameableRows(\n resolver: PathResolution,\n field: CompiledField,\n path: string,\n resolved: Resolved,\n): Resolved {\n if (field.primitive !== 'array') return resolved;\n const deniedMember = resolver.denyUnreadableMember(field);\n if (deniedMember === undefined) return resolved;\n resolver.noteUnreadable(path, [{ fieldId: deniedMember }]);\n return { kind: 'unreadable', primitive: field.primitive };\n}\n"]}
@@ -0,0 +1,50 @@
1
+ import type { Evaluated } from '../expr/value.js';
2
+ import type { Resolved } from './declarations.js';
3
+ /** The reader state one value read needs, including the cache it writes back to. */
4
+ export interface ValueRead {
5
+ cachedRead(path: string): Evaluated | undefined;
6
+ rememberRead(path: string, evaluated: Evaluated): void;
7
+ resolveCached(path: string): Resolved;
8
+ /** Records the read's refusals and returns whether this path was refused. */
9
+ noteReadDenials(path: string): boolean;
10
+ /**
11
+ * Records that the read held no decided value for a reason no refusal explains,
12
+ * `RULES-2.1.1`: an absent or null input, or a value no writer produced.
13
+ */
14
+ noteMissingInput(): void;
15
+ /** Records that the read answered a value the server holds, `[ACCESS-3.1.2]`. */
16
+ noteDeferredInput(): void;
17
+ /**
18
+ * Records the members one array read withheld, per row. It is the read's own sideband, so the
19
+ * disclosure taint can tell a member the value no longer carries from one it does.
20
+ */
21
+ noteWithheld(path: string, withheldRows?: readonly (readonly string[])[]): void;
22
+ noteWithheldField(fieldId: string): void;
23
+ isComputedAffected(path: string): boolean;
24
+ /** The members each element of a withheld array read this device may not read. */
25
+ withheldRows(path: string): readonly (readonly string[])[] | undefined;
26
+ /** The members each element of a redacted array read the server holds. */
27
+ deferredRows(path: string): readonly (readonly string[])[] | undefined;
28
+ }
29
+ /**
30
+ * One path's resolved value, cached for the evaluation unless a computed writer can still
31
+ * change it. A read reports the refusals and the withheld fields it observed on every call,
32
+ * including a cache hit: those are facts about the read, not about the resolution.
33
+ *
34
+ * Resolution already validated the value — `resolvePath` is the one place a submission
35
+ * crosses the wire reader — so this function only turns it into the evaluator's value. A
36
+ * missing required context root arrives as the `UNKNOWN` sentinel, which is not a value of
37
+ * the declared primitive and is handed on as it stands.
38
+ */
39
+ export declare function readValue(source: ValueRead, path: string): Evaluated;
40
+ /**
41
+ * One resolved value as the evaluator sees it, with the sidebands a binder answers from.
42
+ *
43
+ * A value read carries the members the device may not read, so a binder over it can answer
44
+ * `UNKNOWN` rather than reading the removal as an absence. A member the server holds is
45
+ * `DEFERRED` through the same sideband a writer's unproduced member uses, so one row's `DEFERRED`
46
+ * member never becomes another row's absence (`EXPR-9.1.7`). A computed value brings the sideband
47
+ * its writer's expression carried; the access answer for this read adds anything it stripped.
48
+ */
49
+ export declare function evaluatedOf(source: ValueRead, path: string, resolved: Resolved): Evaluated;
50
+ //# sourceMappingURL=value-read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-read.d.ts","sourceRoot":"","sources":["../../../src/eval/reader/value-read.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,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