@noy-db/hub 0.3.0-pre.5 → 0.3.0-pre.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/dist/adapter/index.d.ts +1 -1
  2. package/dist/adapter/index.js +1 -1
  3. package/dist/aggregate/index.d.ts +2 -2
  4. package/dist/aggregate/index.js +4 -4
  5. package/dist/api-Z66JMGOU.js +20 -0
  6. package/dist/as/index.d.ts +3 -3
  7. package/dist/as/index.js +11 -11
  8. package/dist/at/index.d.ts +1 -1
  9. package/dist/attestation/index.d.ts +2 -2
  10. package/dist/attestation/index.js +18 -18
  11. package/dist/{backup-OPONO6Q5.js → backup-7PX6NDKT.js} +11 -11
  12. package/dist/blobs/index.d.ts +3 -3
  13. package/dist/blobs/index.js +10 -10
  14. package/dist/bundle/index.d.ts +4 -4
  15. package/dist/bundle/index.js +20 -20
  16. package/dist/{bundle-Bs13EZtX.d.ts → bundle-BN_VSq5L.d.ts} +1 -1
  17. package/dist/by/index.js +2 -2
  18. package/dist/cargo/index.d.ts +3 -3
  19. package/dist/cargo/index.js +22 -22
  20. package/dist/{chunk-BMQOH7MM.js → chunk-26FSVNBL.js} +2 -2
  21. package/dist/{chunk-6UOSONVI.js → chunk-2L7PPF2C.js} +9 -9
  22. package/dist/{chunk-TB5RNNJ4.js → chunk-3CHNKEFI.js} +5 -5
  23. package/dist/{chunk-AF5ZRTZ4.js → chunk-47C4CI7R.js} +2 -2
  24. package/dist/{chunk-ULIHDPKL.js → chunk-55LSDABW.js} +2 -2
  25. package/dist/{chunk-P5WXDYMD.js → chunk-5GQE5IDB.js} +4 -4
  26. package/dist/{chunk-TLJOJBZD.js → chunk-5HZULLHE.js} +2 -2
  27. package/dist/chunk-5JQMX2EH.js +50 -0
  28. package/dist/chunk-5JQMX2EH.js.map +1 -0
  29. package/dist/{chunk-IEUIUSBO.js → chunk-5K7KZMXG.js} +654 -101
  30. package/dist/chunk-5K7KZMXG.js.map +1 -0
  31. package/dist/{chunk-PGFY7IRW.js → chunk-5UOPIPZC.js} +3 -3
  32. package/dist/{chunk-GQOT6QJR.js → chunk-62TTFKU4.js} +6 -6
  33. package/dist/{chunk-ZKF6HH7V.js → chunk-6P5AJ2ZS.js} +2 -2
  34. package/dist/{chunk-QNTEDPWP.js → chunk-6PALJTC2.js} +3 -3
  35. package/dist/{chunk-GBTUANXF.js → chunk-6Z435B6N.js} +5 -5
  36. package/dist/{chunk-SAJJWVNQ.js → chunk-7AERMJP6.js} +38 -6
  37. package/dist/chunk-7AERMJP6.js.map +1 -0
  38. package/dist/{chunk-XYYW64LB.js → chunk-7CZ6YXMO.js} +2 -2
  39. package/dist/{chunk-TL7QR5T6.js → chunk-7F2P2NHX.js} +4 -4
  40. package/dist/{chunk-RDHAGBEB.js → chunk-7KTL4RHZ.js} +3 -3
  41. package/dist/{chunk-ZKYMKF2S.js → chunk-7L6EH6S7.js} +6 -6
  42. package/dist/{chunk-NQVZB3S7.js → chunk-AG2PLGQ2.js} +6 -6
  43. package/dist/{chunk-G4MGYGSS.js → chunk-AZPGB4OD.js} +6 -6
  44. package/dist/{chunk-4K3MQ5S3.js → chunk-BASCPHNM.js} +2 -2
  45. package/dist/{chunk-BKGIWGCX.js → chunk-C4NOLA5X.js} +2 -2
  46. package/dist/{chunk-SW56GSYC.js → chunk-CHK5VVMI.js} +2 -2
  47. package/dist/{chunk-EWR7HL3K.js → chunk-CND5WQLO.js} +30 -5
  48. package/dist/{chunk-EWR7HL3K.js.map → chunk-CND5WQLO.js.map} +1 -1
  49. package/dist/{chunk-A4DWPOP3.js → chunk-CP3GUIAN.js} +10 -10
  50. package/dist/{chunk-TYGW5TOR.js → chunk-DJ4TNF4N.js} +5 -5
  51. package/dist/{chunk-P2LDXRGP.js → chunk-DKGZIX6S.js} +2 -2
  52. package/dist/{chunk-VMJ5URU7.js → chunk-E3LURVGQ.js} +6 -6
  53. package/dist/{chunk-3Y4QLJ6K.js → chunk-EU7HDMT3.js} +2 -2
  54. package/dist/{chunk-T65UZXR6.js → chunk-FCOZ7DEC.js} +3 -3
  55. package/dist/{chunk-M66NAZA4.js → chunk-G5CFMITA.js} +3 -3
  56. package/dist/{chunk-ZT4GWVTX.js → chunk-GMZFHDSG.js} +5 -5
  57. package/dist/chunk-GYGLAVCX.js +19 -0
  58. package/dist/chunk-GYGLAVCX.js.map +1 -0
  59. package/dist/{chunk-OFBFAVLI.js → chunk-H3MPSYCH.js} +215 -56
  60. package/dist/chunk-H3MPSYCH.js.map +1 -0
  61. package/dist/{chunk-VWGCJUTV.js → chunk-H7WQMGXH.js} +2 -2
  62. package/dist/{chunk-7SY3PTED.js → chunk-HBVEGUON.js} +3 -3
  63. package/dist/{chunk-LN22XH4B.js → chunk-HCK2DFEK.js} +1 -1
  64. package/dist/chunk-HCK2DFEK.js.map +1 -0
  65. package/dist/chunk-HGQ6UNHE.js +45 -0
  66. package/dist/chunk-HGQ6UNHE.js.map +1 -0
  67. package/dist/{chunk-GXGK22QU.js → chunk-HU55NPHZ.js} +2 -2
  68. package/dist/{chunk-XJR3COJO.js → chunk-HV3VNAYI.js} +5 -5
  69. package/dist/{chunk-U24XHXNK.js → chunk-I6JJ6VJS.js} +2 -2
  70. package/dist/{chunk-5MRE3C4Q.js → chunk-I6Q7YECW.js} +3 -3
  71. package/dist/{chunk-P27Z66EB.js → chunk-IEKK2XI4.js} +5 -5
  72. package/dist/{chunk-N5YVZHCB.js → chunk-II6DLDZM.js} +2 -2
  73. package/dist/{chunk-Z3FZC5GV.js → chunk-J54DC5IC.js} +5 -5
  74. package/dist/{chunk-OJU3CPFA.js → chunk-J5YDMJHG.js} +9 -9
  75. package/dist/{chunk-OVO2RZAE.js → chunk-JIW3Q5JN.js} +14 -13
  76. package/dist/chunk-JIW3Q5JN.js.map +1 -0
  77. package/dist/{chunk-H5XRIJX3.js → chunk-JT4A6OAJ.js} +5 -5
  78. package/dist/{chunk-S2WKOCTU.js → chunk-K6WHZBCO.js} +2 -2
  79. package/dist/{chunk-Z7KI4WHR.js → chunk-LFGJG4XZ.js} +2 -2
  80. package/dist/{chunk-ZROMNP7Q.js → chunk-MOQ5M46U.js} +2 -2
  81. package/dist/{chunk-T45LAT2Y.js → chunk-NO53W6O5.js} +2 -2
  82. package/dist/{chunk-H7RYPVMJ.js → chunk-OFYY5Q4R.js} +2 -2
  83. package/dist/{chunk-U23JUUPX.js → chunk-OJ64XMPJ.js} +10 -2
  84. package/dist/{chunk-U23JUUPX.js.map → chunk-OJ64XMPJ.js.map} +1 -1
  85. package/dist/{chunk-HMXLN43G.js → chunk-OWGAXPRE.js} +2 -2
  86. package/dist/{chunk-T2EGAXPM.js → chunk-PAJCRV7O.js} +2 -2
  87. package/dist/{chunk-ZBDK7T6X.js → chunk-PE25C4QL.js} +7 -7
  88. package/dist/{chunk-RTS23VIJ.js → chunk-PYIUDUGS.js} +2 -2
  89. package/dist/{chunk-Z5PIUYNB.js → chunk-QAVFI23O.js} +6 -6
  90. package/dist/{chunk-VFRNWE5P.js → chunk-QYNBPDGO.js} +6 -6
  91. package/dist/{chunk-6HNKCKFZ.js → chunk-RHB7BOEO.js} +5 -5
  92. package/dist/{chunk-6RXPSMKR.js → chunk-RNYDHIQL.js} +3 -3
  93. package/dist/{chunk-PI5CG2OV.js → chunk-RUWEHFRB.js} +4 -4
  94. package/dist/{chunk-3QRQOBS7.js → chunk-T4NQMPBN.js} +3 -3
  95. package/dist/{chunk-VPCMJ5Z4.js → chunk-U5IJHUHZ.js} +5 -5
  96. package/dist/{chunk-43ISXURO.js → chunk-U7LV2DUN.js} +2 -2
  97. package/dist/{chunk-FH52CDEW.js → chunk-UB3XHGFG.js} +5 -5
  98. package/dist/{chunk-HBKDR7R3.js → chunk-UJJJPKJO.js} +3 -3
  99. package/dist/{chunk-TCIUO62Z.js → chunk-UWZ7O4NR.js} +2 -2
  100. package/dist/{chunk-P3NGV5RV.js → chunk-V76PHWLE.js} +2 -2
  101. package/dist/{chunk-A5DYVMDR.js → chunk-VFG5YXWM.js} +3 -3
  102. package/dist/{chunk-UOEWDCUX.js → chunk-VFQOE76I.js} +2 -2
  103. package/dist/{chunk-VRPBEOWU.js → chunk-VIWOGJ2O.js} +2 -2
  104. package/dist/{chunk-5EWYUR5P.js → chunk-VK6OC22R.js} +2 -2
  105. package/dist/{chunk-O2DB4C3M.js → chunk-VMRXI3IF.js} +4 -4
  106. package/dist/{chunk-LPRPVCNY.js → chunk-VUHXLL32.js} +3 -3
  107. package/dist/{chunk-44UTIDE2.js → chunk-WFBZRXS5.js} +7 -7
  108. package/dist/{chunk-LEA7WJEZ.js → chunk-WGH3YV6Y.js} +8 -8
  109. package/dist/{chunk-HY6ZGGEC.js → chunk-WJEMUO32.js} +2 -2
  110. package/dist/{chunk-YFF2RP3X.js → chunk-WRLPV6SI.js} +2 -2
  111. package/dist/{chunk-G7RDYYTE.js → chunk-XW5LZYV4.js} +2 -2
  112. package/dist/{chunk-OPTFANOX.js → chunk-YSJG4L4A.js} +3 -3
  113. package/dist/{chunk-GZZL5R73.js → chunk-YSU2E4GZ.js} +4 -4
  114. package/dist/{chunk-LIP6JWYK.js → chunk-YTCCC6NG.js} +3 -3
  115. package/dist/classified/index.d.ts +3 -3
  116. package/dist/classified/index.js +3 -3
  117. package/dist/collection-facade-JP6N7USE.js +39 -0
  118. package/dist/{computed-BMMEFRFJ.js → computed-6FOFXQPE.js} +3 -3
  119. package/dist/{config-drift-3UIJVI5G.js → config-drift-LRKCC3VZ.js} +3 -3
  120. package/dist/consent/index.d.ts +2 -2
  121. package/dist/consent/index.js +9 -9
  122. package/dist/crdt/index.d.ts +2 -2
  123. package/dist/dead-filter-NZORV45S.js +28 -0
  124. package/dist/dead-filter-NZORV45S.js.map +1 -0
  125. package/dist/delegation-FDOXXHNG.js +25 -0
  126. package/dist/derivations/index.d.ts +3 -3
  127. package/dist/derivations/index.js +11 -11
  128. package/dist/derive-JR2C5JFG.js +21 -0
  129. package/dist/{dev-unlock-Cqd5Xv5J.d.ts → dev-unlock-CsOqX7O2.d.ts} +1 -1
  130. package/dist/{enclave-YN6223OG.js → enclave-7X5BUAMS.js} +16 -10
  131. package/dist/executor-6LHOV7MN.js +21 -0
  132. package/dist/executor-EUPYHCLU.js +9 -0
  133. package/dist/executor-KZ4B3PRT.js +9 -0
  134. package/dist/export-accessible-7XLSZBGJ.js +23 -0
  135. package/dist/extract-partition-RM6EROS5.js +36 -0
  136. package/dist/{fanout-sidecar-WS22Q5WH.js → fanout-sidecar-BDKLP5GG.js} +9 -9
  137. package/dist/find-OH4BEULF.js +11 -0
  138. package/dist/forget/index.js +9 -9
  139. package/dist/guards/index.d.ts +3 -3
  140. package/dist/guards/index.js +6 -6
  141. package/dist/{hash-D8Q5MJLA.d.ts → hash-BPzm02Za.d.ts} +1 -1
  142. package/dist/history/index.d.ts +3 -3
  143. package/dist/history/index.js +11 -11
  144. package/dist/i18n/index.d.ts +2 -2
  145. package/dist/i18n/index.js +13 -13
  146. package/dist/in/index.d.ts +1 -1
  147. package/dist/{index-D4GQe1Rx.d.ts → index-BJ3L-XcV.d.ts} +169 -4
  148. package/dist/{index-DRxk8q_7.d.ts → index-CLucFLeN.d.ts} +2 -2
  149. package/dist/index.d.ts +13 -13
  150. package/dist/index.js +118 -116
  151. package/dist/index.js.map +1 -1
  152. package/dist/indexing/index.d.ts +2 -2
  153. package/dist/indexing/index.js +4 -4
  154. package/dist/issue-FJE2IHUI.js +19 -0
  155. package/dist/kernel/index.d.ts +2 -2
  156. package/dist/kernel/index.js +12 -12
  157. package/dist/lazy/index.d.ts +2 -2
  158. package/dist/{ledger-KZWBKAG5.js → ledger-EMDHRJJN.js} +11 -11
  159. package/dist/liberate-HFIPHJGR.js +24 -0
  160. package/dist/{link-set-UQEIYQAM.js → link-set-62Y36TOG.js} +11 -11
  161. package/dist/materialized-views/index.d.ts +3 -3
  162. package/dist/materialized-views/index.js +15 -15
  163. package/dist/{mime-magic-DmwT7OzZ.d.ts → mime-magic-BlE9fzn2.d.ts} +1 -1
  164. package/dist/noydb-4ZASGII5.js +62 -0
  165. package/dist/on/index.d.ts +1 -1
  166. package/dist/on/index.js +9 -9
  167. package/dist/overlay-views/index.d.ts +3 -3
  168. package/dist/overlay-views/index.js +4 -4
  169. package/dist/periods/index.d.ts +2 -2
  170. package/dist/periods/index.js +12 -12
  171. package/dist/pod/index.d.ts +2 -2
  172. package/dist/pod/index.js +11 -11
  173. package/dist/{policy-YIKUH4AD.js → policy-SXPLTQS4.js} +5 -5
  174. package/dist/portability/index.d.ts +2 -2
  175. package/dist/portability/index.js +8 -8
  176. package/dist/post-register-DCJ2SRVG.js +55 -0
  177. package/dist/post-register-DCJ2SRVG.js.map +1 -0
  178. package/dist/{public-envelope-MRN5YYZZ.js → public-envelope-CBRIJORQ.js} +4 -4
  179. package/dist/query/index.d.ts +1 -1
  180. package/dist/query/index.js +6 -6
  181. package/dist/register-5NRE7HBZ.js +23 -0
  182. package/dist/registry-5QLETK3Q.js +17 -0
  183. package/dist/registry-DYTNLOJC.js +19 -0
  184. package/dist/registry-HSNQ4NBP.js +9 -0
  185. package/dist/request-withdrawal-5APB7RKN.js +31 -0
  186. package/dist/{reveal-TBLTFWQ2.js → reveal-R5N7JKA5.js} +6 -6
  187. package/dist/revoke-VELFCK7S.js +24 -0
  188. package/dist/satellites/index.d.ts +5 -0
  189. package/dist/satellites/index.js +8 -0
  190. package/dist/sealed-record/index.d.ts +2 -2
  191. package/dist/sealed-record/index.js +12 -12
  192. package/dist/session/index.d.ts +3 -3
  193. package/dist/session/index.js +9 -9
  194. package/dist/shadow/index.d.ts +2 -2
  195. package/dist/shadow/index.js +2 -2
  196. package/dist/signer-IVU3B6DP.js +25 -0
  197. package/dist/snapshots/index.d.ts +2 -2
  198. package/dist/snapshots/index.js +10 -10
  199. package/dist/{stale-7Q62KVI3.js → stale-DP66HFT3.js} +2 -2
  200. package/dist/storage-RH5VBLLL.js +23 -0
  201. package/dist/storage-RH5VBLLL.js.map +1 -0
  202. package/dist/{store-coordination-provider-JJCEMTAE.js → store-coordination-provider-F5N5ASDF.js} +3 -3
  203. package/dist/sync/index.d.ts +1 -1
  204. package/dist/sync/index.js +9 -9
  205. package/dist/team/index.d.ts +2 -2
  206. package/dist/team/index.js +15 -15
  207. package/dist/tiers/index.d.ts +1 -1
  208. package/dist/tiers/index.js +10 -10
  209. package/dist/to/index.d.ts +1 -1
  210. package/dist/to/index.js +1 -1
  211. package/dist/{transition-guard-C4hvR-Ac.d.ts → transition-guard-BzsAQEd-.d.ts} +1 -1
  212. package/dist/tx/index.d.ts +2 -2
  213. package/dist/tx/index.js +3 -3
  214. package/dist/util/index.js +1 -1
  215. package/dist/{validators-Ctgkj5qd.d.ts → validators-DGmYFP51.d.ts} +1 -1
  216. package/dist/{vault-diff-B1Ir6EGs.d.ts → vault-diff-DmBBatkx.d.ts} +1 -1
  217. package/dist/{verify-YB5LQHNA.js → verify-CAYGXYNO.js} +5 -5
  218. package/dist/{walk-T65TZDN2.js → walk-3SB25HF2.js} +11 -11
  219. package/dist/with/index.d.ts +2 -2
  220. package/dist/with/index.js +11 -11
  221. package/dist/{with-materialized-view-Bp65kKdQ.d.ts → with-materialized-view-DPEVoGoB.d.ts} +1 -1
  222. package/dist/{with-overlayed-view-BRhdQNrK.d.ts → with-overlayed-view-DGpKFSv1.d.ts} +1 -1
  223. package/dist/{with-rollup-bQRPc3y1.d.ts → with-rollup-B2RwnTq0.d.ts} +1 -1
  224. package/dist/withdraw-accessible-LN4AOJDD.js +28 -0
  225. package/dist/withdraw-accessible-LN4AOJDD.js.map +1 -0
  226. package/package.json +7 -3
  227. package/dist/api-JOXUNSKP.js +0 -20
  228. package/dist/chunk-IEUIUSBO.js.map +0 -1
  229. package/dist/chunk-LN22XH4B.js.map +0 -1
  230. package/dist/chunk-OFBFAVLI.js.map +0 -1
  231. package/dist/chunk-OVO2RZAE.js.map +0 -1
  232. package/dist/chunk-QKVILR7N.js +0 -25
  233. package/dist/chunk-QKVILR7N.js.map +0 -1
  234. package/dist/chunk-SAJJWVNQ.js.map +0 -1
  235. package/dist/collection-facade-THH4ASGX.js +0 -39
  236. package/dist/delegation-BQNIEHZE.js +0 -25
  237. package/dist/executor-CBTNU5VZ.js +0 -9
  238. package/dist/executor-DJHNSTIR.js +0 -9
  239. package/dist/executor-FGISLQIN.js +0 -21
  240. package/dist/export-accessible-P7SLRLK3.js +0 -23
  241. package/dist/extract-partition-6JGY3KYR.js +0 -36
  242. package/dist/find-RNBG7LBY.js +0 -11
  243. package/dist/issue-W5QG53B5.js +0 -19
  244. package/dist/liberate-AQ7OWBZZ.js +0 -24
  245. package/dist/noydb-WQZNAECY.js +0 -60
  246. package/dist/register-V5AQTXNI.js +0 -21
  247. package/dist/registry-IMNMHWTM.js +0 -17
  248. package/dist/registry-K6VUQXKV.js +0 -19
  249. package/dist/registry-ZVO3T4M5.js +0 -9
  250. package/dist/request-withdrawal-EHALV66Y.js +0 -31
  251. package/dist/revoke-MHAUAESM.js +0 -24
  252. package/dist/signer-PQ74YXRY.js +0 -25
  253. package/dist/storage-3FKGLQMC.js +0 -23
  254. package/dist/withdraw-accessible-JMX2TCPX.js +0 -28
  255. /package/dist/{api-JOXUNSKP.js.map → api-Z66JMGOU.js.map} +0 -0
  256. /package/dist/{backup-OPONO6Q5.js.map → backup-7PX6NDKT.js.map} +0 -0
  257. /package/dist/{chunk-BMQOH7MM.js.map → chunk-26FSVNBL.js.map} +0 -0
  258. /package/dist/{chunk-6UOSONVI.js.map → chunk-2L7PPF2C.js.map} +0 -0
  259. /package/dist/{chunk-TB5RNNJ4.js.map → chunk-3CHNKEFI.js.map} +0 -0
  260. /package/dist/{chunk-AF5ZRTZ4.js.map → chunk-47C4CI7R.js.map} +0 -0
  261. /package/dist/{chunk-ULIHDPKL.js.map → chunk-55LSDABW.js.map} +0 -0
  262. /package/dist/{chunk-P5WXDYMD.js.map → chunk-5GQE5IDB.js.map} +0 -0
  263. /package/dist/{chunk-TLJOJBZD.js.map → chunk-5HZULLHE.js.map} +0 -0
  264. /package/dist/{chunk-PGFY7IRW.js.map → chunk-5UOPIPZC.js.map} +0 -0
  265. /package/dist/{chunk-GQOT6QJR.js.map → chunk-62TTFKU4.js.map} +0 -0
  266. /package/dist/{chunk-ZKF6HH7V.js.map → chunk-6P5AJ2ZS.js.map} +0 -0
  267. /package/dist/{chunk-QNTEDPWP.js.map → chunk-6PALJTC2.js.map} +0 -0
  268. /package/dist/{chunk-GBTUANXF.js.map → chunk-6Z435B6N.js.map} +0 -0
  269. /package/dist/{chunk-XYYW64LB.js.map → chunk-7CZ6YXMO.js.map} +0 -0
  270. /package/dist/{chunk-TL7QR5T6.js.map → chunk-7F2P2NHX.js.map} +0 -0
  271. /package/dist/{chunk-RDHAGBEB.js.map → chunk-7KTL4RHZ.js.map} +0 -0
  272. /package/dist/{chunk-ZKYMKF2S.js.map → chunk-7L6EH6S7.js.map} +0 -0
  273. /package/dist/{chunk-NQVZB3S7.js.map → chunk-AG2PLGQ2.js.map} +0 -0
  274. /package/dist/{chunk-G4MGYGSS.js.map → chunk-AZPGB4OD.js.map} +0 -0
  275. /package/dist/{chunk-4K3MQ5S3.js.map → chunk-BASCPHNM.js.map} +0 -0
  276. /package/dist/{chunk-BKGIWGCX.js.map → chunk-C4NOLA5X.js.map} +0 -0
  277. /package/dist/{chunk-SW56GSYC.js.map → chunk-CHK5VVMI.js.map} +0 -0
  278. /package/dist/{chunk-A4DWPOP3.js.map → chunk-CP3GUIAN.js.map} +0 -0
  279. /package/dist/{chunk-TYGW5TOR.js.map → chunk-DJ4TNF4N.js.map} +0 -0
  280. /package/dist/{chunk-P2LDXRGP.js.map → chunk-DKGZIX6S.js.map} +0 -0
  281. /package/dist/{chunk-VMJ5URU7.js.map → chunk-E3LURVGQ.js.map} +0 -0
  282. /package/dist/{chunk-3Y4QLJ6K.js.map → chunk-EU7HDMT3.js.map} +0 -0
  283. /package/dist/{chunk-T65UZXR6.js.map → chunk-FCOZ7DEC.js.map} +0 -0
  284. /package/dist/{chunk-M66NAZA4.js.map → chunk-G5CFMITA.js.map} +0 -0
  285. /package/dist/{chunk-ZT4GWVTX.js.map → chunk-GMZFHDSG.js.map} +0 -0
  286. /package/dist/{chunk-VWGCJUTV.js.map → chunk-H7WQMGXH.js.map} +0 -0
  287. /package/dist/{chunk-7SY3PTED.js.map → chunk-HBVEGUON.js.map} +0 -0
  288. /package/dist/{chunk-GXGK22QU.js.map → chunk-HU55NPHZ.js.map} +0 -0
  289. /package/dist/{chunk-XJR3COJO.js.map → chunk-HV3VNAYI.js.map} +0 -0
  290. /package/dist/{chunk-U24XHXNK.js.map → chunk-I6JJ6VJS.js.map} +0 -0
  291. /package/dist/{chunk-5MRE3C4Q.js.map → chunk-I6Q7YECW.js.map} +0 -0
  292. /package/dist/{chunk-P27Z66EB.js.map → chunk-IEKK2XI4.js.map} +0 -0
  293. /package/dist/{chunk-N5YVZHCB.js.map → chunk-II6DLDZM.js.map} +0 -0
  294. /package/dist/{chunk-Z3FZC5GV.js.map → chunk-J54DC5IC.js.map} +0 -0
  295. /package/dist/{chunk-OJU3CPFA.js.map → chunk-J5YDMJHG.js.map} +0 -0
  296. /package/dist/{chunk-H5XRIJX3.js.map → chunk-JT4A6OAJ.js.map} +0 -0
  297. /package/dist/{chunk-S2WKOCTU.js.map → chunk-K6WHZBCO.js.map} +0 -0
  298. /package/dist/{chunk-Z7KI4WHR.js.map → chunk-LFGJG4XZ.js.map} +0 -0
  299. /package/dist/{chunk-ZROMNP7Q.js.map → chunk-MOQ5M46U.js.map} +0 -0
  300. /package/dist/{chunk-T45LAT2Y.js.map → chunk-NO53W6O5.js.map} +0 -0
  301. /package/dist/{chunk-H7RYPVMJ.js.map → chunk-OFYY5Q4R.js.map} +0 -0
  302. /package/dist/{chunk-HMXLN43G.js.map → chunk-OWGAXPRE.js.map} +0 -0
  303. /package/dist/{chunk-T2EGAXPM.js.map → chunk-PAJCRV7O.js.map} +0 -0
  304. /package/dist/{chunk-ZBDK7T6X.js.map → chunk-PE25C4QL.js.map} +0 -0
  305. /package/dist/{chunk-RTS23VIJ.js.map → chunk-PYIUDUGS.js.map} +0 -0
  306. /package/dist/{chunk-Z5PIUYNB.js.map → chunk-QAVFI23O.js.map} +0 -0
  307. /package/dist/{chunk-VFRNWE5P.js.map → chunk-QYNBPDGO.js.map} +0 -0
  308. /package/dist/{chunk-6HNKCKFZ.js.map → chunk-RHB7BOEO.js.map} +0 -0
  309. /package/dist/{chunk-6RXPSMKR.js.map → chunk-RNYDHIQL.js.map} +0 -0
  310. /package/dist/{chunk-PI5CG2OV.js.map → chunk-RUWEHFRB.js.map} +0 -0
  311. /package/dist/{chunk-3QRQOBS7.js.map → chunk-T4NQMPBN.js.map} +0 -0
  312. /package/dist/{chunk-VPCMJ5Z4.js.map → chunk-U5IJHUHZ.js.map} +0 -0
  313. /package/dist/{chunk-43ISXURO.js.map → chunk-U7LV2DUN.js.map} +0 -0
  314. /package/dist/{chunk-FH52CDEW.js.map → chunk-UB3XHGFG.js.map} +0 -0
  315. /package/dist/{chunk-HBKDR7R3.js.map → chunk-UJJJPKJO.js.map} +0 -0
  316. /package/dist/{chunk-TCIUO62Z.js.map → chunk-UWZ7O4NR.js.map} +0 -0
  317. /package/dist/{chunk-P3NGV5RV.js.map → chunk-V76PHWLE.js.map} +0 -0
  318. /package/dist/{chunk-A5DYVMDR.js.map → chunk-VFG5YXWM.js.map} +0 -0
  319. /package/dist/{chunk-UOEWDCUX.js.map → chunk-VFQOE76I.js.map} +0 -0
  320. /package/dist/{chunk-VRPBEOWU.js.map → chunk-VIWOGJ2O.js.map} +0 -0
  321. /package/dist/{chunk-5EWYUR5P.js.map → chunk-VK6OC22R.js.map} +0 -0
  322. /package/dist/{chunk-O2DB4C3M.js.map → chunk-VMRXI3IF.js.map} +0 -0
  323. /package/dist/{chunk-LPRPVCNY.js.map → chunk-VUHXLL32.js.map} +0 -0
  324. /package/dist/{chunk-44UTIDE2.js.map → chunk-WFBZRXS5.js.map} +0 -0
  325. /package/dist/{chunk-LEA7WJEZ.js.map → chunk-WGH3YV6Y.js.map} +0 -0
  326. /package/dist/{chunk-HY6ZGGEC.js.map → chunk-WJEMUO32.js.map} +0 -0
  327. /package/dist/{chunk-YFF2RP3X.js.map → chunk-WRLPV6SI.js.map} +0 -0
  328. /package/dist/{chunk-G7RDYYTE.js.map → chunk-XW5LZYV4.js.map} +0 -0
  329. /package/dist/{chunk-OPTFANOX.js.map → chunk-YSJG4L4A.js.map} +0 -0
  330. /package/dist/{chunk-GZZL5R73.js.map → chunk-YSU2E4GZ.js.map} +0 -0
  331. /package/dist/{chunk-LIP6JWYK.js.map → chunk-YTCCC6NG.js.map} +0 -0
  332. /package/dist/{collection-facade-THH4ASGX.js.map → collection-facade-JP6N7USE.js.map} +0 -0
  333. /package/dist/{computed-BMMEFRFJ.js.map → computed-6FOFXQPE.js.map} +0 -0
  334. /package/dist/{config-drift-3UIJVI5G.js.map → config-drift-LRKCC3VZ.js.map} +0 -0
  335. /package/dist/{delegation-BQNIEHZE.js.map → delegation-FDOXXHNG.js.map} +0 -0
  336. /package/dist/{enclave-YN6223OG.js.map → derive-JR2C5JFG.js.map} +0 -0
  337. /package/dist/{executor-CBTNU5VZ.js.map → enclave-7X5BUAMS.js.map} +0 -0
  338. /package/dist/{executor-DJHNSTIR.js.map → executor-6LHOV7MN.js.map} +0 -0
  339. /package/dist/{executor-FGISLQIN.js.map → executor-EUPYHCLU.js.map} +0 -0
  340. /package/dist/{export-accessible-P7SLRLK3.js.map → executor-KZ4B3PRT.js.map} +0 -0
  341. /package/dist/{extract-partition-6JGY3KYR.js.map → export-accessible-7XLSZBGJ.js.map} +0 -0
  342. /package/dist/{find-RNBG7LBY.js.map → extract-partition-RM6EROS5.js.map} +0 -0
  343. /package/dist/{fanout-sidecar-WS22Q5WH.js.map → fanout-sidecar-BDKLP5GG.js.map} +0 -0
  344. /package/dist/{issue-W5QG53B5.js.map → find-OH4BEULF.js.map} +0 -0
  345. /package/dist/{ledger-KZWBKAG5.js.map → issue-FJE2IHUI.js.map} +0 -0
  346. /package/dist/{liberate-AQ7OWBZZ.js.map → ledger-EMDHRJJN.js.map} +0 -0
  347. /package/dist/{link-set-UQEIYQAM.js.map → liberate-HFIPHJGR.js.map} +0 -0
  348. /package/dist/{noydb-WQZNAECY.js.map → link-set-62Y36TOG.js.map} +0 -0
  349. /package/dist/{policy-YIKUH4AD.js.map → noydb-4ZASGII5.js.map} +0 -0
  350. /package/dist/{public-envelope-MRN5YYZZ.js.map → policy-SXPLTQS4.js.map} +0 -0
  351. /package/dist/{register-V5AQTXNI.js.map → public-envelope-CBRIJORQ.js.map} +0 -0
  352. /package/dist/{registry-IMNMHWTM.js.map → register-5NRE7HBZ.js.map} +0 -0
  353. /package/dist/{registry-K6VUQXKV.js.map → registry-5QLETK3Q.js.map} +0 -0
  354. /package/dist/{registry-ZVO3T4M5.js.map → registry-DYTNLOJC.js.map} +0 -0
  355. /package/dist/{request-withdrawal-EHALV66Y.js.map → registry-HSNQ4NBP.js.map} +0 -0
  356. /package/dist/{revoke-MHAUAESM.js.map → request-withdrawal-5APB7RKN.js.map} +0 -0
  357. /package/dist/{reveal-TBLTFWQ2.js.map → reveal-R5N7JKA5.js.map} +0 -0
  358. /package/dist/{signer-PQ74YXRY.js.map → revoke-VELFCK7S.js.map} +0 -0
  359. /package/dist/{stale-7Q62KVI3.js.map → satellites/index.js.map} +0 -0
  360. /package/dist/{storage-3FKGLQMC.js.map → signer-IVU3B6DP.js.map} +0 -0
  361. /package/dist/{withdraw-accessible-JMX2TCPX.js.map → stale-DP66HFT3.js.map} +0 -0
  362. /package/dist/{store-coordination-provider-JJCEMTAE.js.map → store-coordination-provider-F5N5ASDF.js.map} +0 -0
  363. /package/dist/{verify-YB5LQHNA.js.map → verify-CAYGXYNO.js.map} +0 -0
  364. /package/dist/{walk-T65TZDN2.js.map → walk-3SB25HF2.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  QuiesceTimeoutError
3
- } from "./chunk-U23JUUPX.js";
3
+ } from "./chunk-OJ64XMPJ.js";
4
4
 
5
5
  // src/port/by/types.ts
6
6
  function isQuorum(writers, generation, excludeWriterId) {
@@ -51,4 +51,4 @@ export {
51
51
  isQuorum,
52
52
  runDrainBarrier
53
53
  };
54
- //# sourceMappingURL=chunk-3Y4QLJ6K.js.map
54
+ //# sourceMappingURL=chunk-EU7HDMT3.js.map
@@ -6,7 +6,7 @@ import {
6
6
  ConflictError,
7
7
  InvariantError,
8
8
  ValidationError
9
- } from "./chunk-U23JUUPX.js";
9
+ } from "./chunk-OJ64XMPJ.js";
10
10
 
11
11
  // src/with-commit/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-DJHNSTIR.js");
219
+ const { GuardExecutor } = await import("./executor-KZ4B3PRT.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-T65UZXR6.js.map
355
+ //# sourceMappingURL=chunk-FCOZ7DEC.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  envelopeBodyForHash
3
- } from "./chunk-OVO2RZAE.js";
3
+ } from "./chunk-JIW3Q5JN.js";
4
4
  import {
5
5
  sha256Hex
6
- } from "./chunk-TLJOJBZD.js";
6
+ } from "./chunk-5HZULLHE.js";
7
7
 
8
8
  // src/with-commit/history/ledger/entry.ts
9
9
  function canonicalJson(value) {
@@ -67,4 +67,4 @@ export {
67
67
  parseIndex,
68
68
  envelopePayloadHash
69
69
  };
70
- //# sourceMappingURL=chunk-M66NAZA4.js.map
70
+ //# sourceMappingURL=chunk-G5CFMITA.js.map
@@ -5,11 +5,11 @@ import {
5
5
  readDirectoryConfig,
6
6
  readUserVisibility,
7
7
  saveUserEnvelope
8
- } from "./chunk-TB5RNNJ4.js";
8
+ } from "./chunk-3CHNKEFI.js";
9
9
  import {
10
10
  NOYDB_FORMAT_VERSION,
11
11
  NOYDB_KEYRING_VERSION
12
- } from "./chunk-LN22XH4B.js";
12
+ } from "./chunk-HCK2DFEK.js";
13
13
  import {
14
14
  base64ToBuffer,
15
15
  bufferToBase64,
@@ -20,7 +20,7 @@ import {
20
20
  generateSalt,
21
21
  unwrapKey,
22
22
  wrapKey
23
- } from "./chunk-TLJOJBZD.js";
23
+ } from "./chunk-5HZULLHE.js";
24
24
  import {
25
25
  DirectoryDisabledError,
26
26
  InvalidKeyError,
@@ -32,7 +32,7 @@ import {
32
32
  PrivilegeEscalationError,
33
33
  USER_ENVELOPE_COLLECTION,
34
34
  ValidationError
35
- } from "./chunk-U23JUUPX.js";
35
+ } from "./chunk-OJ64XMPJ.js";
36
36
 
37
37
  // src/kernel/validation.ts
38
38
  var WeakPassphraseError = class extends NoydbError {
@@ -774,4 +774,4 @@ export {
774
774
  hasImportCapability,
775
775
  evaluateImportCapability
776
776
  };
777
- //# sourceMappingURL=chunk-ZT4GWVTX.js.map
777
+ //# sourceMappingURL=chunk-GMZFHDSG.js.map
@@ -0,0 +1,19 @@
1
+ // src/with-shape/satellites/existence.ts
2
+ function isEnvelopeLive(env) {
3
+ return env !== null && !(env._iv === "" && env._data === "");
4
+ }
5
+ async function isBaseLive(adapter, vault, base, id) {
6
+ return isEnvelopeLive(await adapter.get(vault, base, id));
7
+ }
8
+ async function liveBaseIdSet(adapter, vault, base) {
9
+ const ids = await adapter.list(vault, base);
10
+ const out = /* @__PURE__ */ new Set();
11
+ for (const id of ids) if (await isBaseLive(adapter, vault, base, id)) out.add(id);
12
+ return out;
13
+ }
14
+
15
+ export {
16
+ isBaseLive,
17
+ liveBaseIdSet
18
+ };
19
+ //# sourceMappingURL=chunk-GYGLAVCX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-shape/satellites/existence.ts"],"sourcesContent":["import type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\n\n/**\n * Existence authority (spec § Convergence & existence authority, rule 1): the\n * base row is the sole authority on record existence. `null` (absent) and the\n * tombstone shape (`_iv === '' && _data === ''`, per `buildTombstone()`) both\n * read as \"not live\" — undecrypted, envelope-level checks only.\n */\nfunction isEnvelopeLive(env: EncryptedEnvelope | null): boolean {\n return env !== null && !(env._iv === '' && env._data === '')\n}\n\n/** One undecrypted adapter `get` on the base — the store-shape the spec pins (zero extra crypto). */\nexport async function isBaseLive(adapter: NoydbStore, vault: string, base: string, id: string): Promise<boolean> {\n return isEnvelopeLive(await adapter.get(vault, base, id))\n}\n\n/** The set of base ids that are currently live — used to id-filter satellite `list()` results. */\nexport async function liveBaseIdSet(adapter: NoydbStore, vault: string, base: string): Promise<Set<string>> {\n const ids = await adapter.list(vault, base)\n const out = new Set<string>()\n for (const id of ids) if (await isBaseLive(adapter, vault, base, id)) out.add(id)\n return out\n}\n"],"mappings":";AAQA,SAAS,eAAe,KAAwC;AAC9D,SAAO,QAAQ,QAAQ,EAAE,IAAI,QAAQ,MAAM,IAAI,UAAU;AAC3D;AAGA,eAAsB,WAAW,SAAqB,OAAe,MAAc,IAA8B;AAC/G,SAAO,eAAe,MAAM,QAAQ,IAAI,OAAO,MAAM,EAAE,CAAC;AAC1D;AAGA,eAAsB,cAAc,SAAqB,OAAe,MAAoC;AAC1G,QAAM,MAAM,MAAM,QAAQ,KAAK,OAAO,IAAI;AAC1C,QAAM,MAAM,oBAAI,IAAY;AAC5B,aAAW,MAAM,IAAK,KAAI,MAAM,WAAW,SAAS,OAAO,MAAM,EAAE,EAAG,KAAI,IAAI,EAAE;AAChF,SAAO;AACT;","names":[]}
@@ -1,19 +1,23 @@
1
1
  import {
2
2
  SyncScheduler
3
3
  } from "./chunk-VQNJ7UZL.js";
4
+ import {
5
+ isDeleteMarker,
6
+ isTombstoneShape
7
+ } from "./chunk-HGQ6UNHE.js";
4
8
  import {
5
9
  NOYDB_SYNC_VERSION
6
- } from "./chunk-LN22XH4B.js";
10
+ } from "./chunk-HCK2DFEK.js";
7
11
  import {
8
12
  bufferToBase64,
9
13
  decrypt,
10
14
  derivePresenceKey,
11
15
  encrypt,
12
16
  generateIV
13
- } from "./chunk-TLJOJBZD.js";
17
+ } from "./chunk-5HZULLHE.js";
14
18
  import {
15
19
  ConflictError
16
- } from "./chunk-U23JUUPX.js";
20
+ } from "./chunk-OJ64XMPJ.js";
17
21
 
18
22
  // src/with-party/team/presence.ts
19
23
  var PresenceHandle = class {
@@ -241,6 +245,20 @@ var SyncEngine = class {
241
245
  scheduler;
242
246
  /** Per-collection conflict resolvers registered by Collection instances. */
243
247
  conflictResolvers = /* @__PURE__ */ new Map();
248
+ /**
249
+ * Expands a collection-name filter to include its satellite pair partner(s)
250
+ * (spec #591 convergence rule 5b) — wired from vault satellite declaration
251
+ * via `setPairExpander`. `undefined` when no satellite has ever been
252
+ * declared for this vault: identity behavior, zero change for non-satellite
253
+ * users.
254
+ */
255
+ pairExpander;
256
+ /** #598: refreshes Collection in-memory views after a sync-applied local write. Wired by the vault at open. */
257
+ cacheInvalidator;
258
+ /** Wire the Collection-cache invalidation hook (#598). Same injection pattern as `setPairExpander`. */
259
+ setCacheInvalidator(fn) {
260
+ this.cacheInvalidator = fn;
261
+ }
244
262
  constructor(opts) {
245
263
  this.local = opts.local;
246
264
  this.remote = opts.remote;
@@ -273,9 +291,39 @@ var SyncEngine = class {
273
291
  /**
274
292
  * Register a per-collection conflict resolver.
275
293
  * Called by Collection when `conflictPolicy` is set.
294
+ *
295
+ * Pair-coupled (#591 rule 5b): registering for one satellite-pair member
296
+ * registers the same resolver for both — the pair converges under one
297
+ * resolution policy. Expands with whatever the pair-expander knows *at this
298
+ * call*; resolvers registered before their pair existed are covered by
299
+ * `remirrorPairResolvers` at pair-registration time.
276
300
  */
277
301
  registerConflictResolver(collection, resolver) {
278
- this.conflictResolvers.set(collection, resolver);
302
+ for (const n of this.pairExpander?.([collection]) ?? [collection]) this.conflictResolvers.set(n, resolver);
303
+ }
304
+ /**
305
+ * Wire a satellite pair-expansion function (vault registration, #591 Task 11).
306
+ * The closure re-reads the live `SatelliteRegistry` on every call, so pairs
307
+ * declared after this is set are still picked up by `push`/`pull` filters.
308
+ */
309
+ setPairExpander(expander) {
310
+ this.pairExpander = expander;
311
+ }
312
+ /**
313
+ * Retroactively mirror per-collection conflict resolvers across a newly
314
+ * registered satellite pair (#591 rule 5b) — covers the NORMAL declaration
315
+ * order, where the base's `conflictPolicy` resolver was registered before
316
+ * the satellite was declared (so the call-time expansion in
317
+ * `registerConflictResolver` saw no pair yet). Tie-break: when BOTH members
318
+ * already carry (different) resolvers, the FIRST name in `names` wins —
319
+ * callers pass `[base, satellite]`, so the base's resolver is canonical.
320
+ * Idempotent; a later explicit registration on either member still
321
+ * overwrites both (last-wins, via the call-time expansion above).
322
+ */
323
+ remirrorPairResolvers(names) {
324
+ const canonical = names.map((n) => this.conflictResolvers.get(n)).find((r) => r !== void 0);
325
+ if (!canonical) return;
326
+ for (const n of names) this.conflictResolvers.set(n, canonical);
279
327
  }
280
328
  /** Record a local change for later push. */
281
329
  async trackChange(collection, id, action, version) {
@@ -297,16 +345,24 @@ var SyncEngine = class {
297
345
  await this.persistMeta();
298
346
  this.scheduler?.notifyChange();
299
347
  }
348
+ /** Remove a dirty entry (satellite fan-out revert cleanup — spec #591). */
349
+ async removeDirty(collection, id) {
350
+ const before = this.dirty.length;
351
+ this.dirty = this.dirty.filter((d) => !(d.collection === collection && d.id === id));
352
+ if (this.dirty.length !== before) await this.persistMeta();
353
+ }
300
354
  /** Push dirty records to remote adapter. Accepts optional `PushOptions` for partial sync. */
301
355
  async push(options) {
302
356
  await this.ensureLoaded();
303
357
  let pushed = 0;
304
358
  const conflicts = [];
359
+ const erasures = [];
305
360
  const errors = [];
306
361
  const completed = [];
362
+ const filter = options?.collections ? new Set(this.pairExpander?.(options.collections) ?? options.collections) : null;
307
363
  for (let i = 0; i < this.dirty.length; i++) {
308
364
  const entry = this.dirty[i];
309
- if (options?.collections && !options.collections.includes(entry.collection)) {
365
+ if (filter && !filter.has(entry.collection)) {
310
366
  continue;
311
367
  }
312
368
  try {
@@ -320,6 +376,12 @@ var SyncEngine = class {
320
376
  completed.push(i);
321
377
  continue;
322
378
  }
379
+ if (isTombstoneShape(envelope)) {
380
+ await this.remote.put(this.vault, entry.collection, entry.id, envelope);
381
+ completed.push(i);
382
+ pushed++;
383
+ continue;
384
+ }
323
385
  try {
324
386
  await this.remote.put(
325
387
  this.vault,
@@ -334,27 +396,42 @@ var SyncEngine = class {
334
396
  if (err instanceof ConflictError) {
335
397
  const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
336
398
  if (remoteEnvelope) {
337
- const { handled, conflict } = await this.handleConflict(
338
- entry.collection,
339
- entry.id,
340
- envelope,
341
- remoteEnvelope,
342
- "push"
343
- );
344
- conflicts.push(conflict);
345
- if (handled === "local") {
346
- await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
347
- completed.push(i);
348
- pushed++;
349
- } else if (handled === "remote") {
350
- await this.local.put(this.vault, entry.collection, entry.id, conflict.remote);
399
+ if (isTombstoneShape(remoteEnvelope)) {
400
+ await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
401
+ erasures.push(this.reportErasure(entry.collection, entry.id, remoteEnvelope, envelope, "push"));
351
402
  completed.push(i);
352
- } else if (handled === "merged" && conflict.local !== envelope) {
353
- const merged = conflict.local;
354
- await this.remote.put(this.vault, entry.collection, entry.id, merged);
355
- await this.local.put(this.vault, entry.collection, entry.id, merged);
356
- completed.push(i);
357
- pushed++;
403
+ } else if (remoteEnvelope._v === envelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(envelope) && !this.conflictResolvers.get(entry.collection)) {
404
+ if (isDeleteMarker(remoteEnvelope)) {
405
+ await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
406
+ completed.push(i);
407
+ } else {
408
+ await this.remote.put(this.vault, entry.collection, entry.id, envelope);
409
+ completed.push(i);
410
+ pushed++;
411
+ }
412
+ } else {
413
+ const { handled, conflict } = await this.handleConflict(
414
+ entry.collection,
415
+ entry.id,
416
+ envelope,
417
+ remoteEnvelope,
418
+ "push"
419
+ );
420
+ conflicts.push(conflict);
421
+ if (handled === "local") {
422
+ await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
423
+ completed.push(i);
424
+ pushed++;
425
+ } else if (handled === "remote") {
426
+ await this.applyRemote(entry.collection, entry.id, conflict.remote);
427
+ completed.push(i);
428
+ } else if (handled === "merged" && conflict.local !== envelope) {
429
+ const merged = conflict.local;
430
+ await this.remote.put(this.vault, entry.collection, entry.id, merged);
431
+ await this.applyRemote(entry.collection, entry.id, merged);
432
+ completed.push(i);
433
+ pushed++;
434
+ }
358
435
  }
359
436
  }
360
437
  } else {
@@ -371,7 +448,7 @@ var SyncEngine = class {
371
448
  }
372
449
  this.lastPush = (/* @__PURE__ */ new Date()).toISOString();
373
450
  await this.persistMeta();
374
- const result = { pushed, conflicts, errors };
451
+ const result = { pushed, conflicts, errors, erasures };
375
452
  this.emitter.emit("sync:push", result);
376
453
  return result;
377
454
  }
@@ -380,22 +457,54 @@ var SyncEngine = class {
380
457
  await this.ensureLoaded();
381
458
  let pulled = 0;
382
459
  const conflicts = [];
460
+ const erasures = [];
383
461
  const errors = [];
462
+ const filter = options?.collections ? new Set(this.pairExpander?.(options.collections) ?? options.collections) : null;
384
463
  try {
385
464
  const remoteSnapshot = await this.remote.loadAll(this.vault);
386
465
  for (const [collName, records] of Object.entries(remoteSnapshot)) {
387
- if (options?.collections && !options.collections.includes(collName)) {
466
+ if (filter && !filter.has(collName)) {
388
467
  continue;
389
468
  }
390
469
  for (const [id, remoteEnvelope] of Object.entries(records)) {
391
- if (options?.modifiedSince && remoteEnvelope._ts <= options.modifiedSince) {
470
+ if (options?.modifiedSince && remoteEnvelope._ts <= options.modifiedSince && !isTombstoneShape(remoteEnvelope) && !isDeleteMarker(remoteEnvelope)) {
392
471
  continue;
393
472
  }
394
473
  try {
395
474
  const localEnvelope = await this.local.get(this.vault, collName, id);
475
+ const remoteIsTombstone = isTombstoneShape(remoteEnvelope);
396
476
  if (!localEnvelope) {
397
- await this.local.put(this.vault, collName, id, remoteEnvelope);
477
+ await this.applyRemote(collName, id, remoteEnvelope);
478
+ pulled++;
479
+ } else if (isTombstoneShape(localEnvelope)) {
480
+ if (remoteIsTombstone) {
481
+ if (remoteEnvelope._v > localEnvelope._v) await this.applyRemote(collName, id, remoteEnvelope);
482
+ } else {
483
+ erasures.push(await this.reassertTombstone(collName, id, localEnvelope, remoteEnvelope));
484
+ }
485
+ } else if (remoteIsTombstone) {
486
+ const wasDirty = this.dirty.some((d) => d.collection === collName && d.id === id);
487
+ await this.applyRemote(collName, id, remoteEnvelope);
488
+ this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
398
489
  pulled++;
490
+ if (wasDirty) erasures.push(this.reportErasure(collName, id, remoteEnvelope, localEnvelope, "pull"));
491
+ } else if (remoteEnvelope._v === localEnvelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(localEnvelope)) {
492
+ const resolver = this.conflictResolvers.get(collName);
493
+ if (resolver) {
494
+ const winner = await resolver(id, localEnvelope, remoteEnvelope);
495
+ if (winner !== localEnvelope && winner !== null) {
496
+ if (winner !== remoteEnvelope) {
497
+ await this.remote.put(this.vault, collName, id, winner);
498
+ }
499
+ await this.applyRemote(collName, id, winner);
500
+ this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
501
+ pulled++;
502
+ }
503
+ } else if (isDeleteMarker(remoteEnvelope)) {
504
+ await this.applyRemote(collName, id, remoteEnvelope);
505
+ this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
506
+ pulled++;
507
+ }
399
508
  } else if (remoteEnvelope._v > localEnvelope._v) {
400
509
  const isDirty = this.dirty.some((d) => d.collection === collName && d.id === id);
401
510
  if (isDirty) {
@@ -408,17 +517,17 @@ var SyncEngine = class {
408
517
  );
409
518
  conflicts.push(conflict);
410
519
  if (handled === "remote") {
411
- await this.local.put(this.vault, collName, id, conflict.remote);
520
+ await this.applyRemote(collName, id, conflict.remote);
412
521
  this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
413
522
  pulled++;
414
523
  } else if (handled === "merged" && conflict.local !== localEnvelope) {
415
524
  const merged = conflict.local;
416
- await this.local.put(this.vault, collName, id, merged);
525
+ await this.applyRemote(collName, id, merged);
417
526
  this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
418
527
  pulled++;
419
528
  }
420
529
  } else {
421
- await this.local.put(this.vault, collName, id, remoteEnvelope);
530
+ await this.applyRemote(collName, id, remoteEnvelope);
422
531
  pulled++;
423
532
  }
424
533
  }
@@ -432,7 +541,7 @@ var SyncEngine = class {
432
541
  }
433
542
  this.lastPull = (/* @__PURE__ */ new Date()).toISOString();
434
543
  await this.persistMeta();
435
- const result = { pulled, conflicts, errors };
544
+ const result = { pulled, conflicts, errors, erasures };
436
545
  this.emitter.emit("sync:pull", result);
437
546
  return result;
438
547
  }
@@ -451,6 +560,7 @@ var SyncEngine = class {
451
560
  await this.ensureLoaded();
452
561
  let pushed = 0;
453
562
  const conflicts = [];
563
+ const erasures = [];
454
564
  const errors = [];
455
565
  const completed = [];
456
566
  for (let i = 0; i < this.dirty.length; i++) {
@@ -467,6 +577,12 @@ var SyncEngine = class {
467
577
  completed.push(i);
468
578
  continue;
469
579
  }
580
+ if (isTombstoneShape(envelope)) {
581
+ await this.remote.put(this.vault, entry.collection, entry.id, envelope);
582
+ completed.push(i);
583
+ pushed++;
584
+ continue;
585
+ }
470
586
  try {
471
587
  await this.remote.put(
472
588
  this.vault,
@@ -481,27 +597,42 @@ var SyncEngine = class {
481
597
  if (err instanceof ConflictError) {
482
598
  const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
483
599
  if (remoteEnvelope) {
484
- const { handled, conflict } = await this.handleConflict(
485
- entry.collection,
486
- entry.id,
487
- envelope,
488
- remoteEnvelope,
489
- "push"
490
- );
491
- conflicts.push(conflict);
492
- if (handled === "local") {
493
- await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
494
- completed.push(i);
495
- pushed++;
496
- } else if (handled === "remote") {
497
- await this.local.put(this.vault, entry.collection, entry.id, conflict.remote);
498
- completed.push(i);
499
- } else if (handled === "merged" && conflict.local !== envelope) {
500
- const merged = conflict.local;
501
- await this.remote.put(this.vault, entry.collection, entry.id, merged);
502
- await this.local.put(this.vault, entry.collection, entry.id, merged);
600
+ if (isTombstoneShape(remoteEnvelope)) {
601
+ await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
602
+ erasures.push(this.reportErasure(entry.collection, entry.id, remoteEnvelope, envelope, "push"));
503
603
  completed.push(i);
504
- pushed++;
604
+ } else if (remoteEnvelope._v === envelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(envelope) && !this.conflictResolvers.get(entry.collection)) {
605
+ if (isDeleteMarker(remoteEnvelope)) {
606
+ await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
607
+ completed.push(i);
608
+ } else {
609
+ await this.remote.put(this.vault, entry.collection, entry.id, envelope);
610
+ completed.push(i);
611
+ pushed++;
612
+ }
613
+ } else {
614
+ const { handled, conflict } = await this.handleConflict(
615
+ entry.collection,
616
+ entry.id,
617
+ envelope,
618
+ remoteEnvelope,
619
+ "push"
620
+ );
621
+ conflicts.push(conflict);
622
+ if (handled === "local") {
623
+ await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
624
+ completed.push(i);
625
+ pushed++;
626
+ } else if (handled === "remote") {
627
+ await this.applyRemote(entry.collection, entry.id, conflict.remote);
628
+ completed.push(i);
629
+ } else if (handled === "merged" && conflict.local !== envelope) {
630
+ const merged = conflict.local;
631
+ await this.remote.put(this.vault, entry.collection, entry.id, merged);
632
+ await this.applyRemote(entry.collection, entry.id, merged);
633
+ completed.push(i);
634
+ pushed++;
635
+ }
505
636
  }
506
637
  }
507
638
  } else {
@@ -518,7 +649,7 @@ var SyncEngine = class {
518
649
  }
519
650
  this.lastPush = (/* @__PURE__ */ new Date()).toISOString();
520
651
  await this.persistMeta();
521
- const result = { pushed, conflicts, errors };
652
+ const result = { pushed, conflicts, errors, erasures };
522
653
  this.emitter.emit("sync:push", result);
523
654
  return result;
524
655
  }
@@ -567,6 +698,33 @@ var SyncEngine = class {
567
698
  this.isOnline = false;
568
699
  this.emitter.emit("sync:offline", void 0);
569
700
  };
701
+ /** Apply an envelope to the local store and refresh in-memory views (#598). */
702
+ async applyRemote(collection, id, envelope) {
703
+ await this.local.put(this.vault, collection, id, envelope);
704
+ await this.cacheInvalidator?.(collection, id);
705
+ }
706
+ /** Record + emit a tombstone enforcement (#590). */
707
+ reportErasure(collection, id, tombstone, suppressed, direction) {
708
+ const enforcement = { vault: this.vault, collection, id, tombstone, suppressed, direction };
709
+ this.emitter.emit("sync:erasure", enforcement);
710
+ return enforcement;
711
+ }
712
+ /**
713
+ * Re-assert a local tombstone over a live remote envelope (#590): the shred
714
+ * wins in both directions, regardless of `_v`. Bumps the tombstone to the
715
+ * suppressed envelope's `_v` when higher so per-key version counters stay
716
+ * monotonic on every store; `_by` (the shredding actor) is preserved.
717
+ */
718
+ async reassertTombstone(collection, id, tombstone, suppressedRemote) {
719
+ let winner = tombstone;
720
+ if (suppressedRemote._v > tombstone._v) {
721
+ winner = { ...tombstone, _v: suppressedRemote._v, _ts: (/* @__PURE__ */ new Date()).toISOString() };
722
+ await this.applyRemote(collection, id, winner);
723
+ }
724
+ await this.remote.put(this.vault, collection, id, winner);
725
+ this.dirty = this.dirty.filter((d) => !(d.collection === collection && d.id === id));
726
+ return this.reportErasure(collection, id, winner, suppressedRemote, "pull");
727
+ }
570
728
  /**
571
729
  * Resolve a conflict, checking per-collection resolvers first,
572
730
  * then falling back to the db-level `ConflictStrategy`.
@@ -709,7 +867,8 @@ var SyncTransaction = class {
709
867
  return {
710
868
  status: pushResult.conflicts.length > 0 ? "conflict" : "committed",
711
869
  pushed: pushResult.pushed,
712
- conflicts: pushResult.conflicts
870
+ conflicts: pushResult.conflicts,
871
+ ...pushResult.erasures?.length ? { erasures: pushResult.erasures } : {}
713
872
  };
714
873
  }
715
874
  };
@@ -719,4 +878,4 @@ export {
719
878
  SyncEngine,
720
879
  SyncTransaction
721
880
  };
722
- //# sourceMappingURL=chunk-OFBFAVLI.js.map
881
+ //# sourceMappingURL=chunk-H3MPSYCH.js.map