@noy-db/hub 0.9.0-pre.0 → 0.9.0-pre.2

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 (465) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/api-H4B7ZQXP.js +18 -0
  3. package/dist/as/index.js +10 -10
  4. package/dist/at/index.js +8 -8
  5. package/dist/attestation/index.js +18 -18
  6. package/dist/{backup-7RKNZMQO.js → backup-E3GBMNDA.js} +92 -31
  7. package/dist/backup-E3GBMNDA.js.map +1 -0
  8. package/dist/blobs/index.js +12 -12
  9. package/dist/broker/index.js +13 -13
  10. package/dist/by/index.js +2 -2
  11. package/dist/capsule/contract.js +6 -6
  12. package/dist/capsule/enclave-aes/crypto.d.ts +18 -0
  13. package/dist/capsule/enclave-aes/index.d.ts +2 -2
  14. package/dist/capsule/enclave-aes/index.js +14 -8
  15. package/dist/capsule/enclave-aes/index.js.map +1 -1
  16. package/dist/capsule/index.d.ts +1 -1
  17. package/dist/{capsule-57BDK7LG.js → capsule-YQKQZPH7.js} +14 -8
  18. package/dist/cargo/index.js +35 -35
  19. package/dist/{chunk-AJFPAHMW.js → chunk-27NCEPKM.js} +3 -3
  20. package/dist/{chunk-PGC35KXE.js → chunk-2IASHJPS.js} +2 -2
  21. package/dist/{chunk-NYJBYVBG.js → chunk-2ODEFG6K.js} +4 -4
  22. package/dist/{chunk-7BMOS4JQ.js → chunk-2QH3I7QC.js} +11 -11
  23. package/dist/{chunk-VSUQI5Q6.js → chunk-2RH5SEY7.js} +16 -2
  24. package/dist/chunk-2RH5SEY7.js.map +1 -0
  25. package/dist/{chunk-IVMFIKNA.js → chunk-2T2TGRWE.js} +6 -6
  26. package/dist/{chunk-G66YXUTY.js → chunk-35CNOVQE.js} +3 -3
  27. package/dist/{chunk-OJU67C23.js → chunk-3EXQXOQ2.js} +4 -4
  28. package/dist/{chunk-BJH77UY2.js → chunk-4KYKRYRT.js} +2 -2
  29. package/dist/{chunk-RDOEOPOI.js → chunk-4N4OIVK3.js} +5 -5
  30. package/dist/{chunk-WHOKGHJ3.js → chunk-4WLI37WK.js} +7 -7
  31. package/dist/{chunk-RNACRT5H.js → chunk-52ZFNK46.js} +2 -2
  32. package/dist/{chunk-CB4467G3.js → chunk-5A3HOTP5.js} +33 -7
  33. package/dist/chunk-5A3HOTP5.js.map +1 -0
  34. package/dist/{chunk-QDHHHI5Q.js → chunk-5SMCBPJ2.js} +5 -5
  35. package/dist/{chunk-EMAWOGVH.js → chunk-654RE5YC.js} +3 -3
  36. package/dist/{chunk-FZXRLNJO.js → chunk-6BEBWHNL.js} +3 -3
  37. package/dist/{chunk-EUD3HQM4.js → chunk-6WEPFEMJ.js} +4 -4
  38. package/dist/{chunk-YFFMPZPY.js → chunk-6WIFF46H.js} +2 -2
  39. package/dist/{chunk-ZVSKSUGI.js → chunk-7C7OF26T.js} +5 -5
  40. package/dist/{chunk-QXJXG7DN.js → chunk-7IV7GVOS.js} +5 -5
  41. package/dist/{chunk-MQ7YWBQ5.js → chunk-7JRLCP2J.js} +2 -2
  42. package/dist/{chunk-QSHATAXJ.js → chunk-7ONMS7QI.js} +2 -2
  43. package/dist/{chunk-JBMMWYOH.js → chunk-7UHLO4ZN.js} +35 -2
  44. package/dist/chunk-7UHLO4ZN.js.map +1 -0
  45. package/dist/{chunk-6WS35E6X.js → chunk-A52BK5AY.js} +2 -2
  46. package/dist/{chunk-GOJQ5DZA.js → chunk-AI35LNWQ.js} +4 -4
  47. package/dist/chunk-AI35LNWQ.js.map +1 -0
  48. package/dist/{chunk-XXQ5XIYY.js → chunk-AMSSAOOB.js} +2 -2
  49. package/dist/{chunk-3V6LZHUO.js → chunk-AYOQZJDB.js} +2 -2
  50. package/dist/{chunk-DL6BZKP3.js → chunk-B3B6HV5S.js} +2 -2
  51. package/dist/{chunk-5XONHAFD.js → chunk-B6EWMGFX.js} +2 -2
  52. package/dist/{chunk-6Y5E4SJU.js → chunk-BMAXBTYH.js} +5 -5
  53. package/dist/{chunk-LGGIFKJP.js → chunk-BNYDOF2Q.js} +4 -4
  54. package/dist/{chunk-XXNWU5QZ.js → chunk-BQJ5ORU5.js} +2 -2
  55. package/dist/{chunk-Z3ZXVB2Y.js → chunk-BSEPI3HD.js} +12 -12
  56. package/dist/chunk-BSEPI3HD.js.map +1 -0
  57. package/dist/{chunk-BYHCKX73.js → chunk-CLOSXHR4.js} +3 -3
  58. package/dist/{chunk-5HNW4ZTA.js → chunk-CSAN22QG.js} +6 -6
  59. package/dist/{chunk-TZYTMZZY.js → chunk-DL4GCSTS.js} +10 -10
  60. package/dist/{chunk-EA4VDI5D.js → chunk-DYIR6RC3.js} +4 -4
  61. package/dist/{chunk-PUBI455O.js → chunk-EPPAEGH5.js} +2 -2
  62. package/dist/{chunk-2A56DSRI.js → chunk-EQ6C2ZPT.js} +17 -51
  63. package/dist/chunk-EQ6C2ZPT.js.map +1 -0
  64. package/dist/{chunk-BNFNQNEP.js → chunk-F7X7MPK4.js} +2 -2
  65. package/dist/{chunk-SNM7LSYG.js → chunk-FUHUGKDN.js} +4 -4
  66. package/dist/{chunk-72XBVN4J.js → chunk-FVKQ5QUC.js} +2 -2
  67. package/dist/chunk-FVKQ5QUC.js.map +1 -0
  68. package/dist/{chunk-D4V5JJAK.js → chunk-GHMINSER.js} +4 -4
  69. package/dist/{chunk-APFFJN5T.js → chunk-GLSCL74M.js} +31 -34
  70. package/dist/chunk-GLSCL74M.js.map +1 -0
  71. package/dist/{chunk-XKBTJGFP.js → chunk-GU6QXHPZ.js} +3 -3
  72. package/dist/chunk-GU6QXHPZ.js.map +1 -0
  73. package/dist/{chunk-QGFEBNHO.js → chunk-GZISWBCJ.js} +4 -4
  74. package/dist/{chunk-OM3SEDI4.js → chunk-HTRLQ4ZZ.js} +4 -4
  75. package/dist/{chunk-SWXLZ4HX.js → chunk-ICHHNI5E.js} +8 -8
  76. package/dist/{chunk-K673OO6B.js → chunk-ID4ZBC3X.js} +4 -4
  77. package/dist/{chunk-H3YM66EI.js → chunk-IF2M43G4.js} +2 -2
  78. package/dist/{chunk-QGSNJD3B.js → chunk-IFUYLIEY.js} +2 -2
  79. package/dist/{chunk-D5A3GCZ4.js → chunk-IPF5ORDI.js} +3 -3
  80. package/dist/{delegation-ONLM4JFI.js → chunk-JQMEXCUZ.js} +59 -16
  81. package/dist/chunk-JQMEXCUZ.js.map +1 -0
  82. package/dist/{chunk-TFWFPZRU.js → chunk-K5JNK63R.js} +11 -11
  83. package/dist/{chunk-TFWFPZRU.js.map → chunk-K5JNK63R.js.map} +1 -1
  84. package/dist/{chunk-BVF3SXD7.js → chunk-KBIS64X4.js} +5 -5
  85. package/dist/chunk-L4UL4IAR.js +55 -0
  86. package/dist/chunk-L4UL4IAR.js.map +1 -0
  87. package/dist/{chunk-RIZTZJX6.js → chunk-LJ744WXU.js} +2 -2
  88. package/dist/{chunk-XITHENBI.js → chunk-LMC5L3MM.js} +7 -7
  89. package/dist/{chunk-XITHENBI.js.map → chunk-LMC5L3MM.js.map} +1 -1
  90. package/dist/{chunk-L5A3KR7R.js → chunk-LUQBG637.js} +3 -3
  91. package/dist/{chunk-6QLCS7ET.js → chunk-LZN6DTFI.js} +2 -2
  92. package/dist/{chunk-NIXRB5BP.js → chunk-MMWX5OT5.js} +2 -2
  93. package/dist/{chunk-JA25QG5M.js → chunk-N6EWQ5VB.js} +622 -119
  94. package/dist/chunk-N6EWQ5VB.js.map +1 -0
  95. package/dist/{chunk-UOZOWN73.js → chunk-ND6S2DKC.js} +2 -2
  96. package/dist/{chunk-WFWFXDNS.js → chunk-NHEKQWFI.js} +2 -2
  97. package/dist/{chunk-2ZFD2UJC.js → chunk-NIUHKKMM.js} +9 -9
  98. package/dist/{chunk-XA34THLF.js → chunk-NK4LGBGQ.js} +4 -4
  99. package/dist/{chunk-JSWKVZCR.js → chunk-NUZ7ROUZ.js} +2 -2
  100. package/dist/{chunk-DHU2AQ6T.js → chunk-O3NGOHXQ.js} +2 -2
  101. package/dist/{chunk-ZBUAX4EF.js → chunk-O6VOR4NH.js} +2 -2
  102. package/dist/{chunk-JZ4EDEIP.js → chunk-ODBOHPZU.js} +3 -3
  103. package/dist/{chunk-5UUJE4FP.js → chunk-OK44MD3C.js} +2 -2
  104. package/dist/{chunk-ECGXA4LT.js → chunk-OR3OHKU6.js} +2 -2
  105. package/dist/{chunk-ZWF3EWZA.js → chunk-P6FATPXQ.js} +2 -2
  106. package/dist/{chunk-PCYPXLEX.js → chunk-PBEHTFUG.js} +6 -6
  107. package/dist/{chunk-7CT6SX4M.js → chunk-PFHDQY5L.js} +3 -3
  108. package/dist/{chunk-PTJY5R3O.js → chunk-PIO6NW7O.js} +2 -2
  109. package/dist/{chunk-TMIJAR2X.js → chunk-PREYKC76.js} +3 -3
  110. package/dist/{chunk-ZHQJAV6D.js → chunk-PU5ZEV65.js} +2 -2
  111. package/dist/{chunk-UNSQZSZP.js → chunk-PWAMX5KU.js} +2 -2
  112. package/dist/{chunk-GETUTTZU.js → chunk-PZN76MMV.js} +4 -4
  113. package/dist/{chunk-ABU6A4Z5.js → chunk-Q4DBU5RM.js} +2 -2
  114. package/dist/{chunk-2WJKJZSO.js → chunk-QHG7GQKM.js} +2 -2
  115. package/dist/{chunk-UAKY6E4N.js → chunk-QNOWNCZS.js} +2 -2
  116. package/dist/{chunk-JPSL5GIZ.js → chunk-QQLXKDGC.js} +3 -3
  117. package/dist/{chunk-45VHWE4C.js → chunk-QVUMKG3Z.js} +271 -69
  118. package/dist/chunk-QVUMKG3Z.js.map +1 -0
  119. package/dist/{chunk-OK57EATL.js → chunk-R4GLRJ55.js} +2 -2
  120. package/dist/{chunk-B65CC6Z6.js → chunk-RF5WDM25.js} +2 -2
  121. package/dist/{chunk-G46JSSVX.js → chunk-RKBCUP5D.js} +7 -7
  122. package/dist/{chunk-GCUMOKTN.js → chunk-S2ORTQGS.js} +3 -3
  123. package/dist/{chunk-MRJDLXI3.js → chunk-SVXFCCSX.js} +8 -8
  124. package/dist/{chunk-BUE7R3B5.js → chunk-SXPLIRQH.js} +2 -2
  125. package/dist/{chunk-5LMCVBMY.js → chunk-T5EXREMW.js} +5 -5
  126. package/dist/{chunk-PT2YCQVK.js → chunk-TBVDI3LY.js} +4 -4
  127. package/dist/{chunk-BMHQHH7Q.js → chunk-TLIFNRU5.js} +2 -2
  128. package/dist/{chunk-YKGJ44Z7.js → chunk-TU6ZJTYT.js} +3 -3
  129. package/dist/{chunk-FSQNGPHH.js → chunk-U277K5GR.js} +612 -175
  130. package/dist/chunk-U277K5GR.js.map +1 -0
  131. package/dist/{chunk-55P6OBB7.js → chunk-U43RSPPX.js} +2 -2
  132. package/dist/{chunk-K7RW7FI4.js → chunk-UADW5NOU.js} +5 -5
  133. package/dist/{chunk-GRS2HIV6.js → chunk-UMV5GBTJ.js} +2 -2
  134. package/dist/{chunk-4UIP3QNW.js → chunk-UNAMWK2Q.js} +2 -2
  135. package/dist/{chunk-J4KAPKBJ.js → chunk-UORWAG7K.js} +2 -2
  136. package/dist/{chunk-V55JASXO.js → chunk-UQRKAM2R.js} +3 -3
  137. package/dist/{chunk-2ELOCEXE.js → chunk-URGHKZPL.js} +1 -1
  138. package/dist/chunk-URGHKZPL.js.map +1 -0
  139. package/dist/{chunk-ZMVSKYTJ.js → chunk-VLRY2UH4.js} +10 -10
  140. package/dist/{chunk-SPPOUJLN.js → chunk-VZFTON37.js} +2 -2
  141. package/dist/{chunk-CAD7N6HQ.js → chunk-WIUH6EJ7.js} +10 -10
  142. package/dist/chunk-WIUH6EJ7.js.map +1 -0
  143. package/dist/{chunk-YQFBH5ZJ.js → chunk-WQUIJPN4.js} +3 -3
  144. package/dist/{chunk-4J3MNVVX.js → chunk-WRLWEYHY.js} +7 -1
  145. package/dist/{chunk-4J3MNVVX.js.map → chunk-WRLWEYHY.js.map} +1 -1
  146. package/dist/{chunk-NZULV7LK.js → chunk-WVQDY3UM.js} +4 -4
  147. package/dist/{chunk-3Y5JLSXS.js → chunk-X5RGG3ZW.js} +2 -2
  148. package/dist/{chunk-PFCTSXHU.js → chunk-X6Z2SIRF.js} +2 -2
  149. package/dist/{chunk-UHFGK6YA.js → chunk-XQGKS4OW.js} +3 -3
  150. package/dist/{chunk-L2F3CFCH.js → chunk-Y22JWHCP.js} +4 -4
  151. package/dist/{chunk-C53ER7AG.js → chunk-YVA6UPRN.js} +2 -2
  152. package/dist/{chunk-226V6XXJ.js → chunk-Z2KP6PNF.js} +6 -6
  153. package/dist/{chunk-G5EDYVSE.js → chunk-ZK2WT532.js} +5 -5
  154. package/dist/{chunk-SFCD6OU7.js → chunk-ZNVBCKMV.js} +2 -2
  155. package/dist/{chunk-BU2ABHFW.js → chunk-ZOFNZLAA.js} +4 -4
  156. package/dist/{chunk-X2RP4TO5.js → chunk-ZVJKHGE5.js} +7 -7
  157. package/dist/classified/index.js +5 -5
  158. package/dist/{classified-marker-KHDOYIJB.js → classified-marker-7HXDMYHI.js} +3 -3
  159. package/dist/collection-facade-V63BEBGU.js +41 -0
  160. package/dist/{computed-XMFTHAXV.js → computed-LZLSYOPG.js} +3 -3
  161. package/dist/consent/index.js +8 -8
  162. package/dist/cover/index.js +8 -8
  163. package/dist/custody/index.js +12 -12
  164. package/dist/{dead-filter-CXV5NS67.js → dead-filter-PZIJ4F4G.js} +10 -10
  165. package/dist/debug/index.js +7 -7
  166. package/dist/delegation-7SSGIETH.js +26 -0
  167. package/dist/derivations/index.js +22 -22
  168. package/dist/derive-IMI3BMDS.js +20 -0
  169. package/dist/directory/index.js +9 -9
  170. package/dist/{dispatch-2MQFMEGY.js → dispatch-4BUYPWMJ.js} +19 -19
  171. package/dist/{dispatch-OFDA4WQV.js → dispatch-KOPDDPEQ.js} +5 -5
  172. package/dist/executor-7SY3M6TZ.js +8 -0
  173. package/dist/executor-SNHW4ELF.js +35 -0
  174. package/dist/executor-Z3IKK7G3.js +8 -0
  175. package/dist/export-accessible-O7DIVFUO.js +22 -0
  176. package/dist/extract-partition-ELZEJKXM.js +35 -0
  177. package/dist/{fanout-sidecar-BO67PCPO.js → fanout-sidecar-FYDRL7F3.js} +8 -8
  178. package/dist/find-KWB2RYWJ.js +10 -0
  179. package/dist/forget/index.js +8 -8
  180. package/dist/guards/index.js +4 -4
  181. package/dist/history/index.js +15 -13
  182. package/dist/history/index.js.map +1 -1
  183. package/dist/i18n/index.js +13 -13
  184. package/dist/index.d.ts +3 -2
  185. package/dist/index.js +111 -107
  186. package/dist/index.js.map +1 -1
  187. package/dist/indexing/index.js +5 -5
  188. package/dist/introspection/index.js +10 -10
  189. package/dist/issue-5ZHXK4HJ.js +19 -0
  190. package/dist/kernel/collection.d.ts +85 -6
  191. package/dist/kernel/constants.d.ts +7 -0
  192. package/dist/kernel/errors.d.ts +9 -0
  193. package/dist/kernel/merge-authority.d.ts +5 -1
  194. package/dist/kernel/noydb.d.ts +116 -21
  195. package/dist/kernel/rejection-seal.d.ts +13 -0
  196. package/dist/kernel/sync-wiring.d.ts +55 -0
  197. package/dist/kernel/types.d.ts +366 -8
  198. package/dist/kernel/vault.d.ts +39 -5
  199. package/dist/{ledger-MSJGWKGW.js → ledger-UFJCB6T5.js} +10 -10
  200. package/dist/liberate-OEOSNNFH.js +25 -0
  201. package/dist/{link-set-QXXSPPHL.js → link-set-KMUBFN2L.js} +10 -10
  202. package/dist/{managed-secret-VSK7ANQI.js → managed-secret-H5WYSJ46.js} +9 -9
  203. package/dist/materialized-views/index.js +25 -25
  204. package/dist/{migrate-cek-GEBFYBDC.js → migrate-cek-SPESQAAO.js} +2 -2
  205. package/dist/money/index.js +5 -5
  206. package/dist/noydb-QDZ4QIKO.js +100 -0
  207. package/dist/on/index.js +12 -12
  208. package/dist/overlay-views/index.js +4 -4
  209. package/dist/periods/index.js +11 -11
  210. package/dist/pod/index.js +66 -64
  211. package/dist/{pod-handle-YE7CT66T.js → pod-handle-GJLCOUGK.js} +8 -8
  212. package/dist/policy/index.js +9 -9
  213. package/dist/port/at/index.d.ts +1 -1
  214. package/dist/port/by/index.d.ts +1 -1
  215. package/dist/port/on/index.d.ts +1 -1
  216. package/dist/port/with/admission-authority.d.ts +34 -0
  217. package/dist/port/with/broker-strategy.d.ts +10 -0
  218. package/dist/port/with/rejection-courier.d.ts +37 -0
  219. package/dist/port/with/restore-host.d.ts +33 -0
  220. package/dist/port/with/service-bus.d.ts +18 -0
  221. package/dist/port/with/team-strategy.d.ts +2 -2
  222. package/dist/port/with/write-hooks.d.ts +2 -0
  223. package/dist/portability/index.js +8 -8
  224. package/dist/{post-register-QC5TEAW3.js → post-register-2AC2STHC.js} +6 -6
  225. package/dist/query/all/index.js +15 -15
  226. package/dist/query/index.js +7 -7
  227. package/dist/query/live/index.js +7 -7
  228. package/dist/query/reduce/index.js +10 -10
  229. package/dist/query/relate/index.js +9 -9
  230. package/dist/reduce/index.js +8 -8
  231. package/dist/register-PIORIMMR.js +30 -0
  232. package/dist/registry-BIMICFUH.js +23 -0
  233. package/dist/registry-JGWLW53D.js +35 -0
  234. package/dist/registry-SELCBYEQ.js +8 -0
  235. package/dist/registry-W327UNYH.js +8 -0
  236. package/dist/request-withdrawal-K3SXXODI.js +28 -0
  237. package/dist/restore-to-OOPKLAPU.js +66 -0
  238. package/dist/restore-to-OOPKLAPU.js.map +1 -0
  239. package/dist/{reveal-YQTRNQFH.js → reveal-UAPBG743.js} +7 -7
  240. package/dist/revoke-6AFVXTWF.js +24 -0
  241. package/dist/satellites/index.js +1 -1
  242. package/dist/schema-update/index.js +2 -2
  243. package/dist/sealed-record/index.js +11 -11
  244. package/dist/search/index.js +4 -4
  245. package/dist/{seed-JMQTRKRE.js → seed-BVYDPVIW.js} +33 -18
  246. package/dist/seed-BVYDPVIW.js.map +1 -0
  247. package/dist/sequence/index.js +8 -8
  248. package/dist/session/index.js +8 -8
  249. package/dist/shadow/index.js +2 -2
  250. package/dist/signer-TW5MAQJP.js +23 -0
  251. package/dist/snapshots/index.js +9 -9
  252. package/dist/{stale-SKV33PBU.js → stale-CROGJBIJ.js} +9 -9
  253. package/dist/storage-SO2L2Z5J.js +21 -0
  254. package/dist/{store-coordination-provider-Z6HKPOGM.js → store-coordination-provider-2YD2PTTP.js} +9 -9
  255. package/dist/sync/index.js +16 -16
  256. package/dist/sync/index.js.map +1 -1
  257. package/dist/team/index.js +15 -15
  258. package/dist/tiers/index.js +10 -10
  259. package/dist/to/index.js +2 -2
  260. package/dist/transactions/index.js +3 -3
  261. package/dist/util/index.js +1 -1
  262. package/dist/vault-head/index.js +7 -7
  263. package/dist/{verify-KWQIWLGH.js → verify-QWO5UKD6.js} +7 -7
  264. package/dist/walk-3KEOL7BY.js +20 -0
  265. package/dist/with-audit/guards/types.d.ts +2 -0
  266. package/dist/with-audit/tiers/index.d.ts +5 -5
  267. package/dist/with-commit/history/history.d.ts +16 -0
  268. package/dist/with-commit/history/restore-to.d.ts +40 -0
  269. package/dist/with-party/broker/seed.d.ts +4 -0
  270. package/dist/with-party/custody/strategy.d.ts +2 -2
  271. package/dist/with-party/team/delegation.d.ts +41 -11
  272. package/dist/with-party/team/index.d.ts +2 -0
  273. package/dist/with-party/team/keyring.d.ts +133 -3
  274. package/dist/with-party/team/managed-secret.d.ts +1 -1
  275. package/dist/with-party/team/noydb-facade.d.ts +14 -2
  276. package/dist/with-party/team/roster-tag.d.ts +1 -1
  277. package/dist/with-pod/backup.d.ts +9 -17
  278. package/dist/with-sync/active.d.ts +28 -1
  279. package/dist/with-sync/engine.d.ts +59 -2
  280. package/dist/with-sync/index.d.ts +1 -0
  281. package/dist/with-sync/reserved-mirror.d.ts +27 -4
  282. package/dist/with-sync/strategy.d.ts +2 -0
  283. package/dist/withdraw-accessible-OZU525ND.js +25 -0
  284. package/dist/withdraw-accessible-OZU525ND.js.map +1 -0
  285. package/package.json +3 -3
  286. package/dist/api-MSJXVYQG.js +0 -18
  287. package/dist/backup-7RKNZMQO.js.map +0 -1
  288. package/dist/chunk-2A56DSRI.js.map +0 -1
  289. package/dist/chunk-2ELOCEXE.js.map +0 -1
  290. package/dist/chunk-45VHWE4C.js.map +0 -1
  291. package/dist/chunk-72XBVN4J.js.map +0 -1
  292. package/dist/chunk-APFFJN5T.js.map +0 -1
  293. package/dist/chunk-CAD7N6HQ.js.map +0 -1
  294. package/dist/chunk-CB4467G3.js.map +0 -1
  295. package/dist/chunk-FSQNGPHH.js.map +0 -1
  296. package/dist/chunk-GOJQ5DZA.js.map +0 -1
  297. package/dist/chunk-JA25QG5M.js.map +0 -1
  298. package/dist/chunk-JBMMWYOH.js.map +0 -1
  299. package/dist/chunk-VSUQI5Q6.js.map +0 -1
  300. package/dist/chunk-XKBTJGFP.js.map +0 -1
  301. package/dist/chunk-Z3ZXVB2Y.js.map +0 -1
  302. package/dist/collection-facade-LZIF7GWD.js +0 -41
  303. package/dist/delegation-ONLM4JFI.js.map +0 -1
  304. package/dist/derive-3YSIS36W.js +0 -20
  305. package/dist/executor-E6YDJ7YA.js +0 -8
  306. package/dist/executor-NJX3YQQ4.js +0 -35
  307. package/dist/executor-WWM3DD4P.js +0 -8
  308. package/dist/export-accessible-RLHU5G4W.js +0 -22
  309. package/dist/extract-partition-QII2EDCS.js +0 -35
  310. package/dist/find-6M7GYDUZ.js +0 -10
  311. package/dist/issue-LPEEEMPP.js +0 -19
  312. package/dist/liberate-LEKDYKTC.js +0 -25
  313. package/dist/noydb-F2AUF6KL.js +0 -98
  314. package/dist/register-SN72QALV.js +0 -30
  315. package/dist/registry-253FF7C6.js +0 -35
  316. package/dist/registry-3AZWQTDT.js +0 -23
  317. package/dist/registry-7UEBTHWG.js +0 -8
  318. package/dist/registry-IVJ67NFQ.js +0 -8
  319. package/dist/request-withdrawal-UKVJZKX2.js +0 -28
  320. package/dist/revoke-G2KXJQA5.js +0 -24
  321. package/dist/seed-JMQTRKRE.js.map +0 -1
  322. package/dist/signer-IUIYR3CX.js +0 -23
  323. package/dist/storage-NPBYP2SM.js +0 -21
  324. package/dist/walk-F4OLXI5H.js +0 -20
  325. package/dist/withdraw-accessible-ZKPLZ66E.js +0 -25
  326. /package/dist/{api-MSJXVYQG.js.map → api-H4B7ZQXP.js.map} +0 -0
  327. /package/dist/{capsule-57BDK7LG.js.map → capsule-YQKQZPH7.js.map} +0 -0
  328. /package/dist/{chunk-AJFPAHMW.js.map → chunk-27NCEPKM.js.map} +0 -0
  329. /package/dist/{chunk-PGC35KXE.js.map → chunk-2IASHJPS.js.map} +0 -0
  330. /package/dist/{chunk-NYJBYVBG.js.map → chunk-2ODEFG6K.js.map} +0 -0
  331. /package/dist/{chunk-7BMOS4JQ.js.map → chunk-2QH3I7QC.js.map} +0 -0
  332. /package/dist/{chunk-IVMFIKNA.js.map → chunk-2T2TGRWE.js.map} +0 -0
  333. /package/dist/{chunk-G66YXUTY.js.map → chunk-35CNOVQE.js.map} +0 -0
  334. /package/dist/{chunk-OJU67C23.js.map → chunk-3EXQXOQ2.js.map} +0 -0
  335. /package/dist/{chunk-BJH77UY2.js.map → chunk-4KYKRYRT.js.map} +0 -0
  336. /package/dist/{chunk-RDOEOPOI.js.map → chunk-4N4OIVK3.js.map} +0 -0
  337. /package/dist/{chunk-WHOKGHJ3.js.map → chunk-4WLI37WK.js.map} +0 -0
  338. /package/dist/{chunk-RNACRT5H.js.map → chunk-52ZFNK46.js.map} +0 -0
  339. /package/dist/{chunk-QDHHHI5Q.js.map → chunk-5SMCBPJ2.js.map} +0 -0
  340. /package/dist/{chunk-EMAWOGVH.js.map → chunk-654RE5YC.js.map} +0 -0
  341. /package/dist/{chunk-FZXRLNJO.js.map → chunk-6BEBWHNL.js.map} +0 -0
  342. /package/dist/{chunk-EUD3HQM4.js.map → chunk-6WEPFEMJ.js.map} +0 -0
  343. /package/dist/{chunk-YFFMPZPY.js.map → chunk-6WIFF46H.js.map} +0 -0
  344. /package/dist/{chunk-ZVSKSUGI.js.map → chunk-7C7OF26T.js.map} +0 -0
  345. /package/dist/{chunk-QXJXG7DN.js.map → chunk-7IV7GVOS.js.map} +0 -0
  346. /package/dist/{chunk-MQ7YWBQ5.js.map → chunk-7JRLCP2J.js.map} +0 -0
  347. /package/dist/{chunk-QSHATAXJ.js.map → chunk-7ONMS7QI.js.map} +0 -0
  348. /package/dist/{chunk-6WS35E6X.js.map → chunk-A52BK5AY.js.map} +0 -0
  349. /package/dist/{chunk-XXQ5XIYY.js.map → chunk-AMSSAOOB.js.map} +0 -0
  350. /package/dist/{chunk-3V6LZHUO.js.map → chunk-AYOQZJDB.js.map} +0 -0
  351. /package/dist/{chunk-DL6BZKP3.js.map → chunk-B3B6HV5S.js.map} +0 -0
  352. /package/dist/{chunk-5XONHAFD.js.map → chunk-B6EWMGFX.js.map} +0 -0
  353. /package/dist/{chunk-6Y5E4SJU.js.map → chunk-BMAXBTYH.js.map} +0 -0
  354. /package/dist/{chunk-LGGIFKJP.js.map → chunk-BNYDOF2Q.js.map} +0 -0
  355. /package/dist/{chunk-XXNWU5QZ.js.map → chunk-BQJ5ORU5.js.map} +0 -0
  356. /package/dist/{chunk-BYHCKX73.js.map → chunk-CLOSXHR4.js.map} +0 -0
  357. /package/dist/{chunk-5HNW4ZTA.js.map → chunk-CSAN22QG.js.map} +0 -0
  358. /package/dist/{chunk-TZYTMZZY.js.map → chunk-DL4GCSTS.js.map} +0 -0
  359. /package/dist/{chunk-EA4VDI5D.js.map → chunk-DYIR6RC3.js.map} +0 -0
  360. /package/dist/{chunk-PUBI455O.js.map → chunk-EPPAEGH5.js.map} +0 -0
  361. /package/dist/{chunk-BNFNQNEP.js.map → chunk-F7X7MPK4.js.map} +0 -0
  362. /package/dist/{chunk-SNM7LSYG.js.map → chunk-FUHUGKDN.js.map} +0 -0
  363. /package/dist/{chunk-D4V5JJAK.js.map → chunk-GHMINSER.js.map} +0 -0
  364. /package/dist/{chunk-QGFEBNHO.js.map → chunk-GZISWBCJ.js.map} +0 -0
  365. /package/dist/{chunk-OM3SEDI4.js.map → chunk-HTRLQ4ZZ.js.map} +0 -0
  366. /package/dist/{chunk-SWXLZ4HX.js.map → chunk-ICHHNI5E.js.map} +0 -0
  367. /package/dist/{chunk-K673OO6B.js.map → chunk-ID4ZBC3X.js.map} +0 -0
  368. /package/dist/{chunk-H3YM66EI.js.map → chunk-IF2M43G4.js.map} +0 -0
  369. /package/dist/{chunk-QGSNJD3B.js.map → chunk-IFUYLIEY.js.map} +0 -0
  370. /package/dist/{chunk-D5A3GCZ4.js.map → chunk-IPF5ORDI.js.map} +0 -0
  371. /package/dist/{chunk-BVF3SXD7.js.map → chunk-KBIS64X4.js.map} +0 -0
  372. /package/dist/{chunk-RIZTZJX6.js.map → chunk-LJ744WXU.js.map} +0 -0
  373. /package/dist/{chunk-L5A3KR7R.js.map → chunk-LUQBG637.js.map} +0 -0
  374. /package/dist/{chunk-6QLCS7ET.js.map → chunk-LZN6DTFI.js.map} +0 -0
  375. /package/dist/{chunk-NIXRB5BP.js.map → chunk-MMWX5OT5.js.map} +0 -0
  376. /package/dist/{chunk-UOZOWN73.js.map → chunk-ND6S2DKC.js.map} +0 -0
  377. /package/dist/{chunk-WFWFXDNS.js.map → chunk-NHEKQWFI.js.map} +0 -0
  378. /package/dist/{chunk-2ZFD2UJC.js.map → chunk-NIUHKKMM.js.map} +0 -0
  379. /package/dist/{chunk-XA34THLF.js.map → chunk-NK4LGBGQ.js.map} +0 -0
  380. /package/dist/{chunk-JSWKVZCR.js.map → chunk-NUZ7ROUZ.js.map} +0 -0
  381. /package/dist/{chunk-DHU2AQ6T.js.map → chunk-O3NGOHXQ.js.map} +0 -0
  382. /package/dist/{chunk-ZBUAX4EF.js.map → chunk-O6VOR4NH.js.map} +0 -0
  383. /package/dist/{chunk-JZ4EDEIP.js.map → chunk-ODBOHPZU.js.map} +0 -0
  384. /package/dist/{chunk-5UUJE4FP.js.map → chunk-OK44MD3C.js.map} +0 -0
  385. /package/dist/{chunk-ECGXA4LT.js.map → chunk-OR3OHKU6.js.map} +0 -0
  386. /package/dist/{chunk-ZWF3EWZA.js.map → chunk-P6FATPXQ.js.map} +0 -0
  387. /package/dist/{chunk-PCYPXLEX.js.map → chunk-PBEHTFUG.js.map} +0 -0
  388. /package/dist/{chunk-7CT6SX4M.js.map → chunk-PFHDQY5L.js.map} +0 -0
  389. /package/dist/{chunk-PTJY5R3O.js.map → chunk-PIO6NW7O.js.map} +0 -0
  390. /package/dist/{chunk-TMIJAR2X.js.map → chunk-PREYKC76.js.map} +0 -0
  391. /package/dist/{chunk-ZHQJAV6D.js.map → chunk-PU5ZEV65.js.map} +0 -0
  392. /package/dist/{chunk-UNSQZSZP.js.map → chunk-PWAMX5KU.js.map} +0 -0
  393. /package/dist/{chunk-GETUTTZU.js.map → chunk-PZN76MMV.js.map} +0 -0
  394. /package/dist/{chunk-ABU6A4Z5.js.map → chunk-Q4DBU5RM.js.map} +0 -0
  395. /package/dist/{chunk-2WJKJZSO.js.map → chunk-QHG7GQKM.js.map} +0 -0
  396. /package/dist/{chunk-UAKY6E4N.js.map → chunk-QNOWNCZS.js.map} +0 -0
  397. /package/dist/{chunk-JPSL5GIZ.js.map → chunk-QQLXKDGC.js.map} +0 -0
  398. /package/dist/{chunk-OK57EATL.js.map → chunk-R4GLRJ55.js.map} +0 -0
  399. /package/dist/{chunk-B65CC6Z6.js.map → chunk-RF5WDM25.js.map} +0 -0
  400. /package/dist/{chunk-G46JSSVX.js.map → chunk-RKBCUP5D.js.map} +0 -0
  401. /package/dist/{chunk-GCUMOKTN.js.map → chunk-S2ORTQGS.js.map} +0 -0
  402. /package/dist/{chunk-MRJDLXI3.js.map → chunk-SVXFCCSX.js.map} +0 -0
  403. /package/dist/{chunk-BUE7R3B5.js.map → chunk-SXPLIRQH.js.map} +0 -0
  404. /package/dist/{chunk-5LMCVBMY.js.map → chunk-T5EXREMW.js.map} +0 -0
  405. /package/dist/{chunk-PT2YCQVK.js.map → chunk-TBVDI3LY.js.map} +0 -0
  406. /package/dist/{chunk-BMHQHH7Q.js.map → chunk-TLIFNRU5.js.map} +0 -0
  407. /package/dist/{chunk-YKGJ44Z7.js.map → chunk-TU6ZJTYT.js.map} +0 -0
  408. /package/dist/{chunk-55P6OBB7.js.map → chunk-U43RSPPX.js.map} +0 -0
  409. /package/dist/{chunk-K7RW7FI4.js.map → chunk-UADW5NOU.js.map} +0 -0
  410. /package/dist/{chunk-GRS2HIV6.js.map → chunk-UMV5GBTJ.js.map} +0 -0
  411. /package/dist/{chunk-4UIP3QNW.js.map → chunk-UNAMWK2Q.js.map} +0 -0
  412. /package/dist/{chunk-J4KAPKBJ.js.map → chunk-UORWAG7K.js.map} +0 -0
  413. /package/dist/{chunk-V55JASXO.js.map → chunk-UQRKAM2R.js.map} +0 -0
  414. /package/dist/{chunk-ZMVSKYTJ.js.map → chunk-VLRY2UH4.js.map} +0 -0
  415. /package/dist/{chunk-SPPOUJLN.js.map → chunk-VZFTON37.js.map} +0 -0
  416. /package/dist/{chunk-YQFBH5ZJ.js.map → chunk-WQUIJPN4.js.map} +0 -0
  417. /package/dist/{chunk-NZULV7LK.js.map → chunk-WVQDY3UM.js.map} +0 -0
  418. /package/dist/{chunk-3Y5JLSXS.js.map → chunk-X5RGG3ZW.js.map} +0 -0
  419. /package/dist/{chunk-PFCTSXHU.js.map → chunk-X6Z2SIRF.js.map} +0 -0
  420. /package/dist/{chunk-UHFGK6YA.js.map → chunk-XQGKS4OW.js.map} +0 -0
  421. /package/dist/{chunk-L2F3CFCH.js.map → chunk-Y22JWHCP.js.map} +0 -0
  422. /package/dist/{chunk-C53ER7AG.js.map → chunk-YVA6UPRN.js.map} +0 -0
  423. /package/dist/{chunk-226V6XXJ.js.map → chunk-Z2KP6PNF.js.map} +0 -0
  424. /package/dist/{chunk-G5EDYVSE.js.map → chunk-ZK2WT532.js.map} +0 -0
  425. /package/dist/{chunk-SFCD6OU7.js.map → chunk-ZNVBCKMV.js.map} +0 -0
  426. /package/dist/{chunk-BU2ABHFW.js.map → chunk-ZOFNZLAA.js.map} +0 -0
  427. /package/dist/{chunk-X2RP4TO5.js.map → chunk-ZVJKHGE5.js.map} +0 -0
  428. /package/dist/{classified-marker-KHDOYIJB.js.map → classified-marker-7HXDMYHI.js.map} +0 -0
  429. /package/dist/{collection-facade-LZIF7GWD.js.map → collection-facade-V63BEBGU.js.map} +0 -0
  430. /package/dist/{computed-XMFTHAXV.js.map → computed-LZLSYOPG.js.map} +0 -0
  431. /package/dist/{dead-filter-CXV5NS67.js.map → dead-filter-PZIJ4F4G.js.map} +0 -0
  432. /package/dist/{derive-3YSIS36W.js.map → delegation-7SSGIETH.js.map} +0 -0
  433. /package/dist/{executor-E6YDJ7YA.js.map → derive-IMI3BMDS.js.map} +0 -0
  434. /package/dist/{dispatch-2MQFMEGY.js.map → dispatch-4BUYPWMJ.js.map} +0 -0
  435. /package/dist/{dispatch-OFDA4WQV.js.map → dispatch-KOPDDPEQ.js.map} +0 -0
  436. /package/dist/{executor-NJX3YQQ4.js.map → executor-7SY3M6TZ.js.map} +0 -0
  437. /package/dist/{executor-WWM3DD4P.js.map → executor-SNHW4ELF.js.map} +0 -0
  438. /package/dist/{export-accessible-RLHU5G4W.js.map → executor-Z3IKK7G3.js.map} +0 -0
  439. /package/dist/{extract-partition-QII2EDCS.js.map → export-accessible-O7DIVFUO.js.map} +0 -0
  440. /package/dist/{find-6M7GYDUZ.js.map → extract-partition-ELZEJKXM.js.map} +0 -0
  441. /package/dist/{fanout-sidecar-BO67PCPO.js.map → fanout-sidecar-FYDRL7F3.js.map} +0 -0
  442. /package/dist/{issue-LPEEEMPP.js.map → find-KWB2RYWJ.js.map} +0 -0
  443. /package/dist/{ledger-MSJGWKGW.js.map → issue-5ZHXK4HJ.js.map} +0 -0
  444. /package/dist/{liberate-LEKDYKTC.js.map → ledger-UFJCB6T5.js.map} +0 -0
  445. /package/dist/{link-set-QXXSPPHL.js.map → liberate-OEOSNNFH.js.map} +0 -0
  446. /package/dist/{managed-secret-VSK7ANQI.js.map → link-set-KMUBFN2L.js.map} +0 -0
  447. /package/dist/{noydb-F2AUF6KL.js.map → managed-secret-H5WYSJ46.js.map} +0 -0
  448. /package/dist/{migrate-cek-GEBFYBDC.js.map → migrate-cek-SPESQAAO.js.map} +0 -0
  449. /package/dist/{register-SN72QALV.js.map → noydb-QDZ4QIKO.js.map} +0 -0
  450. /package/dist/{pod-handle-YE7CT66T.js.map → pod-handle-GJLCOUGK.js.map} +0 -0
  451. /package/dist/{post-register-QC5TEAW3.js.map → post-register-2AC2STHC.js.map} +0 -0
  452. /package/dist/{registry-253FF7C6.js.map → register-PIORIMMR.js.map} +0 -0
  453. /package/dist/{registry-3AZWQTDT.js.map → registry-BIMICFUH.js.map} +0 -0
  454. /package/dist/{registry-7UEBTHWG.js.map → registry-JGWLW53D.js.map} +0 -0
  455. /package/dist/{registry-IVJ67NFQ.js.map → registry-SELCBYEQ.js.map} +0 -0
  456. /package/dist/{request-withdrawal-UKVJZKX2.js.map → registry-W327UNYH.js.map} +0 -0
  457. /package/dist/{revoke-G2KXJQA5.js.map → request-withdrawal-K3SXXODI.js.map} +0 -0
  458. /package/dist/{reveal-YQTRNQFH.js.map → reveal-UAPBG743.js.map} +0 -0
  459. /package/dist/{signer-IUIYR3CX.js.map → revoke-6AFVXTWF.js.map} +0 -0
  460. /package/dist/{stale-SKV33PBU.js.map → signer-TW5MAQJP.js.map} +0 -0
  461. /package/dist/{storage-NPBYP2SM.js.map → stale-CROGJBIJ.js.map} +0 -0
  462. /package/dist/{walk-F4OLXI5H.js.map → storage-SO2L2Z5J.js.map} +0 -0
  463. /package/dist/{store-coordination-provider-Z6HKPOGM.js.map → store-coordination-provider-2YD2PTTP.js.map} +0 -0
  464. /package/dist/{verify-KWQIWLGH.js.map → verify-QWO5UKD6.js.map} +0 -0
  465. /package/dist/{withdraw-accessible-ZKPLZ66E.js.map → walk-3KEOL7BY.js.map} +0 -0
@@ -3,30 +3,30 @@ import {
3
3
  SyncEngine,
4
4
  SyncTransaction,
5
5
  bootstrapKeyrings
6
- } from "../chunk-JA25QG5M.js";
6
+ } from "../chunk-N6EWQ5VB.js";
7
7
  import {
8
8
  NO_SYNC
9
- } from "../chunk-JBMMWYOH.js";
10
- import "../chunk-6WS35E6X.js";
11
- import "../chunk-45VHWE4C.js";
12
- import "../chunk-FZXRLNJO.js";
13
- import "../chunk-UHFGK6YA.js";
14
- import "../chunk-RIZTZJX6.js";
15
- import "../chunk-4J3MNVVX.js";
16
- import "../chunk-ZBUAX4EF.js";
17
- import "../chunk-SPPOUJLN.js";
9
+ } from "../chunk-7UHLO4ZN.js";
10
+ import "../chunk-A52BK5AY.js";
11
+ import "../chunk-QVUMKG3Z.js";
12
+ import "../chunk-6BEBWHNL.js";
13
+ import "../chunk-XQGKS4OW.js";
14
+ import "../chunk-LJ744WXU.js";
15
+ import "../chunk-WRLWEYHY.js";
16
+ import "../chunk-O6VOR4NH.js";
17
+ import "../chunk-VZFTON37.js";
18
18
  import "../chunk-NH2UOV3B.js";
19
- import "../chunk-OM3SEDI4.js";
20
- import "../chunk-PUBI455O.js";
21
- import "../chunk-2ELOCEXE.js";
22
- import "../chunk-VSUQI5Q6.js";
19
+ import "../chunk-HTRLQ4ZZ.js";
20
+ import "../chunk-EPPAEGH5.js";
21
+ import "../chunk-URGHKZPL.js";
22
+ import "../chunk-2RH5SEY7.js";
23
23
 
24
24
  // src/with-sync/active.ts
25
- function withSync() {
25
+ function withSync(options) {
26
26
  return {
27
27
  bootstrapKeyrings,
28
28
  buildSyncEngine(opts) {
29
- return new SyncEngine(opts);
29
+ return new SyncEngine({ ...opts, ...options?.arbiter === true && { arbiter: true } });
30
30
  },
31
31
  buildSyncTransaction(vault, engine) {
32
32
  return new SyncTransaction(vault, engine);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-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 './strategy.js'\nimport type { PresenceHandleOpts } from './presence.js'\nimport type { Vault } from '../kernel/vault.js'\nimport { SyncEngine } from './engine.js'\nimport { SyncTransaction } from './transaction.js'\nimport { PresenceHandle } from './presence.js'\nimport { bootstrapKeyrings } from './reserved-mirror.js'\n\nexport function withSync(): SyncStrategy {\n return {\n bootstrapKeyrings,\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":";;;;;;;;;;;;;;;;;;;;;;;;AAwCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA,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-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 './strategy.js'\nimport type { PresenceHandleOpts } from './presence.js'\nimport type { Vault } from '../kernel/vault.js'\nimport { SyncEngine } from './engine.js'\nimport { SyncTransaction } from './transaction.js'\nimport { PresenceHandle } from './presence.js'\nimport { bootstrapKeyrings } from './reserved-mirror.js'\n\n/**\n * core#107 — `arbiter: true` makes this device the vault's ARBITER: its\n * admission refusals are replicated so the writer finds out, instead of\n * staying local to the device that judged them.\n *\n * ⚠️ One arbiter, named by configuration on the device that is to be it\n * (the admin host, or the daemon) — ruled over a quorum because the failure\n * mode is legible: no arbiter configured means no replication, which is\n * exactly the pre-core#107 behaviour. It is NOT an authority proof: nothing\n * stops a member hand-writing `_sync_rejections`, and the reason that is\n * tolerable is the report-only ruling — a replicated refusal never deletes,\n * tombstones or retracts anything, so the worst a forged one does is show\n * somebody a notice about their own record.\n *\n * ⚠️ THE CONDITION THAT WOULD MAKE THAT NON-BOUNDARY A REAL ONE, named by\n * pilot-1 when they accepted it: every member is currently staff of the same\n * firm, and a forged refusal is sealed under the refused record's own\n * collection DEK — so a forger can only show a notice about a record they\n * could already read. ⛔ If EXTERNAL `client`-role users ever hold\n * collections of their own, \"who may write `_sync_rejections`\" stops being\n * cosmetic and this needs an authority design, not a flag. Do not read the\n * paragraph above as a general safety argument; it is an argument about one\n * topology, and this is the trigger to re-open it.\n */\nexport interface WithSyncOptions {\n readonly arbiter?: boolean\n}\n\nexport function withSync(options?: WithSyncOptions): SyncStrategy {\n return {\n bootstrapKeyrings,\n buildSyncEngine(opts: BuildSyncEngineOptions): SyncEngine {\n return new SyncEngine({ ...opts, ...(options?.arbiter === true && { arbiter: true }) })\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":";;;;;;;;;;;;;;;;;;;;;;;;AAoEO,SAAS,SAAS,SAAyC;AAChE,SAAO;AAAA,IACL;AAAA,IACA,gBAAgB,MAA0C;AACxD,aAAO,IAAI,WAAW,EAAE,GAAG,MAAM,GAAI,SAAS,YAAY,QAAQ,EAAE,SAAS,KAAK,EAAG,CAAC;AAAA,IACxF;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,10 @@
1
1
  import {
2
2
  MemoryDeviceSeal,
3
3
  withTeam
4
- } from "../chunk-BU2ABHFW.js";
4
+ } from "../chunk-ZOFNZLAA.js";
5
5
  import {
6
6
  beginEchoUnlock
7
- } from "../chunk-G66YXUTY.js";
7
+ } from "../chunk-35CNOVQE.js";
8
8
  import {
9
9
  NO_TEAM,
10
10
  burnPaperRecoveryEntry,
@@ -34,8 +34,8 @@ import {
34
34
  unwrapMagicLinkGrant,
35
35
  updateAuthenticator,
36
36
  writeMagicLinkGrant
37
- } from "../chunk-APFFJN5T.js";
38
- import "../chunk-DL6BZKP3.js";
37
+ } from "../chunk-GLSCL74M.js";
38
+ import "../chunk-B3B6HV5S.js";
39
39
  import {
40
40
  buildEchoBlock,
41
41
  buildRecipientKeyringFile,
@@ -56,20 +56,20 @@ import {
56
56
  updateKeyringIdentity,
57
57
  verifyPrompt,
58
58
  verifyTypedEcho
59
- } from "../chunk-45VHWE4C.js";
60
- import "../chunk-FZXRLNJO.js";
61
- import "../chunk-UHFGK6YA.js";
62
- import "../chunk-RIZTZJX6.js";
63
- import "../chunk-4J3MNVVX.js";
64
- import "../chunk-ZBUAX4EF.js";
65
- import "../chunk-SPPOUJLN.js";
59
+ } from "../chunk-QVUMKG3Z.js";
60
+ import "../chunk-6BEBWHNL.js";
61
+ import "../chunk-XQGKS4OW.js";
62
+ import "../chunk-LJ744WXU.js";
63
+ import "../chunk-WRLWEYHY.js";
64
+ import "../chunk-O6VOR4NH.js";
65
+ import "../chunk-VZFTON37.js";
66
66
  import "../chunk-NH2UOV3B.js";
67
- import "../chunk-OM3SEDI4.js";
68
- import "../chunk-PUBI455O.js";
69
- import "../chunk-2ELOCEXE.js";
67
+ import "../chunk-HTRLQ4ZZ.js";
68
+ import "../chunk-EPPAEGH5.js";
69
+ import "../chunk-URGHKZPL.js";
70
70
  import {
71
71
  TeamNotEnabledError
72
- } from "../chunk-VSUQI5Q6.js";
72
+ } from "../chunk-2RH5SEY7.js";
73
73
  export {
74
74
  MemoryDeviceSeal,
75
75
  NO_TEAM,
@@ -12,19 +12,19 @@ import {
12
12
  putAtTier,
13
13
  syncDerivedOutputs,
14
14
  withTiers
15
- } from "../chunk-Z3ZXVB2Y.js";
16
- import "../chunk-UHFGK6YA.js";
17
- import "../chunk-RIZTZJX6.js";
18
- import "../chunk-4J3MNVVX.js";
19
- import "../chunk-ZBUAX4EF.js";
20
- import "../chunk-SPPOUJLN.js";
15
+ } from "../chunk-BSEPI3HD.js";
16
+ import "../chunk-XQGKS4OW.js";
17
+ import "../chunk-LJ744WXU.js";
18
+ import "../chunk-WRLWEYHY.js";
19
+ import "../chunk-O6VOR4NH.js";
20
+ import "../chunk-VZFTON37.js";
21
21
  import "../chunk-NH2UOV3B.js";
22
- import "../chunk-OM3SEDI4.js";
23
- import "../chunk-PUBI455O.js";
24
- import "../chunk-2ELOCEXE.js";
22
+ import "../chunk-HTRLQ4ZZ.js";
23
+ import "../chunk-EPPAEGH5.js";
24
+ import "../chunk-URGHKZPL.js";
25
25
  import {
26
26
  TiersNotEnabledError
27
- } from "../chunk-VSUQI5Q6.js";
27
+ } from "../chunk-2RH5SEY7.js";
28
28
  export {
29
29
  NO_TIERS,
30
30
  TiersNotEnabledError,
package/dist/to/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NOYDB_ENVELOPE_GENERATION
3
- } from "../chunk-2ELOCEXE.js";
3
+ } from "../chunk-URGHKZPL.js";
4
4
  import {
5
5
  ConflictError,
6
6
  DuplicateStoreKindError,
@@ -9,7 +9,7 @@ import {
9
9
  StoreCapabilityError,
10
10
  UnknownStoreKindError,
11
11
  isConflictError
12
- } from "../chunk-VSUQI5Q6.js";
12
+ } from "../chunk-2RH5SEY7.js";
13
13
 
14
14
  // src/port/to/locator.ts
15
15
  function isPodStore(store) {
@@ -3,15 +3,15 @@ import {
3
3
  TxContext,
4
4
  TxVault,
5
5
  runTransaction
6
- } from "../chunk-7CT6SX4M.js";
6
+ } from "../chunk-PFHDQY5L.js";
7
7
  import {
8
8
  lazy
9
9
  } from "../chunk-5D2ALSM5.js";
10
10
  import "../chunk-4AOERLTV.js";
11
- import "../chunk-VSUQI5Q6.js";
11
+ import "../chunk-2RH5SEY7.js";
12
12
 
13
13
  // src/with-commit/tx/dry-run.ts
14
- var loadGuardExecutor = lazy(() => import("../executor-WWM3DD4P.js"));
14
+ var loadGuardExecutor = lazy(() => import("../executor-7SY3M6TZ.js"));
15
15
  var SEP = " ";
16
16
  var keyOf = (op) => `${op.vaultName}${SEP}${op.collectionName}${SEP}${op.id}`;
17
17
  async function runDryRun(db, fn) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-PY4KJPYU.js";
4
4
  import {
5
5
  FilenameSanitizationError
6
- } from "../chunk-VSUQI5Q6.js";
6
+ } from "../chunk-2RH5SEY7.js";
7
7
 
8
8
  // src/kernel/util/sanitize-filename.ts
9
9
  var REPLACEMENT = "_";
@@ -8,14 +8,14 @@ import {
8
8
  buildRecordEnvelope,
9
9
  encrypt,
10
10
  openEnvelopeJson
11
- } from "../chunk-4J3MNVVX.js";
12
- import "../chunk-ZBUAX4EF.js";
13
- import "../chunk-SPPOUJLN.js";
11
+ } from "../chunk-WRLWEYHY.js";
12
+ import "../chunk-O6VOR4NH.js";
13
+ import "../chunk-VZFTON37.js";
14
14
  import "../chunk-NH2UOV3B.js";
15
- import "../chunk-OM3SEDI4.js";
16
- import "../chunk-PUBI455O.js";
17
- import "../chunk-2ELOCEXE.js";
18
- import "../chunk-VSUQI5Q6.js";
15
+ import "../chunk-HTRLQ4ZZ.js";
16
+ import "../chunk-EPPAEGH5.js";
17
+ import "../chunk-URGHKZPL.js";
18
+ import "../chunk-2RH5SEY7.js";
19
19
 
20
20
  // src/with-commit/vault-head/head.ts
21
21
  function bucketIndex(collection, id, buckets) {
@@ -2,25 +2,25 @@ import {
2
2
  blindedEqual,
3
3
  dualReadSealedSlot,
4
4
  openVdigPayload
5
- } from "./chunk-CB4467G3.js";
5
+ } from "./chunk-5A3HOTP5.js";
6
6
  import {
7
7
  VDIG_ITERATIONS,
8
8
  pbkdf2VerifyDigest
9
- } from "./chunk-ABU6A4Z5.js";
9
+ } from "./chunk-Q4DBU5RM.js";
10
10
  import {
11
11
  evaluateKofN
12
12
  } from "./chunk-NH2UOV3B.js";
13
- import "./chunk-OM3SEDI4.js";
13
+ import "./chunk-HTRLQ4ZZ.js";
14
14
  import {
15
15
  base64ToBuffer,
16
16
  generateSalt,
17
17
  normalizeForVerify
18
- } from "./chunk-PUBI455O.js";
19
- import "./chunk-2ELOCEXE.js";
18
+ } from "./chunk-EPPAEGH5.js";
19
+ import "./chunk-URGHKZPL.js";
20
20
  import {
21
21
  ClassifiedConfigError,
22
22
  ClassifiedVerifyError
23
- } from "./chunk-VSUQI5Q6.js";
23
+ } from "./chunk-2RH5SEY7.js";
24
24
 
25
25
  // src/capsule/enclave-aes/classify/verify.ts
26
26
  async function padOnce(iter = VDIG_ITERATIONS) {
@@ -138,4 +138,4 @@ export {
138
138
  verifyDigestField,
139
139
  verifyTextField
140
140
  };
141
- //# sourceMappingURL=verify-KWQIWLGH.js.map
141
+ //# sourceMappingURL=verify-QWO5UKD6.js.map
@@ -0,0 +1,20 @@
1
+ import {
2
+ dumpVaultSchema
3
+ } from "./chunk-654RE5YC.js";
4
+ import "./chunk-RXLYKVTF.js";
5
+ import "./chunk-VYYM3MEN.js";
6
+ import "./chunk-UORWAG7K.js";
7
+ import "./chunk-Y2NBBT6K.js";
8
+ import "./chunk-IF2M43G4.js";
9
+ import "./chunk-WRLWEYHY.js";
10
+ import "./chunk-O6VOR4NH.js";
11
+ import "./chunk-VZFTON37.js";
12
+ import "./chunk-NH2UOV3B.js";
13
+ import "./chunk-HTRLQ4ZZ.js";
14
+ import "./chunk-EPPAEGH5.js";
15
+ import "./chunk-URGHKZPL.js";
16
+ import "./chunk-2RH5SEY7.js";
17
+ export {
18
+ dumpVaultSchema
19
+ };
20
+ //# sourceMappingURL=walk-3KEOL7BY.js.map
@@ -26,6 +26,8 @@ export interface GuardContext<T> {
26
26
  vault: ReadOnlyVaultFacade;
27
27
  userId: string;
28
28
  role: Role;
29
+ /** core#74 — `'sync-apply'` when the record is arriving by sync and this check runs as its admission gate; core#108 — `'push-recheck'` when it is this device's OWN dirty record being re-judged against current local state before it is pushed; absent on a local write. */
30
+ origin?: 'local-write' | 'sync-apply' | 'push-recheck';
29
31
  }
30
32
  /**
31
33
  * One {before, after} pair handed to an `invariant` function. `before`
@@ -335,16 +335,16 @@ export declare function assertTierComposition(collectionName: string, cfg: {
335
335
  * structurally — no cast needed at the `tiersContext()` call site).
336
336
  */
337
337
  export interface DerivedOutputsHost<T> {
338
- dispatchMaterializedViewsOnDelete(id: string): Promise<{
338
+ _dispatchMaterializedViewsOnDelete(id: string): Promise<{
339
339
  deleted: number;
340
340
  residueUndecodable: string[];
341
341
  residueDeclined: string[];
342
342
  }>;
343
- dispatchArrayDerivationsOnDelete(id: string, eraseRecordShapeToo?: boolean): Promise<number>;
344
- dispatchRollupsOnDelete(id: string, deleted: T): Promise<unknown>;
343
+ _dispatchArrayDerivationsOnDelete(id: string, eraseRecordShapeToo?: boolean): Promise<number>;
344
+ _dispatchRollupsOnDelete(id: string, deleted: T): Promise<unknown>;
345
345
  /** Task 2 (#722) add-direction: the same local-write dispatchers an ordinary `put()` fires. */
346
- dispatchMaterializedViews(id: string, record: T): Promise<void>;
347
- dispatchDerivations(id: string, record: T, version: number): Promise<void>;
346
+ _dispatchMaterializedViews(id: string, record: T): Promise<void>;
347
+ _dispatchDerivations(id: string, record: T, version: number): Promise<void>;
348
348
  }
349
349
  /**
350
350
  * The {@link TiersContext.syncDerived} implementation collection.ts's
@@ -26,6 +26,22 @@ import { type EnclaveKey } from '../../capsule/index.js';
26
26
  * both at once, by construction.
27
27
  */
28
28
  export declare function historyIdentity(collection: string, recordId: string, version: number): RecordIdentity;
29
+ /**
30
+ * core#76 — the inverse of `historyId`. Used by `restoreTo(T)` to discover
31
+ * collections that exist in history but not in the live store, which is
32
+ * exactly the case a point-in-time restore has to cover: a collection dropped
33
+ * since T would otherwise be invisible to a restore meant to bring T back.
34
+ *
35
+ * ⚠️ A collection name containing `:` would parse wrong here. That is not
36
+ * reachable today — `vault.collection()` rejects those names — and this
37
+ * function is deliberately not hardened against it, because the guard belongs
38
+ * at the naming boundary, not in every parser downstream of it.
39
+ */
40
+ export declare function parseHistoryId(id: string): {
41
+ collection: string;
42
+ recordId: string;
43
+ version: number;
44
+ } | null;
29
45
  /** Save a history entry (a complete encrypted envelope snapshot). */
30
46
  export declare function saveHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string, envelope: EncryptedEnvelope): Promise<void>;
31
47
  /** Get history entries for a record, sorted newest-first. */
@@ -0,0 +1,40 @@
1
+ /**
2
+ * core#76 — point-in-time RESTORE, as forward writes.
3
+ *
4
+ * `vault.at(T)` reconstructs any record at T and is read-only by contract.
5
+ * `restoreTo(T)` takes that reconstruction and WRITES it: for every record
6
+ * whose state at T differs from its state now, put the T-state as a new
7
+ * version; for every record that exists now and did not exist at T, delete it.
8
+ *
9
+ * ## Why forward writes, and not a rewrite of history
10
+ *
11
+ * Every write goes through `Collection.put` / `.delete`, so guards, periods,
12
+ * history and the ledger all see it. The restore is therefore itself an
13
+ * audited, reversible event — `restoreTo(T)` can be undone by another
14
+ * `restoreTo`, the ledger's tamper-evidence is untouched, and the result
15
+ * replicates through ordinary sync because it IS ordinary versioned writes.
16
+ * ⭐ That is the whole argument for this over a pod: a pod restore is state
17
+ * REPLACEMENT and needs core#71/#72 to be safe under sync; this needs nothing,
18
+ * because the stack already knows how to gate, audit and replicate a write.
19
+ *
20
+ * ## What bounds it
21
+ *
22
+ * ⚠️ Accuracy is bounded by history retention. If `historyConfig.maxVersions`
23
+ * pruned the versions around T, the reconstruction at T is incomplete and so
24
+ * is the restore — `at(T)` returns null for a record whose earliest retained
25
+ * snapshot is after T, and this treats that as "did not exist at T". A vault
26
+ * that prunes history cannot honestly point-in-time restore past the prune
27
+ * horizon, and a pod is the answer there (core#77).
28
+ *
29
+ * ⛔ BLOBS ARE NOT RESTORED AND ARE NOT REPORTED. `_history` holds record
30
+ * envelopes, not chunks; a record's blob fields at T reference chunks that may
31
+ * since have been compacted away. The record comes back with its handles
32
+ * intact and the chunks may or may not still be there. Detecting that
33
+ * reliably means resolving every handle against `_blob_chunks`, which is a
34
+ * blob-subsystem concern this module deliberately does not reach into — a
35
+ * `blobsUnrecoverable: []` that is empty because nothing looked would be worse
36
+ * than the silence, because it would read as a guarantee.
37
+ */
38
+ import type { RestoreToOptions, RestoreToResult } from '../../kernel/types.js';
39
+ import type { RestoreToHost } from '../../port/with/restore-host.js';
40
+ export declare function restoreTo(host: RestoreToHost, timestamp: string, options?: RestoreToOptions): Promise<RestoreToResult>;
@@ -36,6 +36,7 @@
36
36
  * @module
37
37
  */
38
38
  import type { StoreCredentials } from '../../kernel/types.js';
39
+ import type { EnclaveKey } from '../../capsule/index.js';
39
40
  import type { BrokerSeedCtx } from '../../port/with/broker-strategy.js';
40
41
  /**
41
42
  * Enrol (idempotent, two-phase commit — I9): create-if-absent the `_broker`
@@ -71,6 +72,9 @@ export declare function rotateSeed(ctx: BrokerSeedCtx): Promise<void>;
71
72
  export declare function enrolMemberSeed(ctx: BrokerSeedCtx, member: {
72
73
  readonly userId: string;
73
74
  readonly secret: string;
75
+ } | {
76
+ readonly userId: string;
77
+ readonly dek: EnclaveKey;
74
78
  }): Promise<void>;
75
79
  /**
76
80
  * core#73 — de-register a member with the host and drop its record. Called
@@ -20,7 +20,7 @@
20
20
  */
21
21
  import type { GrantOptions, RevokeOptions, FactorProofBundle, NoydbStore } from '../../kernel/types.js';
22
22
  import type { Vault } from '../../kernel/vault.js';
23
- import type { UnlockedKeyring } from '../team/keyring.js';
23
+ import type { UnlockedKeyring, RevokeResult } from '../team/keyring.js';
24
24
  import type { GrantCustodianOptions } from './index.js';
25
25
  import type { LiberateOptions, LiberateResult } from './liberate.js';
26
26
  /**
@@ -33,7 +33,7 @@ import type { LiberateOptions, LiberateResult } from './liberate.js';
33
33
  */
34
34
  export interface CustodyHost {
35
35
  _grantCustodianImpl(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: GrantOptions) => Promise<void>, vault: string, options: GrantCustodianOptions, factors?: FactorProofBundle): Promise<void>;
36
- _revokeCustodianImpl(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<void>, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
36
+ _revokeCustodianImpl(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<RevokeResult>, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
37
37
  }
38
38
  export interface CustodyStrategy {
39
39
  grantCustodian(host: CustodyHost, vault: string, options: GrantCustodianOptions, factors?: FactorProofBundle): Promise<void>;
@@ -19,11 +19,23 @@
19
19
  * collection, // collection name OR null for "every collection"
20
20
  * record, // optional specific record id
21
21
  * until, // ISO timestamp — token expires at this instant
22
- * wrappedDek, // base64 AES-KW-wrapped tier DEK, wrapped under target KEK
22
+ * wrappedDek, // base64 AES-KW-wrapped tier DEK, under the token's content key
23
+ * sealedCek, // that content key, RSA-OAEP-sealed to the target's inbox public half
23
24
  * createdAt, // ISO timestamp
24
25
  * }
25
26
  * ```
26
27
  *
28
+ * ## Cross-user (core#65)
29
+ *
30
+ * The wrap key is a per-token CONTENT KEY, not anybody's KEK: the tier DEKs are
31
+ * AES-KW-wrapped under it exactly as they used to be under a KEK, and the key
32
+ * itself is RSA-OAEP-sealed to the target's INBOX PUBLIC HALF (core#96 mints
33
+ * that pair for every grantee, private half sealed under a DEK only that
34
+ * member's own KEK unwraps). So a grantor delegates to somebody whose secret it
35
+ * does not know — the thing this module could not do — while the slot NAMES
36
+ * stay readable to any member holding the `_delegations` DEK, which is what
37
+ * makes an audit enumeration possible without making the keys usable.
38
+ *
27
39
  * The ciphertext is stored as a normal noy-db envelope — the
28
40
  * `_delegations` collection has its own DEK shared across all vault
29
41
  * users, so an operator can enumerate active delegations for audit
@@ -91,6 +103,18 @@ export interface DelegationToken {
91
103
  * otherwise.
92
104
  */
93
105
  readonly wrappedDeks?: Readonly<Record<string, string>>;
106
+ /**
107
+ * core#65 — the token's CONTENT KEY, RSA-OAEP-sealed to the target's inbox
108
+ * public half. `wrappedDek` / `wrappedDeks` are AES-KW-wrapped under it, so
109
+ * only the target can unwrap them, and only they can: the matching private
110
+ * half is sealed in their keyring under a DEK their own KEK unwraps.
111
+ *
112
+ * Absent on a token written before core#65, whose wraps are under the
113
+ * grantor's own KEK — those still load for a target that shares that KEK
114
+ * (the only case that ever worked) and are skipped for anyone else, exactly
115
+ * as before.
116
+ */
117
+ readonly sealedCek?: string;
94
118
  readonly createdAt: string;
95
119
  }
96
120
  export interface IssueDelegationOptions {
@@ -101,11 +125,13 @@ export interface IssueDelegationOptions {
101
125
  readonly until: Date | string;
102
126
  }
103
127
  /**
104
- * Build and persist a delegation token. The caller must hold a tier-N
105
- * DEK and must have already located the target user's keyring file
106
- * (so the `wrappedDek` can be re-wrapped against their KEK).
128
+ * Build and persist a delegation token. The caller must hold a tier-N DEK; the
129
+ * target must have a keyring in this vault with an inbox key pair (core#96).
130
+ *
131
+ * core#65 — the wraps are keyed to a per-token content key sealed to that
132
+ * pair, so the grantor needs nothing of the target's but their PUBLIC half.
107
133
  */
108
- export declare function issueDelegation(store: NoydbStore, vault: string, grantor: UnlockedKeyring, targetKek: EnclaveKey | null, delegationsDek: EnclaveKey, opts: IssueDelegationOptions): Promise<DelegationToken>;
134
+ export declare function issueDelegation(store: NoydbStore, vault: string, grantor: UnlockedKeyring, delegationsDek: EnclaveKey, opts: IssueDelegationOptions): Promise<DelegationToken>;
109
135
  /**
110
136
  * ## Why the vault calls this EXPLICITLY, and never from `openVault` (core#56)
111
137
  *
@@ -121,13 +147,17 @@ export declare function issueDelegation(store: NoydbStore, vault: string, granto
121
147
  * cheap to honour, and its "periodic intervals (tracked by the caller)" is what
122
148
  * an explicit method is.
123
149
  *
124
- * ## ⚠️ Cross-user delegation does not work yet
150
+ * ## Cross-user delegation (core#65) — and the one thing it still needs
151
+ *
152
+ * A token's wraps are keyed to a per-token content key sealed to the target's
153
+ * INBOX PUBLIC HALF, so any member can be a target. Opening one therefore needs
154
+ * that member's inbox PRIVATE half, which is sealed in their keyring file under
155
+ * `deks[INBOX_KEY_ID]` — so this function reads the caller's own keyring file,
156
+ * once, and only when a sealed token is actually addressed to them.
125
157
  *
126
- * `Vault.delegate()` wraps against the GRANTOR's own KEK — its own comment calls
127
- * that "a simpler first cut" pending a per-target KEK exchange. A token issued
128
- * to somebody else cannot be unwrapped by them, and this function skips it. What
129
- * works today is a token whose target shares the issuing KEK. That limit belongs
130
- * to `delegate()`; do not "fix" it here.
158
+ * ⚠️ A pre-core#65 token (no `sealedCek`) is wrapped under the GRANTOR's KEK and
159
+ * still requires `user.kek`; it is skipped for anyone who does not share it,
160
+ * which is the behaviour those tokens were written under.
131
161
  */
132
162
  /**
133
163
  * Enumerate every live (non-expired) delegation addressed to `toUser`
@@ -18,6 +18,8 @@ export { TeamNotEnabledError } from '../../kernel/errors.js';
18
18
  export type { UnlockedKeyring } from './keyring.js';
19
19
  export { loadKeyring, createOwnerKeyring, grant, revoke, changeSecret, listUsers, listUsersWithEnvelopes, ensureCollectionDEK, persistKeyring, updateKeyringIdentity, buildRecipientKeyringFile, } from './keyring.js';
20
20
  export type { PodRecipient, ListUsersOptions } from './keyring.js';
21
+ export type { RotateResult, QuarantineResult, RosterVerifyResult } from './keyring.js';
22
+ export type { DelegationToken, IssueDelegationOptions } from './delegation.js';
21
23
  export type { LoadKeyringOptions, CreateOwnerKeyringOptions, RotateKeysOptions, ChangeSecretOptions, } from './keyring.js';
22
24
  export { enrollAuthenticator, removeAuthenticator, revokeAuthenticator, // #1445 — the three-step revocation; removeAuthenticator alone only hides
23
25
  updateAuthenticator, findAuthenticator, } from './authenticators.js';