@noy-db/hub 0.8.0-pre.0 → 0.9.0-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (706) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +8 -8
  3. package/codemods/0.4.0-pre.json +1 -1
  4. package/codemods/0.8.0-pre.json +1 -1
  5. package/dist/api-MSJXVYQG.js +18 -0
  6. package/dist/as/index.js +34 -25
  7. package/dist/as/index.js.map +1 -1
  8. package/dist/at/index.js +9 -10
  9. package/dist/attestation/index.js +39 -28
  10. package/dist/attestation/index.js.map +1 -1
  11. package/dist/{backup-7TFRVFLH.js → backup-7RKNZMQO.js} +15 -16
  12. package/dist/backup-7RKNZMQO.js.map +1 -0
  13. package/dist/blobs/index.js +13 -14
  14. package/dist/blobs/index.js.map +1 -1
  15. package/dist/broker/index.js +20 -13
  16. package/dist/broker/index.js.map +1 -1
  17. package/dist/by/index.js +2 -2
  18. package/dist/capsule/contract.d.ts +159 -0
  19. package/dist/capsule/contract.js +95 -0
  20. package/dist/capsule/enclave-aes/bound.d.ts +52 -0
  21. package/dist/{kernel/enclave → capsule/enclave-aes}/broker/proof.d.ts +12 -3
  22. package/dist/capsule/enclave-aes/capabilities.d.ts +2 -0
  23. package/dist/capsule/enclave-aes/classify/compare.d.ts +20 -0
  24. package/dist/{kernel/enclave → capsule/enclave-aes}/classify/find.d.ts +1 -1
  25. package/dist/{kernel/enclave → capsule/enclave-aes}/classify/reveal.d.ts +1 -1
  26. package/dist/{kernel/enclave → capsule/enclave-aes}/classify/verify.d.ts +2 -2
  27. package/dist/{kernel/enclave → capsule/enclave-aes}/classify/write.d.ts +1 -1
  28. package/dist/{kernel/enclave → capsule/enclave-aes}/crypto.d.ts +33 -129
  29. package/dist/capsule/enclave-aes/index.d.ts +113 -0
  30. package/dist/capsule/enclave-aes/index.js +361 -0
  31. package/dist/capsule/enclave-aes/index.js.map +1 -0
  32. package/dist/capsule/enclave-aes/primitives.d.ts +29 -0
  33. package/dist/capsule/index.d.ts +27 -0
  34. package/dist/capsule/plumbing/ct-equal.d.ts +11 -0
  35. package/dist/{kernel/enclave/record-keys → capsule/plumbing}/deterministic.d.ts +8 -21
  36. package/dist/capsule/plumbing/digest.d.ts +122 -0
  37. package/dist/{kernel/enclave/record-keys → capsule/plumbing}/envelope-body.d.ts +44 -48
  38. package/dist/capsule/plumbing/index.d.ts +100 -0
  39. package/dist/capsule/plumbing/lifecycle.d.ts +50 -0
  40. package/dist/{kernel/enclave/record-keys → capsule/plumbing}/record-codec.d.ts +62 -20
  41. package/dist/{kernel/enclave → capsule/plumbing}/record-envelope.d.ts +1 -1
  42. package/dist/capsule/plumbing/rekey-blob.d.ts +33 -0
  43. package/dist/capsule/plumbing/rekey.d.ts +44 -0
  44. package/dist/capsule/plumbing/sealed-slot.d.ts +22 -0
  45. package/dist/capsule/plumbing/sealed-slots.d.ts +37 -0
  46. package/dist/capsule/plumbing/sealing.d.ts +29 -0
  47. package/dist/capsule/plumbing/sign.d.ts +9 -0
  48. package/dist/{kernel/enclave/record-keys → capsule/plumbing}/tombstone.d.ts +2 -2
  49. package/dist/capsule-57BDK7LG.js +209 -0
  50. package/dist/cargo/index.js +36 -36
  51. package/dist/{chunk-BUDAGWL5.js → chunk-226V6XXJ.js} +41 -6
  52. package/dist/chunk-226V6XXJ.js.map +1 -0
  53. package/dist/{chunk-QWGU66MP.js → chunk-2A56DSRI.js} +5 -7
  54. package/dist/chunk-2A56DSRI.js.map +1 -0
  55. package/dist/chunk-2DX4JCRI.js +1 -0
  56. package/dist/{chunk-ODVPTDPK.js → chunk-2ELOCEXE.js} +1 -1
  57. package/dist/chunk-2ELOCEXE.js.map +1 -0
  58. package/dist/{chunk-CKNGS5MH.js → chunk-2WJKJZSO.js} +3 -5
  59. package/dist/chunk-2WJKJZSO.js.map +1 -0
  60. package/dist/{chunk-ZSX4S5XB.js → chunk-2ZFD2UJC.js} +9 -9
  61. package/dist/{chunk-YSK2CU2Q.js → chunk-3V6LZHUO.js} +3 -3
  62. package/dist/chunk-3V6LZHUO.js.map +1 -0
  63. package/dist/{chunk-HT2AHGQI.js → chunk-3Y5JLSXS.js} +2 -2
  64. package/dist/{chunk-M7NI3IWE.js → chunk-45VHWE4C.js} +67 -60
  65. package/dist/chunk-45VHWE4C.js.map +1 -0
  66. package/dist/{chunk-LGNDFRYC.js → chunk-4CFHL5RY.js} +1 -1
  67. package/dist/chunk-4CFHL5RY.js.map +1 -0
  68. package/dist/{enclave-27SMF6GF.js → chunk-4J3MNVVX.js} +83 -56
  69. package/dist/chunk-4J3MNVVX.js.map +1 -0
  70. package/dist/{chunk-SI3V7D4G.js → chunk-4UIP3QNW.js} +2 -2
  71. package/dist/{chunk-WNJ4AVGE.js → chunk-55P6OBB7.js} +2 -2
  72. package/dist/{chunk-6LNL42F5.js → chunk-5HNW4ZTA.js} +12 -15
  73. package/dist/chunk-5HNW4ZTA.js.map +1 -0
  74. package/dist/{chunk-SYVZW77S.js → chunk-5LMCVBMY.js} +6 -8
  75. package/dist/chunk-5LMCVBMY.js.map +1 -0
  76. package/dist/{chunk-MKXXMNJH.js → chunk-5UUJE4FP.js} +3 -3
  77. package/dist/chunk-5XONHAFD.js +12 -0
  78. package/dist/chunk-5XONHAFD.js.map +1 -0
  79. package/dist/{chunk-X4773RBR.js → chunk-6QLCS7ET.js} +2 -2
  80. package/dist/chunk-6QLCS7ET.js.map +1 -0
  81. package/dist/{chunk-FW22ZCXT.js → chunk-6WS35E6X.js} +2 -2
  82. package/dist/{chunk-FCKWQE2H.js → chunk-6Y5E4SJU.js} +7 -8
  83. package/dist/chunk-6Y5E4SJU.js.map +1 -0
  84. package/dist/{chunk-4AF3TUMP.js → chunk-72XBVN4J.js} +8 -2
  85. package/dist/{chunk-4AF3TUMP.js.map → chunk-72XBVN4J.js.map} +1 -1
  86. package/dist/{chunk-QBBUZ3I3.js → chunk-7BMOS4JQ.js} +11 -11
  87. package/dist/chunk-7BMOS4JQ.js.map +1 -0
  88. package/dist/{chunk-5FDLC6G7.js → chunk-7CT6SX4M.js} +3 -3
  89. package/dist/chunk-7CT6SX4M.js.map +1 -0
  90. package/dist/{chunk-LQ4ZHOKP.js → chunk-ABU6A4Z5.js} +36 -27
  91. package/dist/chunk-ABU6A4Z5.js.map +1 -0
  92. package/dist/{chunk-WX5ADGTZ.js → chunk-AJFPAHMW.js} +3 -3
  93. package/dist/chunk-AJFPAHMW.js.map +1 -0
  94. package/dist/{chunk-ZE4CHIED.js → chunk-APFFJN5T.js} +39 -37
  95. package/dist/chunk-APFFJN5T.js.map +1 -0
  96. package/dist/{chunk-6OWXYZK2.js → chunk-B65CC6Z6.js} +2 -2
  97. package/dist/{chunk-F2TDU7MQ.js → chunk-BJH77UY2.js} +2 -2
  98. package/dist/{chunk-L7DOS3TE.js → chunk-BMHQHH7Q.js} +3 -3
  99. package/dist/chunk-BMHQHH7Q.js.map +1 -0
  100. package/dist/{chunk-BJ2IXQ5Q.js → chunk-BNFNQNEP.js} +2 -2
  101. package/dist/chunk-BU2ABHFW.js +74 -0
  102. package/dist/chunk-BU2ABHFW.js.map +1 -0
  103. package/dist/{chunk-HLEK5VAN.js → chunk-BUE7R3B5.js} +2 -2
  104. package/dist/{chunk-ISZQJBML.js → chunk-BVF3SXD7.js} +6 -6
  105. package/dist/chunk-BVF3SXD7.js.map +1 -0
  106. package/dist/{chunk-M522UYZ2.js → chunk-BYHCKX73.js} +6 -10
  107. package/dist/chunk-BYHCKX73.js.map +1 -0
  108. package/dist/{chunk-EOVMT6TB.js → chunk-C53ER7AG.js} +2 -2
  109. package/dist/{chunk-K6W7BVZ6.js → chunk-CAD7N6HQ.js} +3 -3
  110. package/dist/chunk-CB4467G3.js +565 -0
  111. package/dist/chunk-CB4467G3.js.map +1 -0
  112. package/dist/{chunk-NWHBJQAL.js → chunk-D4V5JJAK.js} +4 -4
  113. package/dist/chunk-D4V5JJAK.js.map +1 -0
  114. package/dist/{chunk-QWFHIOD2.js → chunk-D5A3GCZ4.js} +11 -12
  115. package/dist/chunk-D5A3GCZ4.js.map +1 -0
  116. package/dist/{chunk-5O7D6ZTW.js → chunk-DHU2AQ6T.js} +2 -2
  117. package/dist/{chunk-DC5QVPV7.js → chunk-DL6BZKP3.js} +3 -3
  118. package/dist/chunk-DL6BZKP3.js.map +1 -0
  119. package/dist/{chunk-FQ54DWUQ.js → chunk-EA4VDI5D.js} +4 -4
  120. package/dist/chunk-EA4VDI5D.js.map +1 -0
  121. package/dist/{chunk-IT22PWKV.js → chunk-ECGXA4LT.js} +2 -2
  122. package/dist/{chunk-BP6DARYA.js → chunk-EMAWOGVH.js} +4 -4
  123. package/dist/chunk-EMAWOGVH.js.map +1 -0
  124. package/dist/{chunk-3F7GLNAE.js → chunk-EUD3HQM4.js} +7 -11
  125. package/dist/chunk-EUD3HQM4.js.map +1 -0
  126. package/dist/{chunk-T2LBQ5DV.js → chunk-FSQNGPHH.js} +335 -250
  127. package/dist/chunk-FSQNGPHH.js.map +1 -0
  128. package/dist/{chunk-7VCXZDA4.js → chunk-FZXRLNJO.js} +7 -11
  129. package/dist/chunk-FZXRLNJO.js.map +1 -0
  130. package/dist/{chunk-6LMQ5R26.js → chunk-G46JSSVX.js} +7 -7
  131. package/dist/{chunk-6LMQ5R26.js.map → chunk-G46JSSVX.js.map} +1 -1
  132. package/dist/{chunk-GF5BZ7D4.js → chunk-G5EDYVSE.js} +11 -13
  133. package/dist/chunk-G5EDYVSE.js.map +1 -0
  134. package/dist/chunk-G66YXUTY.js +60 -0
  135. package/dist/chunk-G66YXUTY.js.map +1 -0
  136. package/dist/{chunk-FFWI7UH7.js → chunk-GAGT3YZN.js} +1 -1
  137. package/dist/chunk-GAGT3YZN.js.map +1 -0
  138. package/dist/{chunk-4MXI3ODD.js → chunk-GCUMOKTN.js} +3 -3
  139. package/dist/{chunk-FH2L2E34.js → chunk-GETUTTZU.js} +4 -4
  140. package/dist/{chunk-FH2L2E34.js.map → chunk-GETUTTZU.js.map} +1 -1
  141. package/dist/chunk-GMKGGY7V.js +234 -0
  142. package/dist/chunk-GMKGGY7V.js.map +1 -0
  143. package/dist/{chunk-B6SJIBQK.js → chunk-GOJQ5DZA.js} +4 -4
  144. package/dist/{chunk-EIPVYUEP.js → chunk-GQ4MF3CM.js} +3 -3
  145. package/dist/chunk-GQ4MF3CM.js.map +1 -0
  146. package/dist/{chunk-PDCG6PR5.js → chunk-GRS2HIV6.js} +2 -2
  147. package/dist/chunk-GRS2HIV6.js.map +1 -0
  148. package/dist/{chunk-PEOZ34EM.js → chunk-GSAK56VF.js} +1 -1
  149. package/dist/chunk-GSAK56VF.js.map +1 -0
  150. package/dist/{chunk-3H5KLDZN.js → chunk-H3YM66EI.js} +4 -8
  151. package/dist/chunk-H3YM66EI.js.map +1 -0
  152. package/dist/{chunk-NRT6QZQB.js → chunk-IVMFIKNA.js} +6 -6
  153. package/dist/chunk-IVMFIKNA.js.map +1 -0
  154. package/dist/{chunk-PSIV7CJV.js → chunk-J4KAPKBJ.js} +2 -2
  155. package/dist/chunk-J4KAPKBJ.js.map +1 -0
  156. package/dist/{chunk-N5DNADLQ.js → chunk-JA25QG5M.js} +224 -34
  157. package/dist/chunk-JA25QG5M.js.map +1 -0
  158. package/dist/{chunk-T7IR4N2S.js → chunk-JBMMWYOH.js} +3 -1
  159. package/dist/{chunk-T7IR4N2S.js.map → chunk-JBMMWYOH.js.map} +1 -1
  160. package/dist/{chunk-YNIUIERI.js → chunk-JPSL5GIZ.js} +18 -59
  161. package/dist/chunk-JPSL5GIZ.js.map +1 -0
  162. package/dist/{chunk-TKUOEU2F.js → chunk-JSWKVZCR.js} +2 -2
  163. package/dist/chunk-JZ4EDEIP.js +22 -0
  164. package/dist/chunk-JZ4EDEIP.js.map +1 -0
  165. package/dist/{chunk-QOOUUR4A.js → chunk-K673OO6B.js} +10 -4
  166. package/dist/chunk-K673OO6B.js.map +1 -0
  167. package/dist/{chunk-NNARWO72.js → chunk-K7RW7FI4.js} +13 -12
  168. package/dist/chunk-K7RW7FI4.js.map +1 -0
  169. package/dist/{chunk-ZXABPVM6.js → chunk-L2F3CFCH.js} +9 -13
  170. package/dist/chunk-L2F3CFCH.js.map +1 -0
  171. package/dist/{chunk-X25NWUZB.js → chunk-L5A3KR7R.js} +3 -3
  172. package/dist/{chunk-T52GX4SA.js → chunk-LGGIFKJP.js} +4 -4
  173. package/dist/{chunk-ID6Z6E66.js → chunk-MQ7YWBQ5.js} +2 -2
  174. package/dist/{chunk-FXQBGFOX.js → chunk-MRJDLXI3.js} +14 -8
  175. package/dist/{chunk-FXQBGFOX.js.map → chunk-MRJDLXI3.js.map} +1 -1
  176. package/dist/chunk-NH2UOV3B.js +18 -0
  177. package/dist/chunk-NH2UOV3B.js.map +1 -0
  178. package/dist/{chunk-FN5EBVTQ.js → chunk-NIXRB5BP.js} +2 -2
  179. package/dist/{chunk-RHVMZSUU.js → chunk-NV4OESHC.js} +1 -1
  180. package/dist/chunk-NV4OESHC.js.map +1 -0
  181. package/dist/{chunk-HBRLNOHL.js → chunk-NYJBYVBG.js} +4 -4
  182. package/dist/{chunk-DF73H4UN.js → chunk-NZULV7LK.js} +5 -5
  183. package/dist/chunk-NZULV7LK.js.map +1 -0
  184. package/dist/{chunk-HK67PX4J.js → chunk-OFD2HD6F.js} +1 -1
  185. package/dist/chunk-OFD2HD6F.js.map +1 -0
  186. package/dist/{chunk-WY2XXTET.js → chunk-OJU67C23.js} +4 -4
  187. package/dist/{chunk-WY2XXTET.js.map → chunk-OJU67C23.js.map} +1 -1
  188. package/dist/{chunk-ZUVBC32X.js → chunk-OK57EATL.js} +2 -2
  189. package/dist/{chunk-KJFW62P4.js → chunk-OM3SEDI4.js} +652 -662
  190. package/dist/chunk-OM3SEDI4.js.map +1 -0
  191. package/dist/{chunk-TOPYQ6GA.js → chunk-PCYPXLEX.js} +6 -6
  192. package/dist/{chunk-GYGLAVCX.js → chunk-PFCTSXHU.js} +6 -2
  193. package/dist/chunk-PFCTSXHU.js.map +1 -0
  194. package/dist/{chunk-VNNRUGMM.js → chunk-PGC35KXE.js} +2 -2
  195. package/dist/{chunk-4I522ERM.js → chunk-PT2YCQVK.js} +4 -4
  196. package/dist/{chunk-Z5HTYMMQ.js → chunk-PTJY5R3O.js} +2 -2
  197. package/dist/chunk-PUBI455O.js +157 -0
  198. package/dist/chunk-PUBI455O.js.map +1 -0
  199. package/dist/{chunk-MTL7MXGR.js → chunk-QDHHHI5Q.js} +16 -17
  200. package/dist/chunk-QDHHHI5Q.js.map +1 -0
  201. package/dist/{chunk-F24ZZTHQ.js → chunk-QGFEBNHO.js} +4 -4
  202. package/dist/{chunk-A6IJU4TK.js → chunk-QGSNJD3B.js} +2 -2
  203. package/dist/chunk-QJNAHPVT.js +91 -0
  204. package/dist/chunk-QJNAHPVT.js.map +1 -0
  205. package/dist/{chunk-BK2HHQGN.js → chunk-QSHATAXJ.js} +2 -2
  206. package/dist/{chunk-ANWPSTZU.js → chunk-QXJXG7DN.js} +57 -30
  207. package/dist/chunk-QXJXG7DN.js.map +1 -0
  208. package/dist/{chunk-HBPPGWUM.js → chunk-RDOEOPOI.js} +14 -9
  209. package/dist/chunk-RDOEOPOI.js.map +1 -0
  210. package/dist/{chunk-JCN44NCY.js → chunk-RIZTZJX6.js} +2 -2
  211. package/dist/{chunk-MVZ2TPVP.js → chunk-RNACRT5H.js} +2 -2
  212. package/dist/chunk-RWFQVNXR.js +24 -0
  213. package/dist/chunk-RWFQVNXR.js.map +1 -0
  214. package/dist/{chunk-TROR3ALR.js → chunk-SFCD6OU7.js} +2 -2
  215. package/dist/{chunk-S57HTZ6X.js → chunk-SNM7LSYG.js} +5 -8
  216. package/dist/chunk-SNM7LSYG.js.map +1 -0
  217. package/dist/chunk-SPPOUJLN.js +40 -0
  218. package/dist/chunk-SPPOUJLN.js.map +1 -0
  219. package/dist/{chunk-3ELRMVJK.js → chunk-SWXLZ4HX.js} +31 -35
  220. package/dist/chunk-SWXLZ4HX.js.map +1 -0
  221. package/dist/{chunk-6B3VNR4P.js → chunk-TFWFPZRU.js} +26 -35
  222. package/dist/chunk-TFWFPZRU.js.map +1 -0
  223. package/dist/{chunk-F7XGHL5O.js → chunk-TMIJAR2X.js} +3 -3
  224. package/dist/{chunk-F7XGHL5O.js.map → chunk-TMIJAR2X.js.map} +1 -1
  225. package/dist/{chunk-I3JDRCMW.js → chunk-TZYTMZZY.js} +10 -10
  226. package/dist/{chunk-AOWGXU6D.js → chunk-UAKY6E4N.js} +2 -2
  227. package/dist/chunk-UHFGK6YA.js +40 -0
  228. package/dist/chunk-UHFGK6YA.js.map +1 -0
  229. package/dist/{chunk-3JWHAR6E.js → chunk-UNSQZSZP.js} +2 -2
  230. package/dist/{chunk-FQ5VRHIB.js → chunk-UOZOWN73.js} +5 -9
  231. package/dist/chunk-UOZOWN73.js.map +1 -0
  232. package/dist/{chunk-GHLTDZRS.js → chunk-V55JASXO.js} +25 -4
  233. package/dist/chunk-V55JASXO.js.map +1 -0
  234. package/dist/{chunk-244VXYPG.js → chunk-VSUQI5Q6.js} +45 -4
  235. package/dist/chunk-VSUQI5Q6.js.map +1 -0
  236. package/dist/{chunk-6K7DPM7D.js → chunk-WFWFXDNS.js} +2 -2
  237. package/dist/{chunk-CF5UU4S7.js → chunk-WHOKGHJ3.js} +7 -7
  238. package/dist/{chunk-LGRLME4M.js → chunk-X2RP4TO5.js} +16 -16
  239. package/dist/chunk-X2RP4TO5.js.map +1 -0
  240. package/dist/{chunk-VNPEWFPD.js → chunk-XA34THLF.js} +8 -6
  241. package/dist/chunk-XA34THLF.js.map +1 -0
  242. package/dist/{chunk-HVSCEIYL.js → chunk-XITHENBI.js} +12 -14
  243. package/dist/chunk-XITHENBI.js.map +1 -0
  244. package/dist/{chunk-ENAG3IY7.js → chunk-XKBTJGFP.js} +26 -28
  245. package/dist/chunk-XKBTJGFP.js.map +1 -0
  246. package/dist/{chunk-32YV3TJT.js → chunk-XXNWU5QZ.js} +2 -2
  247. package/dist/{chunk-B57AFBY2.js → chunk-XXQ5XIYY.js} +2 -2
  248. package/dist/{chunk-ORDURZBU.js → chunk-YFFMPZPY.js} +2 -2
  249. package/dist/{chunk-MDWKM2XC.js → chunk-YKGJ44Z7.js} +3 -3
  250. package/dist/{chunk-IUWCVHQ7.js → chunk-YQFBH5ZJ.js} +4 -4
  251. package/dist/{chunk-IUWCVHQ7.js.map → chunk-YQFBH5ZJ.js.map} +1 -1
  252. package/dist/{chunk-UPD5NWI5.js → chunk-Z3ZXVB2Y.js} +29 -16
  253. package/dist/chunk-Z3ZXVB2Y.js.map +1 -0
  254. package/dist/chunk-ZBUAX4EF.js +27 -0
  255. package/dist/chunk-ZBUAX4EF.js.map +1 -0
  256. package/dist/{chunk-MLPHLJIQ.js → chunk-ZHQJAV6D.js} +2 -2
  257. package/dist/{chunk-UD5EVGZ7.js → chunk-ZMVSKYTJ.js} +56 -96
  258. package/dist/chunk-ZMVSKYTJ.js.map +1 -0
  259. package/dist/{chunk-7JE7BDYJ.js → chunk-ZVSKSUGI.js} +5 -5
  260. package/dist/{chunk-J6UOHJY5.js → chunk-ZWF3EWZA.js} +4 -8
  261. package/dist/chunk-ZWF3EWZA.js.map +1 -0
  262. package/dist/classified/index.js +5 -5
  263. package/dist/{classified-marker-W3USLL5M.js → classified-marker-KHDOYIJB.js} +3 -3
  264. package/dist/classified-marker-KHDOYIJB.js.map +1 -0
  265. package/dist/collection-facade-LZIF7GWD.js +41 -0
  266. package/dist/{computed-TPFBX7U4.js → computed-XMFTHAXV.js} +3 -3
  267. package/dist/consent/index.js +10 -11
  268. package/dist/consent/index.js.map +1 -1
  269. package/dist/cover/index.js +9 -10
  270. package/dist/coverage/index.js +1 -1
  271. package/dist/custody/index.js +13 -13
  272. package/dist/{dead-filter-U2UYKSZL.js → dead-filter-CXV5NS67.js} +11 -3
  273. package/dist/dead-filter-CXV5NS67.js.map +1 -0
  274. package/dist/debug/index.js +11 -2
  275. package/dist/debug/index.js.map +1 -1
  276. package/dist/{delegation-S3AEPW2T.js → delegation-ONLM4JFI.js} +52 -31
  277. package/dist/delegation-ONLM4JFI.js.map +1 -0
  278. package/dist/derivations/index.js +25 -25
  279. package/dist/derive-3YSIS36W.js +20 -0
  280. package/dist/directory/index.js +10 -11
  281. package/dist/{dispatch-RH4LHKBH.js → dispatch-2MQFMEGY.js} +22 -23
  282. package/dist/dispatch-2MQFMEGY.js.map +1 -0
  283. package/dist/{dispatch-3CQDJV5Q.js → dispatch-OFDA4WQV.js} +5 -5
  284. package/dist/executor-E6YDJ7YA.js +8 -0
  285. package/dist/executor-NJX3YQQ4.js +35 -0
  286. package/dist/executor-WWM3DD4P.js +8 -0
  287. package/dist/export-accessible-RLHU5G4W.js +22 -0
  288. package/dist/extract-partition-QII2EDCS.js +35 -0
  289. package/dist/{fanout-sidecar-OT6RYLOL.js → fanout-sidecar-BO67PCPO.js} +13 -15
  290. package/dist/fanout-sidecar-BO67PCPO.js.map +1 -0
  291. package/dist/find-6M7GYDUZ.js +10 -0
  292. package/dist/forget/index.js +26 -10
  293. package/dist/forget/index.js.map +1 -1
  294. package/dist/guards/index.js +4 -4
  295. package/dist/history/index.js +13 -14
  296. package/dist/history/index.js.map +1 -1
  297. package/dist/i18n/index.js +14 -15
  298. package/dist/i18n/index.js.map +1 -1
  299. package/dist/index.d.ts +15 -13
  300. package/dist/index.js +198 -187
  301. package/dist/index.js.map +1 -1
  302. package/dist/indexing/index.js +6 -6
  303. package/dist/introspection/index.js +16 -13
  304. package/dist/issue-LPEEEMPP.js +19 -0
  305. package/dist/kernel/attestation-types.d.ts +62 -0
  306. package/dist/kernel/cache/index.d.ts +1 -1
  307. package/dist/kernel/collection-config.d.ts +1 -48
  308. package/dist/kernel/collection.d.ts +2 -1
  309. package/dist/kernel/cutover-transform.d.ts +1 -1
  310. package/dist/kernel/errors.d.ts +63 -6
  311. package/dist/kernel/export-scope.d.ts +40 -0
  312. package/dist/kernel/merge-authority.d.ts +1 -1
  313. package/dist/kernel/noydb.d.ts +3 -1
  314. package/dist/kernel/paths.d.ts +29 -5
  315. package/dist/kernel/prepared-write.d.ts +1 -1
  316. package/dist/kernel/put-many-atomic.d.ts +1 -1
  317. package/dist/kernel/query/live/live.d.ts +2 -1
  318. package/dist/kernel/query/sort-key.d.ts +0 -2
  319. package/dist/kernel/secret-mode.d.ts +1 -1
  320. package/dist/kernel/tx-write-gate.d.ts +2 -4
  321. package/dist/kernel/types.d.ts +135 -11
  322. package/dist/kernel/validation.d.ts +0 -10
  323. package/dist/kernel/vault.d.ts +6 -2
  324. package/dist/kernel/via/reconcile.d.ts +1 -42
  325. package/dist/kernel/write-queue.d.ts +17 -0
  326. package/dist/{ledger-KZPCMVZY.js → ledger-MSJGWKGW.js} +11 -12
  327. package/dist/liberate-LEKDYKTC.js +25 -0
  328. package/dist/link-set-QXXSPPHL.js +29 -0
  329. package/dist/{managed-secret-S3MQ6SH6.js → managed-secret-VSK7ANQI.js} +10 -11
  330. package/dist/materialized-views/index.js +27 -28
  331. package/dist/{migrate-cek-V7GKJZ7O.js → migrate-cek-GEBFYBDC.js} +2 -2
  332. package/dist/money/index.js +5 -5
  333. package/dist/noydb-F2AUF6KL.js +98 -0
  334. package/dist/on/index.js +25 -0
  335. package/dist/overlay-views/index.js +4 -4
  336. package/dist/periods/index.js +12 -13
  337. package/dist/pod/index.js +76 -74
  338. package/dist/{pod-handle-WGDFB4C2.js → pod-handle-YE7CT66T.js} +10 -11
  339. package/dist/pod-handle-YE7CT66T.js.map +1 -0
  340. package/dist/policy/index.js +10 -11
  341. package/dist/port/as/active.d.ts +4 -0
  342. package/dist/port/as/index.d.ts +1 -0
  343. package/dist/port/by/index.d.ts +14 -5
  344. package/dist/port/on/index.d.ts +27 -1
  345. package/dist/port/to/index.d.ts +1 -1
  346. package/dist/port/with/blob-strategy.d.ts +1 -1
  347. package/dist/port/with/broker-strategy.d.ts +14 -0
  348. package/dist/port/with/classified-strategy.d.ts +1 -1
  349. package/dist/port/with/collection-options.d.ts +1 -1
  350. package/dist/port/with/collection-registries.d.ts +1 -1
  351. package/dist/port/with/coverage-strategy.d.ts +17 -1
  352. package/dist/port/with/formats-strategy.d.ts +34 -1
  353. package/dist/port/with/lookup-strategy.d.ts +87 -6
  354. package/dist/port/with/service-bus.d.ts +2 -1
  355. package/dist/portability/index.js +8 -8
  356. package/dist/{post-register-SLSXIPBV.js → post-register-QC5TEAW3.js} +6 -6
  357. package/dist/post-register-QC5TEAW3.js.map +1 -0
  358. package/dist/query/all/index.js +16 -16
  359. package/dist/query/index.js +8 -8
  360. package/dist/query/live/index.js +7 -7
  361. package/dist/query/reduce/index.js +10 -10
  362. package/dist/query/relate/index.js +10 -10
  363. package/dist/reduce/index.js +8 -8
  364. package/dist/register-SN72QALV.js +30 -0
  365. package/dist/registry-253FF7C6.js +35 -0
  366. package/dist/registry-3AZWQTDT.js +23 -0
  367. package/dist/registry-7UEBTHWG.js +8 -0
  368. package/dist/registry-IVJ67NFQ.js +8 -0
  369. package/dist/request-withdrawal-UKVJZKX2.js +28 -0
  370. package/dist/{reveal-4BCKPEC2.js → reveal-YQTRNQFH.js} +10 -9
  371. package/dist/reveal-YQTRNQFH.js.map +1 -0
  372. package/dist/revoke-G2KXJQA5.js +24 -0
  373. package/dist/satellites/index.js +1 -1
  374. package/dist/schema-update/index.js +2 -2
  375. package/dist/sealed-record/index.js +16 -18
  376. package/dist/sealed-record/index.js.map +1 -1
  377. package/dist/search/index.js +4 -4
  378. package/dist/{seed-4JS2RJ4A.js → seed-JMQTRKRE.js} +125 -34
  379. package/dist/seed-JMQTRKRE.js.map +1 -0
  380. package/dist/sequence/index.js +9 -10
  381. package/dist/session/index.js +9 -10
  382. package/dist/session/index.js.map +1 -1
  383. package/dist/shadow/index.js +2 -2
  384. package/dist/signer-IUIYR3CX.js +23 -0
  385. package/dist/snapshots/index.js +11 -11
  386. package/dist/stale-SKV33PBU.js +28 -0
  387. package/dist/storage-NPBYP2SM.js +21 -0
  388. package/dist/store/index.js +1 -1
  389. package/dist/{store-coordination-provider-2O2VUHKW.js → store-coordination-provider-Z6HKPOGM.js} +11 -12
  390. package/dist/store-coordination-provider-Z6HKPOGM.js.map +1 -0
  391. package/dist/sync/index.js +18 -13
  392. package/dist/sync/index.js.map +1 -1
  393. package/dist/team/index.js +18 -17
  394. package/dist/tiers/index.js +11 -12
  395. package/dist/to/index.js +2 -2
  396. package/dist/transactions/index.js +3 -3
  397. package/dist/util/index.js +1 -1
  398. package/dist/vault-head/index.js +11 -14
  399. package/dist/vault-head/index.js.map +1 -1
  400. package/dist/{verify-RVT67IMH.js → verify-KWQIWLGH.js} +14 -12
  401. package/dist/verify-KWQIWLGH.js.map +1 -0
  402. package/dist/via/classified/binding.d.ts +2 -2
  403. package/dist/via/classified/config-drift.d.ts +2 -2
  404. package/dist/via/classified/errors.d.ts +1 -1
  405. package/dist/via/classified/presets.d.ts +29 -0
  406. package/dist/via/classified/resolve.d.ts +7 -0
  407. package/dist/via/geo/binding.d.ts +0 -4
  408. package/dist/via/lookup/handle.d.ts +4 -4
  409. package/dist/via/lookup/index.d.ts +32 -0
  410. package/dist/via/money/binding.d.ts +0 -9
  411. package/dist/walk-F4OLXI5H.js +20 -0
  412. package/dist/with-audit/attestation/index.d.ts +2 -1
  413. package/dist/with-audit/attestation/issue.d.ts +2 -2
  414. package/dist/with-audit/attestation/revoke.d.ts +2 -2
  415. package/dist/with-audit/attestation/scheme.d.ts +7 -0
  416. package/dist/with-audit/attestation/signer.d.ts +1 -1
  417. package/dist/with-audit/attestation/strategy.d.ts +4 -3
  418. package/dist/with-audit/attestation/types.d.ts +10 -0
  419. package/dist/with-audit/attestation/vault-facade.d.ts +9 -2
  420. package/dist/with-audit/attestation/verifier.d.ts +6 -0
  421. package/dist/with-audit/consent/consent.d.ts +1 -1
  422. package/dist/with-audit/consent/strategy.d.ts +1 -1
  423. package/dist/with-audit/forget/completeness.d.ts +66 -0
  424. package/dist/with-audit/forget/index.d.ts +2 -0
  425. package/dist/with-audit/forget/strategy.d.ts +65 -0
  426. package/dist/with-audit/forget/subject-index.d.ts +1 -1
  427. package/dist/with-audit/periods/periods.d.ts +0 -9
  428. package/dist/with-audit/periods/reserved-collections.d.ts +7 -0
  429. package/dist/with-audit/periods/vault-facade.d.ts +1 -1
  430. package/dist/with-audit/portability/request-withdrawal.d.ts +0 -1
  431. package/dist/with-audit/portability/withdraw-accessible.d.ts +0 -1
  432. package/dist/with-audit/sealed-record/index.d.ts +2 -2
  433. package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
  434. package/dist/with-audit/tiers/index.d.ts +3 -3
  435. package/dist/with-audit/tiers/strategy.d.ts +19 -0
  436. package/dist/with-cargo/adopt-partition.d.ts +1 -1
  437. package/dist/with-cargo/extract-partition.d.ts +1 -47
  438. package/dist/with-cargo/floor.d.ts +1 -1
  439. package/dist/with-commit/history/history.d.ts +2 -2
  440. package/dist/with-commit/history/index.d.ts +1 -1
  441. package/dist/with-commit/history/ledger/store.d.ts +1 -1
  442. package/dist/with-commit/history/strategy.d.ts +1 -1
  443. package/dist/with-commit/history/time-machine.d.ts +1 -1
  444. package/dist/with-commit/numbering/index.d.ts +1 -3
  445. package/dist/with-commit/sequence/index.d.ts +1 -1
  446. package/dist/with-commit/tx/transaction.d.ts +2 -24
  447. package/dist/with-commit/vault-head/head.d.ts +1 -1
  448. package/dist/with-commit/vault-head/index.d.ts +1 -1
  449. package/dist/with-commit/vault-head/strategy.d.ts +8 -1
  450. package/dist/with-commit/vault-head/verify.d.ts +1 -1
  451. package/dist/with-fork/snapshots/noydb-facade.d.ts +7 -0
  452. package/dist/with-formula/derivations/dispatch.d.ts +1 -1
  453. package/dist/with-formula/derivations/fanout-sidecar.d.ts +1 -1
  454. package/dist/with-formula/derivations/trigger-match.d.ts +8 -5
  455. package/dist/with-formula/materialized-views/emit-memo.d.ts +0 -2
  456. package/dist/with-lookup/embeddings/index.d.ts +1 -2
  457. package/dist/with-lookup/indexing/collection-facade.d.ts +2 -16
  458. package/dist/with-lookup/indexing/eager-indexes.d.ts +2 -1
  459. package/dist/with-lookup/search/collection-facade.d.ts +1 -13
  460. package/dist/with-party/broker/index.d.ts +4 -4
  461. package/dist/with-party/broker/seed.d.ts +25 -10
  462. package/dist/with-party/directory/user-envelope/storage.d.ts +1 -1
  463. package/dist/with-party/policy/noydb-facade.d.ts +1 -31
  464. package/dist/with-party/team/delegation.d.ts +59 -3
  465. package/dist/with-party/team/echo-secret.d.ts +2 -4
  466. package/dist/with-party/team/index.d.ts +1 -1
  467. package/dist/with-party/team/keyring.d.ts +2 -22
  468. package/dist/with-party/team/magic-link-grant.d.ts +12 -2
  469. package/dist/with-party/team/noydb-facade.d.ts +5 -0
  470. package/dist/with-party/team/recovery.d.ts +1 -1
  471. package/dist/with-party/team/reserved-secret-collections.d.ts +10 -8
  472. package/dist/with-party/team/roster-tag.d.ts +43 -2
  473. package/dist/with-party/team/rotate-recover.d.ts +1 -1
  474. package/dist/with-party/team/tiers.d.ts +36 -5
  475. package/dist/with-party/team/wrapped-deks.d.ts +1 -1
  476. package/dist/with-pod/index.d.ts +1 -1
  477. package/dist/with-shape/blobs/blob-compaction.d.ts +1 -1
  478. package/dist/with-shape/blobs/blob-intent.d.ts +1 -1
  479. package/dist/with-shape/blobs/blob-set.d.ts +25 -2
  480. package/dist/with-shape/blobs/legacy-sweep.d.ts +17 -1
  481. package/dist/with-shape/introspection/describe.d.ts +2 -3
  482. package/dist/with-shape/introspection/index.d.ts +1 -0
  483. package/dist/with-shape/introspection/types.d.ts +2 -1
  484. package/dist/with-shape/introspection/walk.d.ts +1 -1
  485. package/dist/with-shape/links/lazy-handle.d.ts +1 -1
  486. package/dist/with-shape/links/link-set.d.ts +1 -1
  487. package/dist/with-shape/manifest/derive.d.ts +1 -1
  488. package/dist/with-shape/manifest/storage.d.ts +1 -1
  489. package/dist/with-shape/persisted-schemas/register.d.ts +1 -1
  490. package/dist/with-shape/persisted-schemas/storage.d.ts +1 -1
  491. package/dist/with-shape/satellites/dead-filter.d.ts +1 -1
  492. package/dist/with-shape/satellites/declare.d.ts +1 -1
  493. package/dist/with-shape/satellites/marker.d.ts +1 -1
  494. package/dist/with-shape/satellites/post-register.d.ts +1 -1
  495. package/dist/with-shape/schema-update/fence.d.ts +7 -0
  496. package/dist/with-sync/engine.d.ts +30 -1
  497. package/dist/with-sync/presence.d.ts +5 -10
  498. package/dist/with-sync/reserved-mirror.d.ts +89 -0
  499. package/dist/with-sync/strategy.d.ts +7 -0
  500. package/dist/with-sync/tab-write-relay.d.ts +0 -10
  501. package/dist/withdraw-accessible-ZKPLZ66E.js +25 -0
  502. package/dist/withdraw-accessible-ZKPLZ66E.js.map +1 -0
  503. package/package.json +14 -5
  504. package/dist/api-GVYEKSJE.js +0 -19
  505. package/dist/backup-7TFRVFLH.js.map +0 -1
  506. package/dist/chunk-244VXYPG.js.map +0 -1
  507. package/dist/chunk-3ELRMVJK.js.map +0 -1
  508. package/dist/chunk-3F7GLNAE.js.map +0 -1
  509. package/dist/chunk-3H5KLDZN.js.map +0 -1
  510. package/dist/chunk-5FDLC6G7.js.map +0 -1
  511. package/dist/chunk-6B3VNR4P.js.map +0 -1
  512. package/dist/chunk-6LNL42F5.js.map +0 -1
  513. package/dist/chunk-6QSQQLSE.js +0 -95
  514. package/dist/chunk-6QSQQLSE.js.map +0 -1
  515. package/dist/chunk-7VCXZDA4.js.map +0 -1
  516. package/dist/chunk-ANWPSTZU.js.map +0 -1
  517. package/dist/chunk-BP6DARYA.js.map +0 -1
  518. package/dist/chunk-BUDAGWL5.js.map +0 -1
  519. package/dist/chunk-CKNGS5MH.js.map +0 -1
  520. package/dist/chunk-DC5QVPV7.js.map +0 -1
  521. package/dist/chunk-DE4DH2RZ.js +0 -29
  522. package/dist/chunk-DE4DH2RZ.js.map +0 -1
  523. package/dist/chunk-DF73H4UN.js.map +0 -1
  524. package/dist/chunk-EIPVYUEP.js.map +0 -1
  525. package/dist/chunk-ENAG3IY7.js.map +0 -1
  526. package/dist/chunk-FCKWQE2H.js.map +0 -1
  527. package/dist/chunk-FFWI7UH7.js.map +0 -1
  528. package/dist/chunk-FQ54DWUQ.js.map +0 -1
  529. package/dist/chunk-FQ5VRHIB.js.map +0 -1
  530. package/dist/chunk-GF5BZ7D4.js.map +0 -1
  531. package/dist/chunk-GHLTDZRS.js.map +0 -1
  532. package/dist/chunk-GYGLAVCX.js.map +0 -1
  533. package/dist/chunk-HBPPGWUM.js.map +0 -1
  534. package/dist/chunk-HK67PX4J.js.map +0 -1
  535. package/dist/chunk-HVSCEIYL.js.map +0 -1
  536. package/dist/chunk-IEX7NK2K.js +0 -125
  537. package/dist/chunk-IEX7NK2K.js.map +0 -1
  538. package/dist/chunk-ISZQJBML.js.map +0 -1
  539. package/dist/chunk-J6UOHJY5.js.map +0 -1
  540. package/dist/chunk-KJFW62P4.js.map +0 -1
  541. package/dist/chunk-L7DOS3TE.js.map +0 -1
  542. package/dist/chunk-LGNDFRYC.js.map +0 -1
  543. package/dist/chunk-LGRLME4M.js.map +0 -1
  544. package/dist/chunk-LP7BEXCT.js +0 -32
  545. package/dist/chunk-LP7BEXCT.js.map +0 -1
  546. package/dist/chunk-LQ4ZHOKP.js.map +0 -1
  547. package/dist/chunk-M522UYZ2.js.map +0 -1
  548. package/dist/chunk-M7NI3IWE.js.map +0 -1
  549. package/dist/chunk-MTL7MXGR.js.map +0 -1
  550. package/dist/chunk-N5DNADLQ.js.map +0 -1
  551. package/dist/chunk-NNARWO72.js.map +0 -1
  552. package/dist/chunk-NRT6QZQB.js.map +0 -1
  553. package/dist/chunk-NWHBJQAL.js.map +0 -1
  554. package/dist/chunk-ODVPTDPK.js.map +0 -1
  555. package/dist/chunk-PDCG6PR5.js.map +0 -1
  556. package/dist/chunk-PEOZ34EM.js.map +0 -1
  557. package/dist/chunk-PSIV7CJV.js.map +0 -1
  558. package/dist/chunk-QBBUZ3I3.js.map +0 -1
  559. package/dist/chunk-QOOUUR4A.js.map +0 -1
  560. package/dist/chunk-QWFHIOD2.js.map +0 -1
  561. package/dist/chunk-QWGU66MP.js.map +0 -1
  562. package/dist/chunk-RHVMZSUU.js.map +0 -1
  563. package/dist/chunk-S57HTZ6X.js.map +0 -1
  564. package/dist/chunk-SEE332EV.js +0 -66
  565. package/dist/chunk-SEE332EV.js.map +0 -1
  566. package/dist/chunk-SOIQ4MM4.js +0 -20
  567. package/dist/chunk-SOIQ4MM4.js.map +0 -1
  568. package/dist/chunk-SYVZW77S.js.map +0 -1
  569. package/dist/chunk-T2LBQ5DV.js.map +0 -1
  570. package/dist/chunk-UBSFPGVJ.js +0 -1
  571. package/dist/chunk-UD5EVGZ7.js.map +0 -1
  572. package/dist/chunk-UPD5NWI5.js.map +0 -1
  573. package/dist/chunk-UYB234ZR.js +0 -479
  574. package/dist/chunk-UYB234ZR.js.map +0 -1
  575. package/dist/chunk-VNPEWFPD.js.map +0 -1
  576. package/dist/chunk-WX5ADGTZ.js.map +0 -1
  577. package/dist/chunk-X4773RBR.js.map +0 -1
  578. package/dist/chunk-YNIUIERI.js.map +0 -1
  579. package/dist/chunk-YSK2CU2Q.js.map +0 -1
  580. package/dist/chunk-ZE4CHIED.js.map +0 -1
  581. package/dist/chunk-ZXABPVM6.js.map +0 -1
  582. package/dist/classified-marker-W3USLL5M.js.map +0 -1
  583. package/dist/collection-facade-QU6IJBN3.js +0 -48
  584. package/dist/dead-filter-U2UYKSZL.js.map +0 -1
  585. package/dist/delegation-S3AEPW2T.js.map +0 -1
  586. package/dist/derive-OX7F6TGG.js +0 -21
  587. package/dist/dispatch-RH4LHKBH.js.map +0 -1
  588. package/dist/executor-B6SRO2QS.js +0 -36
  589. package/dist/executor-BI5CHWRY.js +0 -8
  590. package/dist/executor-RBKM5W5K.js +0 -8
  591. package/dist/export-accessible-VMA3YM5V.js +0 -22
  592. package/dist/extract-partition-NF7PXGPP.js +0 -37
  593. package/dist/fanout-sidecar-OT6RYLOL.js.map +0 -1
  594. package/dist/find-LZMP26KF.js +0 -10
  595. package/dist/issue-IHARXWW5.js +0 -18
  596. package/dist/kernel/enclave/classify/compare.d.ts +0 -10
  597. package/dist/kernel/enclave/index.d.ts +0 -87
  598. package/dist/kernel/enclave/record-keys/lifecycle.d.ts +0 -124
  599. package/dist/kernel/enclave/record-keys/rekey-blob.d.ts +0 -88
  600. package/dist/kernel/enclave/record-keys/rekey.d.ts +0 -91
  601. package/dist/kernel/enclave/record-keys/sealed-slot.d.ts +0 -14
  602. package/dist/kernel/enclave/record-keys/sealed-slots.d.ts +0 -123
  603. package/dist/kernel/enclave/record-keys/sealing.d.ts +0 -70
  604. package/dist/liberate-GRLCZMW4.js +0 -24
  605. package/dist/link-set-JCMJ7ULP.js +0 -30
  606. package/dist/noydb-SWQJ3MZS.js +0 -97
  607. package/dist/pod-handle-WGDFB4C2.js.map +0 -1
  608. package/dist/post-register-SLSXIPBV.js.map +0 -1
  609. package/dist/register-F3OYE7MJ.js +0 -31
  610. package/dist/registry-CILQFXFK.js +0 -8
  611. package/dist/registry-XNNYQVKV.js +0 -8
  612. package/dist/registry-YCDZV3VW.js +0 -35
  613. package/dist/registry-ZGYS33TE.js +0 -24
  614. package/dist/request-withdrawal-Z5NC6TXT.js +0 -30
  615. package/dist/reveal-4BCKPEC2.js.map +0 -1
  616. package/dist/revoke-ZL62WC2D.js +0 -23
  617. package/dist/seed-4JS2RJ4A.js.map +0 -1
  618. package/dist/signer-MBZZMXTC.js +0 -24
  619. package/dist/stale-TJ3DYZMQ.js +0 -29
  620. package/dist/storage-SVMKRGCW.js +0 -22
  621. package/dist/store-coordination-provider-2O2VUHKW.js.map +0 -1
  622. package/dist/verify-RVT67IMH.js.map +0 -1
  623. package/dist/walk-HJ42EISE.js +0 -21
  624. package/dist/withdraw-accessible-5NZUPAVA.js +0 -27
  625. /package/dist/{api-GVYEKSJE.js.map → api-MSJXVYQG.js.map} +0 -0
  626. /package/dist/{collection-facade-QU6IJBN3.js.map → capsule/contract.js.map} +0 -0
  627. /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/bidx.d.ts +0 -0
  628. /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/digest.d.ts +0 -0
  629. /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/vdig.d.ts +0 -0
  630. /package/dist/{kernel/enclave/classify → capsule/plumbing}/kofn.d.ts +0 -0
  631. /package/dist/{kernel/enclave/classify → capsule/plumbing}/normalize.d.ts +0 -0
  632. /package/dist/{kernel/enclave → capsule/plumbing}/record-aad.d.ts +0 -0
  633. /package/dist/{chunk-UBSFPGVJ.js.map → capsule-57BDK7LG.js.map} +0 -0
  634. /package/dist/{computed-TPFBX7U4.js.map → chunk-2DX4JCRI.js.map} +0 -0
  635. /package/dist/{chunk-ZSX4S5XB.js.map → chunk-2ZFD2UJC.js.map} +0 -0
  636. /package/dist/{chunk-HT2AHGQI.js.map → chunk-3Y5JLSXS.js.map} +0 -0
  637. /package/dist/{chunk-SI3V7D4G.js.map → chunk-4UIP3QNW.js.map} +0 -0
  638. /package/dist/{chunk-WNJ4AVGE.js.map → chunk-55P6OBB7.js.map} +0 -0
  639. /package/dist/{chunk-MKXXMNJH.js.map → chunk-5UUJE4FP.js.map} +0 -0
  640. /package/dist/{chunk-FW22ZCXT.js.map → chunk-6WS35E6X.js.map} +0 -0
  641. /package/dist/{chunk-6OWXYZK2.js.map → chunk-B65CC6Z6.js.map} +0 -0
  642. /package/dist/{chunk-F2TDU7MQ.js.map → chunk-BJH77UY2.js.map} +0 -0
  643. /package/dist/{chunk-BJ2IXQ5Q.js.map → chunk-BNFNQNEP.js.map} +0 -0
  644. /package/dist/{chunk-HLEK5VAN.js.map → chunk-BUE7R3B5.js.map} +0 -0
  645. /package/dist/{chunk-EOVMT6TB.js.map → chunk-C53ER7AG.js.map} +0 -0
  646. /package/dist/{chunk-K6W7BVZ6.js.map → chunk-CAD7N6HQ.js.map} +0 -0
  647. /package/dist/{chunk-5O7D6ZTW.js.map → chunk-DHU2AQ6T.js.map} +0 -0
  648. /package/dist/{chunk-IT22PWKV.js.map → chunk-ECGXA4LT.js.map} +0 -0
  649. /package/dist/{chunk-4MXI3ODD.js.map → chunk-GCUMOKTN.js.map} +0 -0
  650. /package/dist/{chunk-B6SJIBQK.js.map → chunk-GOJQ5DZA.js.map} +0 -0
  651. /package/dist/{chunk-TKUOEU2F.js.map → chunk-JSWKVZCR.js.map} +0 -0
  652. /package/dist/{chunk-X25NWUZB.js.map → chunk-L5A3KR7R.js.map} +0 -0
  653. /package/dist/{chunk-T52GX4SA.js.map → chunk-LGGIFKJP.js.map} +0 -0
  654. /package/dist/{chunk-ID6Z6E66.js.map → chunk-MQ7YWBQ5.js.map} +0 -0
  655. /package/dist/{chunk-FN5EBVTQ.js.map → chunk-NIXRB5BP.js.map} +0 -0
  656. /package/dist/{chunk-HBRLNOHL.js.map → chunk-NYJBYVBG.js.map} +0 -0
  657. /package/dist/{chunk-ZUVBC32X.js.map → chunk-OK57EATL.js.map} +0 -0
  658. /package/dist/{chunk-TOPYQ6GA.js.map → chunk-PCYPXLEX.js.map} +0 -0
  659. /package/dist/{chunk-VNNRUGMM.js.map → chunk-PGC35KXE.js.map} +0 -0
  660. /package/dist/{chunk-4I522ERM.js.map → chunk-PT2YCQVK.js.map} +0 -0
  661. /package/dist/{chunk-Z5HTYMMQ.js.map → chunk-PTJY5R3O.js.map} +0 -0
  662. /package/dist/{chunk-F24ZZTHQ.js.map → chunk-QGFEBNHO.js.map} +0 -0
  663. /package/dist/{chunk-A6IJU4TK.js.map → chunk-QGSNJD3B.js.map} +0 -0
  664. /package/dist/{chunk-BK2HHQGN.js.map → chunk-QSHATAXJ.js.map} +0 -0
  665. /package/dist/{chunk-JCN44NCY.js.map → chunk-RIZTZJX6.js.map} +0 -0
  666. /package/dist/{chunk-MVZ2TPVP.js.map → chunk-RNACRT5H.js.map} +0 -0
  667. /package/dist/{chunk-TROR3ALR.js.map → chunk-SFCD6OU7.js.map} +0 -0
  668. /package/dist/{chunk-I3JDRCMW.js.map → chunk-TZYTMZZY.js.map} +0 -0
  669. /package/dist/{chunk-AOWGXU6D.js.map → chunk-UAKY6E4N.js.map} +0 -0
  670. /package/dist/{chunk-3JWHAR6E.js.map → chunk-UNSQZSZP.js.map} +0 -0
  671. /package/dist/{chunk-6K7DPM7D.js.map → chunk-WFWFXDNS.js.map} +0 -0
  672. /package/dist/{chunk-CF5UU4S7.js.map → chunk-WHOKGHJ3.js.map} +0 -0
  673. /package/dist/{chunk-32YV3TJT.js.map → chunk-XXNWU5QZ.js.map} +0 -0
  674. /package/dist/{chunk-B57AFBY2.js.map → chunk-XXQ5XIYY.js.map} +0 -0
  675. /package/dist/{chunk-ORDURZBU.js.map → chunk-YFFMPZPY.js.map} +0 -0
  676. /package/dist/{chunk-MDWKM2XC.js.map → chunk-YKGJ44Z7.js.map} +0 -0
  677. /package/dist/{chunk-MLPHLJIQ.js.map → chunk-ZHQJAV6D.js.map} +0 -0
  678. /package/dist/{chunk-7JE7BDYJ.js.map → chunk-ZVSKSUGI.js.map} +0 -0
  679. /package/dist/{derive-OX7F6TGG.js.map → collection-facade-LZIF7GWD.js.map} +0 -0
  680. /package/dist/{enclave-27SMF6GF.js.map → computed-XMFTHAXV.js.map} +0 -0
  681. /package/dist/{executor-B6SRO2QS.js.map → derive-3YSIS36W.js.map} +0 -0
  682. /package/dist/{dispatch-3CQDJV5Q.js.map → dispatch-OFDA4WQV.js.map} +0 -0
  683. /package/dist/{executor-BI5CHWRY.js.map → executor-E6YDJ7YA.js.map} +0 -0
  684. /package/dist/{executor-RBKM5W5K.js.map → executor-NJX3YQQ4.js.map} +0 -0
  685. /package/dist/{export-accessible-VMA3YM5V.js.map → executor-WWM3DD4P.js.map} +0 -0
  686. /package/dist/{extract-partition-NF7PXGPP.js.map → export-accessible-RLHU5G4W.js.map} +0 -0
  687. /package/dist/{find-LZMP26KF.js.map → extract-partition-QII2EDCS.js.map} +0 -0
  688. /package/dist/{issue-IHARXWW5.js.map → find-6M7GYDUZ.js.map} +0 -0
  689. /package/dist/{ledger-KZPCMVZY.js.map → issue-LPEEEMPP.js.map} +0 -0
  690. /package/dist/{liberate-GRLCZMW4.js.map → ledger-MSJGWKGW.js.map} +0 -0
  691. /package/dist/{link-set-JCMJ7ULP.js.map → liberate-LEKDYKTC.js.map} +0 -0
  692. /package/dist/{managed-secret-S3MQ6SH6.js.map → link-set-QXXSPPHL.js.map} +0 -0
  693. /package/dist/{noydb-SWQJ3MZS.js.map → managed-secret-VSK7ANQI.js.map} +0 -0
  694. /package/dist/{migrate-cek-V7GKJZ7O.js.map → migrate-cek-GEBFYBDC.js.map} +0 -0
  695. /package/dist/{register-F3OYE7MJ.js.map → noydb-F2AUF6KL.js.map} +0 -0
  696. /package/dist/{registry-CILQFXFK.js.map → register-SN72QALV.js.map} +0 -0
  697. /package/dist/{registry-XNNYQVKV.js.map → registry-253FF7C6.js.map} +0 -0
  698. /package/dist/{registry-YCDZV3VW.js.map → registry-3AZWQTDT.js.map} +0 -0
  699. /package/dist/{registry-ZGYS33TE.js.map → registry-7UEBTHWG.js.map} +0 -0
  700. /package/dist/{request-withdrawal-Z5NC6TXT.js.map → registry-IVJ67NFQ.js.map} +0 -0
  701. /package/dist/{revoke-ZL62WC2D.js.map → request-withdrawal-UKVJZKX2.js.map} +0 -0
  702. /package/dist/{signer-MBZZMXTC.js.map → revoke-G2KXJQA5.js.map} +0 -0
  703. /package/dist/{stale-TJ3DYZMQ.js.map → signer-IUIYR3CX.js.map} +0 -0
  704. /package/dist/{storage-SVMKRGCW.js.map → stale-SKV33PBU.js.map} +0 -0
  705. /package/dist/{walk-HJ42EISE.js.map → storage-NPBYP2SM.js.map} +0 -0
  706. /package/dist/{withdraw-accessible-5NZUPAVA.js.map → walk-F4OLXI5H.js.map} +0 -0
@@ -0,0 +1,18 @@
1
+ // src/capsule/plumbing/kofn.ts
2
+ function evaluateKofN(results, min) {
3
+ if (!Number.isInteger(min) || min < 1 || min > results.length) {
4
+ throw new Error(
5
+ `evaluateKofN: min ${min} out of range 1..${results.length} \u2014 caller bug (matchGroup validates bounds up front, before any PBKDF2)`
6
+ );
7
+ }
8
+ let count = 0;
9
+ for (const r of results) {
10
+ if (r) count += 1;
11
+ }
12
+ return count >= min;
13
+ }
14
+
15
+ export {
16
+ evaluateKofN
17
+ };
18
+ //# sourceMappingURL=chunk-NH2UOV3B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/capsule/plumbing/kofn.ts"],"sourcesContent":["/**\n * k-of-n aggregate for matchGroup (§3). Deliberately a full scan that\n * never breaks: per-member results must never influence control flow in\n * a way an observer could time or decompose. Returns ONLY the aggregate.\n * @module\n */\nexport function evaluateKofN(results: readonly boolean[], min: number): boolean {\n if (!Number.isInteger(min) || min < 1 || min > results.length) {\n throw new Error(\n `evaluateKofN: min ${min} out of range 1..${results.length} — caller bug ` +\n `(matchGroup validates bounds up front, before any PBKDF2)`,\n )\n }\n let count = 0\n for (const r of results) {\n if (r) count += 1 // no short-circuit — collect, never break\n }\n return count >= min\n}\n"],"mappings":";AAMO,SAAS,aAAa,SAA6B,KAAsB;AAC9E,MAAI,CAAC,OAAO,UAAU,GAAG,KAAK,MAAM,KAAK,MAAM,QAAQ,QAAQ;AAC7D,UAAM,IAAI;AAAA,MACR,qBAAqB,GAAG,oBAAoB,QAAQ,MAAM;AAAA,IAE5D;AAAA,EACF;AACA,MAAI,QAAQ;AACZ,aAAW,KAAK,SAAS;AACvB,QAAI,EAAG,UAAS;AAAA,EAClB;AACA,SAAO,SAAS;AAClB;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FieldFrozenError,
3
3
  InvariantError
4
- } from "./chunk-244VXYPG.js";
4
+ } from "./chunk-VSUQI5Q6.js";
5
5
 
6
6
  // src/with-audit/guards/executor.ts
7
7
  var GuardExecutor = {
@@ -77,4 +77,4 @@ function deepEqual(a, b) {
77
77
  export {
78
78
  GuardExecutor
79
79
  };
80
- //# sourceMappingURL=chunk-FN5EBVTQ.js.map
80
+ //# sourceMappingURL=chunk-NIXRB5BP.js.map
@@ -4,4 +4,4 @@ var NO_COVERAGE = { observer: () => void 0 };
4
4
  export {
5
5
  NO_COVERAGE
6
6
  };
7
- //# sourceMappingURL=chunk-RHVMZSUU.js.map
7
+ //# sourceMappingURL=chunk-NV4OESHC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/port/with/coverage-strategy.ts"],"sourcesContent":["/**\n * Read-coverage sensor contract (#1363, from the #1251 design).\n *\n * ⛔⛔ **THIS IS TELEMETRY. IT IS NOT A CONTROL.** Against an insider holding\n * the device and local keys, it prevents nothing — they hold the DEK, so the\n * plaintext is derivable whatever hub decides. What it does is make bulk\n * extraction **visible early, attributable and loud**. The real remediation is\n * key custody — tiers and per-collection DEKs — and any deployment that reads\n * this as a control has been made *less* safe by it, because it stops building\n * the key boundary that would actually bind.\n *\n * Lives on the `/with` port (the one seam the kernel spine may import\n * statically) so `Collection`/`RecordCodec` can hold the {@link NO_COVERAGE}\n * floor default without a spine→service static import.\n *\n * ⛔ There is deliberately NO refusal path here, and none may be added. The\n * design ruled (#1251 §3) that set-completion ALERTING beats threshold\n * blocking: a refusal at a boundary is a threshold the reader can\n * binary-search, and a signal is not. Adding \"just an option\" to refuse\n * reintroduces exactly the objection the shape was chosen to dissolve.\n *\n * ⭐ PUBLISHED SEAM — ruled 2026-09-16 (core#38, recorded in the family's seam\n * registry). {@link CoverageEvent} is re-exported from `@noy-db/hub/coverage`\n * and shipped in 0.8.0's `.d.ts`; consumers already hold it. This module\n * previously ended `@internal`, which strips nothing (`stripInternal` is set\n * in no tsconfig here) and so described the opposite of what shipped. The tag\n * is gone rather than made true, because adding `stripInternal` now would\n * break every importer at 0.8.0.\n *\n * Consequences, additive-only from here:\n * - a new sensor ADDS fields and never redefines `served` / `novel` /\n * `coverage` / `window` — their horizons are mixed BY DESIGN (see each\n * field), and redefining one per `source` is what makes a controller\n * subscribe once and compute nonsense;\n * - `source` stays `string` — an enum would make every new sensor a\n * breaking change to hub — and its VALUES are allocated in the family\n * registry as `<repo>/<sensor>`. A new sensor claims its value there\n * before it ships.\n */\n\n/**\n * The one event every sensor in the #1251 design emits, whatever its\n * enforcement point — so a controller subscribes once. Emitted on the Noydb\n * event bus as `'coverage:threshold'`.\n */\nexport interface CoverageEvent {\n /** Authenticated identity the reads are attributed to (`keyring.userId`). */\n readonly principal: string\n readonly vault: string\n readonly collection: string\n /** Records novel to this window (Bloom-estimated; under-reports, never over). */\n readonly novel: number\n /** Decrypts served to this principal for this collection, all time. */\n readonly served: number\n /** Distinct-ever-decrypted as a fraction of the declared corpus, 0..1 (HLL-estimated). */\n readonly coverage: number\n /** ISO-8601 start of the window the crossing was observed in. */\n readonly window: string\n /** Which sensor produced it. `'hub/coverage'` for this one. */\n readonly source: string\n}\n\n/**\n * The decrypt observer: called once per record decrypt, with the record id.\n *\n * ⛔ The id is passed so the sketch can be UPDATED with it, and must never be\n * retained. See `with-audit/coverage/sketch.ts`.\n */\nexport type CoverageObserver = (id: string) => void\n\n/** The minimal emitter slice the sensor needs. Structural, to avoid an import. */\nexport interface CoverageEmitter {\n emit(event: 'coverage:threshold', data: CoverageEvent): void\n}\n\n/** Field descriptors, read only for the `bulk` axis. Structural by design. */\nexport type CoverageFieldMeta = Readonly<Record<string, { readonly bulk?: 'sensitive' }>>\n\nexport interface CoverageStrategy {\n /**\n * Resolve the decrypt observer for one collection, or `undefined` when\n * nothing should be accounted — which is the un-opted-in case, and also the\n * opted-in case for a collection declaring no `bulk: 'sensitive'` field.\n *\n * `fieldMeta` is a THUNK because `fieldMeta` can be attached to a Collection\n * after construction (`_applyFieldMeta`, first-wins), and this is called\n * from the constructor.\n *\n * ⛔ `eager` is load-bearing, not informational — see the eager-hydration\n * note in `with-audit/coverage/accounting.ts`. An eager collection decrypts\n * its WHOLE corpus at hydration, so a decrypt-point sensor reads 100%\n * coverage for anyone who opens the vault.\n */\n observer(\n vault: string,\n collection: string,\n principal: string,\n fieldMeta: () => CoverageFieldMeta | undefined,\n emitter: CoverageEmitter,\n eager: boolean,\n ): CoverageObserver | undefined\n}\n\n/**\n * The un-opted-in floor: no observer, therefore no accounting, no allocation\n * per read, and no coverage code in the bundle. `Collection` calls\n * `observer()` once at construction and stores `undefined`; `RecordCodec`'s\n * hot path is a single `!== undefined` test.\n */\nexport const NO_COVERAGE: CoverageStrategy = { observer: () => undefined }\n"],"mappings":";AA6GO,IAAM,cAAgC,EAAE,UAAU,MAAM,OAAU;","names":[]}
@@ -3,14 +3,14 @@ import {
3
3
  normalizeMatches,
4
4
  normalizeSubqueryOperand,
5
5
  readPath
6
- } from "./chunk-HLEK5VAN.js";
6
+ } from "./chunk-BUE7R3B5.js";
7
7
  import {
8
8
  isViaPrefixProbe
9
- } from "./chunk-Z5HTYMMQ.js";
9
+ } from "./chunk-PTJY5R3O.js";
10
10
  import {
11
11
  FieldNotQueryableError,
12
12
  IndexRequiredError
13
- } from "./chunk-244VXYPG.js";
13
+ } from "./chunk-VSUQI5Q6.js";
14
14
 
15
15
  // src/with-lookup/indexing/strategy.ts
16
16
  var NO_INDEXING = {
@@ -608,4 +608,4 @@ export {
608
608
  PersistedCollectionIndex,
609
609
  LazyQuery
610
610
  };
611
- //# sourceMappingURL=chunk-HBRLNOHL.js.map
611
+ //# sourceMappingURL=chunk-NYJBYVBG.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  envelopePayloadHash
3
- } from "./chunk-CKNGS5MH.js";
3
+ } from "./chunk-2WJKJZSO.js";
4
4
  import {
5
5
  NOYDB_FORMAT_VERSION
6
- } from "./chunk-ODVPTDPK.js";
6
+ } from "./chunk-2ELOCEXE.js";
7
7
  import {
8
8
  DictKeyMissingError,
9
9
  PermissionDeniedError
10
- } from "./chunk-244VXYPG.js";
10
+ } from "./chunk-VSUQI5Q6.js";
11
11
 
12
12
  // src/via/lookup/handle.ts
13
13
  function isDeleteMarker(envelope) {
@@ -110,7 +110,7 @@ var LookupHandle = class {
110
110
  }
111
111
  async decryptEntry(key, envelope) {
112
112
  if (!this.encrypted) {
113
- return JSON.parse(envelope._data);
113
+ return JSON.parse(envelope._data ?? "");
114
114
  }
115
115
  const json = await this.reservedEnvelopes.decrypt(this.collName, key, envelope);
116
116
  return JSON.parse(json);
@@ -392,4 +392,4 @@ export {
392
392
  dictCollectionName,
393
393
  LookupHandle
394
394
  };
395
- //# sourceMappingURL=chunk-DF73H4UN.js.map
395
+ //# sourceMappingURL=chunk-NZULV7LK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/via/lookup/handle.ts"],"sourcesContent":["/**\n * `_dict_*` reserved-collection storage engine — `LookupHandle`.\n *\n * Verbatim move of `DictionaryHandle` out of `via/i18n/dictionary.ts`\n * (#650 Task 1 — via-lookup extraction, phase D). The class is renamed to\n * `LookupHandle` (the dict tier is one backing kind the eventual lookup\n * layer supports); `via/i18n/dictionary.ts` re-exports it as\n * `DictionaryHandle` for one release so existing importers compile\n * unchanged. `DictEntry` / `DictionaryOptions` / `DICT_COLLECTION_PREFIX` /\n * `dictCollectionName` move with it — they were exclusively consumed by\n * this class's constructor/methods.\n *\n * No behavior change from the pre-move class: same encryption door\n * (`reservedEnvelopes('_dict_')`, #629 Task 4), same ACL, same ledger\n * shape, same sync-cache/snapshot contract for dict joins.\n */\n\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport type { NoydbEventEmitter } from '../../kernel/events.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport type { UnlockedKeyring } from '../../with-party/team/keyring.js'\nimport type { ViaCryptoCtx } from '../../kernel/via/index.js'\nimport type { LedgerStore } from '../../with-commit/history/ledger/store.js'\nimport { envelopePayloadHash } from '../../with-commit/history/ledger/hash.js'\nimport {\n PermissionDeniedError,\n DictKeyMissingError,\n} from '../../kernel/errors.js'\n\n/**\n * Delete-marker predicate, duplicated (not imported) from\n * `capsule/plumbing/tombstone.ts`'s `isDeleteMarker` (#647 fix wave 1).\n * `via/lookup/**` may not statically import `capsule/enclave-aes/` — not even the barrel\n * (Check 15, `via-enclave-isolation`) — and this predicate carries zero crypto/protected-body\n * surface (just the `_del` protocol-header field, not `_iv`/`_data`), so duplicating it here\n * mirrors the same call `port/with/i18n-strategy.ts` already makes for `isDictCollectionName`\n * (see its doc comment). Keep the two in sync if the marker shape ever changes.\n *\n * `buildDeleteMarker` (which DOES construct the protected `_iv`/`_data` body fields — Check 11,\n * `enclave-body-only`) can't be duplicated the same way; it's injected via the constructor\n * instead, built from the real `capsule/enclave-aes` function at the Vault call site.\n */\nfunction isDeleteMarker(envelope: EncryptedEnvelope): boolean {\n return envelope._del === true\n}\n\n/** Reserved collection name prefix. Never collides with user collections. */\nexport const DICT_COLLECTION_PREFIX = '_dict_'\n\n/** Return the adapter collection name for a named dictionary. */\nexport function dictCollectionName(dictionaryName: string): string {\n return `${DICT_COLLECTION_PREFIX}${dictionaryName}`\n}\n\n// ─── Dictionary entry shape ────────────────────────────────────────────\n\n/**\n * One entry in a `_dict_*` collection. The record `id` (adapter-side\n * key) IS the stable dictionary key (e.g. `'paid'`). The `labels`\n * record maps locale codes to display strings.\n */\nexport interface DictEntry {\n /** Stable key — same as the record id in the adapter. */\n readonly key: string\n /** Locale → label map, e.g. `{ en: 'Paid', th: 'ชำระแล้ว' }`. */\n readonly labels: Record<string, string>\n}\n\n// ─── Per-dictionary options ────────────────────────────────────────────\n\n/**\n * Options for `vault.dictionary(name, options?)`.\n *\n * `writableBy` controls the minimum role for write operations (put,\n * putAll, delete, rename). Defaults to `'admin'` to match the standard\n * \"dictionary contents are owned by admins\" convention; set to\n * `'operator'` for user-editable dictionaries like custom tags.\n */\nexport interface DictionaryOptions {\n /** Minimum role allowed to write dictionary entries. Default: `'admin'`. */\n readonly writableBy?: 'owner' | 'admin' | 'operator'\n}\n\n// ─── LookupHandle ───────────────────────────────────────────────────────\n\n/**\n * Handle to a named dictionary within a vault.\n *\n * Obtained via `vault.dictionary(name)`. Provides strongly-typed\n * CRUD for dictionary entries, plus the `rename()` operation that is the\n * only sanctioned mass-mutation path for dictKey fields.\n *\n * All writes are encrypted under the compartment's DEK for the\n * `_dict_<name>` collection. Adapters never see plaintext.\n */\nexport class LookupHandle<Keys extends string = string> {\n private readonly collName: string\n\n /**\n * Synchronous write-through cache for dict-join support.\n * Populated on every `put()`, `delete()`, and `rename()`. The snapshot\n * is built from this cache by `snapshotEntries()` — the query executor\n * calls this synchronously inside `.toArray()`.\n *\n * `null` means \"not yet initialized\" — callers should use `list()`\n * to warm the cache before using dict joins on pre-existing data.\n */\n private readonly _syncCache = new Map<string, DictEntry>()\n\n /**\n * Return all cached entries as `{ key, labels, ...labels }` records —\n * usable synchronously by the join executor's `snapshot()` call.\n * Returns an empty array when the cache has never been populated.\n */\n snapshotEntries(): readonly Record<string, unknown>[] {\n return Array.from(this._syncCache.values()).map((e) => ({\n key: e.key,\n labels: e.labels,\n ...e.labels,\n }))\n }\n\n constructor(\n private readonly adapter: NoydbStore,\n private readonly compartmentName: string,\n private readonly dictionaryName: string,\n private readonly keyring: UnlockedKeyring,\n /**\n * The `reservedEnvelopes('_dict_')` capability — this handle's sanctioned\n * crypto door onto its `_dict_<name>` collection (#629 Task 4). Bound by\n * the Vault; never a keyring, raw DEK, or enclave import.\n */\n private readonly reservedEnvelopes: ReturnType<ViaCryptoCtx['reservedEnvelopes']>,\n private readonly encrypted: boolean,\n private readonly ledger: LedgerStore | undefined,\n private readonly options: DictionaryOptions,\n /**\n * Callback provided by the Vault to find and rewrite records\n * in any registered collection that has a dictKeyField pointing at\n * this dictionary, used by `rename()`.\n */\n private readonly findAndUpdateReferences:\n | ((\n dictionaryName: string,\n oldKey: string,\n newKey: string,\n ) => Promise<void>)\n | undefined,\n private readonly emitter: NoydbEventEmitter,\n /**\n * #647 fix wave 1 — mints a version-ordered delete-marker envelope (the reserved-tier\n * mirror of #589's ordinary-collection delete marker). Injected rather than imported:\n * `buildDeleteMarker` constructs the envelope's protected-body fields (`_iv`/`_data`), and\n * `via/lookup/**` may not reach `capsule/enclave-aes/` directly (Check 11\n * `enclave-body-only` / Check 15 `via-enclave-isolation`) — the Vault binds the real\n * `capsule/enclave-aes` function at construction time, same pattern as `reservedEnvelopes` above.\n */\n private readonly buildDeleteMarker: (identity: { collection: string; id: string }, version: number, actor: string) => EncryptedEnvelope,\n /** #650 Task 4 (#647) — dirty-log participation hook (origin `local-write`), threaded from `BuildLookupHandleOptions`. */\n private readonly onDirty?: (collection: string, id: string, action: 'put' | 'delete', version: number) => Promise<void>,\n /** #650 Task 4 — thin `graphDispatch.collect`-equivalent; opens/collects/flushes a one-shot wave for this touch. */\n private readonly onRecordMutated?: (collection: string, id: string, action: 'put' | 'delete', version: number) => Promise<void>,\n /** #650 Task 5 (#648) — the real reference check `delete()`'s strict branch calls: restrict\n * throws `DictKeyInUseError`, cascade/nullify apply their propagation. Vault-bound; a no-op\n * when the dimension has no declared lookup-referencing edges. */\n private readonly checkReferencesOnDelete?: (key: string) => Promise<unknown>,\n ) {\n this.collName = dictCollectionName(dictionaryName)\n }\n\n // ─── Access checks ────────────────────────────────────────────────\n\n private requireWriteAccess(): void {\n const minRole = this.options.writableBy ?? 'admin'\n const roleRank: Record<string, number> = {\n client: 1,\n viewer: 2,\n operator: 3,\n admin: 4,\n owner: 5,\n }\n const callerRank = roleRank[this.keyring.role] ?? 0\n const requiredRank = roleRank[minRole] ?? 4\n if (callerRank < requiredRank) {\n throw new PermissionDeniedError(\n `Dictionary \"${this.dictionaryName}\" writes require \"${minRole}\" role or above. ` +\n `Current role: \"${this.keyring.role}\".`,\n )\n }\n }\n\n // ─── Internal helpers ─────────────────────────────────────────────\n\n private async encryptEntry(entry: DictEntry, version: number): Promise<EncryptedEnvelope> {\n if (!this.encrypted) {\n // Plaintext/debug vault: no AEAD, therefore no AAD to bind — this literal\n // has nothing `buildRecordEnvelope` could authenticate, and `via/lookup/**`\n // may not import `capsule/enclave-aes/` to reach it anyway (Check 15,\n // `via-enclave-isolation`). The ENCRYPTED branch below is the one that\n // matters, and it is bound: `reservedEnvelopes.encrypt` holds the DEK, so\n // it is where identity AAD is applied (#1051).\n return {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: version,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: JSON.stringify(entry),\n _by: this.keyring.userId,\n }\n }\n // `entry.key` IS the record id this envelope is stored under. `_by` goes\n // IN, not on afterwards: stamping it on the returned envelope would leave\n // it outside the AAD the door just sealed (#1041).\n return this.reservedEnvelopes.encrypt(\n { collection: this.collName, id: entry.key, by: this.keyring.userId },\n JSON.stringify(entry),\n version,\n )\n }\n\n private async decryptEntry(key: string, envelope: EncryptedEnvelope): Promise<DictEntry> {\n if (!this.encrypted) {\n return JSON.parse(envelope._data ?? '') as DictEntry\n }\n // `key` IS the record id this envelope is stored under, and the identity the\n // writer sealed it against (#1041).\n const json = await this.reservedEnvelopes.decrypt(this.collName, key, envelope)\n return JSON.parse(json) as DictEntry\n }\n\n /** @internal #650 Task 4 — re-read `key`'s CURRENT adapter truth into `_syncCache` (delete the\n * cache entry when the key is now gone). Called by `Vault._invalidateSyncApplied` after a\n * reserved-lookup row applies via sync, so an already-warmed snapshot/membership/altIndex read\n * never sees a stale verdict for a pulled vocabulary edit — the same invalidation a local\n * put()/delete()/rename() already triggers via `_syncCache.set`/`delete` above. */\n async _refreshSyncCache(key: string): Promise<void> {\n const envelope = await this.adapter.get(this.compartmentName, this.collName, key)\n if (!envelope || isDeleteMarker(envelope)) { this._syncCache.delete(key); return }\n this._syncCache.set(key, await this.decryptEntry(key, envelope))\n }\n\n // ─── Public API ───────────────────────────────────────────────────\n\n /**\n * Add or overwrite a single dictionary entry.\n *\n * @param key The stable key to store (e.g. `'paid'`).\n * @param labels Locale → label map (e.g. `{ en: 'Paid', th: 'ชำระแล้ว' }`).\n */\n async put(key: Keys, labels: Record<string, string>): Promise<void> {\n this.requireWriteAccess()\n\n const entry: DictEntry = { key, labels }\n const existing = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n const version = existing ? existing._v + 1 : 1\n const envelope = await this.encryptEntry(entry, version)\n\n await this.adapter.put(\n this.compartmentName,\n this.collName,\n key,\n envelope,\n existing ? existing._v : undefined,\n )\n\n // Maintain synchronous cache for dict-join snapshot\n this._syncCache.set(key, entry)\n\n // #650 Task 4 (#647) — choke-point participation: dirty-log tracking BEFORE the emit (mirrors\n // Collection._onRecordMutated's local-write order), then the wave-open hook AFTER.\n await this.onDirty?.(this.collName, key, 'put', version)\n\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: key,\n action: 'put',\n })\n\n await this.onRecordMutated?.(this.collName, key, 'put', version)\n\n if (this.ledger) {\n await this.ledger.append({\n op: 'put',\n collection: this.collName,\n id: key,\n version,\n actor: this.keyring.userId,\n // — must be the real envelope hash so\n // vault.verifyBackupIntegrity()'s data-cross-check matches.\n payloadHash: await envelopePayloadHash(envelope),\n })\n }\n }\n\n /**\n * Batch-add or overwrite multiple dictionary entries in one call.\n *\n * @param entries `{ key: { locale: label } }` map.\n */\n async putAll(entries: Record<Keys, Record<string, string>>): Promise<void> {\n this.requireWriteAccess()\n for (const [key, labels] of Object.entries(entries) as [Keys, Record<string, string>][]) {\n await this.put(key, labels)\n }\n }\n\n /**\n * Load the label map for a single key.\n *\n * @returns The label map, or `null` if the key doesn't exist.\n */\n async get(key: Keys): Promise<Record<string, string> | null> {\n const envelope = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n if (!envelope || isDeleteMarker(envelope)) return null\n const entry = await this.decryptEntry(key, envelope)\n return entry.labels\n }\n\n /**\n * Delete a dictionary key.\n *\n * Default mode is `'strict'` — throws `DictKeyInUseError` if any\n * registered collection has a record referencing this key. Pass\n * `{ mode: 'warn' }` to skip the check (dev-mode cleanup only).\n *\n * Under sync, deletion writes a version-ordered delete-marker row rather than removing the\n * adapter key outright (#647 fix wave 1) — markers accumulate over time; GC is future work,\n * acceptable for vocabulary-scale data.\n */\n async delete(key: Keys, opts: { mode?: 'strict' | 'warn' } = {}): Promise<void> {\n this.requireWriteAccess()\n\n const existing = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n if (!existing || isDeleteMarker(existing)) {\n throw new DictKeyMissingError(this.dictionaryName, key)\n }\n\n // #650 Task 5 (#648) — the real reference check: restrict throws `DictKeyInUseError` naming\n // the referencing collection, cascade/nullify apply their propagation. `mode: 'warn'` skips\n // this entirely (today's dev-mode-cleanup escape hatch, unconditional delete). A dimension\n // with no declared lookup-referencing edges is a no-op (undeclared refs keep dangling).\n const mode = opts.mode ?? 'strict'\n if (mode === 'strict') {\n await this.checkReferencesOnDelete?.(key)\n }\n\n // #647 fix wave 1 — mirrors Collection._doDelete's identical `this.onDirty`-gated branch\n // (#589): under sync, a raw adapter.delete() is invisible to a peer's next pull (the key\n // simply stops appearing in remote.list()) — a deleted key never propagates and can be\n // silently resurrected by a later edit. Write a version-ordered DELETE-MARKER instead, so\n // the removal round-trips like any other row. No-op (plain adapter.delete) when sync isn't wired.\n const nextVersion = existing._v + 1\n if (this.onDirty) {\n await this.adapter.put(this.compartmentName, this.collName, key, this.buildDeleteMarker({ collection: this.collName, id: key }, nextVersion, this.keyring.userId))\n } else {\n await this.adapter.delete(this.compartmentName, this.collName, key)\n }\n\n // Maintain synchronous cache for dict-join snapshot\n this._syncCache.delete(key)\n\n // #650 Task 4 (#647) — same choke-point ordering as put() above.\n // #647 fix wave 1: the dirty entry's ACTION is 'put' (not 'delete') — mirrors\n // Collection._onRecordMutated's 'local-delete' case exactly: the marker rides push's\n // CAS-put path, not push's raw remote.delete() path (which would strip the marker off the\n // remote too and reopen this same hole). The version is the MARKER's version, so push's CAS\n // (expectedVersion = entry.version - 1) matches the pre-delete remote copy.\n await this.onDirty?.(this.collName, key, 'put', nextVersion)\n\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: key,\n action: 'delete',\n })\n\n await this.onRecordMutated?.(this.collName, key, 'delete', nextVersion)\n\n if (this.ledger) {\n await this.ledger.append({\n op: 'delete',\n collection: this.collName,\n id: key,\n version: existing._v,\n actor: this.keyring.userId,\n // — for delete the prior envelope is what was just\n // removed; we hash it so the chain captures intent. The\n // verifyBackupIntegrity data-cross-check skips delete\n // entries entirely (the live record is gone), but the\n // chain still benefits from a stable non-empty hash.\n payloadHash: await envelopePayloadHash(existing),\n })\n }\n }\n\n /**\n * Rename a dictionary key — the only sanctioned mass-mutation path.\n *\n * Atomically:\n * 1. Adds the new key with the same labels as the old key.\n * 2. Updates every registered record that stores the old key to\n * store the new key instead.\n * 3. Deletes the old key.\n * 4. Appends a single ledger entry recording the rename.\n *\n * Respects ACL: throws `PermissionDeniedError` before any mutation\n * if the caller can't write. The cascade is best-effort atomic\n * within this call — no two-phase commit across adapter calls.\n *\n * Cascade-on-delete is NOT supported. Use `rename()` when you need\n * to change a key that records reference.\n */\n async rename(oldKey: Keys, newKey: string): Promise<void> {\n this.requireWriteAccess()\n\n // 1. Load old entry\n const existing = await this.adapter.get(\n this.compartmentName,\n this.collName,\n oldKey,\n )\n if (!existing || isDeleteMarker(existing)) {\n throw new DictKeyMissingError(this.dictionaryName, oldKey)\n }\n const oldEntry = await this.decryptEntry(oldKey, existing)\n\n // 2. Write new key\n const newEntry: DictEntry = { key: newKey, labels: oldEntry.labels }\n const newEnvelope = await this.encryptEntry(newEntry, 1)\n await this.adapter.put(\n this.compartmentName,\n this.collName,\n newKey,\n newEnvelope,\n )\n\n // #670 — publish newKey to the sync cache BEFORE step 3 rewrites referencing records: a\n // vocabulary:'closed' referencing field's enforceWrite reads checkLookupMembership ->\n // snapshotEntries() -> this._syncCache, so if newKey isn't a member yet, step 3's own write of\n // newKey into those records self-refuses with UnknownLookupKeyError. Transition semantics:\n // mid-rename BOTH oldKey and newKey are legitimately members (records are transitioning\n // old->new during the rewrite) — oldKey stays a member until its removal completes below.\n this._syncCache.set(newKey, newEntry)\n\n // 3. Update all referencing records in registered collections\n if (this.findAndUpdateReferences) {\n await this.findAndUpdateReferences(this.dictionaryName, oldKey, newKey)\n }\n\n // 4. Remove old key — #647 fix wave 1: same delete-marker convention as delete() above, so\n // the old key's removal propagates on sync instead of leaving a phantom stale row on a peer\n // that only observes the new key arriving.\n const oldKeyNextVersion = existing._v + 1\n if (this.onDirty) {\n await this.adapter.put(this.compartmentName, this.collName, oldKey, this.buildDeleteMarker({ collection: this.collName, id: oldKey }, oldKeyNextVersion, this.keyring.userId))\n } else {\n await this.adapter.delete(this.compartmentName, this.collName, oldKey)\n }\n\n // Maintain synchronous cache for dict-join snapshot — oldKey's removal from the cache lands\n // here (after step 3), completing the old->new membership transition begun above.\n this._syncCache.delete(oldKey)\n\n // #650 Task 4 (#647) — same choke-point ordering as put()/delete() above, for BOTH touches.\n // #647 fix wave 1: oldKey's dirty action is 'put' (not 'delete') — see delete()'s comment\n // above for why the marker must ride push's CAS-put path, at the marker's version.\n await this.onDirty?.(this.collName, oldKey, 'put', oldKeyNextVersion)\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: oldKey,\n action: 'delete',\n })\n await this.onRecordMutated?.(this.collName, oldKey, 'delete', oldKeyNextVersion)\n\n await this.onDirty?.(this.collName, newKey, 'put', 1)\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: newKey,\n action: 'put',\n })\n await this.onRecordMutated?.(this.collName, newKey, 'put', 1)\n\n // 5. Ledger — record the rename as delete(oldKey) + put(newKey)\n // so verifyBackupIntegrity()'s data-cross-check matches reality\n // (the oldKey envelope is gone; the newKey envelope is what was\n // just written). Two entries instead of one — the chain still\n // captures the rename intent via the matching ts + actor.\n if (this.ledger) {\n await this.ledger.append({\n op: 'delete',\n collection: this.collName,\n id: oldKey,\n version: existing._v,\n actor: this.keyring.userId,\n payloadHash: await envelopePayloadHash(existing),\n })\n await this.ledger.append({\n op: 'put',\n collection: this.collName,\n id: newKey,\n version: 1,\n actor: this.keyring.userId,\n payloadHash: await envelopePayloadHash(newEnvelope),\n })\n }\n }\n\n /**\n * List all entries in this dictionary.\n *\n * @returns Array of `{ key, labels }` objects.\n */\n async list(): Promise<DictEntry[]> {\n const keys = await this.adapter.list(this.compartmentName, this.collName)\n const entries: DictEntry[] = []\n for (const key of keys) {\n const envelope = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n // #647 fix wave 1 — a delete-marker row is a removed key, not a live entry: exclude it\n // from the listing and drop any stale cache entry a prior warm may have left under it.\n if (!envelope || isDeleteMarker(envelope)) { this._syncCache.delete(key); continue }\n const entry = await this.decryptEntry(key, envelope)\n entries.push(entry)\n // Warm the synchronous cache\n this._syncCache.set(key, entry)\n }\n return entries\n }\n\n /**\n * Resolve a key to its label for the given locale.\n *\n * Used by the collection's locale-aware read path to populate\n * `<field>Label` virtual fields. Returns `undefined` when the\n * key doesn't exist or has no label for the requested locale\n * (after exhausting the fallback chain).\n */\n async resolveLabel(\n key: string,\n locale: string,\n fallback?: string | readonly string[],\n ): Promise<string | undefined> {\n const labels = await this.get(key as Keys)\n if (!labels) return undefined\n\n // Try primary locale\n if (labels[locale] !== undefined) return labels[locale]\n\n // Try fallback chain\n const chain = Array.isArray(fallback) ? (fallback as readonly string[]) : fallback ? [fallback as string] : []\n for (const fb of chain) {\n if (fb === 'any') {\n // Return any available label\n const any = Object.values(labels)[0]\n if (any !== undefined) return any\n } else if (labels[fb] !== undefined) {\n return labels[fb]\n }\n }\n\n return undefined\n }\n}\n\n// Compat alias — existing importers of `DictionaryHandle` (the pre-#650\n// name) keep compiling unchanged. `via/i18n/dictionary.ts` re-exports\n// this same binding for one release.\nexport { LookupHandle as DictionaryHandle }\n"],"mappings":";;;;;;;;;;;;AA0CA,SAAS,eAAe,UAAsC;AAC5D,SAAO,SAAS,SAAS;AAC3B;AAGO,IAAM,yBAAyB;AAG/B,SAAS,mBAAmB,gBAAgC;AACjE,SAAO,GAAG,sBAAsB,GAAG,cAAc;AACnD;AA2CO,IAAM,eAAN,MAAiD;AAAA,EA2BtD,YACmB,SACA,iBACA,gBACA,SAMA,mBACA,WACA,QACA,SAMA,yBAOA,SASA,mBAEA,SAEA,iBAIA,yBACjB;AA3CiB;AACA;AACA;AACA;AAMA;AACA;AACA;AACA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,GAAW;AACzC,QAAI,CAAC,OAAQ,QAAO;AAGpB,QAAI,OAAO,MAAM,MAAM,OAAW,QAAO,OAAO,MAAM;AAGtD,UAAM,QAAQ,MAAM,QAAQ,QAAQ,IAAK,WAAiC,WAAW,CAAC,QAAkB,IAAI,CAAC;AAC7G,eAAW,MAAM,OAAO;AACtB,UAAI,OAAO,OAAO;AAEhB,cAAM,MAAM,OAAO,OAAO,MAAM,EAAE,CAAC;AACnC,YAAI,QAAQ,OAAW,QAAO;AAAA,MAChC,WAAW,OAAO,EAAE,MAAM,QAAW;AACnC,eAAO,OAAO,EAAE;AAAA,MAClB;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AACF;","names":[]}
@@ -24,4 +24,4 @@ export {
24
24
  DEFAULT_HEAD_BUCKETS,
25
25
  NO_VAULT_HEAD
26
26
  };
27
- //# sourceMappingURL=chunk-HK67PX4J.js.map
27
+ //# sourceMappingURL=chunk-OFD2HD6F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-commit/vault-head/strategy.ts"],"sourcesContent":["/**\n * `withVaultHead()` — the opt-in detector for **omission** (#1044).\n *\n * ## What it is for, and what it deliberately is not\n *\n * #1041 made every envelope self-authenticating at its identity, and #1042\n * made the merge reject one that is not. What neither can catch is **absence**:\n * a store that serves a genuine, unmodified `v1` when `v7` exists, or serves\n * nothing at all. An authentic old envelope is indistinguishable from an\n * authentic current one without external knowledge of what *should* be there.\n *\n * The head is that external knowledge: an authenticated `{id → version}`\n * manifest the client writes and the store cannot forge. It is **not** a Merkle\n * chain over content — content integrity is already handled, so the head needs\n * only versions.\n *\n * ## Why it is opt-in when AAD is not\n *\n * AAD costs nothing to coordinate and closes *alteration*, so it is kernel. The\n * head costs a write per commit and needs anti-entropy; on a single-device\n * offline vault it defends against nothing. Making it kernel would tax every\n * user for a multi-writer property. ADR 0003, Decision 3.\n *\n * `SECURITY.md` states the split exactly: a store cannot alter, relocate,\n * re-tier, re-author or rewind a record; **without `withVaultHead()` it can\n * still withhold or omit.**\n *\n * ## Bucketed, and why that is not a compromise\n *\n * ADR 0003 left head granularity open and asked for it to be sized early.\n * Measured, at the documented 50K-record vault ceiling:\n *\n * | shape | write cost per commit | detection |\n * |---|---|---|\n * | one per-vault manifest | **1.1 MiB** | per-record |\n * | one per collection | the same problem, renamed | per-record |\n * | **bucketed, 256 buckets** | **~4.4 KiB** | per-record |\n *\n * Bucketing changes *only* write amplification. Each bucket still lists every\n * one of its records' versions, so detection stays per-record — which is why\n * this is not a trade-off between cost and strength. Verifying one pulled\n * record reads one bucket rather than a megabyte.\n *\n * ## Wired as a bus OBSERVER, not a call in `collection.ts`\n *\n * That is what `kernel-surface` means by \"register on the ServiceBus instead of\n * growing this file\", and it keeps the hot write path untouched for anyone who\n * has not opted in: nothing is registered at all, so `hasHandlers` stays false\n * and the dispatch never happens.\n *\n * Both `afterPut` AND `afterDelete`, because a delete is a version bump like\n * any other. A head that stopped tracking deleted records would let a store\n * resurrect one by withholding the tombstone — precisely the omission this\n * exists to catch.\n *\n * ⚠️ The registration must be UNCONDITIONAL on anything but `enabled`. Its first\n * draft sat inside `#registerForgetHooks()`, which returns early when no forget\n * subjects are declared, so the head silently recorded nothing unless the vault\n * happened to use an unrelated feature. The tests caught it only because they\n * asserted a COUNT rather than \"no error\" — a head that records nothing raises\n * no errors and sweeps perfectly clean.\n *\n * @packageDocumentation\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../capsule/index.js'\n\n/** Reserved collection the head's buckets live in. */\nexport const VAULT_HEAD_COLLECTION = '_head' as const\n\n/** Default bucket count — see the sizing table above. */\nexport const DEFAULT_HEAD_BUCKETS = 256\n\nexport interface WithVaultHeadOptions {\n /**\n * How many buckets the manifest is split across. Higher means smaller writes\n * and more reads to sweep the whole vault; lower means the opposite.\n * Changing it on an existing vault re-homes every entry, so treat it as a\n * layout decision rather than a tuning knob.\n */\n readonly buckets?: number\n}\n\n/** One record's expected state, as the client last committed it. */\nexport interface HeadEntry {\n readonly collection: string\n readonly id: string\n readonly version: number\n}\n\nexport interface VaultHeadStrategy {\n /**\n * Is the head actually keeping a manifest?\n *\n * An explicit flag rather than an identity check against the stub: the kernel\n * decides whether to register the write-path observer at all, and\n * `port-layering` forbids it importing `NO_VAULT_HEAD` to compare. Without\n * this, every write in a vault that never opted in would still pay a cache\n * lookup and a no-op call.\n */\n readonly enabled: boolean\n\n /** Bucket a record id lands in — pure, so callers can pre-group a batch. */\n bucketFor(collection: string, id: string): string\n\n /**\n * Record `entry` as the client's expectation for that record.\n *\n * Called on every committed write, INSIDE the same logical operation, so\n * there is no window where the record exists and the head does not know it.\n */\n note(\n store: NoydbStore,\n vault: string,\n getDEK: (collection: string) => Promise<EnclaveKey>,\n entry: HeadEntry,\n ): Promise<void>\n\n /**\n * What the client expects for `collection/id`, or `null` if the head has\n * never seen it.\n */\n expected(\n store: NoydbStore,\n vault: string,\n getDEK: (collection: string) => Promise<EnclaveKey>,\n collection: string,\n id: string,\n ): Promise<number | null>\n\n /**\n * Every record the head knows about in `collection` — the set a sweep\n * compares against what the store actually serves, which is how DELETION\n * SUPPRESSION is caught. A withheld record is absent from the store but\n * present here.\n */\n knownIn(\n store: NoydbStore,\n vault: string,\n getDEK: (collection: string) => Promise<EnclaveKey>,\n collection: string,\n ): Promise<ReadonlyMap<string, number>>\n}\n\nfunction notEnabled(op: string): Error {\n return new Error(\n `${op} requires the vault-head capability. Pass \\`vaultHeadStrategy: withVaultHead()\\` ` +\n 'from \"@noy-db/hub/vault-head\" to createNoydb().',\n )\n}\n\n/**\n * The un-opted-in stub. `note` is a NO-OP rather than a throw: the write path\n * calls it unconditionally, and a vault without the head must simply not keep\n * one. The READ side throws, because asking what the head expects when there is\n * no head is a caller error, not a silent \"nothing to report\" — the latter\n * would look exactly like a clean sweep.\n */\nexport const NO_VAULT_HEAD: VaultHeadStrategy = {\n enabled: false,\n bucketFor: () => '',\n async note() {},\n async expected() { throw notEnabled('vault.verifyHead()') },\n async knownIn() { throw notEnabled('vault.verifyHead()') },\n}\n\n/**\n * `EncryptedEnvelope` — PUBLISHED API, reachable from @noy-db/hub, @noy-db/hub/debug, @noy-db/hub/tiers, @noy-db/hub/to, @noy-db/hub/vault-head. Flagged as unused because\n * nothing inside hub imports it from this module; a consumer does. Do not narrow\n * or delete without a seam change (#55).\n *\n * @public\n */\nexport type { EncryptedEnvelope }\n"],"mappings":";AAoEO,IAAM,wBAAwB;AAG9B,IAAM,uBAAuB;AAyEpC,SAAS,WAAW,IAAmB;AACrC,SAAO,IAAI;AAAA,IACT,GAAG,EAAE;AAAA,EAEP;AACF;AASO,IAAM,gBAAmC;AAAA,EAC9C,SAAS;AAAA,EACT,WAAW,MAAM;AAAA,EACjB,MAAM,OAAO;AAAA,EAAC;AAAA,EACd,MAAM,WAAW;AAAE,UAAM,WAAW,oBAAoB;AAAA,EAAE;AAAA,EAC1D,MAAM,UAAU;AAAE,UAAM,WAAW,oBAAoB;AAAA,EAAE;AAC3D;","names":[]}
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  readPath
3
- } from "./chunk-HLEK5VAN.js";
3
+ } from "./chunk-BUE7R3B5.js";
4
4
  import {
5
5
  installViaBinder
6
- } from "./chunk-Z5HTYMMQ.js";
6
+ } from "./chunk-PTJY5R3O.js";
7
7
  import {
8
8
  NoydbError,
9
9
  ValidationError
10
- } from "./chunk-244VXYPG.js";
10
+ } from "./chunk-VSUQI5Q6.js";
11
11
 
12
12
  // src/via/money/iso4217.ts
13
13
  var MINOR_UNITS = {
@@ -1130,4 +1130,4 @@ export {
1130
1130
  decodeMoneyFields,
1131
1131
  exactMath
1132
1132
  };
1133
- //# sourceMappingURL=chunk-WY2XXTET.js.map
1133
+ //# sourceMappingURL=chunk-OJU67C23.js.map