@noy-db/hub 0.3.0-pre.1 → 0.3.0-pre.10

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 (435) hide show
  1. package/dist/aggregate/index.d.ts +3 -4
  2. package/dist/aggregate/index.js +9 -8
  3. package/dist/aggregate/index.js.map +1 -1
  4. package/dist/api-TX2EX2FX.js +20 -0
  5. package/dist/as/index.d.ts +4 -5
  6. package/dist/as/index.js +12 -6
  7. package/dist/at/index.d.ts +2 -3
  8. package/dist/attestation/index.d.ts +3 -4
  9. package/dist/attestation/index.js +19 -13
  10. package/dist/attestation/index.js.map +1 -1
  11. package/dist/{backup-XV3IOEGB.js → backup-R7NTDFKY.js} +14 -6
  12. package/dist/backup-R7NTDFKY.js.map +1 -0
  13. package/dist/blobs/index.d.ts +4 -5
  14. package/dist/blobs/index.js +12 -6
  15. package/dist/blobs/index.js.map +1 -1
  16. package/dist/bundle/index.d.ts +5 -6
  17. package/dist/bundle/index.js +21 -15
  18. package/dist/bundle/index.js.map +1 -1
  19. package/dist/{bundle-CH-H06dp.d.ts → bundle-D6GxiUfq.d.ts} +1 -1
  20. package/dist/by/index.js +2 -2
  21. package/dist/cargo/index.d.ts +4 -6
  22. package/dist/cargo/index.js +27 -21
  23. package/dist/chunk-2OV5NVE7.js +95 -0
  24. package/dist/chunk-2OV5NVE7.js.map +1 -0
  25. package/dist/{chunk-5N6CZTCY.js → chunk-2OZXVKVP.js} +3 -3
  26. package/dist/{chunk-BG3SPSR4.js → chunk-2REPHKET.js} +5 -4
  27. package/dist/chunk-2REPHKET.js.map +1 -0
  28. package/dist/{chunk-LXQT4WMP.js → chunk-3JXPAHOZ.js} +8 -6
  29. package/dist/{chunk-LXQT4WMP.js.map → chunk-3JXPAHOZ.js.map} +1 -1
  30. package/dist/{chunk-UAG5KWVA.js → chunk-3MATJ6O4.js} +3 -3
  31. package/dist/chunk-3OPY6MK2.js +404 -0
  32. package/dist/chunk-3OPY6MK2.js.map +1 -0
  33. package/dist/{chunk-62QYRORB.js → chunk-3QSIU3UT.js} +34 -63
  34. package/dist/chunk-3QSIU3UT.js.map +1 -0
  35. package/dist/{chunk-DGDI2D4M.js → chunk-4OMCIY6F.js} +29 -9
  36. package/dist/chunk-4OMCIY6F.js.map +1 -0
  37. package/dist/chunk-5I35DOHK.js +94 -0
  38. package/dist/chunk-5I35DOHK.js.map +1 -0
  39. package/dist/{chunk-2P2HZEXU.js → chunk-5VG4IJR7.js} +11 -9
  40. package/dist/{chunk-2P2HZEXU.js.map → chunk-5VG4IJR7.js.map} +1 -1
  41. package/dist/{chunk-AZAOEIKW.js → chunk-5YESYH2C.js} +2 -2
  42. package/dist/{chunk-GYGWYIOZ.js → chunk-6G5ORS5D.js} +7 -5
  43. package/dist/{chunk-GYGWYIOZ.js.map → chunk-6G5ORS5D.js.map} +1 -1
  44. package/dist/{chunk-VCTFO5CO.js → chunk-6P5XCKSD.js} +2 -2
  45. package/dist/{chunk-IO6GRPT6.js → chunk-7BWJHO2A.js} +2 -2
  46. package/dist/{chunk-IPB7FTQX.js → chunk-7P2SDJG3.js} +15 -9
  47. package/dist/chunk-7P2SDJG3.js.map +1 -0
  48. package/dist/{chunk-SRB2XEWB.js → chunk-ANB77BVV.js} +6 -4
  49. package/dist/chunk-ANB77BVV.js.map +1 -0
  50. package/dist/{chunk-UDRIWL7A.js → chunk-BKARNZJN.js} +3 -3
  51. package/dist/{chunk-Y22T3KQE.js → chunk-BQISD5ZV.js} +3 -3
  52. package/dist/chunk-BQISD5ZV.js.map +1 -0
  53. package/dist/{chunk-UIU2THRG.js → chunk-BUAQ7YI3.js} +138 -378
  54. package/dist/chunk-BUAQ7YI3.js.map +1 -0
  55. package/dist/{chunk-V7RWQRG7.js → chunk-CB7CWSKW.js} +3 -3
  56. package/dist/{chunk-LV7M27WM.js → chunk-DFVUTGT2.js} +14 -201
  57. package/dist/chunk-DFVUTGT2.js.map +1 -0
  58. package/dist/{chunk-CWPPNPOH.js → chunk-DJ7KIPLV.js} +2 -2
  59. package/dist/{chunk-5R5JW2JT.js → chunk-DSKDQP3G.js} +3480 -1916
  60. package/dist/chunk-DSKDQP3G.js.map +1 -0
  61. package/dist/{chunk-VFQGRQIH.js → chunk-DV4HUP5G.js} +7 -5
  62. package/dist/{chunk-VFQGRQIH.js.map → chunk-DV4HUP5G.js.map} +1 -1
  63. package/dist/{chunk-5LUY7UTV.js → chunk-EOXAAJTY.js} +289 -48
  64. package/dist/chunk-EOXAAJTY.js.map +1 -0
  65. package/dist/chunk-ET67AY6B.js +74 -0
  66. package/dist/chunk-ET67AY6B.js.map +1 -0
  67. package/dist/{chunk-TA66UMI4.js → chunk-F4CEK5YM.js} +2 -2
  68. package/dist/chunk-FORYWFN6.js +130 -0
  69. package/dist/chunk-FORYWFN6.js.map +1 -0
  70. package/dist/{chunk-IELYAOGG.js → chunk-FRP6D2DM.js} +19 -6
  71. package/dist/chunk-FRP6D2DM.js.map +1 -0
  72. package/dist/chunk-FUOE7UUV.js +341 -0
  73. package/dist/chunk-FUOE7UUV.js.map +1 -0
  74. package/dist/{chunk-SM3AVUHC.js → chunk-G4JYND6L.js} +2 -2
  75. package/dist/{chunk-AXRXJTE2.js → chunk-G6XV4H65.js} +5 -5
  76. package/dist/{chunk-I2NOIW44.js → chunk-GNMXXTMN.js} +8 -6
  77. package/dist/{chunk-I2NOIW44.js.map → chunk-GNMXXTMN.js.map} +1 -1
  78. package/dist/chunk-GYGLAVCX.js +19 -0
  79. package/dist/chunk-GYGLAVCX.js.map +1 -0
  80. package/dist/{chunk-UV5MFVO3.js → chunk-HPWKV3YB.js} +2 -2
  81. package/dist/chunk-HY3AUMFI.js +41 -0
  82. package/dist/chunk-HY3AUMFI.js.map +1 -0
  83. package/dist/chunk-HYR4WZZ3.js +69 -0
  84. package/dist/chunk-HYR4WZZ3.js.map +1 -0
  85. package/dist/{chunk-SKF73JOP.js → chunk-ICXIFFYZ.js} +3 -3
  86. package/dist/chunk-IGJCYUT5.js +99 -0
  87. package/dist/chunk-IGJCYUT5.js.map +1 -0
  88. package/dist/{chunk-MD3Y6J3L.js → chunk-IVLTXX4W.js} +7 -5
  89. package/dist/{chunk-MD3Y6J3L.js.map → chunk-IVLTXX4W.js.map} +1 -1
  90. package/dist/{chunk-WWGT2MDV.js → chunk-J4LPNIGK.js} +26 -11
  91. package/dist/chunk-J4LPNIGK.js.map +1 -0
  92. package/dist/chunk-JJZ2LW6T.js +36 -0
  93. package/dist/chunk-JJZ2LW6T.js.map +1 -0
  94. package/dist/{chunk-RUIMKQTA.js → chunk-JK733I5V.js} +1 -1
  95. package/dist/chunk-JK733I5V.js.map +1 -0
  96. package/dist/{chunk-UPJNJGGA.js → chunk-KJ2BCBTL.js} +25 -8
  97. package/dist/chunk-KJ2BCBTL.js.map +1 -0
  98. package/dist/{chunk-LMTH2RM6.js → chunk-KNZB6JMR.js} +2 -2
  99. package/dist/{chunk-I3TIKTJO.js → chunk-KPZS5QAQ.js} +29 -10
  100. package/dist/chunk-KPZS5QAQ.js.map +1 -0
  101. package/dist/{chunk-PKHL44ER.js → chunk-LEJIKBBB.js} +2 -2
  102. package/dist/{chunk-AQTBSL7R.js → chunk-LL2NIVUR.js} +14 -7
  103. package/dist/chunk-LL2NIVUR.js.map +1 -0
  104. package/dist/chunk-LP7BEXCT.js +32 -0
  105. package/dist/chunk-LP7BEXCT.js.map +1 -0
  106. package/dist/{chunk-5O3AOPDT.js → chunk-MCHVVJIA.js} +443 -467
  107. package/dist/chunk-MCHVVJIA.js.map +1 -0
  108. package/dist/chunk-NO272T7Q.js +194 -0
  109. package/dist/chunk-NO272T7Q.js.map +1 -0
  110. package/dist/{chunk-LFLXAY2W.js → chunk-NUEQU36L.js} +71 -93
  111. package/dist/chunk-NUEQU36L.js.map +1 -0
  112. package/dist/chunk-O45M6LDB.js +38 -0
  113. package/dist/chunk-O45M6LDB.js.map +1 -0
  114. package/dist/{chunk-PSMV73A5.js → chunk-OBKWYKYC.js} +5 -5
  115. package/dist/{chunk-CMGR4ZEW.js → chunk-OHHKHSJP.js} +2 -2
  116. package/dist/{chunk-HCIPRAGS.js → chunk-OT76OZL6.js} +2 -2
  117. package/dist/{chunk-ITNUCOXM.js → chunk-OVYRLHPE.js} +7 -5
  118. package/dist/{chunk-ITNUCOXM.js.map → chunk-OVYRLHPE.js.map} +1 -1
  119. package/dist/{chunk-SMXWYP24.js → chunk-OXCSVM3B.js} +3 -3
  120. package/dist/{chunk-IGUYVGGI.js → chunk-P33LUIML.js} +3 -3
  121. package/dist/{chunk-JNUWZ6D3.js → chunk-PLS64NCS.js} +7 -5
  122. package/dist/{chunk-JNUWZ6D3.js.map → chunk-PLS64NCS.js.map} +1 -1
  123. package/dist/{chunk-EIZUR2XW.js → chunk-PS2NEWEX.js} +2 -2
  124. package/dist/chunk-QA2KUPCP.js +45 -0
  125. package/dist/chunk-QA2KUPCP.js.map +1 -0
  126. package/dist/{chunk-WYSO2NIH.js → chunk-QOC3VYL2.js} +2 -2
  127. package/dist/{chunk-FISN7WE4.js → chunk-QSFOZUYL.js} +30 -5
  128. package/dist/{chunk-FISN7WE4.js.map → chunk-QSFOZUYL.js.map} +1 -1
  129. package/dist/{chunk-KVOXU4T5.js → chunk-RHK32N73.js} +2 -2
  130. package/dist/{chunk-3YFXJ3ZP.js → chunk-RW3Y22MW.js} +2 -2
  131. package/dist/{chunk-ZYUC53LT.js → chunk-S7VFUQM2.js} +117 -3
  132. package/dist/chunk-S7VFUQM2.js.map +1 -0
  133. package/dist/chunk-T7WSLRAU.js +49 -0
  134. package/dist/chunk-T7WSLRAU.js.map +1 -0
  135. package/dist/{chunk-IUEN57TV.js → chunk-TAKWLZZX.js} +280 -58
  136. package/dist/chunk-TAKWLZZX.js.map +1 -0
  137. package/dist/chunk-THNJ3IKU.js +17 -0
  138. package/dist/chunk-THNJ3IKU.js.map +1 -0
  139. package/dist/{chunk-MTMJVJ5W.js → chunk-TMBXVJKT.js} +5 -3
  140. package/dist/chunk-TMBXVJKT.js.map +1 -0
  141. package/dist/{chunk-QHJW5EXU.js → chunk-TWKKOM55.js} +2 -2
  142. package/dist/{chunk-M6OST55S.js → chunk-U3WZCU7E.js} +2 -2
  143. package/dist/{chunk-AIWULCUO.js → chunk-UF362QVH.js} +5 -3
  144. package/dist/{chunk-AIWULCUO.js.map → chunk-UF362QVH.js.map} +1 -1
  145. package/dist/{chunk-KXGNJJXB.js → chunk-UN4FVIBH.js} +7 -7
  146. package/dist/chunk-VEAVKDDB.js +29 -0
  147. package/dist/chunk-VEAVKDDB.js.map +1 -0
  148. package/dist/chunk-VEPTFUJY.js +29 -0
  149. package/dist/chunk-VEPTFUJY.js.map +1 -0
  150. package/dist/{chunk-TEILUWOI.js → chunk-VJV7GKQK.js} +10 -12
  151. package/dist/chunk-VJV7GKQK.js.map +1 -0
  152. package/dist/chunk-VQRAIPYF.js +50 -0
  153. package/dist/chunk-VQRAIPYF.js.map +1 -0
  154. package/dist/{chunk-NF5JWERG.js → chunk-VRIYFLBA.js} +2 -2
  155. package/dist/chunk-VWM3DAVB.js +265 -0
  156. package/dist/chunk-VWM3DAVB.js.map +1 -0
  157. package/dist/{chunk-RUEKROOS.js → chunk-VWRRVE6D.js} +2 -2
  158. package/dist/chunk-VYYM3MEN.js +98 -0
  159. package/dist/chunk-VYYM3MEN.js.map +1 -0
  160. package/dist/chunk-WBJIQSLL.js +167 -0
  161. package/dist/chunk-WBJIQSLL.js.map +1 -0
  162. package/dist/{chunk-XXYIOFUB.js → chunk-WIGQB62E.js} +5 -5
  163. package/dist/chunk-WZSCE6RM.js +466 -0
  164. package/dist/chunk-WZSCE6RM.js.map +1 -0
  165. package/dist/{chunk-5R3ERCDH.js → chunk-XGDAPN6M.js} +25 -9
  166. package/dist/{chunk-5R3ERCDH.js.map → chunk-XGDAPN6M.js.map} +1 -1
  167. package/dist/{chunk-DFEMTNPJ.js → chunk-XH7XP3OL.js} +8 -6
  168. package/dist/{chunk-DFEMTNPJ.js.map → chunk-XH7XP3OL.js.map} +1 -1
  169. package/dist/{chunk-IAGBDSCS.js → chunk-XREOISSI.js} +2 -2
  170. package/dist/chunk-XUBPSPKD.js +164 -0
  171. package/dist/chunk-XUBPSPKD.js.map +1 -0
  172. package/dist/chunk-Y3A5CB5G.js +247 -0
  173. package/dist/chunk-Y3A5CB5G.js.map +1 -0
  174. package/dist/{chunk-ZCGAHGUS.js → chunk-YCXCR7VG.js} +2 -2
  175. package/dist/{chunk-76722EBH.js → chunk-YMVQD5Q5.js} +11 -9
  176. package/dist/{chunk-76722EBH.js.map → chunk-YMVQD5Q5.js.map} +1 -1
  177. package/dist/{chunk-5TDJ56JE.js → chunk-YN5IAHN6.js} +1 -1
  178. package/dist/chunk-YN5IAHN6.js.map +1 -0
  179. package/dist/{chunk-TJYQIGAP.js → chunk-ZYJ55N7N.js} +9 -5
  180. package/dist/chunk-ZYJ55N7N.js.map +1 -0
  181. package/dist/classified/index.d.ts +16 -0
  182. package/dist/classified/index.js +40 -0
  183. package/dist/classified-marker-H6YSHYNK.js +24 -0
  184. package/dist/classified-marker-H6YSHYNK.js.map +1 -0
  185. package/dist/collection-facade-LVD22JLM.js +39 -0
  186. package/dist/computed-EXDMQODG.js +11 -0
  187. package/dist/consent/index.d.ts +3 -4
  188. package/dist/consent/index.js +10 -4
  189. package/dist/consent/index.js.map +1 -1
  190. package/dist/crdt/index.d.ts +3 -4
  191. package/dist/dead-filter-HQIE2YG7.js +28 -0
  192. package/dist/dead-filter-HQIE2YG7.js.map +1 -0
  193. package/dist/delegation-BJP73GAP.js +25 -0
  194. package/dist/derivations/index.d.ts +4 -5
  195. package/dist/derivations/index.js +13 -6
  196. package/dist/derive-BME7HDWO.js +21 -0
  197. package/dist/{dev-unlock-C9Ro3v_O.d.ts → dev-unlock-Bmm2pgJ0.d.ts} +1 -1
  198. package/dist/{enclave-UL5LW66V.js → enclave-NHORSWSF.js} +55 -18
  199. package/dist/executor-FE6X4LFX.js +9 -0
  200. package/dist/executor-KSHKRJXP.js +25 -0
  201. package/dist/executor-ZHTJJICG.js +9 -0
  202. package/dist/export-accessible-DACHM5VT.js +23 -0
  203. package/dist/extract-partition-RNENZZ4T.js +36 -0
  204. package/dist/{fanout-sidecar-GF3DJ6KR.js → fanout-sidecar-OFWN3NM7.js} +17 -14
  205. package/dist/fanout-sidecar-OFWN3NM7.js.map +1 -0
  206. package/dist/fence-watcher-DHQ775JB.js +69 -0
  207. package/dist/fence-watcher-DHQ775JB.js.map +1 -0
  208. package/dist/find-BNGBJNKP.js +11 -0
  209. package/dist/forget/index.d.ts +2 -2
  210. package/dist/forget/index.js +10 -4
  211. package/dist/forget/index.js.map +1 -1
  212. package/dist/guards/index.d.ts +4 -5
  213. package/dist/guards/index.js +4 -4
  214. package/dist/{hash-Cp5uwiox.d.ts → hash-DAJjMsCE.d.ts} +7 -2
  215. package/dist/history/index.d.ts +4 -5
  216. package/dist/history/index.js +12 -6
  217. package/dist/history/index.js.map +1 -1
  218. package/dist/i18n/index.d.ts +24 -5
  219. package/dist/i18n/index.js +50 -31
  220. package/dist/i18n/index.js.map +1 -1
  221. package/dist/in/index.d.ts +2 -3
  222. package/dist/{index-BzUo1B6n.d.ts → index-DjWbxsjb.d.ts} +8596 -5747
  223. package/dist/{index-BF9_96A5.d.ts → index-qwuNvO2B.d.ts} +26 -5
  224. package/dist/index.d.ts +116 -24
  225. package/dist/index.js +1479 -139
  226. package/dist/index.js.map +1 -1
  227. package/dist/indexing/index.d.ts +3 -4
  228. package/dist/indexing/index.js +4 -4
  229. package/dist/issue-NDI4CVZU.js +19 -0
  230. package/dist/json-schema-I22JCYCG.js +44 -0
  231. package/dist/json-schema-I22JCYCG.js.map +1 -0
  232. package/dist/lazy/index.d.ts +20 -0
  233. package/dist/lazy/index.js +12 -0
  234. package/dist/{ledger-RYI35CDS.js → ledger-6NDS2EO4.js} +12 -6
  235. package/dist/liberate-HN3RIGIP.js +24 -0
  236. package/dist/link-set-SJB2MVJV.js +31 -0
  237. package/dist/materialized-views/index.d.ts +22 -6
  238. package/dist/materialized-views/index.js +20 -10
  239. package/dist/{mime-magic-CGhw37_E.d.ts → mime-magic-bBj5OgUC.d.ts} +1 -1
  240. package/dist/noydb-BWF6EPIR.js +66 -0
  241. package/dist/on/index.d.ts +2 -3
  242. package/dist/on/index.js +10 -4
  243. package/dist/overlay-views/index.d.ts +4 -5
  244. package/dist/overlay-views/index.js +4 -4
  245. package/dist/periods/index.d.ts +3 -4
  246. package/dist/periods/index.js +21 -7
  247. package/dist/pod/index.d.ts +3 -4
  248. package/dist/pod/index.js +12 -6
  249. package/dist/{policy-IXK4FVXP.js → policy-WGNAG5H6.js} +5 -5
  250. package/dist/portability/index.d.ts +3 -4
  251. package/dist/portability/index.js +8 -8
  252. package/dist/post-register-CWKBQRC7.js +55 -0
  253. package/dist/post-register-CWKBQRC7.js.map +1 -0
  254. package/dist/{public-envelope-JHDQCPSX.js → public-envelope-EJLVIFX7.js} +4 -4
  255. package/dist/query/index.d.ts +2 -3
  256. package/dist/query/index.js +9 -6
  257. package/dist/{read-only-facade-5ADRJVTM.js → read-only-facade-CHCKSEPD.js} +2 -2
  258. package/dist/register-SBIX7TVV.js +23 -0
  259. package/dist/registry-3EQG6OOE.js +18 -0
  260. package/dist/registry-CA327ACV.js +9 -0
  261. package/dist/registry-E7OXOTSV.js +19 -0
  262. package/dist/request-withdrawal-KAH2AAXC.js +31 -0
  263. package/dist/reveal-R3JLHMUF.js +38 -0
  264. package/dist/reveal-R3JLHMUF.js.map +1 -0
  265. package/dist/revoke-IXLOJ3IH.js +24 -0
  266. package/dist/satellites/index.d.ts +4 -0
  267. package/dist/satellites/index.js +8 -0
  268. package/dist/sealed-record/index.d.ts +3 -4
  269. package/dist/sealed-record/index.js +13 -7
  270. package/dist/sealed-record/index.js.map +1 -1
  271. package/dist/session/index.d.ts +4 -5
  272. package/dist/session/index.js +10 -4
  273. package/dist/session/index.js.map +1 -1
  274. package/dist/shadow/index.d.ts +3 -4
  275. package/dist/shadow/index.js +2 -2
  276. package/dist/signer-Y46N2GJ3.js +25 -0
  277. package/dist/signer-Y46N2GJ3.js.map +1 -0
  278. package/dist/snapshots/index.d.ts +3 -4
  279. package/dist/snapshots/index.js +11 -5
  280. package/dist/snapshots/index.js.map +1 -1
  281. package/dist/{stale-3JWHNDIY.js → stale-Z7IW6RIL.js} +2 -2
  282. package/dist/stale-Z7IW6RIL.js.map +1 -0
  283. package/dist/storage-ADNP2UWI.js +23 -0
  284. package/dist/storage-ADNP2UWI.js.map +1 -0
  285. package/dist/{store-coordination-provider-3I7XWZZK.js → store-coordination-provider-DTDMI6VL.js} +3 -3
  286. package/dist/{subject-index-O75wKshW.d.ts → subject-index-CyOgGMJL.d.ts} +18 -0
  287. package/dist/sync/index.d.ts +2 -3
  288. package/dist/sync/index.js +10 -4
  289. package/dist/sync/index.js.map +1 -1
  290. package/dist/team/index.d.ts +45 -7
  291. package/dist/team/index.js +25 -12
  292. package/dist/tiers/index.d.ts +2 -3
  293. package/dist/tiers/index.js +11 -5
  294. package/dist/to/index.d.ts +2 -3
  295. package/dist/to/index.js +1 -2
  296. package/dist/{transition-guard-C7ol6oPw.d.ts → transition-guard-DI-krBsZ.d.ts} +1 -1
  297. package/dist/tx/index.d.ts +3 -4
  298. package/dist/tx/index.js +3 -3
  299. package/dist/ui/index.d.ts +4 -1
  300. package/dist/util/index.js +1 -1
  301. package/dist/validators-BUcli5Nh.d.ts +101 -0
  302. package/dist/{vault-diff-B5fYNBL7.d.ts → vault-diff-Z2DUayMe.d.ts} +1 -1
  303. package/dist/verify-JPF2YR5E.js +139 -0
  304. package/dist/verify-JPF2YR5E.js.map +1 -0
  305. package/dist/walk-XYA2O3LW.js +241 -0
  306. package/dist/walk-XYA2O3LW.js.map +1 -0
  307. package/dist/with/index.d.ts +3 -4
  308. package/dist/with/index.js +12 -6
  309. package/dist/{with-materialized-view-6p0Fk8bL.d.ts → with-materialized-view-BUmzlXue.d.ts} +1 -1
  310. package/dist/{with-overlayed-view-BJ6mXGMd.d.ts → with-overlayed-view-m4FaXXTO.d.ts} +1 -1
  311. package/dist/{with-rollup-BvQo3ROo.d.ts → with-rollup-DEKGI9vb.d.ts} +1 -1
  312. package/dist/withdraw-accessible-WLV4MTEN.js +28 -0
  313. package/dist/withdraw-accessible-WLV4MTEN.js.map +1 -0
  314. package/package.json +16 -16
  315. package/dist/adapter/index.d.ts +0 -5
  316. package/dist/adapter/index.js +0 -15
  317. package/dist/api-RW3KP7WU.js +0 -14
  318. package/dist/backup-XV3IOEGB.js.map +0 -1
  319. package/dist/chunk-26LGBE4T.js +0 -42
  320. package/dist/chunk-26LGBE4T.js.map +0 -1
  321. package/dist/chunk-5LUY7UTV.js.map +0 -1
  322. package/dist/chunk-5O3AOPDT.js.map +0 -1
  323. package/dist/chunk-5R5JW2JT.js.map +0 -1
  324. package/dist/chunk-5TDJ56JE.js.map +0 -1
  325. package/dist/chunk-62QYRORB.js.map +0 -1
  326. package/dist/chunk-AQTBSL7R.js.map +0 -1
  327. package/dist/chunk-BG3SPSR4.js.map +0 -1
  328. package/dist/chunk-BGIZAFY7.js +0 -1
  329. package/dist/chunk-DGDI2D4M.js.map +0 -1
  330. package/dist/chunk-I3TIKTJO.js.map +0 -1
  331. package/dist/chunk-IELYAOGG.js.map +0 -1
  332. package/dist/chunk-IPB7FTQX.js.map +0 -1
  333. package/dist/chunk-IUEN57TV.js.map +0 -1
  334. package/dist/chunk-K2WCO3NX.js +0 -1
  335. package/dist/chunk-LFLXAY2W.js.map +0 -1
  336. package/dist/chunk-LV7M27WM.js.map +0 -1
  337. package/dist/chunk-M2YKN37S.js +0 -524
  338. package/dist/chunk-M2YKN37S.js.map +0 -1
  339. package/dist/chunk-MTMJVJ5W.js.map +0 -1
  340. package/dist/chunk-Q7SS3IME.js +0 -120
  341. package/dist/chunk-Q7SS3IME.js.map +0 -1
  342. package/dist/chunk-RUIMKQTA.js.map +0 -1
  343. package/dist/chunk-SRB2XEWB.js.map +0 -1
  344. package/dist/chunk-TEILUWOI.js.map +0 -1
  345. package/dist/chunk-TJYQIGAP.js.map +0 -1
  346. package/dist/chunk-UIU2THRG.js.map +0 -1
  347. package/dist/chunk-UPJNJGGA.js.map +0 -1
  348. package/dist/chunk-WWGT2MDV.js.map +0 -1
  349. package/dist/chunk-Y22T3KQE.js.map +0 -1
  350. package/dist/chunk-ZYUC53LT.js.map +0 -1
  351. package/dist/collection-facade-GQAOGJP2.js +0 -33
  352. package/dist/delegation-UL5HKLER.js +0 -19
  353. package/dist/describe/index.d.ts +0 -1
  354. package/dist/describe/index.js +0 -1
  355. package/dist/describe-aBkJR2sd.d.ts +0 -131
  356. package/dist/executor-2FWQRLMG.js +0 -15
  357. package/dist/executor-QZ7BXICW.js +0 -9
  358. package/dist/executor-Z5ZLJVTV.js +0 -9
  359. package/dist/export-accessible-KRV5W4GH.js +0 -17
  360. package/dist/extract-partition-GLKBOXFQ.js +0 -30
  361. package/dist/fanout-sidecar-GF3DJ6KR.js.map +0 -1
  362. package/dist/issue-Y6UVIR43.js +0 -13
  363. package/dist/kernel/index.d.ts +0 -32
  364. package/dist/kernel/index.js +0 -53
  365. package/dist/liberate-CRPZEV7O.js +0 -18
  366. package/dist/noydb-367AM4HT.js +0 -50
  367. package/dist/registry-45RJNWGU.js +0 -9
  368. package/dist/registry-5GRV5VXI.js +0 -13
  369. package/dist/registry-WEUCHBO4.js +0 -11
  370. package/dist/request-withdrawal-GBPH2FDY.js +0 -25
  371. package/dist/revoke-TUFRGI6S.js +0 -18
  372. package/dist/signer-PNKTBVF7.js +0 -19
  373. package/dist/withdraw-accessible-FFS46EOD.js +0 -22
  374. /package/dist/{adapter/index.js.map → api-TX2EX2FX.js.map} +0 -0
  375. /package/dist/{chunk-5N6CZTCY.js.map → chunk-2OZXVKVP.js.map} +0 -0
  376. /package/dist/{chunk-UAG5KWVA.js.map → chunk-3MATJ6O4.js.map} +0 -0
  377. /package/dist/{chunk-AZAOEIKW.js.map → chunk-5YESYH2C.js.map} +0 -0
  378. /package/dist/{chunk-VCTFO5CO.js.map → chunk-6P5XCKSD.js.map} +0 -0
  379. /package/dist/{chunk-IO6GRPT6.js.map → chunk-7BWJHO2A.js.map} +0 -0
  380. /package/dist/{chunk-UDRIWL7A.js.map → chunk-BKARNZJN.js.map} +0 -0
  381. /package/dist/{chunk-V7RWQRG7.js.map → chunk-CB7CWSKW.js.map} +0 -0
  382. /package/dist/{chunk-CWPPNPOH.js.map → chunk-DJ7KIPLV.js.map} +0 -0
  383. /package/dist/{chunk-TA66UMI4.js.map → chunk-F4CEK5YM.js.map} +0 -0
  384. /package/dist/{chunk-SM3AVUHC.js.map → chunk-G4JYND6L.js.map} +0 -0
  385. /package/dist/{chunk-AXRXJTE2.js.map → chunk-G6XV4H65.js.map} +0 -0
  386. /package/dist/{chunk-UV5MFVO3.js.map → chunk-HPWKV3YB.js.map} +0 -0
  387. /package/dist/{chunk-SKF73JOP.js.map → chunk-ICXIFFYZ.js.map} +0 -0
  388. /package/dist/{chunk-LMTH2RM6.js.map → chunk-KNZB6JMR.js.map} +0 -0
  389. /package/dist/{chunk-PKHL44ER.js.map → chunk-LEJIKBBB.js.map} +0 -0
  390. /package/dist/{chunk-PSMV73A5.js.map → chunk-OBKWYKYC.js.map} +0 -0
  391. /package/dist/{chunk-CMGR4ZEW.js.map → chunk-OHHKHSJP.js.map} +0 -0
  392. /package/dist/{chunk-HCIPRAGS.js.map → chunk-OT76OZL6.js.map} +0 -0
  393. /package/dist/{chunk-SMXWYP24.js.map → chunk-OXCSVM3B.js.map} +0 -0
  394. /package/dist/{chunk-IGUYVGGI.js.map → chunk-P33LUIML.js.map} +0 -0
  395. /package/dist/{chunk-EIZUR2XW.js.map → chunk-PS2NEWEX.js.map} +0 -0
  396. /package/dist/{chunk-WYSO2NIH.js.map → chunk-QOC3VYL2.js.map} +0 -0
  397. /package/dist/{chunk-KVOXU4T5.js.map → chunk-RHK32N73.js.map} +0 -0
  398. /package/dist/{chunk-3YFXJ3ZP.js.map → chunk-RW3Y22MW.js.map} +0 -0
  399. /package/dist/{chunk-QHJW5EXU.js.map → chunk-TWKKOM55.js.map} +0 -0
  400. /package/dist/{chunk-M6OST55S.js.map → chunk-U3WZCU7E.js.map} +0 -0
  401. /package/dist/{chunk-KXGNJJXB.js.map → chunk-UN4FVIBH.js.map} +0 -0
  402. /package/dist/{chunk-NF5JWERG.js.map → chunk-VRIYFLBA.js.map} +0 -0
  403. /package/dist/{chunk-RUEKROOS.js.map → chunk-VWRRVE6D.js.map} +0 -0
  404. /package/dist/{chunk-XXYIOFUB.js.map → chunk-WIGQB62E.js.map} +0 -0
  405. /package/dist/{chunk-IAGBDSCS.js.map → chunk-XREOISSI.js.map} +0 -0
  406. /package/dist/{chunk-ZCGAHGUS.js.map → chunk-YCXCR7VG.js.map} +0 -0
  407. /package/dist/{describe → classified}/index.js.map +0 -0
  408. /package/dist/{api-RW3KP7WU.js.map → collection-facade-LVD22JLM.js.map} +0 -0
  409. /package/dist/{chunk-BGIZAFY7.js.map → computed-EXDMQODG.js.map} +0 -0
  410. /package/dist/{chunk-K2WCO3NX.js.map → delegation-BJP73GAP.js.map} +0 -0
  411. /package/dist/{collection-facade-GQAOGJP2.js.map → derive-BME7HDWO.js.map} +0 -0
  412. /package/dist/{delegation-UL5HKLER.js.map → enclave-NHORSWSF.js.map} +0 -0
  413. /package/dist/{enclave-UL5LW66V.js.map → executor-FE6X4LFX.js.map} +0 -0
  414. /package/dist/{executor-2FWQRLMG.js.map → executor-KSHKRJXP.js.map} +0 -0
  415. /package/dist/{executor-QZ7BXICW.js.map → executor-ZHTJJICG.js.map} +0 -0
  416. /package/dist/{executor-Z5ZLJVTV.js.map → export-accessible-DACHM5VT.js.map} +0 -0
  417. /package/dist/{export-accessible-KRV5W4GH.js.map → extract-partition-RNENZZ4T.js.map} +0 -0
  418. /package/dist/{extract-partition-GLKBOXFQ.js.map → find-BNGBJNKP.js.map} +0 -0
  419. /package/dist/{issue-Y6UVIR43.js.map → issue-NDI4CVZU.js.map} +0 -0
  420. /package/dist/{kernel → lazy}/index.js.map +0 -0
  421. /package/dist/{ledger-RYI35CDS.js.map → ledger-6NDS2EO4.js.map} +0 -0
  422. /package/dist/{liberate-CRPZEV7O.js.map → liberate-HN3RIGIP.js.map} +0 -0
  423. /package/dist/{noydb-367AM4HT.js.map → link-set-SJB2MVJV.js.map} +0 -0
  424. /package/dist/{policy-IXK4FVXP.js.map → noydb-BWF6EPIR.js.map} +0 -0
  425. /package/dist/{public-envelope-JHDQCPSX.js.map → policy-WGNAG5H6.js.map} +0 -0
  426. /package/dist/{read-only-facade-5ADRJVTM.js.map → public-envelope-EJLVIFX7.js.map} +0 -0
  427. /package/dist/{registry-45RJNWGU.js.map → read-only-facade-CHCKSEPD.js.map} +0 -0
  428. /package/dist/{registry-5GRV5VXI.js.map → register-SBIX7TVV.js.map} +0 -0
  429. /package/dist/{registry-WEUCHBO4.js.map → registry-3EQG6OOE.js.map} +0 -0
  430. /package/dist/{request-withdrawal-GBPH2FDY.js.map → registry-CA327ACV.js.map} +0 -0
  431. /package/dist/{revoke-TUFRGI6S.js.map → registry-E7OXOTSV.js.map} +0 -0
  432. /package/dist/{signer-PNKTBVF7.js.map → request-withdrawal-KAH2AAXC.js.map} +0 -0
  433. /package/dist/{stale-3JWHNDIY.js.map → revoke-IXLOJ3IH.js.map} +0 -0
  434. /package/dist/{withdraw-accessible-FFS46EOD.js.map → satellites/index.js.map} +0 -0
  435. /package/dist/{store-coordination-provider-3I7XWZZK.js.map → store-coordination-provider-DTDMI6VL.js.map} +0 -0
@@ -1,13 +1,19 @@
1
1
  import {
2
2
  readPod,
3
3
  writePod
4
- } from "../chunk-FISN7WE4.js";
5
- import "../chunk-SMXWYP24.js";
6
- import "../chunk-5O3AOPDT.js";
7
- import "../chunk-5TDJ56JE.js";
4
+ } from "../chunk-QSFOZUYL.js";
5
+ import "../chunk-OXCSVM3B.js";
6
+ import "../chunk-MCHVVJIA.js";
7
+ import "../chunk-QA2KUPCP.js";
8
+ import "../chunk-2OV5NVE7.js";
9
+ import "../chunk-VEPTFUJY.js";
10
+ import "../chunk-HYR4WZZ3.js";
11
+ import "../chunk-LP7BEXCT.js";
12
+ import "../chunk-3OPY6MK2.js";
13
+ import "../chunk-YN5IAHN6.js";
8
14
  import {
9
15
  SnapshotNotFoundError
10
- } from "../chunk-ZYUC53LT.js";
16
+ } from "../chunk-S7VFUQM2.js";
11
17
  import "../chunk-PZ5AY32C.js";
12
18
 
13
19
  // src/with-fork/snapshots/engine.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-fork/snapshots/engine.ts","../../src/with-fork/snapshots/active.ts"],"sourcesContent":["import { writePod, readPod } from '../../with-pod/bundle.js'\nimport { SnapshotNotFoundError } from '../../kernel/errors.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { SnapshotMeta, RetentionPolicy, SnapshotIndex } from './strategy.js'\n\nexport class SnapshotEngine {\n constructor(\n private readonly store: NoydbPodStore,\n private readonly retention: RetentionPolicy,\n ) {}\n\n private indexKey(vaultName: string): string {\n return `${vaultName}__index`\n }\n\n private snapKey(vaultName: string, n: number): string {\n return `${vaultName}__snap_${n.toString().padStart(6, '0')}`\n }\n\n private autoKey(vaultName: string): string {\n return `${vaultName}__auto`\n }\n\n private async readIndex(\n vaultName: string,\n ): Promise<{ index: SnapshotIndex; indexVersion: string | null }> {\n const result = await this.store.readBundle(this.indexKey(vaultName))\n if (!result) return { index: { snapshots: [], nextCounter: 1 }, indexVersion: null }\n const text = new TextDecoder().decode(result.bytes)\n return { index: JSON.parse(text) as SnapshotIndex, indexVersion: result.version }\n }\n\n private async writeIndex(\n vaultName: string,\n index: SnapshotIndex,\n expectedVersion: string | null,\n ): Promise<void> {\n const bytes = new TextEncoder().encode(JSON.stringify(index))\n await this.store.writeBundle(this.indexKey(vaultName), bytes, expectedVersion)\n }\n\n async snapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.snapKey(vault.name, index.nextCounter)\n\n // Write blob first. If the subsequent index write fails, the next snapshot()\n // call will re-derive the same key (counter not persisted) and overwrite this blob.\n // This is an accepted v1 trade-off: failure window is narrow and requires a store\n // error between the two writes. A retry produces a fresh snapshot at the same key.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n ...(opts?.label !== undefined ? { label: opts.label } : {}),\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n }\n\n const newIndex: SnapshotIndex = {\n snapshots: [...index.snapshots, meta],\n nextCounter: index.nextCounter + 1,\n // Preserve the rolling auto slot — on-demand snapshots never touch it.\n ...(index.auto ? { auto: index.auto } : {}),\n }\n const toDelete = this.applyRetention(newIndex)\n await this.writeIndex(vault.name, newIndex, indexVersion)\n\n for (const k of toDelete) {\n await this.store.deleteBundle(k)\n }\n\n return meta\n }\n\n /**\n * Rolling auto-snapshot. Overwrites the single fixed `<vault>__auto` key and\n * stores its meta in `index.auto`, separate from the immutable `snapshots`\n * pool — retention never prunes it. Used by the cadence scheduler.\n */\n async autoSnapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.autoKey(vault.name)\n\n // Unconditional overwrite of the rolling slot.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n label: opts?.label ?? 'auto',\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n auto: true,\n }\n\n index.auto = meta\n await this.writeIndex(vault.name, index, indexVersion)\n return meta\n }\n\n async listSnapshots(vaultId: string): Promise<SnapshotMeta[]> {\n const { index } = await this.readIndex(vaultId)\n const immutable = [...index.snapshots].reverse()\n return index.auto ? [index.auto, ...immutable] : immutable\n }\n\n async restoreSnapshot(vault: Vault, version: string): Promise<void> {\n if (!version.startsWith(`${vault.name}__`)) throw new SnapshotNotFoundError(version)\n const result = await this.store.readBundle(version)\n if (!result) throw new SnapshotNotFoundError(version)\n const { dumpJson } = await readPod(result.bytes)\n await vault.load(dumpJson)\n }\n\n /**\n * Applies the configured retention policy to `index`, mutating `index.snapshots`\n * in place and returning the blob keys that should be deleted from the store.\n * Called by `snapshot()` before the index is written.\n *\n * @internal — public for direct testing only\n */\n applyRetention(index: SnapshotIndex): string[] {\n const prune = this.retention.prune ?? true\n if (!prune) return []\n\n const toDelete: string[] = []\n let remaining = index.snapshots.slice()\n\n if (this.retention.keepLast !== undefined && remaining.length > this.retention.keepLast) {\n const excess = remaining.splice(0, remaining.length - this.retention.keepLast)\n toDelete.push(...excess.map(m => m.version))\n }\n\n if (this.retention.maxAgeDays !== undefined) {\n const cutoffMs = this.retention.maxAgeDays * 86_400_000\n const now = Date.now()\n const fresh = remaining.filter(m => now - new Date(m.exportedAt).getTime() <= cutoffMs)\n toDelete.push(...remaining.filter(m => !fresh.includes(m)).map(m => m.version))\n remaining = fresh\n }\n\n index.snapshots = remaining\n return toDelete\n }\n}\n","import { SnapshotEngine } from './engine.js'\nimport type { SnapshotStrategy, RetentionPolicy } from './strategy.js'\nimport type { SnapshotPolicy } from './policy.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport interface WithSnapshotsOptions {\n /** Bundle store where snapshot blobs and the sidecar index are written. */\n store: NoydbPodStore\n /**\n * Declarative retention policy. Enforced eagerly after each on-demand `snapshot()`.\n * Defaults to no retention (all on-demand snapshots kept forever). Never affects\n * the rolling auto-snapshot.\n */\n retention?: RetentionPolicy\n /**\n * Automatic-snapshot cadence. Default `mode:'manual'` ⇒ no timers; snapshots\n * stay on-demand. Set `mode:'debounce'`/`'interval'` to enable auto-snapshots\n * to the rolling `<vault>__auto` key.\n */\n snapshotPolicy?: SnapshotPolicy\n}\n\nexport function withSnapshots(opts: WithSnapshotsOptions): SnapshotStrategy {\n const engine = new SnapshotEngine(opts.store, opts.retention ?? {})\n return {\n snapshot(vault, by, snapOpts) {\n return engine.snapshot(vault as Vault, by, snapOpts)\n },\n listSnapshots(vaultId) {\n return engine.listSnapshots(vaultId)\n },\n restoreSnapshot(vault, version) {\n return engine.restoreSnapshot(vault as Vault, version)\n },\n autoSnapshot(vault, by, snapOpts) {\n return engine.autoSnapshot(vault as Vault, by, snapOpts)\n },\n ...(opts.snapshotPolicy ? { policy: opts.snapshotPolicy } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAMO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YACmB,OACA,WACjB;AAFiB;AACA;AAAA,EAChB;AAAA,EAFgB;AAAA,EACA;AAAA,EAGX,SAAS,WAA2B;AAC1C,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEQ,QAAQ,WAAmB,GAAmB;AACpD,WAAO,GAAG,SAAS,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;AAAA,EAC5D;AAAA,EAEQ,QAAQ,WAA2B;AACzC,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEA,MAAc,UACZ,WACgE;AAChE,UAAM,SAAS,MAAM,KAAK,MAAM,WAAW,KAAK,SAAS,SAAS,CAAC;AACnE,QAAI,CAAC,OAAQ,QAAO,EAAE,OAAO,EAAE,WAAW,CAAC,GAAG,aAAa,EAAE,GAAG,cAAc,KAAK;AACnF,UAAM,OAAO,IAAI,YAAY,EAAE,OAAO,OAAO,KAAK;AAClD,WAAO,EAAE,OAAO,KAAK,MAAM,IAAI,GAAoB,cAAc,OAAO,QAAQ;AAAA,EAClF;AAAA,EAEA,MAAc,WACZ,WACA,OACA,iBACe;AACf,UAAM,QAAQ,IAAI,YAAY,EAAE,OAAO,KAAK,UAAU,KAAK,CAAC;A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AAM,SAAS,UAAU,OAAO,GAAG,UAAU,SAAS,KAAK,UAAU,QAAQ;AAC7E,eAAS,KAAK,GAAG,OAAO,IAAI,OAAK,EAAE,OAAO,CAAC;AAAA,IAC7C;AAEA,QAAI,KAAK,UAAU,eAAe,QAAW;AAC3C,YAAM,WAAW,KAAK,UAAU,aAAa;AAC7C,YAAM,MAAM,KAAK,IAAI;AACrB,YAAM,QAAQ,UAAU,OAAO,OAAK,MAAM,IAAI,KAAK,EAAE,UAAU,EAAE,QAAQ,KAAK,QAAQ;AACtF,eAAS,KAAK,GAAG,UAAU,OAAO,OAAK,CAAC,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,OAAK,EAAE,OAAO,CAAC;AAC9E,kBAAY;AAAA,IACd;AAEA,UAAM,YAAY;AAClB,WAAO;AAAA,EACT;AACF;;;ACzIO,SAAS,cAAc,MAA8C;AAC1E,QAAM,SAAS,IAAI,eAAe,KAAK,OAAO,KAAK,aAAa,CAAC,CAAC;AAClE,SAAO;AAAA,IACL,SAAS,OAAO,IAAI,UAAU;AAC5B,aAAO,OAAO,SAAS,OAAgB,IAAI,QAAQ;AAAA,IACrD;AAAA,IACA,cAAc,SAAS;AACrB,aAAO,OAAO,cAAc,OAAO;AAAA,IACrC;AAAA,IACA,gBAAgB,OAAO,SAAS;AAC9B,aAAO,OAAO,gBAAgB,OAAgB,OAAO;AAAA,IACvD;AAAA,IACA,aAAa,OAAO,IAAI,UAAU;AAChC,aAAO,OAAO,aAAa,OAAgB,IAAI,QAAQ;AAAA,IACzD;AAAA,IACA,GAAI,KAAK,iBAAiB,EAAE,QAAQ,KAAK,eAAe,IAAI,CAAC;AAAA,EAC/D;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-fork/snapshots/engine.ts","../../src/with-fork/snapshots/active.ts"],"sourcesContent":["import { writePod, readPod } from '../../with-pod/bundle.js'\nimport { SnapshotNotFoundError } from '../../kernel/errors.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { SnapshotMeta, RetentionPolicy, SnapshotIndex } from './strategy.js'\n\nexport class SnapshotEngine {\n constructor(\n private readonly store: NoydbPodStore,\n private readonly retention: RetentionPolicy,\n ) {}\n\n private indexKey(vaultName: string): string {\n return `${vaultName}__index`\n }\n\n private snapKey(vaultName: string, n: number): string {\n return `${vaultName}__snap_${n.toString().padStart(6, '0')}`\n }\n\n private autoKey(vaultName: string): string {\n return `${vaultName}__auto`\n }\n\n private async readIndex(\n vaultName: string,\n ): Promise<{ index: SnapshotIndex; indexVersion: string | null }> {\n const result = await this.store.readBundle(this.indexKey(vaultName))\n if (!result) return { index: { snapshots: [], nextCounter: 1 }, indexVersion: null }\n const text = new TextDecoder().decode(result.bytes)\n return { index: JSON.parse(text) as SnapshotIndex, indexVersion: result.version }\n }\n\n private async writeIndex(\n vaultName: string,\n index: SnapshotIndex,\n expectedVersion: string | null,\n ): Promise<void> {\n const bytes = new TextEncoder().encode(JSON.stringify(index))\n await this.store.writeBundle(this.indexKey(vaultName), bytes, expectedVersion)\n }\n\n async snapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.snapKey(vault.name, index.nextCounter)\n\n // Write blob first. If the subsequent index write fails, the next snapshot()\n // call will re-derive the same key (counter not persisted) and overwrite this blob.\n // This is an accepted v1 trade-off: failure window is narrow and requires a store\n // error between the two writes. A retry produces a fresh snapshot at the same key.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n ...(opts?.label !== undefined ? { label: opts.label } : {}),\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n }\n\n const newIndex: SnapshotIndex = {\n snapshots: [...index.snapshots, meta],\n nextCounter: index.nextCounter + 1,\n // Preserve the rolling auto slot — on-demand snapshots never touch it.\n ...(index.auto ? { auto: index.auto } : {}),\n }\n const toDelete = this.applyRetention(newIndex)\n await this.writeIndex(vault.name, newIndex, indexVersion)\n\n for (const k of toDelete) {\n await this.store.deleteBundle(k)\n }\n\n return meta\n }\n\n /**\n * Rolling auto-snapshot. Overwrites the single fixed `<vault>__auto` key and\n * stores its meta in `index.auto`, separate from the immutable `snapshots`\n * pool — retention never prunes it. Used by the cadence scheduler.\n */\n async autoSnapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.autoKey(vault.name)\n\n // Unconditional overwrite of the rolling slot.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n label: opts?.label ?? 'auto',\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n auto: true,\n }\n\n index.auto = meta\n await this.writeIndex(vault.name, index, indexVersion)\n return meta\n }\n\n async listSnapshots(vaultId: string): Promise<SnapshotMeta[]> {\n const { index } = await this.readIndex(vaultId)\n const immutable = [...index.snapshots].reverse()\n return index.auto ? [index.auto, ...immutable] : immutable\n }\n\n async restoreSnapshot(vault: Vault, version: string): Promise<void> {\n if (!version.startsWith(`${vault.name}__`)) throw new SnapshotNotFoundError(version)\n const result = await this.store.readBundle(version)\n if (!result) throw new SnapshotNotFoundError(version)\n const { dumpJson } = await readPod(result.bytes)\n await vault.load(dumpJson)\n }\n\n /**\n * Applies the configured retention policy to `index`, mutating `index.snapshots`\n * in place and returning the blob keys that should be deleted from the store.\n * Called by `snapshot()` before the index is written.\n *\n * @internal — public for direct testing only\n */\n applyRetention(index: SnapshotIndex): string[] {\n const prune = this.retention.prune ?? true\n if (!prune) return []\n\n const toDelete: string[] = []\n let remaining = index.snapshots.slice()\n\n if (this.retention.keepLast !== undefined && remaining.length > this.retention.keepLast) {\n const excess = remaining.splice(0, remaining.length - this.retention.keepLast)\n toDelete.push(...excess.map(m => m.version))\n }\n\n if (this.retention.maxAgeDays !== undefined) {\n const cutoffMs = this.retention.maxAgeDays * 86_400_000\n const now = Date.now()\n const fresh = remaining.filter(m => now - new Date(m.exportedAt).getTime() <= cutoffMs)\n toDelete.push(...remaining.filter(m => !fresh.includes(m)).map(m => m.version))\n remaining = fresh\n }\n\n index.snapshots = remaining\n return toDelete\n }\n}\n","import { SnapshotEngine } from './engine.js'\nimport type { SnapshotStrategy, RetentionPolicy } from './strategy.js'\nimport type { SnapshotPolicy } from './policy.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport interface WithSnapshotsOptions {\n /** Bundle store where snapshot blobs and the sidecar index are written. */\n store: NoydbPodStore\n /**\n * Declarative retention policy. Enforced eagerly after each on-demand `snapshot()`.\n * Defaults to no retention (all on-demand snapshots kept forever). Never affects\n * the rolling auto-snapshot.\n */\n retention?: RetentionPolicy\n /**\n * Automatic-snapshot cadence. Default `mode:'manual'` ⇒ no timers; snapshots\n * stay on-demand. Set `mode:'debounce'`/`'interval'` to enable auto-snapshots\n * to the rolling `<vault>__auto` key.\n */\n snapshotPolicy?: SnapshotPolicy\n}\n\nexport function withSnapshots(opts: WithSnapshotsOptions): SnapshotStrategy {\n const engine = new SnapshotEngine(opts.store, opts.retention ?? {})\n return {\n snapshot(vault, by, snapOpts) {\n return engine.snapshot(vault as Vault, by, snapOpts)\n },\n listSnapshots(vaultId) {\n return engine.listSnapshots(vaultId)\n },\n restoreSnapshot(vault, version) {\n return engine.restoreSnapshot(vault as Vault, version)\n },\n autoSnapshot(vault, by, snapOpts) {\n return engine.autoSnapshot(vault as Vault, by, snapOpts)\n },\n ...(opts.snapshotPolicy ? { policy: opts.snapshotPolicy } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMO,IAAM,iBAAN,MAAqB;AAA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AM,YAAY;AAClB,WAAO;AAAA,EACT;AACF;;;ACzIO,SAAS,cAAc,MAA8C;AAC1E,QAAM,SAAS,IAAI,eAAe,KAAK,OAAO,KAAK,aAAa,CAAC,CAAC;AAClE,SAAO;AAAA,IACL,SAAS,OAAO,IAAI,UAAU;AAC5B,aAAO,OAAO,SAAS,OAAgB,IAAI,QAAQ;AAAA,IACrD;AAAA,IACA,cAAc,SAAS;AACrB,aAAO,OAAO,cAAc,OAAO;AAAA,IACrC;AAAA,IACA,gBAAgB,OAAO,SAAS;AAC9B,aAAO,OAAO,gBAAgB,OAAgB,OAAO;AAAA,IACvD;AAAA,IACA,aAAa,OAAO,IAAI,UAAU;AAChC,aAAO,OAAO,aAAa,OAAgB,IAAI,QAAQ;AAAA,IACzD;AAAA,IACA,GAAI,KAAK,iBAAiB,EAAE,QAAQ,KAAK,eAAe,IAAI,CAAC;AAAA,EAC/D;AACF;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  isMVStale,
4
4
  markMVStale,
5
5
  resolveStaleMVOnRead
6
- } from "./chunk-BG3SPSR4.js";
6
+ } from "./chunk-2REPHKET.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
  export {
9
9
  clearMVStale,
@@ -11,4 +11,4 @@ export {
11
11
  markMVStale,
12
12
  resolveStaleMVOnRead
13
13
  };
14
- //# sourceMappingURL=stale-3JWHNDIY.js.map
14
+ //# sourceMappingURL=stale-Z7IW6RIL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,23 @@
1
+ import {
2
+ SCHEMAS_COLLECTION,
3
+ loadPersistedSchema,
4
+ loadPersistedSchemaEntry,
5
+ savePersistedSchema
6
+ } from "./chunk-T7WSLRAU.js";
7
+ import "./chunk-MCHVVJIA.js";
8
+ import "./chunk-QA2KUPCP.js";
9
+ import "./chunk-2OV5NVE7.js";
10
+ import "./chunk-VEPTFUJY.js";
11
+ import "./chunk-HYR4WZZ3.js";
12
+ import "./chunk-LP7BEXCT.js";
13
+ import "./chunk-3OPY6MK2.js";
14
+ import "./chunk-YN5IAHN6.js";
15
+ import "./chunk-S7VFUQM2.js";
16
+ import "./chunk-PZ5AY32C.js";
17
+ export {
18
+ SCHEMAS_COLLECTION,
19
+ loadPersistedSchema,
20
+ loadPersistedSchemaEntry,
21
+ savePersistedSchema
22
+ };
23
+ //# sourceMappingURL=storage-ADNP2UWI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  loadFence,
3
3
  saveFence
4
- } from "./chunk-IAGBDSCS.js";
4
+ } from "./chunk-XREOISSI.js";
5
5
  import {
6
6
  NOYDB_FORMAT_VERSION
7
- } from "./chunk-5TDJ56JE.js";
7
+ } from "./chunk-YN5IAHN6.js";
8
8
  import "./chunk-PZ5AY32C.js";
9
9
 
10
10
  // src/with-shape/schema-update/client-registry.ts
@@ -139,4 +139,4 @@ function unref(timer) {
139
139
  export {
140
140
  StoreCoordinationProvider
141
141
  };
142
- //# sourceMappingURL=store-coordination-provider-3I7XWZZK.js.map
142
+ //# sourceMappingURL=store-coordination-provider-DTDMI6VL.js.map
@@ -314,6 +314,24 @@ interface ForgetResult {
314
314
  readonly sealedResidue: readonly string[];
315
315
  /** The single `op:'forget'` ledger entry appended for this erasure. */
316
316
  readonly ledgerEntry: LedgerEntry;
317
+ /** #622 — record-grain derived artifacts (MV rows, per-record derived copies) erased
318
+ * because their source subject was forgotten. Overlay outputs are intentionally out of
319
+ * scope here — an overlay is always sourced from an MV, never directly from a subject
320
+ * collection, so the personal-data-bearing MV rows it reads are already erased above. */
321
+ readonly derivedRecordsErased: number;
322
+ /** #622 — aggregate-grain targets (rollups) recomputed without the forgotten contribution. */
323
+ readonly derivedAggregatesRecomputed: number;
324
+ /** #622 — `collection:id` derived writes SKIPPED because the target period is frozen
325
+ * (recompute deferred; the aggregate retains the forgotten contribution — audited). */
326
+ readonly derivedResidueFrozen: readonly string[];
327
+ /** #650 Task 5 (#648) — referencing records tombstoned via a `'ref'` edge's `cascade` policy. */
328
+ readonly lookupReferencesCascaded: number;
329
+ /** #650 Task 5 (#648) — referencing fields cleared via a `'ref'` edge's `nullify` policy. */
330
+ readonly lookupReferencesNullified: number;
331
+ /** #650 Task 5 review (Important fix) — `'ref'` edges whose compare-key could NOT be resolved,
332
+ * even from the LIVE pre-shred backing row — cascade/nullify propagation was SKIPPED for these.
333
+ * Always empty in the ordinary case; non-empty means the skip is reported, never silent. */
334
+ readonly lookupReferencesResidue: readonly string[];
317
335
  }
318
336
 
319
337
  /**
@@ -1,6 +1,5 @@
1
- import { cr as SyncStrategy } from '../index-BzUo1B6n.js';
2
- import '../subject-index-O75wKshW.js';
3
- import '../describe-aBkJR2sd.js';
1
+ import { bW as SyncStrategy } from '../index-DjWbxsjb.js';
2
+ import '../subject-index-CyOgGMJL.js';
4
3
  import '../index-B9QdHytu.js';
5
4
  import '@noy-db/attestation';
6
5
 
@@ -2,11 +2,17 @@ import {
2
2
  PresenceHandle,
3
3
  SyncEngine,
4
4
  SyncTransaction
5
- } from "../chunk-IUEN57TV.js";
5
+ } from "../chunk-TAKWLZZX.js";
6
6
  import "../chunk-VQNJ7UZL.js";
7
- import "../chunk-5O3AOPDT.js";
8
- import "../chunk-5TDJ56JE.js";
9
- import "../chunk-ZYUC53LT.js";
7
+ import "../chunk-MCHVVJIA.js";
8
+ import "../chunk-QA2KUPCP.js";
9
+ import "../chunk-2OV5NVE7.js";
10
+ import "../chunk-VEPTFUJY.js";
11
+ import "../chunk-HYR4WZZ3.js";
12
+ import "../chunk-LP7BEXCT.js";
13
+ import "../chunk-3OPY6MK2.js";
14
+ import "../chunk-YN5IAHN6.js";
15
+ import "../chunk-S7VFUQM2.js";
10
16
  import "../chunk-PZ5AY32C.js";
11
17
 
12
18
  // src/with-party/team/sync-active.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-party/team/sync-active.ts"],"sourcesContent":["/**\n * Active sync strategy — `withSync()` returns the real implementation\n * that wires the `SyncEngine`, `SyncTransaction`, and `PresenceHandle`\n * constructors into the Noydb / Vault / Collection hot paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withSync } from '@noy-db/hub/sync'\n *\n * const db = await createNoydb({\n * store: localStore,\n * sync: remoteStore,\n * user: ...,\n * syncStrategy: withSync(),\n * })\n * ```\n *\n * The factory delegates to the existing `sync.ts`,\n * `sync-transaction.ts`, and `presence.ts` modules. Splitting the\n * import chain through this file is what lets tsup tree-shake the\n * ~856 LOC of replication + presence machinery out of the default\n * bundle when no `withSync()` import is present.\n *\n * Keyring + grant/revoke/magic-link/delegation stay in the always-on\n * core (or tree-shake via direct named imports) — those are required\n * for any multi-user vault, even purely local ones.\n *\n * @public\n */\n\nimport type { SyncStrategy, BuildSyncEngineOptions } from './sync-strategy.js'\nimport type { PresenceHandleOpts } from './presence.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport { SyncEngine } from './sync.js'\nimport { SyncTransaction } from './sync-transaction.js'\nimport { PresenceHandle } from './presence.js'\n\nexport function withSync(): SyncStrategy {\n return {\n buildSyncEngine(opts: BuildSyncEngineOptions): SyncEngine {\n return new SyncEngine(opts)\n },\n buildSyncTransaction(vault: Vault, engine: SyncEngine): SyncTransaction {\n return new SyncTransaction(vault, engine)\n },\n buildPresence<P>(opts: PresenceHandleOpts): PresenceHandle<P> {\n return new PresenceHandle<P>(opts)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;AAuCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL,gBAAgB,MAA0C;AACxD,aAAO,IAAI,WAAW,IAAI;AAAA,IAC5B;AAAA,IACA,qBAAqB,OAAc,QAAqC;AACtE,aAAO,IAAI,gBAAgB,OAAO,MAAM;AAAA,IAC1C;AAAA,IACA,cAAiB,MAA6C;AAC5D,aAAO,IAAI,eAAkB,IAAI;AAAA,IACnC;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-party/team/sync-active.ts"],"sourcesContent":["/**\n * Active sync strategy — `withSync()` returns the real implementation\n * that wires the `SyncEngine`, `SyncTransaction`, and `PresenceHandle`\n * constructors into the Noydb / Vault / Collection hot paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withSync } from '@noy-db/hub/sync'\n *\n * const db = await createNoydb({\n * store: localStore,\n * sync: remoteStore,\n * user: ...,\n * syncStrategy: withSync(),\n * })\n * ```\n *\n * The factory delegates to the existing `sync.ts`,\n * `sync-transaction.ts`, and `presence.ts` modules. Splitting the\n * import chain through this file is what lets tsup tree-shake the\n * ~856 LOC of replication + presence machinery out of the default\n * bundle when no `withSync()` import is present.\n *\n * Keyring + grant/revoke/magic-link/delegation stay in the always-on\n * core (or tree-shake via direct named imports) — those are required\n * for any multi-user vault, even purely local ones.\n *\n * @public\n */\n\nimport type { SyncStrategy, BuildSyncEngineOptions } from './sync-strategy.js'\nimport type { PresenceHandleOpts } from './presence.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport { SyncEngine } from './sync.js'\nimport { SyncTransaction } from './sync-transaction.js'\nimport { PresenceHandle } from './presence.js'\n\nexport function withSync(): SyncStrategy {\n return {\n buildSyncEngine(opts: BuildSyncEngineOptions): SyncEngine {\n return new SyncEngine(opts)\n },\n buildSyncTransaction(vault: Vault, engine: SyncEngine): SyncTransaction {\n return new SyncTransaction(vault, engine)\n },\n buildPresence<P>(opts: PresenceHandleOpts): PresenceHandle<P> {\n return new PresenceHandle<P>(opts)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL,gBAAgB,MAA0C;AACxD,aAAO,IAAI,WAAW,IAAI;AAAA,IAC5B;AAAA,IACA,qBAAqB,OAAc,QAAqC;AACtE,aAAO,IAAI,gBAAgB,OAAO,MAAM;AAAA,IAC1C;AAAA,IACA,cAAiB,MAA6C;AAC5D,aAAO,IAAI,eAAkB,IAAI;AAAA,IACnC;AAAA,EACF;AACF;","names":[]}
@@ -1,10 +1,50 @@
1
- import { cT as NoydbStore, cF as UnlockedKeyring } from '../index-BzUo1B6n.js';
2
- export { dM as BundleRecipient, fg as EnrollAuthenticatorOptions, fh as EnrollAuthenticatorWrappingDEKsOptions, fi as EnrollAuthenticatorWrappingKEKOptions, gf as ListUsersOptions, h2 as PaperRecoveryEntry, he as PresenceHandle, hI as RecoverPassphraseInput, hJ as RecoverPassphraseResult, hK as RecoverUserOptions, hN as RecoveryProof, hZ as RotatePassphraseInput, iw as SlotRewrapCeremony, ix as SlotRewrapContext, iG as SyncEngine, iO as SyncTransaction, j6 as UpdateAuthenticatorOptions, jn as WrappedDeksBlob, jy as buildRecipientKeyringFile, jz as burnPaperRecoveryEntry, kO as changeSecret, kP as createOwnerKeyring, jF as deriveMagicLinkContentKey, jJ as enrollAuthenticator, kQ as ensureCollectionDEK, jN as evaluateExportCapability, jP as evaluateImportCapability, jS as findAuthenticator, kR as grant, jT as hasExportCapability, jU as hasImportCapability, jX as isMagicLinkGrantExpired, k4 as listMagicLinkGrants, k5 as listUsers, k6 as listUsersWithEnvelopes, kS as loadKeyring, k9 as loadPaperRecoveryEntries, kc as magicLinkGrantRecordId, kd as mintPaperRecoveryEntry, kf as mintWrappedDeksBlob, kT as persistKeyring, kk as readMagicLinkGrantRecord, k1 as recoverPassphrase, km as recoverUser, kq as removeAuthenticator, kU as revoke, kw as revokeMagicLinkGrant, k2 as rotatePassphrase, ky as savePaperRecoveryEntries, kC as unwrapDeksFromBlob, kD as unwrapDeksFromPaperEntry, kF as unwrapMagicLinkGrant, kV as updateAuthenticator, kW as updateKeyringIdentity, kN as writeMagicLinkGrant } from '../index-BzUo1B6n.js';
3
- import '../subject-index-O75wKshW.js';
4
- import '../describe-aBkJR2sd.js';
1
+ import { jA as TeamStrategy, c_ as NoydbStore, c8 as UnlockedKeyring } from '../index-DjWbxsjb.js';
2
+ export { e8 as BundleRecipient, fO as EnrollAuthenticatorOptions, fP as EnrollAuthenticatorWrappingDEKsOptions, fQ as EnrollAuthenticatorWrappingKEKOptions, gQ as ListUsersOptions, hm as NO_TEAM, hF as PaperRecoveryEntry, hR as PresenceHandle, ik as RecoverPassphraseInput, il as RecoverPassphraseResult, im as RecoverUserOptions, iq as RecoveryProof, iD as RotatePassphraseInput, j9 as SlotRewrapCeremony, ja as SlotRewrapContext, jj as SyncEngine, jr as SyncTransaction, jz as TeamNotEnabledError, jO as UpdateAuthenticatorOptions, k7 as WrappedDeksBlob, ki as buildRecipientKeyringFile, kj as burnPaperRecoveryEntry, lD as changeSecret, lE as createOwnerKeyring, kp as deriveMagicLinkContentKey, ku as enrollAuthenticator, lF as ensureCollectionDEK, kz as evaluateExportCapability, kB as evaluateImportCapability, kE as findAuthenticator, lG as grant, kF as hasExportCapability, kG as hasImportCapability, kJ as isMagicLinkGrantExpired, kT as listMagicLinkGrants, kU as listUsers, kV as listUsersWithEnvelopes, lH as loadKeyring, kY as loadPaperRecoveryEntries, l0 as magicLinkGrantRecordId, l1 as mintPaperRecoveryEntry, l3 as mintWrappedDeksBlob, lI as persistKeyring, l8 as readMagicLinkGrantRecord, kQ as recoverPassphrase, la as recoverUser, le as removeAuthenticator, lJ as revoke, lk as revokeMagicLinkGrant, kR as rotatePassphrase, lm as savePaperRecoveryEntries, lq as unwrapDeksFromBlob, lr as unwrapDeksFromPaperEntry, lt as unwrapMagicLinkGrant, lK as updateAuthenticator, lL as updateKeyringIdentity, lC as writeMagicLinkGrant } from '../index-DjWbxsjb.js';
3
+ import '../subject-index-CyOgGMJL.js';
5
4
  import '../index-B9QdHytu.js';
6
5
  import '@noy-db/attestation';
7
6
 
7
+ /**
8
+ * Enable the multi-user team capability (#267 Track A tail).
9
+ *
10
+ * Pass to `createNoydb({ teamStrategy: withTeam() })` to make `db.grant` /
11
+ * `db.revoke` / `db.rotate` live. The keyring grant/revoke/rotate engines
12
+ * are statically imported HERE — this module is reachable only through the
13
+ * `@noy-db/hub/team` subpath (and the root barrel's tree-shakeable
14
+ * re-export), so a single-user floor bundle never carries them. The facade
15
+ * (`TeamFacade.runGrant` / `runRevoke` / `runRotate`) owns the policy-gate +
16
+ * keyring plumbing and receives the engine as an argument.
17
+ */
18
+
19
+ declare function withTeam(): TeamStrategy;
20
+
21
+ /**
22
+ * Secret-bearing reserved collections — the `_`-prefixed reserved collections
23
+ * whose record CONTENTS are directly-usable secrets (transport OAuth tokens,
24
+ * connection strings, API keys), as opposed to the *operational* reserved
25
+ * collections (`_ledger`, `_history`, `_sync`, …) whose contents are metadata
26
+ * (collection names, record ids, ciphertext hashes).
27
+ *
28
+ * This distinction matters at two trust-boundary seams:
29
+ *
30
+ * 1. `vault.collection()` — a secret-bearing reserved name must never be
31
+ * reachable through the generic public collection handle. It is served
32
+ * ONLY by its dedicated, role-gated API (e.g. `_sync_credentials` →
33
+ * `getCredential`/`putCredential`, which enforce owner/admin access).
34
+ *
35
+ * 2. `grant()` DEK propagation — a sub-admin grantee (operator, viewer,
36
+ * client, custodian) must NOT receive a secret-bearing collection's DEK.
37
+ * Operational reserved DEKs still propagate to every role (grantees must
38
+ * write ledger/history entries on every mutation), but handing a
39
+ * sub-admin the `_sync_credentials` DEK would let them decrypt the firm's
40
+ * transport secrets — a plaintext leak, not a metadata leak.
41
+ *
42
+ * Kept dependency-free so both the kernel (`vault.ts`) and the team layer
43
+ * (`keyring.ts`) can import it without an import cycle.
44
+ */
45
+ /** Reserved collection holding per-adapter sync transport secrets. */
46
+ declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
47
+
8
48
  /**
9
49
  * _sync_credentials reserved collection —
10
50
  *
@@ -44,8 +84,6 @@ import '@noy-db/attestation';
44
84
  * against the caller's keyring role at call time.
45
85
  */
46
86
 
47
- /** The reserved collection name. Never collides with user collections. */
48
- declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
49
87
  /**
50
88
  * An OAuth/auth token stored in `_sync_credentials`.
51
89
  *
@@ -113,4 +151,4 @@ declare function credentialStatus(adapter: NoydbStore, vault: string, keyring: U
113
151
  expired: boolean;
114
152
  }>;
115
153
 
116
- export { SYNC_CREDENTIALS_COLLECTION, type SyncCredential, UnlockedKeyring, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential };
154
+ export { SYNC_CREDENTIALS_COLLECTION, type SyncCredential, TeamStrategy, UnlockedKeyring, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential, withTeam };
@@ -1,12 +1,13 @@
1
1
  import {
2
- SYNC_CREDENTIALS_COLLECTION,
3
2
  credentialStatus,
4
3
  deleteCredential,
5
4
  getCredential,
6
5
  listCredentials,
7
- putCredential
8
- } from "../chunk-DGDI2D4M.js";
6
+ putCredential,
7
+ withTeam
8
+ } from "../chunk-4OMCIY6F.js";
9
9
  import {
10
+ NO_TEAM,
10
11
  deriveMagicLinkContentKey,
11
12
  enrollAuthenticator,
12
13
  findAuthenticator,
@@ -22,7 +23,7 @@ import {
22
23
  unwrapMagicLinkGrant,
23
24
  updateAuthenticator,
24
25
  writeMagicLinkGrant
25
- } from "../chunk-UPJNJGGA.js";
26
+ } from "../chunk-KJ2BCBTL.js";
26
27
  import {
27
28
  burnPaperRecoveryEntry,
28
29
  loadPaperRecoveryEntries,
@@ -31,15 +32,16 @@ import {
31
32
  savePaperRecoveryEntries,
32
33
  unwrapDeksFromBlob,
33
34
  unwrapDeksFromPaperEntry
34
- } from "../chunk-IGUYVGGI.js";
35
- import "../chunk-IO6GRPT6.js";
35
+ } from "../chunk-P33LUIML.js";
36
36
  import {
37
37
  PresenceHandle,
38
38
  SyncEngine,
39
39
  SyncTransaction
40
- } from "../chunk-IUEN57TV.js";
40
+ } from "../chunk-TAKWLZZX.js";
41
41
  import "../chunk-VQNJ7UZL.js";
42
+ import "../chunk-7BWJHO2A.js";
42
43
  import {
44
+ SYNC_CREDENTIALS_COLLECTION,
43
45
  buildRecipientKeyringFile,
44
46
  changeSecret,
45
47
  createOwnerKeyring,
@@ -55,17 +57,27 @@ import {
55
57
  persistKeyring,
56
58
  revoke,
57
59
  updateKeyringIdentity
58
- } from "../chunk-WWGT2MDV.js";
59
- import "../chunk-ITNUCOXM.js";
60
- import "../chunk-5O3AOPDT.js";
61
- import "../chunk-5TDJ56JE.js";
62
- import "../chunk-ZYUC53LT.js";
60
+ } from "../chunk-J4LPNIGK.js";
61
+ import "../chunk-OVYRLHPE.js";
62
+ import "../chunk-MCHVVJIA.js";
63
+ import "../chunk-QA2KUPCP.js";
64
+ import "../chunk-2OV5NVE7.js";
65
+ import "../chunk-VEPTFUJY.js";
66
+ import "../chunk-HYR4WZZ3.js";
67
+ import "../chunk-LP7BEXCT.js";
68
+ import "../chunk-3OPY6MK2.js";
69
+ import "../chunk-YN5IAHN6.js";
70
+ import {
71
+ TeamNotEnabledError
72
+ } from "../chunk-S7VFUQM2.js";
63
73
  import "../chunk-PZ5AY32C.js";
64
74
  export {
75
+ NO_TEAM,
65
76
  PresenceHandle,
66
77
  SYNC_CREDENTIALS_COLLECTION,
67
78
  SyncEngine,
68
79
  SyncTransaction,
80
+ TeamNotEnabledError,
69
81
  buildRecipientKeyringFile,
70
82
  burnPaperRecoveryEntry,
71
83
  changeSecret,
@@ -107,6 +119,7 @@ export {
107
119
  unwrapMagicLinkGrant,
108
120
  updateAuthenticator,
109
121
  updateKeyringIdentity,
122
+ withTeam,
110
123
  writeMagicLinkGrant
111
124
  };
112
125
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,4 @@
1
- export { l0 as NO_TIERS, l1 as TiersContext, iZ as TiersNotEnabledError, l2 as TiersStrategy, l3 as assertDeclaredTier, l4 as assertTiersEnabled, l5 as classifySealedShred, l6 as demote, l7 as elevate, l8 as getAtTier, l9 as listAtTier, la as putAtTier, lb as withTiers } from '../index-BzUo1B6n.js';
2
- import '../subject-index-O75wKshW.js';
3
- import '../describe-aBkJR2sd.js';
1
+ export { lS as NO_TIERS, lT as TiersContext, jE as TiersNotEnabledError, lU as TiersStrategy, lV as assertDeclaredTier, lW as assertTiersEnabled, lX as classifySealedShred, lY as demote, lZ as elevate, l_ as getAtTier, l$ as listAtTier, m0 as putAtTier, m1 as withTiers } from '../index-DjWbxsjb.js';
2
+ import '../subject-index-CyOgGMJL.js';
4
3
  import '../index-B9QdHytu.js';
5
4
  import '@noy-db/attestation';
@@ -9,13 +9,19 @@ import {
9
9
  listAtTier,
10
10
  putAtTier,
11
11
  withTiers
12
- } from "../chunk-IPB7FTQX.js";
13
- import "../chunk-IO6GRPT6.js";
14
- import "../chunk-5O3AOPDT.js";
15
- import "../chunk-5TDJ56JE.js";
12
+ } from "../chunk-7P2SDJG3.js";
13
+ import "../chunk-7BWJHO2A.js";
14
+ import "../chunk-MCHVVJIA.js";
15
+ import "../chunk-QA2KUPCP.js";
16
+ import "../chunk-2OV5NVE7.js";
17
+ import "../chunk-VEPTFUJY.js";
18
+ import "../chunk-HYR4WZZ3.js";
19
+ import "../chunk-LP7BEXCT.js";
20
+ import "../chunk-3OPY6MK2.js";
21
+ import "../chunk-YN5IAHN6.js";
16
22
  import {
17
23
  TiersNotEnabledError
18
- } from "../chunk-ZYUC53LT.js";
24
+ } from "../chunk-S7VFUQM2.js";
19
25
  import "../chunk-PZ5AY32C.js";
20
26
  export {
21
27
  NO_TIERS,
@@ -1,5 +1,4 @@
1
- export { dq as BundleVersionConflictError, eJ as ConflictError, cV as EncryptedEnvelope, ge as ListPageResult, gM as NetworkError, gS as NoydbBundleStore, bX as NoydbPodStore, cT as NoydbStore, du as PodVersionConflictError, iD as StoreCapabilities, iE as StoreCapabilityError, iF as StoreTime, j1 as TxOp, jg as VaultSnapshot } from '../index-BzUo1B6n.js';
2
- import '../subject-index-O75wKshW.js';
3
- import '../describe-aBkJR2sd.js';
1
+ export { dx as BundleVersionConflictError, fc as ConflictError, d0 as EncryptedEnvelope, gP as ListPageResult, hn as NetworkError, ht as NoydbBundleStore, bq as NoydbPodStore, c_ as NoydbStore, dB as PodVersionConflictError, jg as StoreCapabilities, jh as StoreCapabilityError, ji as StoreTime, jI as TxOp, jZ as VaultSnapshot } from '../index-DjWbxsjb.js';
2
+ import '../subject-index-CyOgGMJL.js';
4
3
  import '../index-B9QdHytu.js';
5
4
  import '@noy-db/attestation';
package/dist/to/index.js CHANGED
@@ -1,11 +1,10 @@
1
- import "../chunk-K2WCO3NX.js";
2
1
  import {
3
2
  BundleVersionConflictError,
4
3
  ConflictError,
5
4
  NetworkError,
6
5
  PodVersionConflictError,
7
6
  StoreCapabilityError
8
- } from "../chunk-ZYUC53LT.js";
7
+ } from "../chunk-S7VFUQM2.js";
9
8
  import "../chunk-PZ5AY32C.js";
10
9
  export {
11
10
  BundleVersionConflictError,
@@ -1,4 +1,4 @@
1
- import { bJ as GuardStrategy, bP as GuardStrategyHandle, bK as GuardChange, bL as GuardContext } from './index-BzUo1B6n.js';
1
+ import { bc as GuardStrategy, bi as GuardStrategyHandle, bd as GuardChange, be as GuardContext } from './index-DjWbxsjb.js';
2
2
 
3
3
  /**
4
4
  * Register a guard for a collection. Guards run on every `put()` /
@@ -1,7 +1,6 @@
1
- import { i_ as TransactionInvariant, kX as TxStrategy } from '../index-BzUo1B6n.js';
2
- export { kY as AmendmentTxOptions, j0 as TxCollection, dP as TxContext, j2 as TxVault, kx as runTransaction } from '../index-BzUo1B6n.js';
3
- import '../subject-index-O75wKshW.js';
4
- import '../describe-aBkJR2sd.js';
1
+ import { jF as TransactionInvariant, lN as TxStrategy } from '../index-DjWbxsjb.js';
2
+ export { lO as AmendmentTxOptions, jH as TxCollection, eb as TxContext, jJ as TxVault, ll as runTransaction } from '../index-DjWbxsjb.js';
3
+ import '../subject-index-CyOgGMJL.js';
5
4
  import '../index-B9QdHytu.js';
6
5
  import '@noy-db/attestation';
7
6
 
package/dist/tx/index.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  TxContext,
4
4
  TxVault,
5
5
  runTransaction
6
- } from "../chunk-SKF73JOP.js";
6
+ } from "../chunk-ICXIFFYZ.js";
7
7
  import "../chunk-ZJADGNYF.js";
8
- import "../chunk-ZYUC53LT.js";
8
+ import "../chunk-S7VFUQM2.js";
9
9
  import "../chunk-PZ5AY32C.js";
10
10
 
11
11
  // src/with-commit/tx/dry-run.ts
@@ -44,7 +44,7 @@ async function runDryRun(db, fn) {
44
44
  const gctx = { existing: before, vault: facade, userId: v.userId, role: v.role };
45
45
  try {
46
46
  await registry.runChecks(op.collectionName, after, gctx);
47
- const { GuardExecutor } = await import("../executor-QZ7BXICW.js");
47
+ const { GuardExecutor } = await import("../executor-ZHTJJICG.js");
48
48
  for (const g of guards) {
49
49
  await GuardExecutor.checkFrozenFields(g, op.id, before, after);
50
50
  }
@@ -1 +1,4 @@
1
- export { C as CollectionDescription, a as CollectionMeta, D as DescribeOptions, b as DescribedField, F as FieldMeta, S as SemanticType } from '../describe-aBkJR2sd.js';
1
+ export { et as CollectionDescription, f5 as CollectionMeta, fB as DescribeOptions, fC as DescribedField, g3 as FieldMeta, iY as SemanticType } from '../index-DjWbxsjb.js';
2
+ import '../subject-index-CyOgGMJL.js';
3
+ import '../index-B9QdHytu.js';
4
+ import '@noy-db/attestation';
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-PY4KJPYU.js";
4
4
  import {
5
5
  FilenameSanitizationError
6
- } from "../chunk-ZYUC53LT.js";
6
+ } from "../chunk-S7VFUQM2.js";
7
7
  import "../chunk-PZ5AY32C.js";
8
8
 
9
9
  // src/kernel/util/sanitize-filename.ts
@@ -0,0 +1,101 @@
1
+ import { dV as ClassifiedEntry, dS as ClassifiedFieldSpec, dW as ClassifiedGroup } from './index-DjWbxsjb.js';
2
+
3
+ /**
4
+ * Configuration/write errors for classified fields. @module
5
+ *
6
+ * `ClassifiedConfigError` / `ClassifiedRevealError` moved to `kernel/errors.ts`
7
+ * (stage 2) so `kernel/enclave/classify/*` can throw them without importing
8
+ * with-*. Re-exported here under the same names so existing import paths
9
+ * keep working.
10
+ */
11
+
12
+ declare class ClassifiedNeverStoredError extends Error {
13
+ readonly collection: string;
14
+ readonly field: string;
15
+ constructor(collection: string, field: string);
16
+ }
17
+ declare class ClassifiedValidationError extends Error {
18
+ readonly collection: string;
19
+ readonly field: string;
20
+ constructor(collection: string, field: string, detail: string);
21
+ }
22
+
23
+ /** Flatten a classifiedFields config into a per-field map + rider computed entries. @module */
24
+
25
+ interface ResolvedClassified {
26
+ readonly byField: Record<string, ClassifiedFieldSpec>;
27
+ readonly riderComputed: Record<string, (record: Record<string, unknown>) => unknown>;
28
+ }
29
+ declare function resolveClassifiedFields(collection: string, config: Record<string, ClassifiedEntry>): ResolvedClassified;
30
+
31
+ /** The preset catalog (stage 1). Presets are hub-owned; devs get declarative
32
+ * knobs, not read-side callbacks (design law D2/D3). @module */
33
+
34
+ declare const classified: {
35
+ /** Composite card type. PAN sealed + last4/bin riders; CVC is storage:'never' (PCI-aware). */
36
+ creditCard(fields: {
37
+ pan: string;
38
+ expiry?: string;
39
+ cvc?: string;
40
+ }): ClassifiedGroup;
41
+ birthDate(): ClassifiedFieldSpec;
42
+ email(): ClassifiedFieldSpec;
43
+ phone(): ClassifiedFieldSpec;
44
+ /** Digest-only password: verify-without-reveal; never listed, never revealed.
45
+ * Enumeration math is on the caller for low-entropy values — see the
46
+ * per-preset docs; the hub ships no rate limiter in this slice (spec §5).
47
+ *
48
+ * @param opts.equatable — emit a store-visible `_bidx` equality tag (enables
49
+ * `findByDigest`). Cost band you are accepting:
50
+ *
51
+ * equal values produce equal store-visible tags: anyone with store access
52
+ * learns which records share this secret and how many share each value —
53
+ * never the value itself. A collection-DEK holder can additionally test
54
+ * candidate values offline: the tag's inner digest is PBKDF2-SHA256 (600K),
55
+ * which is GPU/ASIC-friendly — an offline attacker runs on the order of
56
+ * 10⁴–10⁸ guesses/second, so for low-entropy secrets (PINs, casefolded secret
57
+ * answers) offline recovery of the equality partition is seconds-to-hours, not
58
+ * years. `crypto.subtle` exposes no memory-hard KDF (no scrypt/argon2) and the
59
+ * family's no-crypto-deps law forbids adding one, so PBKDF2-SHA256 is the
60
+ * hardest primitive available; the iteration count raises the price but does
61
+ * not make a low-entropy field safe. The real control for low-entropy fields
62
+ * is the DOOR — do not enable `equatable` for them unless the partition being
63
+ * learnable is acceptable — not the iteration count. Pre-forget backups retain
64
+ * tags. */
65
+ password(opts?: {
66
+ minLength?: number;
67
+ rotateDays?: number;
68
+ notLastN?: number;
69
+ equatable?: true;
70
+ }): ClassifiedFieldSpec;
71
+ /** Digest-only secret answer: normalized (casefold/trim/collapse), groupable
72
+ * into k-of-n matchGroup challenges. Low-entropy by nature — document the
73
+ * enumeration math to your users; add app-side rate limiting.
74
+ *
75
+ * @param opts.equatable — emit a store-visible `_bidx` equality tag (enables
76
+ * `findByDigest`). Cost band you are accepting:
77
+ *
78
+ * equal values produce equal store-visible tags: anyone with store access
79
+ * learns which records share this secret and how many share each value —
80
+ * never the value itself. A collection-DEK holder can additionally test
81
+ * candidate values offline: the tag's inner digest is PBKDF2-SHA256 (600K),
82
+ * which is GPU/ASIC-friendly — an offline attacker runs on the order of
83
+ * 10⁴–10⁸ guesses/second, so for low-entropy secrets (PINs, casefolded secret
84
+ * answers) offline recovery of the equality partition is seconds-to-hours, not
85
+ * years. `crypto.subtle` exposes no memory-hard KDF (no scrypt/argon2) and the
86
+ * family's no-crypto-deps law forbids adding one, so PBKDF2-SHA256 is the
87
+ * hardest primitive available; the iteration count raises the price but does
88
+ * not make a low-entropy field safe. The real control for low-entropy fields
89
+ * is the DOOR — do not enable `equatable` for them unless the partition being
90
+ * learnable is acceptable — not the iteration count. Pre-forget backups retain
91
+ * tags. */
92
+ secretAnswer(opts?: {
93
+ equatable?: true;
94
+ }): ClassifiedFieldSpec;
95
+ };
96
+
97
+ /** Pure write-time validators. Exported so userland can validate storage:'never'
98
+ * fields (e.g. CVC) at capture, before dropping them. @module */
99
+ declare function luhnCheck(pan: string): boolean;
100
+
101
+ export { ClassifiedNeverStoredError as C, type ResolvedClassified as R, ClassifiedValidationError as a, classified as c, luhnCheck as l, resolveClassifiedFields as r };
@@ -1,4 +1,4 @@
1
- import { V as Vault, cE as DiffEntry } from './index-BzUo1B6n.js';
1
+ import { V as Vault, c7 as DiffEntry } from './index-DjWbxsjb.js';
2
2
 
3
3
  /**
4
4
  * Vault-level diff orchestrator.