@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,3 +1,6 @@
1
+ import {
2
+ loadVaultPolicy
3
+ } from "./chunk-NO53W6O5.js";
1
4
  import {
2
5
  jsonSchemaToFields
3
6
  } from "./chunk-TQ3REHVF.js";
@@ -6,30 +9,40 @@ import {
6
9
  SEQUENCE_COLLECTION,
7
10
  compileSequenceFormat,
8
11
  resolveSequenceKey
9
- } from "./chunk-P27Z66EB.js";
10
- import {
11
- loadVaultPolicy
12
- } from "./chunk-T45LAT2Y.js";
12
+ } from "./chunk-IEKK2XI4.js";
13
13
  import {
14
14
  LinkIntegrityError,
15
15
  isLinkCollectionName,
16
16
  linkCollectionName,
17
17
  linkRowKey
18
- } from "./chunk-P3NGV5RV.js";
18
+ } from "./chunk-V76PHWLE.js";
19
19
  import {
20
- derivePersistedSchema,
21
- isZod4Schema
22
- } from "./chunk-ULIHDPKL.js";
20
+ hashFields,
21
+ validateSatelliteDeclaration
22
+ } from "./chunk-5JQMX2EH.js";
23
23
  import {
24
24
  loadFence
25
- } from "./chunk-YFF2RP3X.js";
25
+ } from "./chunk-WRLPV6SI.js";
26
26
  import {
27
27
  InvertedIndex,
28
28
  MemoryIndexStore,
29
29
  NO_SEARCH,
30
30
  VectorSet,
31
31
  buildPersistedIndexCallbacks
32
- } from "./chunk-A4DWPOP3.js";
32
+ } from "./chunk-CP3GUIAN.js";
33
+ import {
34
+ derivePersistedSchema,
35
+ isZod4Schema
36
+ } from "./chunk-55LSDABW.js";
37
+ import {
38
+ isBaseLive,
39
+ liveBaseIdSet
40
+ } from "./chunk-GYGLAVCX.js";
41
+ import {
42
+ CustodyApi,
43
+ NO_CARGO,
44
+ NO_CUSTODY
45
+ } from "./chunk-RUWEHFRB.js";
33
46
  import {
34
47
  ServiceBus,
35
48
  WriteHookRegistry,
@@ -37,50 +50,45 @@ import {
37
50
  assertCanImport,
38
51
  canExport,
39
52
  canImport
40
- } from "./chunk-7SY3PTED.js";
53
+ } from "./chunk-HBVEGUON.js";
41
54
  import {
42
55
  NO_ATTESTATION
43
- } from "./chunk-Z7KI4WHR.js";
56
+ } from "./chunk-LFGJG4XZ.js";
44
57
  import {
45
58
  NO_CLASSIFIED,
46
59
  enforceClassifiedWrite,
47
60
  resolveClassifiedFields
48
- } from "./chunk-AF5ZRTZ4.js";
61
+ } from "./chunk-47C4CI7R.js";
49
62
  import {
50
63
  NO_TIERS,
51
64
  classifySealedShred
52
- } from "./chunk-VMJ5URU7.js";
65
+ } from "./chunk-E3LURVGQ.js";
53
66
  import {
54
67
  NO_PORTABILITY
55
- } from "./chunk-N5YVZHCB.js";
56
- import {
57
- CustodyApi,
58
- NO_CARGO,
59
- NO_CUSTODY
60
- } from "./chunk-PI5CG2OV.js";
68
+ } from "./chunk-II6DLDZM.js";
61
69
  import {
62
70
  runDrainBarrier
63
- } from "./chunk-3Y4QLJ6K.js";
71
+ } from "./chunk-EU7HDMT3.js";
64
72
  import {
65
73
  PERIODS_COLLECTION
66
- } from "./chunk-GZZL5R73.js";
74
+ } from "./chunk-YSU2E4GZ.js";
67
75
  import {
68
76
  TxContext,
69
77
  revertExecuted
70
- } from "./chunk-T65UZXR6.js";
78
+ } from "./chunk-FCOZ7DEC.js";
71
79
  import {
72
80
  OverlayedCollection
73
- } from "./chunk-ZROMNP7Q.js";
81
+ } from "./chunk-MOQ5M46U.js";
74
82
  import {
75
83
  EXPORT_AUDIT_COLLECTION,
76
84
  createExportBlobsHandle,
77
85
  runCompaction
78
- } from "./chunk-5MRE3C4Q.js";
86
+ } from "./chunk-I6Q7YECW.js";
79
87
  import {
80
88
  LazyQuery,
81
89
  decodeIdxId,
82
90
  encodeIdxId
83
- } from "./chunk-QNTEDPWP.js";
91
+ } from "./chunk-6PALJTC2.js";
84
92
  import {
85
93
  IMPLICIT_LAZY,
86
94
  Lru,
@@ -89,11 +97,11 @@ import {
89
97
  import {
90
98
  resolveManagedSecret,
91
99
  saveSealedPassphrase
92
- } from "./chunk-VWGCJUTV.js";
100
+ } from "./chunk-H7WQMGXH.js";
93
101
  import {
94
102
  isDictCollectionName,
95
103
  isStaticDictDescriptor
96
- } from "./chunk-44UTIDE2.js";
104
+ } from "./chunk-WFBZRXS5.js";
97
105
  import {
98
106
  NO_TEAM,
99
107
  enrollAuthenticator,
@@ -104,7 +112,7 @@ import {
104
112
  rotatePassphrase,
105
113
  updateAuthenticator,
106
114
  writeMagicLinkGrant
107
- } from "./chunk-LEA7WJEZ.js";
115
+ } from "./chunk-WGH3YV6Y.js";
108
116
  import {
109
117
  hasRecoveryEnrolled,
110
118
  hasStrongRecoveryEnrolled,
@@ -114,7 +122,7 @@ import {
114
122
  mintShamirRecoveryEntry,
115
123
  savePaperRecoveryEntries,
116
124
  saveShamirRecoveryEntries
117
- } from "./chunk-LPRPVCNY.js";
125
+ } from "./chunk-VUHXLL32.js";
118
126
  import {
119
127
  INDEXED_STORE_POLICY
120
128
  } from "./chunk-VQNJ7UZL.js";
@@ -130,17 +138,17 @@ import {
130
138
  listUsers,
131
139
  loadKeyring,
132
140
  updateKeyringIdentity
133
- } from "./chunk-ZT4GWVTX.js";
141
+ } from "./chunk-GMZFHDSG.js";
134
142
  import {
135
143
  persistDirectoryConfig,
136
144
  readDirectoryConfig
137
- } from "./chunk-TB5RNNJ4.js";
145
+ } from "./chunk-3CHNKEFI.js";
138
146
  import {
139
147
  generateULID
140
148
  } from "./chunk-ZJADGNYF.js";
141
149
  import {
142
150
  sha256Hex
143
- } from "./chunk-M66NAZA4.js";
151
+ } from "./chunk-G5CFMITA.js";
144
152
  import {
145
153
  NO_FORGET,
146
154
  addSubjectRef,
@@ -149,10 +157,10 @@ import {
149
157
  readDottedPath,
150
158
  rebuildSubjectIndex,
151
159
  removeSubjectRef
152
- } from "./chunk-O2DB4C3M.js";
160
+ } from "./chunk-VMRXI3IF.js";
153
161
  import {
154
162
  NO_SEALED_RECORD
155
- } from "./chunk-G7RDYYTE.js";
163
+ } from "./chunk-XW5LZYV4.js";
156
164
  import {
157
165
  RecordCodec,
158
166
  SEALED_CEK_NS,
@@ -162,35 +170,37 @@ import {
162
170
  queryByDet,
163
171
  resolveStableCek,
164
172
  validateSchemaInput
165
- } from "./chunk-OVO2RZAE.js";
173
+ } from "./chunk-JIW3Q5JN.js";
166
174
  import {
175
+ buildDeleteMarker,
167
176
  buildTombstone,
177
+ isDeleteMarker,
168
178
  isTombstone
169
- } from "./chunk-QKVILR7N.js";
179
+ } from "./chunk-HGQ6UNHE.js";
170
180
  import {
171
181
  NOYDB_FORMAT_VERSION
172
- } from "./chunk-LN22XH4B.js";
182
+ } from "./chunk-HCK2DFEK.js";
173
183
  import {
174
184
  encrypt
175
- } from "./chunk-TLJOJBZD.js";
185
+ } from "./chunk-5HZULLHE.js";
176
186
  import {
177
187
  NO_AGGREGATE,
178
188
  Query,
179
189
  ScanBuilder
180
- } from "./chunk-GBTUANXF.js";
190
+ } from "./chunk-6Z435B6N.js";
181
191
  import {
182
192
  canonicalGroupKey
183
- } from "./chunk-P5WXDYMD.js";
193
+ } from "./chunk-5GQE5IDB.js";
184
194
  import {
185
195
  moneyRuntime,
186
196
  readPath
187
- } from "./chunk-ZKF6HH7V.js";
197
+ } from "./chunk-6P5AJ2ZS.js";
188
198
  import {
189
199
  getAtPath,
190
200
  resolvePolicy,
191
201
  setAtPathInPlace,
192
202
  stripI18nFilled
193
- } from "./chunk-4K3MQ5S3.js";
203
+ } from "./chunk-BASCPHNM.js";
194
204
  import {
195
205
  AlreadyElevatedError,
196
206
  AttestationError,
@@ -217,6 +227,7 @@ import {
217
227
  RecoveryNotEnrolledError,
218
228
  RecoveryProfileNotImplementedError,
219
229
  ReservedCollectionNameError,
230
+ SatelliteConfigError,
220
231
  SchemaFenceError,
221
232
  StaticDictReadonlyError,
222
233
  StoreCapabilityError,
@@ -227,11 +238,11 @@ import {
227
238
  UnknownDictCodeError,
228
239
  UnsupportedIndexOptionError,
229
240
  ValidationError
230
- } from "./chunk-U23JUUPX.js";
241
+ } from "./chunk-OJ64XMPJ.js";
231
242
 
232
243
  // src/port/by/default-provider.ts
233
244
  async function createDefaultCoordinationProvider(store) {
234
- const { StoreCoordinationProvider } = await import("./store-coordination-provider-JJCEMTAE.js");
245
+ const { StoreCoordinationProvider } = await import("./store-coordination-provider-F5N5ASDF.js");
235
246
  return new StoreCoordinationProvider(store);
236
247
  }
237
248
 
@@ -1060,7 +1071,7 @@ async function resolveStaleOnRead(accessor, outputCollection, id) {
1060
1071
  }
1061
1072
  const sourceWithId = { ...source, id };
1062
1073
  if (DerivationExecutor === null) {
1063
- ({ DerivationExecutor } = await import("./executor-CBTNU5VZ.js"));
1074
+ ({ DerivationExecutor } = await import("./executor-EUPYHCLU.js"));
1064
1075
  }
1065
1076
  const ctx = { vault: accessor.getReadOnlyFacade() };
1066
1077
  const result = await DerivationExecutor.run(spec, sourceWithId, 0, strategyHash, ctx);
@@ -1350,7 +1361,7 @@ function resolveCollectionConfig(opts) {
1350
1361
  // src/with-formula/computed/lazy.ts
1351
1362
  var fn = null;
1352
1363
  async function loadEvalComputedFields() {
1353
- fn ??= (await import("./computed-BMMEFRFJ.js")).evalComputedFields;
1364
+ fn ??= (await import("./computed-6FOFXQPE.js")).evalComputedFields;
1354
1365
  return fn;
1355
1366
  }
1356
1367
 
@@ -2188,7 +2199,7 @@ var Collection = class {
2188
2199
  }
2189
2200
  await this.onAccess?.("find", "*");
2190
2201
  if (hits.length === 0) return [];
2191
- const { verifyDigestField } = await import("./verify-YB5LQHNA.js");
2202
+ const { verifyDigestField } = await import("./verify-CAYGXYNO.js");
2192
2203
  const policy = {
2193
2204
  normalize: spec.verifyNormalize ?? "password",
2194
2205
  notLastN: spec.notLastN ?? 0,
@@ -2364,7 +2375,7 @@ var Collection = class {
2364
2375
  }
2365
2376
  }
2366
2377
  if (this.materializedViewSource !== void 0) {
2367
- const { resolveStaleMVOnRead } = await import("./stale-7Q62KVI3.js");
2378
+ const { resolveStaleMVOnRead } = await import("./stale-DP66HFT3.js");
2368
2379
  await resolveStaleMVOnRead(this.materializedViewSource, this.name);
2369
2380
  }
2370
2381
  let record;
@@ -2375,7 +2386,7 @@ var Collection = class {
2375
2386
  } else {
2376
2387
  const envelope = await this.adapter.get(this.vault, this.name, id);
2377
2388
  if (!envelope) return null;
2378
- if (isTombstone(envelope, this.storeCiphertext)) return null;
2389
+ if (isTombstone(envelope, this.storeCiphertext) || isDeleteMarker(envelope)) return null;
2379
2390
  record = await this.codec.decryptRecord(envelope, { id, sealedAsHandles: true });
2380
2391
  if (record === null) return null;
2381
2392
  this.lru.set(id, { record, version: envelope._v }, estimateRecordBytes(record));
@@ -2825,14 +2836,15 @@ var Collection = class {
2825
2836
  return;
2826
2837
  }
2827
2838
  let existing;
2839
+ let priorRaw = null;
2828
2840
  if (this.lazy && this.lru) {
2829
2841
  existing = this.lru.get(id);
2830
2842
  if (!existing) {
2831
- const previousEnvelope = await this.adapter.get(this.vault, this.name, id);
2832
- if (previousEnvelope) {
2833
- const previousRecord = await this.codec.decryptRecord(previousEnvelope);
2843
+ priorRaw = await this.adapter.get(this.vault, this.name, id);
2844
+ if (priorRaw) {
2845
+ const previousRecord = await this.codec.decryptRecord(priorRaw);
2834
2846
  if (previousRecord !== null) {
2835
- existing = { record: previousRecord, version: previousEnvelope._v };
2847
+ existing = { record: previousRecord, version: priorRaw._v };
2836
2848
  }
2837
2849
  }
2838
2850
  }
@@ -2840,7 +2852,11 @@ var Collection = class {
2840
2852
  await this.ensureHydrated();
2841
2853
  existing = await this.resolvePriorValues(id);
2842
2854
  }
2843
- const version = existing ? existing.version + 1 : 1;
2855
+ let version = existing ? existing.version + 1 : 1;
2856
+ if (!existing && this.onDirty) {
2857
+ if (priorRaw === null) priorRaw = await this.adapter.get(this.vault, this.name, id);
2858
+ if (priorRaw && isDeleteMarker(priorRaw)) version = priorRaw._v + 1;
2859
+ }
2844
2860
  this.uniqueConstraints?.check(id, record);
2845
2861
  const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
2846
2862
  const vdigCtx = this.vdigFields !== null ? { id, prev: await this.adapter.get(this.vault, this.name, id) } : void 0;
@@ -2927,7 +2943,7 @@ var Collection = class {
2927
2943
  if (mode === "eager") {
2928
2944
  if (executor === null) {
2929
2945
  ;
2930
- ({ MaterializedViewExecutor: executor } = await import("./executor-FGISLQIN.js"));
2946
+ ({ MaterializedViewExecutor: executor } = await import("./executor-6LHOV7MN.js"));
2931
2947
  }
2932
2948
  await executor.refresh(reg, {
2933
2949
  getCollection: (name) => this.materializedViewSource.getCollection(name),
@@ -2936,7 +2952,7 @@ var Collection = class {
2936
2952
  });
2937
2953
  } else if (mode === "lazy") {
2938
2954
  if (staleHelpers === null) {
2939
- staleHelpers = await import("./stale-7Q62KVI3.js");
2955
+ staleHelpers = await import("./stale-DP66HFT3.js");
2940
2956
  }
2941
2957
  staleHelpers.markMVStale(registry, reg.spec.name);
2942
2958
  }
@@ -2966,7 +2982,7 @@ var Collection = class {
2966
2982
  if (this.sensitiveFields.size > 0) {
2967
2983
  const cached = this.lru.get(id);
2968
2984
  const env = await this.adapter.get(this.vault, this.name, id);
2969
- if (!env || isTombstone(env, this.storeCiphertext)) return null;
2985
+ if (!env || isTombstone(env, this.storeCiphertext) || isDeleteMarker(env)) return null;
2970
2986
  raw = await this.codec.decryptRecord(env, { id });
2971
2987
  if (raw === null) return null;
2972
2988
  if (!cached) {
@@ -2977,7 +2993,7 @@ var Collection = class {
2977
2993
  if (cached) raw = cached.record;
2978
2994
  else {
2979
2995
  const env = await this.adapter.get(this.vault, this.name, id);
2980
- if (!env || isTombstone(env, this.storeCiphertext)) return null;
2996
+ if (!env || isTombstone(env, this.storeCiphertext) || isDeleteMarker(env)) return null;
2981
2997
  raw = await this.codec.decryptRecord(env, { id });
2982
2998
  if (raw === null) return null;
2983
2999
  this.lru.set(id, { record: raw, version: env._v }, estimateRecordBytes(raw));
@@ -3121,7 +3137,7 @@ var Collection = class {
3121
3137
  continue;
3122
3138
  }
3123
3139
  if (DerivationExecutor === null) {
3124
- ({ DerivationExecutor } = await import("./executor-CBTNU5VZ.js"));
3140
+ ({ DerivationExecutor } = await import("./executor-EUPYHCLU.js"));
3125
3141
  }
3126
3142
  for (const run of runs) {
3127
3143
  const ctx = { vault: this.derivationSource.getReadOnlyFacade() };
@@ -3140,7 +3156,7 @@ var Collection = class {
3140
3156
  const outputCollection = this.derivationSource.getCollection(outSpec.collection);
3141
3157
  const txCtx = this.derivationSource.getActiveTxContext();
3142
3158
  if (out.kind === "array") {
3143
- const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-WS22Q5WH.js");
3159
+ const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-BDKLP5GG.js");
3144
3160
  const prior = await loadFanoutSidecar(this.adapter, this.vault, spec.source, run.runId, key, this.getDEK, this.storeCiphertext);
3145
3161
  const prevKeys = new Set(prior?.keys ?? []);
3146
3162
  const newKeysList = out.entries.map((e) => e.key);
@@ -3260,7 +3276,7 @@ var Collection = class {
3260
3276
  let count = 0;
3261
3277
  for (const id of ids) {
3262
3278
  const env = await this.adapter.get(this.vault, this.name, id);
3263
- if (!env || isTombstone(env, this.storeCiphertext)) continue;
3279
+ if (!env || isTombstone(env, this.storeCiphertext) || isDeleteMarker(env)) continue;
3264
3280
  const decoded = await this.codec.decryptRecord(env, { skipValidation: true, id });
3265
3281
  if (decoded === null) continue;
3266
3282
  const record = decoded;
@@ -3389,7 +3405,15 @@ var Collection = class {
3389
3405
  }
3390
3406
  const previousEnvelope = await this.adapter.get(this.vault, this.name, id);
3391
3407
  const previousPayloadHash = await this.historyStrategy.envelopePayloadHash(previousEnvelope);
3392
- await this.adapter.delete(this.vault, this.name, id);
3408
+ let markerVersion;
3409
+ if (this.onDirty) {
3410
+ const live = previousEnvelope;
3411
+ if (!live || isTombstone(live, this.storeCiphertext) || isDeleteMarker(live)) return;
3412
+ markerVersion = live._v + 1;
3413
+ await this.adapter.put(this.vault, this.name, id, buildDeleteMarker(markerVersion, this.keyring.userId));
3414
+ } else {
3415
+ await this.adapter.delete(this.vault, this.name, id);
3416
+ }
3393
3417
  if (this.ledger) {
3394
3418
  await this.ledger.append({
3395
3419
  op: "delete",
@@ -3412,7 +3436,7 @@ var Collection = class {
3412
3436
  this.uniqueConstraints?.remove(id, existing.record);
3413
3437
  }
3414
3438
  }
3415
- await this.onDirty?.(this.name, id, "delete", existing?.version ?? 0);
3439
+ await this.onDirty?.(this.name, id, "put", markerVersion ?? (existing?.version ?? 0) + 1);
3416
3440
  this.emitter.emit("change", {
3417
3441
  vault: this.vault,
3418
3442
  collection: this.name,
@@ -3464,11 +3488,12 @@ var Collection = class {
3464
3488
  }
3465
3489
  async _writeTombstone(id, actor) {
3466
3490
  const live = await this.adapter.get(this.vault, this.name, id);
3467
- if (!live || isTombstone(live, this.storeCiphertext)) return null;
3491
+ if (!live || isTombstone(live, this.storeCiphertext) || isDeleteMarker(live)) return null;
3468
3492
  await this.adapter.put(this.vault, this.name, id, buildTombstone(live._v, actor));
3469
3493
  this.cache.delete(id);
3470
3494
  this.lru?.remove(id);
3471
3495
  this.cekCache?.remove(id);
3496
+ await this.onDirty?.(this.name, id, "put", live._v);
3472
3497
  return { previousVersion: live._v };
3473
3498
  }
3474
3499
  /**
@@ -3493,7 +3518,7 @@ var Collection = class {
3493
3518
  for (const [outputKey, outSpec] of Object.entries(spec.outputs)) {
3494
3519
  if (outSpec.shape !== "array") continue;
3495
3520
  if (helpers === null) {
3496
- helpers = await import("./fanout-sidecar-WS22Q5WH.js");
3521
+ helpers = await import("./fanout-sidecar-BDKLP5GG.js");
3497
3522
  }
3498
3523
  const sidecar = await helpers.loadFanoutSidecar(this.adapter, this.vault, spec.source, id, outputKey, this.getDEK, this.storeCiphertext);
3499
3524
  if (!sidecar) continue;
@@ -3527,7 +3552,7 @@ var Collection = class {
3527
3552
  if (mode === "eager") {
3528
3553
  if (executor === null) {
3529
3554
  ;
3530
- ({ MaterializedViewExecutor: executor } = await import("./executor-FGISLQIN.js"));
3555
+ ({ MaterializedViewExecutor: executor } = await import("./executor-6LHOV7MN.js"));
3531
3556
  }
3532
3557
  await executor.refresh(reg, {
3533
3558
  getCollection: (name) => this.materializedViewSource.getCollection(name),
@@ -3536,7 +3561,7 @@ var Collection = class {
3536
3561
  });
3537
3562
  } else if (mode === "lazy") {
3538
3563
  if (staleHelpers === null) {
3539
- staleHelpers = await import("./stale-7Q62KVI3.js");
3564
+ staleHelpers = await import("./stale-DP66HFT3.js");
3540
3565
  }
3541
3566
  staleHelpers.markMVStale(registry, reg.spec.name);
3542
3567
  }
@@ -3559,7 +3584,7 @@ var Collection = class {
3559
3584
  );
3560
3585
  }
3561
3586
  if (this.materializedViewSource !== void 0) {
3562
- const { resolveStaleMVOnRead } = await import("./stale-7Q62KVI3.js");
3587
+ const { resolveStaleMVOnRead } = await import("./stale-DP66HFT3.js");
3563
3588
  await resolveStaleMVOnRead(this.materializedViewSource, this.name);
3564
3589
  }
3565
3590
  await this.ensureHydrated();
@@ -4193,6 +4218,15 @@ var Collection = class {
4193
4218
  _invalidateCekCacheEntry(id) {
4194
4219
  this.cekCache?.remove(id);
4195
4220
  }
4221
+ /** @internal Satellite fan-out revert cleanup (spec #591): drop the sync dirty entry ('revert' is
4222
+ * onDirty-channel-only) and re-announce the RESTORED state as a plain put/delete — `subscribe()`
4223
+ * only understands those two actions, and the restored record may exist again. */
4224
+ async _compensateRevertedWrite(id) {
4225
+ await this._invalidateCacheEntry(id);
4226
+ await this.onDirty?.(this.name, id, "revert", 0);
4227
+ const restored = await this.get(id);
4228
+ this.emitter.emit("change", { vault: this.vault, collection: this.name, id, action: restored !== null ? "put" : "delete" });
4229
+ }
4196
4230
  async _invalidateCacheEntry(id) {
4197
4231
  if (this.lazy && this.lru) {
4198
4232
  this.lru.remove(id);
@@ -4243,7 +4277,7 @@ var Collection = class {
4243
4277
  const ids = await this.adapter.list(this.vault, this.name);
4244
4278
  for (const id of ids) {
4245
4279
  const envelope = await this.adapter.get(this.vault, this.name, id);
4246
- if (envelope && !isTombstone(envelope, this.storeCiphertext)) {
4280
+ if (envelope && !isTombstone(envelope, this.storeCiphertext) && !isDeleteMarker(envelope)) {
4247
4281
  const record = await this.codec.decryptRecord(envelope, { id, sealedAsHandles: true });
4248
4282
  if (record === null) continue;
4249
4283
  this.cache.set(id, { record, version: envelope._v });
@@ -4256,7 +4290,7 @@ var Collection = class {
4256
4290
  /** Hydrate from a pre-loaded snapshot (used by Vault). */
4257
4291
  async hydrateFromSnapshot(records) {
4258
4292
  for (const [id, envelope] of Object.entries(records)) {
4259
- if (isTombstone(envelope, this.storeCiphertext)) continue;
4293
+ if (isTombstone(envelope, this.storeCiphertext) || isDeleteMarker(envelope)) continue;
4260
4294
  const record = await this.codec.decryptRecord(envelope, { id, sealedAsHandles: true });
4261
4295
  if (record === null) continue;
4262
4296
  this.cache.set(id, { record, version: envelope._v });
@@ -4704,14 +4738,14 @@ var Collection = class {
4704
4738
  /** C-A/R10: persist the classified marker once per classified handle (store I/O in config-drift.ts). */
4705
4739
  async _ensureClassifiedMarker() {
4706
4740
  if (this._markerPersisted || this.vdigFields === null) return;
4707
- const { persistClassifiedMarkerForFields } = await import("./config-drift-3UIJVI5G.js");
4741
+ const { persistClassifiedMarkerForFields } = await import("./config-drift-LRKCC3VZ.js");
4708
4742
  await persistClassifiedMarkerForFields(this.adapter, this.vault, this.name, this.vdigFields, await this.getDEK(this.name));
4709
4743
  this._markerPersisted = true;
4710
4744
  }
4711
4745
  /** C-A/R10 drift signal — the marker's declared digest-only set, memoized to one store read per handle (see config-drift.ts). */
4712
4746
  async _classifiedMarkerDigestOnly() {
4713
4747
  if (this._markerDigestOnlyCache !== void 0) return this._markerDigestOnlyCache;
4714
- const { readClassifiedMarkerDigestOnly } = await import("./config-drift-3UIJVI5G.js");
4748
+ const { readClassifiedMarkerDigestOnly } = await import("./config-drift-LRKCC3VZ.js");
4715
4749
  this._markerDigestOnlyCache = await readClassifiedMarkerDigestOnly(this.adapter, this.vault, this.name, await this.getDEK(this.name));
4716
4750
  return this._markerDigestOnlyCache;
4717
4751
  }
@@ -5758,7 +5792,7 @@ var VaultLinks = class {
5758
5792
  // src/with-shape/links/lazy-handle.ts
5759
5793
  function makeLazyLinkSetHandle(d) {
5760
5794
  let engine = null;
5761
- const load = () => engine ??= import("./link-set-UQEIYQAM.js").then(
5795
+ const load = () => engine ??= import("./link-set-62Y36TOG.js").then(
5762
5796
  ({ LinkSet }) => new LinkSet(d.adapter, d.vault, d.name, d.spec, d.encrypted, d.getDEK, d.actor, d.emitter, d.endpointExists)
5763
5797
  );
5764
5798
  return {
@@ -5772,6 +5806,423 @@ function makeLazyLinkSetHandle(d) {
5772
5806
  };
5773
5807
  }
5774
5808
 
5809
+ // src/with-shape/satellites/registry.ts
5810
+ var SatelliteRegistry = class {
5811
+ byBase = /* @__PURE__ */ new Map();
5812
+ bySat = /* @__PURE__ */ new Map();
5813
+ byJoin = /* @__PURE__ */ new Map();
5814
+ poisoned = /* @__PURE__ */ new Map();
5815
+ locks = /* @__PURE__ */ new Map();
5816
+ register(spec) {
5817
+ if (this.byBase.has(spec.base)) {
5818
+ throw new SatelliteConfigError(`R-S1: base "${spec.base}" already has satellite "${this.byBase.get(spec.base).satellite}" \u2014 v1 allows exactly one satellite per base.`);
5819
+ }
5820
+ if (this.byBase.has(spec.satellite)) {
5821
+ throw new SatelliteConfigError(`R-S3: "${spec.satellite}" is itself registered as a base (of "${this.byBase.get(spec.satellite).satellite}") \u2014 no satellite-of-satellite chains.`);
5822
+ }
5823
+ const taken = (n) => this.byBase.has(n) || this.bySat.has(n) || this.byJoin.has(n);
5824
+ if (spec.joined !== void 0 && taken(spec.joined)) {
5825
+ throw new SatelliteConfigError(`R-S5: joined name "${spec.joined}" collides with an existing pair member or joined name.`);
5826
+ }
5827
+ this.byBase.set(spec.base, spec);
5828
+ this.bySat.set(spec.satellite, spec);
5829
+ if (spec.joined !== void 0) this.byJoin.set(spec.joined, spec);
5830
+ }
5831
+ satelliteOf(base) {
5832
+ return this.byBase.get(base) ?? null;
5833
+ }
5834
+ bySatellite(name) {
5835
+ return this.bySat.get(name) ?? null;
5836
+ }
5837
+ byJoined(name) {
5838
+ return this.byJoin.get(name) ?? null;
5839
+ }
5840
+ isPairMember(name) {
5841
+ return this.byBase.has(name) || this.bySat.has(name);
5842
+ }
5843
+ allSpecs() {
5844
+ return [...this.byBase.values()];
5845
+ }
5846
+ expandNames(names) {
5847
+ const out = new Set(names);
5848
+ for (const n of names) {
5849
+ const asBase = this.byBase.get(n);
5850
+ if (asBase) out.add(asBase.satellite);
5851
+ const asSat = this.bySat.get(n);
5852
+ if (asSat) out.add(asSat.base);
5853
+ }
5854
+ return [...out];
5855
+ }
5856
+ poison(satellite, reason) {
5857
+ this.poisoned.set(satellite, reason);
5858
+ }
5859
+ assertNotPoisoned(satellite) {
5860
+ const reason = this.poisoned.get(satellite);
5861
+ if (reason !== void 0) throw new SatelliteConfigError(reason);
5862
+ }
5863
+ /** Per-base async mutex: chains sections on a stored promise tail. */
5864
+ async withPairLock(base, fn2) {
5865
+ const tail = this.locks.get(base) ?? Promise.resolve();
5866
+ let release;
5867
+ const gate = new Promise((res) => {
5868
+ release = res;
5869
+ });
5870
+ this.locks.set(base, tail.then(() => gate));
5871
+ await tail;
5872
+ try {
5873
+ return await fn2();
5874
+ } finally {
5875
+ release();
5876
+ }
5877
+ }
5878
+ };
5879
+
5880
+ // src/with-shape/satellites/declare.ts
5881
+ function declareSatellite(ctx, collectionName, options, existingRegistry) {
5882
+ if (existingRegistry !== null) {
5883
+ const existing = existingRegistry.bySatellite(collectionName);
5884
+ if (existing) {
5885
+ const same = existing.base === options.satelliteOf && hashFields(existing.fields) === hashFields(options.fields ?? []) && (existing.joined ?? null) === (options.joined ?? null);
5886
+ if (!same) {
5887
+ throw new SatelliteConfigError(`R-S9: "${collectionName}" re-declared divergently within this session (base/fields/joined mismatch).`);
5888
+ }
5889
+ return existingRegistry;
5890
+ }
5891
+ }
5892
+ const spec = validateSatelliteDeclaration({
5893
+ satellite: collectionName,
5894
+ satelliteOf: options.satelliteOf,
5895
+ fields: options.fields,
5896
+ joined: options.joined,
5897
+ baseIsSatellite: (existingRegistry?.bySatellite(options.satelliteOf) ?? null) !== null,
5898
+ // R-S8 direction (i): refuse if EITHER this declaration sets crdt, OR the
5899
+ // base was already constructed with crdt mode before this pairing.
5900
+ crdtMode: options.crdt !== void 0 || ctx.getBaseCrdt(options.satelliteOf) !== void 0,
5901
+ joinedCollidesWithCollection: options.joined !== void 0 && ctx.collectionExists(options.joined)
5902
+ });
5903
+ if (ctx.forgetSubjects[spec.base] !== void 0 && options.perRecordKeys !== true) {
5904
+ throw new SatelliteConfigError(`R-S7: satellite "${collectionName}" of forget-covered base "${spec.base}" must declare perRecordKeys.`);
5905
+ }
5906
+ let reg = existingRegistry;
5907
+ if (reg === null) {
5908
+ const created = new SatelliteRegistry();
5909
+ ctx.registerPoisonHook((e) => {
5910
+ if (e.vault === ctx.vaultName) created.assertNotPoisoned(e.collection);
5911
+ });
5912
+ ctx.forEachSyncEngine((e) => e.setPairExpander((names) => created.expandNames(names)));
5913
+ reg = created;
5914
+ }
5915
+ reg.register(spec);
5916
+ ctx.forEachSyncEngine((e) => e.remirrorPairResolvers([spec.base, spec.satellite]));
5917
+ const registry = reg;
5918
+ const baseSchema = ctx.getBaseSchema(spec.base);
5919
+ void import("./post-register-DCJ2SRVG.js").then((m) => m.postRegister(ctx.adapter, ctx.vaultName, spec, ctx.getDEK, baseSchema, registry)).catch(() => {
5920
+ });
5921
+ return reg;
5922
+ }
5923
+
5924
+ // src/with-shape/satellites/raw-target.ts
5925
+ var RAW_TARGET = /* @__PURE__ */ Symbol("noydb.satellite.rawTarget");
5926
+
5927
+ // src/with-shape/satellites/fanout.ts
5928
+ function unwrap(handle) {
5929
+ return handle[RAW_TARGET] ?? handle;
5930
+ }
5931
+ async function revertAndCompensate(deps, executed) {
5932
+ for (const leg of [...executed].reverse()) {
5933
+ try {
5934
+ if (leg.prior !== null) await deps.adapter.put(deps.vaultName, leg.coll, leg.id, leg.prior);
5935
+ else await deps.adapter.delete(deps.vaultName, leg.coll, leg.id);
5936
+ await leg.handle._compensateRevertedWrite(leg.id);
5937
+ } catch {
5938
+ }
5939
+ }
5940
+ }
5941
+ async function joinedPut(deps, id, record) {
5942
+ deps.registry.assertNotPoisoned(deps.spec.satellite);
5943
+ const base = unwrap(deps.base());
5944
+ const satellite = unwrap(deps.satellite());
5945
+ const satFields = new Set(deps.spec.fields);
5946
+ const baseRec = {};
5947
+ const satRec = {};
5948
+ for (const [k, v] of Object.entries(record)) (satFields.has(k) ? satRec : baseRec)[k] = v;
5949
+ await base.validateInput(baseRec);
5950
+ await satellite.validateInput(satRec);
5951
+ return deps.registry.withPairLock(deps.spec.base, async () => {
5952
+ const executed = [];
5953
+ const run = async (handle, coll, rec) => {
5954
+ executed.push({ coll, id, prior: await deps.adapter.get(deps.vaultName, coll, id), handle });
5955
+ await handle.put(id, rec);
5956
+ };
5957
+ try {
5958
+ await run(base, deps.spec.base, baseRec);
5959
+ await run(satellite, deps.spec.satellite, satRec);
5960
+ } catch (err) {
5961
+ await revertAndCompensate(deps, executed);
5962
+ throw err;
5963
+ }
5964
+ });
5965
+ }
5966
+ async function pairDelete(deps, id) {
5967
+ const base = unwrap(deps.base());
5968
+ const satellite = unwrap(deps.satellite());
5969
+ return deps.registry.withPairLock(deps.spec.base, async () => {
5970
+ const executed = [];
5971
+ const run = async (handle, coll) => {
5972
+ executed.push({ coll, id, prior: await deps.adapter.get(deps.vaultName, coll, id), handle });
5973
+ await handle.delete(id);
5974
+ };
5975
+ try {
5976
+ await run(satellite, deps.spec.satellite);
5977
+ await run(base, deps.spec.base);
5978
+ } catch (err) {
5979
+ await revertAndCompensate(deps, executed);
5980
+ throw err;
5981
+ }
5982
+ });
5983
+ }
5984
+
5985
+ // src/with-shape/satellites/proxy.ts
5986
+ async function listWithIds(target) {
5987
+ const records = await target.list();
5988
+ const ids = [...target.cache.keys()];
5989
+ const out = [];
5990
+ for (let i = 0; i < records.length; i++) {
5991
+ const id = ids[i];
5992
+ if (id !== void 0) out.push([id, records[i]]);
5993
+ }
5994
+ return out;
5995
+ }
5996
+ async function filterLiveHits(hits, adapter, vaultName, base) {
5997
+ const live = await Promise.all(hits.map((h) => isBaseLive(adapter, vaultName, base, h.id)));
5998
+ return hits.filter((_, i) => live[i]);
5999
+ }
6000
+ function makeSatelliteProxy(target, spec, registry) {
6001
+ const adapter = target.adapter;
6002
+ const vaultName = target.vault;
6003
+ const queryNotExistenceFiltered = () => {
6004
+ throw new SatelliteConfigError(
6005
+ `satellite "${spec.satellite}": query() is not existence-filtered. Query's terminal methods (toArray/first/count) read the in-memory cache synchronously, while existence authority (\xA7 Convergence & existence authority, rule 1) requires an async, undecrypted check against live base state \u2014 the two shapes don't compose without either breaking query()'s synchronous contract or accepting a check that misses out-of-band base mutations. Use list() (or get()) for existence-safe reads on satellite collections.`
6006
+ );
6007
+ };
6008
+ const getOne = async (id) => {
6009
+ if (!await isBaseLive(adapter, vaultName, spec.base, id)) return null;
6010
+ return target.get(id);
6011
+ };
6012
+ const putOne = async (id, record) => {
6013
+ return registry.withPairLock(spec.base, async () => {
6014
+ registry.assertNotPoisoned(spec.satellite);
6015
+ if (!await isBaseLive(adapter, vaultName, spec.base, id)) {
6016
+ throw new SatelliteConfigError(
6017
+ `R-S6: satellite "${spec.satellite}" put for "${id}" with no live base record in "${spec.base}" \u2014 create the base first (or write through the joined handle).`
6018
+ );
6019
+ }
6020
+ return target.put(id, record);
6021
+ });
6022
+ };
6023
+ const overrides = {
6024
+ get: getOne,
6025
+ async list() {
6026
+ const live = await liveBaseIdSet(adapter, vaultName, spec.base);
6027
+ const pairs = await listWithIds(target);
6028
+ return pairs.filter(([id]) => live.has(id)).map(([, record]) => record);
6029
+ },
6030
+ query: queryNotExistenceFiltered,
6031
+ put: putOne,
6032
+ // #591 review I1: the real `getMany` loops `this.get(id)` bound to the raw
6033
+ // target, never this proxy's existence-filtered `get` — same Map<id, T|null>
6034
+ // shape, built from the overridden single-get instead.
6035
+ async getMany(ids) {
6036
+ const result = /* @__PURE__ */ new Map();
6037
+ for (const id of ids) result.set(id, await getOne(id));
6038
+ return result;
6039
+ },
6040
+ // #591 review I1: the real `putMany` (non-atomic) loops `this.put(id, record)`
6041
+ // bound to the raw target, bypassing R-S6/pair-lock/poison per item; looping
6042
+ // through the overridden single-put here restores that per-item enforcement
6043
+ // while preserving the real putMany's { ok, success, failures } shape — a
6044
+ // refused item becomes a failure entry, not a thrown error. Atomic mode is a
6045
+ // single transaction by design (looping per-item `put` would break its
6046
+ // all-or-nothing revert guarantee), so instead the WHOLE call is refused
6047
+ // with R-S6 up front, under the pair lock + poison check, if any id lacks a
6048
+ // live base — only then does it delegate to the real atomic executor.
6049
+ async putMany(entries, options) {
6050
+ if (options?.atomic) {
6051
+ return registry.withPairLock(spec.base, async () => {
6052
+ registry.assertNotPoisoned(spec.satellite);
6053
+ for (const [id] of entries) {
6054
+ if (!await isBaseLive(adapter, vaultName, spec.base, id)) {
6055
+ throw new SatelliteConfigError(
6056
+ `R-S6: satellite "${spec.satellite}" putMany(atomic) refused \u2014 "${id}" has no live base record in "${spec.base}".`
6057
+ );
6058
+ }
6059
+ }
6060
+ return target.putMany(entries, options);
6061
+ });
6062
+ }
6063
+ const success = [];
6064
+ const failures = [];
6065
+ for (const [id, record] of entries) {
6066
+ try {
6067
+ await putOne(id, record);
6068
+ success.push(id);
6069
+ } catch (error) {
6070
+ failures.push({ id, error });
6071
+ }
6072
+ }
6073
+ return { ok: failures.length === 0, success, failures };
6074
+ },
6075
+ // No `deleteMany` override: the real `deleteMany` loops the raw
6076
+ // `this.delete(id)` too, but this proxy never overrides single `delete`
6077
+ // (satellite delete is legal, unguarded — see makeBaseProxy for the leg
6078
+ // that DOES need fan-out) — there is nothing for a bulk delete to bypass.
6079
+ // #591 Task 9: search/retrieve/similarTo answer from the search facade's
6080
+ // own cache/index (never the get/list overrides above), so they need
6081
+ // their own existence post-filter — every retrieval surface the facade
6082
+ // exposes is covered here.
6083
+ async search(field, query, opts) {
6084
+ const hits = await target.search(field, query, opts);
6085
+ return filterLiveHits(hits, adapter, vaultName, spec.base);
6086
+ },
6087
+ async retrieve(query, opts) {
6088
+ const hits = await target.retrieve(query, opts);
6089
+ return filterLiveHits(hits, adapter, vaultName, spec.base);
6090
+ },
6091
+ async similarTo(vector, opts) {
6092
+ const hits = await target.similarTo(vector, opts);
6093
+ return filterLiveHits(hits, adapter, vaultName, spec.base);
6094
+ },
6095
+ // #591 Task 9 review fix: findByDet/queryByDet scan envelopes straight
6096
+ // off the adapter (kernel/enclave/record-keys/deterministic.ts) and
6097
+ // return BARE records (no id), so a post-filter can't correlate a match
6098
+ // back to its base row. Instead the scan itself is scoped: re-run the
6099
+ // same det functions over the collection's own DeterministicContext
6100
+ // (`detContext()` is private like `adapter`/`cache` above) with its
6101
+ // `adapter.list` narrowed to live-base ids — a dead-base match is then
6102
+ // never visited, so findByDet correctly continues to a later live match
6103
+ // rather than short-circuiting on a ghost.
6104
+ async findByDet(field, value) {
6105
+ return findByDet(liveScopedDetContext(), field, value);
6106
+ },
6107
+ async queryByDet(field, value) {
6108
+ return queryByDet(liveScopedDetContext(), field, value);
6109
+ }
6110
+ };
6111
+ const liveScopedDetContext = () => {
6112
+ const ctx = target.detContext();
6113
+ const raw = ctx.adapter;
6114
+ return {
6115
+ ...ctx,
6116
+ adapter: {
6117
+ ...raw,
6118
+ get: raw.get.bind(raw),
6119
+ async list(v, c) {
6120
+ const ids = await raw.list(v, c);
6121
+ const live = await Promise.all(ids.map((id) => isBaseLive(adapter, vaultName, spec.base, id)));
6122
+ return ids.filter((_, i) => live[i]);
6123
+ }
6124
+ }
6125
+ };
6126
+ };
6127
+ return new Proxy(target, {
6128
+ get(t, prop, _recv) {
6129
+ if (prop === RAW_TARGET) return t;
6130
+ if (typeof prop === "string" && prop in overrides) return overrides[prop];
6131
+ const v = Reflect.get(t, prop, t);
6132
+ return typeof v === "function" ? v.bind(t) : v;
6133
+ }
6134
+ });
6135
+ }
6136
+ function makeBaseProxy(target, spec, registry, satellite) {
6137
+ const adapter = target.adapter;
6138
+ const vaultName = target.vault;
6139
+ const deleteOne = async (id) => {
6140
+ return pairDelete({ spec, base: () => target, satellite, adapter, vaultName, registry }, id);
6141
+ };
6142
+ const overrides = {
6143
+ delete: deleteOne,
6144
+ async deleteMany(ids) {
6145
+ const success = [];
6146
+ const failures = [];
6147
+ for (const id of ids) {
6148
+ try {
6149
+ await deleteOne(id);
6150
+ success.push(id);
6151
+ } catch (error) {
6152
+ failures.push({ id, error });
6153
+ }
6154
+ }
6155
+ return { ok: failures.length === 0, success, failures };
6156
+ }
6157
+ };
6158
+ return new Proxy(target, {
6159
+ get(t, prop, _recv) {
6160
+ if (prop === RAW_TARGET) return t;
6161
+ if (typeof prop === "string" && prop in overrides) return overrides[prop];
6162
+ const v = Reflect.get(t, prop, t);
6163
+ return typeof v === "function" ? v.bind(t) : v;
6164
+ }
6165
+ });
6166
+ }
6167
+
6168
+ // src/with-shape/satellites/joined.ts
6169
+ function makeJoinedHandle(spec, deps) {
6170
+ const base = () => deps.base();
6171
+ const satellite = () => deps.satellite();
6172
+ const adapter = deps.adapter;
6173
+ const nullSat = () => Object.fromEntries(spec.fields.map((f) => [f, null]));
6174
+ const merge = (b, s) => ({ ...nullSat(), ...s ?? {}, ...b });
6175
+ return {
6176
+ async get(id) {
6177
+ if (!await isBaseLive(adapter, deps.vaultName, spec.base, id)) return null;
6178
+ const b = await base().get(id);
6179
+ if (b === null) return null;
6180
+ const s = await satellite().get(id);
6181
+ return merge(b, s);
6182
+ },
6183
+ async put(id, record) {
6184
+ await joinedPut(deps, id, record);
6185
+ },
6186
+ async delete(id) {
6187
+ await pairDelete(deps, id);
6188
+ },
6189
+ async list() {
6190
+ const live = await liveBaseIdSet(adapter, deps.vaultName, spec.base);
6191
+ const pairs = await listWithIds(base());
6192
+ const out = [];
6193
+ for (const [id, b] of pairs) {
6194
+ if (!live.has(id)) continue;
6195
+ out.push(merge(b, await satellite().get(id)));
6196
+ }
6197
+ return out;
6198
+ },
6199
+ async describe() {
6200
+ const [b, s] = await Promise.all([base().describe({}), satellite().describe({})]);
6201
+ return {
6202
+ collection: spec.joined ?? `${spec.base}+${spec.satellite}`,
6203
+ fields: [...b.fields, ...s.fields],
6204
+ meta: { label: spec.joined ?? spec.base }
6205
+ };
6206
+ }
6207
+ };
6208
+ }
6209
+
6210
+ // src/with-shape/satellites/forget.ts
6211
+ function expandRefsWithSatellites(refs, registry) {
6212
+ if (registry === null) return refs;
6213
+ const out = [];
6214
+ let anySat = false;
6215
+ for (const ref2 of refs) {
6216
+ const spec = registry.satelliteOf(ref2.collection);
6217
+ if (spec) {
6218
+ anySat = true;
6219
+ out.push({ collection: spec.satellite, id: ref2.id, satelliteOf: ref2.collection });
6220
+ }
6221
+ out.push(ref2);
6222
+ }
6223
+ return anySat ? out : refs;
6224
+ }
6225
+
5775
6226
  // src/with-shape/schema-update/gate.ts
5776
6227
  var SchemaUpdateGate = class {
5777
6228
  #decision;
@@ -6110,6 +6561,8 @@ var Vault = class {
6110
6561
  */
6111
6562
  reloadKeyring;
6112
6563
  collectionCache = /* @__PURE__ */ new Map();
6564
+ satelliteRegistry = null;
6565
+ // spec #591, archetype-③
6113
6566
  /** Vault-level schema cutover fence/controller. */
6114
6567
  schemaFence;
6115
6568
  /** Per-client heartbeat/watcher; started lazily on cutover registration. */
@@ -6401,6 +6854,29 @@ var Vault = class {
6401
6854
  if (isSecretBearingReservedCollection(collectionName)) {
6402
6855
  throw new ReservedCollectionNameError(collectionName);
6403
6856
  }
6857
+ if (this.satelliteRegistry?.byJoined(collectionName)) {
6858
+ throw new SatelliteConfigError(`"${collectionName}" is a joined handle \u2014 use vault.joined('${collectionName}'), not vault.collection().`);
6859
+ }
6860
+ if (options?.crdt !== void 0 && this.satelliteRegistry?.isPairMember(collectionName)) {
6861
+ throw new SatelliteConfigError("R-S8: crdtMode is refused on either member of a satellite pair in v1 (revert cannot compensate a merge).");
6862
+ }
6863
+ if (options?.satelliteOf !== void 0) {
6864
+ this.satelliteRegistry = declareSatellite({
6865
+ adapter: this.adapter,
6866
+ vaultName: this.name,
6867
+ forgetSubjects: this.forgetStrategy.subjects,
6868
+ getDEK: this.getDEK,
6869
+ getBaseSchema: (base) => this.collectionCache.get(base)?.getSchema(),
6870
+ getBaseCrdt: (base) => this.collectionCache.get(base)?.getConfig()?.crdt,
6871
+ collectionExists: (name) => this.collectionCache.has(name),
6872
+ registerPoisonHook: (hook) => {
6873
+ this.noydb._writeHooks.onBeforeWrite(hook);
6874
+ },
6875
+ forEachSyncEngine: (fn2) => {
6876
+ this.noydb._forEachSyncEngine(this.name, fn2);
6877
+ }
6878
+ }, collectionName, { ...options, satelliteOf: options.satelliteOf }, this.satelliteRegistry);
6879
+ }
6404
6880
  let coll = this.collectionCache.get(collectionName);
6405
6881
  if (coll && options?.moneyFields) {
6406
6882
  coll._applyMoneyFields(options.moneyFields);
@@ -6461,7 +6937,7 @@ var Vault = class {
6461
6937
  const strategies = options.schemaUpdate ?? [];
6462
6938
  const work = (async () => {
6463
6939
  const dek = await this.getDEK(collectionName);
6464
- const { persistSchemaIfNeeded } = await import("./register-V5AQTXNI.js");
6940
+ const { persistSchemaIfNeeded } = await import("./register-5NRE7HBZ.js");
6465
6941
  const result = await persistSchemaIfNeeded({
6466
6942
  store: this.adapter,
6467
6943
  vault: this.name,
@@ -6640,7 +7116,7 @@ var Vault = class {
6640
7116
  const work = (async () => {
6641
7117
  try {
6642
7118
  const dek = await this.getDEK(collectionName);
6643
- await (await import("./register-V5AQTXNI.js")).persistSchemaIfNeeded({
7119
+ await (await import("./register-5NRE7HBZ.js")).persistSchemaIfNeeded({
6644
7120
  store: this.adapter,
6645
7121
  vault: this.name,
6646
7122
  collectionName,
@@ -6656,8 +7132,27 @@ var Vault = class {
6656
7132
  this._pendingSchemaWrites.push(work);
6657
7133
  }
6658
7134
  }
7135
+ if (this.satelliteRegistry) {
7136
+ const spec = this.satelliteRegistry.bySatellite(collectionName);
7137
+ if (spec) return makeSatelliteProxy(coll, spec, this.satelliteRegistry);
7138
+ const baseSpec = this.satelliteRegistry.satelliteOf(collectionName);
7139
+ if (baseSpec) return makeBaseProxy(coll, baseSpec, this.satelliteRegistry, () => this.collection(baseSpec.satellite));
7140
+ }
6659
7141
  return coll;
6660
7142
  }
7143
+ /** Full-record handle for a satellite pair registered with `joined:` (spec #591). Narrow type — not a Collection. */
7144
+ joined(name) {
7145
+ const spec = this.satelliteRegistry?.byJoined(name);
7146
+ if (!spec) throw new SatelliteConfigError(`No joined handle "${name}" is registered \u2014 declare it via collection(satellite, { joined: '${name}' }).`);
7147
+ return makeJoinedHandle(spec, {
7148
+ spec,
7149
+ base: () => this.collection(spec.base),
7150
+ satellite: () => this.collection(spec.satellite),
7151
+ adapter: this.adapter,
7152
+ vaultName: this.name,
7153
+ registry: this.satelliteRegistry
7154
+ });
7155
+ }
6661
7156
  /**
6662
7157
  * Await all background persisted-schema writes triggered by
6663
7158
  * `collection({ persistJsonSchema: true })` calls on this vault.
@@ -6696,6 +7191,45 @@ var Vault = class {
6696
7191
  if (!coll) return;
6697
7192
  await coll._applyRemoteChange(docId, action);
6698
7193
  }
7194
+ /** @internal #598: refresh cache entries a sync-applied write rewrote underneath us. No-op if not loaded this session. */
7195
+ async _invalidateSyncApplied(collection, id) {
7196
+ const coll = this.collectionCache.get(collection);
7197
+ if (!coll) return;
7198
+ coll._invalidateCekCacheEntry(id);
7199
+ await coll._invalidateCacheEntry(id);
7200
+ }
7201
+ /**
7202
+ * @internal #589 → #604. Physically remove delete markers with `_ts` strictly
7203
+ * older than `before` (ISO timestamp), across `collections` (or all data
7204
+ * collections). Returns the count removed.
7205
+ *
7206
+ * SAFETY: purging a marker RE-OPENS the #589 resurrection window for any peer
7207
+ * offline since before the cutoff — never-GC is safe precisely because the marker
7208
+ * is always present to win convergence. This is an operator-asserted safe-point
7209
+ * ONLY; #604's period-close lifecycle is what earns that assertion. Do not call
7210
+ * it on live/unsettled data.
7211
+ *
7212
+ * Emits no ledger/event yet — #604's period-close, the only intended caller, owns
7213
+ * the audit record.
7214
+ *
7215
+ * Purges the local adapter only; the operator must purge every sync target too, or
7216
+ * the next pull re-imports the markers (benign — they still read deleted — but no
7217
+ * space is reclaimed). #604 owns cross-target purge.
7218
+ */
7219
+ async _purgeDeleteMarkers(before, collections) {
7220
+ const snapshot = await this.adapter.loadAll(this.name);
7221
+ let removed = 0;
7222
+ for (const [coll, records] of Object.entries(snapshot)) {
7223
+ if (collections && !collections.includes(coll)) continue;
7224
+ for (const [id, env] of Object.entries(records)) {
7225
+ if (isDeleteMarker(env) && env._ts < before) {
7226
+ await this.adapter.delete(this.name, coll, id);
7227
+ removed++;
7228
+ }
7229
+ }
7230
+ }
7231
+ return removed;
7232
+ }
6699
7233
  /**
6700
7234
  * For a detected conflict: capture this tab's clobbered record,
6701
7235
  * read the common ancestor from history, converge the cache to the store's
@@ -7464,6 +7998,7 @@ var Vault = class {
7464
7998
  throw new ForgetStrategyNotConfiguredError();
7465
7999
  }
7466
8000
  const refs = await lookupSubject(this.adapter, this.name, this.getDEK, this.encrypted, subjectId);
8001
+ const allRefs = expandRefsWithSatellites(refs, this.satelliteRegistry);
7467
8002
  let recordsShredded = 0;
7468
8003
  let historyVersionsShredded = 0;
7469
8004
  const collections = /* @__PURE__ */ new Set();
@@ -7479,9 +8014,10 @@ var Vault = class {
7479
8014
  const indexResidue = [];
7480
8015
  const blobsEnabled = this.blobStrategy !== void 0;
7481
8016
  const actor = this.keyring.userId;
7482
- for (const ref2 of refs) {
8017
+ for (const ref2 of allRefs) {
7483
8018
  const coll = this.collection(ref2.collection);
7484
- const perRecordKeys = this.forgetStrategy.subjects[ref2.collection] !== void 0;
8019
+ const satelliteOf = ref2.satelliteOf;
8020
+ const perRecordKeys = this.forgetStrategy.subjects[satelliteOf ?? ref2.collection] !== void 0;
7485
8021
  const live = await this.adapter.get(this.name, ref2.collection, ref2.id);
7486
8022
  if (perRecordKeys && live && live._data && !hasPerRecordKey(live)) {
7487
8023
  unmigratedRecords.push(`${ref2.collection}:${ref2.id}`);
@@ -7513,7 +8049,17 @@ var Vault = class {
7513
8049
  } catch {
7514
8050
  sealedCekResidue.push(`${ref2.collection}:${ref2.id}`);
7515
8051
  }
7516
- const shred = await coll._writeTombstone(ref2.id, actor);
8052
+ let shred;
8053
+ try {
8054
+ shred = await coll._writeTombstone(ref2.id, actor);
8055
+ } catch (cause) {
8056
+ if (satelliteOf === void 0) throw cause;
8057
+ throw new SatelliteConfigError(
8058
+ // R-S4: abort the whole forget rather than leave the heavy side un-erased
8059
+ `R-S4: forget could not fan out to satellite "${ref2.collection}" \u2014 aborting rather than leaving the heavy side`,
8060
+ { cause }
8061
+ );
8062
+ }
7517
8063
  if (shred !== null) {
7518
8064
  recordsShredded++;
7519
8065
  collections.add(ref2.collection);
@@ -7723,7 +8269,7 @@ var Vault = class {
7723
8269
  async _initDerivations(handles) {
7724
8270
  if (handles.length === 0) return;
7725
8271
  const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
7726
- import("./registry-IMNMHWTM.js"),
8272
+ import("./registry-5QLETK3Q.js"),
7727
8273
  import("./read-only-facade-5ADRJVTM.js")
7728
8274
  ]);
7729
8275
  const registry = new DerivationRegistry();
@@ -7754,7 +8300,7 @@ var Vault = class {
7754
8300
  */
7755
8301
  async _initMaterializedViews(handles) {
7756
8302
  if (handles.length === 0) return;
7757
- const { MaterializedViewRegistry } = await import("./registry-K6VUQXKV.js");
8303
+ const { MaterializedViewRegistry } = await import("./registry-DYTNLOJC.js");
7758
8304
  const registry = new MaterializedViewRegistry();
7759
8305
  this.materializedViewRegistry = registry;
7760
8306
  const db = this;
@@ -7778,7 +8324,7 @@ var Vault = class {
7778
8324
  */
7779
8325
  async _initOverlayedViews(handles) {
7780
8326
  if (handles.length === 0) return;
7781
- const { OverlayedViewRegistry } = await import("./registry-ZVO3T4M5.js");
8327
+ const { OverlayedViewRegistry } = await import("./registry-HSNQ4NBP.js");
7782
8328
  const registry = new OverlayedViewRegistry();
7783
8329
  const mvRegistry = this.materializedViewRegistry;
7784
8330
  const overlayNames = /* @__PURE__ */ new Set();
@@ -7825,13 +8371,13 @@ var Vault = class {
7825
8371
  if (!reg) {
7826
8372
  throw new Error(`refreshView: no MV registered with name "${name}"`);
7827
8373
  }
7828
- const { MaterializedViewExecutor } = await import("./executor-FGISLQIN.js");
8374
+ const { MaterializedViewExecutor } = await import("./executor-6LHOV7MN.js");
7829
8375
  const result = await MaterializedViewExecutor.refresh(reg, {
7830
8376
  getCollection: (n) => this.collection(n),
7831
8377
  getActiveTxContext: () => this.noydb._activeTxContextOrNull,
7832
8378
  getQueryContext: () => this
7833
8379
  });
7834
- const { clearMVStale } = await import("./stale-7Q62KVI3.js");
8380
+ const { clearMVStale } = await import("./stale-DP66HFT3.js");
7835
8381
  clearMVStale(registry, name);
7836
8382
  return result;
7837
8383
  }
@@ -7847,7 +8393,7 @@ var Vault = class {
7847
8393
  if (registry === null) return { derived: 0, failed: 0 };
7848
8394
  const strategies = registry.strategiesForSource(sourceCollection);
7849
8395
  if (strategies.length === 0) return { derived: 0, failed: 0 };
7850
- const { DerivationExecutor } = await import("./executor-CBTNU5VZ.js");
8396
+ const { DerivationExecutor } = await import("./executor-EUPYHCLU.js");
7851
8397
  const sourceColl = this.collection(sourceCollection);
7852
8398
  const records = await sourceColl.list();
7853
8399
  const ctx = { vault: this.derivationFacade ?? new (await import("./read-only-facade-5ADRJVTM.js")).ReadOnlyVaultFacade(this, "derivation") };
@@ -7872,7 +8418,7 @@ var Vault = class {
7872
8418
  if (!outSpec) continue;
7873
8419
  const outputColl = this.collection(outSpec.collection);
7874
8420
  if (out.kind === "array") {
7875
- const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-WS22Q5WH.js");
8421
+ const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-BDKLP5GG.js");
7876
8422
  const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key, this.getDEK, this.encrypted);
7877
8423
  const prevKeys = new Set(prior?.keys ?? []);
7878
8424
  const newKeysList = out.entries.map((e) => e.key);
@@ -8094,7 +8640,7 @@ var Vault = class {
8094
8640
  * collection.
8095
8641
  */
8096
8642
  async delegate(opts) {
8097
- const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-BQNIEHZE.js");
8643
+ const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-FDOXXHNG.js");
8098
8644
  if (!this.keyring.kek) {
8099
8645
  throw new ValidationError(
8100
8646
  "issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (passphrase) first."
@@ -8116,7 +8662,7 @@ var Vault = class {
8116
8662
  * if the id does not exist.
8117
8663
  */
8118
8664
  async revokeDelegation(id) {
8119
- const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-BQNIEHZE.js");
8665
+ const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-FDOXXHNG.js");
8120
8666
  await revokeDelegation(this.adapter, this.name, id);
8121
8667
  void DELEGATIONS_COLLECTION;
8122
8668
  }
@@ -8332,7 +8878,7 @@ var Vault = class {
8332
8878
  * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
8333
8879
  */
8334
8880
  async dumpSchema(opts = {}) {
8335
- const { dumpVaultSchema } = await import("./walk-T65TZDN2.js");
8881
+ const { dumpVaultSchema } = await import("./walk-3SB25HF2.js");
8336
8882
  return dumpVaultSchema(this, opts);
8337
8883
  }
8338
8884
  /**
@@ -8467,7 +9013,7 @@ var Vault = class {
8467
9013
  * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md
8468
9014
  */
8469
9015
  async getPublicEnvelope(opts = {}) {
8470
- const { readPublicEnvelope } = await import("./public-envelope-MRN5YYZZ.js");
9016
+ const { readPublicEnvelope } = await import("./public-envelope-CBRIJORQ.js");
8471
9017
  return readPublicEnvelope(this.adapter, this.name, opts);
8472
9018
  }
8473
9019
  /**
@@ -8482,7 +9028,7 @@ var Vault = class {
8482
9028
  * both modes round-trip cleanly.
8483
9029
  */
8484
9030
  async dump() {
8485
- const { dumpVault } = await import("./backup-OPONO6Q5.js");
9031
+ const { dumpVault } = await import("./backup-7PX6NDKT.js");
8486
9032
  return dumpVault(this.backupContext());
8487
9033
  }
8488
9034
  /**
@@ -8534,7 +9080,7 @@ var Vault = class {
8534
9080
  * — there's no chain to verify against.
8535
9081
  */
8536
9082
  async load(backupJson) {
8537
- const { loadVault } = await import("./backup-OPONO6Q5.js");
9083
+ const { loadVault } = await import("./backup-7PX6NDKT.js");
8538
9084
  return loadVault(this.backupContext(), backupJson);
8539
9085
  }
8540
9086
  /**
@@ -8566,7 +9112,7 @@ var Vault = class {
8566
9112
  * way to detect tampering of an in-place vault.
8567
9113
  */
8568
9114
  async verifyBackupIntegrity() {
8569
- const { verifyBackupIntegrity } = await import("./backup-OPONO6Q5.js");
9115
+ const { verifyBackupIntegrity } = await import("./backup-7PX6NDKT.js");
8570
9116
  return verifyBackupIntegrity(this.backupContext());
8571
9117
  }
8572
9118
  /**
@@ -8784,7 +9330,7 @@ var Vault = class {
8784
9330
  * is the live validator object, not a serialization of it).
8785
9331
  */
8786
9332
  async exportJSON(opts = {}) {
8787
- const { exportVaultJSON } = await import("./backup-OPONO6Q5.js");
9333
+ const { exportVaultJSON } = await import("./backup-7PX6NDKT.js");
8788
9334
  return exportVaultJSON(this.backupContext(), opts);
8789
9335
  }
8790
9336
  };
@@ -10656,7 +11202,7 @@ var Noydb = class {
10656
11202
  if (!facade) return;
10657
11203
  const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
10658
11204
  await registry.runChecks(e.collection, incoming, ctx);
10659
- const { GuardExecutor } = await import("./executor-DJHNSTIR.js");
11205
+ const { GuardExecutor } = await import("./executor-KZ4B3PRT.js");
10660
11206
  for (const g of guards) {
10661
11207
  await GuardExecutor.checkFrozenFields(g, e.docId, existing, incoming, e.computedFieldNames);
10662
11208
  }
@@ -10821,7 +11367,8 @@ var Noydb = class {
10821
11367
  onDirty: targets.length > 0 ? async (coll, id, action, version) => {
10822
11368
  for (const [key, engine] of this.syncEngines) {
10823
11369
  if (key === name || key.startsWith(`${name}::`)) {
10824
- void engine.trackChange(coll, id, action, version);
11370
+ if (action === "revert") void engine.removeDirty(coll, id);
11371
+ else void engine.trackChange(coll, id, action, version);
10825
11372
  }
10826
11373
  }
10827
11374
  } : void 0,
@@ -10873,6 +11420,9 @@ var Noydb = class {
10873
11420
  return refreshed;
10874
11421
  } : void 0
10875
11422
  });
11423
+ this._forEachSyncEngine(name, (engine) => {
11424
+ engine.setCacheInvalidator((collection, id) => comp._invalidateSyncApplied(collection, id));
11425
+ });
10876
11426
  await comp._initGuards(this.options.guardStrategies ?? []);
10877
11427
  await comp._initDerivations(this.options.derivationStrategies ?? []);
10878
11428
  await comp._initMaterializedViews(this.options.materializedViewStrategies ?? []);
@@ -11487,6 +12037,9 @@ var Noydb = class {
11487
12037
  }
11488
12038
  return engine;
11489
12039
  }
12040
+ _forEachSyncEngine(vault, fn2) {
12041
+ for (const [key, engine] of this.syncEngines) if (key === vault || key.startsWith(`${vault}::`)) fn2(engine);
12042
+ }
11490
12043
  // ─── Events ────────────────────────────────────────────────────
11491
12044
  on(event, handler) {
11492
12045
  this.emitter.on(event, handler);
@@ -11909,7 +12462,7 @@ var Noydb = class {
11909
12462
  "setPublicEnvelope: the public-envelope feature is not enabled. Pass `publicEnvelope: true` (or a schema object) to `createNoydb`."
11910
12463
  );
11911
12464
  }
11912
- const { loadPublicEnvelope, savePublicEnvelope, resolveSchema, validatePublicEnvelopeInput } = await import("./public-envelope-MRN5YYZZ.js");
12465
+ const { loadPublicEnvelope, savePublicEnvelope, resolveSchema, validatePublicEnvelopeInput } = await import("./public-envelope-CBRIJORQ.js");
11913
12466
  const schema = resolveSchema(this.options.publicEnvelope);
11914
12467
  validatePublicEnvelopeInput(input, schema);
11915
12468
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -11938,7 +12491,7 @@ var Noydb = class {
11938
12491
  * regardless).
11939
12492
  */
11940
12493
  async getPublicEnvelope(vault, opts = {}) {
11941
- const { readPublicEnvelope } = await import("./public-envelope-MRN5YYZZ.js");
12494
+ const { readPublicEnvelope } = await import("./public-envelope-CBRIJORQ.js");
11942
12495
  return readPublicEnvelope(this.options.store, vault, opts);
11943
12496
  }
11944
12497
  // ─── Auth introspection ─────────────────────────────────────────
@@ -12129,9 +12682,9 @@ async function createNoydb(options) {
12129
12682
  throw new ValidationError("A secret (passphrase) or getKeyring callback is required when encryption is enabled");
12130
12683
  }
12131
12684
  if (!options.coordinationStrategy) options = { ...options, coordinationStrategy: await createDefaultCoordinationProvider(options.store) };
12132
- if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-JOXUNSKP.js")).createUserApi };
12685
+ if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-Z66JMGOU.js")).createUserApi };
12133
12686
  if (!options.policyFactory) {
12134
- const policyModule = await import("./policy-YIKUH4AD.js");
12687
+ const policyModule = await import("./policy-SXPLTQS4.js");
12135
12688
  options = { ...options, policyFactory: policyModule.createNoydbPolicy, policyCheckGateFn: policyModule.checkGate };
12136
12689
  }
12137
12690
  return new Noydb(options);
@@ -12166,4 +12719,4 @@ export {
12166
12719
  Noydb,
12167
12720
  createNoydb
12168
12721
  };
12169
- //# sourceMappingURL=chunk-IEUIUSBO.js.map
12722
+ //# sourceMappingURL=chunk-5K7KZMXG.js.map