@noy-db/hub 0.2.0-pre.27 → 0.2.0-pre.29

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 (280) hide show
  1. package/dist/aggregate/index.cjs +7 -0
  2. package/dist/aggregate/index.cjs.map +1 -1
  3. package/dist/aggregate/index.d.cts +3 -3
  4. package/dist/aggregate/index.d.ts +3 -3
  5. package/dist/aggregate/index.js +5 -5
  6. package/dist/attestation/index.cjs.map +1 -1
  7. package/dist/attestation/index.d.cts +4 -4
  8. package/dist/attestation/index.d.ts +4 -4
  9. package/dist/attestation/index.js +6 -6
  10. package/dist/blobs/index.cjs +2 -2
  11. package/dist/blobs/index.cjs.map +1 -1
  12. package/dist/blobs/index.d.cts +6 -6
  13. package/dist/blobs/index.d.ts +6 -6
  14. package/dist/blobs/index.js +6 -6
  15. package/dist/bundle/index.cjs +947 -6
  16. package/dist/bundle/index.cjs.map +1 -1
  17. package/dist/bundle/index.d.cts +6 -6
  18. package/dist/bundle/index.d.ts +6 -6
  19. package/dist/bundle/index.js +10 -10
  20. package/dist/{chunk-KA5A5CSD.js → chunk-2QDWRK3B.js} +5 -5
  21. package/dist/{chunk-6H4CAHMQ.js → chunk-2UT7HJJR.js} +4 -4
  22. package/dist/{chunk-E5TJAQS7.js → chunk-2ZYIN3BL.js} +2 -2
  23. package/dist/{chunk-CVTPNW2Y.js → chunk-45QJXLLS.js} +8 -8
  24. package/dist/{chunk-H4XFA2LM.js → chunk-4K4QKYK4.js} +3 -3
  25. package/dist/{chunk-RHVYFAVQ.js → chunk-4L6N56B4.js} +2 -2
  26. package/dist/{chunk-EW3H5Y7N.js → chunk-4YD7VZH4.js} +2 -2
  27. package/dist/{chunk-BOMH3637.js → chunk-553CK4E2.js} +3 -3
  28. package/dist/{chunk-I2RX62RX.js → chunk-5PTX7PKD.js} +4 -4
  29. package/dist/{chunk-7DDTFGXY.js → chunk-6BSYMFYS.js} +7 -7
  30. package/dist/chunk-6BSYMFYS.js.map +1 -0
  31. package/dist/{chunk-TESFHBOW.js → chunk-6EKRQ7QF.js} +3 -3
  32. package/dist/{chunk-Q7P4WHTL.js → chunk-7GPQPLGO.js} +2 -2
  33. package/dist/{chunk-AD6RNBAW.js → chunk-A7DNZVAV.js} +1 -1
  34. package/dist/chunk-A7DNZVAV.js.map +1 -0
  35. package/dist/{chunk-OMBPGXCL.js → chunk-ASIGWYRA.js} +2 -2
  36. package/dist/{chunk-IWGVH2RR.js → chunk-AWU4JF7C.js} +6 -6
  37. package/dist/{chunk-SKYBEGHB.js → chunk-BEZ2EV43.js} +2 -2
  38. package/dist/{chunk-EJJTUDNI.js → chunk-BITB3T5Z.js} +3 -3
  39. package/dist/{chunk-6M5JKTUQ.js → chunk-CIZDUAHI.js} +4 -4
  40. package/dist/{chunk-5EITJMUJ.js → chunk-CUPTCF4R.js} +5 -5
  41. package/dist/{chunk-FO5WEDKF.js → chunk-DEE4CRYN.js} +2 -2
  42. package/dist/{chunk-WVYL6HM7.js → chunk-DJO4OYCJ.js} +2 -2
  43. package/dist/{chunk-7JSP3E67.js → chunk-E2MDPPOC.js} +2 -2
  44. package/dist/{chunk-LX4CPLU6.js → chunk-FFKQ65YX.js} +2 -2
  45. package/dist/{chunk-VUUQYWF5.js → chunk-G7ALNCQH.js} +2 -2
  46. package/dist/{chunk-Z3BJF7SF.js → chunk-GGXN73NM.js} +36 -4
  47. package/dist/chunk-GGXN73NM.js.map +1 -0
  48. package/dist/{chunk-HAKEZTA7.js → chunk-JOJPBZSZ.js} +5 -5
  49. package/dist/{chunk-DDOYOMAD.js → chunk-JZ5DS4DP.js} +32 -2
  50. package/dist/chunk-JZ5DS4DP.js.map +1 -0
  51. package/dist/{chunk-C7UIT5XY.js → chunk-K6NVSHAH.js} +4 -4
  52. package/dist/{chunk-3BANVNDH.js → chunk-KJ3K5VZM.js} +2 -2
  53. package/dist/{chunk-ZW2YSN6G.js → chunk-LBILABKZ.js} +4 -4
  54. package/dist/{chunk-K6PCTYAH.js → chunk-LXKBG52H.js} +4 -4
  55. package/dist/{chunk-YYTM4U4J.js → chunk-MPIZQGFA.js} +2 -2
  56. package/dist/{chunk-SID2NJNF.js → chunk-MRJPSXPE.js} +3 -3
  57. package/dist/{chunk-J73KU4AE.js → chunk-MSMDDDDJ.js} +2 -2
  58. package/dist/{chunk-6ZKXFMUG.js → chunk-QBLPY44S.js} +3 -3
  59. package/dist/{chunk-PS6PSEZL.js → chunk-QGBBQKDS.js} +35 -5
  60. package/dist/chunk-QGBBQKDS.js.map +1 -0
  61. package/dist/{chunk-2NYVA6FW.js → chunk-QWJCNXH2.js} +3 -3
  62. package/dist/{chunk-KD253AI5.js → chunk-QXWJQ7UU.js} +23 -4
  63. package/dist/chunk-QXWJQ7UU.js.map +1 -0
  64. package/dist/{chunk-YRQPI67X.js → chunk-RCB6GWTC.js} +2 -2
  65. package/dist/{chunk-PFKAT4NT.js → chunk-REHF3HSJ.js} +5 -5
  66. package/dist/{chunk-FUDVHE2U.js → chunk-SAAJYSVV.js} +2 -2
  67. package/dist/{chunk-VJNV2GRF.js → chunk-SHJ3BRTZ.js} +5 -5
  68. package/dist/{chunk-BMDVFBCL.js → chunk-SQXTKZL7.js} +3 -3
  69. package/dist/{chunk-2KA3PDUR.js → chunk-TMUMMAWV.js} +2 -2
  70. package/dist/{chunk-DONPLWRC.js → chunk-TZGWI5AX.js} +4 -4
  71. package/dist/{chunk-KNJ7MK4B.js → chunk-UBF5JEOJ.js} +2 -2
  72. package/dist/{chunk-FJ3C3ELF.js → chunk-XAYDHD2O.js} +2 -2
  73. package/dist/{chunk-RRCRITDM.js → chunk-XYW2CSCI.js} +3 -3
  74. package/dist/{chunk-LXA2E3VI.js → chunk-ZCMOS4H2.js} +4 -4
  75. package/dist/{chunk-KSKKLVPA.js → chunk-ZDW22N3E.js} +822 -57
  76. package/dist/chunk-ZDW22N3E.js.map +1 -0
  77. package/dist/consent/index.cjs.map +1 -1
  78. package/dist/consent/index.d.cts +5 -5
  79. package/dist/consent/index.d.ts +5 -5
  80. package/dist/consent/index.js +3 -3
  81. package/dist/{crypto-YBKBNPVM.js → crypto-G6XU2V2Y.js} +3 -3
  82. package/dist/{decrypt-partition-CptDdcCx.d.ts → decrypt-partition-5Gt0EcTc.d.ts} +1 -1
  83. package/dist/{decrypt-partition-DmkeOB4I.d.cts → decrypt-partition-DDSArPPW.d.cts} +1 -1
  84. package/dist/{delegation-4JSMM6BB.js → delegation-ZEH4LKEM.js} +5 -5
  85. package/dist/derivations/index.cjs.map +1 -1
  86. package/dist/derivations/index.d.cts +6 -6
  87. package/dist/derivations/index.d.ts +6 -6
  88. package/dist/derivations/index.js +4 -4
  89. package/dist/{dev-unlock-Y9znMkQ2.d.ts → dev-unlock-BF9IhLPn.d.ts} +1 -1
  90. package/dist/{dev-unlock-DUTLA3Sc.d.cts → dev-unlock-CIkHrcRm.d.cts} +1 -1
  91. package/dist/{errors-Dwk2k1xY.d.ts → errors-BAWO5Z5a.d.cts} +25 -1
  92. package/dist/{errors-Dwk2k1xY.d.cts → errors-BAWO5Z5a.d.ts} +25 -1
  93. package/dist/executor-DWVP4BSJ.js +8 -0
  94. package/dist/executor-HB2YMIYC.js +12 -0
  95. package/dist/executor-HO3SIRSF.js +8 -0
  96. package/dist/{fanout-sidecar-OC4QVTS2.js → fanout-sidecar-BMT7I6FI.js} +2 -2
  97. package/dist/forget/index.js +4 -4
  98. package/dist/guards/index.cjs.map +1 -1
  99. package/dist/guards/index.d.cts +6 -6
  100. package/dist/guards/index.d.ts +6 -6
  101. package/dist/guards/index.js +3 -3
  102. package/dist/{hash-DFK7cGdo.d.cts → hash-DfhndFcd.d.cts} +1 -1
  103. package/dist/{hash-Btl9IvQS.d.ts → hash-Jl0qarQx.d.ts} +1 -1
  104. package/dist/history/index.cjs.map +1 -1
  105. package/dist/history/index.d.cts +6 -6
  106. package/dist/history/index.d.ts +6 -6
  107. package/dist/history/index.js +5 -5
  108. package/dist/i18n/index.cjs +98 -1
  109. package/dist/i18n/index.cjs.map +1 -1
  110. package/dist/i18n/index.d.cts +5 -5
  111. package/dist/i18n/index.d.ts +5 -5
  112. package/dist/i18n/index.js +85 -6
  113. package/dist/i18n/index.js.map +1 -1
  114. package/dist/{index-DoxKSsMj.d.cts → index-C1SC1EPe.d.cts} +19 -2
  115. package/dist/{index-CqzZml-D.d.cts → index-DPG2nFmT.d.cts} +28 -5
  116. package/dist/{index-wRwJVVJQ.d.ts → index-DcxTv3zx.d.ts} +28 -5
  117. package/dist/{index-LaexBi3v.d.ts → index-Ddm8D3Oo.d.ts} +19 -2
  118. package/dist/index.cjs +969 -9
  119. package/dist/index.cjs.map +1 -1
  120. package/dist/index.d.cts +16 -16
  121. package/dist/index.d.ts +16 -16
  122. package/dist/index.js +54 -47
  123. package/dist/index.js.map +1 -1
  124. package/dist/indexing/index.cjs.map +1 -1
  125. package/dist/indexing/index.js +4 -4
  126. package/dist/issue-FZRTVGRE.js +12 -0
  127. package/dist/kernel/index.cjs +33 -0
  128. package/dist/kernel/index.cjs.map +1 -1
  129. package/dist/kernel/index.d.cts +5 -5
  130. package/dist/kernel/index.d.ts +5 -5
  131. package/dist/kernel/index.js +9 -7
  132. package/dist/{ledger-XQ4KVFQ6.js → ledger-PMTR2Q62.js} +5 -5
  133. package/dist/materialized-views/index.cjs +7 -0
  134. package/dist/materialized-views/index.cjs.map +1 -1
  135. package/dist/materialized-views/index.d.cts +6 -6
  136. package/dist/materialized-views/index.d.ts +6 -6
  137. package/dist/materialized-views/index.js +8 -8
  138. package/dist/{mime-magic-OiPT1qed.d.ts → mime-magic-BOI-I5dq.d.ts} +1 -1
  139. package/dist/{mime-magic-Co4Pyj-O.d.cts → mime-magic-C0TM7FtF.d.cts} +1 -1
  140. package/dist/noydb-Y3ZLZNXA.js +39 -0
  141. package/dist/overlay-views/index.cjs.map +1 -1
  142. package/dist/overlay-views/index.d.cts +6 -6
  143. package/dist/overlay-views/index.d.ts +6 -6
  144. package/dist/overlay-views/index.js +4 -4
  145. package/dist/periods/index.cjs.map +1 -1
  146. package/dist/periods/index.d.cts +5 -5
  147. package/dist/periods/index.d.ts +5 -5
  148. package/dist/periods/index.js +5 -5
  149. package/dist/{public-envelope-O6X6AUUS.js → public-envelope-S2S2VR3F.js} +4 -4
  150. package/dist/query/index.cjs +37 -0
  151. package/dist/query/index.cjs.map +1 -1
  152. package/dist/query/index.d.cts +3 -3
  153. package/dist/query/index.d.ts +3 -3
  154. package/dist/query/index.js +7 -7
  155. package/dist/{registry-OUZ3VBZA.js → registry-53A55ZZE.js} +3 -3
  156. package/dist/registry-FKL4SLU4.js +8 -0
  157. package/dist/registry-IEU6ATO7.js +8 -0
  158. package/dist/{revoke-QJ2HUM4W.js → revoke-AOCAVR56.js} +6 -6
  159. package/dist/sealed-record/index.cjs.map +1 -1
  160. package/dist/sealed-record/index.d.cts +1 -1
  161. package/dist/sealed-record/index.d.ts +1 -1
  162. package/dist/sealed-record/index.js +2 -2
  163. package/dist/session/index.cjs.map +1 -1
  164. package/dist/session/index.d.cts +6 -6
  165. package/dist/session/index.d.ts +6 -6
  166. package/dist/session/index.js +3 -3
  167. package/dist/shadow/index.cjs.map +1 -1
  168. package/dist/shadow/index.d.cts +5 -5
  169. package/dist/shadow/index.d.ts +5 -5
  170. package/dist/shadow/index.js +2 -2
  171. package/dist/{signer-SCJ6C6HQ.js → signer-JMK6W2Y6.js} +5 -5
  172. package/dist/snapshots/index.cjs.map +1 -1
  173. package/dist/snapshots/index.d.cts +5 -5
  174. package/dist/snapshots/index.d.ts +5 -5
  175. package/dist/snapshots/index.js +4 -4
  176. package/dist/{stale-KKCHF2VB.js → stale-IIIGOHBW.js} +2 -2
  177. package/dist/store/index.cjs.map +1 -1
  178. package/dist/store/index.d.cts +5 -5
  179. package/dist/store/index.d.ts +5 -5
  180. package/dist/store/index.js +2 -2
  181. package/dist/{strategy-D1zjEV3n.d.cts → strategy-8QGs5KQE.d.ts} +21 -2
  182. package/dist/{strategy-YQ1qJWyq.d.ts → strategy-mJExw4LQ.d.cts} +21 -2
  183. package/dist/sync/index.cjs.map +1 -1
  184. package/dist/sync/index.d.cts +4 -4
  185. package/dist/sync/index.d.ts +4 -4
  186. package/dist/sync/index.js +4 -4
  187. package/dist/team/index.cjs.map +1 -1
  188. package/dist/team/index.d.cts +5 -5
  189. package/dist/team/index.d.ts +5 -5
  190. package/dist/team/index.js +8 -8
  191. package/dist/{transition-guard-CJmb8O8q.d.ts → transition-guard-BixCDmBI.d.ts} +1 -1
  192. package/dist/{transition-guard-Dzj68JWC.d.cts → transition-guard-DnAlUf9R.d.cts} +1 -1
  193. package/dist/tx/index.cjs.map +1 -1
  194. package/dist/tx/index.d.cts +5 -5
  195. package/dist/tx/index.d.ts +5 -5
  196. package/dist/tx/index.js +3 -3
  197. package/dist/{types-CwrTuYFI.d.cts → types-Ba1vQ3AY.d.cts} +203 -6
  198. package/dist/{types-CkSWJt0H.d.ts → types-CUmZYJwN.d.ts} +203 -6
  199. package/dist/util/index.cjs.map +1 -1
  200. package/dist/util/index.js +1 -1
  201. package/dist/{with-materialized-view-BVfcPlaE.d.ts → with-materialized-view-Bjx6VYPc.d.ts} +1 -1
  202. package/dist/{with-materialized-view-dPG213gd.d.cts → with-materialized-view-Z_aHLln6.d.cts} +1 -1
  203. package/dist/{with-overlayed-view-zYPQzGGh.d.ts → with-overlayed-view-B8PkL179.d.ts} +1 -1
  204. package/dist/{with-overlayed-view-CJ2UDBol.d.cts → with-overlayed-view-pTOFgHRq.d.cts} +1 -1
  205. package/dist/{with-rollup-BvaJefEs.d.ts → with-rollup-Cd3t01Mz.d.ts} +1 -1
  206. package/dist/{with-rollup-B_zbRi3f.d.cts → with-rollup-D9qQoffP.d.cts} +1 -1
  207. package/package.json +3 -3
  208. package/dist/chunk-7DDTFGXY.js.map +0 -1
  209. package/dist/chunk-AD6RNBAW.js.map +0 -1
  210. package/dist/chunk-DDOYOMAD.js.map +0 -1
  211. package/dist/chunk-KD253AI5.js.map +0 -1
  212. package/dist/chunk-KSKKLVPA.js.map +0 -1
  213. package/dist/chunk-PS6PSEZL.js.map +0 -1
  214. package/dist/chunk-Z3BJF7SF.js.map +0 -1
  215. package/dist/executor-3SVNESQ3.js +0 -8
  216. package/dist/executor-BIW4FT5R.js +0 -12
  217. package/dist/executor-VEZUBJNQ.js +0 -8
  218. package/dist/issue-ZZ2XPOGP.js +0 -12
  219. package/dist/noydb-EY52NVH4.js +0 -39
  220. package/dist/registry-CMEVTOCN.js +0 -8
  221. package/dist/registry-XUBRO5JJ.js +0 -8
  222. /package/dist/{chunk-KA5A5CSD.js.map → chunk-2QDWRK3B.js.map} +0 -0
  223. /package/dist/{chunk-6H4CAHMQ.js.map → chunk-2UT7HJJR.js.map} +0 -0
  224. /package/dist/{chunk-E5TJAQS7.js.map → chunk-2ZYIN3BL.js.map} +0 -0
  225. /package/dist/{chunk-CVTPNW2Y.js.map → chunk-45QJXLLS.js.map} +0 -0
  226. /package/dist/{chunk-H4XFA2LM.js.map → chunk-4K4QKYK4.js.map} +0 -0
  227. /package/dist/{chunk-RHVYFAVQ.js.map → chunk-4L6N56B4.js.map} +0 -0
  228. /package/dist/{chunk-EW3H5Y7N.js.map → chunk-4YD7VZH4.js.map} +0 -0
  229. /package/dist/{chunk-BOMH3637.js.map → chunk-553CK4E2.js.map} +0 -0
  230. /package/dist/{chunk-I2RX62RX.js.map → chunk-5PTX7PKD.js.map} +0 -0
  231. /package/dist/{chunk-TESFHBOW.js.map → chunk-6EKRQ7QF.js.map} +0 -0
  232. /package/dist/{chunk-Q7P4WHTL.js.map → chunk-7GPQPLGO.js.map} +0 -0
  233. /package/dist/{chunk-OMBPGXCL.js.map → chunk-ASIGWYRA.js.map} +0 -0
  234. /package/dist/{chunk-IWGVH2RR.js.map → chunk-AWU4JF7C.js.map} +0 -0
  235. /package/dist/{chunk-SKYBEGHB.js.map → chunk-BEZ2EV43.js.map} +0 -0
  236. /package/dist/{chunk-EJJTUDNI.js.map → chunk-BITB3T5Z.js.map} +0 -0
  237. /package/dist/{chunk-6M5JKTUQ.js.map → chunk-CIZDUAHI.js.map} +0 -0
  238. /package/dist/{chunk-5EITJMUJ.js.map → chunk-CUPTCF4R.js.map} +0 -0
  239. /package/dist/{chunk-FO5WEDKF.js.map → chunk-DEE4CRYN.js.map} +0 -0
  240. /package/dist/{chunk-WVYL6HM7.js.map → chunk-DJO4OYCJ.js.map} +0 -0
  241. /package/dist/{chunk-7JSP3E67.js.map → chunk-E2MDPPOC.js.map} +0 -0
  242. /package/dist/{chunk-LX4CPLU6.js.map → chunk-FFKQ65YX.js.map} +0 -0
  243. /package/dist/{chunk-VUUQYWF5.js.map → chunk-G7ALNCQH.js.map} +0 -0
  244. /package/dist/{chunk-HAKEZTA7.js.map → chunk-JOJPBZSZ.js.map} +0 -0
  245. /package/dist/{chunk-C7UIT5XY.js.map → chunk-K6NVSHAH.js.map} +0 -0
  246. /package/dist/{chunk-3BANVNDH.js.map → chunk-KJ3K5VZM.js.map} +0 -0
  247. /package/dist/{chunk-ZW2YSN6G.js.map → chunk-LBILABKZ.js.map} +0 -0
  248. /package/dist/{chunk-K6PCTYAH.js.map → chunk-LXKBG52H.js.map} +0 -0
  249. /package/dist/{chunk-YYTM4U4J.js.map → chunk-MPIZQGFA.js.map} +0 -0
  250. /package/dist/{chunk-SID2NJNF.js.map → chunk-MRJPSXPE.js.map} +0 -0
  251. /package/dist/{chunk-J73KU4AE.js.map → chunk-MSMDDDDJ.js.map} +0 -0
  252. /package/dist/{chunk-6ZKXFMUG.js.map → chunk-QBLPY44S.js.map} +0 -0
  253. /package/dist/{chunk-2NYVA6FW.js.map → chunk-QWJCNXH2.js.map} +0 -0
  254. /package/dist/{chunk-YRQPI67X.js.map → chunk-RCB6GWTC.js.map} +0 -0
  255. /package/dist/{chunk-PFKAT4NT.js.map → chunk-REHF3HSJ.js.map} +0 -0
  256. /package/dist/{chunk-FUDVHE2U.js.map → chunk-SAAJYSVV.js.map} +0 -0
  257. /package/dist/{chunk-VJNV2GRF.js.map → chunk-SHJ3BRTZ.js.map} +0 -0
  258. /package/dist/{chunk-BMDVFBCL.js.map → chunk-SQXTKZL7.js.map} +0 -0
  259. /package/dist/{chunk-2KA3PDUR.js.map → chunk-TMUMMAWV.js.map} +0 -0
  260. /package/dist/{chunk-DONPLWRC.js.map → chunk-TZGWI5AX.js.map} +0 -0
  261. /package/dist/{chunk-KNJ7MK4B.js.map → chunk-UBF5JEOJ.js.map} +0 -0
  262. /package/dist/{chunk-FJ3C3ELF.js.map → chunk-XAYDHD2O.js.map} +0 -0
  263. /package/dist/{chunk-RRCRITDM.js.map → chunk-XYW2CSCI.js.map} +0 -0
  264. /package/dist/{chunk-LXA2E3VI.js.map → chunk-ZCMOS4H2.js.map} +0 -0
  265. /package/dist/{crypto-YBKBNPVM.js.map → crypto-G6XU2V2Y.js.map} +0 -0
  266. /package/dist/{delegation-4JSMM6BB.js.map → delegation-ZEH4LKEM.js.map} +0 -0
  267. /package/dist/{executor-3SVNESQ3.js.map → executor-DWVP4BSJ.js.map} +0 -0
  268. /package/dist/{executor-BIW4FT5R.js.map → executor-HB2YMIYC.js.map} +0 -0
  269. /package/dist/{executor-VEZUBJNQ.js.map → executor-HO3SIRSF.js.map} +0 -0
  270. /package/dist/{fanout-sidecar-OC4QVTS2.js.map → fanout-sidecar-BMT7I6FI.js.map} +0 -0
  271. /package/dist/{issue-ZZ2XPOGP.js.map → issue-FZRTVGRE.js.map} +0 -0
  272. /package/dist/{ledger-XQ4KVFQ6.js.map → ledger-PMTR2Q62.js.map} +0 -0
  273. /package/dist/{noydb-EY52NVH4.js.map → noydb-Y3ZLZNXA.js.map} +0 -0
  274. /package/dist/{public-envelope-O6X6AUUS.js.map → public-envelope-S2S2VR3F.js.map} +0 -0
  275. /package/dist/{registry-CMEVTOCN.js.map → registry-53A55ZZE.js.map} +0 -0
  276. /package/dist/{registry-OUZ3VBZA.js.map → registry-FKL4SLU4.js.map} +0 -0
  277. /package/dist/{registry-XUBRO5JJ.js.map → registry-IEU6ATO7.js.map} +0 -0
  278. /package/dist/{revoke-QJ2HUM4W.js.map → revoke-AOCAVR56.js.map} +0 -0
  279. /package/dist/{signer-SCJ6C6HQ.js.map → signer-JMK6W2Y6.js.map} +0 -0
  280. /package/dist/{stale-KKCHF2VB.js.map → stale-IIIGOHBW.js.map} +0 -0
@@ -1,12 +1,12 @@
1
- export { I as I18nMap, a as I18nTextDescriptor, b as I18nTextOptions, L as Layer, O as OnMissing, c as OnMissingPolicy, R as ResolveI18nOptions, d as applyI18nLocale, g as getAtPath, i as i18nText, e as isI18nTextDescriptor, r as resolveI18nText, f as resolvePolicy, s as setAtPathInPlace, v as validateI18nTextValue } from '../strategy-D1zjEV3n.cjs';
2
- import { I as I18nStrategy } from '../types-CwrTuYFI.cjs';
3
- export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, S as ScriptWarning, e as StaticDictDescriptor, f as dictCollectionName, g as dictKey, h as enforceScript, i as inferScripts, j as isDictCollectionName, k as isDictKeyDescriptor, l as isStaticDictDescriptor, s as staticDict } from '../types-CwrTuYFI.cjs';
4
- export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, b as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError } from '../errors-Dwk2k1xY.cjs';
1
+ export { I as I18nMap, a as I18nTextDescriptor, b as I18nTextOptions, L as Layer, O as OnMissing, c as OnMissingPolicy, R as ResolveI18nOptions, d as applyI18nLocale, g as getAtPath, i as i18nText, e as isI18nTextDescriptor, r as resolveI18nText, f as resolvePolicy, s as setAtPathInPlace, h as stripI18nFilled, v as validateI18nTextValue } from '../strategy-mJExw4LQ.cjs';
2
+ import { I as I18nStrategy } from '../types-Ba1vQ3AY.cjs';
3
+ export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, S as ScriptWarning, e as StaticDictDescriptor, f as dictCollectionName, g as dictKey, h as enforceScript, i as inferScripts, j as isDictCollectionName, k as isDictKeyDescriptor, l as isStaticDictDescriptor, s as staticDict } from '../types-Ba1vQ3AY.cjs';
4
+ export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, b as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError } from '../errors-BAWO5Z5a.cjs';
5
5
  import '../lazy-builder-eYZzLEL1.cjs';
6
6
  import '../predicate-BmhBSPCH.cjs';
7
7
  import '../strategy-BSxFXGzb.cjs';
8
8
  import '../index-BMmajblo.cjs';
9
- import '../index-DoxKSsMj.cjs';
9
+ import '../index-C1SC1EPe.cjs';
10
10
  import '@noy-db/attestation';
11
11
 
12
12
  /**
@@ -1,12 +1,12 @@
1
- export { I as I18nMap, a as I18nTextDescriptor, b as I18nTextOptions, L as Layer, O as OnMissing, c as OnMissingPolicy, R as ResolveI18nOptions, d as applyI18nLocale, g as getAtPath, i as i18nText, e as isI18nTextDescriptor, r as resolveI18nText, f as resolvePolicy, s as setAtPathInPlace, v as validateI18nTextValue } from '../strategy-YQ1qJWyq.js';
2
- import { I as I18nStrategy } from '../types-CkSWJt0H.js';
3
- export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, S as ScriptWarning, e as StaticDictDescriptor, f as dictCollectionName, g as dictKey, h as enforceScript, i as inferScripts, j as isDictCollectionName, k as isDictKeyDescriptor, l as isStaticDictDescriptor, s as staticDict } from '../types-CkSWJt0H.js';
4
- export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, b as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError } from '../errors-Dwk2k1xY.js';
1
+ export { I as I18nMap, a as I18nTextDescriptor, b as I18nTextOptions, L as Layer, O as OnMissing, c as OnMissingPolicy, R as ResolveI18nOptions, d as applyI18nLocale, g as getAtPath, i as i18nText, e as isI18nTextDescriptor, r as resolveI18nText, f as resolvePolicy, s as setAtPathInPlace, h as stripI18nFilled, v as validateI18nTextValue } from '../strategy-8QGs5KQE.js';
2
+ import { I as I18nStrategy } from '../types-CUmZYJwN.js';
3
+ export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, S as ScriptWarning, e as StaticDictDescriptor, f as dictCollectionName, g as dictKey, h as enforceScript, i as inferScripts, j as isDictCollectionName, k as isDictKeyDescriptor, l as isStaticDictDescriptor, s as staticDict } from '../types-CUmZYJwN.js';
4
+ export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, b as StaticDictReadonlyError, T as TranslatorNotConfiguredError, U as UnknownDictCodeError } from '../errors-BAWO5Z5a.js';
5
5
  import '../lazy-builder-ChSqcF5t.js';
6
6
  import '../predicate-BmhBSPCH.js';
7
7
  import '../strategy-BSxFXGzb.js';
8
8
  import '../index-BMmajblo.js';
9
- import '../index-LaexBi3v.js';
9
+ import '../index-Ddm8D3Oo.js';
10
10
  import '@noy-db/attestation';
11
11
 
12
12
  /**
@@ -7,7 +7,7 @@ import {
7
7
  isDictKeyDescriptor,
8
8
  isStaticDictDescriptor,
9
9
  staticDict
10
- } from "../chunk-PFKAT4NT.js";
10
+ } from "../chunk-REHF3HSJ.js";
11
11
  import {
12
12
  applyI18nLocale,
13
13
  enforceScript,
@@ -18,12 +18,13 @@ import {
18
18
  resolveI18nText,
19
19
  resolvePolicy,
20
20
  setAtPathInPlace,
21
+ stripI18nFilled,
21
22
  validateI18nTextValue
22
- } from "../chunk-KD253AI5.js";
23
- import "../chunk-LXA2E3VI.js";
23
+ } from "../chunk-QXWJQ7UU.js";
24
+ import "../chunk-ZCMOS4H2.js";
24
25
  import "../chunk-PDVP3C2I.js";
25
- import "../chunk-AD6RNBAW.js";
26
- import "../chunk-7JSP3E67.js";
26
+ import "../chunk-A7DNZVAV.js";
27
+ import "../chunk-E2MDPPOC.js";
27
28
  import {
28
29
  DictKeyInUseError,
29
30
  DictKeyMissingError,
@@ -34,7 +35,82 @@ import {
34
35
  StaticDictReadonlyError,
35
36
  TranslatorNotConfiguredError,
36
37
  UnknownDictCodeError
37
- } from "../chunk-DDOYOMAD.js";
38
+ } from "../chunk-JZ5DS4DP.js";
39
+
40
+ // src/i18n/densify.ts
41
+ var MARKER = "_i18nFilled";
42
+ function priorFilled(prior, field) {
43
+ if (!prior) return /* @__PURE__ */ new Set();
44
+ const marker = prior[MARKER];
45
+ return new Set(marker?.[field] ?? []);
46
+ }
47
+ function singleLeaf(record, field) {
48
+ const leaves = getAtPath(record, field);
49
+ if (leaves.length !== 1) return void 0;
50
+ const leaf = leaves[0];
51
+ if (!leaf || typeof leaf !== "object" || Array.isArray(leaf)) return void 0;
52
+ return leaf;
53
+ }
54
+ function computeExemptFills(prior, incoming, fields) {
55
+ const out = /* @__PURE__ */ new Map();
56
+ if (!prior) return out;
57
+ for (const field of Object.keys(fields)) {
58
+ const filled = priorFilled(prior, field);
59
+ if (filled.size === 0) continue;
60
+ const priorLeaf = singleLeaf(prior, field);
61
+ const incLeaf = singleLeaf(incoming, field);
62
+ if (!priorLeaf || !incLeaf) continue;
63
+ const exempt = /* @__PURE__ */ new Set();
64
+ for (const loc of filled) {
65
+ if (incLeaf[loc] !== void 0 && incLeaf[loc] !== "" && incLeaf[loc] === priorLeaf[loc]) {
66
+ exempt.add(loc);
67
+ }
68
+ }
69
+ if (exempt.size > 0) out.set(field, exempt);
70
+ }
71
+ return out;
72
+ }
73
+ function densify(record, prior, fields) {
74
+ let marker = record[MARKER];
75
+ for (const [field, descriptor] of Object.entries(fields)) {
76
+ const leaf = singleLeaf(record, field);
77
+ if (!leaf) continue;
78
+ const { languages, substitute, smartSubstitute } = descriptor.options;
79
+ const filledSet = priorFilled(prior, field);
80
+ const priorLeaf = singleLeaf(prior ?? {}, field);
81
+ const isUnchangedFill = (loc) => filledSet.has(loc) && priorLeaf?.[loc] !== void 0 && leaf[loc] === priorLeaf[loc];
82
+ const authored = {};
83
+ for (const [loc, val] of Object.entries(leaf)) {
84
+ if (typeof val === "string" && val !== "" && !isUnchangedFill(loc)) authored[loc] = val;
85
+ }
86
+ const filled = [];
87
+ for (const loc of languages) {
88
+ if (authored[loc] !== void 0) continue;
89
+ const sub = resolveI18nText(authored, loc, void 0, field, {
90
+ policy: "substitute",
91
+ substitute: substitute ?? ["any"],
92
+ ...smartSubstitute ? { smartSubstitute } : {}
93
+ });
94
+ if (typeof sub === "string" && sub !== "") {
95
+ leaf[loc] = sub;
96
+ filled.push(loc);
97
+ } else if (isUnchangedFill(loc)) {
98
+ delete leaf[loc];
99
+ }
100
+ }
101
+ if (filled.length > 0) {
102
+ marker ??= {};
103
+ marker[field] = filled;
104
+ } else if (marker) {
105
+ delete marker[field];
106
+ }
107
+ }
108
+ if (marker && Object.keys(marker).length > 0) {
109
+ record[MARKER] = marker;
110
+ } else {
111
+ delete record[MARKER];
112
+ }
113
+ }
38
114
 
39
115
  // src/i18n/active.ts
40
116
  function withI18n() {
@@ -42,6 +118,8 @@ function withI18n() {
42
118
  applyI18nLocale,
43
119
  validateI18nTextValue,
44
120
  enforceScript,
121
+ computeExemptFills,
122
+ densify,
45
123
  buildDictionaryHandle(opts) {
46
124
  return new DictionaryHandle(
47
125
  opts.adapter,
@@ -85,6 +163,7 @@ export {
85
163
  resolvePolicy,
86
164
  setAtPathInPlace,
87
165
  staticDict,
166
+ stripI18nFilled,
88
167
  validateI18nTextValue,
89
168
  withI18n
90
169
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/i18n/active.ts"],"sourcesContent":["/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { enforceScript } from './script.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n enforceScript,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,sBACE,MACwB;AACxB,aAAO,IAAI;AAAA,QACT,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/i18n/densify.ts","../../src/i18n/active.ts"],"sourcesContent":["/**\n * #435 v1.x densifyOnWrite — eager-fill empty i18n slots from each field's\n * substitute chain at write time, recording provenance in the internal\n * `_i18nFilled` marker (decision A: dense map + prior-read).\n *\n * Pure functions over plain records; all DB wiring lives in collection.ts.\n * Only single-leaf i18n fields are supported (array-wildcard paths are\n * skipped, mirroring auto-translate).\n */\nimport { getAtPath, resolveI18nText } from './core.js'\nimport type { I18nTextDescriptor } from './core.js'\n\nconst MARKER = '_i18nFilled'\n\ntype Leaf = Record<string, string>\n\n/** Locales recorded as densify-filled on the prior record for `field`. */\nfunction priorFilled(prior: Record<string, unknown> | undefined, field: string): Set<string> {\n if (!prior) return new Set()\n const marker = prior[MARKER] as Record<string, string[]> | undefined\n return new Set(marker?.[field] ?? [])\n}\n\n/** The single leaf map for `field`, or undefined for absent / array-wildcard / non-object. */\nfunction singleLeaf(record: Record<string, unknown>, field: string): Leaf | undefined {\n const leaves = getAtPath(record, field)\n if (leaves.length !== 1) return undefined\n const leaf = leaves[0]\n if (!leaf || typeof leaf !== 'object' || Array.isArray(leaf)) return undefined\n return leaf as Leaf\n}\n\n/**\n * Per field, the locales that are UNCHANGED round-tripped densify fills — i.e.\n * marked filled on the prior record AND identical in the incoming record.\n * These are exempt from write-time script enforcement (they are derived copies,\n * not authored text). Slots the user changed are NOT exempt (validated as authored).\n */\nexport function computeExemptFills(\n prior: Record<string, unknown> | undefined,\n incoming: Record<string, unknown>,\n fields: Record<string, I18nTextDescriptor>,\n): Map<string, Set<string>> {\n const out = new Map<string, Set<string>>()\n if (!prior) return out\n for (const field of Object.keys(fields)) {\n const filled = priorFilled(prior, field)\n if (filled.size === 0) continue\n const priorLeaf = singleLeaf(prior, field)\n const incLeaf = singleLeaf(incoming, field)\n if (!priorLeaf || !incLeaf) continue\n const exempt = new Set<string>()\n for (const loc of filled) {\n if (incLeaf[loc] !== undefined && incLeaf[loc] !== '' && incLeaf[loc] === priorLeaf[loc]) {\n exempt.add(loc)\n }\n }\n if (exempt.size > 0) out.set(field, exempt)\n }\n return out\n}\n\n/**\n * Mutate `record` in place: fill empty declared-language slots for each\n * densify-enabled field from the field's substitute chain, recompute unchanged\n * prior fills, clear marks for slots that became authored, and write the\n * resulting `_i18nFilled` marker (removed when empty).\n *\n * `prior` is read-only — it is never mutated.\n *\n * Provenance uses value-equality (decision A): a slot counts as an unchanged\n * fill when it was prior-marked AND its value still equals the prior value. A\n * consequence is that re-authoring a value byte-identical to the existing fill\n * keeps it classified as a fill (the visible value is unchanged either way; the\n * slot stays script-exempt and will auto-refresh if its source later changes).\n * This is inherent to value-equality provenance, not a bug.\n */\nexport function densify(\n record: Record<string, unknown>,\n prior: Record<string, unknown> | undefined,\n fields: Record<string, I18nTextDescriptor>,\n): void {\n let marker = record[MARKER] as Record<string, string[]> | undefined\n\n for (const [field, descriptor] of Object.entries(fields)) {\n const leaf = singleLeaf(record, field)\n if (!leaf) continue\n const { languages, substitute, smartSubstitute } = descriptor.options\n const filledSet = priorFilled(prior, field)\n const priorLeaf = singleLeaf(prior ?? {}, field)\n const isUnchangedFill = (loc: string): boolean =>\n filledSet.has(loc) && priorLeaf?.[loc] !== undefined && leaf[loc] === priorLeaf[loc]\n\n // Authored source = present, non-empty, NOT an unchanged prior fill.\n const authored: Leaf = {}\n for (const [loc, val] of Object.entries(leaf)) {\n if (typeof val === 'string' && val !== '' && !isUnchangedFill(loc)) authored[loc] = val\n }\n\n const filled: string[] = []\n for (const loc of languages) {\n if (authored[loc] !== undefined) continue // real value present → not a fill\n const sub = resolveI18nText(authored, loc, undefined, field, {\n policy: 'substitute',\n substitute: substitute ?? ['any'],\n ...(smartSubstitute ? { smartSubstitute } : {}),\n })\n if (typeof sub === 'string' && sub !== '') {\n leaf[loc] = sub\n filled.push(loc)\n } else if (isUnchangedFill(loc)) {\n delete leaf[loc] // stale fill with no source left → drop it\n }\n }\n\n if (filled.length > 0) {\n marker ??= {}\n marker[field] = filled\n } else if (marker) {\n delete marker[field]\n }\n }\n\n if (marker && Object.keys(marker).length > 0) {\n record[MARKER] = marker\n } else {\n delete record[MARKER]\n }\n}\n","/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { enforceScript } from './script.js'\nimport { computeExemptFills, densify } from './densify.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n enforceScript,\n computeExemptFills,\n densify,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":"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","names":[]}
@@ -1,6 +1,6 @@
1
1
  import { C as CollectionIndexes, a as Clause, O as Operator } from './predicate-BmhBSPCH.cjs';
2
- import { N as NoydbError } from './errors-Dwk2k1xY.cjs';
3
- import { a as I18nTextDescriptor, N as MoneyDescriptor, A as AggregateStrategy, j as AggregateSpec, k as Aggregation, h as AggregateResult, o as GroupedQuery, p as GroupedQueryN } from './strategy-D1zjEV3n.cjs';
2
+ import { N as NoydbError } from './errors-BAWO5Z5a.cjs';
3
+ import { a as I18nTextDescriptor, P as MoneyDescriptor, A as AggregateStrategy, k as AggregateSpec, l as Aggregation, j as AggregateResult, p as GroupedQuery, q as GroupedQueryN } from './strategy-mJExw4LQ.cjs';
4
4
 
5
5
  /**
6
6
  * Foreign-key references — the soft-FK mechanism.
@@ -591,6 +591,14 @@ interface QuerySource<T> {
591
591
  * `sum`/`min`/`max` over money fields into exact BigInt reducers.
592
592
  */
593
593
  moneyFields?: Record<string, MoneyDescriptor>;
594
+ /**
595
+ * #308 L3 — id-paired snapshot for `Query._idArray()` (the `retrieve({within})`
596
+ * id projection). Optional: only collection-backed queries supply it.
597
+ */
598
+ snapshotEntries?(): readonly {
599
+ id: string;
600
+ record: T;
601
+ }[];
594
602
  }
595
603
  /**
596
604
  * The chainable builder. All methods return a new Query — the original
@@ -643,6 +651,15 @@ declare class Query<T> {
643
651
  * Consumers don't call this directly.
644
652
  */
645
653
  _withPredicates(predicates: ReadonlyMap<string, DeclaredPredicate>): Query<T>;
654
+ /**
655
+ * @internal — #308 L3. The ids of records matching this query's plan,
656
+ * recovered by reference identity: `executePlanWithSource` returns the
657
+ * ORIGINAL snapshot record references (money-decode and joins are applied
658
+ * later, in `toArray`), so each matched record is found in the id-paired
659
+ * `snapshotEntries()` map. Used by `collection.retrieve({ within })`.
660
+ * Throws if the source is not collection-backed (no `snapshotEntries`).
661
+ */
662
+ _idArray(): string[];
646
663
  /**
647
664
  * Filter by a registered deterministic predicate. Requires
648
665
  * the Query to have been augmented with a predicates map (typically
@@ -1,9 +1,32 @@
1
1
  import './predicate-BmhBSPCH.cjs';
2
- import './strategy-D1zjEV3n.cjs';
2
+ import './strategy-mJExw4LQ.cjs';
3
3
  import './ulid-DRH25k3y.cjs';
4
- import './types-CwrTuYFI.cjs';
5
- import './errors-Dwk2k1xY.cjs';
6
- import './index-DoxKSsMj.cjs';
4
+ import { dX as RetrieveHit } from './types-Ba1vQ3AY.cjs';
5
+ import './errors-BAWO5Z5a.cjs';
6
+ import './index-C1SC1EPe.cjs';
7
+
8
+ /**
9
+ * #308 L3 — Reciprocal Rank Fusion. Merges N ranked `RetrieveHit` lists into
10
+ * one, scoring each id by Σ 1/(k + rank) across the lists it appears in. Pure,
11
+ * deterministic, no I/O — which is why it serves BOTH hybrid lexical⊕semantic
12
+ * fusion AND klum-db's cross-vault federation (the lists are per-vault). The
13
+ * fused `score` is the RRF score, NOT BM25 or cosine.
14
+ */
15
+
16
+ interface FuseOptions {
17
+ /** Only 'rrf' in v1 (default). */
18
+ readonly strategy?: 'rrf';
19
+ /** RRF constant; larger flattens the rank weighting. Default 60. */
20
+ readonly k?: number;
21
+ /** Truncate the fused output to this many hits. */
22
+ readonly limit?: number;
23
+ }
24
+ /**
25
+ * Callers must supply hits with `rank >= 1` (the retrieve contract guarantees
26
+ * it; a federation caller passing `rank: 0` with `k: 0` would divide by zero).
27
+ * Doc-only note — no runtime guard; rank ≥ 1 is the retrieve contract.
28
+ */
29
+ declare function fuseRetrieval<T>(lists: ReadonlyArray<ReadonlyArray<RetrieveHit<T>>>, opts?: FuseOptions): RetrieveHit<T>[];
7
30
 
8
31
  interface EncryptResult {
9
32
  iv: string;
@@ -67,4 +90,4 @@ declare function decryptDeterministic(ivBase64: string, dataBase64: string, dek:
67
90
  declare function bufferToBase64(buffer: ArrayBuffer | Uint8Array): string;
68
91
  declare function base64ToBuffer(base64: string): Uint8Array<ArrayBuffer>;
69
92
 
70
- export { bufferToBase64 as a, base64ToBuffer as b, decryptDeterministic as c, decryptBytes as d, derivePresenceKey as e, encryptBytes as f, encryptDeterministic as g, sha256Hex as s };
93
+ export { type FuseOptions as F, bufferToBase64 as a, base64ToBuffer as b, decryptDeterministic as c, decryptBytes as d, derivePresenceKey as e, encryptBytes as f, encryptDeterministic as g, fuseRetrieval as h, sha256Hex as s };
@@ -1,9 +1,32 @@
1
1
  import './predicate-BmhBSPCH.js';
2
- import './strategy-YQ1qJWyq.js';
2
+ import './strategy-8QGs5KQE.js';
3
3
  import './ulid-DRH25k3y.js';
4
- import './types-CkSWJt0H.js';
5
- import './errors-Dwk2k1xY.js';
6
- import './index-LaexBi3v.js';
4
+ import { dX as RetrieveHit } from './types-CUmZYJwN.js';
5
+ import './errors-BAWO5Z5a.js';
6
+ import './index-Ddm8D3Oo.js';
7
+
8
+ /**
9
+ * #308 L3 — Reciprocal Rank Fusion. Merges N ranked `RetrieveHit` lists into
10
+ * one, scoring each id by Σ 1/(k + rank) across the lists it appears in. Pure,
11
+ * deterministic, no I/O — which is why it serves BOTH hybrid lexical⊕semantic
12
+ * fusion AND klum-db's cross-vault federation (the lists are per-vault). The
13
+ * fused `score` is the RRF score, NOT BM25 or cosine.
14
+ */
15
+
16
+ interface FuseOptions {
17
+ /** Only 'rrf' in v1 (default). */
18
+ readonly strategy?: 'rrf';
19
+ /** RRF constant; larger flattens the rank weighting. Default 60. */
20
+ readonly k?: number;
21
+ /** Truncate the fused output to this many hits. */
22
+ readonly limit?: number;
23
+ }
24
+ /**
25
+ * Callers must supply hits with `rank >= 1` (the retrieve contract guarantees
26
+ * it; a federation caller passing `rank: 0` with `k: 0` would divide by zero).
27
+ * Doc-only note — no runtime guard; rank ≥ 1 is the retrieve contract.
28
+ */
29
+ declare function fuseRetrieval<T>(lists: ReadonlyArray<ReadonlyArray<RetrieveHit<T>>>, opts?: FuseOptions): RetrieveHit<T>[];
7
30
 
8
31
  interface EncryptResult {
9
32
  iv: string;
@@ -67,4 +90,4 @@ declare function decryptDeterministic(ivBase64: string, dataBase64: string, dek:
67
90
  declare function bufferToBase64(buffer: ArrayBuffer | Uint8Array): string;
68
91
  declare function base64ToBuffer(base64: string): Uint8Array<ArrayBuffer>;
69
92
 
70
- export { bufferToBase64 as a, base64ToBuffer as b, decryptDeterministic as c, decryptBytes as d, derivePresenceKey as e, encryptBytes as f, encryptDeterministic as g, sha256Hex as s };
93
+ export { type FuseOptions as F, bufferToBase64 as a, base64ToBuffer as b, decryptDeterministic as c, decryptBytes as d, derivePresenceKey as e, encryptBytes as f, encryptDeterministic as g, fuseRetrieval as h, sha256Hex as s };
@@ -1,6 +1,6 @@
1
1
  import { C as CollectionIndexes, a as Clause, O as Operator } from './predicate-BmhBSPCH.js';
2
- import { N as NoydbError } from './errors-Dwk2k1xY.js';
3
- import { a as I18nTextDescriptor, N as MoneyDescriptor, A as AggregateStrategy, j as AggregateSpec, k as Aggregation, h as AggregateResult, o as GroupedQuery, p as GroupedQueryN } from './strategy-YQ1qJWyq.js';
2
+ import { N as NoydbError } from './errors-BAWO5Z5a.js';
3
+ import { a as I18nTextDescriptor, P as MoneyDescriptor, A as AggregateStrategy, k as AggregateSpec, l as Aggregation, j as AggregateResult, p as GroupedQuery, q as GroupedQueryN } from './strategy-8QGs5KQE.js';
4
4
 
5
5
  /**
6
6
  * Foreign-key references — the soft-FK mechanism.
@@ -591,6 +591,14 @@ interface QuerySource<T> {
591
591
  * `sum`/`min`/`max` over money fields into exact BigInt reducers.
592
592
  */
593
593
  moneyFields?: Record<string, MoneyDescriptor>;
594
+ /**
595
+ * #308 L3 — id-paired snapshot for `Query._idArray()` (the `retrieve({within})`
596
+ * id projection). Optional: only collection-backed queries supply it.
597
+ */
598
+ snapshotEntries?(): readonly {
599
+ id: string;
600
+ record: T;
601
+ }[];
594
602
  }
595
603
  /**
596
604
  * The chainable builder. All methods return a new Query — the original
@@ -643,6 +651,15 @@ declare class Query<T> {
643
651
  * Consumers don't call this directly.
644
652
  */
645
653
  _withPredicates(predicates: ReadonlyMap<string, DeclaredPredicate>): Query<T>;
654
+ /**
655
+ * @internal — #308 L3. The ids of records matching this query's plan,
656
+ * recovered by reference identity: `executePlanWithSource` returns the
657
+ * ORIGINAL snapshot record references (money-decode and joins are applied
658
+ * later, in `toArray`), so each matched record is found in the id-paired
659
+ * `snapshotEntries()` map. Used by `collection.retrieve({ within })`.
660
+ * Throws if the source is not collection-backed (no `snapshotEntries`).
661
+ */
662
+ _idArray(): string[];
646
663
  /**
647
664
  * Filter by a registered deterministic predicate. Requires
648
665
  * the Query to have been augmented with a predicates map (typically