@noy-db/hub 0.4.0-pre.5 → 0.4.0-pre.6

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 (330) hide show
  1. package/dist/{api-22ES33N3.js → api-5QVQX4HG.js} +6 -6
  2. package/dist/attestation/index.js +14 -14
  3. package/dist/{backup-YCHAC575.js → backup-USYSNCYM.js} +6 -6
  4. package/dist/blobs/index.js +8 -5
  5. package/dist/blobs/index.js.map +1 -1
  6. package/dist/broker/index.js +6 -6
  7. package/dist/cargo/index.js +26 -28
  8. package/dist/{chunk-RWW3I3PO.js → chunk-2BVW754E.js} +2 -2
  9. package/dist/{chunk-VEGQYPCP.js → chunk-2ZSC454H.js} +3 -3
  10. package/dist/{chunk-S4YERMGJ.js → chunk-32467U5J.js} +3 -3
  11. package/dist/{chunk-UVBHM7AK.js → chunk-3GXDB3NQ.js} +4 -4
  12. package/dist/{chunk-L2CAWCQL.js → chunk-3S2YNMUS.js} +53 -5
  13. package/dist/chunk-3S2YNMUS.js.map +1 -0
  14. package/dist/{chunk-HAPY7WFP.js → chunk-3TZUC4WS.js} +9 -9
  15. package/dist/{chunk-M6QA2KK2.js → chunk-44Y3P5U6.js} +2 -2
  16. package/dist/{chunk-WQN5SM7P.js → chunk-4B3DL75F.js} +2 -2
  17. package/dist/{chunk-XUFAFHQM.js → chunk-5ABOFAHN.js} +7 -4
  18. package/dist/chunk-5ABOFAHN.js.map +1 -0
  19. package/dist/chunk-5D2ALSM5.js +19 -0
  20. package/dist/chunk-5D2ALSM5.js.map +1 -0
  21. package/dist/{chunk-OHV6T5JB.js → chunk-6SSWOUUS.js} +2 -2
  22. package/dist/{chunk-6RPWILRH.js → chunk-7IQWHYL2.js} +3 -3
  23. package/dist/chunk-AFHQATY4.js +47 -0
  24. package/dist/chunk-AFHQATY4.js.map +1 -0
  25. package/dist/{chunk-I2XEBEEF.js → chunk-AZXEOEQK.js} +3 -3
  26. package/dist/{chunk-K7BADAOS.js → chunk-C2V7AJO2.js} +3 -3
  27. package/dist/chunk-CADUYBQD.js +151 -0
  28. package/dist/chunk-CADUYBQD.js.map +1 -0
  29. package/dist/{chunk-YTW6ZIPD.js → chunk-DOZFU7OZ.js} +1 -1
  30. package/dist/chunk-DOZFU7OZ.js.map +1 -0
  31. package/dist/{chunk-YCAJDK4O.js → chunk-E7FSBI6I.js} +3 -3
  32. package/dist/chunk-EP5L47XV.js +22 -0
  33. package/dist/chunk-EP5L47XV.js.map +1 -0
  34. package/dist/{chunk-YWZEDG7F.js → chunk-EPME33Y4.js} +4 -4
  35. package/dist/{chunk-EEZCB74X.js → chunk-EWPS35AR.js} +465 -393
  36. package/dist/chunk-EWPS35AR.js.map +1 -0
  37. package/dist/{chunk-BY5YBSXA.js → chunk-GQT6J4FJ.js} +14 -1
  38. package/dist/chunk-GQT6J4FJ.js.map +1 -0
  39. package/dist/{chunk-YXZNGHID.js → chunk-H5GMROCB.js} +2 -2
  40. package/dist/{chunk-QMMOMBH6.js → chunk-HA7P3BTB.js} +24 -175
  41. package/dist/chunk-HA7P3BTB.js.map +1 -0
  42. package/dist/{chunk-FTCGEUOY.js → chunk-HDF5R2K6.js} +4 -4
  43. package/dist/{chunk-R2N37AA6.js → chunk-HVPW6PCX.js} +2 -2
  44. package/dist/{chunk-YXIVUWDU.js → chunk-HXVRRJBD.js} +3 -3
  45. package/dist/{chunk-5ATANZSW.js → chunk-ICYC5YNI.js} +4 -4
  46. package/dist/{chunk-7ICV4ASA.js → chunk-IUATR5UE.js} +25 -3
  47. package/dist/chunk-IUATR5UE.js.map +1 -0
  48. package/dist/{chunk-QZJEYZ4I.js → chunk-JGOKAZNB.js} +3 -3
  49. package/dist/{chunk-JN3SGXJE.js → chunk-JOCMXSR2.js} +1 -1
  50. package/dist/{chunk-JN3SGXJE.js.map → chunk-JOCMXSR2.js.map} +1 -1
  51. package/dist/{chunk-7BIJS6II.js → chunk-JTIPVW4J.js} +3 -3
  52. package/dist/{chunk-SC4JLMZI.js → chunk-KCZAFDP5.js} +2 -2
  53. package/dist/{chunk-GP54LU5N.js → chunk-LG2GUYRX.js} +7 -7
  54. package/dist/{chunk-J5TEU77Q.js → chunk-LN3MQFUE.js} +54 -2
  55. package/dist/chunk-LN3MQFUE.js.map +1 -0
  56. package/dist/{chunk-FIP7KI2P.js → chunk-M4GO4ZJK.js} +205 -15
  57. package/dist/chunk-M4GO4ZJK.js.map +1 -0
  58. package/dist/{chunk-QMZ5A6FQ.js → chunk-M7W2KYTL.js} +2 -2
  59. package/dist/{chunk-K4BWPNJO.js → chunk-MLCTPWSO.js} +3 -3
  60. package/dist/{chunk-GEEJPID6.js → chunk-MMVQ3SUO.js} +3 -3
  61. package/dist/{chunk-HQKRZIX6.js → chunk-MPPWL64H.js} +24 -41
  62. package/dist/chunk-MPPWL64H.js.map +1 -0
  63. package/dist/{chunk-YZN6NRTR.js → chunk-MQBFT2OT.js} +11 -9
  64. package/dist/chunk-MQBFT2OT.js.map +1 -0
  65. package/dist/{chunk-TNJVDG2B.js → chunk-NA374QG7.js} +2 -2
  66. package/dist/chunk-NIKO2BBZ.js +23 -0
  67. package/dist/chunk-NIKO2BBZ.js.map +1 -0
  68. package/dist/chunk-PEOZ34EM.js +13 -0
  69. package/dist/chunk-PEOZ34EM.js.map +1 -0
  70. package/dist/chunk-PVEWA2DU.js +23 -0
  71. package/dist/chunk-PVEWA2DU.js.map +1 -0
  72. package/dist/{chunk-V5JUAW4M.js → chunk-QVIZDLAR.js} +5 -5
  73. package/dist/{chunk-DYZ5CCVM.js → chunk-RM5EXCFF.js} +1 -1
  74. package/dist/{chunk-DYZ5CCVM.js.map → chunk-RM5EXCFF.js.map} +1 -1
  75. package/dist/chunk-SMY5X46Z.js +14 -0
  76. package/dist/chunk-SMY5X46Z.js.map +1 -0
  77. package/dist/{chunk-2CRZOVDI.js → chunk-UNREYBZO.js} +2 -2
  78. package/dist/{chunk-KJTIAECI.js → chunk-V2R2VWER.js} +168 -9
  79. package/dist/chunk-V2R2VWER.js.map +1 -0
  80. package/dist/{chunk-CKUYQO2P.js → chunk-VDTWFN2P.js} +7 -5
  81. package/dist/chunk-VDTWFN2P.js.map +1 -0
  82. package/dist/chunk-VKQCVU2Z.js +21 -0
  83. package/dist/chunk-VKQCVU2Z.js.map +1 -0
  84. package/dist/{chunk-UTEATWHO.js → chunk-VNJMLOQS.js} +4 -4
  85. package/dist/{chunk-JAMDDLIM.js → chunk-WCJJQV2D.js} +2 -2
  86. package/dist/{chunk-OMSKGLYA.js → chunk-WWBC4KLB.js} +2 -2
  87. package/dist/{chunk-JIHH26WQ.js → chunk-XG7OZDOS.js} +3 -3
  88. package/dist/{chunk-QBOQI6PG.js → chunk-XONZGK6J.js} +2 -2
  89. package/dist/{chunk-YQQPNXNO.js → chunk-XSOGLHGY.js} +2 -2
  90. package/dist/{chunk-3OWYOECI.js → chunk-XY6MNSAF.js} +4 -4
  91. package/dist/chunk-XZHEOSQ2.js +16 -0
  92. package/dist/chunk-XZHEOSQ2.js.map +1 -0
  93. package/dist/{chunk-X3MWEFPT.js → chunk-YGMREQAK.js} +3 -3
  94. package/dist/chunk-YMUFFJCO.js +23 -0
  95. package/dist/chunk-YMUFFJCO.js.map +1 -0
  96. package/dist/{chunk-3LJYHE7S.js → chunk-ZDFU34XY.js} +9 -6
  97. package/dist/{chunk-3LJYHE7S.js.map → chunk-ZDFU34XY.js.map} +1 -1
  98. package/dist/{chunk-ILM6X6CP.js → chunk-ZF572E2M.js} +2 -2
  99. package/dist/{chunk-TNATF3HB.js → chunk-ZGEFBDPR.js} +2 -2
  100. package/dist/chunk-ZGEFBDPR.js.map +1 -0
  101. package/dist/{chunk-OGVE4IJW.js → chunk-ZHMUFYZF.js} +4 -4
  102. package/dist/{chunk-YFFEF6HR.js → chunk-ZHZ4PET5.js} +2 -2
  103. package/dist/{chunk-YZNKFYDC.js → chunk-ZM72UO3Y.js} +2 -2
  104. package/dist/classified/index.js +3 -3
  105. package/dist/{classified-marker-52P3D72W.js → classified-marker-SVDRXLD3.js} +3 -3
  106. package/dist/{collection-facade-XKCFHSLR.js → collection-facade-S5PPKZD5.js} +9 -9
  107. package/dist/consent/index.js +8 -4
  108. package/dist/consent/index.js.map +1 -1
  109. package/dist/{cover-5BSNJREH.js → cover-ADBCTIKN.js} +3 -3
  110. package/dist/crdt/index.js +4 -0
  111. package/dist/crdt/index.js.map +1 -1
  112. package/dist/{dead-filter-JXVCKS6W.js → dead-filter-HKDMTMVY.js} +2 -2
  113. package/dist/{delegation-WWZPEDK2.js → delegation-EV7LKJPH.js} +5 -5
  114. package/dist/derivations/index.js +3 -3
  115. package/dist/{derive-CWWFEQ4N.js → derive-5LDJW76F.js} +4 -4
  116. package/dist/{dispatch-PKQQFDBT.js → dispatch-SPMYNXNW.js} +12 -11
  117. package/dist/{dispatch-PKQQFDBT.js.map → dispatch-SPMYNXNW.js.map} +1 -1
  118. package/dist/{dispatch-SMXUO7W5.js → dispatch-V5MSMQYX.js} +5 -5
  119. package/dist/{enclave-I5H3GINP.js → enclave-ZA7C3H2L.js} +4 -4
  120. package/dist/executor-SVHAJZ4A.js +28 -0
  121. package/dist/{export-accessible-FBL6TDSK.js → export-accessible-S35YKIBL.js} +7 -7
  122. package/dist/{extract-partition-ZYIRYMTI.js → extract-partition-UVHAM5WZ.js} +10 -10
  123. package/dist/{fanout-sidecar-WWXVHHUH.js → fanout-sidecar-HRMHC34B.js} +4 -4
  124. package/dist/forget/index.js +4 -4
  125. package/dist/history/index.js +10 -6
  126. package/dist/history/index.js.map +1 -1
  127. package/dist/i18n/index.js +10 -8
  128. package/dist/i18n/index.js.map +1 -1
  129. package/dist/index.d.ts +4 -7
  130. package/dist/index.js +94 -151
  131. package/dist/index.js.map +1 -1
  132. package/dist/indexing/index.js +3 -1
  133. package/dist/indexing/index.js.map +1 -1
  134. package/dist/{issue-F76PAGIR.js → issue-5X3SMCF4.js} +6 -6
  135. package/dist/kernel/lazy.d.ts +30 -0
  136. package/dist/kernel/noydb.d.ts +21 -10
  137. package/dist/kernel/query/builder.d.ts +10 -10
  138. package/dist/kernel/query/index.d.ts +0 -6
  139. package/dist/kernel/query/scan-builder.d.ts +4 -4
  140. package/dist/kernel/types.d.ts +5 -5
  141. package/dist/{ledger-M2BKCNVS.js → ledger-K6JBFL3Z.js} +6 -6
  142. package/dist/liberate-NHTCKBU4.js +24 -0
  143. package/dist/{link-set-ZU4E5J5S.js → link-set-XVZY2ODC.js} +5 -5
  144. package/dist/materialized-views/index.js +15 -12
  145. package/dist/noydb-TI3RFU6M.js +78 -0
  146. package/dist/periods/index.js +9 -7
  147. package/dist/pod/index.js +5 -6
  148. package/dist/{policy-IY2YEA3A.js → policy-QWGJB7P7.js} +4 -4
  149. package/dist/port/with/collection-registries.d.ts +62 -0
  150. package/dist/port/with/strategies.d.ts +2 -2
  151. package/dist/port/with/team-strategy.d.ts +2 -1
  152. package/dist/portability/index.js +6 -6
  153. package/dist/{post-register-XIAHB6KF.js → post-register-5VHHVFJY.js} +4 -4
  154. package/dist/query/index.js +4 -44
  155. package/dist/{aggregate → reduce}/index.js +22 -15
  156. package/dist/reduce/index.js.map +1 -0
  157. package/dist/{register-HB4TQZSV.js → register-CEX7R7NE.js} +6 -6
  158. package/dist/{registry-6BMBFEXT.js → registry-DIKMRXUC.js} +5 -5
  159. package/dist/{registry-JOFO7RAH.js → registry-EWIB5NTI.js} +4 -4
  160. package/dist/{request-withdrawal-UN3TRHWI.js → request-withdrawal-AAG57QO4.js} +9 -9
  161. package/dist/{reveal-VWXRV2XU.js → reveal-7OOT5XPD.js} +3 -3
  162. package/dist/{revoke-OLO2OVR7.js → revoke-U5LCIJMF.js} +6 -6
  163. package/dist/sealed-record/index.js +6 -6
  164. package/dist/{seed-CDBFOTIK.js → seed-GVOI6QP6.js} +6 -6
  165. package/dist/session/index.js +7 -3
  166. package/dist/session/index.js.map +1 -1
  167. package/dist/shadow/index.js +4 -0
  168. package/dist/shadow/index.js.map +1 -1
  169. package/dist/{signer-MGGKPYAN.js → signer-NAA2OX7H.js} +5 -5
  170. package/dist/snapshots/index.js +9 -5
  171. package/dist/snapshots/index.js.map +1 -1
  172. package/dist/{stale-NBROTA66.js → stale-BJO2WIN7.js} +6 -5
  173. package/dist/{storage-3R37QZLA.js → storage-FL7XXZTN.js} +5 -5
  174. package/dist/{store-coordination-provider-P3IU5JHD.js → store-coordination-provider-DX5HECK3.js} +3 -3
  175. package/dist/sync/index.js +8 -4
  176. package/dist/sync/index.js.map +1 -1
  177. package/dist/team/index.js +15 -17
  178. package/dist/tiers/index.js +4 -4
  179. package/dist/tx/index.js +5 -1
  180. package/dist/tx/index.js.map +1 -1
  181. package/dist/via/blob/index.d.ts +2 -0
  182. package/dist/via/i18n/core.d.ts +1 -1
  183. package/dist/via/i18n/index.d.ts +2 -0
  184. package/dist/via/money/money-reducer.d.ts +2 -2
  185. package/dist/{walk-E3OVLBFR.js → walk-JXMWKKQW.js} +5 -5
  186. package/dist/with-audit/consent/index.d.ts +2 -0
  187. package/dist/with-audit/periods/index.d.ts +2 -0
  188. package/dist/with-cargo/floor.d.ts +3 -3
  189. package/dist/with-commit/crdt/index.d.ts +2 -0
  190. package/dist/with-commit/history/index.d.ts +2 -0
  191. package/dist/with-fork/shadow/index.d.ts +2 -0
  192. package/dist/with-fork/snapshots/index.d.ts +2 -0
  193. package/dist/with-formula/materialized-views/types.d.ts +7 -7
  194. package/dist/with-lookup/indexing/index.d.ts +2 -0
  195. package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
  196. package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
  197. package/dist/with-lookup/reduce/index.d.ts +34 -0
  198. package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +10 -10
  199. package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
  200. package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
  201. package/dist/with-party/session/index.d.ts +2 -0
  202. package/dist/with-party/sync/index.d.ts +2 -0
  203. package/dist/with-party/team/keyring.d.ts +20 -1
  204. package/dist/with-party/team/noydb-facade.d.ts +2 -1
  205. package/dist/{withdraw-accessible-Q2EMATCU.js → withdraw-accessible-GO6KQJVM.js} +8 -8
  206. package/package.json +6 -34
  207. package/dist/aggregate/index.js.map +0 -1
  208. package/dist/as/index.js +0 -30
  209. package/dist/at/index.js +0 -1
  210. package/dist/by/index.js +0 -11
  211. package/dist/chunk-2YELV6TV.js +0 -1
  212. package/dist/chunk-7ICV4ASA.js.map +0 -1
  213. package/dist/chunk-AFAPBZAA.js +0 -54
  214. package/dist/chunk-AFAPBZAA.js.map +0 -1
  215. package/dist/chunk-BY5YBSXA.js.map +0 -1
  216. package/dist/chunk-CJVEAVYH.js +0 -205
  217. package/dist/chunk-CJVEAVYH.js.map +0 -1
  218. package/dist/chunk-CKUYQO2P.js.map +0 -1
  219. package/dist/chunk-EEZCB74X.js.map +0 -1
  220. package/dist/chunk-FIP7KI2P.js.map +0 -1
  221. package/dist/chunk-HQKRZIX6.js.map +0 -1
  222. package/dist/chunk-IGLU4ME7.js +0 -255
  223. package/dist/chunk-IGLU4ME7.js.map +0 -1
  224. package/dist/chunk-J5TEU77Q.js.map +0 -1
  225. package/dist/chunk-KJTIAECI.js.map +0 -1
  226. package/dist/chunk-L2CAWCQL.js.map +0 -1
  227. package/dist/chunk-LB7FD65R.js +0 -163
  228. package/dist/chunk-LB7FD65R.js.map +0 -1
  229. package/dist/chunk-QMMOMBH6.js.map +0 -1
  230. package/dist/chunk-TNATF3HB.js.map +0 -1
  231. package/dist/chunk-XUFAFHQM.js.map +0 -1
  232. package/dist/chunk-YTW6ZIPD.js.map +0 -1
  233. package/dist/chunk-YZN6NRTR.js.map +0 -1
  234. package/dist/executor-SHYLIBOM.js +0 -26
  235. package/dist/in/index.js +0 -1
  236. package/dist/liberate-ZP7UB57K.js +0 -24
  237. package/dist/noydb-BNDGEK5X.js +0 -71
  238. package/dist/on/index.js +0 -17
  239. package/dist/port/as/index.d.ts +0 -26
  240. package/dist/port/at/index.d.ts +0 -18
  241. package/dist/port/in/index.d.ts +0 -21
  242. package/dist/port/on/index.d.ts +0 -27
  243. package/dist/port/ui/index.d.ts +0 -21
  244. package/dist/port/with/index.d.ts +0 -18
  245. package/dist/request-withdrawal-UN3TRHWI.js.map +0 -1
  246. package/dist/revoke-OLO2OVR7.js.map +0 -1
  247. package/dist/signer-MGGKPYAN.js.map +0 -1
  248. package/dist/stale-NBROTA66.js.map +0 -1
  249. package/dist/storage-3R37QZLA.js.map +0 -1
  250. package/dist/ui/index.js +0 -1
  251. package/dist/ui/index.js.map +0 -1
  252. package/dist/with/index.js +0 -31
  253. package/dist/with/index.js.map +0 -1
  254. package/dist/with-lookup/aggregate/index.d.ts +0 -23
  255. package/dist/withdraw-accessible-Q2EMATCU.js.map +0 -1
  256. /package/dist/{api-22ES33N3.js.map → api-5QVQX4HG.js.map} +0 -0
  257. /package/dist/{backup-YCHAC575.js.map → backup-USYSNCYM.js.map} +0 -0
  258. /package/dist/{chunk-RWW3I3PO.js.map → chunk-2BVW754E.js.map} +0 -0
  259. /package/dist/{chunk-VEGQYPCP.js.map → chunk-2ZSC454H.js.map} +0 -0
  260. /package/dist/{chunk-S4YERMGJ.js.map → chunk-32467U5J.js.map} +0 -0
  261. /package/dist/{chunk-UVBHM7AK.js.map → chunk-3GXDB3NQ.js.map} +0 -0
  262. /package/dist/{chunk-HAPY7WFP.js.map → chunk-3TZUC4WS.js.map} +0 -0
  263. /package/dist/{chunk-M6QA2KK2.js.map → chunk-44Y3P5U6.js.map} +0 -0
  264. /package/dist/{chunk-WQN5SM7P.js.map → chunk-4B3DL75F.js.map} +0 -0
  265. /package/dist/{chunk-OHV6T5JB.js.map → chunk-6SSWOUUS.js.map} +0 -0
  266. /package/dist/{chunk-6RPWILRH.js.map → chunk-7IQWHYL2.js.map} +0 -0
  267. /package/dist/{chunk-I2XEBEEF.js.map → chunk-AZXEOEQK.js.map} +0 -0
  268. /package/dist/{chunk-K7BADAOS.js.map → chunk-C2V7AJO2.js.map} +0 -0
  269. /package/dist/{chunk-YCAJDK4O.js.map → chunk-E7FSBI6I.js.map} +0 -0
  270. /package/dist/{chunk-YWZEDG7F.js.map → chunk-EPME33Y4.js.map} +0 -0
  271. /package/dist/{chunk-YXZNGHID.js.map → chunk-H5GMROCB.js.map} +0 -0
  272. /package/dist/{chunk-FTCGEUOY.js.map → chunk-HDF5R2K6.js.map} +0 -0
  273. /package/dist/{chunk-R2N37AA6.js.map → chunk-HVPW6PCX.js.map} +0 -0
  274. /package/dist/{chunk-YXIVUWDU.js.map → chunk-HXVRRJBD.js.map} +0 -0
  275. /package/dist/{chunk-5ATANZSW.js.map → chunk-ICYC5YNI.js.map} +0 -0
  276. /package/dist/{chunk-QZJEYZ4I.js.map → chunk-JGOKAZNB.js.map} +0 -0
  277. /package/dist/{chunk-7BIJS6II.js.map → chunk-JTIPVW4J.js.map} +0 -0
  278. /package/dist/{chunk-SC4JLMZI.js.map → chunk-KCZAFDP5.js.map} +0 -0
  279. /package/dist/{chunk-GP54LU5N.js.map → chunk-LG2GUYRX.js.map} +0 -0
  280. /package/dist/{chunk-QMZ5A6FQ.js.map → chunk-M7W2KYTL.js.map} +0 -0
  281. /package/dist/{chunk-K4BWPNJO.js.map → chunk-MLCTPWSO.js.map} +0 -0
  282. /package/dist/{chunk-GEEJPID6.js.map → chunk-MMVQ3SUO.js.map} +0 -0
  283. /package/dist/{chunk-TNJVDG2B.js.map → chunk-NA374QG7.js.map} +0 -0
  284. /package/dist/{chunk-V5JUAW4M.js.map → chunk-QVIZDLAR.js.map} +0 -0
  285. /package/dist/{chunk-2CRZOVDI.js.map → chunk-UNREYBZO.js.map} +0 -0
  286. /package/dist/{chunk-UTEATWHO.js.map → chunk-VNJMLOQS.js.map} +0 -0
  287. /package/dist/{chunk-JAMDDLIM.js.map → chunk-WCJJQV2D.js.map} +0 -0
  288. /package/dist/{chunk-OMSKGLYA.js.map → chunk-WWBC4KLB.js.map} +0 -0
  289. /package/dist/{chunk-JIHH26WQ.js.map → chunk-XG7OZDOS.js.map} +0 -0
  290. /package/dist/{chunk-QBOQI6PG.js.map → chunk-XONZGK6J.js.map} +0 -0
  291. /package/dist/{chunk-YQQPNXNO.js.map → chunk-XSOGLHGY.js.map} +0 -0
  292. /package/dist/{chunk-3OWYOECI.js.map → chunk-XY6MNSAF.js.map} +0 -0
  293. /package/dist/{chunk-X3MWEFPT.js.map → chunk-YGMREQAK.js.map} +0 -0
  294. /package/dist/{chunk-ILM6X6CP.js.map → chunk-ZF572E2M.js.map} +0 -0
  295. /package/dist/{chunk-OGVE4IJW.js.map → chunk-ZHMUFYZF.js.map} +0 -0
  296. /package/dist/{chunk-YFFEF6HR.js.map → chunk-ZHZ4PET5.js.map} +0 -0
  297. /package/dist/{chunk-YZNKFYDC.js.map → chunk-ZM72UO3Y.js.map} +0 -0
  298. /package/dist/{classified-marker-52P3D72W.js.map → classified-marker-SVDRXLD3.js.map} +0 -0
  299. /package/dist/{as/index.js.map → collection-facade-S5PPKZD5.js.map} +0 -0
  300. /package/dist/{at/index.js.map → cover-ADBCTIKN.js.map} +0 -0
  301. /package/dist/{dead-filter-JXVCKS6W.js.map → dead-filter-HKDMTMVY.js.map} +0 -0
  302. /package/dist/{by/index.js.map → delegation-EV7LKJPH.js.map} +0 -0
  303. /package/dist/{chunk-2YELV6TV.js.map → derive-5LDJW76F.js.map} +0 -0
  304. /package/dist/{dispatch-SMXUO7W5.js.map → dispatch-V5MSMQYX.js.map} +0 -0
  305. /package/dist/{collection-facade-XKCFHSLR.js.map → enclave-ZA7C3H2L.js.map} +0 -0
  306. /package/dist/{cover-5BSNJREH.js.map → executor-SVHAJZ4A.js.map} +0 -0
  307. /package/dist/{delegation-WWZPEDK2.js.map → export-accessible-S35YKIBL.js.map} +0 -0
  308. /package/dist/{derive-CWWFEQ4N.js.map → extract-partition-UVHAM5WZ.js.map} +0 -0
  309. /package/dist/{fanout-sidecar-WWXVHHUH.js.map → fanout-sidecar-HRMHC34B.js.map} +0 -0
  310. /package/dist/{enclave-I5H3GINP.js.map → issue-5X3SMCF4.js.map} +0 -0
  311. /package/dist/{executor-SHYLIBOM.js.map → ledger-K6JBFL3Z.js.map} +0 -0
  312. /package/dist/{export-accessible-FBL6TDSK.js.map → liberate-NHTCKBU4.js.map} +0 -0
  313. /package/dist/{extract-partition-ZYIRYMTI.js.map → link-set-XVZY2ODC.js.map} +0 -0
  314. /package/dist/{in/index.js.map → noydb-TI3RFU6M.js.map} +0 -0
  315. /package/dist/{issue-F76PAGIR.js.map → policy-QWGJB7P7.js.map} +0 -0
  316. /package/dist/{post-register-XIAHB6KF.js.map → post-register-5VHHVFJY.js.map} +0 -0
  317. /package/dist/{ledger-M2BKCNVS.js.map → register-CEX7R7NE.js.map} +0 -0
  318. /package/dist/{liberate-ZP7UB57K.js.map → registry-DIKMRXUC.js.map} +0 -0
  319. /package/dist/{link-set-ZU4E5J5S.js.map → registry-EWIB5NTI.js.map} +0 -0
  320. /package/dist/{noydb-BNDGEK5X.js.map → request-withdrawal-AAG57QO4.js.map} +0 -0
  321. /package/dist/{reveal-VWXRV2XU.js.map → reveal-7OOT5XPD.js.map} +0 -0
  322. /package/dist/{on/index.js.map → revoke-U5LCIJMF.js.map} +0 -0
  323. /package/dist/{seed-CDBFOTIK.js.map → seed-GVOI6QP6.js.map} +0 -0
  324. /package/dist/{policy-IY2YEA3A.js.map → signer-NAA2OX7H.js.map} +0 -0
  325. /package/dist/{register-HB4TQZSV.js.map → stale-BJO2WIN7.js.map} +0 -0
  326. /package/dist/{registry-6BMBFEXT.js.map → storage-FL7XXZTN.js.map} +0 -0
  327. /package/dist/{store-coordination-provider-P3IU5JHD.js.map → store-coordination-provider-DX5HECK3.js.map} +0 -0
  328. /package/dist/{walk-E3OVLBFR.js.map → walk-JXMWKKQW.js.map} +0 -0
  329. /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
  330. /package/dist/{registry-JOFO7RAH.js.map → withdraw-accessible-GO6KQJVM.js.map} +0 -0
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  UserApi,
3
3
  createUserApi
4
- } from "./chunk-TNJVDG2B.js";
5
- import "./chunk-6RPWILRH.js";
6
- import "./chunk-GEEJPID6.js";
7
- import "./chunk-SC4JLMZI.js";
4
+ } from "./chunk-NA374QG7.js";
5
+ import "./chunk-7IQWHYL2.js";
6
+ import "./chunk-MMVQ3SUO.js";
7
+ import "./chunk-KCZAFDP5.js";
8
8
  import "./chunk-5WLDZZ6S.js";
9
9
  import "./chunk-5HSSTOOG.js";
10
10
  import "./chunk-G4MFQXYX.js";
11
11
  import "./chunk-LP7BEXCT.js";
12
12
  import "./chunk-7U6AB7DZ.js";
13
- import "./chunk-YTW6ZIPD.js";
13
+ import "./chunk-DOZFU7OZ.js";
14
14
  import "./chunk-6SYOHUHM.js";
15
15
  import "./chunk-PZ5AY32C.js";
16
16
  export {
17
17
  UserApi,
18
18
  createUserApi
19
19
  };
20
- //# sourceMappingURL=api-22ES33N3.js.map
20
+ //# sourceMappingURL=api-5QVQX4HG.js.map
@@ -1,27 +1,27 @@
1
+ import {
2
+ issueAttestationCore
3
+ } from "../chunk-HXVRRJBD.js";
1
4
  import {
2
5
  getRevokedDocIdsCore,
3
6
  publishRevocationListCore,
4
7
  revokeDocCore,
5
8
  unrevokeDocCore
6
- } from "../chunk-UTEATWHO.js";
7
- import {
8
- issueAttestationCore
9
- } from "../chunk-YXIVUWDU.js";
9
+ } from "../chunk-VNJMLOQS.js";
10
10
  import {
11
11
  ATTESTATIONS_COLLECTION
12
- } from "../chunk-QZJEYZ4I.js";
12
+ } from "../chunk-JGOKAZNB.js";
13
13
  import {
14
14
  NO_ATTESTATION
15
15
  } from "../chunk-GTNRMJYH.js";
16
16
  import "../chunk-ZJADGNYF.js";
17
- import "../chunk-GEEJPID6.js";
18
- import "../chunk-SC4JLMZI.js";
17
+ import "../chunk-MMVQ3SUO.js";
18
+ import "../chunk-KCZAFDP5.js";
19
19
  import "../chunk-5WLDZZ6S.js";
20
20
  import "../chunk-5HSSTOOG.js";
21
21
  import "../chunk-G4MFQXYX.js";
22
22
  import "../chunk-LP7BEXCT.js";
23
23
  import "../chunk-7U6AB7DZ.js";
24
- import "../chunk-YTW6ZIPD.js";
24
+ import "../chunk-DOZFU7OZ.js";
25
25
  import {
26
26
  AttestationError,
27
27
  AttestationNotEnabledError
@@ -32,11 +32,11 @@ import "../chunk-PZ5AY32C.js";
32
32
  function withAttestation() {
33
33
  return {
34
34
  async issueAttestation(ctx, args) {
35
- const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-F76PAGIR.js");
35
+ const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-5X3SMCF4.js");
36
36
  return issueAttestationCore2(ctx, args);
37
37
  },
38
38
  async getDocumentSigningPublicKey(deps) {
39
- const { loadSigner, loadOrCreateSigner } = await import("../signer-MGGKPYAN.js");
39
+ const { loadSigner, loadOrCreateSigner } = await import("../signer-NAA2OX7H.js");
40
40
  const existing = await loadSigner(deps.adapter, deps.vault, deps.getDEK);
41
41
  if (existing) return { keyId: existing.keyId, publicKeyB64: existing.publicKeyB64 };
42
42
  if (deps.role !== "owner") {
@@ -46,19 +46,19 @@ function withAttestation() {
46
46
  return { keyId: signer.keyId, publicKeyB64: signer.publicKeyB64 };
47
47
  },
48
48
  async revokeAttestation(ctx, docId) {
49
- const { revokeDocCore: revokeDocCore2 } = await import("../revoke-OLO2OVR7.js");
49
+ const { revokeDocCore: revokeDocCore2 } = await import("../revoke-U5LCIJMF.js");
50
50
  return revokeDocCore2(ctx, docId);
51
51
  },
52
52
  async unrevokeAttestation(ctx, docId) {
53
- const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-OLO2OVR7.js");
53
+ const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-U5LCIJMF.js");
54
54
  return unrevokeDocCore2(ctx, docId);
55
55
  },
56
56
  async getRevokedDocIds(ctx) {
57
- const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-OLO2OVR7.js");
57
+ const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-U5LCIJMF.js");
58
58
  return getRevokedDocIdsCore2(ctx);
59
59
  },
60
60
  async publishRevocationList(ctx) {
61
- const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-OLO2OVR7.js");
61
+ const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-U5LCIJMF.js");
62
62
  return publishRevocationListCore2(ctx);
63
63
  }
64
64
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  SEQUENCE_COLLECTION
3
- } from "./chunk-X3MWEFPT.js";
3
+ } from "./chunk-YGMREQAK.js";
4
4
  import {
5
5
  SCHEMAS_COLLECTION
6
- } from "./chunk-S4YERMGJ.js";
6
+ } from "./chunk-32467U5J.js";
7
7
  import {
8
8
  LEDGER_COLLECTION,
9
9
  LEDGER_DELTAS_COLLECTION
10
10
  } from "./chunk-I7FD46FF.js";
11
- import "./chunk-GEEJPID6.js";
12
- import "./chunk-SC4JLMZI.js";
11
+ import "./chunk-MMVQ3SUO.js";
12
+ import "./chunk-KCZAFDP5.js";
13
13
  import "./chunk-5WLDZZ6S.js";
14
14
  import "./chunk-5HSSTOOG.js";
15
15
  import "./chunk-G4MFQXYX.js";
@@ -17,7 +17,7 @@ import "./chunk-LP7BEXCT.js";
17
17
  import "./chunk-7U6AB7DZ.js";
18
18
  import {
19
19
  NOYDB_BACKUP_VERSION
20
- } from "./chunk-YTW6ZIPD.js";
20
+ } from "./chunk-DOZFU7OZ.js";
21
21
  import {
22
22
  BackupCorruptedError,
23
23
  BackupLedgerError
@@ -239,4 +239,4 @@ export {
239
239
  loadVault,
240
240
  verifyBackupIntegrity
241
241
  };
242
- //# sourceMappingURL=backup-YCHAC575.js.map
242
+ //# sourceMappingURL=backup-USYSNCYM.js.map
@@ -6,9 +6,10 @@ import {
6
6
  BLOB_EVICTION_AUDIT_COLLECTION,
7
7
  EXPORT_AUDIT_COLLECTION,
8
8
  ExportBlobsAbortedError,
9
+ NO_BLOBS,
9
10
  createExportBlobsHandle,
10
11
  runCompaction
11
- } from "../chunk-J5TEU77Q.js";
12
+ } from "../chunk-LN3MQFUE.js";
12
13
  import {
13
14
  BLOB_CHUNKS_COLLECTION,
14
15
  BLOB_COLLECTION,
@@ -23,17 +24,18 @@ import {
23
24
  detectMimeType,
24
25
  isPreCompressed,
25
26
  memoryBlobPinStore
26
- } from "../chunk-VEGQYPCP.js";
27
+ } from "../chunk-2ZSC454H.js";
28
+ import "../chunk-ZUDAK436.js";
27
29
  import "../chunk-LC7DSMHR.js";
28
30
  import "../chunk-PTT2NB46.js";
29
- import "../chunk-GEEJPID6.js";
30
- import "../chunk-SC4JLMZI.js";
31
+ import "../chunk-MMVQ3SUO.js";
32
+ import "../chunk-KCZAFDP5.js";
31
33
  import "../chunk-5WLDZZ6S.js";
32
34
  import "../chunk-5HSSTOOG.js";
33
35
  import "../chunk-G4MFQXYX.js";
34
36
  import "../chunk-LP7BEXCT.js";
35
37
  import "../chunk-7U6AB7DZ.js";
36
- import "../chunk-YTW6ZIPD.js";
38
+ import "../chunk-DOZFU7OZ.js";
37
39
  import {
38
40
  BlobOfflineError
39
41
  } from "../chunk-6SYOHUHM.js";
@@ -63,6 +65,7 @@ export {
63
65
  DEFAULT_CHUNK_SIZE,
64
66
  EXPORT_AUDIT_COLLECTION,
65
67
  ExportBlobsAbortedError,
68
+ NO_BLOBS,
66
69
  blobPinKey,
67
70
  createExportBlobsHandle,
68
71
  detectMagic,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/via/blob/active.ts"],"sourcesContent":["/**\n * Active blob strategy factory. Calling `blobs()` returns a\n * `BlobStrategy` whose `openSlot` constructs a real `BlobSet` bound\n * to the caller's record. The returned strategy is passed into\n * `createNoydb({ blobStrategy: blobs() })` to light up the\n * `collection.blob(id)` path.\n *\n * This module is only reachable through the `@noy-db/hub/blobs`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { BlobSet } from '../../with-shape/blobs/blob-set.js'\nimport type { BlobStrategy } from '../../port/with/blob-strategy.js'\nimport { createBlobPinCache } from '../../with-shape/blobs/blob-pinning.js'\nimport type { BlobPinStore, BlobCacheStats } from '../../with-shape/blobs/blob-pinning.js'\n\n/** Options for {@link withBlobs} (#808). */\nexport interface WithBlobsOptions {\n /**\n * Device-local backend for the offline-pin registry + external side-cache\n * (`collection.blob(id).pin()`, the `cacheBudget` LRU stamps). Default:\n * in-memory — pins then last one app session. Supply a durable,\n * DEVICE-LOCAL store (IndexedDB-backed on the web; it must never sync) to\n * keep pins across restarts. See `BlobPinStore`'s doc for the posture.\n */\n readonly pinStore?: BlobPinStore\n}\n\n/**\n * The strategy `withBlobs()` returns — a `BlobStrategy` plus the device-local\n * blob-cache KPI surface (#808).\n */\nexport interface BlobsService extends BlobStrategy {\n /**\n * Snapshot of this device's blob-cache KPI counters: local-read hits,\n * network misses, and total bytes downloaded from the object store.\n */\n cacheStats(): BlobCacheStats\n}\n\n/**\n * Build a default `BlobStrategy` ready to pass into `createNoydb`.\n *\n * Named `withBlobs` (plugin-pattern canonical) rather than `blobs` to\n * avoid shadowing the very common local idiom\n * `const blobs = invoices.blob(id)` in user code.\n *\n * One `withBlobs()` instance owns one device-local pin registry + KPI\n * counter set (#808) — treat it as \"this device's\" blob service.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withBlobs } from '@noy-db/hub/blobs'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * blobStrategy: withBlobs(),\n * })\n *\n * // Now live — delegates to BlobSet.\n * const vault = await db.openVault('acme')\n * await vault.collection('invoices').blob('inv-1').put('receipt.pdf', bytes)\n * ```\n */\nexport function withBlobs(options: WithBlobsOptions = {}): BlobsService {\n const pinCache = createBlobPinCache(options.pinStore)\n return {\n openSlot(args) {\n return new BlobSet({ ...args, pinCache })\n },\n cacheStats() {\n return { ...pinCache.stats }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEO,SAAS,UAAU,UAA4B,CAAC,GAAiB;AACtE,QAAM,WAAW,mBAAmB,QAAQ,QAAQ;AACpD,SAAO;AAAA,IACL,SAAS,MAAM;AACb,aAAO,IAAI,QAAQ,EAAE,GAAG,MAAM,SAAS,CAAC;AAAA,IAC1C;AAAA,IACA,aAAa;AACX,aAAO,EAAE,GAAG,SAAS,MAAM;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/via/blob/active.ts"],"sourcesContent":["/**\n * Active blob strategy factory. Calling `blobs()` returns a\n * `BlobStrategy` whose `openSlot` constructs a real `BlobSet` bound\n * to the caller's record. The returned strategy is passed into\n * `createNoydb({ blobStrategy: blobs() })` to light up the\n * `collection.blob(id)` path.\n *\n * This module is only reachable through the `@noy-db/hub/blobs`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { BlobSet } from '../../with-shape/blobs/blob-set.js'\nimport type { BlobStrategy } from '../../port/with/blob-strategy.js'\nimport { createBlobPinCache } from '../../with-shape/blobs/blob-pinning.js'\nimport type { BlobPinStore, BlobCacheStats } from '../../with-shape/blobs/blob-pinning.js'\n\n/** Options for {@link withBlobs} (#808). */\nexport interface WithBlobsOptions {\n /**\n * Device-local backend for the offline-pin registry + external side-cache\n * (`collection.blob(id).pin()`, the `cacheBudget` LRU stamps). Default:\n * in-memory — pins then last one app session. Supply a durable,\n * DEVICE-LOCAL store (IndexedDB-backed on the web; it must never sync) to\n * keep pins across restarts. See `BlobPinStore`'s doc for the posture.\n */\n readonly pinStore?: BlobPinStore\n}\n\n/**\n * The strategy `withBlobs()` returns — a `BlobStrategy` plus the device-local\n * blob-cache KPI surface (#808).\n */\nexport interface BlobsService extends BlobStrategy {\n /**\n * Snapshot of this device's blob-cache KPI counters: local-read hits,\n * network misses, and total bytes downloaded from the object store.\n */\n cacheStats(): BlobCacheStats\n}\n\n/**\n * Build a default `BlobStrategy` ready to pass into `createNoydb`.\n *\n * Named `withBlobs` (plugin-pattern canonical) rather than `blobs` to\n * avoid shadowing the very common local idiom\n * `const blobs = invoices.blob(id)` in user code.\n *\n * One `withBlobs()` instance owns one device-local pin registry + KPI\n * counter set (#808) — treat it as \"this device's\" blob service.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withBlobs } from '@noy-db/hub/blobs'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * blobStrategy: withBlobs(),\n * })\n *\n * // Now live — delegates to BlobSet.\n * const vault = await db.openVault('acme')\n * await vault.collection('invoices').blob('inv-1').put('receipt.pdf', bytes)\n * ```\n */\nexport function withBlobs(options: WithBlobsOptions = {}): BlobsService {\n const pinCache = createBlobPinCache(options.pinStore)\n return {\n openSlot(args) {\n return new BlobSet({ ...args, pinCache })\n },\n cacheStats() {\n return { ...pinCache.stats }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEO,SAAS,UAAU,UAA4B,CAAC,GAAiB;AACtE,QAAM,WAAW,mBAAmB,QAAQ,QAAQ;AACpD,SAAO;AAAA,IACL,SAAS,MAAM;AACb,aAAO,IAAI,QAAQ,EAAE,GAAG,MAAM,SAAS,CAAC;AAAA,IAC1C;AAAA,IACA,aAAa;AACX,aAAO,EAAE,GAAG,SAAS,MAAM;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
@@ -4,14 +4,14 @@ import {
4
4
  import {
5
5
  issueChallenge,
6
6
  verifyBrokerProof
7
- } from "../chunk-GEEJPID6.js";
8
- import "../chunk-SC4JLMZI.js";
7
+ } from "../chunk-MMVQ3SUO.js";
8
+ import "../chunk-KCZAFDP5.js";
9
9
  import "../chunk-5WLDZZ6S.js";
10
10
  import "../chunk-5HSSTOOG.js";
11
11
  import "../chunk-G4MFQXYX.js";
12
12
  import "../chunk-LP7BEXCT.js";
13
13
  import "../chunk-7U6AB7DZ.js";
14
- import "../chunk-YTW6ZIPD.js";
14
+ import "../chunk-DOZFU7OZ.js";
15
15
  import {
16
16
  BrokerEnrolmentError,
17
17
  BrokerNotEnabledError,
@@ -30,7 +30,7 @@ function withBroker(config) {
30
30
  const cache = /* @__PURE__ */ new Map();
31
31
  return {
32
32
  async enroll(ctx) {
33
- const { enrollSeed } = await import("../seed-CDBFOTIK.js");
33
+ const { enrollSeed } = await import("../seed-GVOI6QP6.js");
34
34
  return enrollSeed({ ...ctx, config });
35
35
  },
36
36
  async rotate(ctx) {
@@ -39,7 +39,7 @@ function withBroker(config) {
39
39
  const inFlight = scoped.map(([, e]) => e.inFlight).filter((p) => p !== void 0);
40
40
  await Promise.allSettled(inFlight);
41
41
  for (const [key] of scoped) cache.delete(key);
42
- const { rotateSeed } = await import("../seed-CDBFOTIK.js");
42
+ const { rotateSeed } = await import("../seed-GVOI6QP6.js");
43
43
  return rotateSeed({ ...ctx, config });
44
44
  },
45
45
  credentialSource(ctx, profile) {
@@ -56,7 +56,7 @@ function withBroker(config) {
56
56
  const skewMs = config.skewMs ?? DEFAULT_SKEW_MS;
57
57
  const capturedEntry = entry;
58
58
  const inFlight = (async () => {
59
- const { mintStoreCredentials } = await import("../seed-CDBFOTIK.js");
59
+ const { mintStoreCredentials } = await import("../seed-GVOI6QP6.js");
60
60
  const creds = await mintStoreCredentials({ ...ctx, config }, profile);
61
61
  capturedEntry.cached = { creds, validUntil: cacheFloor(creds, skewMs) };
62
62
  return creds;
@@ -3,62 +3,60 @@ import {
3
3
  createOwnerOnAdoptedPartition,
4
4
  decryptExtractedPartition,
5
5
  describeExtraction,
6
+ diffVault,
6
7
  unsealDeks,
7
8
  withCargo
8
- } from "../chunk-KJTIAECI.js";
9
+ } from "../chunk-V2R2VWER.js";
9
10
  import {
10
11
  CustodyApi,
11
- NO_CARGO
12
- } from "../chunk-L2CAWCQL.js";
12
+ NO_CARGO,
13
+ isQuorum,
14
+ runDrainBarrier
15
+ } from "../chunk-3S2YNMUS.js";
13
16
  import {
14
17
  extractPartition,
15
18
  walkClosure
16
- } from "../chunk-GP54LU5N.js";
19
+ } from "../chunk-LG2GUYRX.js";
17
20
  import {
18
21
  createDeedOwner,
19
22
  isDeedVault,
20
23
  liberateVault,
21
24
  loadDeedMarker
22
- } from "../chunk-V5JUAW4M.js";
23
- import "../chunk-OHV6T5JB.js";
25
+ } from "../chunk-QVIZDLAR.js";
26
+ import "../chunk-6SSWOUUS.js";
24
27
  import {
25
28
  fuseRetrieval
26
29
  } from "../chunk-AURFOK3D.js";
27
- import {
28
- diffVault
29
- } from "../chunk-LB7FD65R.js";
30
- import "../chunk-S4YERMGJ.js";
31
- import "../chunk-K4BWPNJO.js";
32
- import "../chunk-OMSKGLYA.js";
33
- import {
34
- isQuorum,
35
- runDrainBarrier
36
- } from "../chunk-AFAPBZAA.js";
37
- import "../chunk-VEGQYPCP.js";
30
+ import "../chunk-32467U5J.js";
31
+ import "../chunk-MLCTPWSO.js";
32
+ import "../chunk-WWBC4KLB.js";
33
+ import "../chunk-2ZSC454H.js";
38
34
  import {
39
35
  groupAndReduce,
40
36
  reduceRecords
41
- } from "../chunk-QMMOMBH6.js";
37
+ } from "../chunk-HA7P3BTB.js";
38
+ import "../chunk-XZHEOSQ2.js";
39
+ import "../chunk-CADUYBQD.js";
42
40
  import {
43
41
  readPath
44
42
  } from "../chunk-IGJCYUT5.js";
45
- import "../chunk-YCAJDK4O.js";
46
- import "../chunk-YFFEF6HR.js";
47
- import "../chunk-JN3SGXJE.js";
43
+ import "../chunk-E7FSBI6I.js";
44
+ import "../chunk-ZHZ4PET5.js";
45
+ import "../chunk-JOCMXSR2.js";
48
46
  import "../chunk-ZUDAK436.js";
49
- import "../chunk-3LJYHE7S.js";
50
- import "../chunk-6RPWILRH.js";
47
+ import "../chunk-ZDFU34XY.js";
48
+ import "../chunk-7IQWHYL2.js";
51
49
  import "../chunk-LC7DSMHR.js";
52
50
  import {
53
51
  generateULID
54
52
  } from "../chunk-ZJADGNYF.js";
55
53
  import "../chunk-SVLR4POP.js";
56
- import "../chunk-5ATANZSW.js";
54
+ import "../chunk-ICYC5YNI.js";
57
55
  import "../chunk-I7FD46FF.js";
58
56
  import "../chunk-PTT2NB46.js";
59
- import "../chunk-RWW3I3PO.js";
60
- import "../chunk-GEEJPID6.js";
61
- import "../chunk-SC4JLMZI.js";
57
+ import "../chunk-2BVW754E.js";
58
+ import "../chunk-MMVQ3SUO.js";
59
+ import "../chunk-KCZAFDP5.js";
62
60
  import "../chunk-5WLDZZ6S.js";
63
61
  import "../chunk-5HSSTOOG.js";
64
62
  import "../chunk-G4MFQXYX.js";
@@ -66,7 +64,7 @@ import "../chunk-LP7BEXCT.js";
66
64
  import {
67
65
  sha256Hex
68
66
  } from "../chunk-7U6AB7DZ.js";
69
- import "../chunk-YTW6ZIPD.js";
67
+ import "../chunk-DOZFU7OZ.js";
70
68
  import {
71
69
  AdoptionStateError,
72
70
  CargoNotEnabledError,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  envelopeBodyForHash
3
- } from "./chunk-GEEJPID6.js";
3
+ } from "./chunk-MMVQ3SUO.js";
4
4
  import {
5
5
  sha256Hex
6
6
  } from "./chunk-7U6AB7DZ.js";
@@ -67,4 +67,4 @@ export {
67
67
  parseIndex,
68
68
  envelopePayloadHash
69
69
  };
70
- //# sourceMappingURL=chunk-RWW3I3PO.js.map
70
+ //# sourceMappingURL=chunk-2BVW754E.js.map
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  openEnvelopeJson,
11
11
  writeEnvelopeBody
12
- } from "./chunk-GEEJPID6.js";
12
+ } from "./chunk-MMVQ3SUO.js";
13
13
  import {
14
14
  base64ToBuffer,
15
15
  bufferToBase64,
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-7U6AB7DZ.js";
25
25
  import {
26
26
  NOYDB_FORMAT_VERSION
27
- } from "./chunk-YTW6ZIPD.js";
27
+ } from "./chunk-DOZFU7OZ.js";
28
28
  import {
29
29
  BlobIntentPendingError,
30
30
  BlobOfflineError,
@@ -3069,4 +3069,4 @@ export {
3069
3069
  DEFAULT_CHUNK_SIZE,
3070
3070
  BlobSet
3071
3071
  };
3072
- //# sourceMappingURL=chunk-VEGQYPCP.js.map
3072
+ //# sourceMappingURL=chunk-2ZSC454H.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  openEnvelopeJson
3
- } from "./chunk-GEEJPID6.js";
3
+ } from "./chunk-MMVQ3SUO.js";
4
4
  import {
5
5
  encrypt
6
6
  } from "./chunk-7U6AB7DZ.js";
7
7
  import {
8
8
  NOYDB_FORMAT_VERSION
9
- } from "./chunk-YTW6ZIPD.js";
9
+ } from "./chunk-DOZFU7OZ.js";
10
10
 
11
11
  // src/with-shape/persisted-schemas/storage.ts
12
12
  var SCHEMAS_COLLECTION = "_schemas";
@@ -46,4 +46,4 @@ export {
46
46
  loadPersistedSchema,
47
47
  savePersistedSchema
48
48
  };
49
- //# sourceMappingURL=chunk-S4YERMGJ.js.map
49
+ //# sourceMappingURL=chunk-32467U5J.js.map
@@ -5,14 +5,14 @@ import {
5
5
  isRewrappedUnder,
6
6
  openEnvelopeJson,
7
7
  rewrapEnvelope
8
- } from "./chunk-GEEJPID6.js";
8
+ } from "./chunk-MMVQ3SUO.js";
9
9
  import {
10
10
  isTombstone,
11
11
  isTombstoneShape
12
- } from "./chunk-SC4JLMZI.js";
12
+ } from "./chunk-KCZAFDP5.js";
13
13
  import {
14
14
  NOYDB_FORMAT_VERSION
15
- } from "./chunk-YTW6ZIPD.js";
15
+ } from "./chunk-DOZFU7OZ.js";
16
16
  import {
17
17
  ReadOnlyAtInstantError
18
18
  } from "./chunk-6SYOHUHM.js";
@@ -330,4 +330,4 @@ export {
330
330
  VaultInstant,
331
331
  CollectionInstant
332
332
  };
333
- //# sourceMappingURL=chunk-UVBHM7AK.js.map
333
+ //# sourceMappingURL=chunk-3GXDB3NQ.js.map
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  grant,
3
3
  revoke
4
- } from "./chunk-3LJYHE7S.js";
4
+ } from "./chunk-ZDFU34XY.js";
5
5
  import {
6
6
  CargoNotEnabledError,
7
- CustodyNotEnabledError
7
+ CustodyNotEnabledError,
8
+ QuiesceTimeoutError
8
9
  } from "./chunk-6SYOHUHM.js";
9
10
 
10
11
  // src/with-cargo/strategy.ts
@@ -37,7 +38,7 @@ function withCustody() {
37
38
  return host._revokeCustodianImpl(revoke, vault, options, factors);
38
39
  },
39
40
  async liberate(vault, opts) {
40
- const { liberateVault } = await import("./liberate-ZP7UB57K.js");
41
+ const { liberateVault } = await import("./liberate-NHTCKBU4.js");
41
42
  return liberateVault(vault, opts);
42
43
  }
43
44
  };
@@ -77,10 +78,57 @@ var CustodyApi = class {
77
78
  }
78
79
  };
79
80
 
81
+ // src/port/by/types.ts
82
+ function isQuorum(writers, generation, excludeWriterId) {
83
+ return writers.filter((w) => w.writerId !== excludeWriterId).every((w) => w.quiescedAtVersion === generation);
84
+ }
85
+ async function runDrainBarrier(provider, o, run) {
86
+ await provider.setFence(o.vault, { currentSchemaVersion: o.generation, fenceState: "draining" });
87
+ await o.onFlush();
88
+ const deadline = o.now() + o.quiesceTimeoutMs;
89
+ const seeded = await provider.reachableWriters(o.vault, { staleMs: o.staleMs, now: o.now() });
90
+ if (!isQuorum(seeded, o.generation, o.writerId)) {
91
+ await new Promise((resolve, reject) => {
92
+ let settled = false;
93
+ const finish = (fn) => {
94
+ if (!settled) {
95
+ settled = true;
96
+ unsub();
97
+ fn();
98
+ }
99
+ };
100
+ const unsub = provider.observePresence(o.vault, (writers) => {
101
+ if (isQuorum(writers, o.generation, o.writerId)) finish(resolve);
102
+ });
103
+ const tick = async () => {
104
+ if (settled) return;
105
+ if (o.now() >= deadline) {
106
+ finish(
107
+ () => reject(
108
+ new QuiesceTimeoutError(
109
+ `Cutover of vault "${o.vault}" to generation ${o.generation} timed out after ${o.quiesceTimeoutMs}ms waiting for active writers to quiesce.`
110
+ )
111
+ )
112
+ );
113
+ return;
114
+ }
115
+ if (o.onPoll) await o.onPoll();
116
+ const w = await provider.reachableWriters(o.vault, { staleMs: o.staleMs, now: o.now() });
117
+ if (isQuorum(w, o.generation, o.writerId)) finish(resolve);
118
+ else setTimeout(() => void tick(), 25);
119
+ };
120
+ void tick();
121
+ });
122
+ }
123
+ await run();
124
+ }
125
+
80
126
  export {
81
127
  NO_CARGO,
82
128
  NO_CUSTODY,
83
129
  withCustody,
84
- CustodyApi
130
+ CustodyApi,
131
+ isQuorum,
132
+ runDrainBarrier
85
133
  };
86
- //# sourceMappingURL=chunk-L2CAWCQL.js.map
134
+ //# sourceMappingURL=chunk-3S2YNMUS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-cargo/strategy.ts","../src/with-party/custody/strategy.ts","../src/with-party/custody/active.ts","../src/with-party/custody/index.ts","../src/port/by/types.ts"],"sourcesContent":["/**\n * Cargo capability strategy (FR-6/FR-7) — the source-side, owner-level\n * partition operation that requires a live {@link Vault}: extracting a re-keyed\n * transfer-sealed partition ({@link extractPartitionCore}). The active engine\n * ({@link withCargo}) dynamically imports that engine (keeping the extraction\n * crypto out of the floor bundle); {@link NO_CARGO} throws.\n *\n * The public free function `extractPartition` (which takes a `Vault`) delegates\n * here via `vault.cargoStrategy`, so an un-opted-in caller hits `NO_CARGO`'s\n * throw.\n *\n * Carve-out (mirrors `openSealedRecord` / `liberateVault`): the recipient-side\n * free functions `adoptPartition` and `decryptExtractedPartition` operate on\n * raw bundle bytes + a destination store — they carry NO source instance to\n * gate against, so they stay ungated host-side tooling. `diffVault` is likewise\n * ungated: it's shared import/merge infrastructure the `as-*` exporters call\n * internally, not a gated cargo capability.\n * @internal\n */\nimport type { Vault } from '../kernel/vault.js'\nimport type { ExtractPartitionResult, ExtractPartitionOptions } from './extract-partition.js'\nimport { CargoNotEnabledError } from '../kernel/errors.js'\n\nexport interface CargoStrategy {\n extractPartition(vault: Vault, opts: ExtractPartitionOptions): Promise<ExtractPartitionResult>\n}\n\n/**\n * No-op stub — the floor default. The source-side cargo op throws\n * {@link CargoNotEnabledError}; opt in with `cargoStrategy: withCargo()` in\n * createNoydb. @internal\n */\nexport const NO_CARGO: CargoStrategy = {\n async extractPartition() { throw new CargoNotEnabledError() },\n}\n","/**\n * Sovereign-custody (FR-6) capability strategy — the three on-demand\n * operations the custody surface routes through: minting a custodian\n * (`grantCustodian`), removing one (`revokeCustodian`), and the audited\n * ownership-claim ceremony (`liberate`). The active engine ({@link withCustody})\n * runs the grant/revoke impls the host exposes and dynamically imports the\n * heavy `liberateVault` ceremony (keeping it out of the floor bundle);\n * {@link NO_CUSTODY} throws.\n *\n * `Noydb.grantCustodian` / `Noydb.revokeCustodian` delegate here (passing\n * themselves as the {@link CustodyHost}), and `vault.custody.liberate` delegates\n * here with its {@link Vault}. An un-opted-in caller hits `NO_CUSTODY`'s throw.\n *\n * Note: the lower-level `liberateVault` FREE FUNCTION (exported from\n * `custody/liberate.ts`) stays ungated — it has no `createNoydb` instance to\n * gate against (the same carve-out as the `openSealedRecord` host opener). Only\n * the instance surfaces (`db.grantCustodian` / `db.revokeCustodian` /\n * `vault.custody.*`) are the capability.\n * @internal\n */\nimport type { GrantOptions, RevokeOptions, FactorProofBundle, NoydbStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { UnlockedKeyring } from '../team/keyring.js'\nimport type { GrantCustodianOptions } from './index.js'\nimport type { LiberateOptions, LiberateResult } from './liberate.js'\nimport { CustodyNotEnabledError } from '../../kernel/errors.js'\n\n/**\n * The grant/revoke engine the strategy runs when opted in — implemented by\n * `Noydb` (`_grantCustodianImpl` / `_revokeCustodianImpl` hold the gate +\n * keyring logic; the public `grantCustodian` / `revokeCustodian` route through\n * the strategy). Since the #267 team split the keyring grant/revoke engines\n * are passed IN by `withCustody()` (statically linked there, not in the\n * kernel) so the single-user floor never carries them.\n */\nexport interface CustodyHost {\n _grantCustodianImpl(\n engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: GrantOptions) => Promise<void>,\n vault: string,\n options: GrantCustodianOptions,\n factors?: FactorProofBundle,\n ): Promise<void>\n _revokeCustodianImpl(\n engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<void>,\n vault: string,\n options: RevokeOptions,\n factors?: FactorProofBundle,\n ): Promise<void>\n}\n\nexport interface CustodyStrategy {\n grantCustodian(host: CustodyHost, vault: string, options: GrantCustodianOptions, factors?: FactorProofBundle): Promise<void>\n revokeCustodian(host: CustodyHost, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>\n liberate(vault: Vault, opts: LiberateOptions): Promise<LiberateResult>\n}\n\n/**\n * No-op stub — the floor default. Every custody operation throws\n * {@link CustodyNotEnabledError}; opt in with `custodyStrategy: withCustody()`\n * in createNoydb. @internal\n */\nexport const NO_CUSTODY: CustodyStrategy = {\n async grantCustodian() { throw new CustodyNotEnabledError() },\n async revokeCustodian() { throw new CustodyNotEnabledError() },\n async liberate() { throw new CustodyNotEnabledError() },\n}\n","/**\n * Enable the sovereign-custody (FR-6) capability.\n * Pass to `createNoydb({ custodyStrategy: withCustody() })` to make\n * `db.grantCustodian` / `db.revokeCustodian` (and the `vault.custody.*` facade\n * that delegates to them) plus `vault.custody.liberate()` live. The heavy\n * `liberateVault` ceremony is dynamically imported here, so it is reached only\n * via opt-in; grant/revoke run the host's own gate + keyring engine.\n */\nimport type { CustodyStrategy } from './strategy.js'\nimport { grant as grantEngine, revoke as revokeEngine } from '../team/keyring.js'\n\nexport function withCustody(): CustodyStrategy {\n return {\n async grantCustodian(host, vault, options, factors) {\n return host._grantCustodianImpl(grantEngine, vault, options, factors)\n },\n async revokeCustodian(host, vault, options, factors) {\n return host._revokeCustodianImpl(revokeEngine, vault, options, factors)\n },\n async liberate(vault, opts) {\n const { liberateVault } = await import('./liberate.js')\n return liberateVault(vault, opts)\n },\n }\n}\n","/**\n * Public `vault.custody.*` API surface (FR-6).\n *\n * The custody namespace is the vault-instance face of the FR-6 sovereign-custody\n * model — it mirrors `vault.user.*` exactly: a thin delegation shell with NO\n * business logic. The Vault constructs one `CustodyApi` per session, injecting\n * closures that bind the vault name / keyring into the genuinely-core\n * implementations (`Noydb.grantCustodian` / `Noydb.revokeCustodian` and the\n * `liberateVault` ceremony). Each method just forwards to its injected callback.\n *\n * Three operations:\n * - `grantCustodian(opts)` — owner-only: mint a `custodian` who operates the\n * vault fully but can never grant / rotate / sever / extract.\n * - `revokeCustodian(opts)` — owner-only: remove a custodian.\n * - `liberate(opts)` — custodian-only: audited claim of ownership over a\n * sealed-owner (Deed) vault (mints a DISTINCT new owner; ledger-audited).\n *\n * Provisioning a Deed (`createDeedOwner`) is deliberately NOT on this class: it\n * is a store-level operation that mints the vault's first owner, so there is no\n * vault instance (and thus no custody namespace) yet — it stays the exported\n * `team/deed.ts` function.\n *\n * @see docs/superpowers/specs/2026-06-17-fr6-deed-custodian-liberate-design.md\n * @module\n */\nimport type { GrantOptions, RevokeOptions, FactorProofBundle } from '../../kernel/types.js'\nimport type { LiberateOptions, LiberateResult } from './liberate.js'\n\n/** Options for `vault.custody.grantCustodian` — a grant with the role fixed to `custodian`. */\nexport type GrantCustodianOptions = Omit<GrantOptions, 'role'>\n\n// Capability opt-in seam (S4): grant/revoke custodian + liberate throw\n// CustodyNotEnabledError unless `custodyStrategy: withCustody()` is opted in.\nexport { withCustody } from './active.js'\nexport { NO_CUSTODY, type CustodyStrategy, type CustodyHost } from './strategy.js'\nexport { CustodyNotEnabledError } from '../../kernel/errors.js'\n\n/**\n * Implementation behind `vault.custody`. Constructed once per Vault. Holds the\n * injected, vault-bound implementations in closure; every method delegates with\n * no added logic (the owner-only / custodian-only / gate checks all live in the\n * injected implementations — `Noydb.grantCustodian` etc. and `liberateVault`).\n */\nexport class CustodyApi {\n constructor(\n /** Bound `Noydb.grantCustodian(this.name, ...)` — owner-only, gated. */\n private readonly _grantCustodian: (options: GrantCustodianOptions, factors?: FactorProofBundle) => Promise<void>,\n /** Bound `Noydb.revokeCustodian(this.name, ...)` — owner-only, gated. */\n private readonly _revokeCustodian: (options: RevokeOptions, factors?: FactorProofBundle) => Promise<void>,\n /** Bound `liberateVault(this, ...)` — custodian-only audited ownership claim. */\n private readonly _liberate: (opts: LiberateOptions) => Promise<LiberateResult>,\n ) {}\n\n /**\n * Owner-only: grant the FR-6 `custodian` role. The custodian operates every\n * collection (rw + access) but is provably unable to grant / revoke / rotate /\n * extract-and-sever. Defended in depth (gate + owner-only role check) inside\n * the injected `Noydb.grantCustodian`.\n */\n async grantCustodian(options: GrantCustodianOptions, factors?: FactorProofBundle): Promise<void> {\n return this._grantCustodian(options, factors)\n }\n\n /** Owner-only: revoke a custodian. */\n async revokeCustodian(options: RevokeOptions, factors?: FactorProofBundle): Promise<void> {\n return this._revokeCustodian(options, factors)\n }\n\n /**\n * Custodian-only: the audited claim of ownership over a sealed-owner (Deed)\n * vault. Mints a DISTINCT new owner re-wrapping the incumbent DEKs under a\n * fresh KEK (the latent owner is never impersonated), ledger-audited. See\n * {@link liberateVault}.\n */\n async liberate(opts: LiberateOptions): Promise<LiberateResult> {\n return this._liberate(opts)\n }\n}\n","/**\n * Kernel coordination port — the injected `CoordinationProvider` seam for the\n * schema-fence drain-barrier.\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 '../../kernel/errors.js'\nimport type { Unsubscribe } from '../with/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"],"mappings":";;;;;;;;;;;AAgCO,IAAM,WAA0B;AAAA,EACrC,MAAM,mBAAmB;AAAE,UAAM,IAAI,qBAAqB;AAAA,EAAE;AAC9D;;;AC2BO,IAAM,aAA8B;AAAA,EACzC,MAAM,iBAAiB;AAAE,UAAM,IAAI,uBAAuB;AAAA,EAAE;AAAA,EAC5D,MAAM,kBAAkB;AAAE,UAAM,IAAI,uBAAuB;AAAA,EAAE;AAAA,EAC7D,MAAM,WAAW;AAAE,UAAM,IAAI,uBAAuB;AAAA,EAAE;AACxD;;;ACtDO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL,MAAM,eAAe,MAAM,OAAO,SAAS,SAAS;AAClD,aAAO,KAAK,oBAAoB,OAAa,OAAO,SAAS,OAAO;AAAA,IACtE;AAAA,IACA,MAAM,gBAAgB,MAAM,OAAO,SAAS,SAAS;AACnD,aAAO,KAAK,qBAAqB,QAAc,OAAO,SAAS,OAAO;AAAA,IACxE;AAAA,IACA,MAAM,SAAS,OAAO,MAAM;AAC1B,YAAM,EAAE,cAAc,IAAI,MAAM,OAAO,wBAAe;AACtD,aAAO,cAAc,OAAO,IAAI;AAAA,IAClC;AAAA,EACF;AACF;;;ACmBO,IAAM,aAAN,MAAiB;AAAA,EACtB,YAEmB,iBAEA,kBAEA,WACjB;AALiB;AAEA;AAEA;AAAA,EAChB;AAAA,EALgB;AAAA,EAEA;AAAA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASnB,MAAM,eAAe,SAAgC,SAA4C;AAC/F,WAAO,KAAK,gBAAgB,SAAS,OAAO;AAAA,EAC9C;AAAA;AAAA,EAGA,MAAM,gBAAgB,SAAwB,SAA4C;AACxF,WAAO,KAAK,iBAAiB,SAAS,OAAO;AAAA,EAC/C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,SAAS,MAAgD;AAC7D,WAAO,KAAK,UAAU,IAAI;AAAA,EAC5B;AACF;;;ACZO,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,EAAE,IAAI,EAAE,CAAC;AAC5F,MAAI,CAAC,SAAS,QAAQ,EAAE,YAAY,EAAE,QAAQ,GAAG;AAC/C,UAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AAC3C,UAAI,UAAU;AACd,YAAM,SAAS,CAAC,OAAmB;AACjC,YAAI,CAAC,SAAS;AACZ,oBAAU;AACV,gBAAM;AACN,aAAG;AAAA,QACL;AAAA,MACF;AACA,YAAM,QAAQ,SAAS,gBAAgB,EAAE,OAAO,CAAC,YAAY;AAC3D,YAAI,SAAS,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAG,QAAO,OAAO;AAAA,MACjE,CAAC;AACD,YAAM,OAAO,YAAY;AACvB,YAAI,QAAS;AACb,YAAI,EAAE,IAAI,KAAK,UAAU;AACvB;AAAA,YAAO,MACL;AAAA,cACE,IAAI;AAAA,gBACF,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,UAAU,oBAChD,EAAE,gBAAgB;AAAA,cAC/B;AAAA,YACF;AAAA,UACF;AACA;AAAA,QACF;AACA,YAAI,EAAE,OAAQ,OAAM,EAAE,OAAO;AAC7B,cAAM,IAAI,MAAM,SAAS,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,KAAK,EAAE,IAAI,EAAE,CAAC;AACvF,YAAI,SAAS,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAG,QAAO,OAAO;AAAA,YACpD,YAAW,MAAM,KAAK,KAAK,GAAG,EAAE;AAAA,MACvC;AACA,WAAK,KAAK;AAAA,IACZ,CAAC;AAAA,EACH;AACA,QAAM,IAAI;AACZ;","names":[]}
@@ -5,7 +5,7 @@ import {
5
5
  getAtPath,
6
6
  isStaticDictDescriptor,
7
7
  stripI18nFilled
8
- } from "./chunk-JN3SGXJE.js";
8
+ } from "./chunk-JOCMXSR2.js";
9
9
  import {
10
10
  liveRecordIsElevated
11
11
  } from "./chunk-PTT2NB46.js";
@@ -376,31 +376,31 @@ function buildBlobFieldEntries(filenamesByField) {
376
376
  function withSearch() {
377
377
  return {
378
378
  async search(ctx, field, query, opts) {
379
- const { search: search2 } = await import("./collection-facade-XKCFHSLR.js");
379
+ const { search: search2 } = await import("./collection-facade-S5PPKZD5.js");
380
380
  return search2(ctx, field, query, opts);
381
381
  },
382
382
  async retrieve(ctx, query, opts) {
383
- const { retrieve: retrieve2 } = await import("./collection-facade-XKCFHSLR.js");
383
+ const { retrieve: retrieve2 } = await import("./collection-facade-S5PPKZD5.js");
384
384
  return retrieve2(ctx, query, opts);
385
385
  },
386
386
  async similarTo(ctx, vector, opts) {
387
- const { similarTo: similarTo2 } = await import("./collection-facade-XKCFHSLR.js");
387
+ const { similarTo: similarTo2 } = await import("./collection-facade-S5PPKZD5.js");
388
388
  return similarTo2(ctx, vector, opts);
389
389
  },
390
390
  async warmIndex(ctx) {
391
- const { warmIndex: warmIndex2 } = await import("./collection-facade-XKCFHSLR.js");
391
+ const { warmIndex: warmIndex2 } = await import("./collection-facade-S5PPKZD5.js");
392
392
  return warmIndex2(ctx);
393
393
  },
394
394
  async flushIndex(ctx) {
395
- const { flushIndex: flushIndex2 } = await import("./collection-facade-XKCFHSLR.js");
395
+ const { flushIndex: flushIndex2 } = await import("./collection-facade-S5PPKZD5.js");
396
396
  return flushIndex2(ctx);
397
397
  },
398
398
  async embedOnWrite(ctx, id, record, version) {
399
- const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-XKCFHSLR.js");
399
+ const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-S5PPKZD5.js");
400
400
  return embedOnWrite2(ctx, id, record, version);
401
401
  },
402
402
  async rebuildEmbeddings(ctx) {
403
- const { rebuildEmbeddings: rebuildEmbeddings2 } = await import("./collection-facade-XKCFHSLR.js");
403
+ const { rebuildEmbeddings: rebuildEmbeddings2 } = await import("./collection-facade-S5PPKZD5.js");
404
404
  return rebuildEmbeddings2(ctx);
405
405
  }
406
406
  };
@@ -736,4 +736,4 @@ export {
736
736
  rebuildEmbeddings,
737
737
  syncTierSearch
738
738
  };
739
- //# sourceMappingURL=chunk-HAPY7WFP.js.map
739
+ //# sourceMappingURL=chunk-3TZUC4WS.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NOYDB_FORMAT_VERSION
3
- } from "./chunk-YTW6ZIPD.js";
3
+ } from "./chunk-DOZFU7OZ.js";
4
4
 
5
5
  // src/with-shape/schema-update/fence.ts
6
6
  var FENCE_RECORD_ID = "schema-fence";
@@ -37,4 +37,4 @@ export {
37
37
  loadFence,
38
38
  saveFence
39
39
  };
40
- //# sourceMappingURL=chunk-M6QA2KK2.js.map
40
+ //# sourceMappingURL=chunk-44Y3P5U6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  linkI18nVia
3
- } from "./chunk-JN3SGXJE.js";
3
+ } from "./chunk-JOCMXSR2.js";
4
4
 
5
5
  // src/via/i18n/dictionary.ts
6
6
  function dictKey(name, keysOrMap, opts) {
@@ -71,4 +71,4 @@ export {
71
71
  dictKey,
72
72
  staticDict
73
73
  };
74
- //# sourceMappingURL=chunk-WQN5SM7P.js.map
74
+ //# sourceMappingURL=chunk-4B3DL75F.js.map