@noy-db/hub 0.2.0-pre.2 → 0.2.0-pre.21

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 (368) hide show
  1. package/README.md +126 -0
  2. package/dist/aggregate/index.cjs +643 -37
  3. package/dist/aggregate/index.cjs.map +1 -1
  4. package/dist/aggregate/index.d.cts +3 -2
  5. package/dist/aggregate/index.d.ts +3 -2
  6. package/dist/aggregate/index.js +9 -8
  7. package/dist/aggregate/index.js.map +1 -1
  8. package/dist/attestation/index.cjs.map +1 -1
  9. package/dist/attestation/index.d.cts +7 -5
  10. package/dist/attestation/index.d.ts +7 -5
  11. package/dist/attestation/index.js +6 -6
  12. package/dist/blobs/index.cjs +509 -22
  13. package/dist/blobs/index.cjs.map +1 -1
  14. package/dist/blobs/index.d.cts +9 -7
  15. package/dist/blobs/index.d.ts +9 -7
  16. package/dist/blobs/index.js +11 -6
  17. package/dist/blobs/index.js.map +1 -1
  18. package/dist/bundle/index.cjs +7886 -841
  19. package/dist/bundle/index.cjs.map +1 -1
  20. package/dist/bundle/index.d.cts +20 -18
  21. package/dist/bundle/index.d.ts +20 -18
  22. package/dist/bundle/index.js +24 -13
  23. package/dist/bundle/index.js.map +1 -1
  24. package/dist/{chunk-PFSNOPBQ.js → chunk-2XA2ZML4.js} +31 -3
  25. package/dist/chunk-2XA2ZML4.js.map +1 -0
  26. package/dist/{chunk-2PAQNPE3.js → chunk-37VGJM3T.js} +37 -2
  27. package/dist/chunk-37VGJM3T.js.map +1 -0
  28. package/dist/{chunk-7BRE6EUA.js → chunk-3HNKR65T.js} +4 -4
  29. package/dist/chunk-3HNKR65T.js.map +1 -0
  30. package/dist/{chunk-Y2RKOPNC.js → chunk-5YTXYPES.js} +46 -10
  31. package/dist/chunk-5YTXYPES.js.map +1 -0
  32. package/dist/{chunk-OVZDFEOR.js → chunk-6QAZ5O6X.js} +2 -2
  33. package/dist/chunk-6QAZ5O6X.js.map +1 -0
  34. package/dist/{chunk-RTZVQAJ7.js → chunk-6QE4DUYC.js} +19 -4
  35. package/dist/chunk-6QE4DUYC.js.map +1 -0
  36. package/dist/{chunk-7Q5PLD5C.js → chunk-7MRT7EPB.js} +3 -3
  37. package/dist/{chunk-E535SAN4.js → chunk-7PH4OPBZ.js} +4258 -520
  38. package/dist/chunk-7PH4OPBZ.js.map +1 -0
  39. package/dist/{chunk-PEULZC6M.js → chunk-A3JMGXPG.js} +8 -1
  40. package/dist/chunk-A3JMGXPG.js.map +1 -0
  41. package/dist/{chunk-UMLVJTYV.js → chunk-ADB7GPM3.js} +7 -4
  42. package/dist/chunk-ADB7GPM3.js.map +1 -0
  43. package/dist/{chunk-G6FRSBKK.js → chunk-AI4USDRI.js} +4 -4
  44. package/dist/chunk-BZW5IL43.js +151 -0
  45. package/dist/chunk-BZW5IL43.js.map +1 -0
  46. package/dist/chunk-C2RJVZZL.js +123 -0
  47. package/dist/chunk-C2RJVZZL.js.map +1 -0
  48. package/dist/{chunk-UND4XIB6.js → chunk-C6W5KVDV.js} +52 -38
  49. package/dist/chunk-C6W5KVDV.js.map +1 -0
  50. package/dist/chunk-CQYEDODS.js +125 -0
  51. package/dist/chunk-CQYEDODS.js.map +1 -0
  52. package/dist/{chunk-NWZ3I6R6.js → chunk-EYK72OTL.js} +5 -5
  53. package/dist/{chunk-7BUTTVMR.js → chunk-F5GWNSE2.js} +2 -2
  54. package/dist/{chunk-AHPFONIL.js → chunk-F5ILTHMU.js} +5 -5
  55. package/dist/{chunk-Q6W2CMEJ.js → chunk-FRRJIUSI.js} +18 -5
  56. package/dist/chunk-FRRJIUSI.js.map +1 -0
  57. package/dist/{chunk-YMYK7US4.js → chunk-GJTKMME7.js} +2 -2
  58. package/dist/chunk-GJTKMME7.js.map +1 -0
  59. package/dist/{chunk-EUYOGYGV.js → chunk-HYJMAV53.js} +6 -6
  60. package/dist/chunk-HYJMAV53.js.map +1 -0
  61. package/dist/{chunk-QPEXPHJR.js → chunk-I3IYTUUI.js} +4 -4
  62. package/dist/{chunk-3QAKZ37R.js → chunk-IVZWHIEK.js} +5 -5
  63. package/dist/{chunk-PLI5TV7N.js → chunk-IW4L4X65.js} +2 -2
  64. package/dist/chunk-IW4L4X65.js.map +1 -0
  65. package/dist/{chunk-3Z2TPHC4.js → chunk-IY24WS2P.js} +69 -5
  66. package/dist/chunk-IY24WS2P.js.map +1 -0
  67. package/dist/{chunk-HXJXPZRE.js → chunk-J6RGRZOY.js} +10 -3
  68. package/dist/chunk-J6RGRZOY.js.map +1 -0
  69. package/dist/{chunk-3S4BJX25.js → chunk-JBBWALNI.js} +2 -2
  70. package/dist/chunk-JBBWALNI.js.map +1 -0
  71. package/dist/{chunk-7Z23ZFLV.js → chunk-JDCPRJVS.js} +5 -5
  72. package/dist/chunk-JDCPRJVS.js.map +1 -0
  73. package/dist/{chunk-243PNUA6.js → chunk-JOK73NDT.js} +3 -3
  74. package/dist/chunk-JTI57WRT.js +164 -0
  75. package/dist/chunk-JTI57WRT.js.map +1 -0
  76. package/dist/{chunk-VRBCTEKQ.js → chunk-JYNH4FIM.js} +233 -11
  77. package/dist/chunk-JYNH4FIM.js.map +1 -0
  78. package/dist/{chunk-TBKOGSYR.js → chunk-KOAJ3TZM.js} +27 -5
  79. package/dist/chunk-KOAJ3TZM.js.map +1 -0
  80. package/dist/{chunk-YTXSFG3C.js → chunk-MBXKRHSS.js} +50 -20
  81. package/dist/chunk-MBXKRHSS.js.map +1 -0
  82. package/dist/{chunk-MUWOSVEP.js → chunk-NSXNXLYM.js} +10 -2
  83. package/dist/chunk-NSXNXLYM.js.map +1 -0
  84. package/dist/{chunk-J4KLMEUL.js → chunk-NV4IHBZS.js} +664 -51
  85. package/dist/chunk-NV4IHBZS.js.map +1 -0
  86. package/dist/{chunk-LRAZDV5X.js → chunk-O5XKZCUD.js} +31 -8
  87. package/dist/chunk-O5XKZCUD.js.map +1 -0
  88. package/dist/{chunk-W3XXT26A.js → chunk-OTWT6BAJ.js} +358 -3
  89. package/dist/chunk-OTWT6BAJ.js.map +1 -0
  90. package/dist/{chunk-XG3PTSCD.js → chunk-PDVP3C2I.js} +1 -1
  91. package/dist/chunk-PDVP3C2I.js.map +1 -0
  92. package/dist/{chunk-GIV6DWBG.js → chunk-S45MDEEF.js} +44 -5
  93. package/dist/chunk-S45MDEEF.js.map +1 -0
  94. package/dist/{chunk-VK5EER6C.js → chunk-SQKAECUL.js} +2 -2
  95. package/dist/{chunk-FAQVNJD4.js → chunk-SQOK5UM6.js} +12 -2
  96. package/dist/{chunk-FAQVNJD4.js.map → chunk-SQOK5UM6.js.map} +1 -1
  97. package/dist/chunk-STNPB3UM.js +9 -0
  98. package/dist/chunk-STNPB3UM.js.map +1 -0
  99. package/dist/{chunk-YS3POABP.js → chunk-TA6HPKWQ.js} +1 -1
  100. package/dist/chunk-TA6HPKWQ.js.map +1 -0
  101. package/dist/{chunk-4HIL6AHQ.js → chunk-TAMRU7A2.js} +4 -4
  102. package/dist/{chunk-QXQRKXCU.js → chunk-TGIJTNM3.js} +2 -2
  103. package/dist/chunk-TNH5SLCD.js +361 -0
  104. package/dist/chunk-TNH5SLCD.js.map +1 -0
  105. package/dist/{chunk-VPSUZLOJ.js → chunk-TYMDCIQM.js} +31 -5
  106. package/dist/chunk-TYMDCIQM.js.map +1 -0
  107. package/dist/chunk-U2XSUCDF.js +524 -0
  108. package/dist/chunk-U2XSUCDF.js.map +1 -0
  109. package/dist/{chunk-3Y53S2SA.js → chunk-UU6M64HI.js} +4 -4
  110. package/dist/{chunk-VCGTOS2A.js → chunk-WE2BUQD2.js} +3 -3
  111. package/dist/chunk-WE2BUQD2.js.map +1 -0
  112. package/dist/{chunk-JYQTXEIO.js → chunk-WWVJXBOT.js} +449 -29
  113. package/dist/chunk-WWVJXBOT.js.map +1 -0
  114. package/dist/chunk-YPIOFSN3.js +129 -0
  115. package/dist/chunk-YPIOFSN3.js.map +1 -0
  116. package/dist/chunk-ZC7J6ZYV.js +7 -0
  117. package/dist/chunk-ZC7J6ZYV.js.map +1 -0
  118. package/dist/{chunk-5ZGZ6HIZ.js → chunk-ZONKSLF2.js} +30 -7
  119. package/dist/chunk-ZONKSLF2.js.map +1 -0
  120. package/dist/consent/index.cjs.map +1 -1
  121. package/dist/consent/index.d.cts +8 -6
  122. package/dist/consent/index.d.ts +8 -6
  123. package/dist/consent/index.js +3 -3
  124. package/dist/{crypto-5ZDIY3NG.js → crypto-456N7UVX.js} +7 -3
  125. package/dist/{delegation-QYXZW25W.js → delegation-DP4COTXB.js} +5 -5
  126. package/dist/derivations/index.cjs +124 -6
  127. package/dist/derivations/index.cjs.map +1 -1
  128. package/dist/derivations/index.d.cts +11 -9
  129. package/dist/derivations/index.d.ts +11 -9
  130. package/dist/derivations/index.js +8 -6
  131. package/dist/{dev-unlock-DQCNDfFp.d.cts → dev-unlock-CY0HIZA0.d.cts} +1 -1
  132. package/dist/{dev-unlock-utkybTKb.d.ts → dev-unlock-CpKSkl2c.d.ts} +1 -1
  133. package/dist/discriminant-BN9REW3o.d.cts +60 -0
  134. package/dist/discriminant-BN9REW3o.d.ts +60 -0
  135. package/dist/errors-Dkc_fi-S.d.cts +1467 -0
  136. package/dist/errors-Dkc_fi-S.d.ts +1467 -0
  137. package/dist/executor-4IEW4KG5.js +8 -0
  138. package/dist/executor-KYJCJCIN.js +12 -0
  139. package/dist/executor-W7VIBOBZ.js +8 -0
  140. package/dist/{fanout-sidecar-VJ52RIEY.js → fanout-sidecar-YXNAEZ33.js} +2 -2
  141. package/dist/fanout-sidecar-YXNAEZ33.js.map +1 -0
  142. package/dist/forget/index.cjs +43 -0
  143. package/dist/forget/index.cjs.map +1 -0
  144. package/dist/forget/index.d.cts +1 -0
  145. package/dist/forget/index.d.ts +1 -0
  146. package/dist/forget/index.js +14 -0
  147. package/dist/guards/index.cjs +144 -4
  148. package/dist/guards/index.cjs.map +1 -1
  149. package/dist/guards/index.d.cts +16 -8
  150. package/dist/guards/index.d.ts +16 -8
  151. package/dist/guards/index.js +13 -7
  152. package/dist/{hash-jDowCrK2.d.cts → hash-BSd0-_L8.d.cts} +1 -1
  153. package/dist/{hash-DcoYWfJ_.d.ts → hash-BnBQx39y.d.ts} +1 -1
  154. package/dist/history/index.cjs +28 -5
  155. package/dist/history/index.cjs.map +1 -1
  156. package/dist/history/index.d.cts +9 -7
  157. package/dist/history/index.d.ts +9 -7
  158. package/dist/history/index.js +9 -7
  159. package/dist/history/index.js.map +1 -1
  160. package/dist/i18n/index.cjs +356 -26
  161. package/dist/i18n/index.cjs.map +1 -1
  162. package/dist/i18n/index.d.cts +8 -6
  163. package/dist/i18n/index.d.ts +8 -6
  164. package/dist/i18n/index.js +36 -15
  165. package/dist/i18n/index.js.map +1 -1
  166. package/dist/index-BMmajblo.d.cts +362 -0
  167. package/dist/index-BMmajblo.d.ts +362 -0
  168. package/dist/{index-BCKdioeh.d.ts → index-Bm9hIY7t.d.ts} +169 -1127
  169. package/dist/{index-BMjrzNZr.d.cts → index-tZqVB9g5.d.cts} +169 -1127
  170. package/dist/index.cjs +10286 -2168
  171. package/dist/index.cjs.map +1 -1
  172. package/dist/index.d.cts +258 -23
  173. package/dist/index.d.ts +258 -23
  174. package/dist/index.js +443 -110
  175. package/dist/index.js.map +1 -1
  176. package/dist/indexing/index.cjs +97 -32
  177. package/dist/indexing/index.cjs.map +1 -1
  178. package/dist/indexing/index.d.cts +3 -3
  179. package/dist/indexing/index.d.ts +3 -3
  180. package/dist/indexing/index.js +4 -4
  181. package/dist/issue-JXC6T2QR.js +12 -0
  182. package/dist/{lazy-builder-Rpd-V3jP.d.ts → lazy-builder-ChSqcF5t.d.ts} +2 -2
  183. package/dist/{lazy-builder-C-rPfWG0.d.cts → lazy-builder-eYZzLEL1.d.cts} +2 -2
  184. package/dist/{ledger-3IU5GMXA.js → ledger-I7JUYP4L.js} +6 -6
  185. package/dist/materialized-views/index.cjs +687 -13
  186. package/dist/materialized-views/index.cjs.map +1 -1
  187. package/dist/materialized-views/index.d.cts +23 -20
  188. package/dist/materialized-views/index.d.ts +23 -20
  189. package/dist/materialized-views/index.js +8 -7
  190. package/dist/mime-magic-BnJCGJzB.d.cts +103 -0
  191. package/dist/mime-magic-CjSyakO4.d.ts +103 -0
  192. package/dist/noydb-ZZCRF6TE.js +38 -0
  193. package/dist/overlay-views/index.cjs +58 -18
  194. package/dist/overlay-views/index.cjs.map +1 -1
  195. package/dist/overlay-views/index.d.cts +32 -12
  196. package/dist/overlay-views/index.d.ts +32 -12
  197. package/dist/overlay-views/index.js +6 -6
  198. package/dist/periods/index.cjs.map +1 -1
  199. package/dist/periods/index.d.cts +8 -6
  200. package/dist/periods/index.d.ts +8 -6
  201. package/dist/periods/index.js +6 -6
  202. package/dist/{predicate-Dnu81tsS.d.cts → predicate-BmhBSPCH.d.cts} +87 -5
  203. package/dist/{predicate-Dnu81tsS.d.ts → predicate-BmhBSPCH.d.ts} +87 -5
  204. package/dist/{public-envelope-U3CMEOMV.js → public-envelope-5XRTUNKF.js} +4 -4
  205. package/dist/query/index.cjs +1438 -130
  206. package/dist/query/index.cjs.map +1 -1
  207. package/dist/query/index.d.cts +4 -3
  208. package/dist/query/index.d.ts +4 -3
  209. package/dist/query/index.js +13 -6
  210. package/dist/read-only-facade-EX6WZZBP.js +7 -0
  211. package/dist/registry-ATRHOG5B.js +8 -0
  212. package/dist/registry-DKEXOJVO.js +7 -0
  213. package/dist/registry-LEHB26TY.js +8 -0
  214. package/dist/{registry-3ALP62P6.js → registry-NWHOLD5M.js} +3 -3
  215. package/dist/{revoke-KY2GB4KP.js → revoke-5IEK22KT.js} +6 -6
  216. package/dist/sealed-record/index.cjs +139 -0
  217. package/dist/sealed-record/index.cjs.map +1 -0
  218. package/dist/sealed-record/index.d.cts +123 -0
  219. package/dist/sealed-record/index.d.ts +123 -0
  220. package/dist/sealed-record/index.js +42 -0
  221. package/dist/sealed-record/index.js.map +1 -0
  222. package/dist/session/index.cjs.map +1 -1
  223. package/dist/session/index.d.cts +9 -7
  224. package/dist/session/index.d.ts +9 -7
  225. package/dist/session/index.js +3 -3
  226. package/dist/shadow/index.cjs.map +1 -1
  227. package/dist/shadow/index.d.cts +8 -6
  228. package/dist/shadow/index.d.ts +8 -6
  229. package/dist/shadow/index.js +2 -2
  230. package/dist/{signer-GRI5TZKH.js → signer-I6YARZQA.js} +5 -5
  231. package/dist/snapshots/index.cjs +937 -0
  232. package/dist/snapshots/index.cjs.map +1 -0
  233. package/dist/snapshots/index.d.cts +30 -0
  234. package/dist/snapshots/index.d.ts +30 -0
  235. package/dist/snapshots/index.js +152 -0
  236. package/dist/snapshots/index.js.map +1 -0
  237. package/dist/{stale-OTOF3FH7.js → stale-CPESGAPL.js} +2 -2
  238. package/dist/stale-CPESGAPL.js.map +1 -0
  239. package/dist/state-vault-JR3CFGNP.js +14 -0
  240. package/dist/state-vault-JR3CFGNP.js.map +1 -0
  241. package/dist/store/index.cjs +8 -0
  242. package/dist/store/index.cjs.map +1 -1
  243. package/dist/store/index.d.cts +15 -6
  244. package/dist/store/index.d.ts +15 -6
  245. package/dist/store/index.js +2 -2
  246. package/dist/{strategy-DSTrsZ8t.d.ts → strategy-54eIwox5.d.ts} +456 -7
  247. package/dist/{strategy-DSTrsZ8t.d.cts → strategy-WtB-jXYv.d.cts} +456 -7
  248. package/dist/sync/index.cjs.map +1 -1
  249. package/dist/sync/index.d.cts +7 -5
  250. package/dist/sync/index.d.ts +7 -5
  251. package/dist/sync/index.js +4 -4
  252. package/dist/team/index.cjs +1 -1
  253. package/dist/team/index.cjs.map +1 -1
  254. package/dist/team/index.d.cts +8 -6
  255. package/dist/team/index.d.ts +8 -6
  256. package/dist/team/index.js +8 -8
  257. package/dist/transition-guard-D4bfIAiW.d.ts +165 -0
  258. package/dist/transition-guard-Dmpqzg-_.d.cts +165 -0
  259. package/dist/tx/index.cjs +155 -5
  260. package/dist/tx/index.cjs.map +1 -1
  261. package/dist/tx/index.d.cts +27 -9
  262. package/dist/tx/index.d.ts +27 -9
  263. package/dist/tx/index.js +61 -4
  264. package/dist/tx/index.js.map +1 -1
  265. package/dist/{types-BoFFiskX.d.ts → types-DLfWFr6U.d.ts} +3997 -1262
  266. package/dist/{types-DJG8HG6F.d.cts → types-DyOI6XZ_.d.cts} +3997 -1262
  267. package/dist/{ulid-BmBgooGm.d.ts → ulid-B2L_aqVA.d.ts} +19 -19
  268. package/dist/{ulid-C7ms9oli.d.cts → ulid-LaxfH2tK.d.cts} +19 -19
  269. package/dist/util/index.cjs +7 -0
  270. package/dist/util/index.cjs.map +1 -1
  271. package/dist/util/index.d.cts +2 -0
  272. package/dist/util/index.d.ts +2 -0
  273. package/dist/util/index.js +5 -1
  274. package/dist/util/index.js.map +1 -1
  275. package/dist/vault-group-BB246VIM.js +804 -0
  276. package/dist/vault-group-BB246VIM.js.map +1 -0
  277. package/dist/{with-materialized-view-CqnRwI2S.d.ts → with-materialized-view-CeZYGJVf.d.cts} +2 -2
  278. package/dist/{with-materialized-view-BbEPFIIJ.d.cts → with-materialized-view-DNULSxoP.d.ts} +2 -2
  279. package/dist/{with-overlayed-view-Ct1fSJt-.d.ts → with-overlayed-view-C9joG7UZ.d.ts} +2 -2
  280. package/dist/{with-overlayed-view-bwlmmFjx.d.cts → with-overlayed-view-kdcPGHih.d.cts} +2 -2
  281. package/dist/with-rollup-DJDbrxjf.d.ts +47 -0
  282. package/dist/with-rollup-s58XAeWO.d.cts +47 -0
  283. package/package.json +35 -4
  284. package/dist/chunk-2PAQNPE3.js.map +0 -1
  285. package/dist/chunk-3S4BJX25.js.map +0 -1
  286. package/dist/chunk-3XHOCQK4.js +0 -118
  287. package/dist/chunk-3XHOCQK4.js.map +0 -1
  288. package/dist/chunk-3Z2TPHC4.js.map +0 -1
  289. package/dist/chunk-5ZGZ6HIZ.js.map +0 -1
  290. package/dist/chunk-7BRE6EUA.js.map +0 -1
  291. package/dist/chunk-7Z23ZFLV.js.map +0 -1
  292. package/dist/chunk-CXSCDO5T.js +0 -51
  293. package/dist/chunk-CXSCDO5T.js.map +0 -1
  294. package/dist/chunk-E535SAN4.js.map +0 -1
  295. package/dist/chunk-EUYOGYGV.js.map +0 -1
  296. package/dist/chunk-GIV6DWBG.js.map +0 -1
  297. package/dist/chunk-HXJXPZRE.js.map +0 -1
  298. package/dist/chunk-J4KLMEUL.js.map +0 -1
  299. package/dist/chunk-JYQTXEIO.js.map +0 -1
  300. package/dist/chunk-LRAZDV5X.js.map +0 -1
  301. package/dist/chunk-MRIBLZL3.js +0 -86
  302. package/dist/chunk-MRIBLZL3.js.map +0 -1
  303. package/dist/chunk-MUWOSVEP.js.map +0 -1
  304. package/dist/chunk-OVZDFEOR.js.map +0 -1
  305. package/dist/chunk-PEULZC6M.js.map +0 -1
  306. package/dist/chunk-PFSNOPBQ.js.map +0 -1
  307. package/dist/chunk-PLI5TV7N.js.map +0 -1
  308. package/dist/chunk-Q6W2CMEJ.js.map +0 -1
  309. package/dist/chunk-RTZVQAJ7.js.map +0 -1
  310. package/dist/chunk-TBKOGSYR.js.map +0 -1
  311. package/dist/chunk-UMLVJTYV.js.map +0 -1
  312. package/dist/chunk-UND4XIB6.js.map +0 -1
  313. package/dist/chunk-VCGTOS2A.js.map +0 -1
  314. package/dist/chunk-VE6YVP32.js +0 -19
  315. package/dist/chunk-VE6YVP32.js.map +0 -1
  316. package/dist/chunk-VPSUZLOJ.js.map +0 -1
  317. package/dist/chunk-VRBCTEKQ.js.map +0 -1
  318. package/dist/chunk-W3XXT26A.js.map +0 -1
  319. package/dist/chunk-XG3PTSCD.js.map +0 -1
  320. package/dist/chunk-Y2RKOPNC.js.map +0 -1
  321. package/dist/chunk-YMYK7US4.js.map +0 -1
  322. package/dist/chunk-YS3POABP.js.map +0 -1
  323. package/dist/chunk-YTXSFG3C.js.map +0 -1
  324. package/dist/executor-AS2IDHKZ.js +0 -11
  325. package/dist/executor-HLXFXNFM.js +0 -8
  326. package/dist/executor-HN6YBHZ5.js +0 -8
  327. package/dist/fanout-sidecar-VJ52RIEY.js.map +0 -1
  328. package/dist/issue-ORP37MVW.js +0 -12
  329. package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
  330. package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
  331. package/dist/noydb-5H3C24GG.js +0 -34
  332. package/dist/read-only-facade-ITU6L7BL.js +0 -7
  333. package/dist/registry-7HE6VJGC.js +0 -8
  334. package/dist/registry-PSIPG2QR.js +0 -8
  335. package/dist/registry-RFGGMVNJ.js +0 -7
  336. package/dist/with-derivation-BKXXa8Vt.d.ts +0 -13
  337. package/dist/with-derivation-BjQ7q4NE.d.cts +0 -13
  338. package/dist/with-guard-C25yNjzd.d.ts +0 -18
  339. package/dist/with-guard-DQme5DKE.d.cts +0 -18
  340. /package/dist/{chunk-7Q5PLD5C.js.map → chunk-7MRT7EPB.js.map} +0 -0
  341. /package/dist/{chunk-G6FRSBKK.js.map → chunk-AI4USDRI.js.map} +0 -0
  342. /package/dist/{chunk-NWZ3I6R6.js.map → chunk-EYK72OTL.js.map} +0 -0
  343. /package/dist/{chunk-7BUTTVMR.js.map → chunk-F5GWNSE2.js.map} +0 -0
  344. /package/dist/{chunk-AHPFONIL.js.map → chunk-F5ILTHMU.js.map} +0 -0
  345. /package/dist/{chunk-QPEXPHJR.js.map → chunk-I3IYTUUI.js.map} +0 -0
  346. /package/dist/{chunk-3QAKZ37R.js.map → chunk-IVZWHIEK.js.map} +0 -0
  347. /package/dist/{chunk-243PNUA6.js.map → chunk-JOK73NDT.js.map} +0 -0
  348. /package/dist/{chunk-VK5EER6C.js.map → chunk-SQKAECUL.js.map} +0 -0
  349. /package/dist/{chunk-4HIL6AHQ.js.map → chunk-TAMRU7A2.js.map} +0 -0
  350. /package/dist/{chunk-QXQRKXCU.js.map → chunk-TGIJTNM3.js.map} +0 -0
  351. /package/dist/{chunk-3Y53S2SA.js.map → chunk-UU6M64HI.js.map} +0 -0
  352. /package/dist/{crypto-5ZDIY3NG.js.map → crypto-456N7UVX.js.map} +0 -0
  353. /package/dist/{delegation-QYXZW25W.js.map → delegation-DP4COTXB.js.map} +0 -0
  354. /package/dist/{executor-AS2IDHKZ.js.map → executor-4IEW4KG5.js.map} +0 -0
  355. /package/dist/{executor-HLXFXNFM.js.map → executor-KYJCJCIN.js.map} +0 -0
  356. /package/dist/{executor-HN6YBHZ5.js.map → executor-W7VIBOBZ.js.map} +0 -0
  357. /package/dist/{issue-ORP37MVW.js.map → forget/index.js.map} +0 -0
  358. /package/dist/{ledger-3IU5GMXA.js.map → issue-JXC6T2QR.js.map} +0 -0
  359. /package/dist/{noydb-5H3C24GG.js.map → ledger-I7JUYP4L.js.map} +0 -0
  360. /package/dist/{public-envelope-U3CMEOMV.js.map → noydb-ZZCRF6TE.js.map} +0 -0
  361. /package/dist/{read-only-facade-ITU6L7BL.js.map → public-envelope-5XRTUNKF.js.map} +0 -0
  362. /package/dist/{registry-3ALP62P6.js.map → read-only-facade-EX6WZZBP.js.map} +0 -0
  363. /package/dist/{registry-7HE6VJGC.js.map → registry-ATRHOG5B.js.map} +0 -0
  364. /package/dist/{registry-PSIPG2QR.js.map → registry-DKEXOJVO.js.map} +0 -0
  365. /package/dist/{registry-RFGGMVNJ.js.map → registry-LEHB26TY.js.map} +0 -0
  366. /package/dist/{revoke-KY2GB4KP.js.map → registry-NWHOLD5M.js.map} +0 -0
  367. /package/dist/{signer-GRI5TZKH.js.map → revoke-5IEK22KT.js.map} +0 -0
  368. /package/dist/{stale-OTOF3FH7.js.map → signer-I6YARZQA.js.map} +0 -0
package/dist/index.js CHANGED
@@ -3,12 +3,15 @@ import {
3
3
  issueDelegation,
4
4
  loadActiveDelegations,
5
5
  revokeDelegation
6
- } from "./chunk-G6FRSBKK.js";
6
+ } from "./chunk-AI4USDRI.js";
7
7
  import {
8
8
  Collection,
9
+ ComputedFieldError,
9
10
  DEFAULT_FRESHNESS_MS,
10
11
  ELEVATION_AUDIT_COLLECTION,
11
12
  ElevatedHandle,
13
+ LinkEndpointError,
14
+ LinkIntegrityError,
12
15
  Lru,
13
16
  META_COLLECTION,
14
17
  Noydb,
@@ -19,9 +22,11 @@ import {
19
22
  RefRegistry,
20
23
  RefScopeError,
21
24
  STRICT_POLICY,
25
+ SequenceStore,
22
26
  UserApi,
23
27
  Vault,
24
28
  checkGate,
29
+ compileSequenceFormat,
25
30
  createNoydb,
26
31
  derivePersistedSchema,
27
32
  describeAllUsersAuth,
@@ -30,48 +35,148 @@ import {
30
35
  describeUserAuth,
31
36
  diagramAuthConfig,
32
37
  estimateRecordBytes,
38
+ evalComputedFields,
39
+ isLinkCollectionName,
40
+ isRefArray,
33
41
  isZodSchema,
34
42
  loadVaultPolicy,
35
43
  mergePolicy,
36
44
  parseBytes,
37
45
  persistSchemaIfNeeded,
38
46
  ref,
47
+ refArray,
48
+ resolveSequenceKey,
39
49
  saveVaultPolicy,
50
+ tokenize,
40
51
  validateSchemaInput,
41
- validateSchemaOutput
42
- } from "./chunk-E535SAN4.js";
52
+ validateSchemaOutput,
53
+ withArchive
54
+ } from "./chunk-7PH4OPBZ.js";
55
+ import {
56
+ STATE_VAULT_NAME
57
+ } from "./chunk-ZC7J6ZYV.js";
58
+ import {
59
+ isDiscriminant
60
+ } from "./chunk-STNPB3UM.js";
43
61
  import {
44
62
  DEFAULT_PUBLIC_ENVELOPE_SCHEMA,
45
63
  PUBLIC_ENVELOPE_FIELDS,
46
64
  resolveSchema
47
65
  } from "./chunk-EMIGCR7X.js";
66
+ import {
67
+ immutableGuard,
68
+ transitionGuard,
69
+ withGuard
70
+ } from "./chunk-C2RJVZZL.js";
71
+ import "./chunk-ADB7GPM3.js";
72
+ import "./chunk-A3JMGXPG.js";
73
+ import "./chunk-J6RGRZOY.js";
74
+ import {
75
+ CollectionFrame,
76
+ VaultFrame
77
+ } from "./chunk-TGIJTNM3.js";
48
78
  import {
49
79
  TxCollection,
50
80
  TxContext,
51
81
  TxVault,
52
82
  runTransaction
53
- } from "./chunk-3Z2TPHC4.js";
83
+ } from "./chunk-IY24WS2P.js";
54
84
  import {
55
- withDerivation
56
- } from "./chunk-CXSCDO5T.js";
57
- import "./chunk-GIV6DWBG.js";
58
- import "./chunk-OVZDFEOR.js";
85
+ withDerivation,
86
+ withRollup
87
+ } from "./chunk-YPIOFSN3.js";
88
+ import "./chunk-S45MDEEF.js";
89
+ import "./chunk-6QAZ5O6X.js";
59
90
  import {
60
91
  withMaterializedView
61
- } from "./chunk-RTZVQAJ7.js";
62
- import "./chunk-Y2RKOPNC.js";
63
- import "./chunk-TBKOGSYR.js";
64
- import "./chunk-PLI5TV7N.js";
92
+ } from "./chunk-6QE4DUYC.js";
93
+ import "./chunk-5YTXYPES.js";
94
+ import "./chunk-KOAJ3TZM.js";
95
+ import "./chunk-IW4L4X65.js";
65
96
  import {
66
97
  withOverlayedView
67
- } from "./chunk-3S4BJX25.js";
68
- import "./chunk-YTXSFG3C.js";
69
- import "./chunk-FAQVNJD4.js";
70
- import "./chunk-7BRE6EUA.js";
98
+ } from "./chunk-JBBWALNI.js";
99
+ import "./chunk-SQOK5UM6.js";
100
+ import "./chunk-MBXKRHSS.js";
101
+ import {
102
+ DEFAULT_CROSS_JOIN_MAX_ROWS,
103
+ DEFAULT_JOIN_MAX_ROWS,
104
+ Query,
105
+ ScanBuilder,
106
+ applyJoins,
107
+ buildLiveQuery,
108
+ executePlan,
109
+ resetJoinWarnings
110
+ } from "./chunk-NV4IHBZS.js";
111
+ import {
112
+ BLOB_CHUNKS_COLLECTION,
113
+ BLOB_COLLECTION,
114
+ BLOB_INDEX_COLLECTION,
115
+ BLOB_SLOTS_PREFIX,
116
+ BLOB_VERSIONS_PREFIX,
117
+ BlobSet,
118
+ DEFAULT_CHUNK_SIZE,
119
+ detectMagic,
120
+ detectMimeType,
121
+ importExternalObjects,
122
+ isPreCompressed,
123
+ memoryObjectProjection
124
+ } from "./chunk-WWVJXBOT.js";
125
+ import "./chunk-2XA2ZML4.js";
126
+ import "./chunk-3HNKR65T.js";
127
+ import {
128
+ CollectionIndexes
129
+ } from "./chunk-GJTKMME7.js";
130
+ import {
131
+ avg,
132
+ count,
133
+ max,
134
+ min,
135
+ sum
136
+ } from "./chunk-ZONKSLF2.js";
137
+ import {
138
+ Aggregation,
139
+ GROUPBY_MAX_CARDINALITY,
140
+ GROUPBY_WARN_CARDINALITY,
141
+ GroupedAggregation,
142
+ GroupedQuery,
143
+ GroupedQueryN,
144
+ groupAndReduce,
145
+ reduceRecords
146
+ } from "./chunk-JYNH4FIM.js";
147
+ import {
148
+ MoneyCurrencyError,
149
+ MoneyPrecisionError,
150
+ MoneyUnsupportedError,
151
+ decimalScaleOf,
152
+ evaluateClause,
153
+ evaluateFieldClause,
154
+ formatScaledInt,
155
+ isMoneyDescriptor,
156
+ money,
157
+ parseToScaledInt,
158
+ readPath,
159
+ rescaleScaledInt,
160
+ scaleForCurrency
161
+ } from "./chunk-U2XSUCDF.js";
71
162
  import {
72
163
  mergeCrdtStates,
73
164
  resolveCrdtSnapshot
74
165
  } from "./chunk-J66GRPNH.js";
166
+ import {
167
+ MemoryRecipientSealer,
168
+ MemorySealingKeyProvider,
169
+ SCHEMAS_COLLECTION,
170
+ SEALED_PASSPHRASE_RECORD_ID,
171
+ aesGcmOpen,
172
+ loadPersistedSchema,
173
+ loadSealedPassphrase,
174
+ parseRsaOaepTlv,
175
+ parseSealedEnvelope,
176
+ savePersistedSchema,
177
+ saveSealedPassphrase,
178
+ sealRsaOaepTlv
179
+ } from "./chunk-C6W5KVDV.js";
75
180
  import {
76
181
  NOYDB_BUNDLE_FORMAT_VERSION,
77
182
  NOYDB_BUNDLE_MAGIC,
@@ -82,18 +187,7 @@ import {
82
187
  readNoydbBundlePublicEnvelope,
83
188
  resetBrotliSupportCache,
84
189
  writeNoydbBundle
85
- } from "./chunk-VCGTOS2A.js";
86
- import {
87
- MemoryRecipientSealer,
88
- MemorySealingKeyProvider,
89
- SCHEMAS_COLLECTION,
90
- SEALED_PASSPHRASE_RECORD_ID,
91
- loadPersistedSchema,
92
- loadSealedPassphrase,
93
- parseSealedEnvelope,
94
- savePersistedSchema,
95
- saveSealedPassphrase
96
- } from "./chunk-UND4XIB6.js";
190
+ } from "./chunk-WE2BUQD2.js";
97
191
  import {
98
192
  PUBLIC_ENVELOPE_RECORD_ID,
99
193
  isPublicEnvelope,
@@ -101,39 +195,35 @@ import {
101
195
  readPublicEnvelope,
102
196
  savePublicEnvelope,
103
197
  validatePublicEnvelopeInput
104
- } from "./chunk-243PNUA6.js";
198
+ } from "./chunk-JOK73NDT.js";
199
+ import "./chunk-BZW5IL43.js";
105
200
  import {
106
201
  CONSENT_AUDIT_COLLECTION
107
- } from "./chunk-VK5EER6C.js";
202
+ } from "./chunk-SQKAECUL.js";
108
203
  import {
109
204
  PERIODS_COLLECTION
110
- } from "./chunk-QPEXPHJR.js";
205
+ } from "./chunk-I3IYTUUI.js";
111
206
  import "./chunk-UF3BUNQZ.js";
112
207
  import {
113
- withGuard
114
- } from "./chunk-VE6YVP32.js";
115
- import "./chunk-PEULZC6M.js";
116
- import "./chunk-UMLVJTYV.js";
117
- import "./chunk-HXJXPZRE.js";
118
- import {
119
- CollectionFrame,
120
- VaultFrame
121
- } from "./chunk-QXQRKXCU.js";
208
+ DICT_COLLECTION_PREFIX,
209
+ DictionaryHandle,
210
+ dictCollectionName,
211
+ dictKey,
212
+ isDictCollectionName,
213
+ isDictKeyDescriptor,
214
+ isStaticDictDescriptor,
215
+ staticDict
216
+ } from "./chunk-O5XKZCUD.js";
122
217
  import {
123
218
  applyI18nLocale,
219
+ enforceScript,
124
220
  i18nText,
221
+ inferScripts,
125
222
  isI18nTextDescriptor,
126
223
  resolveI18nText,
224
+ resolvePolicy,
127
225
  validateI18nTextValue
128
- } from "./chunk-3XHOCQK4.js";
129
- import {
130
- DICT_COLLECTION_PREFIX,
131
- DictionaryHandle,
132
- dictCollectionName,
133
- dictKey,
134
- isDictCollectionName,
135
- isDictKeyDescriptor
136
- } from "./chunk-LRAZDV5X.js";
226
+ } from "./chunk-TNH5SLCD.js";
137
227
  import {
138
228
  createBundleStore,
139
229
  routeStore,
@@ -145,7 +235,7 @@ import {
145
235
  withRetry,
146
236
  wrapBundleStore,
147
237
  wrapStore
148
- } from "./chunk-MUWOSVEP.js";
238
+ } from "./chunk-NSXNXLYM.js";
149
239
  import {
150
240
  SYNC_CREDENTIALS_COLLECTION,
151
241
  credentialStatus,
@@ -153,7 +243,7 @@ import {
153
243
  getCredential,
154
244
  listCredentials,
155
245
  putCredential
156
- } from "./chunk-NWZ3I6R6.js";
246
+ } from "./chunk-EYK72OTL.js";
157
247
  import {
158
248
  MAGIC_LINK_CONTENT_INFO_PREFIX,
159
249
  MAGIC_LINK_GRANTS_COLLECTION,
@@ -188,17 +278,17 @@ import {
188
278
  unwrapDeksFromShamirEntry,
189
279
  unwrapMagicLinkGrant,
190
280
  writeMagicLinkGrant
191
- } from "./chunk-EUYOGYGV.js";
281
+ } from "./chunk-HYJMAV53.js";
192
282
  import {
193
283
  assertTierAccess,
194
284
  dekKey,
195
285
  effectiveClearance
196
- } from "./chunk-7BUTTVMR.js";
286
+ } from "./chunk-F5GWNSE2.js";
197
287
  import {
198
288
  PresenceHandle,
199
289
  SyncEngine,
200
290
  SyncTransaction
201
- } from "./chunk-3Y53S2SA.js";
291
+ } from "./chunk-UU6M64HI.js";
202
292
  import {
203
293
  DIRECTORY_RECORD_ID,
204
294
  USER_ENVELOPE_COLLECTION,
@@ -226,7 +316,7 @@ import {
226
316
  saveUserEnvelope,
227
317
  validatePassphrase,
228
318
  visibilityRecordId
229
- } from "./chunk-Q6W2CMEJ.js";
319
+ } from "./chunk-FRRJIUSI.js";
230
320
  import {
231
321
  BUNDLE_STORE_POLICY,
232
322
  INDEXED_STORE_POLICY,
@@ -246,7 +336,7 @@ import {
246
336
  revokeAllSessions,
247
337
  revokeSession,
248
338
  validateSessionPolicy
249
- } from "./chunk-7Q5PLD5C.js";
339
+ } from "./chunk-7MRT7EPB.js";
250
340
  import {
251
341
  generateULID,
252
342
  isULID
@@ -256,14 +346,14 @@ import {
256
346
  VaultInstant,
257
347
  diff,
258
348
  formatDiff
259
- } from "./chunk-VPSUZLOJ.js";
349
+ } from "./chunk-TYMDCIQM.js";
260
350
  import {
261
351
  LEDGER_COLLECTION,
262
352
  LEDGER_DELTAS_COLLECTION,
263
353
  LedgerStore,
264
354
  applyPatch,
265
355
  computePatch
266
- } from "./chunk-7Z23ZFLV.js";
356
+ } from "./chunk-JDCPRJVS.js";
267
357
  import {
268
358
  canonicalJson,
269
359
  envelopePayloadHash,
@@ -271,61 +361,15 @@ import {
271
361
  paddedIndex,
272
362
  parseIndex,
273
363
  sha256Hex
274
- } from "./chunk-XG3PTSCD.js";
275
- import {
276
- DEFAULT_JOIN_MAX_ROWS,
277
- Query,
278
- ScanBuilder,
279
- applyJoins,
280
- buildLiveQuery,
281
- executePlan,
282
- resetJoinWarnings
283
- } from "./chunk-J4KLMEUL.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-VRBCTEKQ.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-JYQTXEIO.js";
321
- import "./chunk-PFSNOPBQ.js";
364
+ } from "./chunk-PDVP3C2I.js";
365
+ import "./chunk-CQYEDODS.js";
322
366
  import {
323
367
  NOYDB_BACKUP_VERSION,
324
368
  NOYDB_FORMAT_VERSION,
325
369
  NOYDB_KEYRING_VERSION,
326
370
  NOYDB_SYNC_VERSION,
327
371
  createStore
328
- } from "./chunk-YS3POABP.js";
372
+ } from "./chunk-TA6HPKWQ.js";
329
373
  import {
330
374
  base64ToBuffer,
331
375
  bufferToBase64,
@@ -334,7 +378,7 @@ import {
334
378
  derivePresenceKey,
335
379
  encryptBytes,
336
380
  encryptDeterministic
337
- } from "./chunk-2PAQNPE3.js";
381
+ } from "./chunk-37VGJM3T.js";
338
382
  import {
339
383
  AlreadyElevatedError,
340
384
  AmendmentForbiddenError,
@@ -345,7 +389,12 @@ import {
345
389
  BundleSealMismatchError,
346
390
  BundleVersionConflictError,
347
391
  ConflictError,
392
+ CrossJoinSourceUnknownError,
393
+ CrossJoinTooLargeError,
348
394
  DanglingReferenceError,
395
+ DataResidencyError,
396
+ DebugPlaintextError,
397
+ DebugReservedFieldError,
349
398
  DecryptionError,
350
399
  DelegationTargetMissingError,
351
400
  DerivationCapExceededError,
@@ -360,7 +409,9 @@ import {
360
409
  ExportCapabilityError,
361
410
  FieldFrozenError,
362
411
  FilenameSanitizationError,
412
+ ForgetStrategyNotConfiguredError,
363
413
  GroupCardinalityError,
414
+ IllegalTransitionError,
364
415
  ImportCapabilityError,
365
416
  IndexRequiredError,
366
417
  IndexWriteFailureError,
@@ -375,11 +426,14 @@ import {
375
426
  MaterializedViewCycleError,
376
427
  MaterializedViewSourceUnknownError,
377
428
  MaterializedViewTooLargeError,
429
+ MigrationRequiredError,
378
430
  MissingTranslationError,
379
431
  NetworkError,
380
432
  NoAccessError,
433
+ NonAdditiveSchemaChangeError,
381
434
  NotFoundError,
382
435
  NoydbError,
436
+ NumberingUncertaintyError,
383
437
  OverlayBaseIsVirtualError,
384
438
  OverlayCollectionUnavailableError,
385
439
  OverlayIdMismatchError,
@@ -388,22 +442,227 @@ import {
388
442
  PeriodClosedError,
389
443
  PermissionDeniedError,
390
444
  PrivilegeEscalationError,
445
+ QuiesceTimeoutError,
391
446
  ReadOnlyAtInstantError,
392
447
  ReadOnlyError,
393
448
  ReadOnlyFrameError,
449
+ RecordCekNotFoundError,
394
450
  RecordLockedError,
395
451
  ReservedCollectionNameError,
452
+ ReservedVaultNameError,
453
+ SchemaFenceError,
454
+ SchemaLockedError,
455
+ SchemaUpdateError,
396
456
  SchemaValidationError,
457
+ ScriptViolationError,
458
+ SealedRecordExpiredError,
459
+ SealedRecordMismatchError,
460
+ SequenceContentionError,
461
+ SequenceOfflineError,
397
462
  SessionExpiredError,
398
463
  SessionNotFoundError,
399
464
  SessionPolicyError,
465
+ ShardProvisioningError,
466
+ SnapshotNotFoundError,
467
+ StaticDictReadonlyError,
400
468
  StoreCapabilityError,
401
469
  TamperedError,
402
470
  TierDemoteDeniedError,
403
471
  TierNotGrantedError,
404
472
  TranslatorNotConfiguredError,
405
- ValidationError
406
- } from "./chunk-W3XXT26A.js";
473
+ UniqueConstraintError,
474
+ UnknownDictCodeError,
475
+ UnknownShardError,
476
+ UnsupportedIndexOptionError,
477
+ ValidationError,
478
+ VaultTemplateNotFoundError
479
+ } from "./chunk-OTWT6BAJ.js";
480
+
481
+ // src/debug.ts
482
+ function readPlaintextRecord(envelope) {
483
+ if (envelope._iv !== "") {
484
+ throw new Error(
485
+ "readPlaintextRecord: envelope is encrypted (non-empty _iv) \u2014 decrypt via the vault, not this helper"
486
+ );
487
+ }
488
+ if (envelope._debug !== void 0) {
489
+ const record = {};
490
+ for (const [key, value] of Object.entries(envelope)) {
491
+ if (!key.startsWith("_")) record[key] = value;
492
+ }
493
+ return record;
494
+ }
495
+ if (!envelope._data) return null;
496
+ return JSON.parse(envelope._data);
497
+ }
498
+
499
+ // src/schema-update/strategies.ts
500
+ function blindUpdate() {
501
+ return { name: "blindUpdate", onSchemaDelta: () => ({ action: "allow" }) };
502
+ }
503
+ function additiveOnly() {
504
+ return {
505
+ name: "additiveOnly",
506
+ onSchemaDelta(delta) {
507
+ if (delta.kind === "non-additive") {
508
+ return {
509
+ action: "reject",
510
+ error: new NonAdditiveSchemaChangeError(
511
+ `Non-additive schema change to "${delta.collection}" (added: [${delta.added.join(", ")}], removed: [${delta.removed.join(", ")}], changed: [${delta.changed.map((c) => c.field).join(", ")}]). Register a coordinatedCutover() strategy to migrate, or revert the change.`
512
+ )
513
+ };
514
+ }
515
+ return { action: "allow" };
516
+ }
517
+ };
518
+ }
519
+ function lockSchema(opts) {
520
+ const fields = opts?.fields;
521
+ return {
522
+ name: "lockSchema",
523
+ onSchemaDelta(delta) {
524
+ if (delta.kind === "none") return { action: "allow" };
525
+ const touched = fields ? [...delta.added, ...delta.removed, ...delta.changed.map((c) => c.field)].filter((f) => fields.includes(f)) : ["<any>"];
526
+ if (touched.length === 0) return { action: "allow" };
527
+ return {
528
+ action: "reject",
529
+ error: new SchemaLockedError(
530
+ `Schema for "${delta.collection}" is locked` + (fields ? ` on fields [${fields.join(", ")}] (touched: [${touched.join(", ")}])` : "") + `; the change was refused.`
531
+ )
532
+ };
533
+ }
534
+ };
535
+ }
536
+
537
+ // src/schema-update/cutover.ts
538
+ function coordinatedCutover(opts) {
539
+ return {
540
+ name: "coordinatedCutover",
541
+ onSchemaDelta(delta) {
542
+ if (delta.kind === "non-additive") {
543
+ return { action: "cutover", transform: opts.transform };
544
+ }
545
+ return { action: "allow" };
546
+ }
547
+ };
548
+ }
549
+
550
+ // src/numbering/descriptor.ts
551
+ function withDeferredNumbering(config) {
552
+ return {
553
+ series: config.series,
554
+ collection: config.collection,
555
+ field: config.field,
556
+ settleWindowMs: config.settleWindowMs ?? 0
557
+ };
558
+ }
559
+
560
+ // src/money/arith.ts
561
+ function parseAmount(label, amount, scale, rounding) {
562
+ const r = parseToScaledInt(amount, scale, rounding);
563
+ if (!r.ok) {
564
+ throw new MoneyUnsupportedError(
565
+ 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`
566
+ );
567
+ }
568
+ return r.value;
569
+ }
570
+ function resolveScale(label, amount, explicit) {
571
+ if (explicit !== void 0) {
572
+ if (!Number.isInteger(explicit) || explicit < 0) {
573
+ throw new MoneyUnsupportedError(`${label}: scale must be a non-negative integer`);
574
+ }
575
+ return explicit;
576
+ }
577
+ const inferred = decimalScaleOf(amount);
578
+ if (inferred === null) {
579
+ throw new MoneyUnsupportedError(`${label}: amount ${JSON.stringify(amount)} is not a finite decimal`);
580
+ }
581
+ return inferred;
582
+ }
583
+ function mulRate(amount, rate, opts = {}) {
584
+ const scale = resolveScale("mulRate", amount, opts.scale);
585
+ const rounding = opts.rounding ?? "half-up";
586
+ const a = parseAmount("mulRate", amount, scale, rounding);
587
+ const rateScale = decimalScaleOf(rate);
588
+ if (rateScale === null) {
589
+ throw new MoneyUnsupportedError(`mulRate: rate ${JSON.stringify(rate)} is not a finite decimal`);
590
+ }
591
+ const r = parseToScaledInt(rate, rateScale);
592
+ if (!r.ok) {
593
+ throw new MoneyUnsupportedError(`mulRate: rate ${JSON.stringify(rate)} is not a finite decimal`);
594
+ }
595
+ const product = a * r.value;
596
+ return formatScaledInt(rescaleScaledInt(product, scale + rateScale, scale, rounding), scale);
597
+ }
598
+ function allocate(amount, weights, opts = {}) {
599
+ if (weights.length === 0) {
600
+ throw new MoneyUnsupportedError("allocate: weights must not be empty");
601
+ }
602
+ const scale = resolveScale("allocate", amount, opts.scale);
603
+ const a = parseAmount("allocate", amount, scale);
604
+ let weightScale = 0;
605
+ for (const w of weights) {
606
+ const s = decimalScaleOf(w);
607
+ if (s === null) {
608
+ throw new MoneyUnsupportedError(`allocate: weight ${JSON.stringify(w)} is not a finite decimal`);
609
+ }
610
+ if (s > weightScale) weightScale = s;
611
+ }
612
+ const scaledWeights = weights.map((w) => {
613
+ const r = parseToScaledInt(w, weightScale);
614
+ if (!r.ok || r.value < 0n) {
615
+ throw new MoneyUnsupportedError(`allocate: weight ${JSON.stringify(w)} must be a non-negative decimal`);
616
+ }
617
+ return r.value;
618
+ });
619
+ const sumW = scaledWeights.reduce((acc, w) => acc + w, 0n);
620
+ if (sumW === 0n) {
621
+ throw new MoneyUnsupportedError("allocate: weights must not all be zero");
622
+ }
623
+ const negative = a < 0n;
624
+ const mag = negative ? -a : a;
625
+ const base = [];
626
+ const remainders = [];
627
+ let distributed = 0n;
628
+ for (let i = 0; i < scaledWeights.length; i++) {
629
+ const product = mag * scaledWeights[i];
630
+ const share = product / sumW;
631
+ base.push(share);
632
+ distributed += share;
633
+ remainders.push({ index: i, rem: product % sumW });
634
+ }
635
+ let leftover = mag - distributed;
636
+ remainders.sort((x, y) => y.rem > x.rem ? 1 : y.rem < x.rem ? -1 : x.index - y.index);
637
+ for (const { index } of remainders) {
638
+ if (leftover === 0n) break;
639
+ base[index] = base[index] + 1n;
640
+ leftover -= 1n;
641
+ }
642
+ return base.map((p) => formatScaledInt(negative && p !== 0n ? -p : p, scale));
643
+ }
644
+
645
+ // src/money/branded.ts
646
+ function asMoney(value) {
647
+ if (!isMoneyLike(value)) {
648
+ throw new MoneyUnsupportedError(`asMoney: ${JSON.stringify(value)} is not a finite decimal`);
649
+ }
650
+ return String(value).trim();
651
+ }
652
+ function isMoneyString(value) {
653
+ return typeof value === "string" && isMoneyLike(value);
654
+ }
655
+ function moneyNumber(value) {
656
+ if (!isMoneyLike(value)) {
657
+ throw new MoneyUnsupportedError(`moneyNumber: ${JSON.stringify(value)} is not a finite decimal`);
658
+ }
659
+ return Number(value);
660
+ }
661
+ function isMoneyLike(value) {
662
+ if (typeof value === "number") return Number.isFinite(value);
663
+ if (typeof value !== "string") return false;
664
+ return decimalScaleOf(value) !== null;
665
+ }
407
666
 
408
667
  // src/vault-diff.ts
409
668
  async function diffVault(vault, candidate, options = {}) {
@@ -578,8 +837,12 @@ export {
578
837
  CollectionFrame,
579
838
  CollectionIndexes,
580
839
  CollectionInstant,
840
+ ComputedFieldError,
581
841
  ConflictError,
842
+ CrossJoinSourceUnknownError,
843
+ CrossJoinTooLargeError,
582
844
  DEFAULT_CHUNK_SIZE,
845
+ DEFAULT_CROSS_JOIN_MAX_ROWS,
583
846
  DEFAULT_FRESHNESS_MS,
584
847
  DEFAULT_JOIN_MAX_ROWS,
585
848
  DEFAULT_PUBLIC_ENVELOPE_SCHEMA,
@@ -587,6 +850,9 @@ export {
587
850
  DICT_COLLECTION_PREFIX,
588
851
  DIRECTORY_RECORD_ID,
589
852
  DanglingReferenceError,
853
+ DataResidencyError,
854
+ DebugPlaintextError,
855
+ DebugReservedFieldError,
590
856
  DecryptionError,
591
857
  DelegationTargetMissingError,
592
858
  DerivationCapExceededError,
@@ -604,6 +870,7 @@ export {
604
870
  ExportCapabilityError,
605
871
  FieldFrozenError,
606
872
  FilenameSanitizationError,
873
+ ForgetStrategyNotConfiguredError,
607
874
  GROUPBY_MAX_CARDINALITY,
608
875
  GROUPBY_WARN_CARDINALITY,
609
876
  GroupCardinalityError,
@@ -611,6 +878,7 @@ export {
611
878
  GroupedQuery,
612
879
  GroupedQueryN,
613
880
  INDEXED_STORE_POLICY,
881
+ IllegalTransitionError,
614
882
  ImportCapabilityError,
615
883
  IndexRequiredError,
616
884
  IndexWriteFailureError,
@@ -623,6 +891,8 @@ export {
623
891
  LEDGER_DELTAS_COLLECTION,
624
892
  LedgerContentionError,
625
893
  LedgerStore,
894
+ LinkEndpointError,
895
+ LinkIntegrityError,
626
896
  LocaleNotSpecifiedError,
627
897
  Lru,
628
898
  MAGIC_LINK_CONTENT_INFO_PREFIX,
@@ -636,7 +906,11 @@ export {
636
906
  MaterializedViewTooLargeError,
637
907
  MemoryRecipientSealer,
638
908
  MemorySealingKeyProvider,
909
+ MigrationRequiredError,
639
910
  MissingTranslationError,
911
+ MoneyCurrencyError,
912
+ MoneyPrecisionError,
913
+ MoneyUnsupportedError,
640
914
  NOYDB_BACKUP_VERSION,
641
915
  NOYDB_BUNDLE_FORMAT_VERSION,
642
916
  NOYDB_BUNDLE_MAGIC,
@@ -646,9 +920,11 @@ export {
646
920
  NOYDB_SYNC_VERSION,
647
921
  NetworkError,
648
922
  NoAccessError,
923
+ NonAdditiveSchemaChangeError,
649
924
  NotFoundError,
650
925
  Noydb,
651
926
  NoydbError,
927
+ NumberingUncertaintyError,
652
928
  OverlayBaseIsVirtualError,
653
929
  OverlayCollectionUnavailableError,
654
930
  OverlayIdMismatchError,
@@ -667,9 +943,11 @@ export {
667
943
  PrivilegeEscalationError,
668
944
  Query,
669
945
  QuickUnlockStore,
946
+ QuiesceTimeoutError,
670
947
  ReadOnlyAtInstantError,
671
948
  ReadOnlyError,
672
949
  ReadOnlyFrameError,
950
+ RecordCekNotFoundError,
673
951
  RecordLockedError,
674
952
  RecoveryNotEnrolledError,
675
953
  RecoveryProfileNotImplementedError,
@@ -677,15 +955,29 @@ export {
677
955
  RefRegistry,
678
956
  RefScopeError,
679
957
  ReservedCollectionNameError,
958
+ ReservedVaultNameError,
680
959
  SCHEMAS_COLLECTION,
681
960
  SEALED_PASSPHRASE_RECORD_ID,
961
+ STATE_VAULT_NAME,
682
962
  STRICT_POLICY,
683
963
  SYNC_CREDENTIALS_COLLECTION,
684
964
  ScanBuilder,
965
+ SchemaFenceError,
966
+ SchemaLockedError,
967
+ SchemaUpdateError,
685
968
  SchemaValidationError,
969
+ ScriptViolationError,
970
+ SealedRecordExpiredError,
971
+ SealedRecordMismatchError,
972
+ SequenceContentionError,
973
+ SequenceOfflineError,
974
+ SequenceStore,
686
975
  SessionExpiredError,
687
976
  SessionNotFoundError,
688
977
  SessionPolicyError,
978
+ ShardProvisioningError,
979
+ SnapshotNotFoundError,
980
+ StaticDictReadonlyError,
689
981
  StoreCapabilityError,
690
982
  SyncEngine,
691
983
  SyncScheduler,
@@ -699,6 +991,10 @@ export {
699
991
  TxVault,
700
992
  USER_ENVELOPE_COLLECTION,
701
993
  USER_ENVELOPE_MAX_BYTES,
994
+ UniqueConstraintError,
995
+ UnknownDictCodeError,
996
+ UnknownShardError,
997
+ UnsupportedIndexOptionError,
702
998
  UserApi,
703
999
  UserEnvelopeOversizedError,
704
1000
  VISIBILITY_RECORD_PREFIX,
@@ -706,15 +1002,21 @@ export {
706
1002
  Vault,
707
1003
  VaultFrame,
708
1004
  VaultInstant,
1005
+ VaultTemplateNotFoundError,
709
1006
  WeakPassphraseError,
710
1007
  activeSessionCount,
1008
+ additiveOnly,
1009
+ aesGcmOpen,
1010
+ allocate,
711
1011
  applyI18nLocale,
712
1012
  applyJoins,
713
1013
  applyPatch,
1014
+ asMoney,
714
1015
  assertStrongPassphrase,
715
1016
  assertTierAccess,
716
1017
  avg,
717
1018
  base64ToBuffer,
1019
+ blindUpdate,
718
1020
  bufferToBase64,
719
1021
  buildLiveQuery,
720
1022
  buildRecipientKeyringFile,
@@ -722,7 +1024,9 @@ export {
722
1024
  canonicalJson,
723
1025
  checkGate,
724
1026
  clearDevUnlock,
1027
+ compileSequenceFormat,
725
1028
  computePatch,
1029
+ coordinatedCutover,
726
1030
  count,
727
1031
  createBundleStore,
728
1032
  createEnforcer,
@@ -754,10 +1058,12 @@ export {
754
1058
  enableDevUnlock,
755
1059
  encryptBytes,
756
1060
  encryptDeterministic,
1061
+ enforceScript,
757
1062
  enrollAuthenticator,
758
1063
  envelopePayloadHash,
759
1064
  estimateEntropy,
760
1065
  estimateRecordBytes,
1066
+ evalComputedFields,
761
1067
  evaluateClause,
762
1068
  evaluateExportCapability,
763
1069
  evaluateFieldClause,
@@ -774,14 +1080,23 @@ export {
774
1080
  hasRecoveryEnrolled,
775
1081
  hashEntry,
776
1082
  i18nText,
1083
+ immutableGuard,
1084
+ importExternalObjects,
1085
+ inferScripts,
777
1086
  isDevUnlockActive,
778
1087
  isDictCollectionName,
779
1088
  isDictKeyDescriptor,
1089
+ isDiscriminant,
780
1090
  isI18nTextDescriptor,
1091
+ isLinkCollectionName,
781
1092
  isMagicLinkGrantExpired,
1093
+ isMoneyDescriptor,
1094
+ isMoneyString,
782
1095
  isPreCompressed,
783
1096
  isPublicEnvelope,
1097
+ isRefArray,
784
1098
  isSessionAlive,
1099
+ isStaticDictDescriptor,
785
1100
  isULID,
786
1101
  isZodSchema,
787
1102
  issueDelegation,
@@ -801,17 +1116,23 @@ export {
801
1116
  loadShamirRecoveryEntries,
802
1117
  loadUserEnvelope,
803
1118
  loadVaultPolicy,
1119
+ lockSchema,
804
1120
  magicLinkGrantRecordId,
805
1121
  max,
1122
+ memoryObjectProjection,
806
1123
  mergeCrdtStates,
807
1124
  mergePolicy,
808
1125
  min,
809
1126
  mintPaperRecoveryEntry,
810
1127
  mintShamirRecoveryEntry,
811
1128
  mintWrappedDeksBlob,
1129
+ money,
1130
+ moneyNumber,
1131
+ mulRate,
812
1132
  paddedIndex,
813
1133
  parseBytes,
814
1134
  parseIndex,
1135
+ parseRsaOaepTlv,
815
1136
  parseSealedEnvelope,
816
1137
  persistDirectoryConfig,
817
1138
  persistSchemaIfNeeded,
@@ -823,17 +1144,21 @@ export {
823
1144
  readNoydbBundleHeader,
824
1145
  readNoydbBundlePublicEnvelope,
825
1146
  readPath,
1147
+ readPlaintextRecord,
826
1148
  readPublicEnvelope,
827
1149
  readUserVisibility,
828
1150
  recoverUser,
829
1151
  reduceRecords,
830
1152
  ref,
1153
+ refArray,
831
1154
  removeAuthenticator,
832
1155
  resetBrotliSupportCache,
833
1156
  resetJoinWarnings,
834
1157
  resolveCrdtSnapshot,
835
1158
  resolveI18nText,
1159
+ resolvePolicy,
836
1160
  resolveSchema as resolvePublicEnvelopeSchema,
1161
+ resolveSequenceKey,
837
1162
  resolveSession,
838
1163
  revokeAllSessions,
839
1164
  revokeDelegation,
@@ -848,8 +1173,13 @@ export {
848
1173
  saveShamirRecoveryEntries,
849
1174
  saveUserEnvelope,
850
1175
  saveVaultPolicy,
1176
+ scaleForCurrency,
1177
+ sealRsaOaepTlv,
851
1178
  sha256Hex,
1179
+ staticDict,
852
1180
  sum,
1181
+ tokenize,
1182
+ transitionGuard,
853
1183
  unwrapDeksFromBlob,
854
1184
  unwrapDeksFromPaperEntry,
855
1185
  unwrapDeksFromShamirEntry,
@@ -861,8 +1191,10 @@ export {
861
1191
  validateSchemaOutput,
862
1192
  validateSessionPolicy,
863
1193
  visibilityRecordId,
1194
+ withArchive,
864
1195
  withCache,
865
1196
  withCircuitBreaker,
1197
+ withDeferredNumbering,
866
1198
  withDerivation,
867
1199
  withGuard,
868
1200
  withHealthCheck,
@@ -871,6 +1203,7 @@ export {
871
1203
  withMetrics,
872
1204
  withOverlayedView,
873
1205
  withRetry,
1206
+ withRollup,
874
1207
  wrapBundleStore,
875
1208
  wrapStore,
876
1209
  writeMagicLinkGrant,