@noy-db/hub 0.2.0-pre.6 → 0.2.0-pre.7

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 (254) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.js +4 -4
  3. package/dist/attestation/index.cjs.map +1 -1
  4. package/dist/attestation/index.d.cts +4 -4
  5. package/dist/attestation/index.d.ts +4 -4
  6. package/dist/attestation/index.js +6 -6
  7. package/dist/blobs/index.cjs.map +1 -1
  8. package/dist/blobs/index.d.cts +5 -5
  9. package/dist/blobs/index.d.ts +5 -5
  10. package/dist/blobs/index.js +5 -5
  11. package/dist/bundle/index.cjs +326 -15
  12. package/dist/bundle/index.cjs.map +1 -1
  13. package/dist/bundle/index.d.cts +6 -6
  14. package/dist/bundle/index.d.ts +6 -6
  15. package/dist/bundle/index.js +12 -12
  16. package/dist/{chunk-E225X5CQ.js → chunk-22ESLVUM.js} +3 -3
  17. package/dist/{chunk-5QPF2MJ5.js → chunk-2TXMTYWZ.js} +3 -3
  18. package/dist/{chunk-W277AG6N.js → chunk-3O5FNO5O.js} +104 -47
  19. package/dist/chunk-3O5FNO5O.js.map +1 -0
  20. package/dist/{chunk-34XGYMQT.js → chunk-3XCXUJTM.js} +2 -2
  21. package/dist/{chunk-XDW37COG.js → chunk-4EOVWJL6.js} +212 -7
  22. package/dist/chunk-4EOVWJL6.js.map +1 -0
  23. package/dist/{chunk-KGFV72WK.js → chunk-4YVVF6JN.js} +5 -5
  24. package/dist/{chunk-UGVDIOY7.js → chunk-6ILPGZXZ.js} +2 -2
  25. package/dist/{chunk-DFCINPB5.js → chunk-6MXGU2PW.js} +2 -2
  26. package/dist/{chunk-Y3P5DEMZ.js → chunk-7IH5FDXD.js} +6 -6
  27. package/dist/{chunk-2GMRNNI3.js → chunk-ASFE2X62.js} +2 -2
  28. package/dist/{chunk-JICBEFBT.js → chunk-AYRTGXF3.js} +5 -5
  29. package/dist/{chunk-CCC25PA7.js → chunk-BE5ZALMB.js} +5 -5
  30. package/dist/{chunk-WEA4TDTJ.js → chunk-BNUCCUES.js} +3 -3
  31. package/dist/{chunk-PS5G6A3Y.js → chunk-BRZFN354.js} +4 -4
  32. package/dist/{chunk-RIHZBSWJ.js → chunk-CBHPW77B.js} +3 -3
  33. package/dist/{chunk-LWFQYT4N.js → chunk-CSHY53CZ.js} +2 -2
  34. package/dist/{chunk-MDIC4FAU.js → chunk-DCP4L4SH.js} +2 -2
  35. package/dist/{chunk-TNBIWSQ7.js → chunk-GI6S5ZF2.js} +2 -2
  36. package/dist/{chunk-G26QAQNI.js → chunk-GZIDTXC4.js} +2 -2
  37. package/dist/{chunk-ARZAHCCF.js → chunk-HNC55FLJ.js} +3 -3
  38. package/dist/{chunk-SGSHQ4PH.js → chunk-HNFXKQD7.js} +5 -5
  39. package/dist/{chunk-YEHUEUNP.js → chunk-JZDA2SRB.js} +4 -4
  40. package/dist/{chunk-PX3MJ6RB.js → chunk-KK44CQ5B.js} +3 -3
  41. package/dist/{chunk-OPD3PZOG.js → chunk-LSY46G55.js} +4 -4
  42. package/dist/{chunk-T6MTNGBM.js → chunk-N4CDTRDH.js} +4 -4
  43. package/dist/{chunk-ZQMYB56Z.js → chunk-O3JCRQT3.js} +3 -3
  44. package/dist/{chunk-LJO6Q3X6.js → chunk-OA6HE2RW.js} +3 -3
  45. package/dist/{chunk-HIELMTUK.js → chunk-OIF6LZUR.js} +2 -2
  46. package/dist/{chunk-YJ46RFCD.js → chunk-OXCFFRF3.js} +2 -2
  47. package/dist/{chunk-ED3E3OLO.js → chunk-PJKGXUMG.js} +2 -2
  48. package/dist/{chunk-6A4AMQ2H.js → chunk-QYO6I7KK.js} +4 -4
  49. package/dist/{chunk-6HJ2ZALB.js → chunk-REQJJIPP.js} +44 -2
  50. package/dist/chunk-REQJJIPP.js.map +1 -0
  51. package/dist/{chunk-7TX7HN42.js → chunk-SLJQIBT7.js} +20 -3
  52. package/dist/chunk-SLJQIBT7.js.map +1 -0
  53. package/dist/{chunk-A4JNVBPF.js → chunk-SYOSRZN4.js} +5 -5
  54. package/dist/{chunk-R4LTCI6O.js → chunk-TS4FQPDD.js} +2 -2
  55. package/dist/{chunk-ICH4AIGL.js → chunk-TV3YZ35S.js} +5 -1
  56. package/dist/chunk-TV3YZ35S.js.map +1 -0
  57. package/dist/{chunk-CKH247ZR.js → chunk-UPBZ7NVY.js} +4 -4
  58. package/dist/{chunk-XVJFFGTG.js → chunk-VZOZ3DBN.js} +3 -3
  59. package/dist/{chunk-5VMTAX4Y.js → chunk-W6EQLGMB.js} +2 -2
  60. package/dist/{chunk-JSYTGEX4.js → chunk-WBUG3324.js} +3 -3
  61. package/dist/{chunk-5OVIFUQE.js → chunk-WIRRPTFH.js} +1 -1
  62. package/dist/chunk-WIRRPTFH.js.map +1 -0
  63. package/dist/{chunk-25WFLKOH.js → chunk-WM5GFORS.js} +2 -2
  64. package/dist/{chunk-CGJFCT3X.js → chunk-WMKCAN4H.js} +2 -2
  65. package/dist/{chunk-R7JTYCRX.js → chunk-XZCBBZLS.js} +2 -2
  66. package/dist/{chunk-EKTOYEZ3.js → chunk-YAMTXW77.js} +2 -2
  67. package/dist/consent/index.cjs.map +1 -1
  68. package/dist/consent/index.d.cts +5 -5
  69. package/dist/consent/index.d.ts +5 -5
  70. package/dist/consent/index.js +3 -3
  71. package/dist/{crypto-5UDZZL26.js → crypto-TRZ5BJMY.js} +3 -3
  72. package/dist/{delegation-42LO4WFO.js → delegation-TLZTK2XW.js} +5 -5
  73. package/dist/derivations/index.cjs.map +1 -1
  74. package/dist/derivations/index.d.cts +6 -6
  75. package/dist/derivations/index.d.ts +6 -6
  76. package/dist/derivations/index.js +4 -4
  77. package/dist/{dev-unlock-Cvo-xCQC.d.ts → dev-unlock-ClAEZQC4.d.ts} +1 -1
  78. package/dist/{dev-unlock-Dy1qVpkL.d.cts → dev-unlock-L3z34v0J.d.cts} +1 -1
  79. package/dist/executor-HAVRTQN4.js +11 -0
  80. package/dist/executor-V3DKOADS.js +8 -0
  81. package/dist/executor-XO4M4243.js +8 -0
  82. package/dist/{fanout-sidecar-EVICRM46.js → fanout-sidecar-OKPMMPLG.js} +2 -2
  83. package/dist/guards/index.cjs.map +1 -1
  84. package/dist/guards/index.d.cts +6 -6
  85. package/dist/guards/index.d.ts +6 -6
  86. package/dist/guards/index.js +3 -3
  87. package/dist/{hash-BAlWR4WD.d.ts → hash-B3lV6lw3.d.ts} +1 -1
  88. package/dist/{hash-BgEQklQc.d.cts → hash-M6-JI3Yu.d.cts} +1 -1
  89. package/dist/history/index.cjs.map +1 -1
  90. package/dist/history/index.d.cts +6 -6
  91. package/dist/history/index.d.ts +6 -6
  92. package/dist/history/index.js +5 -5
  93. package/dist/i18n/index.cjs.map +1 -1
  94. package/dist/i18n/index.d.cts +5 -5
  95. package/dist/i18n/index.d.ts +5 -5
  96. package/dist/i18n/index.js +5 -5
  97. package/dist/{index-fIPPh5dg.d.ts → index-CmWQyC4e.d.ts} +84 -7
  98. package/dist/{index-5I0MZ0jQ.d.cts → index-vB43MAt4.d.cts} +84 -7
  99. package/dist/index.cjs +340 -9
  100. package/dist/index.cjs.map +1 -1
  101. package/dist/index.d.cts +13 -13
  102. package/dist/index.d.ts +13 -13
  103. package/dist/index.js +60 -52
  104. package/dist/index.js.map +1 -1
  105. package/dist/indexing/index.cjs +4 -0
  106. package/dist/indexing/index.cjs.map +1 -1
  107. package/dist/indexing/index.d.cts +3 -3
  108. package/dist/indexing/index.d.ts +3 -3
  109. package/dist/indexing/index.js +4 -4
  110. package/dist/issue-EJKUQ6FA.js +12 -0
  111. package/dist/{lazy-builder-D1MyR1qH.d.ts → lazy-builder-7tIpFyWN.d.ts} +1 -1
  112. package/dist/{lazy-builder-DXlSCNCJ.d.cts → lazy-builder-wY4pMCEe.d.cts} +1 -1
  113. package/dist/{ledger-UX4QIHWI.js → ledger-SQVVE2DR.js} +5 -5
  114. package/dist/materialized-views/index.cjs +18 -1
  115. package/dist/materialized-views/index.cjs.map +1 -1
  116. package/dist/materialized-views/index.d.cts +10 -8
  117. package/dist/materialized-views/index.d.ts +10 -8
  118. package/dist/materialized-views/index.js +12 -12
  119. package/dist/noydb-MK4UQ626.js +34 -0
  120. package/dist/overlay-views/index.cjs.map +1 -1
  121. package/dist/overlay-views/index.d.cts +6 -6
  122. package/dist/overlay-views/index.d.ts +6 -6
  123. package/dist/overlay-views/index.js +6 -6
  124. package/dist/periods/index.cjs.map +1 -1
  125. package/dist/periods/index.d.cts +5 -5
  126. package/dist/periods/index.d.ts +5 -5
  127. package/dist/periods/index.js +5 -5
  128. package/dist/{predicate-B0IKeBXx.d.cts → predicate-BSAGEyu5.d.cts} +26 -2
  129. package/dist/{predicate-B0IKeBXx.d.ts → predicate-BSAGEyu5.d.ts} +26 -2
  130. package/dist/{public-envelope-YKHKP74C.js → public-envelope-BXPXMN3U.js} +4 -4
  131. package/dist/query/index.cjs +244 -4
  132. package/dist/query/index.cjs.map +1 -1
  133. package/dist/query/index.d.cts +2 -2
  134. package/dist/query/index.d.ts +2 -2
  135. package/dist/query/index.js +12 -6
  136. package/dist/{registry-4NEW7LQY.js → registry-4R4IURUM.js} +3 -3
  137. package/dist/registry-GPBLCHG7.js +8 -0
  138. package/dist/registry-ZON5HNIV.js +8 -0
  139. package/dist/{revoke-R5NIQ74J.js → revoke-Y7UDOXGH.js} +6 -6
  140. package/dist/session/index.cjs.map +1 -1
  141. package/dist/session/index.d.cts +6 -6
  142. package/dist/session/index.d.ts +6 -6
  143. package/dist/session/index.js +3 -3
  144. package/dist/shadow/index.cjs.map +1 -1
  145. package/dist/shadow/index.d.cts +5 -5
  146. package/dist/shadow/index.d.ts +5 -5
  147. package/dist/shadow/index.js +2 -2
  148. package/dist/{signer-WGDJNWSU.js → signer-UD2ZSVDJ.js} +5 -5
  149. package/dist/snapshots/index.cjs +903 -0
  150. package/dist/snapshots/index.cjs.map +1 -0
  151. package/dist/snapshots/index.d.cts +21 -0
  152. package/dist/snapshots/index.d.ts +21 -0
  153. package/dist/snapshots/index.js +118 -0
  154. package/dist/snapshots/index.js.map +1 -0
  155. package/dist/{stale-74WGLVZ2.js → stale-F4V5E7ZK.js} +2 -2
  156. package/dist/store/index.cjs.map +1 -1
  157. package/dist/store/index.d.cts +5 -5
  158. package/dist/store/index.d.ts +5 -5
  159. package/dist/store/index.js +2 -2
  160. package/dist/sync/index.cjs.map +1 -1
  161. package/dist/sync/index.d.cts +4 -4
  162. package/dist/sync/index.d.ts +4 -4
  163. package/dist/sync/index.js +4 -4
  164. package/dist/team/index.cjs.map +1 -1
  165. package/dist/team/index.d.cts +5 -5
  166. package/dist/team/index.d.ts +5 -5
  167. package/dist/team/index.js +8 -8
  168. package/dist/tx/index.cjs.map +1 -1
  169. package/dist/tx/index.d.cts +5 -5
  170. package/dist/tx/index.d.ts +5 -5
  171. package/dist/tx/index.js +3 -3
  172. package/dist/{types-DlnZh1_i.d.ts → types-DT7cXRHq.d.ts} +63 -4
  173. package/dist/{types-DVlvNn2c.d.cts → types-r-y7TIqj.d.cts} +63 -4
  174. package/dist/{ulid-r98nkjVd.d.cts → ulid-BkW3mLlz.d.cts} +1 -1
  175. package/dist/{ulid-CzPONlhG.d.ts → ulid-Dt55yn4s.d.ts} +1 -1
  176. package/dist/util/index.cjs.map +1 -1
  177. package/dist/util/index.js +1 -1
  178. package/dist/{with-derivation-BMQ9pIHe.d.cts → with-derivation-DB63Po2m.d.cts} +1 -1
  179. package/dist/{with-derivation-B98shCV8.d.ts → with-derivation-D_Ids_H6.d.ts} +1 -1
  180. package/dist/{with-guard-DUnC3JDN.d.cts → with-guard-BHThLppa.d.cts} +1 -1
  181. package/dist/{with-guard-DmT50nVG.d.ts → with-guard-BJwdc0s6.d.ts} +1 -1
  182. package/dist/{with-materialized-view-eMTZ65_J.d.cts → with-materialized-view-BJmJ-FrO.d.cts} +1 -1
  183. package/dist/{with-materialized-view-Bp_M3sNG.d.ts → with-materialized-view-D-CRVSDX.d.ts} +1 -1
  184. package/dist/{with-overlayed-view-zzSnRQmS.d.ts → with-overlayed-view-CNf6GbDG.d.ts} +1 -1
  185. package/dist/{with-overlayed-view-BoY6PB3n.d.cts → with-overlayed-view-zePNtUSq.d.cts} +1 -1
  186. package/package.json +13 -3
  187. package/dist/chunk-5OVIFUQE.js.map +0 -1
  188. package/dist/chunk-6HJ2ZALB.js.map +0 -1
  189. package/dist/chunk-7TX7HN42.js.map +0 -1
  190. package/dist/chunk-ICH4AIGL.js.map +0 -1
  191. package/dist/chunk-W277AG6N.js.map +0 -1
  192. package/dist/chunk-XDW37COG.js.map +0 -1
  193. package/dist/executor-AWCHQ2KN.js +0 -8
  194. package/dist/executor-RWICJI7J.js +0 -11
  195. package/dist/executor-SOLEQVUB.js +0 -8
  196. package/dist/issue-IODMTPME.js +0 -12
  197. package/dist/noydb-FY2666NY.js +0 -34
  198. package/dist/registry-446I2NMN.js +0 -8
  199. package/dist/registry-524KJZG4.js +0 -8
  200. /package/dist/{chunk-E225X5CQ.js.map → chunk-22ESLVUM.js.map} +0 -0
  201. /package/dist/{chunk-5QPF2MJ5.js.map → chunk-2TXMTYWZ.js.map} +0 -0
  202. /package/dist/{chunk-34XGYMQT.js.map → chunk-3XCXUJTM.js.map} +0 -0
  203. /package/dist/{chunk-KGFV72WK.js.map → chunk-4YVVF6JN.js.map} +0 -0
  204. /package/dist/{chunk-UGVDIOY7.js.map → chunk-6ILPGZXZ.js.map} +0 -0
  205. /package/dist/{chunk-DFCINPB5.js.map → chunk-6MXGU2PW.js.map} +0 -0
  206. /package/dist/{chunk-Y3P5DEMZ.js.map → chunk-7IH5FDXD.js.map} +0 -0
  207. /package/dist/{chunk-2GMRNNI3.js.map → chunk-ASFE2X62.js.map} +0 -0
  208. /package/dist/{chunk-JICBEFBT.js.map → chunk-AYRTGXF3.js.map} +0 -0
  209. /package/dist/{chunk-CCC25PA7.js.map → chunk-BE5ZALMB.js.map} +0 -0
  210. /package/dist/{chunk-WEA4TDTJ.js.map → chunk-BNUCCUES.js.map} +0 -0
  211. /package/dist/{chunk-PS5G6A3Y.js.map → chunk-BRZFN354.js.map} +0 -0
  212. /package/dist/{chunk-RIHZBSWJ.js.map → chunk-CBHPW77B.js.map} +0 -0
  213. /package/dist/{chunk-LWFQYT4N.js.map → chunk-CSHY53CZ.js.map} +0 -0
  214. /package/dist/{chunk-MDIC4FAU.js.map → chunk-DCP4L4SH.js.map} +0 -0
  215. /package/dist/{chunk-TNBIWSQ7.js.map → chunk-GI6S5ZF2.js.map} +0 -0
  216. /package/dist/{chunk-G26QAQNI.js.map → chunk-GZIDTXC4.js.map} +0 -0
  217. /package/dist/{chunk-ARZAHCCF.js.map → chunk-HNC55FLJ.js.map} +0 -0
  218. /package/dist/{chunk-SGSHQ4PH.js.map → chunk-HNFXKQD7.js.map} +0 -0
  219. /package/dist/{chunk-YEHUEUNP.js.map → chunk-JZDA2SRB.js.map} +0 -0
  220. /package/dist/{chunk-PX3MJ6RB.js.map → chunk-KK44CQ5B.js.map} +0 -0
  221. /package/dist/{chunk-OPD3PZOG.js.map → chunk-LSY46G55.js.map} +0 -0
  222. /package/dist/{chunk-T6MTNGBM.js.map → chunk-N4CDTRDH.js.map} +0 -0
  223. /package/dist/{chunk-ZQMYB56Z.js.map → chunk-O3JCRQT3.js.map} +0 -0
  224. /package/dist/{chunk-LJO6Q3X6.js.map → chunk-OA6HE2RW.js.map} +0 -0
  225. /package/dist/{chunk-HIELMTUK.js.map → chunk-OIF6LZUR.js.map} +0 -0
  226. /package/dist/{chunk-YJ46RFCD.js.map → chunk-OXCFFRF3.js.map} +0 -0
  227. /package/dist/{chunk-ED3E3OLO.js.map → chunk-PJKGXUMG.js.map} +0 -0
  228. /package/dist/{chunk-6A4AMQ2H.js.map → chunk-QYO6I7KK.js.map} +0 -0
  229. /package/dist/{chunk-A4JNVBPF.js.map → chunk-SYOSRZN4.js.map} +0 -0
  230. /package/dist/{chunk-R4LTCI6O.js.map → chunk-TS4FQPDD.js.map} +0 -0
  231. /package/dist/{chunk-CKH247ZR.js.map → chunk-UPBZ7NVY.js.map} +0 -0
  232. /package/dist/{chunk-XVJFFGTG.js.map → chunk-VZOZ3DBN.js.map} +0 -0
  233. /package/dist/{chunk-5VMTAX4Y.js.map → chunk-W6EQLGMB.js.map} +0 -0
  234. /package/dist/{chunk-JSYTGEX4.js.map → chunk-WBUG3324.js.map} +0 -0
  235. /package/dist/{chunk-25WFLKOH.js.map → chunk-WM5GFORS.js.map} +0 -0
  236. /package/dist/{chunk-CGJFCT3X.js.map → chunk-WMKCAN4H.js.map} +0 -0
  237. /package/dist/{chunk-R7JTYCRX.js.map → chunk-XZCBBZLS.js.map} +0 -0
  238. /package/dist/{chunk-EKTOYEZ3.js.map → chunk-YAMTXW77.js.map} +0 -0
  239. /package/dist/{crypto-5UDZZL26.js.map → crypto-TRZ5BJMY.js.map} +0 -0
  240. /package/dist/{delegation-42LO4WFO.js.map → delegation-TLZTK2XW.js.map} +0 -0
  241. /package/dist/{executor-AWCHQ2KN.js.map → executor-HAVRTQN4.js.map} +0 -0
  242. /package/dist/{executor-RWICJI7J.js.map → executor-V3DKOADS.js.map} +0 -0
  243. /package/dist/{executor-SOLEQVUB.js.map → executor-XO4M4243.js.map} +0 -0
  244. /package/dist/{fanout-sidecar-EVICRM46.js.map → fanout-sidecar-OKPMMPLG.js.map} +0 -0
  245. /package/dist/{issue-IODMTPME.js.map → issue-EJKUQ6FA.js.map} +0 -0
  246. /package/dist/{ledger-UX4QIHWI.js.map → ledger-SQVVE2DR.js.map} +0 -0
  247. /package/dist/{noydb-FY2666NY.js.map → noydb-MK4UQ626.js.map} +0 -0
  248. /package/dist/{public-envelope-YKHKP74C.js.map → public-envelope-BXPXMN3U.js.map} +0 -0
  249. /package/dist/{registry-446I2NMN.js.map → registry-4R4IURUM.js.map} +0 -0
  250. /package/dist/{registry-4NEW7LQY.js.map → registry-GPBLCHG7.js.map} +0 -0
  251. /package/dist/{registry-524KJZG4.js.map → registry-ZON5HNIV.js.map} +0 -0
  252. /package/dist/{revoke-R5NIQ74J.js.map → revoke-Y7UDOXGH.js.map} +0 -0
  253. /package/dist/{signer-WGDJNWSU.js.map → signer-UD2ZSVDJ.js.map} +0 -0
  254. /package/dist/{stale-74WGLVZ2.js.map → stale-F4V5E7ZK.js.map} +0 -0
@@ -1,11 +1,11 @@
1
- import { B as BlobStrategy } from '../types-DVlvNn2c.cjs';
2
- export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-DVlvNn2c.cjs';
1
+ import { B as BlobStrategy } from '../types-r-y7TIqj.cjs';
2
+ export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-r-y7TIqj.cjs';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.cjs';
4
- import '../lazy-builder-DXlSCNCJ.cjs';
5
- import '../predicate-B0IKeBXx.cjs';
4
+ import '../lazy-builder-wY4pMCEe.cjs';
5
+ import '../predicate-BSAGEyu5.cjs';
6
6
  import '../strategy-DSTrsZ8t.cjs';
7
7
  import '../strategy-BSxFXGzb.cjs';
8
- import '../index-5I0MZ0jQ.cjs';
8
+ import '../index-vB43MAt4.cjs';
9
9
  import '@noy-db/attestation';
10
10
 
11
11
  /**
@@ -1,11 +1,11 @@
1
- import { B as BlobStrategy } from '../types-DlnZh1_i.js';
2
- export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-DlnZh1_i.js';
1
+ import { B as BlobStrategy } from '../types-DT7cXRHq.js';
2
+ export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-DT7cXRHq.js';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.js';
4
- import '../lazy-builder-D1MyR1qH.js';
5
- import '../predicate-B0IKeBXx.js';
4
+ import '../lazy-builder-7tIpFyWN.js';
5
+ import '../predicate-BSAGEyu5.js';
6
6
  import '../strategy-DSTrsZ8t.js';
7
7
  import '../strategy-BSxFXGzb.js';
8
- import '../index-fIPPh5dg.js';
8
+ import '../index-CmWQyC4e.js';
9
9
  import '@noy-db/attestation';
10
10
 
11
11
  /**
@@ -9,17 +9,17 @@ import {
9
9
  detectMagic,
10
10
  detectMimeType,
11
11
  isPreCompressed
12
- } from "../chunk-KGFV72WK.js";
12
+ } from "../chunk-4YVVF6JN.js";
13
13
  import {
14
14
  BLOB_EVICTION_AUDIT_COLLECTION,
15
15
  EXPORT_AUDIT_COLLECTION,
16
16
  ExportBlobsAbortedError,
17
17
  createExportBlobsHandle,
18
18
  runCompaction
19
- } from "../chunk-JSYTGEX4.js";
20
- import "../chunk-5OVIFUQE.js";
21
- import "../chunk-EKTOYEZ3.js";
22
- import "../chunk-6HJ2ZALB.js";
19
+ } from "../chunk-WBUG3324.js";
20
+ import "../chunk-WIRRPTFH.js";
21
+ import "../chunk-YAMTXW77.js";
22
+ import "../chunk-REQJJIPP.js";
23
23
 
24
24
  // src/blobs/active.ts
25
25
  function withBlobs() {
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
33
  // src/errors.ts
34
- var NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError;
34
+ var NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError;
35
35
  var init_errors = __esm({
36
36
  "src/errors.ts"() {
37
37
  "use strict";
@@ -476,6 +476,34 @@ Resolutions:
476
476
  this.side = opts.side;
477
477
  }
478
478
  };
479
+ CrossJoinTooLargeError = class extends NoydbError {
480
+ target;
481
+ expected;
482
+ limit;
483
+ constructor(opts) {
484
+ super(
485
+ "CROSS_JOIN_TOO_LARGE",
486
+ `crossJoin("${opts.target}"): would produce ${opts.expected} rows, exceeding the limit of ${opts.limit}. Narrow the left side with .where() first, or raise the ceiling with crossJoin("${opts.target}", { ..., maxRows: ${opts.expected} }).`
487
+ );
488
+ this.name = "CrossJoinTooLargeError";
489
+ this.target = opts.target;
490
+ this.expected = opts.expected;
491
+ this.limit = opts.limit;
492
+ }
493
+ };
494
+ CrossJoinSourceUnknownError = class extends NoydbError {
495
+ target;
496
+ leftCollection;
497
+ constructor(target, leftCollection) {
498
+ super(
499
+ "CROSS_JOIN_SOURCE_UNKNOWN",
500
+ `crossJoin("${target}"): collection "${target}" is not known in the vault (cross-joining from "${leftCollection}"). Make sure "${target}" is open in the same vault before executing this query.`
501
+ );
502
+ this.name = "CrossJoinSourceUnknownError";
503
+ this.target = target;
504
+ this.leftCollection = leftCollection;
505
+ }
506
+ };
479
507
  DanglingReferenceError = class extends NoydbError {
480
508
  field;
481
509
  target;
@@ -3709,6 +3737,10 @@ function evaluateClause(record, clause) {
3709
3737
  return clause.fn(record);
3710
3738
  case "wherePredicate":
3711
3739
  return clause.fn(record, clause.ctx);
3740
+ case "crossJoin":
3741
+ throw new Error(
3742
+ `evaluateClause: 'crossJoin' clauses are expansion primitives and are not evaluated per-record. This is a query planner routing error \u2014 crossJoin clauses must be extracted from the clause list before calling evaluateClause or filterRecords.`
3743
+ );
3712
3744
  case "group":
3713
3745
  if (clause.op === "and") {
3714
3746
  for (const child of clause.clauses) {
@@ -3991,9 +4023,20 @@ var init_strategy4 = __esm({
3991
4023
  });
3992
4024
 
3993
4025
  // src/query/builder.ts
3994
- function executePlanWithSource(source, plan) {
3995
- const { candidates, remainingClauses } = candidateRecords(source, plan.clauses);
3996
- let result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses);
4026
+ function executePlanWithSource(source, plan, joinContext) {
4027
+ const hasCrossJoins = plan.clauses.some((c) => c.type === "crossJoin");
4028
+ let result;
4029
+ if (hasCrossJoins) {
4030
+ if (!joinContext) {
4031
+ throw new Error(
4032
+ `Query.toArray(): plan contains crossJoin clauses but no JoinContext is attached. Use collection.query() instead of new Query() for cross-join support.`
4033
+ );
4034
+ }
4035
+ result = executeClausePipeline(source, plan.clauses, joinContext);
4036
+ } else {
4037
+ const { candidates, remainingClauses } = candidateRecords(source, plan.clauses);
4038
+ result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses);
4039
+ }
3997
4040
  if (plan.orderBy.length > 0) {
3998
4041
  result = sortRecords(result, plan.orderBy);
3999
4042
  }
@@ -4057,6 +4100,74 @@ function filterRecords(records, clauses) {
4057
4100
  }
4058
4101
  return out;
4059
4102
  }
4103
+ function executeClausePipeline(source, clauses, joinContext) {
4104
+ let rel = [...source.snapshot()];
4105
+ let filterBatch = [];
4106
+ for (const clause of clauses) {
4107
+ if (clause.type === "crossJoin") {
4108
+ if (filterBatch.length > 0) {
4109
+ rel = filterRecords(rel, filterBatch);
4110
+ filterBatch = [];
4111
+ }
4112
+ const rightSource = joinContext.resolveSource(clause.target);
4113
+ if (!rightSource) {
4114
+ throw new CrossJoinSourceUnknownError(clause.target, joinContext.leftCollection);
4115
+ }
4116
+ rel = applyCrossJoin(rel, clause, rightSource);
4117
+ } else {
4118
+ filterBatch.push(clause);
4119
+ }
4120
+ }
4121
+ if (filterBatch.length > 0) {
4122
+ rel = filterRecords(rel, filterBatch);
4123
+ }
4124
+ return rel;
4125
+ }
4126
+ function applyCrossJoin(leftRel, clause, rightSource) {
4127
+ const rightRows = rightSource.snapshot();
4128
+ const maxRows = clause.maxRows ?? DEFAULT_CROSS_JOIN_MAX_ROWS;
4129
+ const { as } = clause;
4130
+ if (!clause.on) {
4131
+ const product = leftRel.length * rightRows.length;
4132
+ if (product > maxRows) {
4133
+ throw new CrossJoinTooLargeError({ target: clause.target, expected: product, limit: maxRows });
4134
+ }
4135
+ const expanded2 = [];
4136
+ for (const left of leftRel) {
4137
+ const leftObj = left;
4138
+ for (const right of rightRows) {
4139
+ expanded2.push({ ...leftObj, [as]: right });
4140
+ }
4141
+ }
4142
+ return expanded2;
4143
+ }
4144
+ const expanded = [];
4145
+ let cumulative = 0;
4146
+ for (const left of leftRel) {
4147
+ const callbackResult = clause.on(left);
4148
+ let filteredRight;
4149
+ if (Array.isArray(callbackResult)) {
4150
+ filteredRight = callbackResult;
4151
+ } else {
4152
+ filteredRight = rightRows.filter(
4153
+ callbackResult
4154
+ );
4155
+ }
4156
+ cumulative += filteredRight.length;
4157
+ if (cumulative > maxRows) {
4158
+ throw new CrossJoinTooLargeError({
4159
+ target: clause.target,
4160
+ expected: cumulative,
4161
+ limit: maxRows
4162
+ });
4163
+ }
4164
+ const leftObj = left;
4165
+ for (const right of filteredRight) {
4166
+ expanded.push({ ...leftObj, [as]: right });
4167
+ }
4168
+ }
4169
+ return expanded;
4170
+ }
4060
4171
  function sortRecords(records, orderBy) {
4061
4172
  return [...records].sort((a, b) => {
4062
4173
  for (const { field, direction } of orderBy) {
@@ -4119,6 +4230,16 @@ function serializeClause(clause) {
4119
4230
  clauses: clause.clauses.map(serializeClause)
4120
4231
  };
4121
4232
  }
4233
+ if (clause.type === "crossJoin") {
4234
+ return {
4235
+ type: "crossJoin",
4236
+ target: clause.target,
4237
+ as: clause.as,
4238
+ on: clause.on ? "[function]" : void 0,
4239
+ onPredicateName: clause.onPredicateName,
4240
+ maxRows: clause.maxRows
4241
+ };
4242
+ }
4122
4243
  return clause;
4123
4244
  }
4124
4245
  function canonicalCtxHash(ctx) {
@@ -4168,12 +4289,13 @@ function buildDictLabelResolver(joinCtx, field) {
4168
4289
  return void 0;
4169
4290
  };
4170
4291
  }
4171
- var EMPTY_PLAN, Query;
4292
+ var EMPTY_PLAN, DEFAULT_CROSS_JOIN_MAX_ROWS, Query;
4172
4293
  var init_builder = __esm({
4173
4294
  "src/query/builder.ts"() {
4174
4295
  "use strict";
4175
4296
  init_predicate();
4176
4297
  init_join();
4298
+ init_errors();
4177
4299
  init_live();
4178
4300
  init_strategy4();
4179
4301
  EMPTY_PLAN = {
@@ -4183,6 +4305,7 @@ var init_builder = __esm({
4183
4305
  offset: 0,
4184
4306
  joins: []
4185
4307
  };
4308
+ DEFAULT_CROSS_JOIN_MAX_ROWS = 5e4;
4186
4309
  Query = class _Query {
4187
4310
  source;
4188
4311
  plan;
@@ -4464,6 +4587,78 @@ var init_builder = __esm({
4464
4587
  this.predicates
4465
4588
  );
4466
4589
  }
4590
+ /**
4591
+ * Cartesian-product cross-join against `target` collection. Each result row
4592
+ * carries the original `T` fields plus `result[as]` populated from every
4593
+ * right-side row (or the filtered subset when `on:` is supplied).
4594
+ *
4595
+ * **Order matters:** `.where().crossJoin()` filters BEFORE expanding (cheaper);
4596
+ * `.crossJoin().where('alias.field', ...)` filters AFTER (required when the
4597
+ * where clause references the aliased fields).
4598
+ *
4599
+ * **Cost ceiling:** `CrossJoinTooLargeError` fires before allocation when
4600
+ * `leftRows × rightRows` (or the cumulative lateral count) exceeds the limit.
4601
+ * Default: 50,000 rows. Override per-clause with `{ maxRows: N }`.
4602
+ *
4603
+ * **`on:` shapes:**
4604
+ * - `on: (left) => TTarget[]` — subset form (most efficient)
4605
+ * - `on: (left) => (right) => boolean` — predicate form
4606
+ * - `on: { predicate: 'name' }` — MV-safe, hash-tracked form
4607
+ * (requires the Query to have been augmented via `_withPredicates`)
4608
+ *
4609
+ * Requires a JoinContext (constructed via `collection.query()`).
4610
+ */
4611
+ crossJoin(target, opts) {
4612
+ if (!this.joinContext) {
4613
+ throw new Error(
4614
+ `Query.crossJoin("${target}"): requires a join context. Use collection.query() to construct a cross-join-capable Query instead of the Query constructor directly.`
4615
+ );
4616
+ }
4617
+ let onFn;
4618
+ let onPredicateName;
4619
+ if (opts.on !== void 0) {
4620
+ if (typeof opts.on === "function") {
4621
+ onFn = opts.on;
4622
+ if (this.predicates) {
4623
+ console.warn(
4624
+ `Query.crossJoin("${target}", { on: callback }): inline on: callback inside a withMaterializedView query() disables queryHash drift detection for this cross-join. Use on: { predicate: '<name>' } to enable it.`
4625
+ );
4626
+ }
4627
+ } else {
4628
+ const predName = opts.on.predicate;
4629
+ if (!this.predicates) {
4630
+ throw new Error(
4631
+ `Query.crossJoin("${target}", { on: { predicate: "${predName}" } }): the { predicate } form requires a predicates map. Use this form inside a withMaterializedView query() callback that declares predicates: { ${predName}: { hash, fn } }.`
4632
+ );
4633
+ }
4634
+ const decl = this.predicates.get(predName);
4635
+ if (!decl) {
4636
+ throw new Error(
4637
+ `Query.crossJoin("${target}"): predicate "${predName}" not registered. Available: ${[...this.predicates.keys()].join(", ") || "(none)"}.`
4638
+ );
4639
+ }
4640
+ const as = opts.as;
4641
+ const predicateFn = decl.fn;
4642
+ onFn = (_left) => (right) => predicateFn({ ..._left, [as]: right });
4643
+ onPredicateName = predName;
4644
+ }
4645
+ }
4646
+ const clause = {
4647
+ type: "crossJoin",
4648
+ target,
4649
+ as: opts.as,
4650
+ ...onFn !== void 0 && { on: onFn },
4651
+ ...onPredicateName !== void 0 && { onPredicateName },
4652
+ ...opts.maxRows !== void 0 && { maxRows: opts.maxRows }
4653
+ };
4654
+ return new _Query(
4655
+ this.source,
4656
+ { ...this.plan, clauses: [...this.plan.clauses, clause] },
4657
+ this.joinContext,
4658
+ this.aggregateStrategy,
4659
+ this.predicates
4660
+ );
4661
+ }
4467
4662
  /**
4468
4663
  * Execute the plan and return the matching records. When the plan
4469
4664
  * carries any join legs, they are applied after `where` / `orderBy`
@@ -4471,7 +4666,7 @@ var init_builder = __esm({
4471
4666
  * for the ordering rationale.
4472
4667
  */
4473
4668
  toArray() {
4474
- const base = executePlanWithSource(this.source, this.plan);
4669
+ const base = executePlanWithSource(this.source, this.plan, this.joinContext);
4475
4670
  if (this.plan.joins.length === 0) return base;
4476
4671
  if (!this.joinContext) {
4477
4672
  throw new Error(
@@ -4495,6 +4690,14 @@ var init_builder = __esm({
4495
4690
  * intent is purely to count.
4496
4691
  */
4497
4692
  count() {
4693
+ if (this.plan.clauses.some((c) => c.type === "crossJoin")) {
4694
+ if (!this.joinContext) {
4695
+ throw new Error(
4696
+ `Query.count(): plan contains crossJoin clauses but no JoinContext is attached.`
4697
+ );
4698
+ }
4699
+ return executeClausePipeline(this.source, this.plan.clauses, this.joinContext).length;
4700
+ }
4498
4701
  const { candidates, remainingClauses } = candidateRecords(this.source, this.plan.clauses);
4499
4702
  if (remainingClauses.length === 0) return candidates.length;
4500
4703
  return filterRecords(candidates, remainingClauses).length;
@@ -4542,7 +4745,13 @@ var init_builder = __esm({
4542
4745
  aggregate(spec) {
4543
4746
  const source = this.source;
4544
4747
  const clauses = this.plan.clauses;
4748
+ const joinCtx = this.joinContext;
4749
+ const hasCrossJoins = clauses.some((c) => c.type === "crossJoin");
4545
4750
  const executeRecords = () => {
4751
+ if (hasCrossJoins) {
4752
+ if (!joinCtx) throw new Error("Query.aggregate(): crossJoin requires a join context");
4753
+ return executeClausePipeline(source, clauses, joinCtx);
4754
+ }
4546
4755
  const { candidates, remainingClauses } = candidateRecords(source, clauses);
4547
4756
  return remainingClauses.length === 0 ? candidates : filterRecords(candidates, remainingClauses);
4548
4757
  };
@@ -4559,7 +4768,13 @@ var init_builder = __esm({
4559
4768
  }
4560
4769
  const source = this.source;
4561
4770
  const clauses = this.plan.clauses;
4771
+ const joinCtx = this.joinContext;
4772
+ const hasCrossJoins = clauses.some((c) => c.type === "crossJoin");
4562
4773
  const executeRecords = () => {
4774
+ if (hasCrossJoins) {
4775
+ if (!joinCtx) throw new Error("Query.groupBy(): crossJoin requires a join context");
4776
+ return executeClausePipeline(source, clauses, joinCtx);
4777
+ }
4563
4778
  const { candidates, remainingClauses } = candidateRecords(source, clauses);
4564
4779
  return remainingClauses.length === 0 ? candidates : filterRecords(candidates, remainingClauses);
4565
4780
  };
@@ -4673,6 +4888,21 @@ var init_builder = __esm({
4673
4888
  }
4674
4889
  }
4675
4890
  }
4891
+ if (this.joinContext) {
4892
+ const subscribedCross = /* @__PURE__ */ new Set();
4893
+ for (const clause of this.plan.clauses) {
4894
+ if (clause.type !== "crossJoin") continue;
4895
+ if (subscribedCross.has(clause.target)) continue;
4896
+ subscribedCross.add(clause.target);
4897
+ const rightSource = this.joinContext.resolveSource(clause.target);
4898
+ if (rightSource?.subscribe) {
4899
+ const rightSubscribe = rightSource.subscribe.bind(rightSource);
4900
+ upstreams.push({
4901
+ subscribe: (cb) => rightSubscribe(cb)
4902
+ });
4903
+ }
4904
+ }
4905
+ }
4676
4906
  return buildLiveQuery(() => this.toArray(), upstreams);
4677
4907
  }
4678
4908
  /**
@@ -5992,6 +6222,11 @@ function analyzeDependencies(query) {
5992
6222
  for (const leg of plan.joins) {
5993
6223
  deps.add(leg.target);
5994
6224
  }
6225
+ for (const clause of plan.clauses) {
6226
+ if (clause.type === "crossJoin") {
6227
+ deps.add(clause.target);
6228
+ }
6229
+ }
5995
6230
  walkClausesForJoins(plan, deps, ctx);
5996
6231
  return deps;
5997
6232
  }
@@ -6007,7 +6242,19 @@ function summarizeQueryPlan(query) {
6007
6242
  const ctx = query._joinContext();
6008
6243
  return JSON.stringify({
6009
6244
  root: ctx?.leftCollection ?? null,
6010
- clauses: plan.clauses,
6245
+ clauses: plan.clauses.map((c) => {
6246
+ if (c.type === "crossJoin") {
6247
+ return {
6248
+ type: "crossJoin",
6249
+ target: c.target,
6250
+ as: c.as,
6251
+ // Inline on: callback: use sentinel — drift detection disabled for this MV
6252
+ onPredicateName: c.onPredicateName ?? (c.on ? "[inline]" : null),
6253
+ maxRows: c.maxRows ?? null
6254
+ };
6255
+ }
6256
+ return c;
6257
+ }),
6011
6258
  orderBy: plan.orderBy,
6012
6259
  limit: plan.limit ?? null,
6013
6260
  offset: plan.offset,
@@ -14832,20 +15079,42 @@ var init_unlock_state = __esm({
14832
15079
  }
14833
15080
  });
14834
15081
 
14835
- // src/tx/strategy.ts
14836
- var NOT_ENABLED5, NO_TX;
15082
+ // src/snapshots/strategy.ts
15083
+ var NOT_ENABLED5, NO_SNAPSHOTS;
14837
15084
  var init_strategy10 = __esm({
14838
- "src/tx/strategy.ts"() {
15085
+ "src/snapshots/strategy.ts"() {
14839
15086
  "use strict";
14840
15087
  NOT_ENABLED5 = new Error(
15088
+ 'Snapshots require the snapshot strategy. Import `{ withSnapshots }` from "@noy-db/hub/snapshots" and pass it to `createNoydb({ snapshotStrategy: withSnapshots({ store }) })`.'
15089
+ );
15090
+ NO_SNAPSHOTS = {
15091
+ async snapshot() {
15092
+ throw NOT_ENABLED5;
15093
+ },
15094
+ async listSnapshots() {
15095
+ throw NOT_ENABLED5;
15096
+ },
15097
+ async restoreSnapshot() {
15098
+ throw NOT_ENABLED5;
15099
+ }
15100
+ };
15101
+ }
15102
+ });
15103
+
15104
+ // src/tx/strategy.ts
15105
+ var NOT_ENABLED6, NO_TX;
15106
+ var init_strategy11 = __esm({
15107
+ "src/tx/strategy.ts"() {
15108
+ "use strict";
15109
+ NOT_ENABLED6 = new Error(
14841
15110
  'Multi-record transactions require the tx strategy. Import `{ withTransactions }` from "@noy-db/hub/tx" and pass it to `createNoydb({ txStrategy: withTransactions() })`.'
14842
15111
  );
14843
15112
  NO_TX = {
14844
15113
  async runTransaction() {
14845
- throw NOT_ENABLED5;
15114
+ throw NOT_ENABLED6;
14846
15115
  },
14847
15116
  async runDryRun() {
14848
- throw NOT_ENABLED5;
15117
+ throw NOT_ENABLED6;
14849
15118
  }
14850
15119
  };
14851
15120
  }
@@ -14870,7 +15139,7 @@ function notEnabled4(op) {
14870
15139
  );
14871
15140
  }
14872
15141
  var NO_SESSION;
14873
- var init_strategy11 = __esm({
15142
+ var init_strategy12 = __esm({
14874
15143
  "src/session/strategy.ts"() {
14875
15144
  "use strict";
14876
15145
  NO_SESSION = {
@@ -15306,10 +15575,11 @@ var init_noydb = __esm({
15306
15575
  init_authenticators();
15307
15576
  init_unlock_state();
15308
15577
  init_sync_strategy();
15309
- init_transaction();
15310
15578
  init_strategy10();
15311
- init_sync_policy();
15579
+ init_transaction();
15312
15580
  init_strategy11();
15581
+ init_sync_policy();
15582
+ init_strategy12();
15313
15583
  init_policy2();
15314
15584
  ROLE_RANK = {
15315
15585
  client: 1,
@@ -15366,6 +15636,7 @@ var init_noydb = __esm({
15366
15636
  txStrategy;
15367
15637
  sessionStrategy;
15368
15638
  syncStrategy;
15639
+ snapshotStrategy;
15369
15640
  /**
15370
15641
  * Currently-running multi-record transaction, set by
15371
15642
  * `runTransaction` at the start of Phase 2 (commit) and cleared in
@@ -15390,6 +15661,7 @@ var init_noydb = __esm({
15390
15661
  this.txStrategy = options.txStrategy ?? NO_TX;
15391
15662
  this.sessionStrategy = options.sessionStrategy ?? NO_SESSION;
15392
15663
  this.syncStrategy = options.syncStrategy ?? NO_SYNC;
15664
+ this.snapshotStrategy = options.snapshotStrategy ?? NO_SNAPSHOTS;
15393
15665
  this.publicEnvelopeSchema = resolveSchema(options.publicEnvelope);
15394
15666
  if (options.sessionPolicy) {
15395
15667
  this.sessionStrategy.validateSessionPolicy(options.sessionPolicy);
@@ -17376,6 +17648,45 @@ var init_noydb = __esm({
17376
17648
  this.keyringCache.set(vault, keyring);
17377
17649
  return keyring;
17378
17650
  }
17651
+ /**
17652
+ * Take an on-demand checkpoint of the given vault.
17653
+ * Requires `snapshotStrategy: withSnapshots({ store })` in `createNoydb`.
17654
+ * @throws ValidationError when the vault is not open
17655
+ */
17656
+ async snapshot(vault, opts) {
17657
+ if (this.closed) throw new ValidationError("Instance is closed");
17658
+ const v = this.vaultCache.get(vault);
17659
+ if (!v) {
17660
+ throw new ValidationError(
17661
+ `Vault "${vault}" is not open. Call openVault() first.`
17662
+ );
17663
+ }
17664
+ return this.snapshotStrategy.snapshot(v, this.options.user, opts);
17665
+ }
17666
+ /**
17667
+ * List all snapshots for the given vault, newest first.
17668
+ * Reads only the sidecar index — does not download snapshot bytes.
17669
+ */
17670
+ async listSnapshots(vault) {
17671
+ if (this.closed) throw new ValidationError("Instance is closed");
17672
+ return this.snapshotStrategy.listSnapshots(vault);
17673
+ }
17674
+ /**
17675
+ * Restore the vault to a previously snapshotted state.
17676
+ * Runs `verifyBackupIntegrity()` automatically on restore.
17677
+ * @throws SnapshotNotFoundError when `version` doesn't exist in the store
17678
+ * @throws ValidationError when the vault is not open
17679
+ */
17680
+ async restoreSnapshot(vault, version) {
17681
+ if (this.closed) throw new ValidationError("Instance is closed");
17682
+ const v = this.vaultCache.get(vault);
17683
+ if (!v) {
17684
+ throw new ValidationError(
17685
+ `Vault "${vault}" is not open. Call openVault() first.`
17686
+ );
17687
+ }
17688
+ return this.snapshotStrategy.restoreSnapshot(v, version);
17689
+ }
17379
17690
  };
17380
17691
  }
17381
17692
  });