@noy-db/hub 0.2.0-pre.3 → 0.2.0-pre.31

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 (384) hide show
  1. package/README.md +126 -0
  2. package/dist/adapter/index.d.ts +9 -0
  3. package/dist/adapter/index.js +14 -0
  4. package/dist/aggregate/index.d.ts +3 -2
  5. package/dist/aggregate/index.js +10 -8
  6. package/dist/aggregate/index.js.map +1 -1
  7. package/dist/attestation/index.d.ts +7 -5
  8. package/dist/attestation/index.js +7 -6
  9. package/dist/attestation/index.js.map +1 -1
  10. package/dist/blobs/index.d.ts +9 -7
  11. package/dist/blobs/index.js +12 -6
  12. package/dist/blobs/index.js.map +1 -1
  13. package/dist/bundle/index.d.ts +29 -18
  14. package/dist/bundle/index.js +53 -192
  15. package/dist/bundle/index.js.map +1 -1
  16. package/dist/{chunk-75QDHSE4.js → chunk-2QDWRK3B.js} +5 -5
  17. package/dist/{chunk-74JEQFMT.js → chunk-2UT7HJJR.js} +5 -5
  18. package/dist/chunk-2UT7HJJR.js.map +1 -0
  19. package/dist/{chunk-FCDO7UAO.js → chunk-2ZYIN3BL.js} +2 -2
  20. package/dist/{chunk-BFI3RS42.js → chunk-33EQCZXE.js} +2 -2
  21. package/dist/chunk-33EQCZXE.js.map +1 -0
  22. package/dist/{chunk-WRLHNG6H.js → chunk-4K4QKYK4.js} +4 -4
  23. package/dist/chunk-4K4QKYK4.js.map +1 -0
  24. package/dist/{chunk-HGZ7DC5H.js → chunk-4L6N56B4.js} +2 -2
  25. package/dist/chunk-4L6N56B4.js.map +1 -0
  26. package/dist/{chunk-YMYK7US4.js → chunk-4YD7VZH4.js} +2 -2
  27. package/dist/chunk-4YD7VZH4.js.map +1 -0
  28. package/dist/{chunk-ZUMGGHRB.js → chunk-5PTX7PKD.js} +4 -4
  29. package/dist/{chunk-QAU5HM6Q.js → chunk-6EKRQ7QF.js} +3 -3
  30. package/dist/{chunk-ZC2AAE6J.js → chunk-7GPQPLGO.js} +19 -4
  31. package/dist/chunk-7GPQPLGO.js.map +1 -0
  32. package/dist/{chunk-EPK6A3WJ.js → chunk-A3JMGXPG.js} +2 -2
  33. package/dist/chunk-A3JMGXPG.js.map +1 -0
  34. package/dist/{chunk-FXQYZNOW.js → chunk-A7DNZVAV.js} +1 -1
  35. package/dist/chunk-A7DNZVAV.js.map +1 -0
  36. package/dist/{chunk-UMLVJTYV.js → chunk-ADB7GPM3.js} +7 -4
  37. package/dist/chunk-ADB7GPM3.js.map +1 -0
  38. package/dist/{chunk-YL2DR3HY.js → chunk-ASIGWYRA.js} +2 -2
  39. package/dist/chunk-ASIGWYRA.js.map +1 -0
  40. package/dist/{chunk-2EYC3WDT.js → chunk-AWU4JF7C.js} +93 -93
  41. package/dist/chunk-AWU4JF7C.js.map +1 -0
  42. package/dist/chunk-BEZ2EV43.js +129 -0
  43. package/dist/chunk-BEZ2EV43.js.map +1 -0
  44. package/dist/{chunk-IS5HWQO7.js → chunk-CIZDUAHI.js} +30 -4
  45. package/dist/chunk-CIZDUAHI.js.map +1 -0
  46. package/dist/{chunk-4OQWR46B.js → chunk-CUPTCF4R.js} +5 -5
  47. package/dist/chunk-CUPTCF4R.js.map +1 -0
  48. package/dist/{chunk-5ZGZ6HIZ.js → chunk-DEE4CRYN.js} +30 -7
  49. package/dist/chunk-DEE4CRYN.js.map +1 -0
  50. package/dist/{chunk-UOF74WQY.js → chunk-E2MDPPOC.js} +37 -2
  51. package/dist/chunk-E2MDPPOC.js.map +1 -0
  52. package/dist/{chunk-SAVQ6E2O.js → chunk-FFKQ65YX.js} +10 -3
  53. package/dist/chunk-FFKQ65YX.js.map +1 -0
  54. package/dist/{chunk-2XLVPKXG.js → chunk-G7ALNCQH.js} +10 -2
  55. package/dist/chunk-G7ALNCQH.js.map +1 -0
  56. package/dist/chunk-GGXN73NM.js +252 -0
  57. package/dist/chunk-GGXN73NM.js.map +1 -0
  58. package/dist/{chunk-UVPGJXVO.js → chunk-JOJPBZSZ.js} +5 -5
  59. package/dist/{chunk-YDLAFP36.js → chunk-JZ5DS4DP.js} +346 -3
  60. package/dist/chunk-JZ5DS4DP.js.map +1 -0
  61. package/dist/{chunk-KMI2NBBF.js → chunk-K4JID2ZE.js} +44 -8
  62. package/dist/chunk-K4JID2ZE.js.map +1 -0
  63. package/dist/{aggregate/index.cjs → chunk-K6NVSHAH.js} +241 -210
  64. package/dist/chunk-K6NVSHAH.js.map +1 -0
  65. package/dist/chunk-KJ3K5VZM.js +524 -0
  66. package/dist/chunk-KJ3K5VZM.js.map +1 -0
  67. package/dist/chunk-L5HHBOMS.js +232 -0
  68. package/dist/chunk-L5HHBOMS.js.map +1 -0
  69. package/dist/{chunk-YK72A4IT.js → chunk-LBILABKZ.js} +4 -4
  70. package/dist/chunk-LXKBG52H.js +151 -0
  71. package/dist/chunk-LXKBG52H.js.map +1 -0
  72. package/dist/{chunk-NGSPBLLE.js → chunk-MPIZQGFA.js} +50 -20
  73. package/dist/chunk-MPIZQGFA.js.map +1 -0
  74. package/dist/{chunk-4X2S7PBF.js → chunk-MRJPSXPE.js} +84 -70
  75. package/dist/chunk-MRJPSXPE.js.map +1 -0
  76. package/dist/{chunk-6S3LLAQ5.js → chunk-MSMDDDDJ.js} +3 -3
  77. package/dist/{chunk-6S3LLAQ5.js.map → chunk-MSMDDDDJ.js.map} +1 -1
  78. package/dist/{chunk-GAUBWHAF.js → chunk-OCYFFBZS.js} +4 -4
  79. package/dist/{chunk-NCO2JGKK.js → chunk-PDVP3C2I.js} +1 -1
  80. package/dist/chunk-PDVP3C2I.js.map +1 -0
  81. package/dist/chunk-PZ5AY32C.js +10 -0
  82. package/dist/{chunk-P6256WTJ.js → chunk-QBLPY44S.js} +3 -3
  83. package/dist/chunk-QBLPY44S.js.map +1 -0
  84. package/dist/{query/index.cjs → chunk-QGBBQKDS.js} +706 -831
  85. package/dist/chunk-QGBBQKDS.js.map +1 -0
  86. package/dist/{chunk-FS7A4XNF.js → chunk-QWJCNXH2.js} +3 -3
  87. package/dist/chunk-QXWJQ7UU.js +380 -0
  88. package/dist/chunk-QXWJQ7UU.js.map +1 -0
  89. package/dist/{chunk-GDTCGIPX.js → chunk-RCB6GWTC.js} +27 -5
  90. package/dist/chunk-RCB6GWTC.js.map +1 -0
  91. package/dist/{chunk-K5PVGKE4.js → chunk-SAAJYSVV.js} +2 -2
  92. package/dist/{chunk-G7PAZ3TD.js → chunk-SHJ3BRTZ.js} +46 -10
  93. package/dist/chunk-SHJ3BRTZ.js.map +1 -0
  94. package/dist/chunk-SQXTKZL7.js +125 -0
  95. package/dist/chunk-SQXTKZL7.js.map +1 -0
  96. package/dist/chunk-STNPB3UM.js +9 -0
  97. package/dist/chunk-STNPB3UM.js.map +1 -0
  98. package/dist/{chunk-NSLTPGEN.js → chunk-TMUMMAWV.js} +12 -2
  99. package/dist/{chunk-NSLTPGEN.js.map → chunk-TMUMMAWV.js.map} +1 -1
  100. package/dist/{chunk-LS3JLEIB.js → chunk-TZGWI5AX.js} +4 -4
  101. package/dist/{chunk-GD3BGKAR.js → chunk-UBF5JEOJ.js} +44 -5
  102. package/dist/chunk-UBF5JEOJ.js.map +1 -0
  103. package/dist/{chunk-T6HQMVML.js → chunk-W5NVNJDX.js} +5250 -801
  104. package/dist/chunk-W5NVNJDX.js.map +1 -0
  105. package/dist/chunk-XAYDHD2O.js +123 -0
  106. package/dist/chunk-XAYDHD2O.js.map +1 -0
  107. package/dist/{chunk-LOL725S4.js → chunk-XYW2CSCI.js} +31 -3
  108. package/dist/chunk-XYW2CSCI.js.map +1 -0
  109. package/dist/{chunk-TLFUDXVV.js → chunk-ZCMOS4H2.js} +31 -10
  110. package/dist/chunk-ZCMOS4H2.js.map +1 -0
  111. package/dist/{chunk-FBMXWVGP.js → chunk-ZK66B5EY.js} +450 -30
  112. package/dist/chunk-ZK66B5EY.js.map +1 -0
  113. package/dist/{chunk-GVXBHCZ2.js → chunk-ZPJSQPQH.js} +66 -7
  114. package/dist/chunk-ZPJSQPQH.js.map +1 -0
  115. package/dist/consent/index.d.ts +8 -6
  116. package/dist/consent/index.js +4 -3
  117. package/dist/consent/index.js.map +1 -1
  118. package/dist/crdt/index.js +1 -0
  119. package/dist/crdt/index.js.map +1 -1
  120. package/dist/{crypto-H2Y3DDFW.js → crypto-OSIV2IIW.js} +8 -3
  121. package/dist/{ulid-CiM2OAeM.d.ts → decrypt-partition-CXS5KopB.d.ts} +37 -82
  122. package/dist/{delegation-QSC7G5QC.js → delegation-BQTRJATI.js} +6 -5
  123. package/dist/derivations/index.d.ts +11 -9
  124. package/dist/derivations/index.js +9 -6
  125. package/dist/{dev-unlock-Cf2B7Kih.d.ts → dev-unlock-CnHTTVea.d.ts} +1 -1
  126. package/dist/discriminant-BN9REW3o.d.ts +60 -0
  127. package/dist/errors-BAWO5Z5a.d.ts +1500 -0
  128. package/dist/executor-KYSKFJ2R.js +9 -0
  129. package/dist/executor-M7W3NEKR.js +9 -0
  130. package/dist/executor-VDTDGWO6.js +13 -0
  131. package/dist/{fanout-sidecar-NRBWSLRK.js → fanout-sidecar-AZALISHB.js} +3 -2
  132. package/dist/fanout-sidecar-AZALISHB.js.map +1 -0
  133. package/dist/forget/index.d.ts +1 -0
  134. package/dist/forget/index.js +15 -0
  135. package/dist/guards/index.d.ts +16 -8
  136. package/dist/guards/index.js +12 -5
  137. package/dist/{hash-gVn_uKhp.d.ts → hash-oc5paYl0.d.ts} +1 -1
  138. package/dist/history/index.d.ts +9 -7
  139. package/dist/history/index.js +10 -7
  140. package/dist/history/index.js.map +1 -1
  141. package/dist/i18n/index.d.ts +8 -6
  142. package/dist/i18n/index.js +116 -15
  143. package/dist/i18n/index.js.map +1 -1
  144. package/dist/index-BMmajblo.d.ts +362 -0
  145. package/dist/index-BmhGztUi.d.ts +93 -0
  146. package/dist/{types-D9eB0Rvh.d.ts → index-DHn9lEP0.d.ts} +4305 -1523
  147. package/dist/{index-BF1B2HB9.d.ts → index-Ddm8D3Oo.d.ts} +186 -1151
  148. package/dist/index.d.ts +342 -70
  149. package/dist/index.js +420 -112
  150. package/dist/index.js.map +1 -1
  151. package/dist/indexing/index.d.ts +3 -3
  152. package/dist/indexing/index.js +5 -4
  153. package/dist/indexing/index.js.map +1 -1
  154. package/dist/issue-DPHRF2TI.js +13 -0
  155. package/dist/kernel/index.d.ts +11 -0
  156. package/dist/kernel/index.js +50 -0
  157. package/dist/{lazy-builder-Rpd-V3jP.d.ts → lazy-builder-ChSqcF5t.d.ts} +2 -2
  158. package/dist/{ledger-WOEJUYTP.js → ledger-CI7GSMLB.js} +7 -6
  159. package/dist/materialized-views/index.d.ts +23 -20
  160. package/dist/materialized-views/index.js +9 -7
  161. package/dist/mime-magic-JeLKHRng.d.ts +103 -0
  162. package/dist/noydb-NAU2DTFP.js +40 -0
  163. package/dist/overlay-views/index.d.ts +32 -12
  164. package/dist/overlay-views/index.js +7 -6
  165. package/dist/periods/index.d.ts +8 -6
  166. package/dist/periods/index.js +7 -6
  167. package/dist/{predicate-Dnu81tsS.d.cts → predicate-BmhBSPCH.d.ts} +87 -5
  168. package/dist/{public-envelope-OHQ5UZFM.js → public-envelope-MFMBFJLZ.js} +5 -4
  169. package/dist/query/index.d.ts +4 -3
  170. package/dist/query/index.js +14 -6
  171. package/dist/read-only-facade-3OQRZ3VS.js +8 -0
  172. package/dist/registry-IX5WKK4F.js +8 -0
  173. package/dist/registry-LMHO5265.js +11 -0
  174. package/dist/registry-TXCKWH26.js +9 -0
  175. package/dist/registry-VFEDQSYV.js +9 -0
  176. package/dist/revoke-5PUOZPJJ.js +18 -0
  177. package/dist/revoke-5PUOZPJJ.js.map +1 -0
  178. package/dist/sealed-record/index.d.ts +123 -0
  179. package/dist/sealed-record/index.js +43 -0
  180. package/dist/sealed-record/index.js.map +1 -0
  181. package/dist/session/index.d.ts +9 -7
  182. package/dist/session/index.js +4 -3
  183. package/dist/session/index.js.map +1 -1
  184. package/dist/shadow/index.d.ts +8 -6
  185. package/dist/shadow/index.js +3 -2
  186. package/dist/shadow/index.js.map +1 -1
  187. package/dist/{signer-M4K5HBLD.js → signer-UB5TQOZ6.js} +6 -5
  188. package/dist/signer-UB5TQOZ6.js.map +1 -0
  189. package/dist/snapshots/index.d.ts +30 -0
  190. package/dist/snapshots/index.js +153 -0
  191. package/dist/snapshots/index.js.map +1 -0
  192. package/dist/{stale-PAGCS4K5.js → stale-J3TUF5C5.js} +3 -2
  193. package/dist/stale-J3TUF5C5.js.map +1 -0
  194. package/dist/store/index.d.ts +15 -6
  195. package/dist/store/index.js +3 -2
  196. package/dist/{strategy-DSTrsZ8t.d.ts → strategy-8QGs5KQE.d.ts} +475 -7
  197. package/dist/sync/index.d.ts +7 -5
  198. package/dist/sync/index.js +5 -4
  199. package/dist/sync/index.js.map +1 -1
  200. package/dist/team/index.d.ts +8 -6
  201. package/dist/team/index.js +9 -8
  202. package/dist/transition-guard-Dy3NioQr.d.ts +165 -0
  203. package/dist/tx/index.d.ts +26 -8
  204. package/dist/tx/index.js +10 -5
  205. package/dist/tx/index.js.map +1 -1
  206. package/dist/ulid-DRH25k3y.d.ts +66 -0
  207. package/dist/{ulid-COREQ2RQ.js → ulid-KEPZMD2N.js} +2 -1
  208. package/dist/ulid-KEPZMD2N.js.map +1 -0
  209. package/dist/util/index.d.ts +2 -0
  210. package/dist/util/index.js +6 -1
  211. package/dist/util/index.js.map +1 -1
  212. package/dist/{with-materialized-view-qtoJ3xKJ.d.ts → with-materialized-view-DIVeez0W.d.ts} +2 -2
  213. package/dist/{with-overlayed-view-DFaRfgMr.d.ts → with-overlayed-view-DVZrc5Hb.d.ts} +2 -2
  214. package/dist/with-rollup-CbU-O4wP.d.ts +47 -0
  215. package/dist/zod-HAJM7LMS.js +14763 -0
  216. package/dist/zod-HAJM7LMS.js.map +1 -0
  217. package/package.json +73 -191
  218. package/dist/aggregate/index.cjs.map +0 -1
  219. package/dist/aggregate/index.d.cts +0 -38
  220. package/dist/attestation/index.cjs +0 -305
  221. package/dist/attestation/index.cjs.map +0 -1
  222. package/dist/attestation/index.d.cts +0 -52
  223. package/dist/blobs/index.cjs +0 -1480
  224. package/dist/blobs/index.cjs.map +0 -1
  225. package/dist/blobs/index.d.cts +0 -46
  226. package/dist/bundle/index.cjs +0 -18561
  227. package/dist/bundle/index.cjs.map +0 -1
  228. package/dist/bundle/index.d.cts +0 -176
  229. package/dist/chunk-2EYC3WDT.js.map +0 -1
  230. package/dist/chunk-2XLVPKXG.js.map +0 -1
  231. package/dist/chunk-4OQWR46B.js.map +0 -1
  232. package/dist/chunk-4UBOTYP5.js +0 -1367
  233. package/dist/chunk-4UBOTYP5.js.map +0 -1
  234. package/dist/chunk-4X2S7PBF.js.map +0 -1
  235. package/dist/chunk-5YHWBPOT.js +0 -19
  236. package/dist/chunk-5YHWBPOT.js.map +0 -1
  237. package/dist/chunk-5ZGZ6HIZ.js.map +0 -1
  238. package/dist/chunk-74JEQFMT.js.map +0 -1
  239. package/dist/chunk-A6SWRXUQ.js +0 -118
  240. package/dist/chunk-A6SWRXUQ.js.map +0 -1
  241. package/dist/chunk-BFI3RS42.js.map +0 -1
  242. package/dist/chunk-EMEX37ZN.js +0 -51
  243. package/dist/chunk-EMEX37ZN.js.map +0 -1
  244. package/dist/chunk-EPK6A3WJ.js.map +0 -1
  245. package/dist/chunk-FBMXWVGP.js.map +0 -1
  246. package/dist/chunk-FXQYZNOW.js.map +0 -1
  247. package/dist/chunk-G7PAZ3TD.js.map +0 -1
  248. package/dist/chunk-GD3BGKAR.js.map +0 -1
  249. package/dist/chunk-GDTCGIPX.js.map +0 -1
  250. package/dist/chunk-GVXBHCZ2.js.map +0 -1
  251. package/dist/chunk-HGZ7DC5H.js.map +0 -1
  252. package/dist/chunk-IS5HWQO7.js.map +0 -1
  253. package/dist/chunk-KMI2NBBF.js.map +0 -1
  254. package/dist/chunk-KYKMKLJ6.js +0 -340
  255. package/dist/chunk-KYKMKLJ6.js.map +0 -1
  256. package/dist/chunk-LOL725S4.js.map +0 -1
  257. package/dist/chunk-MRIBLZL3.js +0 -86
  258. package/dist/chunk-MRIBLZL3.js.map +0 -1
  259. package/dist/chunk-NCO2JGKK.js.map +0 -1
  260. package/dist/chunk-NGSPBLLE.js.map +0 -1
  261. package/dist/chunk-P6256WTJ.js.map +0 -1
  262. package/dist/chunk-SAVQ6E2O.js.map +0 -1
  263. package/dist/chunk-T6HQMVML.js.map +0 -1
  264. package/dist/chunk-TLFUDXVV.js.map +0 -1
  265. package/dist/chunk-UMLVJTYV.js.map +0 -1
  266. package/dist/chunk-UOF74WQY.js.map +0 -1
  267. package/dist/chunk-WRLHNG6H.js.map +0 -1
  268. package/dist/chunk-YDLAFP36.js.map +0 -1
  269. package/dist/chunk-YL2DR3HY.js.map +0 -1
  270. package/dist/chunk-YMYK7US4.js.map +0 -1
  271. package/dist/chunk-ZC2AAE6J.js.map +0 -1
  272. package/dist/consent/index.cjs +0 -204
  273. package/dist/consent/index.cjs.map +0 -1
  274. package/dist/consent/index.d.cts +0 -25
  275. package/dist/crdt/index.cjs +0 -152
  276. package/dist/crdt/index.cjs.map +0 -1
  277. package/dist/crdt/index.d.cts +0 -30
  278. package/dist/derivations/index.cjs +0 -351
  279. package/dist/derivations/index.cjs.map +0 -1
  280. package/dist/derivations/index.d.cts +0 -72
  281. package/dist/dev-unlock-De3mjQWv.d.cts +0 -263
  282. package/dist/executor-BZKFZVRC.js +0 -8
  283. package/dist/executor-GFZFDQXV.js +0 -8
  284. package/dist/executor-KT2IOZVP.js +0 -11
  285. package/dist/fanout-sidecar-NRBWSLRK.js.map +0 -1
  286. package/dist/guards/index.cjs +0 -322
  287. package/dist/guards/index.cjs.map +0 -1
  288. package/dist/guards/index.d.cts +0 -31
  289. package/dist/hash-vBCB0-Ps.d.cts +0 -63
  290. package/dist/history/index.cjs +0 -1222
  291. package/dist/history/index.cjs.map +0 -1
  292. package/dist/history/index.d.cts +0 -63
  293. package/dist/i18n/index.cjs +0 -840
  294. package/dist/i18n/index.cjs.map +0 -1
  295. package/dist/i18n/index.d.cts +0 -39
  296. package/dist/index-DVkvrgpm.d.cts +0 -2290
  297. package/dist/index.cjs +0 -23590
  298. package/dist/index.cjs.map +0 -1
  299. package/dist/index.d.cts +0 -778
  300. package/dist/indexing/index.cjs +0 -738
  301. package/dist/indexing/index.cjs.map +0 -1
  302. package/dist/indexing/index.d.cts +0 -36
  303. package/dist/issue-BAJ7ZB4S.js +0 -12
  304. package/dist/lazy-builder-C-rPfWG0.d.cts +0 -304
  305. package/dist/materialized-views/index.cjs +0 -837
  306. package/dist/materialized-views/index.cjs.map +0 -1
  307. package/dist/materialized-views/index.d.cts +0 -184
  308. package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
  309. package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
  310. package/dist/noydb-XNQSKXGO.js +0 -34
  311. package/dist/overlay-views/index.cjs +0 -359
  312. package/dist/overlay-views/index.cjs.map +0 -1
  313. package/dist/overlay-views/index.d.cts +0 -82
  314. package/dist/periods/index.cjs +0 -1041
  315. package/dist/periods/index.cjs.map +0 -1
  316. package/dist/periods/index.d.cts +0 -22
  317. package/dist/predicate-Dnu81tsS.d.ts +0 -185
  318. package/dist/query/index.cjs.map +0 -1
  319. package/dist/query/index.d.cts +0 -3
  320. package/dist/read-only-facade-ITU6L7BL.js +0 -7
  321. package/dist/registry-2IEARCGT.js +0 -7
  322. package/dist/registry-CDHASH73.js +0 -10
  323. package/dist/registry-EMGLZGR6.js +0 -8
  324. package/dist/registry-NQALYR77.js +0 -8
  325. package/dist/revoke-7JOVLZFD.js +0 -17
  326. package/dist/session/index.cjs +0 -495
  327. package/dist/session/index.cjs.map +0 -1
  328. package/dist/session/index.d.cts +0 -46
  329. package/dist/shadow/index.cjs +0 -133
  330. package/dist/shadow/index.cjs.map +0 -1
  331. package/dist/shadow/index.d.cts +0 -17
  332. package/dist/store/index.cjs +0 -1083
  333. package/dist/store/index.cjs.map +0 -1
  334. package/dist/store/index.d.cts +0 -492
  335. package/dist/strategy-BSxFXGzb.d.cts +0 -110
  336. package/dist/strategy-DSTrsZ8t.d.cts +0 -601
  337. package/dist/sync/index.cjs +0 -1062
  338. package/dist/sync/index.cjs.map +0 -1
  339. package/dist/sync/index.d.cts +0 -43
  340. package/dist/team/index.cjs +0 -2798
  341. package/dist/team/index.cjs.map +0 -1
  342. package/dist/team/index.d.cts +0 -118
  343. package/dist/tx/index.cjs +0 -544
  344. package/dist/tx/index.cjs.map +0 -1
  345. package/dist/tx/index.d.cts +0 -21
  346. package/dist/types-CSLcfytP.d.cts +0 -12493
  347. package/dist/ulid-CG2YvAbg.d.cts +0 -603
  348. package/dist/util/index.cjs +0 -230
  349. package/dist/util/index.cjs.map +0 -1
  350. package/dist/util/index.d.cts +0 -77
  351. package/dist/with-derivation-Bzpj6UTv.d.ts +0 -13
  352. package/dist/with-derivation-DWajFh4K.d.cts +0 -13
  353. package/dist/with-guard-DF_Ul3DT.d.cts +0 -18
  354. package/dist/with-guard-DR7U-l4v.d.ts +0 -18
  355. package/dist/with-materialized-view-_piodoIz.d.cts +0 -27
  356. package/dist/with-overlayed-view-DwzCKxn2.d.cts +0 -13
  357. /package/dist/{crypto-H2Y3DDFW.js.map → adapter/index.js.map} +0 -0
  358. /package/dist/{chunk-75QDHSE4.js.map → chunk-2QDWRK3B.js.map} +0 -0
  359. /package/dist/{chunk-FCDO7UAO.js.map → chunk-2ZYIN3BL.js.map} +0 -0
  360. /package/dist/{chunk-ZUMGGHRB.js.map → chunk-5PTX7PKD.js.map} +0 -0
  361. /package/dist/{chunk-QAU5HM6Q.js.map → chunk-6EKRQ7QF.js.map} +0 -0
  362. /package/dist/{chunk-UVPGJXVO.js.map → chunk-JOJPBZSZ.js.map} +0 -0
  363. /package/dist/{chunk-YK72A4IT.js.map → chunk-LBILABKZ.js.map} +0 -0
  364. /package/dist/{chunk-GAUBWHAF.js.map → chunk-OCYFFBZS.js.map} +0 -0
  365. /package/dist/{delegation-QSC7G5QC.js.map → chunk-PZ5AY32C.js.map} +0 -0
  366. /package/dist/{chunk-FS7A4XNF.js.map → chunk-QWJCNXH2.js.map} +0 -0
  367. /package/dist/{chunk-K5PVGKE4.js.map → chunk-SAAJYSVV.js.map} +0 -0
  368. /package/dist/{chunk-LS3JLEIB.js.map → chunk-TZGWI5AX.js.map} +0 -0
  369. /package/dist/{executor-BZKFZVRC.js.map → crypto-OSIV2IIW.js.map} +0 -0
  370. /package/dist/{executor-GFZFDQXV.js.map → delegation-BQTRJATI.js.map} +0 -0
  371. /package/dist/{executor-KT2IOZVP.js.map → executor-KYSKFJ2R.js.map} +0 -0
  372. /package/dist/{issue-BAJ7ZB4S.js.map → executor-M7W3NEKR.js.map} +0 -0
  373. /package/dist/{ledger-WOEJUYTP.js.map → executor-VDTDGWO6.js.map} +0 -0
  374. /package/dist/{noydb-XNQSKXGO.js.map → forget/index.js.map} +0 -0
  375. /package/dist/{public-envelope-OHQ5UZFM.js.map → issue-DPHRF2TI.js.map} +0 -0
  376. /package/dist/{read-only-facade-ITU6L7BL.js.map → kernel/index.js.map} +0 -0
  377. /package/dist/{registry-2IEARCGT.js.map → ledger-CI7GSMLB.js.map} +0 -0
  378. /package/dist/{registry-CDHASH73.js.map → noydb-NAU2DTFP.js.map} +0 -0
  379. /package/dist/{registry-EMGLZGR6.js.map → public-envelope-MFMBFJLZ.js.map} +0 -0
  380. /package/dist/{registry-NQALYR77.js.map → read-only-facade-3OQRZ3VS.js.map} +0 -0
  381. /package/dist/{revoke-7JOVLZFD.js.map → registry-IX5WKK4F.js.map} +0 -0
  382. /package/dist/{signer-M4K5HBLD.js.map → registry-LMHO5265.js.map} +0 -0
  383. /package/dist/{stale-PAGCS4K5.js.map → registry-TXCKWH26.js.map} +0 -0
  384. /package/dist/{ulid-COREQ2RQ.js.map → registry-VFEDQSYV.js.map} +0 -0
package/dist/index.js CHANGED
@@ -3,12 +3,17 @@ import {
3
3
  issueDelegation,
4
4
  loadActiveDelegations,
5
5
  revokeDelegation
6
- } from "./chunk-YK72A4IT.js";
6
+ } from "./chunk-LBILABKZ.js";
7
7
  import {
8
8
  Collection,
9
+ ComputedFieldError,
10
+ CustodyApi,
11
+ DEED_RECORD_ID,
9
12
  DEFAULT_FRESHNESS_MS,
10
13
  ELEVATION_AUDIT_COLLECTION,
11
14
  ElevatedHandle,
15
+ LinkEndpointError,
16
+ LinkIntegrityError,
12
17
  Lru,
13
18
  META_COLLECTION,
14
19
  Noydb,
@@ -19,9 +24,14 @@ import {
19
24
  RefRegistry,
20
25
  RefScopeError,
21
26
  STRICT_POLICY,
27
+ SequenceStore,
22
28
  UserApi,
23
29
  Vault,
30
+ WithdrawalRequestError,
31
+ approveWithdrawal,
24
32
  checkGate,
33
+ compileSequenceFormat,
34
+ createDeedOwner,
25
35
  createNoydb,
26
36
  derivePersistedSchema,
27
37
  describeAllUsersAuth,
@@ -30,70 +40,170 @@ import {
30
40
  describeUserAuth,
31
41
  diagramAuthConfig,
32
42
  estimateRecordBytes,
43
+ evalComputedFields,
44
+ exportAccessibleData,
45
+ isDeedVault,
46
+ isLinkCollectionName,
47
+ isRefArray,
33
48
  isZodSchema,
49
+ liberateVault,
50
+ listWithdrawalRequests,
51
+ loadDeedMarker,
34
52
  loadVaultPolicy,
35
53
  mergePolicy,
36
54
  parseBytes,
37
55
  persistSchemaIfNeeded,
38
56
  ref,
57
+ refArray,
58
+ rejectWithdrawal,
59
+ requestWithdrawal,
60
+ resolveSequenceKey,
39
61
  saveVaultPolicy,
62
+ tokenize,
40
63
  validateSchemaInput,
41
- validateSchemaOutput
42
- } from "./chunk-T6HQMVML.js";
64
+ validateSchemaOutput,
65
+ withArchive,
66
+ withdrawAccessibleData
67
+ } from "./chunk-W5NVNJDX.js";
68
+ import {
69
+ isDiscriminant
70
+ } from "./chunk-STNPB3UM.js";
71
+ import {
72
+ fuseRetrieval
73
+ } from "./chunk-GGXN73NM.js";
43
74
  import {
44
75
  DEFAULT_PUBLIC_ENVELOPE_SCHEMA,
45
76
  PUBLIC_ENVELOPE_FIELDS,
46
77
  resolveSchema
47
78
  } from "./chunk-EMIGCR7X.js";
79
+ import {
80
+ immutableGuard,
81
+ transitionGuard,
82
+ withGuard
83
+ } from "./chunk-XAYDHD2O.js";
84
+ import "./chunk-A3JMGXPG.js";
85
+ import "./chunk-ADB7GPM3.js";
86
+ import "./chunk-FFKQ65YX.js";
87
+ import {
88
+ CollectionFrame,
89
+ VaultFrame
90
+ } from "./chunk-2ZYIN3BL.js";
48
91
  import {
49
92
  TxCollection,
50
93
  TxContext,
51
94
  TxVault,
52
95
  runTransaction
53
- } from "./chunk-GVXBHCZ2.js";
96
+ } from "./chunk-ZPJSQPQH.js";
54
97
  import {
55
- withDerivation
56
- } from "./chunk-EMEX37ZN.js";
57
- import "./chunk-GD3BGKAR.js";
58
- import "./chunk-HGZ7DC5H.js";
98
+ withDerivation,
99
+ withRollup
100
+ } from "./chunk-BEZ2EV43.js";
101
+ import "./chunk-UBF5JEOJ.js";
102
+ import "./chunk-4L6N56B4.js";
59
103
  import {
60
104
  withMaterializedView
61
- } from "./chunk-ZC2AAE6J.js";
62
- import "./chunk-G7PAZ3TD.js";
63
- import "./chunk-GDTCGIPX.js";
64
- import "./chunk-BFI3RS42.js";
105
+ } from "./chunk-7GPQPLGO.js";
106
+ import "./chunk-SHJ3BRTZ.js";
107
+ import "./chunk-RCB6GWTC.js";
108
+ import "./chunk-33EQCZXE.js";
65
109
  import {
66
110
  withOverlayedView
67
- } from "./chunk-YL2DR3HY.js";
68
- import "./chunk-NGSPBLLE.js";
69
- import "./chunk-NSLTPGEN.js";
70
- import "./chunk-WRLHNG6H.js";
111
+ } from "./chunk-ASIGWYRA.js";
112
+ import "./chunk-TMUMMAWV.js";
113
+ import "./chunk-MPIZQGFA.js";
114
+ import {
115
+ DEFAULT_CROSS_JOIN_MAX_ROWS,
116
+ DEFAULT_JOIN_MAX_ROWS,
117
+ Query,
118
+ ScanBuilder,
119
+ applyJoins,
120
+ buildLiveQuery,
121
+ executePlan,
122
+ resetJoinWarnings
123
+ } from "./chunk-QGBBQKDS.js";
124
+ import {
125
+ BLOB_CHUNKS_COLLECTION,
126
+ BLOB_COLLECTION,
127
+ BLOB_INDEX_COLLECTION,
128
+ BLOB_SLOTS_PREFIX,
129
+ BLOB_VERSIONS_PREFIX,
130
+ BlobSet,
131
+ DEFAULT_CHUNK_SIZE,
132
+ detectMagic,
133
+ detectMimeType,
134
+ importExternalObjects,
135
+ isPreCompressed,
136
+ memoryObjectProjection
137
+ } from "./chunk-ZK66B5EY.js";
138
+ import "./chunk-XYW2CSCI.js";
139
+ import "./chunk-4K4QKYK4.js";
140
+ import {
141
+ CollectionIndexes
142
+ } from "./chunk-4YD7VZH4.js";
143
+ import {
144
+ avg,
145
+ count,
146
+ max,
147
+ min,
148
+ sum
149
+ } from "./chunk-DEE4CRYN.js";
150
+ import {
151
+ Aggregation,
152
+ GROUPBY_MAX_CARDINALITY,
153
+ GROUPBY_WARN_CARDINALITY,
154
+ GroupedAggregation,
155
+ GroupedQuery,
156
+ GroupedQueryN,
157
+ groupAndReduce,
158
+ reduceRecords
159
+ } from "./chunk-K6NVSHAH.js";
160
+ import {
161
+ MoneyCurrencyError,
162
+ MoneyPrecisionError,
163
+ MoneyUnsupportedError,
164
+ decimalScaleOf,
165
+ evaluateClause,
166
+ evaluateFieldClause,
167
+ formatScaledInt,
168
+ isMoneyDescriptor,
169
+ money,
170
+ parseToScaledInt,
171
+ readPath,
172
+ rescaleScaledInt,
173
+ scaleForCurrency
174
+ } from "./chunk-KJ3K5VZM.js";
71
175
  import {
72
176
  mergeCrdtStates,
73
177
  resolveCrdtSnapshot
74
178
  } from "./chunk-J66GRPNH.js";
75
179
  import {
76
- NOYDB_BUNDLE_FORMAT_VERSION,
77
- NOYDB_BUNDLE_MAGIC,
78
- NOYDB_BUNDLE_PREFIX_BYTES,
79
- hasNoydbBundleMagic,
80
- readNoydbBundle,
81
- readNoydbBundleHeader,
82
- readNoydbBundlePublicEnvelope,
83
- resetBrotliSupportCache,
84
- writeNoydbBundle
85
- } from "./chunk-P6256WTJ.js";
180
+ decryptExtractedPartition
181
+ } from "./chunk-L5HHBOMS.js";
86
182
  import {
87
183
  MemoryRecipientSealer,
88
184
  MemorySealingKeyProvider,
89
185
  SCHEMAS_COLLECTION,
90
186
  SEALED_PASSPHRASE_RECORD_ID,
187
+ aesGcmOpen,
91
188
  loadPersistedSchema,
92
189
  loadSealedPassphrase,
190
+ parseRsaOaepTlv,
93
191
  parseSealedEnvelope,
94
192
  savePersistedSchema,
95
- saveSealedPassphrase
96
- } from "./chunk-4X2S7PBF.js";
193
+ saveSealedPassphrase,
194
+ sealRsaOaepTlv
195
+ } from "./chunk-MRJPSXPE.js";
196
+ import {
197
+ NOYDB_BUNDLE_FORMAT_VERSION,
198
+ NOYDB_BUNDLE_MAGIC,
199
+ NOYDB_BUNDLE_PREFIX_BYTES,
200
+ hasNoydbBundleMagic,
201
+ readNoydbBundle,
202
+ readNoydbBundleHeader,
203
+ readNoydbBundlePublicEnvelope,
204
+ resetBrotliSupportCache,
205
+ writeNoydbBundle
206
+ } from "./chunk-QBLPY44S.js";
97
207
  import {
98
208
  PUBLIC_ENVELOPE_RECORD_ID,
99
209
  isPublicEnvelope,
@@ -101,39 +211,35 @@ import {
101
211
  readPublicEnvelope,
102
212
  savePublicEnvelope,
103
213
  validatePublicEnvelopeInput
104
- } from "./chunk-FS7A4XNF.js";
214
+ } from "./chunk-QWJCNXH2.js";
215
+ import "./chunk-LXKBG52H.js";
105
216
  import {
106
217
  CONSENT_AUDIT_COLLECTION
107
- } from "./chunk-K5PVGKE4.js";
218
+ } from "./chunk-SAAJYSVV.js";
108
219
  import {
109
220
  PERIODS_COLLECTION
110
- } from "./chunk-GAUBWHAF.js";
221
+ } from "./chunk-OCYFFBZS.js";
111
222
  import "./chunk-UF3BUNQZ.js";
112
223
  import {
113
- withGuard
114
- } from "./chunk-5YHWBPOT.js";
115
- import "./chunk-EPK6A3WJ.js";
116
- import "./chunk-UMLVJTYV.js";
117
- import "./chunk-SAVQ6E2O.js";
118
- import {
119
- CollectionFrame,
120
- VaultFrame
121
- } from "./chunk-FCDO7UAO.js";
224
+ DICT_COLLECTION_PREFIX,
225
+ DictionaryHandle,
226
+ dictCollectionName,
227
+ dictKey,
228
+ isDictCollectionName,
229
+ isDictKeyDescriptor,
230
+ isStaticDictDescriptor,
231
+ staticDict
232
+ } from "./chunk-K4JID2ZE.js";
122
233
  import {
123
234
  applyI18nLocale,
235
+ enforceScript,
124
236
  i18nText,
237
+ inferScripts,
125
238
  isI18nTextDescriptor,
126
239
  resolveI18nText,
240
+ resolvePolicy,
127
241
  validateI18nTextValue
128
- } from "./chunk-A6SWRXUQ.js";
129
- import {
130
- DICT_COLLECTION_PREFIX,
131
- DictionaryHandle,
132
- dictCollectionName,
133
- dictKey,
134
- isDictCollectionName,
135
- isDictKeyDescriptor
136
- } from "./chunk-KMI2NBBF.js";
242
+ } from "./chunk-QXWJQ7UU.js";
137
243
  import {
138
244
  createBundleStore,
139
245
  routeStore,
@@ -145,7 +251,7 @@ import {
145
251
  withRetry,
146
252
  wrapBundleStore,
147
253
  wrapStore
148
- } from "./chunk-2XLVPKXG.js";
254
+ } from "./chunk-G7ALNCQH.js";
149
255
  import {
150
256
  SYNC_CREDENTIALS_COLLECTION,
151
257
  credentialStatus,
@@ -153,7 +259,7 @@ import {
153
259
  getCredential,
154
260
  listCredentials,
155
261
  putCredential
156
- } from "./chunk-4OQWR46B.js";
262
+ } from "./chunk-CUPTCF4R.js";
157
263
  import {
158
264
  MAGIC_LINK_CONTENT_INFO_PREFIX,
159
265
  MAGIC_LINK_GRANTS_COLLECTION,
@@ -188,17 +294,17 @@ import {
188
294
  unwrapDeksFromShamirEntry,
189
295
  unwrapMagicLinkGrant,
190
296
  writeMagicLinkGrant
191
- } from "./chunk-2EYC3WDT.js";
297
+ } from "./chunk-AWU4JF7C.js";
192
298
  import {
193
299
  assertTierAccess,
194
300
  dekKey,
195
301
  effectiveClearance
196
- } from "./chunk-6S3LLAQ5.js";
302
+ } from "./chunk-MSMDDDDJ.js";
197
303
  import {
198
304
  PresenceHandle,
199
305
  SyncEngine,
200
306
  SyncTransaction
201
- } from "./chunk-LS3JLEIB.js";
307
+ } from "./chunk-TZGWI5AX.js";
202
308
  import {
203
309
  DIRECTORY_RECORD_ID,
204
310
  USER_ENVELOPE_COLLECTION,
@@ -226,7 +332,7 @@ import {
226
332
  saveUserEnvelope,
227
333
  validatePassphrase,
228
334
  visibilityRecordId
229
- } from "./chunk-TLFUDXVV.js";
335
+ } from "./chunk-ZCMOS4H2.js";
230
336
  import {
231
337
  BUNDLE_STORE_POLICY,
232
338
  INDEXED_STORE_POLICY,
@@ -246,7 +352,7 @@ import {
246
352
  revokeAllSessions,
247
353
  revokeSession,
248
354
  validateSessionPolicy
249
- } from "./chunk-QAU5HM6Q.js";
355
+ } from "./chunk-6EKRQ7QF.js";
250
356
  import {
251
357
  generateULID,
252
358
  isULID
@@ -256,14 +362,14 @@ import {
256
362
  VaultInstant,
257
363
  diff,
258
364
  formatDiff
259
- } from "./chunk-IS5HWQO7.js";
365
+ } from "./chunk-CIZDUAHI.js";
260
366
  import {
261
367
  LEDGER_COLLECTION,
262
368
  LEDGER_DELTAS_COLLECTION,
263
369
  LedgerStore,
264
370
  applyPatch,
265
371
  computePatch
266
- } from "./chunk-74JEQFMT.js";
372
+ } from "./chunk-2UT7HJJR.js";
267
373
  import {
268
374
  canonicalJson,
269
375
  envelopePayloadHash,
@@ -271,61 +377,15 @@ import {
271
377
  paddedIndex,
272
378
  parseIndex,
273
379
  sha256Hex
274
- } from "./chunk-NCO2JGKK.js";
275
- import {
276
- DEFAULT_JOIN_MAX_ROWS,
277
- Query,
278
- ScanBuilder,
279
- applyJoins,
280
- buildLiveQuery,
281
- executePlan,
282
- resetJoinWarnings
283
- } from "./chunk-4UBOTYP5.js";
284
- import {
285
- CollectionIndexes
286
- } from "./chunk-YMYK7US4.js";
287
- import {
288
- avg,
289
- count,
290
- max,
291
- min,
292
- sum
293
- } from "./chunk-5ZGZ6HIZ.js";
294
- import {
295
- Aggregation,
296
- GROUPBY_MAX_CARDINALITY,
297
- GROUPBY_WARN_CARDINALITY,
298
- GroupedAggregation,
299
- GroupedQuery,
300
- GroupedQueryN,
301
- groupAndReduce,
302
- reduceRecords
303
- } from "./chunk-KYKMKLJ6.js";
304
- import {
305
- evaluateClause,
306
- evaluateFieldClause,
307
- readPath
308
- } from "./chunk-MRIBLZL3.js";
309
- import {
310
- BLOB_CHUNKS_COLLECTION,
311
- BLOB_COLLECTION,
312
- BLOB_INDEX_COLLECTION,
313
- BLOB_SLOTS_PREFIX,
314
- BLOB_VERSIONS_PREFIX,
315
- BlobSet,
316
- DEFAULT_CHUNK_SIZE,
317
- detectMagic,
318
- detectMimeType,
319
- isPreCompressed
320
- } from "./chunk-FBMXWVGP.js";
321
- import "./chunk-LOL725S4.js";
380
+ } from "./chunk-PDVP3C2I.js";
381
+ import "./chunk-SQXTKZL7.js";
322
382
  import {
323
383
  NOYDB_BACKUP_VERSION,
324
384
  NOYDB_FORMAT_VERSION,
325
385
  NOYDB_KEYRING_VERSION,
326
386
  NOYDB_SYNC_VERSION,
327
387
  createStore
328
- } from "./chunk-FXQYZNOW.js";
388
+ } from "./chunk-A7DNZVAV.js";
329
389
  import {
330
390
  base64ToBuffer,
331
391
  bufferToBase64,
@@ -334,7 +394,7 @@ import {
334
394
  derivePresenceKey,
335
395
  encryptBytes,
336
396
  encryptDeterministic
337
- } from "./chunk-UOF74WQY.js";
397
+ } from "./chunk-E2MDPPOC.js";
338
398
  import {
339
399
  AlreadyElevatedError,
340
400
  AmendmentForbiddenError,
@@ -345,7 +405,12 @@ import {
345
405
  BundleSealMismatchError,
346
406
  BundleVersionConflictError,
347
407
  ConflictError,
408
+ CrossJoinSourceUnknownError,
409
+ CrossJoinTooLargeError,
348
410
  DanglingReferenceError,
411
+ DataResidencyError,
412
+ DebugPlaintextError,
413
+ DebugReservedFieldError,
349
414
  DecryptionError,
350
415
  DelegationTargetMissingError,
351
416
  DerivationCapExceededError,
@@ -357,10 +422,14 @@ import {
357
422
  DictKeyMissingError,
358
423
  DirectoryDisabledError,
359
424
  ElevationExpiredError,
425
+ EmbeddingDimMismatchError,
426
+ EmbeddingModelMismatchError,
360
427
  ExportCapabilityError,
361
428
  FieldFrozenError,
362
429
  FilenameSanitizationError,
430
+ ForgetStrategyNotConfiguredError,
363
431
  GroupCardinalityError,
432
+ IllegalTransitionError,
364
433
  ImportCapabilityError,
365
434
  IndexRequiredError,
366
435
  IndexWriteFailureError,
@@ -382,6 +451,7 @@ import {
382
451
  NonAdditiveSchemaChangeError,
383
452
  NotFoundError,
384
453
  NoydbError,
454
+ NumberingUncertaintyError,
385
455
  OverlayBaseIsVirtualError,
386
456
  OverlayCollectionUnavailableError,
387
457
  OverlayIdMismatchError,
@@ -394,22 +464,56 @@ import {
394
464
  ReadOnlyAtInstantError,
395
465
  ReadOnlyError,
396
466
  ReadOnlyFrameError,
467
+ RecordCekNotFoundError,
397
468
  RecordLockedError,
398
469
  ReservedCollectionNameError,
470
+ ReservedVaultNameError,
399
471
  SchemaFenceError,
400
472
  SchemaLockedError,
401
473
  SchemaUpdateError,
402
474
  SchemaValidationError,
475
+ ScriptViolationError,
476
+ SealedRecordExpiredError,
477
+ SealedRecordMismatchError,
478
+ SequenceContentionError,
479
+ SequenceOfflineError,
403
480
  SessionExpiredError,
404
481
  SessionNotFoundError,
405
482
  SessionPolicyError,
483
+ ShardProvisioningError,
484
+ SnapshotNotFoundError,
485
+ StaticDictReadonlyError,
406
486
  StoreCapabilityError,
407
487
  TamperedError,
408
488
  TierDemoteDeniedError,
409
489
  TierNotGrantedError,
410
490
  TranslatorNotConfiguredError,
411
- ValidationError
412
- } from "./chunk-YDLAFP36.js";
491
+ UniqueConstraintError,
492
+ UnknownDictCodeError,
493
+ UnknownShardError,
494
+ UnsupportedIndexOptionError,
495
+ ValidationError,
496
+ VaultTemplateNotFoundError
497
+ } from "./chunk-JZ5DS4DP.js";
498
+ import "./chunk-PZ5AY32C.js";
499
+
500
+ // src/debug.ts
501
+ function readPlaintextRecord(envelope) {
502
+ if (envelope._iv !== "") {
503
+ throw new Error(
504
+ "readPlaintextRecord: envelope is encrypted (non-empty _iv) \u2014 decrypt via the vault, not this helper"
505
+ );
506
+ }
507
+ if (envelope._debug !== void 0) {
508
+ const record = {};
509
+ for (const [key, value] of Object.entries(envelope)) {
510
+ if (!key.startsWith("_")) record[key] = value;
511
+ }
512
+ return record;
513
+ }
514
+ if (!envelope._data) return null;
515
+ return JSON.parse(envelope._data);
516
+ }
413
517
 
414
518
  // src/schema-update/strategies.ts
415
519
  function blindUpdate() {
@@ -462,6 +566,126 @@ function coordinatedCutover(opts) {
462
566
  };
463
567
  }
464
568
 
569
+ // src/numbering/descriptor.ts
570
+ function withDeferredNumbering(config) {
571
+ return {
572
+ series: config.series,
573
+ collection: config.collection,
574
+ field: config.field,
575
+ settleWindowMs: config.settleWindowMs ?? 0
576
+ };
577
+ }
578
+
579
+ // src/constants.ts
580
+ var STATE_VAULT_NAME = "__noydb_state__";
581
+
582
+ // src/money/arith.ts
583
+ function parseAmount(label, amount, scale, rounding) {
584
+ const r = parseToScaledInt(amount, scale, rounding);
585
+ if (!r.ok) {
586
+ throw new MoneyUnsupportedError(
587
+ r.reason === "precision" ? `${label}: amount ${JSON.stringify(amount)} has more precision than scale ${scale} and no rounding mode is configured` : `${label}: amount ${JSON.stringify(amount)} is not a finite decimal`
588
+ );
589
+ }
590
+ return r.value;
591
+ }
592
+ function resolveScale(label, amount, explicit) {
593
+ if (explicit !== void 0) {
594
+ if (!Number.isInteger(explicit) || explicit < 0) {
595
+ throw new MoneyUnsupportedError(`${label}: scale must be a non-negative integer`);
596
+ }
597
+ return explicit;
598
+ }
599
+ const inferred = decimalScaleOf(amount);
600
+ if (inferred === null) {
601
+ throw new MoneyUnsupportedError(`${label}: amount ${JSON.stringify(amount)} is not a finite decimal`);
602
+ }
603
+ return inferred;
604
+ }
605
+ function mulRate(amount, rate, opts = {}) {
606
+ const scale = resolveScale("mulRate", amount, opts.scale);
607
+ const rounding = opts.rounding ?? "half-up";
608
+ const a = parseAmount("mulRate", amount, scale, rounding);
609
+ const rateScale = decimalScaleOf(rate);
610
+ if (rateScale === null) {
611
+ throw new MoneyUnsupportedError(`mulRate: rate ${JSON.stringify(rate)} is not a finite decimal`);
612
+ }
613
+ const r = parseToScaledInt(rate, rateScale);
614
+ if (!r.ok) {
615
+ throw new MoneyUnsupportedError(`mulRate: rate ${JSON.stringify(rate)} is not a finite decimal`);
616
+ }
617
+ const product = a * r.value;
618
+ return formatScaledInt(rescaleScaledInt(product, scale + rateScale, scale, rounding), scale);
619
+ }
620
+ function allocate(amount, weights, opts = {}) {
621
+ if (weights.length === 0) {
622
+ throw new MoneyUnsupportedError("allocate: weights must not be empty");
623
+ }
624
+ const scale = resolveScale("allocate", amount, opts.scale);
625
+ const a = parseAmount("allocate", amount, scale);
626
+ let weightScale = 0;
627
+ for (const w of weights) {
628
+ const s = decimalScaleOf(w);
629
+ if (s === null) {
630
+ throw new MoneyUnsupportedError(`allocate: weight ${JSON.stringify(w)} is not a finite decimal`);
631
+ }
632
+ if (s > weightScale) weightScale = s;
633
+ }
634
+ const scaledWeights = weights.map((w) => {
635
+ const r = parseToScaledInt(w, weightScale);
636
+ if (!r.ok || r.value < 0n) {
637
+ throw new MoneyUnsupportedError(`allocate: weight ${JSON.stringify(w)} must be a non-negative decimal`);
638
+ }
639
+ return r.value;
640
+ });
641
+ const sumW = scaledWeights.reduce((acc, w) => acc + w, 0n);
642
+ if (sumW === 0n) {
643
+ throw new MoneyUnsupportedError("allocate: weights must not all be zero");
644
+ }
645
+ const negative = a < 0n;
646
+ const mag = negative ? -a : a;
647
+ const base = [];
648
+ const remainders = [];
649
+ let distributed = 0n;
650
+ for (let i = 0; i < scaledWeights.length; i++) {
651
+ const product = mag * scaledWeights[i];
652
+ const share = product / sumW;
653
+ base.push(share);
654
+ distributed += share;
655
+ remainders.push({ index: i, rem: product % sumW });
656
+ }
657
+ let leftover = mag - distributed;
658
+ remainders.sort((x, y) => y.rem > x.rem ? 1 : y.rem < x.rem ? -1 : x.index - y.index);
659
+ for (const { index } of remainders) {
660
+ if (leftover === 0n) break;
661
+ base[index] = base[index] + 1n;
662
+ leftover -= 1n;
663
+ }
664
+ return base.map((p) => formatScaledInt(negative && p !== 0n ? -p : p, scale));
665
+ }
666
+
667
+ // src/money/branded.ts
668
+ function asMoney(value) {
669
+ if (!isMoneyLike(value)) {
670
+ throw new MoneyUnsupportedError(`asMoney: ${JSON.stringify(value)} is not a finite decimal`);
671
+ }
672
+ return String(value).trim();
673
+ }
674
+ function isMoneyString(value) {
675
+ return typeof value === "string" && isMoneyLike(value);
676
+ }
677
+ function moneyNumber(value) {
678
+ if (!isMoneyLike(value)) {
679
+ throw new MoneyUnsupportedError(`moneyNumber: ${JSON.stringify(value)} is not a finite decimal`);
680
+ }
681
+ return Number(value);
682
+ }
683
+ function isMoneyLike(value) {
684
+ if (typeof value === "number") return Number.isFinite(value);
685
+ if (typeof value !== "string") return false;
686
+ return decimalScaleOf(value) !== null;
687
+ }
688
+
465
689
  // src/vault-diff.ts
466
690
  async function diffVault(vault, candidate, options = {}) {
467
691
  const idKey = options.idKey ?? "id";
@@ -494,11 +718,13 @@ async function diffVault(vault, candidate, options = {}) {
494
718
  if (before === void 0 && after !== void 0) {
495
719
  added.push({ collection, id, record: after });
496
720
  } else if (before !== void 0 && after === void 0) {
497
- deleted.push({ collection, id, record: before });
721
+ const metadata = options.includeMetadata ? await vault.collection(collection).getMetadata(id) ?? void 0 : void 0;
722
+ deleted.push({ collection, id, record: before, ...metadata !== void 0 ? { metadata } : {} });
498
723
  } else if (before !== void 0 && after !== void 0) {
499
724
  if (compareFn(before, after)) {
500
725
  unchanged?.push({ collection, id, record: after });
501
726
  } else {
727
+ const metadata = options.includeMetadata ? await vault.collection(collection).getMetadata(id) ?? void 0 : void 0;
502
728
  const fieldDiffs = diff(before, after);
503
729
  const fieldsChanged = uniqueTopLevelKeys(fieldDiffs);
504
730
  modified.push({
@@ -507,7 +733,8 @@ async function diffVault(vault, candidate, options = {}) {
507
733
  record: after,
508
734
  before,
509
735
  fieldsChanged,
510
- fieldDiffs
736
+ fieldDiffs,
737
+ ...metadata !== void 0 ? { metadata } : {}
511
738
  });
512
739
  }
513
740
  }
@@ -635,8 +862,14 @@ export {
635
862
  CollectionFrame,
636
863
  CollectionIndexes,
637
864
  CollectionInstant,
865
+ ComputedFieldError,
638
866
  ConflictError,
867
+ CrossJoinSourceUnknownError,
868
+ CrossJoinTooLargeError,
869
+ CustodyApi,
870
+ DEED_RECORD_ID,
639
871
  DEFAULT_CHUNK_SIZE,
872
+ DEFAULT_CROSS_JOIN_MAX_ROWS,
640
873
  DEFAULT_FRESHNESS_MS,
641
874
  DEFAULT_JOIN_MAX_ROWS,
642
875
  DEFAULT_PUBLIC_ENVELOPE_SCHEMA,
@@ -644,6 +877,9 @@ export {
644
877
  DICT_COLLECTION_PREFIX,
645
878
  DIRECTORY_RECORD_ID,
646
879
  DanglingReferenceError,
880
+ DataResidencyError,
881
+ DebugPlaintextError,
882
+ DebugReservedFieldError,
647
883
  DecryptionError,
648
884
  DelegationTargetMissingError,
649
885
  DerivationCapExceededError,
@@ -658,9 +894,12 @@ export {
658
894
  ELEVATION_AUDIT_COLLECTION,
659
895
  ElevatedHandle,
660
896
  ElevationExpiredError,
897
+ EmbeddingDimMismatchError,
898
+ EmbeddingModelMismatchError,
661
899
  ExportCapabilityError,
662
900
  FieldFrozenError,
663
901
  FilenameSanitizationError,
902
+ ForgetStrategyNotConfiguredError,
664
903
  GROUPBY_MAX_CARDINALITY,
665
904
  GROUPBY_WARN_CARDINALITY,
666
905
  GroupCardinalityError,
@@ -668,6 +907,7 @@ export {
668
907
  GroupedQuery,
669
908
  GroupedQueryN,
670
909
  INDEXED_STORE_POLICY,
910
+ IllegalTransitionError,
671
911
  ImportCapabilityError,
672
912
  IndexRequiredError,
673
913
  IndexWriteFailureError,
@@ -680,6 +920,8 @@ export {
680
920
  LEDGER_DELTAS_COLLECTION,
681
921
  LedgerContentionError,
682
922
  LedgerStore,
923
+ LinkEndpointError,
924
+ LinkIntegrityError,
683
925
  LocaleNotSpecifiedError,
684
926
  Lru,
685
927
  MAGIC_LINK_CONTENT_INFO_PREFIX,
@@ -695,6 +937,9 @@ export {
695
937
  MemorySealingKeyProvider,
696
938
  MigrationRequiredError,
697
939
  MissingTranslationError,
940
+ MoneyCurrencyError,
941
+ MoneyPrecisionError,
942
+ MoneyUnsupportedError,
698
943
  NOYDB_BACKUP_VERSION,
699
944
  NOYDB_BUNDLE_FORMAT_VERSION,
700
945
  NOYDB_BUNDLE_MAGIC,
@@ -708,6 +953,7 @@ export {
708
953
  NotFoundError,
709
954
  Noydb,
710
955
  NoydbError,
956
+ NumberingUncertaintyError,
711
957
  OverlayBaseIsVirtualError,
712
958
  OverlayCollectionUnavailableError,
713
959
  OverlayIdMismatchError,
@@ -730,6 +976,7 @@ export {
730
976
  ReadOnlyAtInstantError,
731
977
  ReadOnlyError,
732
978
  ReadOnlyFrameError,
979
+ RecordCekNotFoundError,
733
980
  RecordLockedError,
734
981
  RecoveryNotEnrolledError,
735
982
  RecoveryProfileNotImplementedError,
@@ -737,8 +984,10 @@ export {
737
984
  RefRegistry,
738
985
  RefScopeError,
739
986
  ReservedCollectionNameError,
987
+ ReservedVaultNameError,
740
988
  SCHEMAS_COLLECTION,
741
989
  SEALED_PASSPHRASE_RECORD_ID,
990
+ STATE_VAULT_NAME,
742
991
  STRICT_POLICY,
743
992
  SYNC_CREDENTIALS_COLLECTION,
744
993
  ScanBuilder,
@@ -746,9 +995,18 @@ export {
746
995
  SchemaLockedError,
747
996
  SchemaUpdateError,
748
997
  SchemaValidationError,
998
+ ScriptViolationError,
999
+ SealedRecordExpiredError,
1000
+ SealedRecordMismatchError,
1001
+ SequenceContentionError,
1002
+ SequenceOfflineError,
1003
+ SequenceStore,
749
1004
  SessionExpiredError,
750
1005
  SessionNotFoundError,
751
1006
  SessionPolicyError,
1007
+ ShardProvisioningError,
1008
+ SnapshotNotFoundError,
1009
+ StaticDictReadonlyError,
752
1010
  StoreCapabilityError,
753
1011
  SyncEngine,
754
1012
  SyncScheduler,
@@ -762,6 +1020,10 @@ export {
762
1020
  TxVault,
763
1021
  USER_ENVELOPE_COLLECTION,
764
1022
  USER_ENVELOPE_MAX_BYTES,
1023
+ UniqueConstraintError,
1024
+ UnknownDictCodeError,
1025
+ UnknownShardError,
1026
+ UnsupportedIndexOptionError,
765
1027
  UserApi,
766
1028
  UserEnvelopeOversizedError,
767
1029
  VISIBILITY_RECORD_PREFIX,
@@ -769,12 +1031,18 @@ export {
769
1031
  Vault,
770
1032
  VaultFrame,
771
1033
  VaultInstant,
1034
+ VaultTemplateNotFoundError,
772
1035
  WeakPassphraseError,
1036
+ WithdrawalRequestError,
773
1037
  activeSessionCount,
774
1038
  additiveOnly,
1039
+ aesGcmOpen,
1040
+ allocate,
775
1041
  applyI18nLocale,
776
1042
  applyJoins,
777
1043
  applyPatch,
1044
+ approveWithdrawal,
1045
+ asMoney,
778
1046
  assertStrongPassphrase,
779
1047
  assertTierAccess,
780
1048
  avg,
@@ -787,10 +1055,12 @@ export {
787
1055
  canonicalJson,
788
1056
  checkGate,
789
1057
  clearDevUnlock,
1058
+ compileSequenceFormat,
790
1059
  computePatch,
791
1060
  coordinatedCutover,
792
1061
  count,
793
1062
  createBundleStore,
1063
+ createDeedOwner,
794
1064
  createEnforcer,
795
1065
  createNoydb,
796
1066
  createSession,
@@ -798,6 +1068,7 @@ export {
798
1068
  credentialStatus,
799
1069
  decryptBytes,
800
1070
  decryptDeterministic,
1071
+ decryptExtractedPartition,
801
1072
  dekKey,
802
1073
  deleteCredential,
803
1074
  deleteUserEnvelope,
@@ -820,17 +1091,21 @@ export {
820
1091
  enableDevUnlock,
821
1092
  encryptBytes,
822
1093
  encryptDeterministic,
1094
+ enforceScript,
823
1095
  enrollAuthenticator,
824
1096
  envelopePayloadHash,
825
1097
  estimateEntropy,
826
1098
  estimateRecordBytes,
1099
+ evalComputedFields,
827
1100
  evaluateClause,
828
1101
  evaluateExportCapability,
829
1102
  evaluateFieldClause,
830
1103
  evaluateImportCapability,
831
1104
  executePlan,
1105
+ exportAccessibleData,
832
1106
  findAuthenticator,
833
1107
  formatDiff,
1108
+ fuseRetrieval,
834
1109
  generateULID,
835
1110
  getCredential,
836
1111
  groupAndReduce,
@@ -840,25 +1115,38 @@ export {
840
1115
  hasRecoveryEnrolled,
841
1116
  hashEntry,
842
1117
  i18nText,
1118
+ immutableGuard,
1119
+ importExternalObjects,
1120
+ inferScripts,
1121
+ isDeedVault,
843
1122
  isDevUnlockActive,
844
1123
  isDictCollectionName,
845
1124
  isDictKeyDescriptor,
1125
+ isDiscriminant,
846
1126
  isI18nTextDescriptor,
1127
+ isLinkCollectionName,
847
1128
  isMagicLinkGrantExpired,
1129
+ isMoneyDescriptor,
1130
+ isMoneyString,
848
1131
  isPreCompressed,
849
1132
  isPublicEnvelope,
1133
+ isRefArray,
850
1134
  isSessionAlive,
1135
+ isStaticDictDescriptor,
851
1136
  isULID,
852
1137
  isZodSchema,
853
1138
  issueDelegation,
854
1139
  recoverPassphrase as keyringRecoverPassphrase,
855
1140
  rotatePassphrase as keyringRotatePassphrase,
1141
+ liberateVault,
856
1142
  listCredentials,
857
1143
  listMagicLinkGrants,
858
1144
  listUserEnvelopeIds,
859
1145
  listUsers,
860
1146
  listUsersWithEnvelopes,
1147
+ listWithdrawalRequests,
861
1148
  loadActiveDelegations,
1149
+ loadDeedMarker,
862
1150
  loadDevUnlock,
863
1151
  loadPaperRecoveryEntries,
864
1152
  loadPersistedSchema,
@@ -870,15 +1158,20 @@ export {
870
1158
  lockSchema,
871
1159
  magicLinkGrantRecordId,
872
1160
  max,
1161
+ memoryObjectProjection,
873
1162
  mergeCrdtStates,
874
1163
  mergePolicy,
875
1164
  min,
876
1165
  mintPaperRecoveryEntry,
877
1166
  mintShamirRecoveryEntry,
878
1167
  mintWrappedDeksBlob,
1168
+ money,
1169
+ moneyNumber,
1170
+ mulRate,
879
1171
  paddedIndex,
880
1172
  parseBytes,
881
1173
  parseIndex,
1174
+ parseRsaOaepTlv,
882
1175
  parseSealedEnvelope,
883
1176
  persistDirectoryConfig,
884
1177
  persistSchemaIfNeeded,
@@ -890,17 +1183,23 @@ export {
890
1183
  readNoydbBundleHeader,
891
1184
  readNoydbBundlePublicEnvelope,
892
1185
  readPath,
1186
+ readPlaintextRecord,
893
1187
  readPublicEnvelope,
894
1188
  readUserVisibility,
895
1189
  recoverUser,
896
1190
  reduceRecords,
897
1191
  ref,
1192
+ refArray,
1193
+ rejectWithdrawal,
898
1194
  removeAuthenticator,
1195
+ requestWithdrawal,
899
1196
  resetBrotliSupportCache,
900
1197
  resetJoinWarnings,
901
1198
  resolveCrdtSnapshot,
902
1199
  resolveI18nText,
1200
+ resolvePolicy,
903
1201
  resolveSchema as resolvePublicEnvelopeSchema,
1202
+ resolveSequenceKey,
904
1203
  resolveSession,
905
1204
  revokeAllSessions,
906
1205
  revokeDelegation,
@@ -915,8 +1214,13 @@ export {
915
1214
  saveShamirRecoveryEntries,
916
1215
  saveUserEnvelope,
917
1216
  saveVaultPolicy,
1217
+ scaleForCurrency,
1218
+ sealRsaOaepTlv,
918
1219
  sha256Hex,
1220
+ staticDict,
919
1221
  sum,
1222
+ tokenize,
1223
+ transitionGuard,
920
1224
  unwrapDeksFromBlob,
921
1225
  unwrapDeksFromPaperEntry,
922
1226
  unwrapDeksFromShamirEntry,
@@ -928,8 +1232,10 @@ export {
928
1232
  validateSchemaOutput,
929
1233
  validateSessionPolicy,
930
1234
  visibilityRecordId,
1235
+ withArchive,
931
1236
  withCache,
932
1237
  withCircuitBreaker,
1238
+ withDeferredNumbering,
933
1239
  withDerivation,
934
1240
  withGuard,
935
1241
  withHealthCheck,
@@ -938,6 +1244,8 @@ export {
938
1244
  withMetrics,
939
1245
  withOverlayedView,
940
1246
  withRetry,
1247
+ withRollup,
1248
+ withdrawAccessibleData,
941
1249
  wrapBundleStore,
942
1250
  wrapStore,
943
1251
  writeMagicLinkGrant,