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

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 (533) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +8 -8
  3. package/codemods/0.4.0-pre.json +1 -1
  4. package/codemods/0.8.0-pre.json +1 -1
  5. package/dist/api-MSJXVYQG.js +18 -0
  6. package/dist/as/index.js +33 -23
  7. package/dist/as/index.js.map +1 -1
  8. package/dist/at/index.js +8 -8
  9. package/dist/attestation/index.js +18 -18
  10. package/dist/{backup-YE2VQ26S.js → backup-7RKNZMQO.js} +11 -11
  11. package/dist/blobs/index.js +12 -12
  12. package/dist/broker/index.js +19 -11
  13. package/dist/broker/index.js.map +1 -1
  14. package/dist/by/index.js +2 -2
  15. package/dist/capsule/contract.d.ts +1 -1
  16. package/dist/capsule/contract.js +6 -6
  17. package/dist/capsule/enclave-aes/broker/proof.d.ts +12 -3
  18. package/dist/capsule/enclave-aes/index.d.ts +1 -1
  19. package/dist/capsule/enclave-aes/index.js +40 -14
  20. package/dist/capsule/enclave-aes/index.js.map +1 -1
  21. package/dist/capsule/index.d.ts +1 -1
  22. package/dist/capsule/plumbing/record-codec.d.ts +7 -0
  23. package/dist/{capsule-VOLX3QRQ.js → capsule-57BDK7LG.js} +8 -8
  24. package/dist/cargo/index.js +32 -32
  25. package/dist/{chunk-A4XMIZT3.js → chunk-226V6XXJ.js} +41 -6
  26. package/dist/chunk-226V6XXJ.js.map +1 -0
  27. package/dist/{chunk-LNSVGRHO.js → chunk-2A56DSRI.js} +2 -2
  28. package/dist/chunk-2DX4JCRI.js +1 -0
  29. package/dist/{chunk-SV2PM2OY.js → chunk-2ELOCEXE.js} +1 -1
  30. package/dist/chunk-2ELOCEXE.js.map +1 -0
  31. package/dist/{chunk-6QVKPHBF.js → chunk-2WJKJZSO.js} +2 -2
  32. package/dist/{chunk-TKVUE4JF.js → chunk-2ZFD2UJC.js} +9 -9
  33. package/dist/{chunk-2AFX33YA.js → chunk-3V6LZHUO.js} +3 -3
  34. package/dist/chunk-3V6LZHUO.js.map +1 -0
  35. package/dist/{chunk-4JPMZTJY.js → chunk-3Y5JLSXS.js} +2 -2
  36. package/dist/{chunk-XSPFDUDG.js → chunk-45VHWE4C.js} +51 -16
  37. package/dist/chunk-45VHWE4C.js.map +1 -0
  38. package/dist/{chunk-LGNDFRYC.js → chunk-4CFHL5RY.js} +1 -1
  39. package/dist/chunk-4CFHL5RY.js.map +1 -0
  40. package/dist/{chunk-EZGV6F47.js → chunk-4J3MNVVX.js} +1 -1
  41. package/dist/{chunk-EZGV6F47.js.map → chunk-4J3MNVVX.js.map} +1 -1
  42. package/dist/{chunk-O2IMQSNA.js → chunk-4UIP3QNW.js} +2 -2
  43. package/dist/{chunk-EJLV62NI.js → chunk-55P6OBB7.js} +2 -2
  44. package/dist/{chunk-Y3LPTBG7.js → chunk-5HNW4ZTA.js} +6 -9
  45. package/dist/chunk-5HNW4ZTA.js.map +1 -0
  46. package/dist/{chunk-TEHHROZL.js → chunk-5LMCVBMY.js} +5 -5
  47. package/dist/{chunk-4V3Q35WG.js → chunk-5UUJE4FP.js} +3 -3
  48. package/dist/{chunk-JWWYRR4Q.js → chunk-5XONHAFD.js} +2 -2
  49. package/dist/{chunk-PD64727P.js → chunk-6QLCS7ET.js} +2 -2
  50. package/dist/chunk-6QLCS7ET.js.map +1 -0
  51. package/dist/{chunk-QBLT6POL.js → chunk-6WS35E6X.js} +2 -2
  52. package/dist/{chunk-IUBMZPHM.js → chunk-6Y5E4SJU.js} +5 -6
  53. package/dist/chunk-6Y5E4SJU.js.map +1 -0
  54. package/dist/{chunk-GZT3NQRA.js → chunk-72XBVN4J.js} +8 -2
  55. package/dist/{chunk-GZT3NQRA.js.map → chunk-72XBVN4J.js.map} +1 -1
  56. package/dist/{chunk-EYG2CY2X.js → chunk-7BMOS4JQ.js} +11 -11
  57. package/dist/chunk-7BMOS4JQ.js.map +1 -0
  58. package/dist/{chunk-UA372JHH.js → chunk-7CT6SX4M.js} +3 -3
  59. package/dist/chunk-7CT6SX4M.js.map +1 -0
  60. package/dist/{chunk-EZOAKKTB.js → chunk-ABU6A4Z5.js} +2 -2
  61. package/dist/{chunk-VKI2EB3N.js → chunk-AJFPAHMW.js} +3 -3
  62. package/dist/{chunk-DQESF6RP.js → chunk-APFFJN5T.js} +29 -16
  63. package/dist/chunk-APFFJN5T.js.map +1 -0
  64. package/dist/{chunk-2ODVB6LZ.js → chunk-B65CC6Z6.js} +2 -2
  65. package/dist/{chunk-MBMTND6D.js → chunk-BJH77UY2.js} +2 -2
  66. package/dist/{chunk-VAORSCSU.js → chunk-BMHQHH7Q.js} +2 -2
  67. package/dist/chunk-BMHQHH7Q.js.map +1 -0
  68. package/dist/{chunk-FFJFE4T7.js → chunk-BNFNQNEP.js} +2 -2
  69. package/dist/chunk-BU2ABHFW.js +74 -0
  70. package/dist/chunk-BU2ABHFW.js.map +1 -0
  71. package/dist/{chunk-5WWDGFOS.js → chunk-BUE7R3B5.js} +2 -2
  72. package/dist/{chunk-5FE75J4S.js → chunk-BVF3SXD7.js} +5 -5
  73. package/dist/{chunk-VFHCKG5M.js → chunk-BYHCKX73.js} +3 -3
  74. package/dist/{chunk-BVCUTXE3.js → chunk-C53ER7AG.js} +2 -2
  75. package/dist/{chunk-MILI22XQ.js → chunk-CAD7N6HQ.js} +3 -3
  76. package/dist/{chunk-5KC7QYEC.js → chunk-CB4467G3.js} +5 -5
  77. package/dist/{chunk-JIBUPZHA.js → chunk-D4V5JJAK.js} +4 -4
  78. package/dist/{chunk-DLD5LGDS.js → chunk-D5A3GCZ4.js} +3 -3
  79. package/dist/{chunk-FOEDQATO.js → chunk-DHU2AQ6T.js} +2 -2
  80. package/dist/{chunk-VHBKYN2J.js → chunk-DL6BZKP3.js} +2 -2
  81. package/dist/{chunk-NBQ3KK6X.js → chunk-EA4VDI5D.js} +4 -4
  82. package/dist/chunk-EA4VDI5D.js.map +1 -0
  83. package/dist/{chunk-E2N2T5ZO.js → chunk-ECGXA4LT.js} +2 -2
  84. package/dist/{chunk-PP3K67AJ.js → chunk-EMAWOGVH.js} +3 -3
  85. package/dist/{chunk-WXE4W2U6.js → chunk-EUD3HQM4.js} +4 -4
  86. package/dist/{chunk-MXOQ5JCG.js → chunk-FSQNGPHH.js} +171 -124
  87. package/dist/chunk-FSQNGPHH.js.map +1 -0
  88. package/dist/{chunk-LIOVX5TJ.js → chunk-FZXRLNJO.js} +3 -3
  89. package/dist/{chunk-WPOYWFSE.js → chunk-G46JSSVX.js} +7 -7
  90. package/dist/{chunk-JSMTXZR3.js → chunk-G5EDYVSE.js} +8 -6
  91. package/dist/chunk-G5EDYVSE.js.map +1 -0
  92. package/dist/chunk-G66YXUTY.js +60 -0
  93. package/dist/chunk-G66YXUTY.js.map +1 -0
  94. package/dist/{chunk-FFWI7UH7.js → chunk-GAGT3YZN.js} +1 -1
  95. package/dist/chunk-GAGT3YZN.js.map +1 -0
  96. package/dist/{chunk-AEQGFRU4.js → chunk-GCUMOKTN.js} +3 -3
  97. package/dist/{chunk-244QBK7Z.js → chunk-GETUTTZU.js} +4 -4
  98. package/dist/{chunk-244QBK7Z.js.map → chunk-GETUTTZU.js.map} +1 -1
  99. package/dist/{chunk-V3RWOOSO.js → chunk-GOJQ5DZA.js} +4 -4
  100. package/dist/{chunk-UEFOQH74.js → chunk-GRS2HIV6.js} +2 -2
  101. package/dist/{chunk-3L2NBKDR.js → chunk-H3YM66EI.js} +2 -2
  102. package/dist/{chunk-3A5DUZ56.js → chunk-IVMFIKNA.js} +6 -6
  103. package/dist/{chunk-3A5DUZ56.js.map → chunk-IVMFIKNA.js.map} +1 -1
  104. package/dist/{chunk-747G6CT3.js → chunk-J4KAPKBJ.js} +2 -2
  105. package/dist/{chunk-H23XHRTT.js → chunk-JA25QG5M.js} +211 -6
  106. package/dist/chunk-JA25QG5M.js.map +1 -0
  107. package/dist/{chunk-T7IR4N2S.js → chunk-JBMMWYOH.js} +3 -1
  108. package/dist/{chunk-T7IR4N2S.js.map → chunk-JBMMWYOH.js.map} +1 -1
  109. package/dist/{chunk-MXKI4ABF.js → chunk-JPSL5GIZ.js} +3 -3
  110. package/dist/{chunk-2GHDLTPE.js → chunk-JSWKVZCR.js} +2 -2
  111. package/dist/{chunk-BNWA3WG5.js → chunk-JZ4EDEIP.js} +3 -3
  112. package/dist/{chunk-GUZET4SG.js → chunk-K673OO6B.js} +4 -4
  113. package/dist/chunk-K673OO6B.js.map +1 -0
  114. package/dist/{chunk-5UMK7GRI.js → chunk-K7RW7FI4.js} +5 -5
  115. package/dist/{chunk-N7EVQD5S.js → chunk-L2F3CFCH.js} +4 -4
  116. package/dist/{chunk-2PVXF5CS.js → chunk-L5A3KR7R.js} +3 -3
  117. package/dist/{chunk-O46CHQT7.js → chunk-LGGIFKJP.js} +4 -4
  118. package/dist/{chunk-Y2RKVFKR.js → chunk-MQ7YWBQ5.js} +2 -2
  119. package/dist/{chunk-4CIQDWRB.js → chunk-MRJDLXI3.js} +14 -8
  120. package/dist/{chunk-4CIQDWRB.js.map → chunk-MRJDLXI3.js.map} +1 -1
  121. package/dist/{chunk-YRXFFWG4.js → chunk-NIXRB5BP.js} +2 -2
  122. package/dist/{chunk-RHVMZSUU.js → chunk-NV4OESHC.js} +1 -1
  123. package/dist/chunk-NV4OESHC.js.map +1 -0
  124. package/dist/{chunk-V7ADQF5O.js → chunk-NYJBYVBG.js} +4 -4
  125. package/dist/{chunk-23D6M6VM.js → chunk-NZULV7LK.js} +4 -4
  126. package/dist/{chunk-HW7CMKUG.js → chunk-OFD2HD6F.js} +1 -1
  127. package/dist/{chunk-HW7CMKUG.js.map → chunk-OFD2HD6F.js.map} +1 -1
  128. package/dist/{chunk-BPWYQ25R.js → chunk-OJU67C23.js} +4 -4
  129. package/dist/{chunk-BPWYQ25R.js.map → chunk-OJU67C23.js.map} +1 -1
  130. package/dist/{chunk-AUKKUPVB.js → chunk-OK57EATL.js} +2 -2
  131. package/dist/{chunk-42ALPZ2B.js → chunk-OM3SEDI4.js} +4 -4
  132. package/dist/{chunk-42ALPZ2B.js.map → chunk-OM3SEDI4.js.map} +1 -1
  133. package/dist/{chunk-OYW3I5M4.js → chunk-PCYPXLEX.js} +6 -6
  134. package/dist/{chunk-2MG3SW7Q.js → chunk-PFCTSXHU.js} +2 -2
  135. package/dist/{chunk-FVH5QYY2.js → chunk-PGC35KXE.js} +2 -2
  136. package/dist/{chunk-NCO25JZO.js → chunk-PT2YCQVK.js} +4 -4
  137. package/dist/{chunk-SYNY3VB5.js → chunk-PTJY5R3O.js} +2 -2
  138. package/dist/{chunk-QMWY2FDS.js → chunk-PUBI455O.js} +2 -2
  139. package/dist/{chunk-VMV5SBE4.js → chunk-QDHHHI5Q.js} +5 -5
  140. package/dist/{chunk-JQYKPKG6.js → chunk-QGFEBNHO.js} +4 -4
  141. package/dist/{chunk-52MGURXO.js → chunk-QGSNJD3B.js} +2 -2
  142. package/dist/chunk-QJNAHPVT.js +91 -0
  143. package/dist/chunk-QJNAHPVT.js.map +1 -0
  144. package/dist/{chunk-VVOLDVIR.js → chunk-QSHATAXJ.js} +2 -2
  145. package/dist/{chunk-G2MVBDFP.js → chunk-QXJXG7DN.js} +39 -9
  146. package/dist/chunk-QXJXG7DN.js.map +1 -0
  147. package/dist/{chunk-KZXDLBY6.js → chunk-RDOEOPOI.js} +5 -5
  148. package/dist/{chunk-FLPCETP6.js → chunk-RIZTZJX6.js} +2 -2
  149. package/dist/{chunk-H427H63K.js → chunk-RNACRT5H.js} +2 -2
  150. package/dist/chunk-RWFQVNXR.js +24 -0
  151. package/dist/chunk-RWFQVNXR.js.map +1 -0
  152. package/dist/{chunk-JOSPH3E5.js → chunk-SFCD6OU7.js} +2 -2
  153. package/dist/{chunk-IMQKWR46.js → chunk-SNM7LSYG.js} +4 -5
  154. package/dist/chunk-SNM7LSYG.js.map +1 -0
  155. package/dist/{chunk-Q2XRFWOI.js → chunk-SPPOUJLN.js} +2 -2
  156. package/dist/{chunk-EGVJ7TM4.js → chunk-SWXLZ4HX.js} +8 -9
  157. package/dist/chunk-SWXLZ4HX.js.map +1 -0
  158. package/dist/{chunk-H7JBY4P7.js → chunk-TFWFPZRU.js} +13 -13
  159. package/dist/chunk-TFWFPZRU.js.map +1 -0
  160. package/dist/{chunk-VQDZYB2B.js → chunk-TMIJAR2X.js} +3 -3
  161. package/dist/{chunk-VQDZYB2B.js.map → chunk-TMIJAR2X.js.map} +1 -1
  162. package/dist/{chunk-RB4DOPGZ.js → chunk-TZYTMZZY.js} +10 -10
  163. package/dist/{chunk-Q4UHJ5SN.js → chunk-UAKY6E4N.js} +2 -2
  164. package/dist/chunk-UHFGK6YA.js +40 -0
  165. package/dist/chunk-UHFGK6YA.js.map +1 -0
  166. package/dist/{chunk-DIZLQVAA.js → chunk-UNSQZSZP.js} +2 -2
  167. package/dist/{chunk-4T3SE27M.js → chunk-UOZOWN73.js} +2 -2
  168. package/dist/{chunk-OKSTSITU.js → chunk-V55JASXO.js} +3 -3
  169. package/dist/{chunk-37EPTBBR.js → chunk-VSUQI5Q6.js} +32 -4
  170. package/dist/chunk-VSUQI5Q6.js.map +1 -0
  171. package/dist/{chunk-XQRFSKYM.js → chunk-WFWFXDNS.js} +2 -2
  172. package/dist/{chunk-N7UDP5VU.js → chunk-WHOKGHJ3.js} +7 -7
  173. package/dist/{chunk-7R2Q7CPL.js → chunk-X2RP4TO5.js} +7 -7
  174. package/dist/{chunk-U2FZNEWJ.js → chunk-XA34THLF.js} +8 -6
  175. package/dist/{chunk-U2FZNEWJ.js.map → chunk-XA34THLF.js.map} +1 -1
  176. package/dist/{chunk-UIYESRD6.js → chunk-XITHENBI.js} +9 -9
  177. package/dist/{chunk-UIYESRD6.js.map → chunk-XITHENBI.js.map} +1 -1
  178. package/dist/{chunk-3XJQBBZD.js → chunk-XKBTJGFP.js} +2 -2
  179. package/dist/{chunk-SMV2HRDU.js → chunk-XXNWU5QZ.js} +2 -2
  180. package/dist/{chunk-TZZBXPZK.js → chunk-XXQ5XIYY.js} +2 -2
  181. package/dist/{chunk-3EWS67C7.js → chunk-YFFMPZPY.js} +2 -2
  182. package/dist/{chunk-M5B2W6YY.js → chunk-YKGJ44Z7.js} +3 -3
  183. package/dist/{chunk-5A4345TG.js → chunk-YQFBH5ZJ.js} +3 -3
  184. package/dist/{chunk-DHHGL42E.js → chunk-Z3ZXVB2Y.js} +22 -6
  185. package/dist/chunk-Z3ZXVB2Y.js.map +1 -0
  186. package/dist/{chunk-OIEO4WDL.js → chunk-ZBUAX4EF.js} +2 -2
  187. package/dist/chunk-ZBUAX4EF.js.map +1 -0
  188. package/dist/{chunk-HS554XAF.js → chunk-ZHQJAV6D.js} +2 -2
  189. package/dist/{chunk-IUT3GWP3.js → chunk-ZMVSKYTJ.js} +17 -93
  190. package/dist/chunk-ZMVSKYTJ.js.map +1 -0
  191. package/dist/{chunk-AL6ML4LA.js → chunk-ZVSKSUGI.js} +5 -5
  192. package/dist/{chunk-JDEYF3PJ.js → chunk-ZWF3EWZA.js} +2 -2
  193. package/dist/chunk-ZWF3EWZA.js.map +1 -0
  194. package/dist/classified/index.js +5 -5
  195. package/dist/{classified-marker-SIYKUU5L.js → classified-marker-KHDOYIJB.js} +3 -3
  196. package/dist/collection-facade-LZIF7GWD.js +41 -0
  197. package/dist/{computed-FAD7SED4.js → computed-XMFTHAXV.js} +3 -3
  198. package/dist/consent/index.js +8 -8
  199. package/dist/cover/index.js +8 -8
  200. package/dist/coverage/index.js +1 -1
  201. package/dist/custody/index.js +12 -11
  202. package/dist/{dead-filter-4F3LWYKH.js → dead-filter-CXV5NS67.js} +10 -10
  203. package/dist/debug/index.js +7 -7
  204. package/dist/{delegation-NANZDG4N.js → delegation-ONLM4JFI.js} +49 -25
  205. package/dist/delegation-ONLM4JFI.js.map +1 -0
  206. package/dist/derivations/index.js +24 -23
  207. package/dist/derive-3YSIS36W.js +20 -0
  208. package/dist/directory/index.js +9 -9
  209. package/dist/{dispatch-JDZNGEB3.js → dispatch-2MQFMEGY.js} +20 -20
  210. package/dist/{dispatch-H4HV32AM.js → dispatch-OFDA4WQV.js} +5 -5
  211. package/dist/executor-E6YDJ7YA.js +8 -0
  212. package/dist/executor-NJX3YQQ4.js +35 -0
  213. package/dist/executor-WWM3DD4P.js +8 -0
  214. package/dist/export-accessible-RLHU5G4W.js +22 -0
  215. package/dist/extract-partition-QII2EDCS.js +35 -0
  216. package/dist/{fanout-sidecar-L7NHPIOC.js → fanout-sidecar-BO67PCPO.js} +8 -8
  217. package/dist/find-6M7GYDUZ.js +10 -0
  218. package/dist/forget/index.js +25 -8
  219. package/dist/forget/index.js.map +1 -1
  220. package/dist/guards/index.js +4 -4
  221. package/dist/history/index.js +12 -12
  222. package/dist/i18n/index.js +13 -13
  223. package/dist/index.d.ts +8 -6
  224. package/dist/index.js +122 -110
  225. package/dist/index.js.map +1 -1
  226. package/dist/indexing/index.js +6 -6
  227. package/dist/introspection/index.js +15 -11
  228. package/dist/issue-LPEEEMPP.js +19 -0
  229. package/dist/kernel/cache/index.d.ts +1 -1
  230. package/dist/kernel/collection.d.ts +1 -0
  231. package/dist/kernel/errors.d.ts +33 -4
  232. package/dist/kernel/export-scope.d.ts +40 -0
  233. package/dist/kernel/noydb.d.ts +3 -1
  234. package/dist/kernel/put-many-atomic.d.ts +1 -1
  235. package/dist/kernel/query/live/live.d.ts +2 -1
  236. package/dist/kernel/query/sort-key.d.ts +0 -2
  237. package/dist/kernel/tx-write-gate.d.ts +2 -4
  238. package/dist/kernel/types.d.ts +93 -6
  239. package/dist/kernel/validation.d.ts +0 -10
  240. package/dist/kernel/vault.d.ts +4 -0
  241. package/dist/kernel/via/reconcile.d.ts +1 -42
  242. package/dist/{ledger-5ZMGE44K.js → ledger-MSJGWKGW.js} +10 -10
  243. package/dist/liberate-LEKDYKTC.js +25 -0
  244. package/dist/{link-set-MFXC24VK.js → link-set-QXXSPPHL.js} +10 -10
  245. package/dist/{managed-secret-MFTFT22X.js → managed-secret-VSK7ANQI.js} +9 -9
  246. package/dist/materialized-views/index.js +26 -26
  247. package/dist/{migrate-cek-DZRFFOHW.js → migrate-cek-GEBFYBDC.js} +2 -2
  248. package/dist/money/index.js +5 -5
  249. package/dist/noydb-F2AUF6KL.js +98 -0
  250. package/dist/on/index.js +25 -0
  251. package/dist/overlay-views/index.js +4 -4
  252. package/dist/periods/index.js +11 -11
  253. package/dist/pod/index.js +69 -67
  254. package/dist/{pod-handle-A3LET7NO.js → pod-handle-YE7CT66T.js} +8 -8
  255. package/dist/policy/index.js +9 -9
  256. package/dist/port/as/active.d.ts +4 -0
  257. package/dist/port/as/index.d.ts +1 -0
  258. package/dist/port/by/index.d.ts +14 -5
  259. package/dist/port/on/index.d.ts +26 -0
  260. package/dist/port/to/index.d.ts +1 -1
  261. package/dist/port/with/broker-strategy.d.ts +14 -0
  262. package/dist/port/with/coverage-strategy.d.ts +17 -1
  263. package/dist/port/with/formats-strategy.d.ts +34 -1
  264. package/dist/port/with/lookup-strategy.d.ts +85 -4
  265. package/dist/port/with/service-bus.d.ts +2 -1
  266. package/dist/portability/index.js +8 -8
  267. package/dist/{post-register-7ND27CF2.js → post-register-QC5TEAW3.js} +6 -6
  268. package/dist/query/all/index.js +16 -16
  269. package/dist/query/index.js +8 -8
  270. package/dist/query/live/index.js +7 -7
  271. package/dist/query/reduce/index.js +10 -10
  272. package/dist/query/relate/index.js +10 -10
  273. package/dist/reduce/index.js +8 -8
  274. package/dist/register-SN72QALV.js +30 -0
  275. package/dist/registry-253FF7C6.js +35 -0
  276. package/dist/registry-3AZWQTDT.js +23 -0
  277. package/dist/registry-7UEBTHWG.js +8 -0
  278. package/dist/registry-IVJ67NFQ.js +8 -0
  279. package/dist/request-withdrawal-UKVJZKX2.js +28 -0
  280. package/dist/{reveal-B2TLP4JQ.js → reveal-YQTRNQFH.js} +7 -7
  281. package/dist/revoke-G2KXJQA5.js +24 -0
  282. package/dist/satellites/index.js +1 -1
  283. package/dist/schema-update/index.js +2 -2
  284. package/dist/sealed-record/index.js +11 -11
  285. package/dist/search/index.js +4 -4
  286. package/dist/{seed-XNSE4U3S.js → seed-JMQTRKRE.js} +121 -27
  287. package/dist/seed-JMQTRKRE.js.map +1 -0
  288. package/dist/sequence/index.js +8 -8
  289. package/dist/session/index.js +8 -8
  290. package/dist/shadow/index.js +2 -2
  291. package/dist/signer-IUIYR3CX.js +23 -0
  292. package/dist/snapshots/index.js +9 -9
  293. package/dist/{stale-6GCFMOOR.js → stale-SKV33PBU.js} +9 -9
  294. package/dist/storage-NPBYP2SM.js +21 -0
  295. package/dist/{store-coordination-provider-C4BPT5XF.js → store-coordination-provider-Z6HKPOGM.js} +9 -9
  296. package/dist/sync/index.js +17 -11
  297. package/dist/sync/index.js.map +1 -1
  298. package/dist/team/index.js +17 -15
  299. package/dist/tiers/index.js +10 -10
  300. package/dist/to/index.js +2 -2
  301. package/dist/transactions/index.js +3 -3
  302. package/dist/util/index.js +1 -1
  303. package/dist/vault-head/index.js +8 -8
  304. package/dist/{verify-UKALW7C2.js → verify-KWQIWLGH.js} +7 -7
  305. package/dist/via/classified/presets.d.ts +29 -0
  306. package/dist/via/classified/resolve.d.ts +7 -0
  307. package/dist/via/geo/binding.d.ts +0 -4
  308. package/dist/via/lookup/index.d.ts +32 -0
  309. package/dist/via/money/binding.d.ts +0 -9
  310. package/dist/walk-F4OLXI5H.js +20 -0
  311. package/dist/with-audit/attestation/strategy.d.ts +2 -1
  312. package/dist/with-audit/attestation/vault-facade.d.ts +7 -0
  313. package/dist/with-audit/forget/completeness.d.ts +66 -0
  314. package/dist/with-audit/forget/index.d.ts +2 -0
  315. package/dist/with-audit/forget/strategy.d.ts +65 -0
  316. package/dist/with-audit/periods/periods.d.ts +0 -9
  317. package/dist/with-audit/periods/reserved-collections.d.ts +7 -0
  318. package/dist/with-audit/portability/request-withdrawal.d.ts +0 -1
  319. package/dist/with-audit/portability/withdraw-accessible.d.ts +0 -1
  320. package/dist/with-audit/tiers/index.d.ts +1 -1
  321. package/dist/with-audit/tiers/strategy.d.ts +19 -0
  322. package/dist/with-cargo/extract-partition.d.ts +0 -46
  323. package/dist/with-commit/numbering/index.d.ts +0 -2
  324. package/dist/with-commit/tx/transaction.d.ts +2 -24
  325. package/dist/with-commit/vault-head/strategy.d.ts +7 -0
  326. package/dist/with-fork/snapshots/noydb-facade.d.ts +7 -0
  327. package/dist/with-formula/derivations/trigger-match.d.ts +8 -5
  328. package/dist/with-formula/materialized-views/emit-memo.d.ts +0 -2
  329. package/dist/with-lookup/embeddings/index.d.ts +1 -2
  330. package/dist/with-lookup/indexing/collection-facade.d.ts +1 -15
  331. package/dist/with-lookup/indexing/eager-indexes.d.ts +2 -1
  332. package/dist/with-lookup/search/collection-facade.d.ts +0 -12
  333. package/dist/with-party/broker/index.d.ts +2 -2
  334. package/dist/with-party/broker/seed.d.ts +25 -10
  335. package/dist/with-party/policy/noydb-facade.d.ts +1 -31
  336. package/dist/with-party/team/delegation.d.ts +58 -2
  337. package/dist/with-party/team/echo-secret.d.ts +0 -2
  338. package/dist/with-party/team/keyring.d.ts +1 -21
  339. package/dist/with-party/team/magic-link-grant.d.ts +11 -1
  340. package/dist/with-party/team/noydb-facade.d.ts +5 -0
  341. package/dist/with-party/team/reserved-secret-collections.d.ts +10 -8
  342. package/dist/with-party/team/roster-tag.d.ts +42 -1
  343. package/dist/with-party/team/tiers.d.ts +36 -5
  344. package/dist/with-shape/blobs/blob-set.d.ts +23 -0
  345. package/dist/with-shape/blobs/legacy-sweep.d.ts +16 -0
  346. package/dist/with-shape/introspection/describe.d.ts +1 -2
  347. package/dist/with-shape/introspection/index.d.ts +1 -0
  348. package/dist/with-shape/introspection/types.d.ts +2 -1
  349. package/dist/with-shape/schema-update/fence.d.ts +7 -0
  350. package/dist/with-sync/engine.d.ts +30 -1
  351. package/dist/with-sync/reserved-mirror.d.ts +89 -0
  352. package/dist/with-sync/strategy.d.ts +7 -0
  353. package/dist/with-sync/tab-write-relay.d.ts +0 -10
  354. package/dist/withdraw-accessible-ZKPLZ66E.js +25 -0
  355. package/package.json +3 -3
  356. package/dist/api-OS747DS4.js +0 -18
  357. package/dist/chunk-2AFX33YA.js.map +0 -1
  358. package/dist/chunk-2RH777HH.js +0 -126
  359. package/dist/chunk-2RH777HH.js.map +0 -1
  360. package/dist/chunk-37EPTBBR.js.map +0 -1
  361. package/dist/chunk-7XMHMVTS.js +0 -20
  362. package/dist/chunk-7XMHMVTS.js.map +0 -1
  363. package/dist/chunk-A4XMIZT3.js.map +0 -1
  364. package/dist/chunk-DHHGL42E.js.map +0 -1
  365. package/dist/chunk-DQESF6RP.js.map +0 -1
  366. package/dist/chunk-EGVJ7TM4.js.map +0 -1
  367. package/dist/chunk-EYG2CY2X.js.map +0 -1
  368. package/dist/chunk-FFWI7UH7.js.map +0 -1
  369. package/dist/chunk-G2MVBDFP.js.map +0 -1
  370. package/dist/chunk-GUZET4SG.js.map +0 -1
  371. package/dist/chunk-H23XHRTT.js.map +0 -1
  372. package/dist/chunk-H7JBY4P7.js.map +0 -1
  373. package/dist/chunk-IMQKWR46.js.map +0 -1
  374. package/dist/chunk-IUBMZPHM.js.map +0 -1
  375. package/dist/chunk-IUT3GWP3.js.map +0 -1
  376. package/dist/chunk-JDEYF3PJ.js.map +0 -1
  377. package/dist/chunk-JSMTXZR3.js.map +0 -1
  378. package/dist/chunk-LGNDFRYC.js.map +0 -1
  379. package/dist/chunk-MXOQ5JCG.js.map +0 -1
  380. package/dist/chunk-NBQ3KK6X.js.map +0 -1
  381. package/dist/chunk-OIEO4WDL.js.map +0 -1
  382. package/dist/chunk-PD64727P.js.map +0 -1
  383. package/dist/chunk-RHVMZSUU.js.map +0 -1
  384. package/dist/chunk-SV2PM2OY.js.map +0 -1
  385. package/dist/chunk-UA372JHH.js.map +0 -1
  386. package/dist/chunk-UBSFPGVJ.js +0 -1
  387. package/dist/chunk-VAORSCSU.js.map +0 -1
  388. package/dist/chunk-XSPFDUDG.js.map +0 -1
  389. package/dist/chunk-Y3LPTBG7.js.map +0 -1
  390. package/dist/collection-facade-CS7CA2XO.js +0 -47
  391. package/dist/delegation-NANZDG4N.js.map +0 -1
  392. package/dist/derive-XLOJVXPU.js +0 -20
  393. package/dist/executor-FMPVN6DT.js +0 -35
  394. package/dist/executor-LBBBRTN5.js +0 -8
  395. package/dist/executor-OSRZST2U.js +0 -8
  396. package/dist/export-accessible-RAOJAAU5.js +0 -22
  397. package/dist/extract-partition-JD5CUSTG.js +0 -37
  398. package/dist/find-JRN4RNQ5.js +0 -10
  399. package/dist/issue-YIVBZUTH.js +0 -19
  400. package/dist/liberate-WZSZM2W6.js +0 -24
  401. package/dist/noydb-ITIGNKUF.js +0 -96
  402. package/dist/register-DT5HZ2LZ.js +0 -30
  403. package/dist/registry-BHRZGZHF.js +0 -8
  404. package/dist/registry-ET6ZFFWA.js +0 -34
  405. package/dist/registry-HXFGLGTG.js +0 -8
  406. package/dist/registry-THCPDEOD.js +0 -23
  407. package/dist/request-withdrawal-AV2MJJKY.js +0 -30
  408. package/dist/revoke-6DWIEOCV.js +0 -24
  409. package/dist/seed-XNSE4U3S.js.map +0 -1
  410. package/dist/signer-MHGW3OIL.js +0 -23
  411. package/dist/storage-BYN5LO6Z.js +0 -21
  412. package/dist/walk-4VPK7AS4.js +0 -20
  413. package/dist/withdraw-accessible-HL7GACUE.js +0 -27
  414. /package/dist/{api-OS747DS4.js.map → api-MSJXVYQG.js.map} +0 -0
  415. /package/dist/{backup-YE2VQ26S.js.map → backup-7RKNZMQO.js.map} +0 -0
  416. /package/dist/{capsule-VOLX3QRQ.js.map → capsule-57BDK7LG.js.map} +0 -0
  417. /package/dist/{chunk-LNSVGRHO.js.map → chunk-2A56DSRI.js.map} +0 -0
  418. /package/dist/{chunk-UBSFPGVJ.js.map → chunk-2DX4JCRI.js.map} +0 -0
  419. /package/dist/{chunk-6QVKPHBF.js.map → chunk-2WJKJZSO.js.map} +0 -0
  420. /package/dist/{chunk-TKVUE4JF.js.map → chunk-2ZFD2UJC.js.map} +0 -0
  421. /package/dist/{chunk-4JPMZTJY.js.map → chunk-3Y5JLSXS.js.map} +0 -0
  422. /package/dist/{chunk-O2IMQSNA.js.map → chunk-4UIP3QNW.js.map} +0 -0
  423. /package/dist/{chunk-EJLV62NI.js.map → chunk-55P6OBB7.js.map} +0 -0
  424. /package/dist/{chunk-TEHHROZL.js.map → chunk-5LMCVBMY.js.map} +0 -0
  425. /package/dist/{chunk-4V3Q35WG.js.map → chunk-5UUJE4FP.js.map} +0 -0
  426. /package/dist/{chunk-JWWYRR4Q.js.map → chunk-5XONHAFD.js.map} +0 -0
  427. /package/dist/{chunk-QBLT6POL.js.map → chunk-6WS35E6X.js.map} +0 -0
  428. /package/dist/{chunk-EZOAKKTB.js.map → chunk-ABU6A4Z5.js.map} +0 -0
  429. /package/dist/{chunk-VKI2EB3N.js.map → chunk-AJFPAHMW.js.map} +0 -0
  430. /package/dist/{chunk-2ODVB6LZ.js.map → chunk-B65CC6Z6.js.map} +0 -0
  431. /package/dist/{chunk-MBMTND6D.js.map → chunk-BJH77UY2.js.map} +0 -0
  432. /package/dist/{chunk-FFJFE4T7.js.map → chunk-BNFNQNEP.js.map} +0 -0
  433. /package/dist/{chunk-5WWDGFOS.js.map → chunk-BUE7R3B5.js.map} +0 -0
  434. /package/dist/{chunk-5FE75J4S.js.map → chunk-BVF3SXD7.js.map} +0 -0
  435. /package/dist/{chunk-VFHCKG5M.js.map → chunk-BYHCKX73.js.map} +0 -0
  436. /package/dist/{chunk-BVCUTXE3.js.map → chunk-C53ER7AG.js.map} +0 -0
  437. /package/dist/{chunk-MILI22XQ.js.map → chunk-CAD7N6HQ.js.map} +0 -0
  438. /package/dist/{chunk-5KC7QYEC.js.map → chunk-CB4467G3.js.map} +0 -0
  439. /package/dist/{chunk-JIBUPZHA.js.map → chunk-D4V5JJAK.js.map} +0 -0
  440. /package/dist/{chunk-DLD5LGDS.js.map → chunk-D5A3GCZ4.js.map} +0 -0
  441. /package/dist/{chunk-FOEDQATO.js.map → chunk-DHU2AQ6T.js.map} +0 -0
  442. /package/dist/{chunk-VHBKYN2J.js.map → chunk-DL6BZKP3.js.map} +0 -0
  443. /package/dist/{chunk-E2N2T5ZO.js.map → chunk-ECGXA4LT.js.map} +0 -0
  444. /package/dist/{chunk-PP3K67AJ.js.map → chunk-EMAWOGVH.js.map} +0 -0
  445. /package/dist/{chunk-WXE4W2U6.js.map → chunk-EUD3HQM4.js.map} +0 -0
  446. /package/dist/{chunk-LIOVX5TJ.js.map → chunk-FZXRLNJO.js.map} +0 -0
  447. /package/dist/{chunk-WPOYWFSE.js.map → chunk-G46JSSVX.js.map} +0 -0
  448. /package/dist/{chunk-AEQGFRU4.js.map → chunk-GCUMOKTN.js.map} +0 -0
  449. /package/dist/{chunk-V3RWOOSO.js.map → chunk-GOJQ5DZA.js.map} +0 -0
  450. /package/dist/{chunk-UEFOQH74.js.map → chunk-GRS2HIV6.js.map} +0 -0
  451. /package/dist/{chunk-3L2NBKDR.js.map → chunk-H3YM66EI.js.map} +0 -0
  452. /package/dist/{chunk-747G6CT3.js.map → chunk-J4KAPKBJ.js.map} +0 -0
  453. /package/dist/{chunk-MXKI4ABF.js.map → chunk-JPSL5GIZ.js.map} +0 -0
  454. /package/dist/{chunk-2GHDLTPE.js.map → chunk-JSWKVZCR.js.map} +0 -0
  455. /package/dist/{chunk-BNWA3WG5.js.map → chunk-JZ4EDEIP.js.map} +0 -0
  456. /package/dist/{chunk-5UMK7GRI.js.map → chunk-K7RW7FI4.js.map} +0 -0
  457. /package/dist/{chunk-N7EVQD5S.js.map → chunk-L2F3CFCH.js.map} +0 -0
  458. /package/dist/{chunk-2PVXF5CS.js.map → chunk-L5A3KR7R.js.map} +0 -0
  459. /package/dist/{chunk-O46CHQT7.js.map → chunk-LGGIFKJP.js.map} +0 -0
  460. /package/dist/{chunk-Y2RKVFKR.js.map → chunk-MQ7YWBQ5.js.map} +0 -0
  461. /package/dist/{chunk-YRXFFWG4.js.map → chunk-NIXRB5BP.js.map} +0 -0
  462. /package/dist/{chunk-V7ADQF5O.js.map → chunk-NYJBYVBG.js.map} +0 -0
  463. /package/dist/{chunk-23D6M6VM.js.map → chunk-NZULV7LK.js.map} +0 -0
  464. /package/dist/{chunk-AUKKUPVB.js.map → chunk-OK57EATL.js.map} +0 -0
  465. /package/dist/{chunk-OYW3I5M4.js.map → chunk-PCYPXLEX.js.map} +0 -0
  466. /package/dist/{chunk-2MG3SW7Q.js.map → chunk-PFCTSXHU.js.map} +0 -0
  467. /package/dist/{chunk-FVH5QYY2.js.map → chunk-PGC35KXE.js.map} +0 -0
  468. /package/dist/{chunk-NCO25JZO.js.map → chunk-PT2YCQVK.js.map} +0 -0
  469. /package/dist/{chunk-SYNY3VB5.js.map → chunk-PTJY5R3O.js.map} +0 -0
  470. /package/dist/{chunk-QMWY2FDS.js.map → chunk-PUBI455O.js.map} +0 -0
  471. /package/dist/{chunk-VMV5SBE4.js.map → chunk-QDHHHI5Q.js.map} +0 -0
  472. /package/dist/{chunk-JQYKPKG6.js.map → chunk-QGFEBNHO.js.map} +0 -0
  473. /package/dist/{chunk-52MGURXO.js.map → chunk-QGSNJD3B.js.map} +0 -0
  474. /package/dist/{chunk-VVOLDVIR.js.map → chunk-QSHATAXJ.js.map} +0 -0
  475. /package/dist/{chunk-KZXDLBY6.js.map → chunk-RDOEOPOI.js.map} +0 -0
  476. /package/dist/{chunk-FLPCETP6.js.map → chunk-RIZTZJX6.js.map} +0 -0
  477. /package/dist/{chunk-H427H63K.js.map → chunk-RNACRT5H.js.map} +0 -0
  478. /package/dist/{chunk-JOSPH3E5.js.map → chunk-SFCD6OU7.js.map} +0 -0
  479. /package/dist/{chunk-Q2XRFWOI.js.map → chunk-SPPOUJLN.js.map} +0 -0
  480. /package/dist/{chunk-RB4DOPGZ.js.map → chunk-TZYTMZZY.js.map} +0 -0
  481. /package/dist/{chunk-Q4UHJ5SN.js.map → chunk-UAKY6E4N.js.map} +0 -0
  482. /package/dist/{chunk-DIZLQVAA.js.map → chunk-UNSQZSZP.js.map} +0 -0
  483. /package/dist/{chunk-4T3SE27M.js.map → chunk-UOZOWN73.js.map} +0 -0
  484. /package/dist/{chunk-OKSTSITU.js.map → chunk-V55JASXO.js.map} +0 -0
  485. /package/dist/{chunk-XQRFSKYM.js.map → chunk-WFWFXDNS.js.map} +0 -0
  486. /package/dist/{chunk-N7UDP5VU.js.map → chunk-WHOKGHJ3.js.map} +0 -0
  487. /package/dist/{chunk-7R2Q7CPL.js.map → chunk-X2RP4TO5.js.map} +0 -0
  488. /package/dist/{chunk-3XJQBBZD.js.map → chunk-XKBTJGFP.js.map} +0 -0
  489. /package/dist/{chunk-SMV2HRDU.js.map → chunk-XXNWU5QZ.js.map} +0 -0
  490. /package/dist/{chunk-TZZBXPZK.js.map → chunk-XXQ5XIYY.js.map} +0 -0
  491. /package/dist/{chunk-3EWS67C7.js.map → chunk-YFFMPZPY.js.map} +0 -0
  492. /package/dist/{chunk-M5B2W6YY.js.map → chunk-YKGJ44Z7.js.map} +0 -0
  493. /package/dist/{chunk-5A4345TG.js.map → chunk-YQFBH5ZJ.js.map} +0 -0
  494. /package/dist/{chunk-HS554XAF.js.map → chunk-ZHQJAV6D.js.map} +0 -0
  495. /package/dist/{chunk-AL6ML4LA.js.map → chunk-ZVSKSUGI.js.map} +0 -0
  496. /package/dist/{classified-marker-SIYKUU5L.js.map → classified-marker-KHDOYIJB.js.map} +0 -0
  497. /package/dist/{collection-facade-CS7CA2XO.js.map → collection-facade-LZIF7GWD.js.map} +0 -0
  498. /package/dist/{computed-FAD7SED4.js.map → computed-XMFTHAXV.js.map} +0 -0
  499. /package/dist/{dead-filter-4F3LWYKH.js.map → dead-filter-CXV5NS67.js.map} +0 -0
  500. /package/dist/{derive-XLOJVXPU.js.map → derive-3YSIS36W.js.map} +0 -0
  501. /package/dist/{dispatch-JDZNGEB3.js.map → dispatch-2MQFMEGY.js.map} +0 -0
  502. /package/dist/{dispatch-H4HV32AM.js.map → dispatch-OFDA4WQV.js.map} +0 -0
  503. /package/dist/{executor-FMPVN6DT.js.map → executor-E6YDJ7YA.js.map} +0 -0
  504. /package/dist/{executor-LBBBRTN5.js.map → executor-NJX3YQQ4.js.map} +0 -0
  505. /package/dist/{executor-OSRZST2U.js.map → executor-WWM3DD4P.js.map} +0 -0
  506. /package/dist/{export-accessible-RAOJAAU5.js.map → export-accessible-RLHU5G4W.js.map} +0 -0
  507. /package/dist/{extract-partition-JD5CUSTG.js.map → extract-partition-QII2EDCS.js.map} +0 -0
  508. /package/dist/{fanout-sidecar-L7NHPIOC.js.map → fanout-sidecar-BO67PCPO.js.map} +0 -0
  509. /package/dist/{find-JRN4RNQ5.js.map → find-6M7GYDUZ.js.map} +0 -0
  510. /package/dist/{issue-YIVBZUTH.js.map → issue-LPEEEMPP.js.map} +0 -0
  511. /package/dist/{ledger-5ZMGE44K.js.map → ledger-MSJGWKGW.js.map} +0 -0
  512. /package/dist/{liberate-WZSZM2W6.js.map → liberate-LEKDYKTC.js.map} +0 -0
  513. /package/dist/{link-set-MFXC24VK.js.map → link-set-QXXSPPHL.js.map} +0 -0
  514. /package/dist/{managed-secret-MFTFT22X.js.map → managed-secret-VSK7ANQI.js.map} +0 -0
  515. /package/dist/{migrate-cek-DZRFFOHW.js.map → migrate-cek-GEBFYBDC.js.map} +0 -0
  516. /package/dist/{noydb-ITIGNKUF.js.map → noydb-F2AUF6KL.js.map} +0 -0
  517. /package/dist/{pod-handle-A3LET7NO.js.map → pod-handle-YE7CT66T.js.map} +0 -0
  518. /package/dist/{post-register-7ND27CF2.js.map → post-register-QC5TEAW3.js.map} +0 -0
  519. /package/dist/{register-DT5HZ2LZ.js.map → register-SN72QALV.js.map} +0 -0
  520. /package/dist/{registry-BHRZGZHF.js.map → registry-253FF7C6.js.map} +0 -0
  521. /package/dist/{registry-ET6ZFFWA.js.map → registry-3AZWQTDT.js.map} +0 -0
  522. /package/dist/{registry-HXFGLGTG.js.map → registry-7UEBTHWG.js.map} +0 -0
  523. /package/dist/{registry-THCPDEOD.js.map → registry-IVJ67NFQ.js.map} +0 -0
  524. /package/dist/{request-withdrawal-AV2MJJKY.js.map → request-withdrawal-UKVJZKX2.js.map} +0 -0
  525. /package/dist/{reveal-B2TLP4JQ.js.map → reveal-YQTRNQFH.js.map} +0 -0
  526. /package/dist/{revoke-6DWIEOCV.js.map → revoke-G2KXJQA5.js.map} +0 -0
  527. /package/dist/{signer-MHGW3OIL.js.map → signer-IUIYR3CX.js.map} +0 -0
  528. /package/dist/{stale-6GCFMOOR.js.map → stale-SKV33PBU.js.map} +0 -0
  529. /package/dist/{storage-BYN5LO6Z.js.map → storage-NPBYP2SM.js.map} +0 -0
  530. /package/dist/{store-coordination-provider-C4BPT5XF.js.map → store-coordination-provider-Z6HKPOGM.js.map} +0 -0
  531. /package/dist/{verify-UKALW7C2.js.map → verify-KWQIWLGH.js.map} +0 -0
  532. /package/dist/{walk-4VPK7AS4.js.map → walk-F4OLXI5H.js.map} +0 -0
  533. /package/dist/{withdraw-accessible-HL7GACUE.js.map → withdraw-accessible-ZKPLZ66E.js.map} +0 -0
@@ -105,6 +105,71 @@ export interface ForgetResult {
105
105
  readonly blobsRetainedShared: number;
106
106
  /** Collections with blobs that could NOT be crypto-shredded — legacy (no `_cek`) or blobs disabled (see type docs). */
107
107
  readonly blobResidueCollections: readonly string[];
108
+ /**
109
+ * #28 — the same residue as {@link blobResidueCollections}, at `collection:id`
110
+ * grain: which RECORDS held blob content that could not be crypto-shredded.
111
+ *
112
+ * ⭐ Prefer this one. `blobResidueCollections` answers "some blobs in
113
+ * `invoices` did not shred"; a specific erasure request asks "which of THIS
114
+ * subject's records are affected", and only a record-grained answer can say.
115
+ *
116
+ * ⚠️ "Could not be shredded" does NOT mean the bytes are still in the live
117
+ * store — `forget()` deletes legacy chunks, it just cannot crypto-shred them.
118
+ * See {@link blobResidueETags} for what the exposure actually is.
119
+ *
120
+ * ⚠️ `blobResidueCollections` is kept, unchanged, because it is published —
121
+ * widening it in place would silently change what every existing reader sees,
122
+ * with no type error (`string[]` either way). Both are populated from the
123
+ * same sites; this is the finer of the two.
124
+ *
125
+ * Reported by pilot-1, who noticed that this result type carries residue at
126
+ * `collection:id` (`unmigratedRecords`) and `collection:id:field`
127
+ * (`indexResidue`, `sealedResidue`) elsewhere, so the coarse one read as a
128
+ * defect rather than a design choice. It was: the record id was in scope on
129
+ * the line that recorded only the collection.
130
+ */
131
+ readonly blobResidueRecords: readonly string[];
132
+ /**
133
+ * #28 — the eTags of blob content this erasure could not CRYPTO-SHRED.
134
+ *
135
+ * ⛔ READ THE MEANING CAREFULLY; it is not what the name suggests on first
136
+ * reading, and the obvious reading is wrong in a way that matters.
137
+ *
138
+ * On a LEGACY blob (no per-blob `_cek`) `forget()` still DELETES the chunks
139
+ * and the index row — it passes `reclaimLegacy: true`. What it cannot do is
140
+ * make them cryptographically unreadable, because there is no per-blob key to
141
+ * destroy; the bytes were removed rather than shredded. So:
142
+ *
143
+ * - the live store IS clean — do not expect these chunks to still be there;
144
+ * - but any pre-existing BACKUP, replica or snapshot taken before the erasure
145
+ * remains decryptable under the retained collection DEK, and that is the
146
+ * exposure this field is telling you about.
147
+ *
148
+ * ⚠️ THIS CANNOT BE RECONCILED AGAINST `compact({ reclaimLegacyBlobs })`.
149
+ * That sweep reclaims refCount-0 legacy index rows that still EXIST; these no
150
+ * longer do. An intersection of the two sets is empty by construction and
151
+ * means nothing — measured, not assumed (2026-09-14). The reclaim path
152
+ * belongs to ordinary `collection.delete()`, which passes
153
+ * `reclaimLegacy: false` and genuinely defers.
154
+ *
155
+ * ⭐ What to DO with a non-empty value: treat the subject's data as erased
156
+ * from the live vault but potentially present in backups, and handle it under
157
+ * whatever backup-retention policy you operate. Migrating the collection to
158
+ * per-record keys before the erasure (`blob(id).migrate()`) is what makes a
159
+ * future erasure a true crypto-shred.
160
+ *
161
+ * ⛔ DO NOT PERSIST THESE. An eTag is a CONTENT HASH, so a stored erasure
162
+ * receipt listing them lets anyone holding a candidate file confirm the vault
163
+ * once held it — a residual disclosure created by the very artefact meant to
164
+ * prove the data is gone. `ledgerEntry` records residue COUNTS, never values,
165
+ * for exactly this reason.
166
+ *
167
+ * ⚠️ Narrower than {@link blobResidueRecords}: this is the eTag half only. A
168
+ * record whose SLOT ROW was undecodable appears there and not here, because
169
+ * there is no content identity to name. {@link erasureCompleteness} counts
170
+ * both.
171
+ */
172
+ readonly blobResidueETags: readonly string[];
108
173
  /**
109
174
  * Count of persisted `_idx/<field>/<recordId>` index side-cars hard-deleted
110
175
  * across the shredded records. These live under the retained
@@ -521,15 +521,6 @@ export interface ReadOnlyCollection<T> {
521
521
  export declare function loadPeriods(adapter: NoydbStore, vault: string, decrypt: (id: string, envelope: EncryptedEnvelope) => Promise<PeriodRecord>): Promise<PeriodRecord[]>;
522
522
  /** sha256(canonicalJson(record)) over the STORED shape of a period record. @internal */
523
523
  export declare function hashStoredPeriod(period: PeriodRecord): Promise<string>;
524
- /**
525
- * #1454 — every record's `priorPeriodName` / `priorPeriodHash` must resolve to
526
- * a stored predecessor in ITS timeline whose hash matches. Followed by name,
527
- * not by sort position: two closes within one millisecond sort arbitrarily,
528
- * and a deleted predecessor must read as a break, not as a new root.
529
- *
530
- * @internal
531
- */
532
- export declare function verifyPeriodChain(records: readonly PeriodRecord[]): Promise<void>;
533
524
  /**
534
525
  * Given the current ordered period list, pick the last entry that
535
526
  * belongs to the hash chain — used as the `priorPeriodHash` anchor
@@ -1,3 +1,10 @@
1
+ /**
2
+ * `PERIODS_RESERVED_COLLECTIONS` — PUBLISHED API, reachable from @noy-db/hub/periods. Flagged as unused because
3
+ * nothing inside hub imports it from this module; a consumer does. Do not narrow
4
+ * or delete without a seam change (#55).
5
+ *
6
+ * @public
7
+ */
1
8
  export declare const PERIODS_RESERVED_COLLECTIONS: ReadonlySet<string>;
2
9
  /** True when `name` belongs to the periods family (#1454). */
3
10
  export declare function isPeriodsReservedCollection(name: string): boolean;
@@ -22,7 +22,6 @@
22
22
  import type { Vault } from '../../kernel/vault.js';
23
23
  import { NoydbError } from '../../kernel/errors.js';
24
24
  import { type WithdrawResult } from './withdraw-accessible.js';
25
- export declare const WITHDRAWAL_REQUESTS_COLLECTION = "_user_withdrawal_requests";
26
25
  /** Raised when a request is missing, already decided, or expired. */
27
26
  export declare class WithdrawalRequestError extends NoydbError {
28
27
  constructor(message: string);
@@ -17,7 +17,6 @@
17
17
  * (`request-withdrawal.ts`).
18
18
  */
19
19
  import type { Vault } from '../../kernel/vault.js';
20
- export declare const FROZEN_SNAPSHOTS_COLLECTION = "_frozen_snapshots";
21
20
  /** 24-hex-char random id (used for withdrawal ids + request ids). */
22
21
  export declare function randomId(): string;
23
22
  export interface FrozenSnapshotRef {
@@ -21,7 +21,7 @@
21
21
  * Internal service — not exported as a `@noy-db/hub/*` subpath.
22
22
  */
23
23
  export { withTiers } from './active.js';
24
- export { NO_TIERS, type TiersStrategy } from './strategy.js';
24
+ export { NO_TIERS, type TiersStrategy, type DelegationReadContext } from './strategy.js';
25
25
  export { TiersNotEnabledError } from '../../kernel/errors.js';
26
26
  import { type RecordIdentity, type RecordCodec, type EnclaveKey, type SealedShredSlot } from '../../capsule/index.js';
27
27
  import type { UnlockedKeyring } from '../../with-party/team/keyring.js';
@@ -9,6 +9,9 @@
9
9
  */
10
10
  import type { GhostRecord } from '../../kernel/types.js';
11
11
  import type { TiersContext, TierMoveResult } from './index.js';
12
+ import type { DelegationToken } from '../../with-party/team/delegation.js';
13
+ import type { UnlockedKeyring } from '../../with-party/team/keyring.js';
14
+ import type { NoydbStore } from '../../kernel/types.js';
12
15
  export type { TierMoveResult };
13
16
  export interface TiersStrategy {
14
17
  putAtTier<T>(ctx: TiersContext<T>, id: string, record: T, tier: number, opts?: {
@@ -35,6 +38,22 @@ export interface TiersStrategy {
35
38
  * A tier the writer cannot read is outside the guarantee.
36
39
  */
37
40
  checkUnique<T>(ctx: TiersContext<T>, id: string, record: T): Promise<void>;
41
+ /**
42
+ * core#56 — the delegation READ half. VAULT-scoped, not collection-scoped,
43
+ * so it takes its own narrow context rather than a `TiersContext`.
44
+ *
45
+ * It lives on this strategy rather than in the kernel because delegation IS a
46
+ * tier feature (the tokens carry tier DEKs and the gate they satisfy is
47
+ * `assertTierAccess`), and because a consumer who never opts into tiers has no
48
+ * delegations to read — so this should tree-shake away for them.
49
+ */
50
+ refreshDelegations(ctx: DelegationReadContext, now?: Date): Promise<DelegationToken[]>;
51
+ }
52
+ /** The vault-scoped slice the delegation read half needs (core#56). */
53
+ export interface DelegationReadContext {
54
+ readonly vault: string;
55
+ readonly adapter: NoydbStore;
56
+ readonly keyring: UnlockedKeyring;
38
57
  }
39
58
  /**
40
59
  * No-op stub — the floor default. Every capability method throws
@@ -50,52 +50,6 @@ export interface ReKeyLedgerResult {
50
50
  * `_ledger_deltas`/`_history` are deferred to slice 2.
51
51
  */
52
52
  export declare function reKeyLedger(vault: Vault, closure: Map<string, Set<string>>, reKeyedCollections: Record<string, Record<string, EncryptedEnvelope>>, ledgerDek: EnclaveKey): Promise<ReKeyLedgerResult>;
53
- /** Carried blob internals + the fresh transfer `_blob` DEK (present only when
54
- * the closure references at least one chunk-based blob). */
55
- export interface ReKeyBlobsResult {
56
- /** `_blob_slots_<C>` / `_blob_versions_<C>` / `_blob_index` / `_blob_chunks`
57
- * envelopes for the bundle's `_internal` map. */
58
- readonly internal: Record<string, Record<string, EncryptedEnvelope>>;
59
- /** Fresh transfer `_blob` DEK — seal it so owner-creation wraps it under the
60
- * recipient KEK. Undefined when no blob travels (source keyring untouched). */
61
- readonly blobDek?: EnclaveKey;
62
- }
63
- /**
64
- * Carry the FK-closed slice's blobs — HARDENED key handling (no master-key leak).
65
- *
66
- * The source vault's shared `_blob` DEK decrypts (or unwraps the content CEK of)
67
- * EVERY blob in the source. Sealing it into the transfer would hand the recipient
68
- * a key to blobs far outside their slice. Instead we mint a **fresh transfer
69
- * `_blob` DEK** and arrange every carried blob into per-blob-CEK mode under it:
70
- *
71
- * - **erasable blob** (`_cek` present): unwrap the per-blob content CEK under the
72
- * SOURCE `_blob` DEK, re-wrap it under the FRESH transfer DEK. Chunks travel
73
- * **verbatim** (still ciphertext under that same content CEK — passthrough).
74
- * - **legacy blob** (no `_cek`, chunks under the shared `_blob` DEK): promote it
75
- * IN-BUNDLE — mint a fresh content CEK, decrypt each chunk under the source
76
- * `_blob` DEK and re-encrypt under the content CEK (same AAD, so the eTag-bound
77
- * integrity holds), then wrap the content CEK under the transfer DEK. The
78
- * SOURCE is never mutated (non-destructive), and the bundle never holds
79
- * plaintext blob bytes (zero-knowledge preserved).
80
- *
81
- * **eTag identity is preserved** (not re-HMAC'd). eTags are HMAC-keyed off the
82
- * `_blob` DEK, but they are stored as OPAQUE keys (`_blob_index/<eTag>`,
83
- * `_blob_chunks/<eTag>_<i>`) and never recomputed on read — only on a `put()`
84
- * for dedup. Keeping them verbatim keeps every slot/version/index/chunk key and
85
- * the chunk AAD coherent with zero chunk-key churn. The only consequence: a
86
- * future `put()` of identical bytes in the adopted vault computes a different
87
- * eTag (HMAC under the fresh DEK) and will NOT dedup against the carried blob —
88
- * an accepted, documented trade for hardened key isolation.
89
- *
90
- * Slots/versions are re-keyed under their parent collection's destination DEK
91
- * (honoring `fieldProjection` — projected-out blob fields' slots never travel);
92
- * `BlobObject.refCount` is recomputed from carried references only.
93
- *
94
- * `external` slots reference an unencrypted shared-bucket object that is not in
95
- * the bundle — their slot metadata travels (so the catalog entry survives) but
96
- * the bytes do not (a documented v1 limitation; their eTag is `''`).
97
- */
98
- export declare function reKeyBlobs(vault: Vault, closure: Map<string, Set<string>>, destDeks: Map<string, EnclaveKey>, fieldProjection?: Record<string, readonly string[]>): Promise<ReKeyBlobsResult>;
99
53
  /** A minted transfer key (raw 32 bytes) + the seal carrying the DEK set. */
100
54
  export interface SealResult {
101
55
  readonly seal: TransferSealPayload;
@@ -1,8 +1,6 @@
1
1
  import type { NoydbStore } from '../../kernel/types.js';
2
2
  import { type EnclaveKey } from '../../capsule/index.js';
3
3
  import type { DeferredNumberingConfig } from './descriptor.js';
4
- export declare const NUMBERING_HEAD_COLLECTION = "_numbering_head";
5
- export declare const NUMBERING_PENDING_COLLECTION = "_numbering_pending";
6
4
  export interface Assignment {
7
5
  recordId: string;
8
6
  serial: number;
@@ -57,8 +57,8 @@
57
57
  * **Crash window.** On the OCC fallback, steps 2–3 are not a
58
58
  * storage-layer transaction — if the process dies between two executed
59
59
  * ops, the on-disk state is partial. The atomic path above closes that
60
- * window for the write set itself (`to-memory` and the SQL stores in
61
- * `noy-db-to` implement `tx()`); a crash between the batch landing and
60
+ * window for the write set itself (`memoryStore({ full: true })` and the SQL
61
+ * stores in `noy-db-to` implement `tx()`); a crash between the batch landing and
62
62
  * the finalize loop finishing still leaves per-op side effects (history,
63
63
  * ledger, cache) incomplete. Stores that cannot commit a batch
64
64
  * atomically (file, S3) omit `tx()` and keep the fallback.
@@ -209,27 +209,5 @@ export declare class TxCollection<T> {
209
209
  * revert alongside the bulk-put source ops.
210
210
  */
211
211
  export declare function runTransaction<T>(db: Noydb, fn: (tx: TxContext) => Promise<T> | T, options?: AmendmentTxOptions, txInvariants?: ReadonlyArray<TransactionInvariant>): Promise<T>;
212
- /**
213
- * Phase 3 helper — restore captured prior envelopes via the raw store
214
- * to avoid re-firing Collection-level side effects (we don't want a
215
- * cascade of change events undoing themselves). The ledger is left
216
- * as-is: each committed op appended an entry; the revert is
217
- * deliberately NOT recorded as a compensating entry because the
218
- * caller-facing contract is "atomic or not at all," not "every write
219
- * visible in the audit trail." Auditors who need the intermediate
220
- * state can still reconstruct it by walking the ledger through the
221
- * failed-tx timestamp.
222
- *
223
- * Delegates the reverse/best-effort/raw-revert shape to the shared
224
- * `bestEffortRevert` helper (`kernel/best-effort-revert.ts`); the cache
225
- * invalidation below rides along as that helper's per-leg `compensate`
226
- * callback, gated on `db` exactly as before.
227
- *
228
- * @internal — shared between `runTransaction` and
229
- * `Collection.putManyAtomic`. Both register source ops + nested
230
- * derivation side-effect ops onto `_executed`; this helper unwinds the
231
- * combined list in reverse on rollback.
232
- */
233
- export declare function revertExecuted(executed: ReadonlyArray<ExecutedOp>, store: Noydb['_store'], db?: Noydb): Promise<void>;
234
212
  /** @internal — shared (vault, collection, id) key shape; also used by `atomic-eligibility.ts`'s duplicate-key scan. */
235
213
  export declare function keyOf(op: StagedOp): string;
@@ -124,4 +124,11 @@ export interface VaultHeadStrategy {
124
124
  * would look exactly like a clean sweep.
125
125
  */
126
126
  export declare const NO_VAULT_HEAD: VaultHeadStrategy;
127
+ /**
128
+ * `EncryptedEnvelope` — PUBLISHED API, reachable from @noy-db/hub, @noy-db/hub/debug, @noy-db/hub/tiers, @noy-db/hub/to, @noy-db/hub/vault-head. Flagged as unused because
129
+ * nothing inside hub imports it from this module; a consumer does. Do not narrow
130
+ * or delete without a seam change (#55).
131
+ *
132
+ * @public
133
+ */
127
134
  export type { EncryptedEnvelope };
@@ -61,4 +61,11 @@ export declare class NoydbSnapshots {
61
61
  /** Stop the cadence scheduler (called from `Noydb.close()`). */
62
62
  stop(): void;
63
63
  }
64
+ /**
65
+ * `NO_SNAPSHOTS` — PUBLISHED API, reachable from @noy-db/hub/snapshots. Flagged as unused because
66
+ * nothing inside hub imports it from this module; a consumer does. Do not narrow
67
+ * or delete without a seam change (#55).
68
+ *
69
+ * @public
70
+ */
64
71
  export { NO_SNAPSHOTS };
@@ -14,7 +14,7 @@
14
14
  * @module
15
15
  */
16
16
  /** One declared hop through an intermediate collection (#1277). */
17
- export interface MatchVia {
17
+ interface MatchVia {
18
18
  /** The intermediate collection to resolve through. */
19
19
  readonly collection: string;
20
20
  /** Field on the intermediate whose value equals `written[from]`. */
@@ -27,8 +27,6 @@ export interface MatchPair {
27
27
  readonly to: string;
28
28
  readonly via?: MatchVia;
29
29
  }
30
- /** True when any pair in this trigger resolves through an intermediate. */
31
- export declare function hasHop(match: ReadonlyArray<MatchPair>): boolean;
32
30
  /** Every intermediate collection named by a trigger's pairs, deduplicated. */
33
31
  export declare function hopCollections(match: ReadonlyArray<MatchPair>): string[];
34
32
  export interface NormalizedTrigger {
@@ -100,5 +98,10 @@ export declare function sameTuple(a: Array<{
100
98
  }> | null): boolean;
101
99
  /** Moved to the kernel (#1249) so `collection.ts` can import statically without
102
100
  * dragging derivations code into the floor bundle; re-exported here for
103
- * compatibility with existing consumers of this module. */
104
- export { recordMatchesPairs, findMatchingIdsByPairs } from '../../kernel/match-pairs.js';
101
+ * compatibility with existing consumers of this module.
102
+ *
103
+ * ⚠️ `findMatchingIdsByPairs` was re-exported here too and NOTHING took it
104
+ * from this module (#55) — consumers import it from the kernel directly.
105
+ * Dropped rather than kept as a compatibility shim for a consumer that does
106
+ * not exist; the kernel module remains its home. */
107
+ export { recordMatchesPairs } from '../../kernel/match-pairs.js';
@@ -17,8 +17,6 @@ export declare function emitMemoKey(vault: string, mvName: string, outputCollect
17
17
  export declare function readEmitMemo(key: string, stamp: number | null): ReadonlyMap<string, string> | null;
18
18
  /** Record what this refresh actually left on disk. A `null` stamp records nothing. */
19
19
  export declare function writeEmitMemo(key: string, stamp: number | null, rows: Map<string, string>): void;
20
- /** Forget one MV's output entirely. Used when a refresh could not complete cleanly. */
21
- export declare function dropEmitMemo(key: string): void;
22
20
  /**
23
21
  * A canonical string for the row a refresh is about to write, or `null` when no
24
22
  * safe one exists.
@@ -1,6 +1,5 @@
1
- export { cosine } from './cosine.js';
2
1
  export { embeddingSourceText, type EmbeddingDescriptor } from './descriptor.js';
3
- export { VectorSet, type StoredVector, type VectorHit } from './vector-set.js';
2
+ export { VectorSet, type StoredVector } from './vector-set.js';
4
3
  export { withVectorIndex, DEFAULT_INDEX_MIN_VECTORS, type VectorIndexOptions } from './with-vector-index.js';
5
4
  export type { VectorIndex, VectorIndexConfig, VectorIndexSearchOptions } from './vector-index.js';
6
5
  export { encodeVecId } from './vec-id.js';
@@ -26,7 +26,7 @@ import type { NoydbEventEmitter } from '../../kernel/events.js';
26
26
  import { type CollectionIndexes, type IndexDef } from './eager-indexes.js';
27
27
  import type { UniqueConstraintSet } from './unique-constraints.js';
28
28
  import { type PersistedCollectionIndex } from './persisted-indexes.js';
29
- import { PersistedFieldIndexes, type FieldIndexCallbacks } from './persisted-field-indexes.js';
29
+ import { PersistedFieldIndexes } from './persisted-field-indexes.js';
30
30
  export type { PersistedFieldIndexes } from './persisted-field-indexes.js';
31
31
  /** Everything the moving index-maintenance methods touched on `this.*`. */
32
32
  export interface IndexingContext<T> {
@@ -68,20 +68,6 @@ export interface IndexingContext<T> {
68
68
  * `indexes.upsert()`/`.remove()` directly, so this only fires for full reloads.
69
69
  */
70
70
  export declare function rebuildEagerIndexesFromCache<T>(ctx: IndexingContext<T>, skip?: ReadonlySet<string>): void;
71
- /**
72
- * Bridge the crypto-free {@link PersistedFieldIndexes} to this collection's
73
- * codec + adapter — the exact division `buildPersistedIndexCallbacks` uses for
74
- * the search index: crypto lives here, the store does not know it exists.
75
- *
76
- * One record per `(collection, index)`, at `_fieldidx / <collection>/<key>`.
77
- * The freshness stamp rides INSIDE the encrypted body (`{fp, idx}`) rather
78
- * than on the envelope, so the `EncryptedEnvelope` shape is never extended and
79
- * the stamp is not readable at rest.
80
- *
81
- * Takes a context THUNK for the same reason the search bridge does: it is
82
- * built from the `Collection` constructor, before `this.codec` is assigned.
83
- */
84
- export declare function buildFieldIndexCallbacks<T>(provideCtx: () => IndexingContext<T>, debounceMs?: number): FieldIndexCallbacks;
85
71
  /**
86
72
  * Build this collection's sidecar coordinator, or `null` when no index asked
87
73
  * to be persisted — so every other collection pays nothing. Kept here rather
@@ -81,7 +81,7 @@ export type IndexDef = string | {
81
81
  * `orderBy(field).limit(n)`. A `'sorted'` declaration keeps the hash
82
82
  * index too — `==`/`in` stay O(1).
83
83
  */
84
- export type IndexKind = 'hash' | 'sorted';
84
+ type IndexKind = 'hash' | 'sorted';
85
85
  /**
86
86
  * Normalize a declared `IndexDef[]` into a uniform `{ fields, unique? }`
87
87
  * shape: `string` → `{fields:[s]}`, `string[]` → `{fields}`, object →
@@ -299,3 +299,4 @@ export declare class CollectionIndexes {
299
299
  */
300
300
  bucketRepresentatives(field: string): readonly string[] | null;
301
301
  }
302
+ export {};
@@ -31,7 +31,6 @@ import { type VectorSet, type EmbeddingDescriptor } from '../embeddings/index.js
31
31
  import { type SearchOptions, type SearchResult } from './index.js';
32
32
  import type { IndexStore } from './index-store.js';
33
33
  import type { PersistedIndexCallbacks } from './persisted-index-store.js';
34
- import type { IndexDoc, IndexBuildOptions } from './inverted-index.js';
35
34
  import type { RetrieveOptions, RetrieveHit, SimilarToOptions } from './retrieve-types.js';
36
35
  /** Everything the moving search/retrieval methods touched on `this.*`. */
37
36
  export interface SearchContext<T> {
@@ -78,17 +77,6 @@ export interface SearchContext<T> {
78
77
  * nothing searchable is written to the store.
79
78
  */
80
79
  export declare function search<T>(ctx: SearchContext<T>, field: string, query: string, opts?: SearchOptions): Promise<SearchResult<T>[]>;
81
- /** L1 — build IndexDoc[] for the configured text fields over the live cache. */
82
- export declare function buildRetrievalDocs<T>(ctx: SearchContext<T>, labelMaps: Map<string, Map<string, Record<string, string>>>, blobFilenames: Map<string, Map<string, string[]>>, only?: readonly string[]): IndexDoc[];
83
- /**
84
- * L1 — the positional-postings opt-in for this collection (#1354), or
85
- * `undefined` when nothing opted in. Returning `undefined` rather than
86
- * `{ positions: [] }` keeps the no-opt-in path byte-identical to a caller that
87
- * never heard of positions.
88
- */
89
- export declare function positionBuildOptions<T>(ctx: SearchContext<T>): IndexBuildOptions | undefined;
90
- /** L1 — true iff any configured text index is also a blob field (gates ALL slot I/O). */
91
- export declare function hasIndexedBlobFields<T>(ctx: SearchContext<T>, only?: readonly string[]): boolean;
92
80
  /** L1.5 — force-persist the lexical index now (e.g. on save/idle). Persists only when textIndexPersist is enabled; a no-op otherwise. */
93
81
  export declare function flushIndex<T>(ctx: SearchContext<T>): Promise<void>;
94
82
  /**
@@ -15,7 +15,7 @@ export { withBroker } from './active.js';
15
15
  export { NO_BROKER, type BrokerStrategy, type BrokerCtx, type BrokerConfig, type CredentialBrokerHandle, } from '../../port/with/broker-strategy.js';
16
16
  export { BrokerNotEnabledError, BrokerEnrolmentError, BrokerProofError } from '../../kernel/errors.js';
17
17
  import { verifyBrokerProof } from '../../capsule/index.js';
18
- import type { IssuedChallenge, VerifyBrokerProofArgs } from '../../capsule/index.js';
18
+ import type { IssuedChallenge, VerifyBrokerProofArgs, BrokerMemberIdentity } from '../../capsule/index.js';
19
19
  /**
20
20
  * {@link issueChallengeRaw} (the enclave's mechanical primitive) with a
21
21
  * `[10s, 60s]` TTL clamp applied, so a reference host built on this barrel
@@ -25,5 +25,5 @@ export declare function issueChallenge(opts?: {
25
25
  ttlMs?: number;
26
26
  }): IssuedChallenge;
27
27
  export { verifyBrokerProof };
28
- export type { VerifyBrokerProofArgs };
28
+ export type { VerifyBrokerProofArgs, BrokerMemberIdentity };
29
29
  export type { IssuedChallenge } from '../../capsule/index.js';
@@ -37,16 +37,6 @@
37
37
  */
38
38
  import type { StoreCredentials } from '../../kernel/types.js';
39
39
  import type { BrokerSeedCtx } from '../../port/with/broker-strategy.js';
40
- /** The `_broker/<brokerId>` record payload (spec §3). */
41
- export interface BrokerSeedRecord {
42
- readonly brokerId: string;
43
- /** base64(32 random bytes). */
44
- readonly seed: string;
45
- readonly endpoint: string;
46
- readonly createdAt: string;
47
- /** `true` only once `/enroll` has returned a 2xx for this seed (I9). */
48
- readonly registered: boolean;
49
- }
50
40
  /**
51
41
  * Enrol (idempotent, two-phase commit — I9): create-if-absent the `_broker`
52
42
  * seed (I4), derive+register its proof key with the broker host, and only
@@ -65,6 +55,31 @@ export declare function enrollSeed(ctx: BrokerSeedCtx): Promise<void>;
65
55
  * cache lives in that closure, not here.
66
56
  */
67
57
  export declare function rotateSeed(ctx: BrokerSeedCtx): Promise<void>;
58
+ /**
59
+ * core#73 — enrol a freshly granted MEMBER with the host under its own key.
60
+ * Called by the kernel right after `grant()`, while the grantor still holds
61
+ * the grantee's secret: that secret opens the grantee's keyring, whose
62
+ * `_broker_member` DEK (minted by `grant()` for this grantee alone) is the
63
+ * only key that can seal the member record. Register-first, then persist,
64
+ * so a record on disk always means a registered member (the same order as
65
+ * `rotateSeed`). Owner/admin grantees use the shared seed and are skipped.
66
+ *
67
+ * A re-grant (role change) lands here again with a NEW DEK and mints a NEW
68
+ * seed, so the host's record for this userId is REPLACED — key and role — and
69
+ * a device still holding the previous enrolment is refused from then on.
70
+ */
71
+ export declare function enrolMemberSeed(ctx: BrokerSeedCtx, member: {
72
+ readonly userId: string;
73
+ readonly secret: string;
74
+ }): Promise<void>;
75
+ /**
76
+ * core#73 — de-register a member with the host and drop its record. Called
77
+ * by the kernel right after `revoke()`; the local record goes first (cheap,
78
+ * always succeeds), then the host — a host failure surfaces as
79
+ * {@link BrokerEnrolmentError} AFTER the keyring revocation has completed,
80
+ * so the caller retries the host half, never the revocation.
81
+ */
82
+ export declare function revokeMemberSeed(ctx: BrokerSeedCtx, userId: string): Promise<void>;
68
83
  /**
69
84
  * The challenge/response round trip: `POST /challenge`, derive+sign the
70
85
  * proof from the decrypted seed, `POST /credentials`. One network round
@@ -1,34 +1,4 @@
1
- import type { VaultPolicy, ReAuthOperation, NoydbPolicyApi, NoydbPolicyDeps, NoydbPolicyFactory } from '../../kernel/types.js';
2
- export declare class NoydbPolicy implements NoydbPolicyApi {
3
- private readonly deps;
4
- constructor(deps: NoydbPolicyDeps);
5
- /**
6
- * Touch the policy enforcer for a vault (records activity, resets
7
- * idle timer). Also touches the legacy session timer. No-op if no enforcer.
8
- */
9
- touchPolicy(vault?: string): void;
10
- /**
11
- * Check that a policy-guarded operation is permitted.
12
- * Throws `SessionPolicyError` if re-auth is required.
13
- */
14
- checkPolicyOperation(vault: string, op: ReAuthOperation): void;
15
- /**
16
- * Read the active policy for a vault. Loads from `_meta/policy` on
17
- * first call; subsequent calls hit the in-memory cache. Throws
18
- * `ValidationError` if the vault has not been opened.
19
- */
20
- getPolicy(vault: string): Promise<VaultPolicy>;
21
- /**
22
- * Replace the policy document at `_meta/policy` and update the
23
- * in-memory cache. Gated by the `enroll-user` policy (a policy
24
- * change is fundamentally a privilege-management action).
25
- */
26
- updatePolicy(vault: string, override: Partial<VaultPolicy>): Promise<VaultPolicy>;
27
- /** Read or persist the vault policy at `_meta/policy` on first open. */
28
- bootstrapPolicy(vault: string, opts?: {
29
- skipManagedCheck?: boolean;
30
- }): Promise<void>;
31
- }
1
+ import type { NoydbPolicyFactory } from '../../kernel/types.js';
32
2
  /**
33
3
  * Factory that builds the `NoydbPolicy` service. `createNoydb()`
34
4
  * pre-resolves this via a dynamic import (mirrors
@@ -52,12 +52,45 @@ export interface DelegationToken {
52
52
  readonly toUser: string;
53
53
  readonly fromUser: string;
54
54
  readonly tier: number;
55
- /** Collection name or `null` for all collections. */
55
+ /**
56
+ * Collection name, or `null` for a COLLECTION-WIDE token — see
57
+ * {@link DelegationToken.wrappedDeks} for what that means and what it cannot
58
+ * mean.
59
+ */
56
60
  readonly collection: string | null;
57
61
  /** Optional specific record id scope. */
58
62
  readonly record?: string;
59
63
  readonly until: string;
60
- readonly wrappedDek: string;
64
+ /**
65
+ * The delegated tier DEK for {@link DelegationToken.collection}, wrapped
66
+ * under the target's KEK. Present on a per-collection token; absent on a
67
+ * collection-wide one, which carries {@link DelegationToken.wrappedDeks}.
68
+ */
69
+ readonly wrappedDek?: string;
70
+ /**
71
+ * A collection-wide token's payload: `<collection>#<tier>` → wrapped DEK, one
72
+ * entry per collection the grantor held at that tier (core#56).
73
+ *
74
+ * ## ⛔ Why a MAP and not one key
75
+ *
76
+ * Every collection has its OWN tier DEK — measured, `docs#1` and `ledger#1`
77
+ * are different keys. The original design tried to express "every collection"
78
+ * as a single DEK under a wildcard slot `__any#<tier>`, which cannot work: one
79
+ * key decrypts one collection. A wildcard accepted at the access gate would
80
+ * have passed the check and then failed decryption — a gate that says yes
81
+ * followed by a crypto error. `__any#` is gone; every entry here merges under
82
+ * its REAL `<collection>#<tier>` key, so `assertTierAccess` needs no wildcard
83
+ * and gains no new privilege surface.
84
+ *
85
+ * ## ⚠️ "Every collection" means "every collection AS OF ISSUE TIME"
86
+ *
87
+ * This is a SNAPSHOT. A collection created after the token was issued is not
88
+ * in it and will not be granted by it — the grantor did not hold its DEK to
89
+ * wrap. That is a real limit of the shape, not an oversight, and it is stated
90
+ * here because a caller who reads "all collections" will otherwise assume
91
+ * otherwise.
92
+ */
93
+ readonly wrappedDeks?: Readonly<Record<string, string>>;
61
94
  readonly createdAt: string;
62
95
  }
63
96
  export interface IssueDelegationOptions {
@@ -73,6 +106,29 @@ export interface IssueDelegationOptions {
73
106
  * (so the `wrappedDek` can be re-wrapped against their KEK).
74
107
  */
75
108
  export declare function issueDelegation(store: NoydbStore, vault: string, grantor: UnlockedKeyring, targetKek: EnclaveKey | null, delegationsDek: EnclaveKey, opts: IssueDelegationOptions): Promise<DelegationToken>;
109
+ /**
110
+ * ## Why the vault calls this EXPLICITLY, and never from `openVault` (core#56)
111
+ *
112
+ * The module header above describes a runtime that scans on every open. Doing
113
+ * that automatically would call `getDEK('_delegations')`, which MINTS a DEK when
114
+ * absent and persists the keyring — so merely opening a vault would write to it.
115
+ * Worse, on a vault whose shared `_delegations` DEK this user does not hold, it
116
+ * would mint a WRONG one and then fail to decrypt every token under it.
117
+ *
118
+ * ⛔ A read path must not have that side effect. `Vault.refreshDelegations()`
119
+ * therefore lists first, returns `[]` when nothing is written, and looks the DEK
120
+ * up WITHOUT minting — which also makes the module header's "at each open"
121
+ * cheap to honour, and its "periodic intervals (tracked by the caller)" is what
122
+ * an explicit method is.
123
+ *
124
+ * ## ⚠️ Cross-user delegation does not work yet
125
+ *
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.
131
+ */
76
132
  /**
77
133
  * Enumerate every live (non-expired) delegation addressed to `toUser`
78
134
  * and merge the unwrapped tier DEKs into their keyring. Returns the
@@ -31,8 +31,6 @@
31
31
  import { type EchoSecretParts } from '../../capsule/index.js';
32
32
  import type { KeyringEchoBlock } from '../../kernel/types.js';
33
33
  import type { NoydbDeviceSeal } from './device-seal.js';
34
- /** Same iteration floor as the KEK (spec resolved question 1). */
35
- export declare const ECHO_KDF_ITERATIONS = 600000;
36
34
  export type EchoRevealChoice = {
37
35
  readonly kind: 'portable';
38
36
  } | {