@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
@@ -99,8 +99,18 @@ export interface LoadKeyringOptions {
99
99
  * That user's secret — a single string for a standard keyring, or the
100
100
  * structured 3-part {@link EchoSecretParts} for an echo keyring (spec
101
101
  * #940, AG-1: a single string can never unlock an echo keyring).
102
+ * One of `secret` / `kek` is required.
102
103
  */
103
- readonly secret: string | EchoSecretParts;
104
+ readonly secret?: string | EchoSecretParts;
105
+ /**
106
+ * core#96 — a KEK this session already HOLDS, instead of re-deriving one
107
+ * from a secret. The in-session roster reload (core#82) uses it: the secret
108
+ * the vault was opened with is stale after an in-session `rotateSecret`,
109
+ * and 600K PBKDF2 iterations are not needed to adopt a file this KEK
110
+ * already opens. A file re-keyed under this member by somebody else fails
111
+ * the canary and reports `InvalidKeyError` — a defined event, not a hang.
112
+ */
113
+ readonly kek?: EnclaveKey;
104
114
  }
105
115
  /**
106
116
  * KDF dispatch for tier-1 unlock (spec #940). An echo keyring accepts
@@ -186,8 +196,18 @@ export interface CreateOwnerKeyringOptions extends SecretPolicy {
186
196
  export declare function createOwnerKeyring(store: NoydbStore, vault: string, opts: CreateOwnerKeyringOptions): Promise<UnlockedKeyring>;
187
197
  /** Grant access to a new user. Caller must have grant privilege. */
188
198
  export declare function grant(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: GrantOptions): Promise<void>;
199
+ /**
200
+ * Reserved DEK-map slots that are KEYS, not collections, and can never be
201
+ * rotated — `rotateKeys` refuses each by name. Every caller that derives a
202
+ * rotation scope from a DEK map (`revoke`, `quarantineKeyring`) strips these
203
+ * first. ⛔ Kept as ONE set rather than a filter per caller: `quarantineKeyring`
204
+ * stripped only `_roster` and broke the moment the owner keyring gained an
205
+ * inbox key (core#65), which is the second time this list grew and a caller
206
+ * was missed.
207
+ */
208
+ export declare const NON_ROTATABLE_SLOTS: ReadonlySet<string>;
189
209
  /** Revoke a user's access. Optionally rotate keys for affected collections. */
190
- export declare function revoke(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions): Promise<void>;
210
+ export declare function revoke(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions): Promise<RevokeResult>;
191
211
  /** What {@link verifyRoster} found. */
192
212
  export interface RosterVerifyResult {
193
213
  /**
@@ -306,7 +326,19 @@ export declare function quarantineKeyring(store: NoydbStore, vault: string, call
306
326
  * @throws `ValidationError` when the diff is empty (nothing to update).
307
327
  *
308
328
  */
309
- export declare function updateKeyringIdentity(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: UpdateUserOptions): Promise<void>;
329
+ /** What `updateKeyringIdentity` hands back to the kernel (core#96). */
330
+ export interface UpdateKeyringResult {
331
+ /** The role moved. The kernel re-registers the member with a broker host, if one is configured. */
332
+ readonly roleChanged: boolean;
333
+ /**
334
+ * A fresh `_broker_member` DEK, delivered through the inbox, when the member
335
+ * is (still) a sub-admin after a role change — the kernel seals the new seed
336
+ * under it and re-enrols. Absent otherwise (a promotion to owner/admin drops
337
+ * the slot: those roles use the shared `_broker` seed).
338
+ */
339
+ readonly brokerMemberDek?: EnclaveKey;
340
+ }
341
+ export declare function updateKeyringIdentity(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: UpdateUserOptions): Promise<UpdateKeyringResult>;
310
342
  /**
311
343
  * Rotate DEKs for specified collections:
312
344
  * 1. Generate new DEKs
@@ -351,11 +383,38 @@ export interface RotateResult {
351
383
  readonly userId: string;
352
384
  readonly reason: KeyringTamperedReason;
353
385
  }>;
386
+ /**
387
+ * core#100 — every record this rotation re-encrypted, with its version.
388
+ * Rotation writes through the raw store, invisible to the sync dirty log,
389
+ * so a replica kept the OLD ciphertext until each record was edited again —
390
+ * a revoked member with store access went on reading it, and a survivor
391
+ * handed the new DEK read `TamperedError` (measured by pilot-1). The kernel
392
+ * dirty-tracks these on every sync engine so the next push carries them.
393
+ */
394
+ readonly rewritten: ReadonlyArray<{
395
+ readonly collection: string;
396
+ readonly id: string;
397
+ readonly version: number;
398
+ }>;
399
+ }
400
+ /** core#100 — what `revoke` hands the kernel: the rotation's rewrites, for the dirty log. */
401
+ export interface RevokeResult {
402
+ readonly rewritten: RotateResult['rewritten'];
354
403
  }
355
404
  /** Options for {@link rotateKeys} (#846b — was a bare `string[]`). */
356
405
  export interface RotateKeysOptions {
357
406
  /** Collections whose DEKs are re-minted. */
358
407
  readonly collections: readonly string[];
408
+ /**
409
+ * core#100 — members who must NOT be delivered the new keys: the member
410
+ * being revoked or quarantined (a store that suppresses the `_keyring`
411
+ * delete leaves their file in place — #1043 — and delivering to it would
412
+ * hand the revoked member the very key the rotation exists to take away),
413
+ * and a member being narrowed (the collection just left their file, but a
414
+ * pending inbox slot for it cannot be pulled out of its box). They get the
415
+ * drop, and appear in `needsRegrant` as before.
416
+ */
417
+ readonly exclude?: readonly string[];
359
418
  }
360
419
  export declare function rotateKeys(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, opts: RotateKeysOptions): Promise<RotateResult>;
361
420
  /** Options for {@link changeSecret} (#846b). */
@@ -507,7 +566,38 @@ export declare function ensureCollectionDEK(store: NoydbStore, vault: string, ke
507
566
  export declare function hasWritePermission(keyring: UnlockedKeyring, collectionName: string): boolean;
508
567
  /** Check if a user has any access to a collection. */
509
568
  export declare function hasAccess(keyring: UnlockedKeyring, collectionName: string): boolean;
569
+ export declare function mintInboxKey(kek: EnclaveKey): Promise<{
570
+ wrappedInboxKey: string;
571
+ inboxKeyAes: EnclaveKey;
572
+ inboxKey: NonNullable<KeyringFile['inbox_key']>;
573
+ }>;
574
+ /** core#96 — the collections a member has pending in their inbox, over every box. */
575
+ export declare function inboxSlots(file: Pick<KeyringFile, 'inbox'>): string[];
576
+ /**
577
+ * core#65 — this member's INBOX KEY PAIR, rebuilt from their keyring file: the
578
+ * private half is sealed under `deks[INBOX_KEY_ID]`, which only their own KEK
579
+ * unwraps. The inbox drain below opens boxes with it; `with-party/team/
580
+ * delegation.ts` opens a delegation's content key with the same pair, so a
581
+ * grantor can hand a member a key without knowing their secret.
582
+ */
583
+ export declare function openInboxKeyPair(inboxKey: NonNullable<KeyringFile['inbox_key']>, inboxKeyAes: EnclaveKey): Promise<CryptoKeyPair>;
510
584
  /** Persist a keyring file to the store. */
585
+ /**
586
+ * ⛔⛔ core#132 — DO NOT ADD A RETRY HERE. An earlier cut of this change did,
587
+ * and it was wrong in a way that looked like a fix.
588
+ *
589
+ * This function writes the caller's in-memory `keyring.deks` WHOLESALE. If a
590
+ * CAS fails, the write that lost was based on a stale version — retrying it
591
+ * re-persists that same map over the winner's, which is exactly the clobber
592
+ * the CAS just caught, laundered into a success. The suite went green and the
593
+ * data loss stayed.
594
+ *
595
+ * ⭐ The resolution belongs where the intent is, not where the write is. The
596
+ * only caller that races in practice is the lazy DEK mint in
597
+ * `ensureCollectionDEK`, and it can resolve correctly because it has not
598
+ * encrypted anything yet: on conflict it adopts the winner's key and returns
599
+ * that. See the comment there.
600
+ */
511
601
  export declare function persistKeyring(store: NoydbStore, vault: string, keyring: UnlockedKeyring): Promise<void>;
512
602
  /**
513
603
  * Check whether a keyring is authorised for a given `@noy-db/as-*`
@@ -559,3 +649,43 @@ export declare function hasImportCapability(keyring: UnlockedKeyring, tier: 'bun
559
649
  */
560
650
  export declare function evaluateImportCapability(capability: ImportCapability | undefined, role: Role, tier: 'plaintext', format: ExportFormat): boolean;
561
651
  export declare function evaluateImportCapability(capability: ImportCapability | undefined, role: Role, tier: 'bundle'): boolean;
652
+ /**
653
+ * core#132 — what this write is based on.
654
+ *
655
+ * `{ on }` is the envelope the edit was computed from; the write then CASes
656
+ * against its `_v` and lands at `_v + 1`. `'create'` is a keyring that did not
657
+ * exist.
658
+ *
659
+ * ⭐ REQUIRED, not optional, and that is the point: keyring writes were a bare
660
+ * `store.put` with no `expectedVersion`, so two concurrent edits to one member
661
+ * were last-writer-wins, silently. Making the basis a required parameter means
662
+ * the COMPILER enumerates every call site — `NON_ROTATABLE_SLOTS`' own comment
663
+ * records two defects caused by enumerating callers with grep instead.
664
+ *
665
+ * ⭐ `'create'` IS protected, since core#134: it writes with
666
+ * `expectedVersion: 0`. Every version hub writes starts at 1, so on a store
667
+ * that compares only when the record is present, 0 lets the first create
668
+ * through and conflicts every later one — an exact "write only if absent",
669
+ * with no sentinel in the signature and no seventh method on the six-method
670
+ * store contract. #134 costed both; neither was needed.
671
+ *
672
+ * ⚠️ What made it adoptable was an ASSERTION, not a mechanism. The behaviour
673
+ * was already universal when censused (2026-09-24 — `to-aws-s3` implements this
674
+ * sentinel by name), but `@noy-db/ports/to` asserted none of it, so a
675
+ * third-party adapter owed it nothing and this would have been a silent
676
+ * correctness dependency on behaviour no gate checked. The kit's absent case
677
+ * (core#138) holds it, and `noy-db/to` ran it green across 19 adapters before
678
+ * this line changed.
679
+ *
680
+ * ⛔ Still NOT protected, and do not read this as closing it: a MIXED FLEET. An
681
+ * older hub writes keyrings at `_v: 1` with no `expectedVersion` at all, so it
682
+ * clobbers a new hub's create as readily as its update.
683
+ */
684
+ export type KeyringWriteBasis = {
685
+ readonly on: EncryptedEnvelope;
686
+ } | 'create';
687
+ /** The basis for a write computed from a `readKeyringFile` result. */
688
+ export declare const basisOf: (found: {
689
+ readonly envelope: EncryptedEnvelope;
690
+ } | undefined) => KeyringWriteBasis;
691
+ export declare function writeKeyringFile(store: NoydbStore, vault: string, userId: string, keyringFile: KeyringFile, basis: KeyringWriteBasis): Promise<void>;
@@ -111,7 +111,7 @@ export declare class MemorySealer implements NoydbSealer {
111
111
  * says `unseal` MUST throw on tamper, and a double that silently returns
112
112
  * corrupted bytes is not modelling the contract it stands in for. Without
113
113
  * it, every managed-mode test ran against a provider that could not fail
114
- * the way a real one must (found by @noy-db/test-sealer-conformance).
114
+ * the way a real one must (found by @noy-db/ports/at).
115
115
  */
116
116
  private tag;
117
117
  seal(secret: Uint8Array): Promise<Uint8Array>;
@@ -24,7 +24,7 @@ import { type RotateSecretInput, type RecoverSecretInput, type RecoverSecretResu
24
24
  import { type RecoverUserOptions } from './peer-recover.js';
25
25
  import { type PaperRecoveryEntry, type ShamirRecoveryEntry } from './recovery.js';
26
26
  import type { Vault } from '../../kernel/vault.js';
27
- import type { UnlockedKeyring } from './keyring.js';
27
+ import type { UnlockedKeyring, RevokeResult } from './keyring.js';
28
28
  import { type EnrollAuthenticatorOptions, type UpdateAuthenticatorOptions } from './authenticators.js';
29
29
  import type { QuickUnlockStore, QuickUnlockState } from '../session/unlock-state.js';
30
30
  import type { SecretPolicy } from '../../kernel/validation.js';
@@ -58,6 +58,8 @@ export interface TeamFacadeDeps {
58
58
  readonly userId: string;
59
59
  readonly secret: string;
60
60
  }): Promise<void>;
61
+ /** core#96 — pull a member's keyring file from every sync target before an authority edit. */
62
+ refreshRoster(vault: string, userId: string): Promise<void>;
61
63
  /** Managed-recovery enrolment check (kernel-resident). */
62
64
  assertRecoveryEnrolled(vault: string, policy: VaultPolicy, opts?: {
63
65
  skipManagedCheck?: boolean;
@@ -76,7 +78,7 @@ export declare class TeamFacade {
76
78
  /** Gate + run a `grant` engine. See `Noydb.grant` for the public contract. */
77
79
  runGrant(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: GrantOptions) => Promise<void>, vault: string, options: GrantOptions, factors?: FactorProofBundle): Promise<void>;
78
80
  /** Gate + run a `revoke` engine. See `Noydb.revoke` for the public contract. */
79
- runRevoke(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<void>, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
81
+ runRevoke(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<RevokeResult>, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<RevokeResult>;
80
82
  /** Gate + run a `rotateKeys` engine. See `Noydb.rotate` for the public contract. */
81
83
  runRotate(engine: (store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, opts: RotateKeysOptions) => Promise<RotateResult>, vault: string, collections: string[]): Promise<RotateResult>;
82
84
  /** Gate + run the `verifyRoster` engine (#1121). See `Noydb.verifyRoster`. */
@@ -171,6 +173,7 @@ export declare class TeamFacade {
171
173
  * meta: {
172
174
  * credentialId: e.credentialId,
173
175
  * wrapIv: e.wrapIv,
176
+ * rpId: e.rpId,
174
177
  * prfUsed: e.prfUsed,
175
178
  * beFlag: e.beFlag,
176
179
  * requireSingleDevice: e.requireSingleDevice,
@@ -179,6 +182,15 @@ export declare class TeamFacade {
179
182
  * })
180
183
  * ```
181
184
  *
185
+ * `meta` is a free-form blob — hub validates `credentialId` and nothing
186
+ * else, so this example IS the contract for what a slot carries. Record
187
+ * `rpId` (core#140): the slot rewrap / rotation ceremony falls back to
188
+ * `meta.rpId` when the caller passes no `options.rpId` and the enrollment
189
+ * record predates `WebAuthnEnrollment.rpId`. Omitting it does not break
190
+ * single-hostname deployments — absence correctly reads as "send no RP ID"
191
+ * — but on a shared registrable domain rotation then works only if every
192
+ * caller remembers to pass the RP ID by hand.
193
+ *
182
194
  * Returns the WebAuthn `credentialId` (extracted from `meta.credentialId`)
183
195
  * for the caller's lookup index (a bootstrap vault, a Cover,
184
196
  * a server-side allowlist).
@@ -44,7 +44,7 @@ export interface RosterTag {
44
44
  readonly iv: string;
45
45
  readonly data: string;
46
46
  }
47
- export type RosterAuthorityFields = Pick<KeyringFile, 'user_id' | 'role' | 'permissions' | 'granted_by' | 'expires_at' | 'export_capability' | 'import_capability' | 'deks' | 'pending_deks' | 'roster_epoch' | 'clearance'>;
47
+ export type RosterAuthorityFields = Pick<KeyringFile, 'user_id' | 'role' | 'permissions' | 'granted_by' | 'expires_at' | 'export_capability' | 'import_capability' | 'deks' | 'pending_deks' | 'roster_epoch' | 'clearance' | 'inbox_key' | 'inbox'>;
48
48
  export declare function rosterCanonical(file: RosterAuthorityFields): string;
49
49
  export declare function mintRosterTag(file: RosterAuthorityFields, rosterKey: EnclaveKey): Promise<RosterTag>;
50
50
  /**
@@ -1,4 +1,4 @@
1
- import type { NoydbStore, EncryptedEnvelope, ExportStreamOptions, ExportChunk } from '../kernel/types.js';
1
+ import type { NoydbStore, EncryptedEnvelope, LoadPodOptions, LoadPodResult, ExportStreamOptions, ExportChunk } from '../kernel/types.js';
2
2
  import type { LedgerStore } from '../with-commit/history/ledger/store.js';
3
3
  /** Everything the moving backup methods touched on the vault's `this.*`. */
4
4
  export interface BackupContext {
@@ -18,6 +18,13 @@ export interface BackupContext {
18
18
  * callback (plaintext vaults / test constructions).
19
19
  */
20
20
  reloadKeyringAndRebuildDEK(): Promise<void>;
21
+ /**
22
+ * core#71 — reset every sync engine attached to the vault after a restore:
23
+ * the dirty log, the watermarks, the adopted epoch. A restore is a new base;
24
+ * the pre-restore dirty entries refer to records the load just replaced.
25
+ * Absent on test constructions without sync.
26
+ */
27
+ resetSync?(): Promise<void>;
21
28
  /** Clear the vault's collection cache (post-load). */
22
29
  clearCollectionCache(): void;
23
30
  /** Reset the ledger store so the next `ledger()` rebuilds its head cache. */
@@ -42,23 +49,8 @@ export type VerifyBackupResult = {
42
49
  readonly id: string;
43
50
  readonly message: string;
44
51
  };
45
- /**
46
- * Dump vault as a verifiable encrypted JSON backup string.
47
- *
48
- * backups embed the current ledger head and the full `_ledger` +
49
- * `_ledger_deltas` internal collections so the receiver can run
50
- * `verifyBackupIntegrity()` after `load()` and detect any tampering between
51
- * dump and restore. Backups produced without a ledger skip the integrity check
52
- * with a warning — both modes round-trip cleanly.
53
- */
54
52
  export declare function dumpVault(ctx: BackupContext): Promise<string>;
55
- /**
56
- * Restore a vault from a verifiable backup. After loading, runs
57
- * `verifyBackupIntegrity()` to confirm the hash chain, the embedded head, and
58
- * every data envelope's payload hash. Legacy backups (no `ledgerHead`) load
59
- * with a console warning and skip the integrity check.
60
- */
61
- export declare function loadVault(ctx: BackupContext, backupJson: string): Promise<void>;
53
+ export declare function loadVault(ctx: BackupContext, backupJson: string, options?: LoadPodOptions): Promise<LoadPodResult>;
62
54
  /**
63
55
  * End-to-end backup integrity check: `ledger.verify()` (hash chain) plus a data
64
56
  * envelope cross-check (every current record's `_data` hash must match the
@@ -30,4 +30,31 @@
30
30
  * @public
31
31
  */
32
32
  import type { SyncStrategy } from './strategy.js';
33
- export declare function withSync(): SyncStrategy;
33
+ /**
34
+ * core#107 — `arbiter: true` makes this device the vault's ARBITER: its
35
+ * admission refusals are replicated so the writer finds out, instead of
36
+ * staying local to the device that judged them.
37
+ *
38
+ * ⚠️ One arbiter, named by configuration on the device that is to be it
39
+ * (the admin host, or the daemon) — ruled over a quorum because the failure
40
+ * mode is legible: no arbiter configured means no replication, which is
41
+ * exactly the pre-core#107 behaviour. It is NOT an authority proof: nothing
42
+ * stops a member hand-writing `_sync_rejections`, and the reason that is
43
+ * tolerable is the report-only ruling — a replicated refusal never deletes,
44
+ * tombstones or retracts anything, so the worst a forged one does is show
45
+ * somebody a notice about their own record.
46
+ *
47
+ * ⚠️ THE CONDITION THAT WOULD MAKE THAT NON-BOUNDARY A REAL ONE, named by
48
+ * pilot-1 when they accepted it: every member is currently staff of the same
49
+ * firm, and a forged refusal is sealed under the refused record's own
50
+ * collection DEK — so a forger can only show a notice about a record they
51
+ * could already read. ⛔ If EXTERNAL `client`-role users ever hold
52
+ * collections of their own, "who may write `_sync_rejections`" stops being
53
+ * cosmetic and this needs an authority design, not a flag. Do not read the
54
+ * paragraph above as a general safety argument; it is an argument about one
55
+ * topology, and this is the trigger to re-open it.
56
+ */
57
+ export interface WithSyncOptions {
58
+ readonly arbiter?: boolean;
59
+ }
60
+ export declare function withSync(options?: WithSyncOptions): SyncStrategy;
@@ -1,5 +1,9 @@
1
- import type { NoydbStore, DirtyEntry, ConflictStrategy, CollectionConflictResolver, PushOptions, PullOptions, PushResult, PullResult, SyncStatus, SyncTargetRole, RealignResult } from '../kernel/types.js';
1
+ import type { NoydbStore, DirtyEntry, ConflictStrategy, CollectionConflictResolver, PushOptions, PullOptions, PushResult, PullResult, SyncStatus, SyncTargetRole, RealignResult, SyncRejectedApi, ReplaceRemoteResult } from '../kernel/types.js';
2
+ /** core#74 — where a device parks the records its admission gate refused. Local-only: never mirrored, never full-pushed. */
3
+ export declare const REJECTED_COLLECTION = "_sync_rejected";
2
4
  import type { MergeAuthority } from '../port/with/merge-authority.js';
5
+ import type { AdmissionAuthority } from '../port/with/admission-authority.js';
6
+ import type { RejectionCourier } from '../port/with/rejection-courier.js';
3
7
  import { type PeriodPullSource } from './period-scope.js';
4
8
  import type { NoydbEventEmitter } from '../kernel/events.js';
5
9
  import type { SyncPolicy } from '../kernel/sync-policy.js';
@@ -13,7 +17,14 @@ export interface ReservedLookupSource {
13
17
  }
14
18
  /** Sync engine: dirty tracking, push, pull, conflict resolution, scheduling. */
15
19
  export declare class SyncEngine {
20
+ #private;
16
21
  private readonly mergeAuthority;
22
+ /** core#74 — the vault's admission gate for incoming records; wired at open like the other vault seams. */
23
+ private admission;
24
+ /** core#107 — the vault's sealing capability for replicated refusals; wired at open like `admission`. */
25
+ private courier;
26
+ /** core#107 — this device's refusals replicate. Configuration, not an authority proof — see `withSync`. */
27
+ private readonly arbiter;
17
28
  private readonly local;
18
29
  private readonly remote;
19
30
  private readonly strategy;
@@ -29,6 +40,8 @@ export declare class SyncEngine {
29
40
  /** #1036 — last SUCCESSFUL push/pull. Never advanced by a failed attempt. */
30
41
  private lastPush;
31
42
  private lastPull;
43
+ /** core#72 — the target's restore epoch this device adopted; null before any. */
44
+ private epoch;
32
45
  /**
33
46
  * #1036 — the failure that ended the most recent attempt, cleared by the next
34
47
  * success. Live state only: deliberately NOT persisted in `_sync/meta`, since a
@@ -89,9 +102,37 @@ export declare class SyncEngine {
89
102
  private periodPullSource?;
90
103
  /** Wire the period-window source (#807). Same injection pattern as `setReservedLookupSource`. */
91
104
  setPeriodPullSource(source: PeriodPullSource): void;
105
+ /** core#81 — the collections this keyring names; the walk set for a paged pull. Wired by the vault at open. */
106
+ private collectionNames?;
107
+ /** Wire the paged-pull walk set (core#81). Same injection pattern as `setCacheInvalidator`. */
108
+ setCollectionNames(fn: () => readonly string[]): void;
109
+ /**
110
+ * core#81 — one chunk per page of one collection, for `pull({ paged: true })`.
111
+ * `listPage` when the store offers it (200 per page), else `list` + `get` in
112
+ * batches of the same size. Never more than one page in memory.
113
+ */
114
+ private pagedChunks;
92
115
  /** core#82 — when a pull replaces the caller's OWN keyring file, the vault reloads it in place. */
93
116
  private rosterReload?;
94
117
  /** Wire the roster-reload seam (core#82). Same injection pattern as `setCacheInvalidator`. */
118
+ /** core#107 — wire the vault's rejection sealing capability. */
119
+ setRejectionCourier(c: RejectionCourier): void;
120
+ /** core#74 — wire the vault's admission gate. */
121
+ setAdmission(a: AdmissionAuthority): void;
122
+ /** core#71 — after `vault.load()`: a new base. Drops the dirty log, the watermarks and the adopted epoch. */
123
+ resetAfterRestore(): Promise<void>;
124
+ /**
125
+ * core#72 — make the LOCAL vault authoritative on this target. Every local
126
+ * record goes up unconditionally, re-sealed above the target's version where
127
+ * the target moved on (so every peer's copy is superseded); every id the
128
+ * target holds that the local vault lacks gets a delete marker at
129
+ * `remote._v + 1` (so every peer removes it); the reserved collections are
130
+ * mirrored; then a new epoch is written at `_sync/epoch`. The dirty log is
131
+ * cleared: the target IS the local state now.
132
+ */
133
+ replaceRemote(): Promise<ReplaceRemoteResult>;
134
+ /** core#74 — the parked refusals on this device, and their two fates. */
135
+ rejected(): SyncRejectedApi;
95
136
  setRosterReload(seam: {
96
137
  userId: string;
97
138
  reload: () => Promise<void>;
@@ -128,6 +169,8 @@ export declare class SyncEngine {
128
169
  * bound to the keys rather than the engine reaching for them.
129
170
  */
130
171
  mergeAuthority?: MergeAuthority;
172
+ /** core#107 — this device is the vault's arbiter: its refusals replicate. */
173
+ arbiter?: boolean;
131
174
  });
132
175
  /** Start the sync scheduler. Called after vault is fully opened. */
133
176
  startScheduler(): void;
@@ -163,9 +206,16 @@ export declare class SyncEngine {
163
206
  */
164
207
  remirrorPairResolvers(names: readonly string[]): void;
165
208
  /** Record a local change for later push. */
166
- trackChange(collection: string, id: string, action: 'put' | 'delete', version: number): Promise<void>;
209
+ trackChange(collection: string, id: string, action: DirtyEntry['action'], version: number): Promise<void>;
167
210
  /** Remove a dirty entry (satellite fan-out revert cleanup — spec #591). */
168
211
  removeDirty(collection: string, id: string): Promise<void>;
212
+ /**
213
+ * core#92 — mark every user-collection record in the local store dirty at its
214
+ * current version, so the next push sends it (CAS against `_v - 1`, so a
215
+ * remote that already holds a newer copy resolves through the conflict path
216
+ * instead of being overwritten). Records already dirty keep their entry.
217
+ */
218
+ markAllDirty(): Promise<void>;
169
219
  /** Push dirty records to remote adapter. Accepts optional `PushOptions` for partial sync. */
170
220
  push(options?: PushOptions): Promise<PushResult>;
171
221
  /** Pull remote records to local adapter. Accepts optional `PullOptions` for partial sync. */
@@ -209,6 +259,13 @@ export declare class SyncEngine {
209
259
  * what the caller can read. Requires a `MergeAuthority` (a vault-attached
210
260
  * engine on an encrypted vault).
211
261
  */
262
+ /**
263
+ * core#96 (pilot-1, finding B) — bring one member's keyring file down from
264
+ * this target if the target's copy supersedes ours. Called by the kernel
265
+ * before an authority edit; reloads the caller's own keyring in place when
266
+ * it is the one refreshed (core#82).
267
+ */
268
+ refreshKeyring(userId: string): Promise<boolean>;
212
269
  realign(): Promise<RealignResult>;
213
270
  status(): SyncStatus;
214
271
  /** Start auto-sync: listen for online/offline events, optional periodic sync. */
@@ -28,6 +28,7 @@
28
28
  * directly. This subpath is the clean LTS factory entry point.
29
29
  */
30
30
  export { withSync } from './active.js';
31
+ export type { WithSyncOptions } from './active.js';
31
32
  export type { SyncStrategy } from './strategy.js';
32
33
  /** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
33
34
  export { NO_SYNC } from './strategy.js';
@@ -26,7 +26,9 @@
26
26
  * | `_meta/invite-audit-*` | higher `_v` wins | single-use evidence for magic links (core#83) |
27
27
  * | `_users` | higher `_v` wins | the directory's user envelopes; a member app renders these |
28
28
  * | `_delegations` | higher `_v` wins | delegation tokens; revocation is a delete |
29
+ * | `_broker`, `_broker_member` | higher `_v` wins | broker seeds (core#91) — sealed under DEKs only their holder has; a fresh device mints from them |
29
30
  * | `_history`, `_ledger` | NOT replicated | per-device evidence: the ledger is a hash chain per writer, two devices appending would fork it; `vault.at(T)` runs where history lives |
31
+ * | `_sync_rejections` | higher `_v` wins | core#107 — the arbiter's refusals, sealed under the refused record's own collection DEK |
30
32
  * | `_sync` | NOT replicated | this device's dirty log and watermarks |
31
33
  * | `_meta/schema-fence`, `_meta/handle`, other `_meta` | NOT replicated | session and instance state; the rest of `_meta` is decided one id at a time |
32
34
  *
@@ -49,12 +51,13 @@
49
51
  * the acting device and is pushed through the dirty log as
50
52
  * `(collection, id, 'delete')`. On PULL, a record the remote lacks and the
51
53
  * local holds is deleted locally only when (a) the remote carries at least
52
- * one record of that collection — a target never pushed to is not evidence
53
- * of revocation — and (b) no dirty entry protects it (a grant made offline,
54
- * not yet pushed). Invite audit docs are never deleted; revocation is a
54
+ * one KEYRING file — a target never pushed to is not evidence of revocation,
55
+ * but a collection that emptied by revocation is exactly what must propagate
56
+ * (core#91) — and (b) no dirty entry protects it (a grant made offline, not
57
+ * yet pushed). Invite audit docs are never deleted; revocation is a
55
58
  * field update, which the `_v` rule carries.
56
59
  */
57
- import type { NoydbStore } from '../kernel/types.js';
60
+ import type { NoydbStore, EncryptedEnvelope } from '../kernel/types.js';
58
61
  export interface ReservedMirrorResult {
59
62
  /** Records written to `to`. */
60
63
  readonly copied: number;
@@ -62,9 +65,29 @@ export interface ReservedMirrorResult {
62
65
  readonly deleted: number;
63
66
  /** Ids of `_keyring` files copied — the roster reload seam reads this for the caller's own file. */
64
67
  readonly keyringsCopied: readonly string[];
68
+ /**
69
+ * core#96 (pilot-1, finding B) — push only: local `_keyring` files the epoch
70
+ * rule did not write and whose content differs from the remote's (the remote
71
+ * is ahead, or the two diverged at one epoch). The local edit LOST; the
72
+ * engine reports each as a `Conflict` so an authority edit made on a stale
73
+ * copy is never silently dropped.
74
+ */
75
+ readonly staleKeyrings?: readonly {
76
+ readonly id: string;
77
+ readonly local: EncryptedEnvelope;
78
+ readonly remote: EncryptedEnvelope;
79
+ }[];
65
80
  }
66
81
  /** The push half: mirror every declared rule from `local` to `remote`. Never deletes. */
67
82
  export declare function pushReserved(local: NoydbStore, remote: NoydbStore, vault: string): Promise<ReservedMirrorResult>;
83
+ /**
84
+ * core#96 (pilot-1, finding B) — bring ONE member's keyring file down from the
85
+ * target if the target's copy supersedes the local one. The kernel calls it
86
+ * before every authority edit (`grant` on an existing user, `updateUser`,
87
+ * `revoke`, `recoverUser`), so the edit is made on the current file and its
88
+ * push wins instead of being discarded by the epoch rule. One GET.
89
+ */
90
+ export declare function pullKeyringFile(remote: NoydbStore, local: NoydbStore, vault: string, userId: string): Promise<boolean>;
68
91
  /**
69
92
  * The pull half: mirror every declared rule from `remote` into `local`, then
70
93
  * propagate revocations under the two guards in the module doc.
@@ -50,6 +50,8 @@ export interface BuildSyncEngineOptions {
50
50
  label?: string;
51
51
  /** #1042 — the merge's verify/re-stamp capability, bound to the keys by the caller. */
52
52
  mergeAuthority?: MergeAuthority;
53
+ /** core#107 — this device is the vault's arbiter: its admission refusals replicate. */
54
+ arbiter?: boolean;
53
55
  }
54
56
  /**
55
57
  * @internal
@@ -0,0 +1,25 @@
1
+ import {
2
+ freezeAndDeleteClosure,
3
+ freezeSnapshotOnly,
4
+ randomId,
5
+ withdrawAccessibleData
6
+ } from "./chunk-FUHUGKDN.js";
7
+ import "./chunk-U43RSPPX.js";
8
+ import "./chunk-4N4OIVK3.js";
9
+ import "./chunk-WQUIJPN4.js";
10
+ import "./chunk-GMKGGY7V.js";
11
+ import "./chunk-WRLWEYHY.js";
12
+ import "./chunk-O6VOR4NH.js";
13
+ import "./chunk-VZFTON37.js";
14
+ import "./chunk-NH2UOV3B.js";
15
+ import "./chunk-HTRLQ4ZZ.js";
16
+ import "./chunk-EPPAEGH5.js";
17
+ import "./chunk-URGHKZPL.js";
18
+ import "./chunk-2RH5SEY7.js";
19
+ export {
20
+ freezeAndDeleteClosure,
21
+ freezeSnapshotOnly,
22
+ randomId,
23
+ withdrawAccessibleData
24
+ };
25
+ //# sourceMappingURL=withdraw-accessible-OZU525ND.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noy-db/hub",
3
- "version": "0.9.0-pre.0",
3
+ "version": "0.9.0-pre.2",
4
4
  "description": "Zero-knowledge, offline-first, encrypted document store — core library with AES-256-GCM, PBKDF2, multi-user keyring, and sync engine",
5
5
  "license": "Apache-2.0",
6
6
  "author": "vLannaAi <vicio@lanna.ai>",
@@ -276,8 +276,8 @@
276
276
  "happy-dom": "^18.0.0",
277
277
  "zod": "^4.0.0",
278
278
  "zod-to-json-schema": "^3.25.2",
279
- "@noy-db/attestation": "0.9.0-pre.0",
280
- "@noy-db/shamir": "0.9.0-pre.0"
279
+ "@noy-db/attestation": "0.9.0-pre.2",
280
+ "@noy-db/shamir": "0.9.0-pre.2"
281
281
  },
282
282
  "peerDependencies": {
283
283
  "zod": "^3.0.0 || ^4.0.0",
@@ -1,18 +0,0 @@
1
- import {
2
- UserApi,
3
- createUserApi
4
- } from "./chunk-GCUMOKTN.js";
5
- import "./chunk-FZXRLNJO.js";
6
- import "./chunk-4J3MNVVX.js";
7
- import "./chunk-ZBUAX4EF.js";
8
- import "./chunk-SPPOUJLN.js";
9
- import "./chunk-NH2UOV3B.js";
10
- import "./chunk-OM3SEDI4.js";
11
- import "./chunk-PUBI455O.js";
12
- import "./chunk-2ELOCEXE.js";
13
- import "./chunk-VSUQI5Q6.js";
14
- export {
15
- UserApi,
16
- createUserApi
17
- };
18
- //# sourceMappingURL=api-MSJXVYQG.js.map