@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,6 +1,6 @@
1
1
  import {
2
2
  ValidationError
3
- } from "./chunk-DDOYOMAD.js";
3
+ } from "./chunk-JZ5DS4DP.js";
4
4
 
5
5
  // src/derivations/with-derivation.ts
6
6
  function withDerivation(spec) {
@@ -126,4 +126,4 @@ export {
126
126
  withDerivation,
127
127
  withRollup
128
128
  };
129
- //# sourceMappingURL=chunk-SKYBEGHB.js.map
129
+ //# sourceMappingURL=chunk-BEZ2EV43.js.map
@@ -6,7 +6,7 @@ import {
6
6
  ConflictError,
7
7
  InvariantError,
8
8
  ValidationError
9
- } from "./chunk-DDOYOMAD.js";
9
+ } from "./chunk-JZ5DS4DP.js";
10
10
 
11
11
  // src/tx/transaction.ts
12
12
  var TxContext = class {
@@ -216,7 +216,7 @@ async function runTransaction(db, fn, options, txInvariants) {
216
216
  db._clearActiveTxContext(ctx);
217
217
  }
218
218
  if (ctx._amendment) {
219
- const { GuardExecutor } = await import("./executor-3SVNESQ3.js");
219
+ const { GuardExecutor } = await import("./executor-HO3SIRSF.js");
220
220
  try {
221
221
  for (const [vaultName, v] of ctx._amendmentVaults) {
222
222
  const registry = v._getGuardRegistry();
@@ -352,4 +352,4 @@ export {
352
352
  runTransaction,
353
353
  revertExecuted
354
354
  };
355
- //# sourceMappingURL=chunk-EJJTUDNI.js.map
355
+ //# sourceMappingURL=chunk-BITB3T5Z.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  NOYDB_FORMAT_VERSION
3
- } from "./chunk-AD6RNBAW.js";
3
+ } from "./chunk-A7DNZVAV.js";
4
4
  import {
5
5
  decrypt
6
- } from "./chunk-7JSP3E67.js";
6
+ } from "./chunk-E2MDPPOC.js";
7
7
  import {
8
8
  ReadOnlyAtInstantError
9
- } from "./chunk-DDOYOMAD.js";
9
+ } from "./chunk-JZ5DS4DP.js";
10
10
 
11
11
  // src/history/history.ts
12
12
  var HISTORY_COLLECTION = "_history";
@@ -335,4 +335,4 @@ export {
335
335
  diff,
336
336
  formatDiff
337
337
  };
338
- //# sourceMappingURL=chunk-6M5JKTUQ.js.map
338
+ //# sourceMappingURL=chunk-CIZDUAHI.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  ensureCollectionDEK
3
- } from "./chunk-LXA2E3VI.js";
3
+ } from "./chunk-ZCMOS4H2.js";
4
4
  import {
5
5
  NOYDB_FORMAT_VERSION
6
- } from "./chunk-AD6RNBAW.js";
6
+ } from "./chunk-A7DNZVAV.js";
7
7
  import {
8
8
  decrypt,
9
9
  encrypt
10
- } from "./chunk-7JSP3E67.js";
10
+ } from "./chunk-E2MDPPOC.js";
11
11
  import {
12
12
  PermissionDeniedError
13
- } from "./chunk-DDOYOMAD.js";
13
+ } from "./chunk-JZ5DS4DP.js";
14
14
 
15
15
  // src/team/sync-credentials.ts
16
16
  var SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
@@ -76,4 +76,4 @@ export {
76
76
  listCredentials,
77
77
  credentialStatus
78
78
  };
79
- //# sourceMappingURL=chunk-5EITJMUJ.js.map
79
+ //# sourceMappingURL=chunk-CUPTCF4R.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readPath
3
- } from "./chunk-3BANVNDH.js";
3
+ } from "./chunk-KJ3K5VZM.js";
4
4
 
5
5
  // src/aggregate/reducers.ts
6
6
  function count(opts) {
@@ -120,4 +120,4 @@ export {
120
120
  min,
121
121
  max
122
122
  };
123
- //# sourceMappingURL=chunk-FO5WEDKF.js.map
123
+ //# sourceMappingURL=chunk-DEE4CRYN.js.map
@@ -30,7 +30,7 @@ async function resolveStaleMVOnRead(accessor, outputCollection) {
30
30
  continue;
31
31
  }
32
32
  if (executor === null) {
33
- ({ MaterializedViewExecutor: executor } = await import("./executor-BIW4FT5R.js"));
33
+ ({ MaterializedViewExecutor: executor } = await import("./executor-HB2YMIYC.js"));
34
34
  }
35
35
  await executor.refresh(reg, {
36
36
  getCollection: (n) => accessor.getCollection(n),
@@ -50,4 +50,4 @@ export {
50
50
  resolveStaleMVOnRead,
51
51
  clearMVStale
52
52
  };
53
- //# sourceMappingURL=chunk-WVYL6HM7.js.map
53
+ //# sourceMappingURL=chunk-DJO4OYCJ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  DecryptionError,
3
3
  InvalidKeyError,
4
4
  TamperedError
5
- } from "./chunk-DDOYOMAD.js";
5
+ } from "./chunk-JZ5DS4DP.js";
6
6
 
7
7
  // src/crypto.ts
8
8
  var PBKDF2_ITERATIONS = 6e5;
@@ -307,4 +307,4 @@ export {
307
307
  bufferToBase64,
308
308
  base64ToBuffer
309
309
  };
310
- //# sourceMappingURL=chunk-7JSP3E67.js.map
310
+ //# sourceMappingURL=chunk-E2MDPPOC.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FieldFrozenError,
3
3
  InvariantError
4
- } from "./chunk-DDOYOMAD.js";
4
+ } from "./chunk-JZ5DS4DP.js";
5
5
 
6
6
  // src/guards/executor.ts
7
7
  var GuardExecutor = {
@@ -77,4 +77,4 @@ function deepEqual(a, b) {
77
77
  export {
78
78
  GuardExecutor
79
79
  };
80
- //# sourceMappingURL=chunk-LX4CPLU6.js.map
80
+ //# sourceMappingURL=chunk-FFKQ65YX.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BundleVersionConflictError,
3
3
  ConflictError
4
- } from "./chunk-DDOYOMAD.js";
4
+ } from "./chunk-JZ5DS4DP.js";
5
5
 
6
6
  // src/store/bundle-store.ts
7
7
  var BUNDLE_STORE_VERSION = 1;
@@ -798,4 +798,4 @@ export {
798
798
  withCache,
799
799
  withHealthCheck
800
800
  };
801
- //# sourceMappingURL=chunk-VUUQYWF5.js.map
801
+ //# sourceMappingURL=chunk-G7ALNCQH.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  NOYDB_FORMAT_VERSION
3
- } from "./chunk-AD6RNBAW.js";
3
+ } from "./chunk-A7DNZVAV.js";
4
4
  import {
5
5
  QuiesceTimeoutError
6
- } from "./chunk-DDOYOMAD.js";
6
+ } from "./chunk-JZ5DS4DP.js";
7
7
 
8
8
  // src/coordination/types.ts
9
9
  function isQuorum(writers, generation, excludeWriterId) {
@@ -211,10 +211,42 @@ function unref(timer) {
211
211
  if (typeof t.unref === "function") t.unref();
212
212
  }
213
213
 
214
+ // src/search/fuse.ts
215
+ function fuseRetrieval(lists, opts = {}) {
216
+ const k = opts.k ?? 60;
217
+ const acc = /* @__PURE__ */ new Map();
218
+ for (const list of lists) {
219
+ for (const hit of list) {
220
+ const contribution = 1 / (k + hit.rank);
221
+ const prev = acc.get(hit.id);
222
+ if (prev === void 0) {
223
+ acc.set(hit.id, { score: contribution, hit });
224
+ } else {
225
+ prev.score += contribution;
226
+ prev.hit = mergePresentation(prev.hit, hit);
227
+ }
228
+ }
229
+ }
230
+ const merged = [...acc.values()].sort(
231
+ (a, b) => b.score - a.score || (a.hit.id < b.hit.id ? -1 : a.hit.id > b.hit.id ? 1 : 0)
232
+ );
233
+ const limited = opts.limit !== void 0 ? merged.slice(0, opts.limit) : merged;
234
+ return limited.map((m, i) => ({ ...m.hit, score: m.score, rank: i + 1 }));
235
+ }
236
+ function mergePresentation(a, b) {
237
+ const lexical = a.field !== "(vector)" ? a : b;
238
+ const other = lexical === a ? b : a;
239
+ return {
240
+ ...lexical,
241
+ ...lexical.record === void 0 && other.record !== void 0 ? { record: other.record } : {}
242
+ };
243
+ }
244
+
214
245
  export {
215
246
  isQuorum,
216
247
  runDrainBarrier,
217
248
  loadFence,
218
- StoreCoordinationProvider
249
+ StoreCoordinationProvider,
250
+ fuseRetrieval
219
251
  };
220
- //# sourceMappingURL=chunk-Z3BJF7SF.js.map
252
+ //# sourceMappingURL=chunk-GGXN73NM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/coordination/types.ts","../src/schema-update/fence.ts","../src/schema-update/client-registry.ts","../src/coordination/store-provider.ts","../src/search/fuse.ts"],"sourcesContent":["/**\n * Kernel coordination port — the injected `CoordinationProvider` seam for the\n * schema-fence drain-barrier (#469).\n *\n * The kernel defines this port; `@noy-db/by-tabs` / `@noy-db/by-peer` implement\n * it for real-time quorum, and an external orchestrator (`@klum-db/lobby`)\n * drives it through the `Noydb` handle without ever naming a `by-*` package.\n * The dependency arrow is `by-* → kernel ← klum`, the app at the apex.\n *\n * This module carries only the port TYPES plus two pure-ish helpers:\n * {@link isQuorum} (a pure quorum predicate extracted from the legacy\n * `activeQuiesced`) and {@link runDrainBarrier} (the reusable barrier protocol\n * the migration cutover and klum both call).\n *\n * @module\n */\n\nimport { QuiesceTimeoutError } from '../errors.js'\nimport type { Unsubscribe } from '../write-hooks.js'\n\n/** Vault fence state (the existing FenceDoc shape). */\nexport interface FenceState {\n readonly currentSchemaVersion: number\n readonly fenceState: 'normal' | 'draining' | 'migrating' | 'complete'\n}\n\n/** A writer's presence + ack, tagged with the session that owns it. */\nexport interface WriterPresence {\n /** = today's clientId (one per tab/peer). */\n readonly writerId: string\n /** Groups one user's writers across vaults (consolidation is klum's job). */\n readonly sessionId: string\n readonly lastSeen: number\n readonly quiescedAtVersion: number | null\n}\n\n/** Session-addressable drain-barrier coordination transport. Per-vault ops. */\nexport interface CoordinationProvider {\n /** orchestrator → all writers */\n setFence(vault: string, fence: FenceState): Promise<void>\n /**\n * Fresh one-shot fence read for the write-path gate (`assertWritable`).\n * A direct read (not a cached `observeFence` snapshot) avoids a staleness\n * window and keeps the timing-sensitive cutover gate exact. The store\n * default reads `_meta/schema-fence`; `by-*` return their last-pushed fence.\n */\n readFence(vault: string): Promise<FenceState>\n /** writer observes fence changes (default: poll-emit; by-*: push) */\n observeFence(vault: string, onChange: (f: FenceState) => void): Unsubscribe\n /** writer → orchestrator: presence + ack (heartbeat + quiescedAtVersion) */\n reportPresence(vault: string, p: WriterPresence): Promise<void>\n /** orchestrator observes presence changes (default: poll-emit; by-*: push) */\n observePresence(vault: string, onChange: (writers: readonly WriterPresence[]) => void): Unsubscribe\n /** orchestrator one-shot snapshot of reachable writers (quorum input) */\n reachableWriters(vault: string, o: { staleMs: number; now: number }): Promise<readonly WriterPresence[]>\n}\n\n/**\n * Pure quorum predicate: true when every writer (other than `excludeWriterId`)\n * has acked at exactly `generation`. An empty set is trivially a quorum.\n *\n * Extracted from the legacy `activeQuiesced` store-polling check so the\n * migration cutover, the store default provider, and `by-*` real-time\n * providers all share one definition of \"everyone has drained\".\n */\nexport function isQuorum(\n writers: readonly WriterPresence[],\n generation: number,\n excludeWriterId?: string,\n): boolean {\n return writers.filter((w) => w.writerId !== excludeWriterId).every((w) => w.quiescedAtVersion === generation)\n}\n\n/** Inputs for {@link runDrainBarrier}. */\nexport interface DrainBarrierOptions {\n readonly vault: string\n readonly generation: number\n readonly writerId: string\n readonly onFlush: () => Promise<void>\n readonly staleMs: number\n readonly quiesceTimeoutMs: number\n readonly now: () => number\n /** Optional seam (mainly for deterministic tests) run before each poll tick. */\n readonly onPoll?: () => Promise<void>\n}\n\n/**\n * The reusable drain-barrier protocol shared by the migration cutover and klum:\n *\n * drain self → setFence(draining) → await quorum (presence push + isQuorum,\n * polling as a fallback, or timeout) → run() → release-by-caller.\n *\n * Resolves once every reachable writer (excluding `writerId`) has quiesced at\n * `generation`, at which point `run` is invoked exactly once. Rejects with\n * {@link QuiesceTimeoutError} if `quiesceTimeoutMs` elapses first.\n */\nexport async function runDrainBarrier(\n provider: CoordinationProvider,\n o: DrainBarrierOptions,\n run: () => Promise<void>,\n): Promise<void> {\n await provider.setFence(o.vault, { currentSchemaVersion: o.generation, fenceState: 'draining' })\n await o.onFlush()\n\n const deadline = o.now() + o.quiesceTimeoutMs\n const seeded = await provider.reachableWriters(o.vault, { staleMs: o.staleMs, now: o.now() })\n if (!isQuorum(seeded, o.generation, o.writerId)) {\n await new Promise<void>((resolve, reject) => {\n let settled = false\n const finish = (fn: () => void) => {\n if (!settled) {\n settled = true\n unsub()\n fn()\n }\n }\n const unsub = provider.observePresence(o.vault, (writers) => {\n if (isQuorum(writers, o.generation, o.writerId)) finish(resolve)\n })\n const tick = async () => {\n if (settled) return\n if (o.now() >= deadline) {\n finish(() =>\n reject(\n new QuiesceTimeoutError(\n `Cutover of vault \"${o.vault}\" to generation ${o.generation} timed out ` +\n `after ${o.quiesceTimeoutMs}ms waiting for active writers to quiesce.`,\n ),\n ),\n )\n return\n }\n if (o.onPoll) await o.onPoll()\n const w = await provider.reachableWriters(o.vault, { staleMs: o.staleMs, now: o.now() })\n if (isQuorum(w, o.generation, o.writerId)) finish(resolve)\n else setTimeout(() => void tick(), 25)\n }\n void tick()\n })\n }\n await run()\n}\n","/**\n * Schema-fence document. Vault-level generation counter + drain\n * state, stored at `_meta/schema-fence` using the plaintext-envelope\n * pattern of `_meta/policy` (no PII — a counter + a state enum).\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../types.js'\nimport { NOYDB_FORMAT_VERSION } from '../types.js'\n\nexport type FenceState = 'normal' | 'draining' | 'migrating' | 'complete'\n\nexport interface FenceDoc {\n readonly currentSchemaVersion: number\n readonly fenceState: FenceState\n}\n\nexport const FENCE_RECORD_ID = 'schema-fence'\nconst META_COLLECTION = '_meta'\n\nexport const DEFAULT_FENCE: FenceDoc = { currentSchemaVersion: 0, fenceState: 'normal' }\n\nexport async function loadFence(store: NoydbStore, vault: string): Promise<FenceDoc> {\n const envelope = await store.get(vault, META_COLLECTION, FENCE_RECORD_ID)\n if (!envelope) return DEFAULT_FENCE\n try {\n const parsed = JSON.parse(envelope._data) as unknown\n if (!isFenceDoc(parsed)) return DEFAULT_FENCE\n return parsed\n } catch {\n return DEFAULT_FENCE\n }\n}\n\nexport async function saveFence(store: NoydbStore, vault: string, fence: FenceDoc): Promise<void> {\n const envelope: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: 1,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: JSON.stringify(fence),\n }\n await store.put(vault, META_COLLECTION, FENCE_RECORD_ID, envelope)\n}\n\nfunction isFenceDoc(x: unknown): x is FenceDoc {\n if (x === null || typeof x !== 'object') return false\n const o = x as Record<string, unknown>\n return typeof o['currentSchemaVersion'] === 'number'\n && (o['fenceState'] === 'normal' || o['fenceState'] === 'draining'\n || o['fenceState'] === 'migrating' || o['fenceState'] === 'complete')\n}\n","/**\n * Schema-cutover client registry. Each client keeps a\n * heartbeat doc at `_meta/schema-fence:client:<clientId>` carrying its\n * liveness (`lastSeen`) and the fence generation it has quiesced for\n * (`quiescedAtVersion`). Plaintext envelope, like the fence doc.\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../types.js'\nimport { NOYDB_FORMAT_VERSION } from '../types.js'\n\nconst META_COLLECTION = '_meta'\nconst CLIENT_PREFIX = 'schema-fence:client:'\n\nexport interface ClientDoc {\n readonly clientId: string\n readonly lastSeen: number\n readonly quiescedAtVersion: number | null\n /**\n * Session that owns this writer (one user's writers across vaults). Additive\n * and optional so pre-#469 client docs keep parsing; readers default it.\n */\n readonly sessionId?: string\n}\n\nexport async function writeClientDoc(\n store: NoydbStore,\n vault: string,\n clientId: string,\n doc: { lastSeen: number; quiescedAtVersion: number | null; sessionId?: string },\n): Promise<void> {\n const envelope: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: 1,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: JSON.stringify({ clientId, ...doc }),\n }\n await store.put(vault, META_COLLECTION, `${CLIENT_PREFIX}${clientId}`, envelope)\n}\n\nexport async function listClientDocs(store: NoydbStore, vault: string): Promise<ClientDoc[]> {\n const ids = await store.list(vault, META_COLLECTION)\n const out: ClientDoc[] = []\n for (const id of ids) {\n if (!id.startsWith(CLIENT_PREFIX)) continue\n const env = await store.get(vault, META_COLLECTION, id)\n if (!env) continue\n try {\n const parsed = JSON.parse(env._data) as unknown\n if (isClientDoc(parsed)) out.push(parsed)\n } catch { /* skip corrupt */ }\n }\n return out\n}\n\n/**\n * True when every *active* client (lastSeen within staleMs of now) has\n * `quiescedAtVersion === generation`. Stale clients are ignored. An empty\n * active set is vacuously quiesced.\n */\nexport async function activeQuiesced(\n store: NoydbStore,\n vault: string,\n opts: { generation: number; now: number; staleMs: number; excludeClientId?: string },\n): Promise<boolean> {\n const docs = await listClientDocs(store, vault)\n const active = docs.filter(\n d => d.lastSeen >= opts.now - opts.staleMs && d.clientId !== opts.excludeClientId,\n )\n return active.every(d => d.quiescedAtVersion === opts.generation)\n}\n\nfunction isClientDoc(x: unknown): x is ClientDoc {\n if (x === null || typeof x !== 'object') return false\n const o = x as Record<string, unknown>\n return typeof o['clientId'] === 'string'\n && typeof o['lastSeen'] === 'number'\n && (o['quiescedAtVersion'] === null || typeof o['quiescedAtVersion'] === 'number')\n && (o['sessionId'] === undefined || typeof o['sessionId'] === 'string')\n}\n","/**\n * Store-backed default {@link CoordinationProvider}.\n *\n * Maps the five coordination-port methods onto today's `_meta/schema-fence`\n * store ops so that, with no `by-*` provider injected, the fence subsystem\n * reproduces its current store-polling behavior byte-for-byte. The `observe*`\n * methods are poll-emit (the legacy {@link FenceWatcher} model); `by-tabs` /\n * `by-peer` override them with real-time push.\n *\n * @module\n */\n\nimport type { NoydbStore } from '../types.js'\nimport type { Unsubscribe } from '../write-hooks.js'\nimport { loadFence, saveFence, type FenceDoc } from '../schema-update/fence.js'\nimport { writeClientDoc, listClientDocs, type ClientDoc } from '../schema-update/client-registry.js'\nimport type { CoordinationProvider, FenceState, WriterPresence } from './types.js'\n\n/**\n * Default poll cadence for the `observe*` fallbacks (ms). Matches the\n * store-poll granularity the fence-controller uses while waiting for quorum\n * (`delay(50)`); the same value the migration cutover falls back to when no\n * real-time provider is injected.\n */\nconst DEFAULT_POLL_INTERVAL_MS = 50\n\n/** Map a stored {@link ClientDoc} to the port's {@link WriterPresence}. */\nfunction toPresence(doc: ClientDoc): WriterPresence {\n return {\n writerId: doc.clientId,\n // Pre-#469 docs (and explicit empty) have no session — fall back to the\n // writerId so every presence is session-addressable.\n sessionId: doc.sessionId && doc.sessionId.length > 0 ? doc.sessionId : doc.clientId,\n lastSeen: doc.lastSeen,\n quiescedAtVersion: doc.quiescedAtVersion,\n }\n}\n\nfunction fenceEqual(a: FenceState, b: FenceState): boolean {\n return a.currentSchemaVersion === b.currentSchemaVersion && a.fenceState === b.fenceState\n}\n\nfunction presenceListEqual(a: readonly WriterPresence[], b: readonly WriterPresence[]): boolean {\n if (a.length !== b.length) return false\n const key = (w: WriterPresence) => `${w.writerId}\u0000${w.sessionId}\u0000${w.lastSeen}\u0000${String(w.quiescedAtVersion)}`\n const bk = new Set(b.map(key))\n return a.every((w) => bk.has(key(w)))\n}\n\nexport class StoreCoordinationProvider implements CoordinationProvider {\n readonly #store: NoydbStore\n readonly #pollIntervalMs: number\n\n constructor(store: NoydbStore, opts?: { pollIntervalMs?: number }) {\n this.#store = store\n this.#pollIntervalMs = opts?.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS\n }\n\n async setFence(vault: string, fence: FenceState): Promise<void> {\n // FenceState is structurally FenceDoc (currentSchemaVersion + fenceState).\n await saveFence(this.#store, vault, fence as FenceDoc)\n }\n\n async readFence(vault: string): Promise<FenceState> {\n // FenceDoc is structurally FenceState (currentSchemaVersion + fenceState).\n return loadFence(this.#store, vault)\n }\n\n observeFence(vault: string, onChange: (f: FenceState) => void): Unsubscribe {\n let last: FenceState | null = null\n let busy = false\n const poll = async () => {\n if (busy) return\n busy = true\n try {\n const fence = await loadFence(this.#store, vault)\n if (last === null || !fenceEqual(last, fence)) {\n last = fence\n onChange(fence)\n }\n } catch {\n /* transient store error — retry next tick */\n } finally {\n busy = false\n }\n }\n void poll() // emit current state once immediately\n const timer = setInterval(() => void poll(), this.#pollIntervalMs)\n unref(timer)\n return () => clearInterval(timer)\n }\n\n async reportPresence(vault: string, p: WriterPresence): Promise<void> {\n await writeClientDoc(this.#store, vault, p.writerId, {\n lastSeen: p.lastSeen,\n quiescedAtVersion: p.quiescedAtVersion,\n sessionId: p.sessionId,\n })\n }\n\n observePresence(vault: string, onChange: (writers: readonly WriterPresence[]) => void): Unsubscribe {\n let last: readonly WriterPresence[] | null = null\n let busy = false\n const poll = async () => {\n if (busy) return\n busy = true\n try {\n const docs = await listClientDocs(this.#store, vault)\n const writers = docs.map(toPresence)\n if (last === null || !presenceListEqual(last, writers)) {\n last = writers\n onChange(writers)\n }\n } catch {\n /* transient store error — retry next tick */\n } finally {\n busy = false\n }\n }\n void poll() // emit current set once immediately\n const timer = setInterval(() => void poll(), this.#pollIntervalMs)\n unref(timer)\n return () => clearInterval(timer)\n }\n\n async reachableWriters(vault: string, o: { staleMs: number; now: number }): Promise<readonly WriterPresence[]> {\n const docs = await listClientDocs(this.#store, vault)\n return docs.map(toPresence).filter((w) => o.now - w.lastSeen <= o.staleMs)\n }\n}\n\n/** Best-effort `unref` so a poll timer never holds the process open (Node only). */\nfunction unref(timer: ReturnType<typeof setInterval>): void {\n const t = timer as unknown as { unref?: () => void }\n if (typeof t.unref === 'function') t.unref()\n}\n","/**\n * #308 L3 — Reciprocal Rank Fusion. Merges N ranked `RetrieveHit` lists into\n * one, scoring each id by Σ 1/(k + rank) across the lists it appears in. Pure,\n * deterministic, no I/O — which is why it serves BOTH hybrid lexical⊕semantic\n * fusion AND klum-db's cross-vault federation (the lists are per-vault). The\n * fused `score` is the RRF score, NOT BM25 or cosine.\n */\nimport type { RetrieveHit } from './retrieve-types.js'\n\nexport interface FuseOptions {\n /** Only 'rrf' in v1 (default). */\n readonly strategy?: 'rrf'\n /** RRF constant; larger flattens the rank weighting. Default 60. */\n readonly k?: number\n /** Truncate the fused output to this many hits. */\n readonly limit?: number\n}\n\n/**\n * Callers must supply hits with `rank >= 1` (the retrieve contract guarantees\n * it; a federation caller passing `rank: 0` with `k: 0` would divide by zero).\n * Doc-only note — no runtime guard; rank ≥ 1 is the retrieve contract.\n */\nexport function fuseRetrieval<T>(\n lists: ReadonlyArray<ReadonlyArray<RetrieveHit<T>>>,\n opts: FuseOptions = {},\n): RetrieveHit<T>[] {\n const k = opts.k ?? 60\n const acc = new Map<string, { score: number; hit: RetrieveHit<T> }>()\n for (const list of lists) {\n for (const hit of list) {\n const contribution = 1 / (k + hit.rank)\n const prev = acc.get(hit.id)\n if (prev === undefined) {\n acc.set(hit.id, { score: contribution, hit })\n } else {\n prev.score += contribution\n prev.hit = mergePresentation(prev.hit, hit)\n }\n }\n }\n const merged = [...acc.values()].sort(\n (a, b) => b.score - a.score || (a.hit.id < b.hit.id ? -1 : a.hit.id > b.hit.id ? 1 : 0),\n )\n const limited = opts.limit !== undefined ? merged.slice(0, opts.limit) : merged\n return limited.map((m, i) => ({ ...m.hit, score: m.score, rank: i + 1 }))\n}\n\n/**\n * When an id appears in multiple lists, prefer the more informative\n * presentation: a real `field`/`snippet`/`locale` (lexical) over the vector\n * placeholder (`'(vector)'` / `''`). Recover `record` from whichever hit has it.\n */\nfunction mergePresentation<T>(a: RetrieveHit<T>, b: RetrieveHit<T>): RetrieveHit<T> {\n const lexical = a.field !== '(vector)' ? a : b\n const other = lexical === a ? b : a\n return {\n ...lexical,\n ...(lexical.record === undefined && other.record !== undefined ? { record: other.record } : {}),\n }\n}\n"],"mappings":";;;;;;;;AAiEO,SAAS,SACd,SACA,YACA,iBACS;AACT,SAAO,QAAQ,OAAO,CAAC,MAAM,EAAE,aAAa,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,UAAU;AAC9G;AAyBA,eAAsB,gBACpB,UACA,GACA,KACe;AACf,QAAM,SAAS,SAAS,EAAE,OAAO,EAAE,sBAAsB,EAAE,YAAY,YAAY,WAAW,CAAC;AAC/F,QAAM,EAAE,QAAQ;AAEhB,QAAM,WAAW,EAAE,IAAI,IAAI,EAAE;AAC7B,QAAM,SAAS,MAAM,SAAS,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,KAAK,EAA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GAAG,EAAE,KAAK,OAAO,EAAE,OAAO,MAAM,IAAI,EAAE,EAAE;AAC1E;AAOA,SAAS,kBAAqB,GAAmB,GAAmC;AAClF,QAAM,UAAU,EAAE,UAAU,aAAa,IAAI;AAC7C,QAAM,QAAQ,YAAY,IAAI,IAAI;AAClC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAI,QAAQ,WAAW,UAAa,MAAM,WAAW,SAAY,EAAE,QAAQ,MAAM,OAAO,IAAI,CAAC;AAAA,EAC/F;AACF;","names":["META_COLLECTION"]}
@@ -2,18 +2,18 @@ import {
2
2
  ATTESTATIONS_COLLECTION,
3
3
  REVOKED_RECORD_ID,
4
4
  loadOrCreateSigner
5
- } from "./chunk-I2RX62RX.js";
5
+ } from "./chunk-5PTX7PKD.js";
6
6
  import {
7
7
  NOYDB_FORMAT_VERSION
8
- } from "./chunk-AD6RNBAW.js";
8
+ } from "./chunk-A7DNZVAV.js";
9
9
  import {
10
10
  decrypt,
11
11
  encrypt
12
- } from "./chunk-7JSP3E67.js";
12
+ } from "./chunk-E2MDPPOC.js";
13
13
  import {
14
14
  AttestationError,
15
15
  ConflictError
16
- } from "./chunk-DDOYOMAD.js";
16
+ } from "./chunk-JZ5DS4DP.js";
17
17
 
18
18
  // src/attestation/revoke.ts
19
19
  import { signRevocationList } from "@noy-db/attestation";
@@ -80,4 +80,4 @@ export {
80
80
  getRevokedDocIdsCore,
81
81
  publishRevocationListCore
82
82
  };
83
- //# sourceMappingURL=chunk-HAKEZTA7.js.map
83
+ //# sourceMappingURL=chunk-JOJPBZSZ.js.map
@@ -1092,6 +1092,34 @@ var RecordCekNotFoundError = class extends NoydbError {
1092
1092
  this.id = id;
1093
1093
  }
1094
1094
  };
1095
+ var EmbeddingDimMismatchError = class extends NoydbError {
1096
+ field;
1097
+ expected;
1098
+ actual;
1099
+ constructor(field, expected, actual) {
1100
+ super(
1101
+ "EMBEDDING_DIM_MISMATCH",
1102
+ `Embedding for "${field}" has dim ${actual}, expected ${expected}.`
1103
+ );
1104
+ this.name = "EmbeddingDimMismatchError";
1105
+ this.field = field;
1106
+ this.expected = expected;
1107
+ this.actual = actual;
1108
+ }
1109
+ };
1110
+ var EmbeddingModelMismatchError = class extends NoydbError {
1111
+ expected;
1112
+ found;
1113
+ constructor(expected, found) {
1114
+ super(
1115
+ "EMBEDDING_MODEL_MISMATCH",
1116
+ `Embedding model mismatch: collection uses "${expected}" but a stored vector is "${found}". Run vault.embeddings.reindex() after changing the encoder.`
1117
+ );
1118
+ this.name = "EmbeddingModelMismatchError";
1119
+ this.expected = expected;
1120
+ this.found = found;
1121
+ }
1122
+ };
1095
1123
 
1096
1124
  export {
1097
1125
  NoydbError,
@@ -1193,6 +1221,8 @@ export {
1193
1221
  ForgetStrategyNotConfiguredError,
1194
1222
  SealedRecordExpiredError,
1195
1223
  SealedRecordMismatchError,
1196
- RecordCekNotFoundError
1224
+ RecordCekNotFoundError,
1225
+ EmbeddingDimMismatchError,
1226
+ EmbeddingModelMismatchError
1197
1227
  };
1198
- //# sourceMappingURL=chunk-DDOYOMAD.js.map
1228
+ //# sourceMappingURL=chunk-JZ5DS4DP.js.map