@noy-db/hub 0.2.0-pre.18 → 0.2.0-pre.19

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 (283) hide show
  1. package/dist/aggregate/index.cjs +227 -3
  2. package/dist/aggregate/index.cjs.map +1 -1
  3. package/dist/aggregate/index.d.cts +3 -3
  4. package/dist/aggregate/index.d.ts +3 -3
  5. package/dist/aggregate/index.js +5 -4
  6. package/dist/aggregate/index.js.map +1 -1
  7. package/dist/attestation/index.cjs.map +1 -1
  8. package/dist/attestation/index.d.cts +5 -5
  9. package/dist/attestation/index.d.ts +5 -5
  10. package/dist/attestation/index.js +6 -6
  11. package/dist/blobs/index.cjs +4 -10
  12. package/dist/blobs/index.cjs.map +1 -1
  13. package/dist/blobs/index.d.cts +6 -6
  14. package/dist/blobs/index.d.ts +6 -6
  15. package/dist/blobs/index.js +6 -6
  16. package/dist/bundle/index.cjs +520 -46
  17. package/dist/bundle/index.cjs.map +1 -1
  18. package/dist/bundle/index.d.cts +7 -7
  19. package/dist/bundle/index.d.ts +7 -7
  20. package/dist/bundle/index.js +10 -10
  21. package/dist/{chunk-6Q5XRLKG.js → chunk-3FSMVWBN.js} +4 -4
  22. package/dist/{chunk-647TFNYL.js → chunk-3Q2AOPLT.js} +76 -28
  23. package/dist/chunk-3Q2AOPLT.js.map +1 -0
  24. package/dist/{chunk-2U226RDC.js → chunk-4ULLGYPA.js} +3 -3
  25. package/dist/{chunk-6FHCU3QO.js → chunk-5IGWRMEC.js} +5 -5
  26. package/dist/{chunk-Y5XVB75E.js → chunk-6KESZO5D.js} +35 -7
  27. package/dist/chunk-6KESZO5D.js.map +1 -0
  28. package/dist/{chunk-KQ523X3A.js → chunk-6OSOE6BY.js} +2 -2
  29. package/dist/{chunk-HWK75CYX.js → chunk-7C6VFNIY.js} +2 -2
  30. package/dist/{chunk-33DAO2XG.js → chunk-7HD67R6U.js} +2 -2
  31. package/dist/{chunk-RQFG2YSV.js → chunk-B6E5IRPJ.js} +3 -3
  32. package/dist/{chunk-YWYW2YNO.js → chunk-CYNTFU2D.js} +2 -2
  33. package/dist/{chunk-HMFC6M2G.js → chunk-DJF3FXW5.js} +17 -1
  34. package/dist/{chunk-HMFC6M2G.js.map → chunk-DJF3FXW5.js.map} +1 -1
  35. package/dist/{chunk-KTZ2MHQK.js → chunk-DY3EOJEN.js} +2 -2
  36. package/dist/{chunk-PGVEL5IZ.js → chunk-E66DSTJP.js} +3 -3
  37. package/dist/{chunk-6YEC7LLO.js → chunk-FBLAWK6A.js} +2 -2
  38. package/dist/{chunk-LQ3GD5LL.js → chunk-FPHRTW2Z.js} +5 -5
  39. package/dist/{chunk-ZJ67TB4S.js → chunk-G4PYA575.js} +2 -2
  40. package/dist/{chunk-45643PAU.js → chunk-GKQAU52M.js} +4 -4
  41. package/dist/{chunk-5KKNBDCT.js → chunk-GYAWXHFO.js} +2 -2
  42. package/dist/{chunk-KOURQXIU.js → chunk-H42KZXNV.js} +5 -210
  43. package/dist/chunk-H42KZXNV.js.map +1 -0
  44. package/dist/{chunk-6XEGHIBA.js → chunk-IBVTH4JR.js} +4 -4
  45. package/dist/{chunk-AB7JF2KF.js → chunk-IVP5IVON.js} +2 -2
  46. package/dist/{chunk-T4T5I5L6.js → chunk-KEDJDWWQ.js} +3 -3
  47. package/dist/{chunk-C2OYWD5S.js → chunk-KNKNOJFS.js} +3 -3
  48. package/dist/chunk-KNKNOJFS.js.map +1 -0
  49. package/dist/{chunk-F2IJ2HGD.js → chunk-KYGGXXT6.js} +228 -69
  50. package/dist/chunk-KYGGXXT6.js.map +1 -0
  51. package/dist/{chunk-RZWQNMMP.js → chunk-LSIIPKYT.js} +2 -2
  52. package/dist/{chunk-FQRAYDS4.js → chunk-M3FPNTO2.js} +4 -4
  53. package/dist/{chunk-DR5I7Q6N.js → chunk-MI36HL5G.js} +4 -4
  54. package/dist/{chunk-Z3I2WNGF.js → chunk-NN6IISZO.js} +2 -2
  55. package/dist/{chunk-32XVU2LT.js → chunk-OBMYMKGO.js} +29 -6
  56. package/dist/{chunk-32XVU2LT.js.map → chunk-OBMYMKGO.js.map} +1 -1
  57. package/dist/{chunk-QJKZ5WUP.js → chunk-OKOKPYWH.js} +2 -2
  58. package/dist/{chunk-CMISAJAE.js → chunk-OY7RX2VL.js} +9 -15
  59. package/dist/chunk-OY7RX2VL.js.map +1 -0
  60. package/dist/{chunk-Z3BE5BRK.js → chunk-PTGQPWMV.js} +2 -2
  61. package/dist/{chunk-QPJ7Z4L3.js → chunk-PWFTQHYX.js} +2 -2
  62. package/dist/{chunk-K3NYRK7U.js → chunk-Q5MCHUXZ.js} +2 -2
  63. package/dist/{chunk-IQ4GMEYZ.js → chunk-S22UOMHM.js} +6 -6
  64. package/dist/{chunk-WZCG3EZ6.js → chunk-S3XA7G35.js} +2 -2
  65. package/dist/{chunk-LGPSCKWZ.js → chunk-SHIUFIPW.js} +1 -1
  66. package/dist/chunk-SHIUFIPW.js.map +1 -0
  67. package/dist/{chunk-BUBJYIZ7.js → chunk-U7JNBSS3.js} +3 -3
  68. package/dist/{chunk-TFAN3NFD.js → chunk-V3VIRTTE.js} +3 -3
  69. package/dist/{chunk-VVDSDOVV.js → chunk-V5FZWQNN.js} +4 -4
  70. package/dist/chunk-VEIVAYJ7.js +361 -0
  71. package/dist/chunk-VEIVAYJ7.js.map +1 -0
  72. package/dist/{chunk-P57D4KBG.js → chunk-VNUE6FHP.js} +3 -3
  73. package/dist/{chunk-TPOHMOGX.js → chunk-WFK2EVYU.js} +10 -2
  74. package/dist/chunk-WFK2EVYU.js.map +1 -0
  75. package/dist/{chunk-TTS3RWL5.js → chunk-X7FJMKT3.js} +2 -2
  76. package/dist/{chunk-HZOEBM67.js → chunk-XPH3FWME.js} +7 -2
  77. package/dist/{chunk-HZOEBM67.js.map → chunk-XPH3FWME.js.map} +1 -1
  78. package/dist/{chunk-DKMPR76W.js → chunk-Y5J63SMF.js} +5 -5
  79. package/dist/{chunk-HOO5I3VG.js → chunk-YLRRU72W.js} +2 -2
  80. package/dist/{chunk-MGB67HKX.js → chunk-YX333DPS.js} +4 -4
  81. package/dist/{chunk-4UI5T3K7.js → chunk-YZE6C3TQ.js} +3 -3
  82. package/dist/consent/index.cjs.map +1 -1
  83. package/dist/consent/index.d.cts +6 -6
  84. package/dist/consent/index.d.ts +6 -6
  85. package/dist/consent/index.js +3 -3
  86. package/dist/{crypto-FNK3XPCS.js → crypto-B46VNH6X.js} +3 -3
  87. package/dist/{delegation-FMXNUWE6.js → delegation-5HON72PV.js} +5 -5
  88. package/dist/derivations/index.cjs.map +1 -1
  89. package/dist/derivations/index.d.cts +7 -7
  90. package/dist/derivations/index.d.ts +7 -7
  91. package/dist/derivations/index.js +4 -4
  92. package/dist/{dev-unlock-3_2b_vo6.d.cts → dev-unlock-BR1rMOS-.d.cts} +1 -1
  93. package/dist/{dev-unlock-BMvwPr_E.d.ts → dev-unlock-whL49sxV.d.ts} +1 -1
  94. package/dist/{errors-DUTlAt3Y.d.ts → errors-DL-zTrrF.d.cts} +14 -1
  95. package/dist/{errors-DUTlAt3Y.d.cts → errors-DL-zTrrF.d.ts} +14 -1
  96. package/dist/executor-44R5CUS2.js +12 -0
  97. package/dist/executor-AOACUK7Z.js +8 -0
  98. package/dist/executor-OKFLQCDW.js +8 -0
  99. package/dist/{fanout-sidecar-JGHXAJO5.js → fanout-sidecar-DCQWJQ6S.js} +2 -2
  100. package/dist/forget/index.cjs.map +1 -1
  101. package/dist/forget/index.d.cts +1 -1
  102. package/dist/forget/index.d.ts +1 -1
  103. package/dist/forget/index.js +4 -4
  104. package/dist/guards/index.cjs.map +1 -1
  105. package/dist/guards/index.d.cts +7 -7
  106. package/dist/guards/index.d.ts +7 -7
  107. package/dist/guards/index.js +3 -3
  108. package/dist/{hash-BnWnL9bQ.d.cts → hash-BEUBmmI4.d.cts} +1 -1
  109. package/dist/{hash-BThBJFO1.d.ts → hash-Dtb7FwWd.d.ts} +1 -1
  110. package/dist/history/index.cjs.map +1 -1
  111. package/dist/history/index.d.cts +7 -7
  112. package/dist/history/index.d.ts +7 -7
  113. package/dist/history/index.js +5 -5
  114. package/dist/i18n/index.cjs +149 -132
  115. package/dist/i18n/index.cjs.map +1 -1
  116. package/dist/i18n/index.d.cts +6 -6
  117. package/dist/i18n/index.d.ts +6 -6
  118. package/dist/i18n/index.js +14 -14
  119. package/dist/{index-C6lgoUhK.d.cts → index-BM7O48Ur.d.cts} +47 -8
  120. package/dist/{index-C-SSRIxP.d.ts → index-BMmajblo.d.cts} +14 -0
  121. package/dist/{index-C-SSRIxP.d.cts → index-BMmajblo.d.ts} +14 -0
  122. package/dist/{index-DP1JTWHZ.d.ts → index-BelbyUwz.d.ts} +47 -8
  123. package/dist/index.cjs +799 -465
  124. package/dist/index.cjs.map +1 -1
  125. package/dist/index.d.cts +29 -16
  126. package/dist/index.d.ts +29 -16
  127. package/dist/index.js +56 -52
  128. package/dist/index.js.map +1 -1
  129. package/dist/indexing/index.cjs.map +1 -1
  130. package/dist/indexing/index.js +4 -4
  131. package/dist/issue-EPA2PSWP.js +12 -0
  132. package/dist/{ledger-GXC2YA3A.js → ledger-LS6GXCBP.js} +5 -5
  133. package/dist/materialized-views/index.cjs +257 -4
  134. package/dist/materialized-views/index.cjs.map +1 -1
  135. package/dist/materialized-views/index.d.cts +7 -7
  136. package/dist/materialized-views/index.d.ts +7 -7
  137. package/dist/materialized-views/index.js +8 -7
  138. package/dist/noydb-BVKFP74P.js +38 -0
  139. package/dist/overlay-views/index.cjs.map +1 -1
  140. package/dist/overlay-views/index.d.cts +7 -7
  141. package/dist/overlay-views/index.d.ts +7 -7
  142. package/dist/overlay-views/index.js +4 -4
  143. package/dist/periods/index.cjs.map +1 -1
  144. package/dist/periods/index.d.cts +6 -6
  145. package/dist/periods/index.d.ts +6 -6
  146. package/dist/periods/index.js +5 -5
  147. package/dist/{public-envelope-HXOFHY4N.js → public-envelope-AGU6SS4Z.js} +4 -4
  148. package/dist/query/index.cjs +296 -27
  149. package/dist/query/index.cjs.map +1 -1
  150. package/dist/query/index.d.cts +3 -3
  151. package/dist/query/index.d.ts +3 -3
  152. package/dist/query/index.js +7 -6
  153. package/dist/registry-ERNAMRDE.js +8 -0
  154. package/dist/registry-EXTHSXQW.js +8 -0
  155. package/dist/{registry-WVXO6NH5.js → registry-RDPTFXQ7.js} +3 -3
  156. package/dist/{revoke-7LCWE2AH.js → revoke-IFLXEZA5.js} +6 -6
  157. package/dist/sealed-record/index.cjs.map +1 -1
  158. package/dist/sealed-record/index.d.cts +1 -1
  159. package/dist/sealed-record/index.d.ts +1 -1
  160. package/dist/sealed-record/index.js +2 -2
  161. package/dist/session/index.cjs.map +1 -1
  162. package/dist/session/index.d.cts +7 -7
  163. package/dist/session/index.d.ts +7 -7
  164. package/dist/session/index.js +3 -3
  165. package/dist/shadow/index.cjs.map +1 -1
  166. package/dist/shadow/index.d.cts +6 -6
  167. package/dist/shadow/index.d.ts +6 -6
  168. package/dist/shadow/index.js +2 -2
  169. package/dist/{signer-HAVDLGOK.js → signer-UNWOUJAK.js} +5 -5
  170. package/dist/snapshots/index.cjs.map +1 -1
  171. package/dist/snapshots/index.d.cts +6 -6
  172. package/dist/snapshots/index.d.ts +6 -6
  173. package/dist/snapshots/index.js +4 -4
  174. package/dist/{stale-PGTEGJDI.js → stale-NTEV5SLX.js} +2 -2
  175. package/dist/{state-vault-QKQKN3H3.js → state-vault-TUTFRTOA.js} +4 -4
  176. package/dist/store/index.cjs +8 -0
  177. package/dist/store/index.cjs.map +1 -1
  178. package/dist/store/index.d.cts +13 -6
  179. package/dist/store/index.d.ts +13 -6
  180. package/dist/store/index.js +2 -2
  181. package/dist/{strategy-Diwh5lzS.d.ts → strategy-BDxQnnTX.d.ts} +315 -4
  182. package/dist/{strategy-nuyN8K5N.d.cts → strategy-C5ol6NdV.d.cts} +315 -4
  183. package/dist/sync/index.cjs.map +1 -1
  184. package/dist/sync/index.d.cts +5 -5
  185. package/dist/sync/index.d.ts +5 -5
  186. package/dist/sync/index.js +4 -4
  187. package/dist/team/index.cjs.map +1 -1
  188. package/dist/team/index.d.cts +6 -6
  189. package/dist/team/index.d.ts +6 -6
  190. package/dist/team/index.js +8 -8
  191. package/dist/{transition-guard--t3exQHF.d.cts → transition-guard-B1N82hMf.d.cts} +1 -1
  192. package/dist/{transition-guard-BlI9Oy5K.d.ts → transition-guard-C__YeF3_.d.ts} +1 -1
  193. package/dist/tx/index.cjs.map +1 -1
  194. package/dist/tx/index.d.cts +6 -6
  195. package/dist/tx/index.d.ts +6 -6
  196. package/dist/tx/index.js +3 -3
  197. package/dist/{types-Diqc2caK.d.ts → types-CraiZOyO.d.ts} +134 -292
  198. package/dist/{types-BpLPqyaO.d.cts → types-D-gr5t0G.d.cts} +134 -292
  199. package/dist/{ulid-DNiRB4Mx.d.cts → ulid-DQnSAP5W.d.cts} +1 -1
  200. package/dist/{ulid-B1zNV8r9.d.ts → ulid-FFRRHkVf.d.ts} +1 -1
  201. package/dist/util/index.cjs.map +1 -1
  202. package/dist/util/index.js +1 -1
  203. package/dist/{vault-group-DPZVFRI5.js → vault-group-27EV7KB4.js} +29 -8
  204. package/dist/vault-group-27EV7KB4.js.map +1 -0
  205. package/dist/{with-materialized-view-BdH_A_r6.d.cts → with-materialized-view-BboqxyV3.d.cts} +1 -1
  206. package/dist/{with-materialized-view-CzAgp_HJ.d.ts → with-materialized-view-CguCeVcT.d.ts} +1 -1
  207. package/dist/{with-overlayed-view-BJbqQnsR.d.ts → with-overlayed-view-DO08u_tx.d.ts} +1 -1
  208. package/dist/{with-overlayed-view-C40rDPlu.d.cts → with-overlayed-view-mmsg5Of3.d.cts} +1 -1
  209. package/dist/{with-rollup-DrlGkxiE.d.ts → with-rollup-_TyBzz3T.d.ts} +1 -1
  210. package/dist/{with-rollup-Bopu5UDZ.d.cts → with-rollup-aaxOZcIb.d.cts} +1 -1
  211. package/package.json +3 -3
  212. package/dist/chunk-647TFNYL.js.map +0 -1
  213. package/dist/chunk-C2OYWD5S.js.map +0 -1
  214. package/dist/chunk-CMISAJAE.js.map +0 -1
  215. package/dist/chunk-F2IJ2HGD.js.map +0 -1
  216. package/dist/chunk-KOURQXIU.js.map +0 -1
  217. package/dist/chunk-LGPSCKWZ.js.map +0 -1
  218. package/dist/chunk-M3H7VSRV.js +0 -139
  219. package/dist/chunk-M3H7VSRV.js.map +0 -1
  220. package/dist/chunk-TPOHMOGX.js.map +0 -1
  221. package/dist/chunk-Y5XVB75E.js.map +0 -1
  222. package/dist/executor-IZ2NVXCY.js +0 -11
  223. package/dist/executor-THSEYEJG.js +0 -8
  224. package/dist/executor-WLFDUTOM.js +0 -8
  225. package/dist/issue-R2MWQO6K.js +0 -12
  226. package/dist/noydb-RJL6FQ4B.js +0 -37
  227. package/dist/registry-3T2RZC5A.js +0 -8
  228. package/dist/registry-DMS7OKBM.js +0 -8
  229. package/dist/vault-group-DPZVFRI5.js.map +0 -1
  230. /package/dist/{chunk-6Q5XRLKG.js.map → chunk-3FSMVWBN.js.map} +0 -0
  231. /package/dist/{chunk-2U226RDC.js.map → chunk-4ULLGYPA.js.map} +0 -0
  232. /package/dist/{chunk-6FHCU3QO.js.map → chunk-5IGWRMEC.js.map} +0 -0
  233. /package/dist/{chunk-KQ523X3A.js.map → chunk-6OSOE6BY.js.map} +0 -0
  234. /package/dist/{chunk-HWK75CYX.js.map → chunk-7C6VFNIY.js.map} +0 -0
  235. /package/dist/{chunk-33DAO2XG.js.map → chunk-7HD67R6U.js.map} +0 -0
  236. /package/dist/{chunk-RQFG2YSV.js.map → chunk-B6E5IRPJ.js.map} +0 -0
  237. /package/dist/{chunk-YWYW2YNO.js.map → chunk-CYNTFU2D.js.map} +0 -0
  238. /package/dist/{chunk-KTZ2MHQK.js.map → chunk-DY3EOJEN.js.map} +0 -0
  239. /package/dist/{chunk-PGVEL5IZ.js.map → chunk-E66DSTJP.js.map} +0 -0
  240. /package/dist/{chunk-6YEC7LLO.js.map → chunk-FBLAWK6A.js.map} +0 -0
  241. /package/dist/{chunk-LQ3GD5LL.js.map → chunk-FPHRTW2Z.js.map} +0 -0
  242. /package/dist/{chunk-ZJ67TB4S.js.map → chunk-G4PYA575.js.map} +0 -0
  243. /package/dist/{chunk-45643PAU.js.map → chunk-GKQAU52M.js.map} +0 -0
  244. /package/dist/{chunk-5KKNBDCT.js.map → chunk-GYAWXHFO.js.map} +0 -0
  245. /package/dist/{chunk-6XEGHIBA.js.map → chunk-IBVTH4JR.js.map} +0 -0
  246. /package/dist/{chunk-AB7JF2KF.js.map → chunk-IVP5IVON.js.map} +0 -0
  247. /package/dist/{chunk-T4T5I5L6.js.map → chunk-KEDJDWWQ.js.map} +0 -0
  248. /package/dist/{chunk-RZWQNMMP.js.map → chunk-LSIIPKYT.js.map} +0 -0
  249. /package/dist/{chunk-FQRAYDS4.js.map → chunk-M3FPNTO2.js.map} +0 -0
  250. /package/dist/{chunk-DR5I7Q6N.js.map → chunk-MI36HL5G.js.map} +0 -0
  251. /package/dist/{chunk-Z3I2WNGF.js.map → chunk-NN6IISZO.js.map} +0 -0
  252. /package/dist/{chunk-QJKZ5WUP.js.map → chunk-OKOKPYWH.js.map} +0 -0
  253. /package/dist/{chunk-Z3BE5BRK.js.map → chunk-PTGQPWMV.js.map} +0 -0
  254. /package/dist/{chunk-QPJ7Z4L3.js.map → chunk-PWFTQHYX.js.map} +0 -0
  255. /package/dist/{chunk-K3NYRK7U.js.map → chunk-Q5MCHUXZ.js.map} +0 -0
  256. /package/dist/{chunk-IQ4GMEYZ.js.map → chunk-S22UOMHM.js.map} +0 -0
  257. /package/dist/{chunk-WZCG3EZ6.js.map → chunk-S3XA7G35.js.map} +0 -0
  258. /package/dist/{chunk-BUBJYIZ7.js.map → chunk-U7JNBSS3.js.map} +0 -0
  259. /package/dist/{chunk-TFAN3NFD.js.map → chunk-V3VIRTTE.js.map} +0 -0
  260. /package/dist/{chunk-VVDSDOVV.js.map → chunk-V5FZWQNN.js.map} +0 -0
  261. /package/dist/{chunk-P57D4KBG.js.map → chunk-VNUE6FHP.js.map} +0 -0
  262. /package/dist/{chunk-TTS3RWL5.js.map → chunk-X7FJMKT3.js.map} +0 -0
  263. /package/dist/{chunk-DKMPR76W.js.map → chunk-Y5J63SMF.js.map} +0 -0
  264. /package/dist/{chunk-HOO5I3VG.js.map → chunk-YLRRU72W.js.map} +0 -0
  265. /package/dist/{chunk-MGB67HKX.js.map → chunk-YX333DPS.js.map} +0 -0
  266. /package/dist/{chunk-4UI5T3K7.js.map → chunk-YZE6C3TQ.js.map} +0 -0
  267. /package/dist/{crypto-FNK3XPCS.js.map → crypto-B46VNH6X.js.map} +0 -0
  268. /package/dist/{delegation-FMXNUWE6.js.map → delegation-5HON72PV.js.map} +0 -0
  269. /package/dist/{executor-IZ2NVXCY.js.map → executor-44R5CUS2.js.map} +0 -0
  270. /package/dist/{executor-THSEYEJG.js.map → executor-AOACUK7Z.js.map} +0 -0
  271. /package/dist/{executor-WLFDUTOM.js.map → executor-OKFLQCDW.js.map} +0 -0
  272. /package/dist/{fanout-sidecar-JGHXAJO5.js.map → fanout-sidecar-DCQWJQ6S.js.map} +0 -0
  273. /package/dist/{issue-R2MWQO6K.js.map → issue-EPA2PSWP.js.map} +0 -0
  274. /package/dist/{ledger-GXC2YA3A.js.map → ledger-LS6GXCBP.js.map} +0 -0
  275. /package/dist/{noydb-RJL6FQ4B.js.map → noydb-BVKFP74P.js.map} +0 -0
  276. /package/dist/{public-envelope-HXOFHY4N.js.map → public-envelope-AGU6SS4Z.js.map} +0 -0
  277. /package/dist/{registry-3T2RZC5A.js.map → registry-ERNAMRDE.js.map} +0 -0
  278. /package/dist/{registry-DMS7OKBM.js.map → registry-EXTHSXQW.js.map} +0 -0
  279. /package/dist/{registry-WVXO6NH5.js.map → registry-RDPTFXQ7.js.map} +0 -0
  280. /package/dist/{revoke-7LCWE2AH.js.map → revoke-IFLXEZA5.js.map} +0 -0
  281. /package/dist/{signer-HAVDLGOK.js.map → signer-UNWOUJAK.js.map} +0 -0
  282. /package/dist/{stale-PGTEGJDI.js.map → stale-NTEV5SLX.js.map} +0 -0
  283. /package/dist/{state-vault-QKQKN3H3.js.map → state-vault-TUTFRTOA.js.map} +0 -0
@@ -7,10 +7,10 @@ import {
7
7
  import {
8
8
  TxContext,
9
9
  revertExecuted
10
- } from "./chunk-TFAN3NFD.js";
10
+ } from "./chunk-V3VIRTTE.js";
11
11
  import {
12
12
  OverlayedCollection
13
- } from "./chunk-TTS3RWL5.js";
13
+ } from "./chunk-X7FJMKT3.js";
14
14
  import {
15
15
  NO_AGGREGATE,
16
16
  Query,
@@ -20,36 +20,36 @@ import {
20
20
  decodeMoneyFields,
21
21
  quantizeMoneyFields,
22
22
  validateMoneyFieldPaths
23
- } from "./chunk-647TFNYL.js";
23
+ } from "./chunk-3Q2AOPLT.js";
24
24
  import {
25
25
  EXPORT_AUDIT_COLLECTION,
26
26
  createExportBlobsHandle,
27
27
  runCompaction
28
- } from "./chunk-BUBJYIZ7.js";
28
+ } from "./chunk-U7JNBSS3.js";
29
29
  import {
30
30
  LazyQuery,
31
31
  decodeIdxId,
32
32
  encodeIdxId
33
- } from "./chunk-RQFG2YSV.js";
33
+ } from "./chunk-B6E5IRPJ.js";
34
34
  import {
35
35
  canonicalGroupKey
36
- } from "./chunk-32XVU2LT.js";
36
+ } from "./chunk-OBMYMKGO.js";
37
37
  import {
38
38
  readPath
39
- } from "./chunk-RZWQNMMP.js";
39
+ } from "./chunk-LSIIPKYT.js";
40
40
  import {
41
41
  SCHEMAS_COLLECTION,
42
42
  loadPersistedSchema,
43
43
  resolveManagedSecret,
44
44
  savePersistedSchema,
45
45
  saveSealedPassphrase
46
- } from "./chunk-P57D4KBG.js";
46
+ } from "./chunk-VNUE6FHP.js";
47
47
  import {
48
48
  loadPublicEnvelope,
49
49
  readPublicEnvelope,
50
50
  savePublicEnvelope,
51
51
  validatePublicEnvelopeInput
52
- } from "./chunk-PGVEL5IZ.js";
52
+ } from "./chunk-E66DSTJP.js";
53
53
  import {
54
54
  buildTombstone,
55
55
  isTombstone,
@@ -58,17 +58,19 @@ import {
58
58
  rewrapBodyToDek,
59
59
  rotateRecordCek,
60
60
  sealRecordToHost
61
- } from "./chunk-45643PAU.js";
61
+ } from "./chunk-GKQAU52M.js";
62
62
  import {
63
63
  PERIODS_COLLECTION
64
- } from "./chunk-4UI5T3K7.js";
64
+ } from "./chunk-YZE6C3TQ.js";
65
65
  import {
66
- getAtPath,
67
66
  isDictCollectionName,
68
- isStaticDictDescriptor,
67
+ isStaticDictDescriptor
68
+ } from "./chunk-H42KZXNV.js";
69
+ import {
70
+ getAtPath,
69
71
  resolvePolicy,
70
72
  setAtPathInPlace
71
- } from "./chunk-KOURQXIU.js";
73
+ } from "./chunk-VEIVAYJ7.js";
72
74
  import {
73
75
  ManagedRecoveryNotEnrolledError,
74
76
  PolicyDeniedError,
@@ -90,11 +92,11 @@ import {
90
92
  saveShamirRecoveryEntries,
91
93
  updateAuthenticator,
92
94
  writeMagicLinkGrant
93
- } from "./chunk-IQ4GMEYZ.js";
95
+ } from "./chunk-S22UOMHM.js";
94
96
  import {
95
97
  assertTierAccess,
96
98
  dekKey
97
- } from "./chunk-6YEC7LLO.js";
99
+ } from "./chunk-FBLAWK6A.js";
98
100
  import {
99
101
  USER_ENVELOPE_COLLECTION,
100
102
  assertKeyringOpenAllowed,
@@ -119,7 +121,7 @@ import {
119
121
  rotateKeys,
120
122
  saveUserEnvelope,
121
123
  updateKeyringIdentity
122
- } from "./chunk-FQRAYDS4.js";
124
+ } from "./chunk-M3FPNTO2.js";
123
125
  import {
124
126
  INDEXED_STORE_POLICY
125
127
  } from "./chunk-2QR2PQTT.js";
@@ -129,7 +131,7 @@ import {
129
131
  import {
130
132
  LEDGER_COLLECTION,
131
133
  LEDGER_DELTAS_COLLECTION
132
- } from "./chunk-MGB67HKX.js";
134
+ } from "./chunk-YX333DPS.js";
133
135
  import {
134
136
  sha256Hex as sha256Hex2
135
137
  } from "./chunk-PDVP3C2I.js";
@@ -141,11 +143,11 @@ import {
141
143
  readDottedPath,
142
144
  rebuildSubjectIndex,
143
145
  removeSubjectRef
144
- } from "./chunk-C2OYWD5S.js";
146
+ } from "./chunk-KNKNOJFS.js";
145
147
  import {
146
148
  NOYDB_BACKUP_VERSION,
147
149
  NOYDB_FORMAT_VERSION
148
- } from "./chunk-LGPSCKWZ.js";
150
+ } from "./chunk-SHIUFIPW.js";
149
151
  import {
150
152
  decrypt,
151
153
  encrypt,
@@ -153,7 +155,7 @@ import {
153
155
  sha256Hex,
154
156
  unwrapCek,
155
157
  wrapCek
156
- } from "./chunk-QJKZ5WUP.js";
158
+ } from "./chunk-OKOKPYWH.js";
157
159
  import {
158
160
  AlreadyElevatedError,
159
161
  AttestationError,
@@ -192,7 +194,7 @@ import {
192
194
  UnsupportedIndexOptionError,
193
195
  ValidationError,
194
196
  VaultTemplateNotFoundError
195
- } from "./chunk-HMFC6M2G.js";
197
+ } from "./chunk-DJF3FXW5.js";
196
198
 
197
199
  // src/policy/storage.ts
198
200
  var META_COLLECTION = "_meta";
@@ -507,6 +509,74 @@ var DISABLED_STATE = {
507
509
  getPersistedIndexes: () => null
508
510
  };
509
511
 
512
+ // src/search/tokenize.ts
513
+ var WORD = /[\p{L}\p{N}]+/gu;
514
+ var tokenize = (text) => {
515
+ if (!text) return [];
516
+ return text.normalize("NFKC").toLowerCase().match(WORD) ?? [];
517
+ };
518
+
519
+ // src/search/scan.ts
520
+ var K1 = 1.2;
521
+ var B = 0.75;
522
+ function fieldText(record, field) {
523
+ const v = record[field];
524
+ if (typeof v === "string") return v;
525
+ if (v === null || v === void 0) return "";
526
+ if (typeof v === "number" || typeof v === "boolean") return String(v);
527
+ return "";
528
+ }
529
+ function searchScan(entries, field, query, opts = {}, tokenizer = tokenize) {
530
+ const queryTerms = tokenizer(query);
531
+ if (queryTerms.length === 0) return [];
532
+ const match = opts.match ?? "any";
533
+ const usePrefix = opts.prefix ?? false;
534
+ const exactTerms = usePrefix ? queryTerms.slice(0, -1) : queryTerms;
535
+ const prefixTerm = usePrefix ? queryTerms[queryTerms.length - 1] : void 0;
536
+ const docs = entries.map((e) => ({ id: e.id, record: e.record, terms: tokenizer(fieldText(e.record, field)) }));
537
+ const N = docs.length || 1;
538
+ const df = /* @__PURE__ */ new Map();
539
+ let totalLen = 0;
540
+ for (const d of docs) {
541
+ totalLen += d.terms.length;
542
+ for (const t of new Set(d.terms)) df.set(t, (df.get(t) ?? 0) + 1);
543
+ }
544
+ const avgdl = totalLen / N || 1;
545
+ let prefixDf = 0;
546
+ if (prefixTerm !== void 0) {
547
+ for (const d of docs) {
548
+ if (d.terms.some((t) => t.startsWith(prefixTerm))) prefixDf++;
549
+ }
550
+ }
551
+ const requiredCount = exactTerms.length + (prefixTerm !== void 0 ? 1 : 0);
552
+ const results = [];
553
+ for (const d of docs) {
554
+ const tf = /* @__PURE__ */ new Map();
555
+ for (const t of d.terms) tf.set(t, (tf.get(t) ?? 0) + 1);
556
+ const matched = [];
557
+ for (const qt of exactTerms) {
558
+ const c = tf.get(qt) ?? 0;
559
+ if (c > 0) matched.push({ tf: c, df: df.get(qt) ?? 0 });
560
+ }
561
+ if (prefixTerm !== void 0) {
562
+ let ptf = 0;
563
+ for (const [t, c] of tf) if (t.startsWith(prefixTerm)) ptf += c;
564
+ if (ptf > 0) matched.push({ tf: ptf, df: prefixDf });
565
+ }
566
+ if (matched.length === 0) continue;
567
+ if (match === "all" && matched.length < requiredCount) continue;
568
+ let score = 0;
569
+ for (const m of matched) {
570
+ const idf = Math.log(1 + (N - m.df + 0.5) / (m.df + 0.5));
571
+ const denom = m.tf + K1 * (1 - B + B * (d.terms.length / avgdl));
572
+ score += idf * (m.tf * (K1 + 1) / (denom || 1));
573
+ }
574
+ results.push({ id: d.id, score, record: d.record });
575
+ }
576
+ results.sort((a, b) => b.score - a.score);
577
+ return opts.limit !== void 0 ? results.slice(0, opts.limit) : results;
578
+ }
579
+
510
580
  // src/indexing/unique-constraints.ts
511
581
  var UniqueConstraintSet = class {
512
582
  constructor(collectionName, uniqueDefs) {
@@ -838,7 +908,7 @@ async function resolveStaleOnRead(accessor, outputCollection, id) {
838
908
  }
839
909
  const sourceWithId = { ...source, id };
840
910
  if (DerivationExecutor === null) {
841
- ({ DerivationExecutor } = await import("./executor-WLFDUTOM.js"));
911
+ ({ DerivationExecutor } = await import("./executor-OKFLQCDW.js"));
842
912
  }
843
913
  const ctx = { vault: accessor.getReadOnlyFacade() };
844
914
  const result = await DerivationExecutor.run(spec, sourceWithId, 0, strategyHash, ctx);
@@ -1383,7 +1453,7 @@ var Collection = class {
1383
1453
  }
1384
1454
  }
1385
1455
  if (this.materializedViewSource !== void 0) {
1386
- const { resolveStaleMVOnRead } = await import("./stale-PGTEGJDI.js");
1456
+ const { resolveStaleMVOnRead } = await import("./stale-NTEV5SLX.js");
1387
1457
  await resolveStaleMVOnRead(this.materializedViewSource, this.name);
1388
1458
  }
1389
1459
  let record;
@@ -1793,7 +1863,7 @@ var Collection = class {
1793
1863
  if (mode === "eager") {
1794
1864
  if (executor === null) {
1795
1865
  ;
1796
- ({ MaterializedViewExecutor: executor } = await import("./executor-IZ2NVXCY.js"));
1866
+ ({ MaterializedViewExecutor: executor } = await import("./executor-44R5CUS2.js"));
1797
1867
  }
1798
1868
  await executor.refresh(reg, {
1799
1869
  getCollection: (name) => this.materializedViewSource.getCollection(name),
@@ -1802,7 +1872,7 @@ var Collection = class {
1802
1872
  });
1803
1873
  } else if (mode === "lazy") {
1804
1874
  if (staleHelpers === null) {
1805
- staleHelpers = await import("./stale-PGTEGJDI.js");
1875
+ staleHelpers = await import("./stale-NTEV5SLX.js");
1806
1876
  }
1807
1877
  staleHelpers.markMVStale(registry, reg.spec.name);
1808
1878
  }
@@ -1976,7 +2046,7 @@ var Collection = class {
1976
2046
  continue;
1977
2047
  }
1978
2048
  if (DerivationExecutor === null) {
1979
- ({ DerivationExecutor } = await import("./executor-WLFDUTOM.js"));
2049
+ ({ DerivationExecutor } = await import("./executor-OKFLQCDW.js"));
1980
2050
  }
1981
2051
  for (const run of runs) {
1982
2052
  const ctx = { vault: this.derivationSource.getReadOnlyFacade() };
@@ -1995,7 +2065,7 @@ var Collection = class {
1995
2065
  const outputCollection = this.derivationSource.getCollection(outSpec.collection);
1996
2066
  const txCtx = this.derivationSource.getActiveTxContext();
1997
2067
  if (out.kind === "array") {
1998
- const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-JGHXAJO5.js");
2068
+ const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-DCQWJQ6S.js");
1999
2069
  const prior = await loadFanoutSidecar(
2000
2070
  this.adapter,
2001
2071
  this.vault,
@@ -2358,7 +2428,7 @@ var Collection = class {
2358
2428
  for (const [outputKey, outSpec] of Object.entries(spec.outputs)) {
2359
2429
  if (outSpec.shape !== "array") continue;
2360
2430
  if (helpers === null) {
2361
- helpers = await import("./fanout-sidecar-JGHXAJO5.js");
2431
+ helpers = await import("./fanout-sidecar-DCQWJQ6S.js");
2362
2432
  }
2363
2433
  const sidecar = await helpers.loadFanoutSidecar(
2364
2434
  this.adapter,
@@ -2398,7 +2468,7 @@ var Collection = class {
2398
2468
  if (mode === "eager") {
2399
2469
  if (executor === null) {
2400
2470
  ;
2401
- ({ MaterializedViewExecutor: executor } = await import("./executor-IZ2NVXCY.js"));
2471
+ ({ MaterializedViewExecutor: executor } = await import("./executor-44R5CUS2.js"));
2402
2472
  }
2403
2473
  await executor.refresh(reg, {
2404
2474
  getCollection: (name) => this.materializedViewSource.getCollection(name),
@@ -2407,7 +2477,7 @@ var Collection = class {
2407
2477
  });
2408
2478
  } else if (mode === "lazy") {
2409
2479
  if (staleHelpers === null) {
2410
- staleHelpers = await import("./stale-PGTEGJDI.js");
2480
+ staleHelpers = await import("./stale-NTEV5SLX.js");
2411
2481
  }
2412
2482
  staleHelpers.markMVStale(registry, reg.spec.name);
2413
2483
  }
@@ -2430,7 +2500,7 @@ var Collection = class {
2430
2500
  );
2431
2501
  }
2432
2502
  if (this.materializedViewSource !== void 0) {
2433
- const { resolveStaleMVOnRead } = await import("./stale-PGTEGJDI.js");
2503
+ const { resolveStaleMVOnRead } = await import("./stale-NTEV5SLX.js");
2434
2504
  await resolveStaleMVOnRead(this.materializedViewSource, this.name);
2435
2505
  }
2436
2506
  await this.ensureHydrated();
@@ -2446,6 +2516,29 @@ var Collection = class {
2446
2516
  hasReadTransforms() {
2447
2517
  return this.moneyFields !== void 0 && Object.keys(this.moneyFields).length > 0 || this.i18nFields !== void 0 && Object.keys(this.i18nFields).length > 0 || this.dictKeyFields !== void 0 && Object.keys(this.dictKeyFields).length > 0;
2448
2518
  }
2519
+ /**
2520
+ * Scan-mode full-text search over a plain-text `field` (#308). Decrypts the
2521
+ * collection in memory and ranks records by BM25 against the tokenized query.
2522
+ * **Zero added store leakage** — pure client-side scan; nothing searchable is
2523
+ * written to the store. (A store-usable blind index for at-scale search is a
2524
+ * separate, gated opt-in — see the #308 design note.) Eager mode only.
2525
+ *
2526
+ * `opts.match` (`'any'` default | `'all'`), `opts.prefix` (last query term as
2527
+ * a prefix → typeahead), `opts.limit` (top-N). Returns `{ id, score, record }`
2528
+ * ranked by descending score. The default tokenizer is word-boundary based —
2529
+ * see `src/search/tokenize.ts` for the Thai/CJK caveat.
2530
+ */
2531
+ async search(field, query, opts = {}) {
2532
+ if (this.lazy) {
2533
+ throw new Error(
2534
+ `Collection "${this.name}": search() (scan mode) requires eager mode (prefetch: true). A store-usable blind index for lazy / at-scale search is a separate gated opt-in (#308).`
2535
+ );
2536
+ }
2537
+ await this.ensureHydrated();
2538
+ const entries = [];
2539
+ for (const [id, e] of this.cache) entries.push({ id, record: e.record });
2540
+ return searchScan(entries, field, query, opts);
2541
+ }
2449
2542
  // ─── Bulk operations ─────────────────────────────────────
2450
2543
  /**
2451
2544
  * Put many records in one call. Each item is processed sequentially
@@ -2623,6 +2716,10 @@ var Collection = class {
2623
2716
  leftCollection,
2624
2717
  resolveRef: (field) => resolver.resolveRef(leftCollection, field),
2625
2718
  resolveSource: (collectionName) => resolver.resolveSource(collectionName),
2719
+ // #285 §3 — flow the vault/collection default locale to joins so a
2720
+ // joined i18n field resolves like get()/list() when no per-call
2721
+ // locale is given; toArray({ locale }) overrides it.
2722
+ ...this.defaultLocale !== void 0 ? { defaultLocale: this.defaultLocale } : {},
2626
2723
  ...resolver.resolveDictSource ? { resolveDictSource: (field) => resolver.resolveDictSource(leftCollection, field) } : {}
2627
2724
  } : void 0;
2628
2725
  return new Query(source, void 0, joinContext, this.aggregateStrategy);
@@ -2711,7 +2808,10 @@ var Collection = class {
2711
2808
  };
2712
2809
  this.emitter.on("change", handler);
2713
2810
  return () => this.emitter.off("change", handler);
2714
- }
2811
+ },
2812
+ // #285 §3 — expose this (right-side) collection's i18nText descriptors so
2813
+ // the join executor can resolve joined i18n fields at the `join` layer.
2814
+ ...this.i18nFields !== void 0 ? { i18nFields: this.i18nFields } : {}
2715
2815
  };
2716
2816
  }
2717
2817
  /**
@@ -2944,6 +3044,10 @@ var Collection = class {
2944
3044
  leftCollection,
2945
3045
  resolveRef: (field) => resolver.resolveRef(leftCollection, field),
2946
3046
  resolveSource: (collectionName) => resolver.resolveSource(collectionName),
3047
+ // #285 §3 — flow the vault/collection default locale to joins so a
3048
+ // joined i18n field resolves like get()/list() when no per-call
3049
+ // locale is given; toArray({ locale }) overrides it.
3050
+ ...this.defaultLocale !== void 0 ? { defaultLocale: this.defaultLocale } : {},
2947
3051
  ...resolver.resolveDictSource ? { resolveDictSource: (field) => resolver.resolveDictSource(leftCollection, field) } : {}
2948
3052
  } : void 0;
2949
3053
  return new ScanBuilder(
@@ -3501,6 +3605,34 @@ var Collection = class {
3501
3605
  }
3502
3606
  }
3503
3607
  }
3608
+ /**
3609
+ * @internal — hard-delete this record's persisted `_idx/<field>/<recordId>`
3610
+ * side-cars for the erasure path (#401). `forget()` crypto-shreds the body but
3611
+ * keeps the collection DEK, under which these side-cars are encrypted — so
3612
+ * without this they leave the indexed field VALUES readable after a "forget".
3613
+ *
3614
+ * Content-free: the side-car id is `encodeIdxId(def.key, id)`, so it needs no
3615
+ * body decode (the body is being shredded). Eager mode has no durable side-car
3616
+ * → no-op. The in-memory mirror is left as-is: it is ephemeral (rebuilt from
3617
+ * the now-deleted side-cars on reopen) and live reads skip the tombstone, so a
3618
+ * stale mirror hit cannot surface the erased record. Returns the count deleted
3619
+ * + the `def.key`s whose delete FAILED (residue that still leaks the value).
3620
+ */
3621
+ async _purgePersistedIndexes(id) {
3622
+ const persisted = this.persistedIndexes;
3623
+ if (!persisted) return { purged: 0, residue: [] };
3624
+ let purged = 0;
3625
+ const residue = [];
3626
+ for (const def of persisted.definitions()) {
3627
+ try {
3628
+ await this.adapter.delete(this.vault, this.name, encodeIdxId(def.key, id));
3629
+ purged++;
3630
+ } catch {
3631
+ residue.push(def.key);
3632
+ }
3633
+ }
3634
+ return { purged, residue };
3635
+ }
3504
3636
  /**
3505
3637
  * Bulk-load the persisted-index mirror from `_idx/<field>/*` side-cars
3506
3638
  * on first lazy-mode query. Idempotent — subsequent calls short-circuit
@@ -6953,12 +7085,12 @@ var Vault = class {
6953
7085
  if (!fieldSchema) {
6954
7086
  throw new AttestationError(`issueAttestation: collection '${collectionName}' has no attestation field-schema. Declare it via vault.collection('${collectionName}', { attestation: { fields: [...] } }).`);
6955
7087
  }
6956
- const { issueAttestationCore } = await import("./issue-R2MWQO6K.js");
7088
+ const { issueAttestationCore } = await import("./issue-EPA2PSWP.js");
6957
7089
  const out = await issueAttestationCore(this.makeIssueContext(), { collection: collectionName, id, fieldSchema });
6958
7090
  return { docId: out.docId, qr: out.qr, keyId: out.keyId, publicKeyB64: out.publicKeyB64 };
6959
7091
  }
6960
7092
  async getDocumentSigningPublicKey() {
6961
- const { loadSigner, loadOrCreateSigner } = await import("./signer-HAVDLGOK.js");
7093
+ const { loadSigner, loadOrCreateSigner } = await import("./signer-UNWOUJAK.js");
6962
7094
  const existing = await loadSigner(this.adapter, this.name, this.getDEK);
6963
7095
  if (existing) return { keyId: existing.keyId, publicKeyB64: existing.publicKeyB64 };
6964
7096
  if (this.keyring.role !== "owner") {
@@ -6984,19 +7116,19 @@ var Vault = class {
6984
7116
  };
6985
7117
  }
6986
7118
  async revokeAttestation(docId) {
6987
- const { revokeDocCore } = await import("./revoke-7LCWE2AH.js");
7119
+ const { revokeDocCore } = await import("./revoke-IFLXEZA5.js");
6988
7120
  await revokeDocCore(this.makeRevokeContext(), docId);
6989
7121
  }
6990
7122
  async unrevokeAttestation(docId) {
6991
- const { unrevokeDocCore } = await import("./revoke-7LCWE2AH.js");
7123
+ const { unrevokeDocCore } = await import("./revoke-IFLXEZA5.js");
6992
7124
  await unrevokeDocCore(this.makeRevokeContext(), docId);
6993
7125
  }
6994
7126
  async getRevokedDocIds() {
6995
- const { getRevokedDocIdsCore } = await import("./revoke-7LCWE2AH.js");
7127
+ const { getRevokedDocIdsCore } = await import("./revoke-IFLXEZA5.js");
6996
7128
  return getRevokedDocIdsCore(this.makeRevokeContext());
6997
7129
  }
6998
7130
  async publishRevocationList() {
6999
- const { publishRevocationListCore } = await import("./revoke-7LCWE2AH.js");
7131
+ const { publishRevocationListCore } = await import("./revoke-IFLXEZA5.js");
7000
7132
  return publishRevocationListCore(this.makeRevokeContext());
7001
7133
  }
7002
7134
  makeRevokeContext() {
@@ -7455,6 +7587,8 @@ var Vault = class {
7455
7587
  const blobResidueCollections = /* @__PURE__ */ new Set();
7456
7588
  let blobsShredded = 0;
7457
7589
  let blobsRetainedShared = 0;
7590
+ let indexPostingsPurged = 0;
7591
+ const indexResidue = [];
7458
7592
  const blobsEnabled = this.blobStrategy !== void 0;
7459
7593
  const actor = this.keyring.userId;
7460
7594
  for (const ref2 of refs) {
@@ -7476,6 +7610,9 @@ var Vault = class {
7476
7610
  ref2.id,
7477
7611
  actor
7478
7612
  );
7613
+ const idxPurge = await coll._purgePersistedIndexes(ref2.id);
7614
+ indexPostingsPurged += idxPurge.purged;
7615
+ for (const field of idxPurge.residue) indexResidue.push(`${ref2.collection}:${ref2.id}:${field}`);
7479
7616
  if (blobsEnabled) {
7480
7617
  const r = await this.collection(ref2.collection).blob(ref2.id).shredAllForRecord();
7481
7618
  blobsShredded += r.shredded.length;
@@ -7511,7 +7648,9 @@ var Vault = class {
7511
7648
  unmigratedCount: unmigratedRecords.length,
7512
7649
  blobsShredded,
7513
7650
  blobsRetainedShared,
7514
- blobResidueCollections: [...blobResidueCollections]
7651
+ blobResidueCollections: [...blobResidueCollections],
7652
+ indexPostingsPurged,
7653
+ indexResidueCount: indexResidue.length
7515
7654
  })
7516
7655
  });
7517
7656
  return {
@@ -7523,6 +7662,8 @@ var Vault = class {
7523
7662
  blobsShredded,
7524
7663
  blobsRetainedShared,
7525
7664
  blobResidueCollections: [...blobResidueCollections],
7665
+ indexPostingsPurged,
7666
+ indexResidue,
7526
7667
  ledgerEntry
7527
7668
  };
7528
7669
  }
@@ -7646,7 +7787,7 @@ var Vault = class {
7646
7787
  async _initDerivations(handles) {
7647
7788
  if (handles.length === 0) return;
7648
7789
  const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
7649
- import("./registry-DMS7OKBM.js"),
7790
+ import("./registry-ERNAMRDE.js"),
7650
7791
  import("./read-only-facade-EX6WZZBP.js")
7651
7792
  ]);
7652
7793
  const registry = new DerivationRegistry();
@@ -7677,7 +7818,7 @@ var Vault = class {
7677
7818
  */
7678
7819
  async _initMaterializedViews(handles) {
7679
7820
  if (handles.length === 0) return;
7680
- const { MaterializedViewRegistry } = await import("./registry-WVXO6NH5.js");
7821
+ const { MaterializedViewRegistry } = await import("./registry-RDPTFXQ7.js");
7681
7822
  const registry = new MaterializedViewRegistry();
7682
7823
  this.materializedViewRegistry = registry;
7683
7824
  const db = this;
@@ -7701,7 +7842,7 @@ var Vault = class {
7701
7842
  */
7702
7843
  async _initOverlayedViews(handles) {
7703
7844
  if (handles.length === 0) return;
7704
- const { OverlayedViewRegistry } = await import("./registry-3T2RZC5A.js");
7845
+ const { OverlayedViewRegistry } = await import("./registry-EXTHSXQW.js");
7705
7846
  const registry = new OverlayedViewRegistry();
7706
7847
  const mvRegistry = this.materializedViewRegistry;
7707
7848
  const overlayNames = /* @__PURE__ */ new Set();
@@ -7748,13 +7889,13 @@ var Vault = class {
7748
7889
  if (!reg) {
7749
7890
  throw new Error(`refreshView: no MV registered with name "${name}"`);
7750
7891
  }
7751
- const { MaterializedViewExecutor } = await import("./executor-IZ2NVXCY.js");
7892
+ const { MaterializedViewExecutor } = await import("./executor-44R5CUS2.js");
7752
7893
  const result = await MaterializedViewExecutor.refresh(reg, {
7753
7894
  getCollection: (n) => this.collection(n),
7754
7895
  getActiveTxContext: () => this.noydb._activeTxContextOrNull,
7755
7896
  getQueryContext: () => this
7756
7897
  });
7757
- const { clearMVStale } = await import("./stale-PGTEGJDI.js");
7898
+ const { clearMVStale } = await import("./stale-NTEV5SLX.js");
7758
7899
  clearMVStale(registry, name);
7759
7900
  return result;
7760
7901
  }
@@ -7770,7 +7911,7 @@ var Vault = class {
7770
7911
  if (registry === null) return { derived: 0, failed: 0 };
7771
7912
  const strategies = registry.strategiesForSource(sourceCollection);
7772
7913
  if (strategies.length === 0) return { derived: 0, failed: 0 };
7773
- const { DerivationExecutor } = await import("./executor-WLFDUTOM.js");
7914
+ const { DerivationExecutor } = await import("./executor-OKFLQCDW.js");
7774
7915
  const sourceColl = this.collection(sourceCollection);
7775
7916
  const records = await sourceColl.list();
7776
7917
  const ctx = { vault: this.derivationFacade ?? new (await import("./read-only-facade-EX6WZZBP.js")).ReadOnlyVaultFacade(this, "derivation") };
@@ -7795,7 +7936,7 @@ var Vault = class {
7795
7936
  if (!outSpec) continue;
7796
7937
  const outputColl = this.collection(outSpec.collection);
7797
7938
  if (out.kind === "array") {
7798
- const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-JGHXAJO5.js");
7939
+ const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-DCQWJQ6S.js");
7799
7940
  const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key);
7800
7941
  const prevKeys = new Set(prior?.keys ?? []);
7801
7942
  const newKeysList = out.entries.map((e) => e.key);
@@ -8017,7 +8158,7 @@ var Vault = class {
8017
8158
  * collection.
8018
8159
  */
8019
8160
  async delegate(opts) {
8020
- const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-FMXNUWE6.js");
8161
+ const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-5HON72PV.js");
8021
8162
  if (!this.keyring.kek) {
8022
8163
  throw new ValidationError(
8023
8164
  "issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (passphrase) first."
@@ -8039,7 +8180,7 @@ var Vault = class {
8039
8180
  * if the id does not exist.
8040
8181
  */
8041
8182
  async revokeDelegation(id) {
8042
- const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-FMXNUWE6.js");
8183
+ const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-5HON72PV.js");
8043
8184
  await revokeDelegation(this.adapter, this.name, id);
8044
8185
  void DELEGATIONS_COLLECTION;
8045
8186
  }
@@ -8508,7 +8649,7 @@ var Vault = class {
8508
8649
  * @see docs/subsystems/public-envelope.md
8509
8650
  */
8510
8651
  async getPublicEnvelope(opts = {}) {
8511
- const { readPublicEnvelope: readPublicEnvelope2 } = await import("./public-envelope-HXOFHY4N.js");
8652
+ const { readPublicEnvelope: readPublicEnvelope2 } = await import("./public-envelope-AGU6SS4Z.js");
8512
8653
  return readPublicEnvelope2(this.adapter, this.name, opts);
8513
8654
  }
8514
8655
  /**
@@ -8785,6 +8926,8 @@ var Vault = class {
8785
8926
  */
8786
8927
  async *exportStream(opts = {}) {
8787
8928
  const granularity = opts.granularity ?? "collection";
8929
+ const exportLocale = opts.resolveLabels;
8930
+ const localeOpts = exportLocale !== void 0 ? { locale: exportLocale, _layer: "export" } : void 0;
8788
8931
  const snapshot = await this.adapter.loadAll(this.name);
8789
8932
  const collectionNames = Object.keys(snapshot).sort();
8790
8933
  const ledgerHead = opts.withLedgerHead ? await (async () => {
@@ -8794,19 +8937,21 @@ var Vault = class {
8794
8937
  return head ? { hash: head.hash, index: head.entry.index, ts: head.entry.ts } : void 0;
8795
8938
  })() : void 0;
8796
8939
  const dictSnapshotCache = /* @__PURE__ */ new Map();
8797
- for (const collectionName of collectionNames) {
8798
- const dictFields = this.dictKeyFieldRegistry.get(collectionName);
8799
- if (dictFields && Object.keys(dictFields).length > 0) {
8800
- const snap = {};
8801
- for (const [fieldName, dictName] of Object.entries(dictFields)) {
8802
- const entries = await this.dictionary(dictName).list();
8803
- const keyMap = {};
8804
- for (const entry of entries) {
8805
- keyMap[entry.key] = entry.labels;
8940
+ if (exportLocale === void 0) {
8941
+ for (const collectionName of collectionNames) {
8942
+ const dictFields = this.dictKeyFieldRegistry.get(collectionName);
8943
+ if (dictFields && Object.keys(dictFields).length > 0) {
8944
+ const snap = {};
8945
+ for (const [fieldName, dictName] of Object.entries(dictFields)) {
8946
+ const entries = await this.dictionary(dictName).list();
8947
+ const keyMap = {};
8948
+ for (const entry of entries) {
8949
+ keyMap[entry.key] = entry.labels;
8950
+ }
8951
+ snap[fieldName] = keyMap;
8806
8952
  }
8807
- snap[fieldName] = keyMap;
8953
+ dictSnapshotCache.set(collectionName, snap);
8808
8954
  }
8809
- dictSnapshotCache.set(collectionName, snap);
8810
8955
  }
8811
8956
  }
8812
8957
  for (const collectionName of collectionNames) {
@@ -8819,7 +8964,7 @@ var Vault = class {
8819
8964
  if (granularity === "collection") {
8820
8965
  const records = [];
8821
8966
  for (const id of ids) {
8822
- const record = await coll.get(id);
8967
+ const record = await coll.get(id, localeOpts);
8823
8968
  if (record !== null) records.push(record);
8824
8969
  }
8825
8970
  const chunk = {
@@ -8833,7 +8978,7 @@ var Vault = class {
8833
8978
  yield chunk;
8834
8979
  } else {
8835
8980
  for (const id of ids) {
8836
- const record = await coll.get(id);
8981
+ const record = await coll.get(id, localeOpts);
8837
8982
  if (record === null) continue;
8838
8983
  const chunk = {
8839
8984
  collection: collectionName,
@@ -8937,7 +9082,10 @@ var Vault = class {
8937
9082
  const allDictionaries = {};
8938
9083
  for await (const chunk of this.exportStream({
8939
9084
  granularity: "collection",
8940
- withLedgerHead: opts.withLedgerHead === true
9085
+ withLedgerHead: opts.withLedgerHead === true,
9086
+ // #285 export layer: thread the export locale so records are read at the
9087
+ // `export` layer (i18nText collapsed + dictKey/staticDict labels resolved).
9088
+ ...opts.resolveLabels !== void 0 ? { resolveLabels: opts.resolveLabels } : {}
8941
9089
  })) {
8942
9090
  collections[chunk.collection] = {
8943
9091
  schema: null,
@@ -10173,7 +10321,7 @@ var Noydb = class {
10173
10321
  if (!facade) return;
10174
10322
  const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
10175
10323
  await registry.runChecks(e.collection, incoming, ctx);
10176
- const { GuardExecutor } = await import("./executor-THSEYEJG.js");
10324
+ const { GuardExecutor } = await import("./executor-AOACUK7Z.js");
10177
10325
  for (const g of guards) {
10178
10326
  await GuardExecutor.checkFrozenFields(g, e.docId, existing, incoming, e.computedFieldNames);
10179
10327
  }
@@ -10774,8 +10922,8 @@ var Noydb = class {
10774
10922
  if (name === STATE_VAULT_NAME) throw new ReservedVaultNameError(name);
10775
10923
  const template = this.vaultTemplates.get(opts.sharding.vaultTemplate);
10776
10924
  if (!template) throw new VaultTemplateNotFoundError(opts.sharding.vaultTemplate);
10777
- const { VaultGroup } = await import("./vault-group-DPZVFRI5.js");
10778
- const { StateManagementVault } = await import("./state-vault-QKQKN3H3.js");
10925
+ const { VaultGroup } = await import("./vault-group-27EV7KB4.js");
10926
+ const { StateManagementVault } = await import("./state-vault-TUTFRTOA.js");
10779
10927
  const stateVault = opts.registry ? void 0 : await StateManagementVault.open(this);
10780
10928
  const registry = opts.registry ?? stateVault.registry;
10781
10929
  const group = new VaultGroup(this, name, registry, opts.sharding, template, opts.migrateOnOpen ?? false);
@@ -10802,7 +10950,7 @@ var Noydb = class {
10802
10950
  */
10803
10951
  async openStateManagementVault() {
10804
10952
  if (this.closed) throw new ValidationError("Instance is closed");
10805
- const { StateManagementVault } = await import("./state-vault-QKQKN3H3.js");
10953
+ const { StateManagementVault } = await import("./state-vault-TUTFRTOA.js");
10806
10954
  return StateManagementVault.open(this);
10807
10955
  }
10808
10956
  /**
@@ -10812,6 +10960,16 @@ var Noydb = class {
10812
10960
  async _shardVaultProvisioned(vaultId) {
10813
10961
  return (await this.options.store.list(vaultId, "_keyring")).length > 0;
10814
10962
  }
10963
+ /**
10964
+ * @internal — the physical backend store a vault id maps to. A
10965
+ * `routeStore` resolves the vault-prefix route via its `resolveBackend`;
10966
+ * a plain store is its own backend. Used by the federation data-residency
10967
+ * guard to read the placement backend's `capabilities.region` (#271).
10968
+ */
10969
+ _resolveBackend(vaultId) {
10970
+ const store = this.options.store;
10971
+ return store.resolveBackend ? store.resolveBackend(vaultId) : this.options.store;
10972
+ }
10815
10973
  /**
10816
10974
  * Change the current user's passphrase for a vault.
10817
10975
  *
@@ -12333,6 +12491,7 @@ export {
12333
12491
  describeAllUsersAuth,
12334
12492
  ComputedFieldError,
12335
12493
  evalComputedFields,
12494
+ tokenize,
12336
12495
  Lru,
12337
12496
  parseBytes,
12338
12497
  estimateRecordBytes,
@@ -12349,4 +12508,4 @@ export {
12349
12508
  Noydb,
12350
12509
  createNoydb
12351
12510
  };
12352
- //# sourceMappingURL=chunk-F2IJ2HGD.js.map
12511
+ //# sourceMappingURL=chunk-KYGGXXT6.js.map