@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog — hub
2
2
 
3
+ ## 0.9.0-pre.0
4
+
5
+ **The line moves to 0.9.0 on this pre-release: a new package, a milestone, three seam widenings, and fourteen fewer names.** Everything below is additive unless marked ⛔.
6
+
7
+ **`@noy-db/ports`** — the six conformance kits are one package with one subpath per hub port: `@noy-db/ports/to`, `/as`, `/at`, `/on`, `/by`, `/capsule`. Bind `@noy-db/hub/<port>`, prove it with `@noy-db/ports/<port>`. **Not a break:** function names unchanged, peers unchanged, and the six `@noy-db/test-*-conformance` names keep resolving as re-export shims until the family's satellites have moved. This cut publishes seven conformance names where the last one published six.
8
+
9
+ **Fourteen fewer names.** The `in-*` framework bindings left this repo for `noy-db/in`; they are no longer on this version line. Nothing about `@noy-db/hub` changed for them.
10
+
11
+ **Hot replica** (milestone: core#75, core#73, core#81, core#82, core#83) — a `sync-peer` target is now a full replica.
12
+ - The roster travels: push mirrors `_keyring` to every target, pull brings it back before any record, higher `roster_epoch` wins in both directions. `openVault` on an EMPTY local consults the sync-peer before deciding new-vs-existing — a device that lost its store re-opens with the same target and secret, and a granted member opens on its own device with only its secret. `revoke()` propagates.
13
+ - Reserved-record replication is a DECLARED set: `_meta/invite-audit-*` (magic-link onboarding works on a fresh sync-peer device once the issuer pushed), `_users`, `_delegations` travel; `_history`, `_ledger`, `_sync` and every other `_meta` id do not, by decision. `Vault.revokeDelegation()` rides the dirty log.
14
+ - A pulled change to your own keyring file takes effect in the open session — a widened re-grant is readable after the next `pull()`, no reopen.
15
+ - **`sync:progress`** during pull and push (`{ direction, phase, records, bytes, total? }`, throttled), and optional `inFlight` on `syncStatus()` / `syncTargetStatus()`. Types `SyncProgress` and `RealignResult` on the root barrel.
16
+ - **`db.realign(vault)`** — a corrupted LOCAL envelope is replaced from the target's healthy copy; an ordinary pull could not repair it because it wins on `_v`.
17
+ - **Member-scoped broker credentials** (`@noy-db/hub/broker`): every role can mint its own cloud-store credentials. `grant()` mints a per-grantee `_broker_member` DEK and the kernel enrols the member with the host (`{ userId, role, proofKey }`); members prove with canonical v2 (`userId` + `role` inside the MAC); re-grant re-enrols, `revoke()` de-registers, peer recovery re-enrols. The admin path is byte-identical. `BrokerStrategy` gains `enrolMember` / `revokeMember` (the floor stub implements both as no-ops); `@noy-db/hub/broker` exports `BrokerMemberIdentity`; `VerifyBrokerProofArgs.member` selects v2 on the host. Existing members need a re-grant (or magic-link recovery) to be enrolled.
18
+
19
+ **`/capsule`** (core#42) — ⛔ two published changes a compiler cannot tell you about: **`EnclaveNotSupportedError.group` is widened to `CapsuleGroup`** (it named three of ten groups and could not name `classify`; an exhaustive `switch` on `err.group` has more cases now), and **`capabilities()` reports one more group** — `CapsuleGroup` gains `per-record-keys` (`wrapCek` / `unwrapCek`), which the reference capsule genuinely implements and was under-reporting. Expect ten members, not nine.
20
+
21
+ **Seams widened, all additive, all already on the root barrel:** `@noy-db/hub/on` gains the echo ceremony's player half (`beginEchoUnlock`, `EchoCeremony`, `BeginEchoUnlockOptions`, `EchoCeremonyRequiredError`, `WrongPromptError`, `WrongEchoError` — core#41); `@noy-db/hub/to` gains `StoreAuth` + `StoreAuthKind`, `@noy-db/hub/by` gains `Unsubscribe` (core#54); `CoverageEvent` and its four companions on `@noy-db/hub/coverage` lose a false `@internal` tag — they were always shipped, and are now a published seam (core#38): additive fields only, `source` stays `string`.
22
+
23
+ **Refusals that were silent are now thrown, deliberately:** `query().groupBy()` refuses a `queryable: 'none'` field the way `where()`/`orderBy()`/`distinct()` did (#29) — grouping on a virtual computed field used to fold every row into one bucket keyed on `undefined`; a `via()`-spelled virtual computed field is refused on a late-attach call in either spelling (#33).
24
+
25
+ **Erasure and reclaim, made legible:** `erasureCompleteness(result)` at `@noy-db/hub/forget` (#34) — default-deny over every residue channel; `ForgetResult.blobResidueRecords` at `collection:id` grain, and `blobResidueETags` documented for what it means (legacy chunks were deleted but could not be crypto-shredded — do not intersect with `reclaimedETags`); `compact({ reclaimLegacyBlobs })` returns `unreferencedLegacyBlobs.reclaimedETags` (#28); `Collection.delete()` documents what a `null` blob read proves.
26
+
27
+ **Classified:** `classified.checksummed({ validate })` (#26), a preset for a checksummed institutional identifier, with `luhnCheck` exported; such a field cannot be uniquely indexed, and the doc says why. `Envelope` documents the two kinds of body: `hasSealedBody` tests `_iv`, not `_data`.
28
+
29
+ **Prose and surfaces:** three shipped examples that named a symbol they never imported are fixed, and the gate now treats an un-imported published name as a finding; every one of hub's 55 subpaths has a frozen value surface (11 did). Conformance-kit READMEs import the reader's implementation from `'./my-backend.js'`-style paths.
30
+
3
31
  ## 0.8.0
4
32
 
5
33
  **The capsule seam** (#4). Hub's crypto interior is now one contract behind one door, and an application can replace it at build time without forking hub.
package/README.md CHANGED
@@ -26,17 +26,18 @@ Part of [**noy-db**](https://github.com/noy-db/core) — *"None Of Your Damn Bus
26
26
 
27
27
  ## Install
28
28
 
29
- Every noy-db app needs `@noy-db/hub` plus at least one storage backend (`to-*`). Everything else is optional.
29
+ `@noy-db/hub` ships an in-memory store, so it runs on its own with nothing else installed. Add a
30
+ storage backend (`to-*`) when the data has to survive a restart. Everything else is optional.
30
31
 
31
32
  ```bash
32
- pnpm add @noy-db/hub @noy-db/to-memory
33
+ pnpm add @noy-db/hub
33
34
  ```
34
35
 
35
36
  ### Pick a storage backend — [`@noy-db/to-*`](https://www.npmjs.com/search?q=%40noy-db%2Fto-)
36
37
 
37
38
  | Package | Use for |
38
39
  |---------|---------|
39
- | [`to-memory`](https://www.npmjs.com/package/@noy-db/to-memory) | Tests, prototypes, ephemeral data |
40
+ | [`to-memory`](https://www.npmjs.com/package/@noy-db/to-memory) | Tests, prototypes, ephemeral data — *only if you need a store separate from the built-in `memoryStore()`; ships from [noy-db-to](https://github.com/noy-db/to)* |
40
41
  | [`to-file`](https://www.npmjs.com/package/@noy-db/to-file) | Local disk, USB stick |
41
42
  | [`to-browser-idb`](https://www.npmjs.com/package/@noy-db/to-browser-idb) | Browser IndexedDB (atomic CAS) |
42
43
  | [`to-browser-local`](https://www.npmjs.com/package/@noy-db/to-browser-local) | Browser localStorage |
@@ -68,13 +69,12 @@ pnpm add @noy-db/hub @noy-db/to-memory
68
69
  ## Quick start
69
70
 
70
71
  ```ts
71
- import { createNoydb } from '@noy-db/hub'
72
- import { toMemory } from '@noy-db/to-memory'
72
+ import { createNoydb, memoryStore } from '@noy-db/hub'
73
73
 
74
74
  type Invoice = { id: string; amount: number; customer: string }
75
75
 
76
76
  const db = await createNoydb({
77
- store: toMemory(),
77
+ store: memoryStore(),
78
78
  user: 'alice',
79
79
  secret: 'correct horse battery staple',
80
80
  })
@@ -329,7 +329,7 @@ const cur = await vault.sequence('invoice-2026').peek() // read current value w
329
329
  **Pre-release** (`0.1.0-pre.1`). API may change before `1.0`. Install from the `next` dist-tag:
330
330
 
331
331
  ```bash
332
- pnpm add @noy-db/hub@next @noy-db/to-memory@next
332
+ pnpm add @noy-db/hub@next
333
333
  ```
334
334
 
335
335
  ## Documentation
@@ -340,4 +340,4 @@ pnpm add @noy-db/hub@next @noy-db/to-memory@next
340
340
 
341
341
  ## License
342
342
 
343
- [MIT](./LICENSE) © vLannaAi
343
+ [Apache-2.0](./LICENSE) © vLannaAi
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "Machine-readable rename map for the noy-db 0.4.0-pre breaking set (noy-db#994). Companion to the prose note at https://noy-db.dev/migration/2026-07-30-0.4.0-pre-breaking-set — `section` points back at it. safeGlobalReplace:true means a whole-word match of `from` cannot plausibly hit anything else in a consumer codebase, so a blanket replace is safe; false means anchor on the import specifier or call site instead and read `note` first. Rows are verified against the live surface by packages/hub/__tests__/codemod-map.test.ts. Not covered here because they are structural, not renames: §4 (23 credential methods moved onto db.team), §6 (collection generics take a named shape) and the two silent behaviour changes.",
2
+ "$comment": "Machine-readable rename map for the noy-db 0.4.0-pre breaking set (vLannaAi/noy-db#994). Companion to the prose note at https://noy-db.dev/migration/2026-07-30-0.4.0-pre-breaking-set — `section` points back at it. safeGlobalReplace:true means a whole-word match of `from` cannot plausibly hit anything else in a consumer codebase, so a blanket replace is safe; false means anchor on the import specifier or call site instead and read `note` first. Rows are verified against the live surface by packages/hub/__tests__/codemod-map.test.ts. Not covered here because they are structural, not renames: §4 (23 credential methods moved onto db.team), §6 (collection generics take a named shape) and the two silent behaviour changes.",
3
3
  "version": "0.4.0-pre",
4
4
  "renames": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "Machine-readable migration map for noy-db#1458 — the QUERY TIERS split. The query DSL was one class in one subpath; it is now four groups. `@noy-db/hub/query` keeps Find (where/or/and/filter/wherePredicate/orderBy/limit/offset/page/after/first/toArray/count/exists/ids/toPlan) and is unchanged for consumers who only find records. Live, Reduce and Relate moved to `@noy-db/hub/query/{live,reduce,relate}`, which are SIDE-EFFECT imports: one line at the app's entry patches the methods onto Query.prototype and merges their types, so no call site changes. ⭐ WHO IS AFFECTED, precisely: only consumers who import from `@noy-db/hub/query` directly. A consumer on the root barrel `@noy-db/hub` needs NO row here — the root barrel imports all three groups, so every method and every re-export is exactly where it was. That is why the rows below are `import-move` rather than `subpath`: the SUBPATH `@noy-db/hub/query` still resolves and still exports Find; what moved is a set of symbols within it. ⚠️ THE COVERAGE CHECKER CANNOT SEE THIS BREAK. `scripts/check-codemod-coverage.mjs` measures the package's whole reachable surface as a union across subpaths, and every symbol below is still reachable — from a different subpath. It reports zero losses for this change, correctly by its own definition and uselessly for this one. These rows are hand-written for that reason; do not read the green checker as evidence the map is unnecessary.",
2
+ "$comment": "Machine-readable migration map for vLannaAi/noy-db#1458 — the QUERY TIERS split. The query DSL was one class in one subpath; it is now four groups. `@noy-db/hub/query` keeps Find (where/or/and/filter/wherePredicate/orderBy/limit/offset/page/after/first/toArray/count/exists/ids/toPlan) and is unchanged for consumers who only find records. Live, Reduce and Relate moved to `@noy-db/hub/query/{live,reduce,relate}`, which are SIDE-EFFECT imports: one line at the app's entry patches the methods onto Query.prototype and merges their types, so no call site changes. ⭐ WHO IS AFFECTED, precisely: only consumers who import from `@noy-db/hub/query` directly. A consumer on the root barrel `@noy-db/hub` needs NO row here — the root barrel imports all three groups, so every method and every re-export is exactly where it was. That is why the rows below are `import-move` rather than `subpath`: the SUBPATH `@noy-db/hub/query` still resolves and still exports Find; what moved is a set of symbols within it. ⚠️ THE COVERAGE CHECKER CANNOT SEE THIS BREAK. `scripts/check-codemod-coverage.mjs` measures the package's whole reachable surface as a union across subpaths, and every symbol below is still reachable — from a different subpath. It reports zero losses for this change, correctly by its own definition and uselessly for this one. These rows are hand-written for that reason; do not read the green checker as evidence the map is unnecessary.",
3
3
  "version": "0.8.0-pre",
4
4
  "renames": [
5
5
  {
@@ -0,0 +1,18 @@
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
package/dist/as/index.js CHANGED
@@ -1,23 +1,27 @@
1
- import "../chunk-UBSFPGVJ.js";
2
- import "../chunk-PP3K67AJ.js";
1
+ import "../chunk-2DX4JCRI.js";
2
+ import "../chunk-EMAWOGVH.js";
3
3
  import {
4
4
  applyListProjection
5
5
  } from "../chunk-VG2ZSFYD.js";
6
+ import {
7
+ FormatsNotEnabledError
8
+ } from "../chunk-RWFQVNXR.js";
6
9
  import "../chunk-RXLYKVTF.js";
10
+ import "../chunk-QJNAHPVT.js";
7
11
  import "../chunk-VYYM3MEN.js";
8
- import "../chunk-747G6CT3.js";
12
+ import "../chunk-J4KAPKBJ.js";
9
13
  import "../chunk-Y2NBBT6K.js";
10
- import "../chunk-3L2NBKDR.js";
11
- import "../chunk-EZGV6F47.js";
12
- import "../chunk-OIEO4WDL.js";
13
- import "../chunk-Q2XRFWOI.js";
14
+ import "../chunk-H3YM66EI.js";
15
+ import "../chunk-4J3MNVVX.js";
16
+ import "../chunk-ZBUAX4EF.js";
17
+ import "../chunk-SPPOUJLN.js";
14
18
  import "../chunk-NH2UOV3B.js";
15
- import "../chunk-42ALPZ2B.js";
16
- import "../chunk-QMWY2FDS.js";
17
- import "../chunk-SV2PM2OY.js";
19
+ import "../chunk-OM3SEDI4.js";
20
+ import "../chunk-PUBI455O.js";
21
+ import "../chunk-2ELOCEXE.js";
18
22
  import {
19
23
  ValidationError
20
- } from "../chunk-37EPTBBR.js";
24
+ } from "../chunk-VSUQI5Q6.js";
21
25
 
22
26
  // src/port/as/active.ts
23
27
  function redactChunk(chunk, ctx, redact) {
@@ -52,20 +56,25 @@ function contextFor(vault) {
52
56
  if (!format) throw new TypeError("assertCanImport('plaintext') requires a non-empty format id");
53
57
  vault.assertCanImport("plaintext", format);
54
58
  },
55
- // ⚠️ Filtered HERE, not passed to exportStream — `ExportStreamOptions`
56
- // has no `collections` field, so the option I first passed was silently
57
- // dropped and hub read every collection. Caught by an as-json test
58
- // expecting ['invoices'] and getting ['invoices','payments'].
59
+ // ⭐ PASSED DOWN, not filtered here (core#45b). `ExportStreamOptions` now
60
+ // carries `collections` and narrows the read, so an excluded collection is
61
+ // neither fetched nor decrypted.
59
62
  //
60
- // Post-read filtering is correct but not free: hub still DECRYPTS the
61
- // collections the caller excluded. Pushing the filter down into
62
- // exportStream is the real fix and is a hub change beyond this port.
63
+ // ⚠️ The history is worth keeping, because the obvious edit here is the
64
+ // wrong one twice over. The option was first passed to `exportStream`
65
+ // when that interface had no field for it — silently dropped, every
66
+ // collection read, caught only by an as-json test expecting ['invoices']
67
+ // and getting ['invoices','payments']. The fix then was to filter after
68
+ // the read, which was correct output and a full decrypt: for a
69
+ // zero-knowledge store, a caller scoping an export to limit exposure got
70
+ // no limit at all. Neither the compiler nor any chunk-level assertion can
71
+ // tell these three implementations apart — only a store observation can
72
+ // (`__tests__/45-export-scope-narrows-read.test.ts`).
63
73
  chunks: async function* (collections) {
64
- const wanted = collections ? new Set(collections) : null;
65
- for await (const chunk of vault.exportStream({ granularity: "collection" })) {
66
- if (wanted && !wanted.has(chunk.collection)) continue;
67
- yield chunk;
68
- }
74
+ yield* vault.exportStream({
75
+ granularity: "collection",
76
+ ...collections ? { collections } : {}
77
+ });
69
78
  },
70
79
  // NOT swallowed. A caller who asked for redaction and silently got
71
80
  // unredacted output is the exact failure this port exists to remove — a
@@ -140,6 +149,7 @@ function withFormats() {
140
149
  };
141
150
  }
142
151
  export {
152
+ FormatsNotEnabledError,
143
153
  withFormats
144
154
  };
145
155
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/port/as/active.ts"],"sourcesContent":["/**\n * `withFormats()` — the service that consumes the `as-*` port.\n *\n * Everything with a correctness or security consequence lives here rather\n * than in each format: the capability gate, the vault read, and redaction.\n * A {@link NoydbFormat} receives records and returns bytes.\n *\n * That is the whole point of the inversion (ADR 0004). The conformance kit it\n * replaces could only check implementors who ran it; a format that cannot\n * reach a vault is gated whether its author cooperated or not.\n *\n * @module\n */\nimport type { NoydbFormat, ImportPlan } from './types.js'\nimport type {\n FormatsStrategy,\n FormatsContext,\n FormatExportOptions,\n FormatImportOptions,\n} from '../with/formats-strategy.js'\nimport type { ExportChunk } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { ImportPolicy } from './types.js'\nimport { applyListProjection } from '../../with-shape/introspection/index.js'\nimport type { CollectionDescription, ListProjectionOptions } from '../../with-shape/introspection/index.js'\nimport { ValidationError } from '../../kernel/errors.js'\n\n/** Apply the redaction projection hub owns, so a format never asks for it. */\nfunction redactChunk(\n chunk: ExportChunk,\n ctx: FormatsContext,\n redact: FormatExportOptions['redact'],\n): ExportChunk {\n if (redact === undefined) return chunk\n const described = ctx.describe(chunk.collection) as CollectionDescription | undefined\n if (!described) {\n throw new Error(\n `vault.export: redaction was requested but '${chunk.collection}' has no description to redact against. ` +\n 'Open the collection with its classifiedFields / fieldMeta options first.',\n )\n }\n const opts: ListProjectionOptions | undefined =\n redact === true ? undefined : { sensitivity: redact.sensitivity as never }\n const records = chunk.records.map((r) =>\n applyListProjection(described, r as Record<string, unknown>, opts),\n )\n return { ...chunk, records: records as typeof chunk.records }\n}\n\n/**\n * Derive the narrow, format-facing capability from the vault.\n *\n * Lives here rather than on `Vault` because `kernel-surface` said so, and it\n * was right: this is service capability, not spine. The spine keeps two\n * delegating methods and nothing else.\n */\nfunction contextFor(vault: Vault): FormatsContext {\n return {\n // The empty-id guards are NOT defensive padding. The\n // plaintext tier is gated per-format, so a missing id means the calling\n // binding is broken — and without this it would reach the gate, miss the\n // allowlist, and surface as `ExportCapabilityError`: \"the owner did not\n // grant this\", which sends the reader to the keyring instead of to the\n // format. A loud TypeError names the real fault.\n assertCanExport: (tier, format) => {\n if (tier === 'bundle') return vault.assertCanExport('bundle')\n if (!format) throw new TypeError(\"assertCanExport('plaintext') requires a non-empty format id\")\n vault.assertCanExport('plaintext', format)\n },\n assertCanImport: (tier, format) => {\n if (tier === 'bundle') return vault.assertCanImport('bundle')\n if (!format) throw new TypeError(\"assertCanImport('plaintext') requires a non-empty format id\")\n vault.assertCanImport('plaintext', format)\n },\n // ⚠️ Filtered HERE, not passed to exportStream — `ExportStreamOptions`\n // has no `collections` field, so the option I first passed was silently\n // dropped and hub read every collection. Caught by an as-json test\n // expecting ['invoices'] and getting ['invoices','payments'].\n //\n // Post-read filtering is correct but not free: hub still DECRYPTS the\n // collections the caller excluded. Pushing the filter down into\n // exportStream is the real fix and is a hub change beyond this port.\n chunks: async function* (collections) {\n const wanted = collections ? new Set(collections) : null\n for await (const chunk of vault.exportStream({ granularity: 'collection' })) {\n if (wanted && !wanted.has(chunk.collection)) continue\n yield chunk\n }\n },\n // NOT swallowed. A caller who asked for redaction and silently got\n // unredacted output is the exact failure this port exists to remove — a\n // security duty that fails quiet. If the description cannot be read, the\n // export fails instead.\n describe: (collection) => vault.collection(collection).describe() as never,\n plan: async (records, policy: ImportPolicy, formatId: string, idKey?: string) => {\n const { diffVault } = await import('../../with-cargo/vault-diff.js')\n const plan = await diffVault(vault, records as never, idKey ? { idKey } : {})\n return {\n plan,\n policy,\n // The apply walk every as-* package had independently: added always,\n // modified unless insert-only, deleted only on replace — in one\n // transaction so a partial failure rolls back. Owned once, here.\n apply: async () => {\n await vault.noydb.transaction((tx) => {\n const txVault = tx.vault(vault.name)\n const reason = `import:${formatId}`\n for (const e of plan.added) {\n txVault.collection(e.collection).put(e.id, e.record as never, { reason })\n }\n if (policy !== 'insert-only') {\n for (const e of plan.modified) {\n txVault.collection(e.collection).put(e.id, e.record as never, { reason })\n }\n }\n if (policy === 'replace') {\n for (const e of plan.deleted) txVault.collection(e.collection).delete(e.id)\n }\n })\n },\n }\n },\n }\n}\n\n/**\n * Enable `vault.export()` / `vault.import()`.\n *\n * ```ts\n * const db = await createNoydb({ store, user, secret, formatsStrategy: withFormats() })\n * const csv = await vault.export(asCsv(), { collections: ['invoices'] })\n * ```\n */\nexport function withFormats(): FormatsStrategy {\n return {\n enabled: true,\n\n async exportWith<Out extends string | Uint8Array>(\n vault: Vault,\n format: NoydbFormat<Out>,\n options: FormatExportOptions = {},\n ): Promise<Out> {\n const ctx = contextFor(vault)\n // FIRST, and before a single record is read. The format is not in scope\n // yet and could not reach the vault if it were.\n if (format.tier === 'bundle') ctx.assertCanExport('bundle')\n else ctx.assertCanExport('plaintext', format.id)\n\n const chunks: ExportChunk[] = []\n for await (const chunk of ctx.chunks(options.collections)) {\n chunks.push(redactChunk(chunk, ctx, options.redact))\n }\n return format.encode(chunks)\n },\n\n async importWith<Out extends string | Uint8Array>(\n vault: Vault,\n format: NoydbFormat<Out>,\n input: Out,\n options: FormatImportOptions = {},\n ): Promise<ImportPlan> {\n const ctx = contextFor(vault)\n // Mirrors the export side: the import gate is two-tier as well, and a\n // bundle format importing under the plaintext tier would be a silent\n // downgrade in the other direction.\n if (format.tier === 'bundle') ctx.assertCanImport('bundle')\n else ctx.assertCanImport('plaintext', format.id)\n if (!format.decode) {\n throw new ValidationError(\n `vault.import: the '${format.id}' format is export-only — it declares no decode(). ` +\n 'Pick a format that round-trips, or write the records directly.',\n )\n }\n const decoded = await format.decode(input)\n const candidate: Record<string, readonly unknown[]> = {}\n for (const chunk of decoded) {\n const target = chunk.collection || options.collection\n if (!target) {\n throw new ValidationError(\n `vault.import: the '${format.id}' input names no collection and none was supplied. ` +\n 'Pass { collection } for formats whose payload is collection-less.',\n )\n }\n candidate[target] = [...(candidate[target] ?? []), ...chunk.records]\n }\n return ctx.plan(candidate, options.policy ?? 'merge', format.id, options.idKey)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,S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O,OAAO,MAAM;AAAA,IAC7B;AAAA,IAEA,MAAM,WACJ,OACA,QACA,OACA,UAA+B,CAAC,GACX;AACrB,YAAM,MAAM,WAAW,KAAK;AAI5B,UAAI,OAAO,SAAS,SAAU,KAAI,gBAAgB,QAAQ;AAAA,UACrD,KAAI,gBAAgB,aAAa,OAAO,EAAE;AAC/C,UAAI,CAAC,OAAO,QAAQ;AAClB,cAAM,IAAI;AAAA,UACR,sBAAsB,OAAO,EAAE;AAAA,QAEjC;AAAA,MACF;AACA,YAAM,UAAU,MAAM,OAAO,OAAO,KAAK;AACzC,YAAM,YAAgD,CAAC;AACvD,iBAAW,SAAS,SAAS;AAC3B,cAAM,SAAS,MAAM,cAAc,QAAQ;AAC3C,YAAI,CAAC,QAAQ;AACX,gBAAM,IAAI;AAAA,YACR,sBAAsB,OAAO,EAAE;AAAA,UAEjC;AAAA,QACF;AACA,kBAAU,MAAM,IAAI,CAAC,GAAI,UAAU,MAAM,KAAK,CAAC,GAAI,GAAG,MAAM,OAAO;AAAA,MACrE;AACA,aAAO,IAAI,KAAK,WAAW,QAAQ,UAAU,SAAS,OAAO,IAAI,QAAQ,KAAK;AAAA,IAChF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/port/as/active.ts"],"sourcesContent":["/**\n * `withFormats()` — the service that consumes the `as-*` port.\n *\n * Everything with a correctness or security consequence lives here rather\n * than in each format: the capability gate, the vault read, and redaction.\n * A {@link NoydbFormat} receives records and returns bytes.\n *\n * That is the whole point of the inversion (ADR 0004). The conformance kit it\n * replaces could only check implementors who ran it; a format that cannot\n * reach a vault is gated whether its author cooperated or not.\n *\n * @module\n */\nimport type { NoydbFormat, ImportPlan } from './types.js'\nimport type {\n FormatsStrategy,\n FormatsContext,\n FormatExportOptions,\n FormatImportOptions,\n} from '../with/formats-strategy.js'\nimport type { ExportChunk } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { ImportPolicy } from './types.js'\nimport { applyListProjection } from '../../with-shape/introspection/index.js'\nimport type { CollectionDescription, ListProjectionOptions } from '../../with-shape/introspection/index.js'\nimport { ValidationError } from '../../kernel/errors.js'\n\n/** Apply the redaction projection hub owns, so a format never asks for it. */\nfunction redactChunk(\n chunk: ExportChunk,\n ctx: FormatsContext,\n redact: FormatExportOptions['redact'],\n): ExportChunk {\n if (redact === undefined) return chunk\n const described = ctx.describe(chunk.collection) as CollectionDescription | undefined\n if (!described) {\n throw new Error(\n `vault.export: redaction was requested but '${chunk.collection}' has no description to redact against. ` +\n 'Open the collection with its classifiedFields / fieldMeta options first.',\n )\n }\n const opts: ListProjectionOptions | undefined =\n redact === true ? undefined : { sensitivity: redact.sensitivity as never }\n const records = chunk.records.map((r) =>\n applyListProjection(described, r as Record<string, unknown>, opts),\n )\n return { ...chunk, records: records as typeof chunk.records }\n}\n\n/**\n * Derive the narrow, format-facing capability from the vault.\n *\n * Lives here rather than on `Vault` because `kernel-surface` said so, and it\n * was right: this is service capability, not spine. The spine keeps two\n * delegating methods and nothing else.\n */\nfunction contextFor(vault: Vault): FormatsContext {\n return {\n // The empty-id guards are NOT defensive padding. The\n // plaintext tier is gated per-format, so a missing id means the calling\n // binding is broken — and without this it would reach the gate, miss the\n // allowlist, and surface as `ExportCapabilityError`: \"the owner did not\n // grant this\", which sends the reader to the keyring instead of to the\n // format. A loud TypeError names the real fault.\n assertCanExport: (tier, format) => {\n if (tier === 'bundle') return vault.assertCanExport('bundle')\n if (!format) throw new TypeError(\"assertCanExport('plaintext') requires a non-empty format id\")\n vault.assertCanExport('plaintext', format)\n },\n assertCanImport: (tier, format) => {\n if (tier === 'bundle') return vault.assertCanImport('bundle')\n if (!format) throw new TypeError(\"assertCanImport('plaintext') requires a non-empty format id\")\n vault.assertCanImport('plaintext', format)\n },\n // ⭐ PASSED DOWN, not filtered here (core#45b). `ExportStreamOptions` now\n // carries `collections` and narrows the read, so an excluded collection is\n // neither fetched nor decrypted.\n //\n // ⚠️ The history is worth keeping, because the obvious edit here is the\n // wrong one twice over. The option was first passed to `exportStream`\n // when that interface had no field for it — silently dropped, every\n // collection read, caught only by an as-json test expecting ['invoices']\n // and getting ['invoices','payments']. The fix then was to filter after\n // the read, which was correct output and a full decrypt: for a\n // zero-knowledge store, a caller scoping an export to limit exposure got\n // no limit at all. Neither the compiler nor any chunk-level assertion can\n // tell these three implementations apart — only a store observation can\n // (`__tests__/45-export-scope-narrows-read.test.ts`).\n chunks: async function* (collections) {\n yield* vault.exportStream({\n granularity: 'collection',\n ...(collections ? { collections } : {}),\n })\n },\n // NOT swallowed. A caller who asked for redaction and silently got\n // unredacted output is the exact failure this port exists to remove — a\n // security duty that fails quiet. If the description cannot be read, the\n // export fails instead.\n describe: (collection) => vault.collection(collection).describe() as never,\n plan: async (records, policy: ImportPolicy, formatId: string, idKey?: string) => {\n const { diffVault } = await import('../../with-cargo/vault-diff.js')\n const plan = await diffVault(vault, records as never, idKey ? { idKey } : {})\n return {\n plan,\n policy,\n // The apply walk every as-* package had independently: added always,\n // modified unless insert-only, deleted only on replace — in one\n // transaction so a partial failure rolls back. Owned once, here.\n apply: async () => {\n await vault.noydb.transaction((tx) => {\n const txVault = tx.vault(vault.name)\n const reason = `import:${formatId}`\n for (const e of plan.added) {\n txVault.collection(e.collection).put(e.id, e.record as never, { reason })\n }\n if (policy !== 'insert-only') {\n for (const e of plan.modified) {\n txVault.collection(e.collection).put(e.id, e.record as never, { reason })\n }\n }\n if (policy === 'replace') {\n for (const e of plan.deleted) txVault.collection(e.collection).delete(e.id)\n }\n })\n },\n }\n },\n }\n}\n\n/**\n * Enable `vault.export()` / `vault.import()`.\n *\n * ```ts\n * const db = await createNoydb({ store, user, secret, formatsStrategy: withFormats() })\n * const csv = await vault.export(asCsv(), { collections: ['invoices'] })\n * ```\n *\n * ⭐ `collections` scopes the READ: an excluded collection is neither fetched\n * nor decrypted (core#45b, since 0.8 — through 0.7 it filtered output after a\n * full decrypt).\n */\nexport function withFormats(): FormatsStrategy {\n return {\n enabled: true,\n\n async exportWith<Out extends string | Uint8Array>(\n vault: Vault,\n format: NoydbFormat<Out>,\n options: FormatExportOptions = {},\n ): Promise<Out> {\n const ctx = contextFor(vault)\n // FIRST, and before a single record is read. The format is not in scope\n // yet and could not reach the vault if it were.\n if (format.tier === 'bundle') ctx.assertCanExport('bundle')\n else ctx.assertCanExport('plaintext', format.id)\n\n const chunks: ExportChunk[] = []\n for await (const chunk of ctx.chunks(options.collections)) {\n chunks.push(redactChunk(chunk, ctx, options.redact))\n }\n return format.encode(chunks)\n },\n\n async importWith<Out extends string | Uint8Array>(\n vault: Vault,\n format: NoydbFormat<Out>,\n input: Out,\n options: FormatImportOptions = {},\n ): Promise<ImportPlan> {\n const ctx = contextFor(vault)\n // Mirrors the export side: the import gate is two-tier as well, and a\n // bundle format importing under the plaintext tier would be a silent\n // downgrade in the other direction.\n if (format.tier === 'bundle') ctx.assertCanImport('bundle')\n else ctx.assertCanImport('plaintext', format.id)\n if (!format.decode) {\n throw new ValidationError(\n `vault.import: the '${format.id}' format is export-only — it declares no decode(). ` +\n 'Pick a format that round-trips, or write the records directly.',\n )\n }\n const decoded = await format.decode(input)\n const candidate: Record<string, readonly unknown[]> = {}\n for (const chunk of decoded) {\n const target = chunk.collection || options.collection\n if (!target) {\n throw new ValidationError(\n `vault.import: the '${format.id}' input names no collection and none was supplied. ` +\n 'Pass { collection } for formats whose payload is collection-less.',\n )\n }\n candidate[target] = [...(candidate[target] ?? []), ...chunk.records]\n }\n return ctx.plan(candidate, options.policy ?? 'merge', format.id, options.idKey)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAS,YACP,OACA,KACA,QACa;AACb,MAAI,WAAW,OAAW,QAAO;AACjC,QAAM,YAAY,IAAI,SAAS,MAAM,UAAU;AAC/C,MAAI,CAAC,WAAW;AACd,UAAM,IAAI;AAAA,MACR,8CAA8C,MAAM,UAAU;AAAA,IAEhE;AAAA,EACF;AACA,QAAM,OACJ,WAAW,OA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AAA,UACR,sBAAsB,OAAO,EAAE;AAAA,QAEjC;AAAA,MACF;AACA,YAAM,UAAU,MAAM,OAAO,OAAO,KAAK;AACzC,YAAM,YAAgD,CAAC;AACvD,iBAAW,SAAS,SAAS;AAC3B,cAAM,SAAS,MAAM,cAAc,QAAQ;AAC3C,YAAI,CAAC,QAAQ;AACX,gBAAM,IAAI;AAAA,YACR,sBAAsB,OAAO,EAAE;AAAA,UAEjC;AAAA,QACF;AACA,kBAAU,MAAM,IAAI,CAAC,GAAI,UAAU,MAAM,KAAK,CAAC,GAAI,GAAG,MAAM,OAAO;AAAA,MACrE;AACA,aAAO,IAAI,KAAK,WAAW,QAAQ,UAAU,SAAS,OAAO,IAAI,QAAQ,KAAK;AAAA,IAChF;AAAA,EACF;AACF;","names":[]}
package/dist/at/index.js CHANGED
@@ -3,15 +3,15 @@ import {
3
3
  MemorySealer,
4
4
  SEALED_SECRET_RECORD_ID,
5
5
  parseSealedEnvelope
6
- } from "../chunk-3XJQBBZD.js";
7
- import "../chunk-EZGV6F47.js";
8
- import "../chunk-OIEO4WDL.js";
9
- import "../chunk-Q2XRFWOI.js";
6
+ } from "../chunk-XKBTJGFP.js";
7
+ import "../chunk-4J3MNVVX.js";
8
+ import "../chunk-ZBUAX4EF.js";
9
+ import "../chunk-SPPOUJLN.js";
10
10
  import "../chunk-NH2UOV3B.js";
11
- import "../chunk-42ALPZ2B.js";
12
- import "../chunk-QMWY2FDS.js";
13
- import "../chunk-SV2PM2OY.js";
14
- import "../chunk-37EPTBBR.js";
11
+ import "../chunk-OM3SEDI4.js";
12
+ import "../chunk-PUBI455O.js";
13
+ import "../chunk-2ELOCEXE.js";
14
+ import "../chunk-VSUQI5Q6.js";
15
15
  export {
16
16
  MemoryRecipientSealer,
17
17
  MemorySealer,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  issueAttestationCore
3
- } from "../chunk-VMV5SBE4.js";
3
+ } from "../chunk-QDHHHI5Q.js";
4
4
  import {
5
5
  getRevokedDocIdsCore,
6
6
  publishRevocationListCore,
7
7
  revokeDocCore,
8
8
  unrevokeDocCore
9
- } from "../chunk-5UMK7GRI.js";
10
- import "../chunk-JWWYRR4Q.js";
9
+ } from "../chunk-K7RW7FI4.js";
10
+ import "../chunk-5XONHAFD.js";
11
11
  import {
12
12
  ATTESTATIONS_COLLECTION
13
- } from "../chunk-DLD5LGDS.js";
13
+ } from "../chunk-D5A3GCZ4.js";
14
14
  import {
15
15
  NO_ATTESTATION
16
- } from "../chunk-PD64727P.js";
16
+ } from "../chunk-6QLCS7ET.js";
17
17
  import {
18
18
  decodeQr,
19
19
  isRevoked,
@@ -22,27 +22,27 @@ import {
22
22
  verifyRevocationList
23
23
  } from "../chunk-GMKGGY7V.js";
24
24
  import "../chunk-4AOERLTV.js";
25
- import "../chunk-EZGV6F47.js";
26
- import "../chunk-OIEO4WDL.js";
27
- import "../chunk-Q2XRFWOI.js";
25
+ import "../chunk-4J3MNVVX.js";
26
+ import "../chunk-ZBUAX4EF.js";
27
+ import "../chunk-SPPOUJLN.js";
28
28
  import "../chunk-NH2UOV3B.js";
29
- import "../chunk-42ALPZ2B.js";
30
- import "../chunk-QMWY2FDS.js";
31
- import "../chunk-SV2PM2OY.js";
29
+ import "../chunk-OM3SEDI4.js";
30
+ import "../chunk-PUBI455O.js";
31
+ import "../chunk-2ELOCEXE.js";
32
32
  import {
33
33
  AttestationError,
34
34
  AttestationNotEnabledError
35
- } from "../chunk-37EPTBBR.js";
35
+ } from "../chunk-VSUQI5Q6.js";
36
36
 
37
37
  // src/with-audit/attestation/active.ts
38
38
  function withAttestation() {
39
39
  return {
40
40
  async issueAttestation(ctx, args) {
41
- const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-YIVBZUTH.js");
41
+ const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-LPEEEMPP.js");
42
42
  return issueAttestationCore2(ctx, args);
43
43
  },
44
44
  async getDocumentSigningPublicKey(deps) {
45
- const { loadSigner, loadOrCreateSigner } = await import("../signer-MHGW3OIL.js");
45
+ const { loadSigner, loadOrCreateSigner } = await import("../signer-IUIYR3CX.js");
46
46
  const existing = await loadSigner(deps.adapter, deps.vault, deps.getDEK);
47
47
  if (existing) return { keyId: existing.keyId, publicKeyB64: existing.publicKeyB64 };
48
48
  if (deps.role !== "owner") {
@@ -52,19 +52,19 @@ function withAttestation() {
52
52
  return { keyId: signer.keyId, publicKeyB64: signer.publicKeyB64 };
53
53
  },
54
54
  async revokeAttestation(ctx, docId) {
55
- const { revokeDocCore: revokeDocCore2 } = await import("../revoke-6DWIEOCV.js");
55
+ const { revokeDocCore: revokeDocCore2 } = await import("../revoke-G2KXJQA5.js");
56
56
  return revokeDocCore2(ctx, docId);
57
57
  },
58
58
  async unrevokeAttestation(ctx, docId) {
59
- const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-6DWIEOCV.js");
59
+ const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-G2KXJQA5.js");
60
60
  return unrevokeDocCore2(ctx, docId);
61
61
  },
62
62
  async getRevokedDocIds(ctx) {
63
- const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-6DWIEOCV.js");
63
+ const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-G2KXJQA5.js");
64
64
  return getRevokedDocIdsCore2(ctx);
65
65
  },
66
66
  async publishRevocationList(ctx) {
67
- const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-6DWIEOCV.js");
67
+ const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-G2KXJQA5.js");
68
68
  return publishRevocationListCore2(ctx);
69
69
  }
70
70
  };
@@ -3,36 +3,36 @@ import {
3
3
  } from "./chunk-EPFF7LOX.js";
4
4
  import {
5
5
  SCHEMAS_COLLECTION
6
- } from "./chunk-3L2NBKDR.js";
6
+ } from "./chunk-H3YM66EI.js";
7
7
  import {
8
8
  PERIODS_COLLECTION,
9
9
  PERIOD_ARCHIVES_COLLECTION,
10
10
  PERIOD_FREEZES_COLLECTION,
11
11
  PERIOD_REOPENS_COLLECTION,
12
12
  PERIOD_TARGET_PURGES_COLLECTION
13
- } from "./chunk-QBLT6POL.js";
13
+ } from "./chunk-6WS35E6X.js";
14
14
  import {
15
15
  SEQUENCE_COLLECTION
16
- } from "./chunk-VFHCKG5M.js";
16
+ } from "./chunk-BYHCKX73.js";
17
17
  import {
18
18
  LEDGER_COLLECTION,
19
19
  LEDGER_DELTAS_COLLECTION
20
20
  } from "./chunk-I7FD46FF.js";
21
21
  import {
22
22
  buildRecordEnvelope
23
- } from "./chunk-EZGV6F47.js";
24
- import "./chunk-OIEO4WDL.js";
25
- import "./chunk-Q2XRFWOI.js";
23
+ } from "./chunk-4J3MNVVX.js";
24
+ import "./chunk-ZBUAX4EF.js";
25
+ import "./chunk-SPPOUJLN.js";
26
26
  import "./chunk-NH2UOV3B.js";
27
- import "./chunk-42ALPZ2B.js";
28
- import "./chunk-QMWY2FDS.js";
27
+ import "./chunk-OM3SEDI4.js";
28
+ import "./chunk-PUBI455O.js";
29
29
  import {
30
30
  NOYDB_BACKUP_VERSION
31
- } from "./chunk-SV2PM2OY.js";
31
+ } from "./chunk-2ELOCEXE.js";
32
32
  import {
33
33
  BackupCorruptedError,
34
34
  BackupLedgerError
35
- } from "./chunk-37EPTBBR.js";
35
+ } from "./chunk-VSUQI5Q6.js";
36
36
 
37
37
  // src/with-pod/backup.ts
38
38
  async function dumpVault(ctx) {
@@ -266,4 +266,4 @@ export {
266
266
  loadVault,
267
267
  verifyBackupIntegrity
268
268
  };
269
- //# sourceMappingURL=backup-YE2VQ26S.js.map
269
+ //# sourceMappingURL=backup-7RKNZMQO.js.map
@@ -10,7 +10,7 @@ import {
10
10
  createExportBlobsHandle,
11
11
  reportOrphanBlobChunks,
12
12
  runCompaction
13
- } from "../chunk-JSMTXZR3.js";
13
+ } from "../chunk-G5EDYVSE.js";
14
14
  import {
15
15
  BLOB_CHUNKS_COLLECTION,
16
16
  BLOB_COLLECTION,
@@ -25,20 +25,20 @@ import {
25
25
  detectMimeType,
26
26
  isPreCompressed,
27
27
  memoryBlobPinStore
28
- } from "../chunk-G2MVBDFP.js";
29
- import "../chunk-SYNY3VB5.js";
30
- import "../chunk-7XMHMVTS.js";
31
- import "../chunk-FLPCETP6.js";
32
- import "../chunk-EZGV6F47.js";
33
- import "../chunk-OIEO4WDL.js";
34
- import "../chunk-Q2XRFWOI.js";
28
+ } from "../chunk-QXJXG7DN.js";
29
+ import "../chunk-PTJY5R3O.js";
30
+ import "../chunk-UHFGK6YA.js";
31
+ import "../chunk-RIZTZJX6.js";
32
+ import "../chunk-4J3MNVVX.js";
33
+ import "../chunk-ZBUAX4EF.js";
34
+ import "../chunk-SPPOUJLN.js";
35
35
  import "../chunk-NH2UOV3B.js";
36
- import "../chunk-42ALPZ2B.js";
37
- import "../chunk-QMWY2FDS.js";
38
- import "../chunk-SV2PM2OY.js";
36
+ import "../chunk-OM3SEDI4.js";
37
+ import "../chunk-PUBI455O.js";
38
+ import "../chunk-2ELOCEXE.js";
39
39
  import {
40
40
  BlobOfflineError
41
- } from "../chunk-37EPTBBR.js";
41
+ } from "../chunk-VSUQI5Q6.js";
42
42
 
43
43
  // src/via/blob/active.ts
44
44
  function withBlobs(options = {}) {
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  NO_BROKER
3
- } from "../chunk-GZT3NQRA.js";
3
+ } from "../chunk-72XBVN4J.js";
4
4
  import {
5
5
  issueChallenge,
6
6
  verifyBrokerProof
7
- } from "../chunk-EZGV6F47.js";
8
- import "../chunk-OIEO4WDL.js";
9
- import "../chunk-Q2XRFWOI.js";
7
+ } from "../chunk-4J3MNVVX.js";
8
+ import "../chunk-ZBUAX4EF.js";
9
+ import "../chunk-SPPOUJLN.js";
10
10
  import "../chunk-NH2UOV3B.js";
11
- import "../chunk-42ALPZ2B.js";
12
- import "../chunk-QMWY2FDS.js";
13
- import "../chunk-SV2PM2OY.js";
11
+ import "../chunk-OM3SEDI4.js";
12
+ import "../chunk-PUBI455O.js";
13
+ import "../chunk-2ELOCEXE.js";
14
14
  import {
15
15
  BrokerEnrolmentError,
16
16
  BrokerNotEnabledError,
17
17
  BrokerProofError
18
- } from "../chunk-37EPTBBR.js";
18
+ } from "../chunk-VSUQI5Q6.js";
19
19
 
20
20
  // src/with-party/broker/active.ts
21
21
  var DEFAULT_SKEW_MS = 6e4;
@@ -28,7 +28,7 @@ function withBroker(config) {
28
28
  const cache = /* @__PURE__ */ new Map();
29
29
  return {
30
30
  async enroll(ctx) {
31
- const { enrollSeed } = await import("../seed-XNSE4U3S.js");
31
+ const { enrollSeed } = await import("../seed-JMQTRKRE.js");
32
32
  return enrollSeed({ ...ctx, config });
33
33
  },
34
34
  async rotate(ctx) {
@@ -37,9 +37,17 @@ function withBroker(config) {
37
37
  const inFlight = scoped.map(([, e]) => e.inFlight).filter((p) => p !== void 0);
38
38
  await Promise.allSettled(inFlight);
39
39
  for (const [key] of scoped) cache.delete(key);
40
- const { rotateSeed } = await import("../seed-XNSE4U3S.js");
40
+ const { rotateSeed } = await import("../seed-JMQTRKRE.js");
41
41
  return rotateSeed({ ...ctx, config });
42
42
  },
43
+ async enrolMember(ctx, member) {
44
+ const { enrolMemberSeed } = await import("../seed-JMQTRKRE.js");
45
+ return enrolMemberSeed({ ...ctx, config }, member);
46
+ },
47
+ async revokeMember(ctx, userId) {
48
+ const { revokeMemberSeed } = await import("../seed-JMQTRKRE.js");
49
+ return revokeMemberSeed({ ...ctx, config }, userId);
50
+ },
43
51
  credentialSource(ctx, profile) {
44
52
  const key = `${ctx.vault}\0${profile ?? ""}`;
45
53
  return async () => {
@@ -54,7 +62,7 @@ function withBroker(config) {
54
62
  const skewMs = config.skewMs ?? DEFAULT_SKEW_MS;
55
63
  const capturedEntry = entry;
56
64
  const inFlight = (async () => {
57
- const { mintStoreCredentials } = await import("../seed-XNSE4U3S.js");
65
+ const { mintStoreCredentials } = await import("../seed-JMQTRKRE.js");
58
66
  const creds = await mintStoreCredentials({ ...ctx, config }, profile);
59
67
  capturedEntry.cached = { creds, validUntil: cacheFloor(creds, skewMs) };
60
68
  return creds;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-party/broker/active.ts","../../src/with-party/broker/index.ts"],"sourcesContent":["/**\n * Enable the credential-broker capability (#479, spec §5).\n *\n * Pass to `createNoydb({ brokerStrategy: withBroker(config) })` to make\n * `vault.broker()` live. Each method dynamic-imports the seed lifecycle\n * engine (`./seed.js`) — mirroring `via/classified/active.ts`'s per-method\n * dynamic-import seam — so `with-party/broker/seed.ts` (the heavy module:\n * the CAS enrol, quiesce-then-swap rotate, and the challenge/response round\n * trip) is reachable only through the `@noy-db/hub/broker` subpath and\n * never enters the single-user floor bundle.\n *\n * The single-flight, per-vault-per-profile refresh cache (H-6/I6) lives\n * HERE, in this factory's closure — shared across every `credentialSource(profile)`\n * call for this one broker instance (in turn shared across every vault of a\n * `createNoydb()` instance — `vault.broker()` passes the SAME `BrokerStrategy`\n * for all of them), so `rotate()` can quiesce it (await any in-flight\n * round-trip, then drop it) before the seed swap. The cache key is\n * `${vault}\\0${profile}` — keyed by vault FIRST, or two vaults sharing this\n * one strategy would collide and hand vault-B a cached credential minted\n * (and STS-scoped) for vault-A.\n */\nimport type { BrokerStrategy, BrokerConfig, BrokerCtx } from '../../port/with/broker-strategy.js'\nimport type { StoreCredentials, StoreCredentialSource } from '../../kernel/types.js'\n\nconst DEFAULT_SKEW_MS = 60_000\n/** Floor under the skew-adjusted boundary so a sub-skew credential TTL\n * doesn't collapse to \"already expired\" and thrash re-proving every call (I6b). */\nconst MIN_CACHE_MS = 1_000\n\ninterface CacheEntry {\n cached?: { creds: StoreCredentials; validUntil: number } | undefined\n inFlight?: Promise<StoreCredentials> | undefined\n}\n\nfunction cacheFloor(creds: StoreCredentials, skewMs: number): number {\n const expiresAtMs = creds.expiresAt ? Date.parse(creds.expiresAt) : Date.now() + skewMs * 2\n return Math.max(expiresAtMs - skewMs, Date.now() + MIN_CACHE_MS)\n}\n\nexport function withBroker(config: BrokerConfig): BrokerStrategy {\n const cache = new Map<string, CacheEntry>()\n\n return {\n async enroll(ctx) {\n const { enrollSeed } = await import('./seed.js')\n return enrollSeed({ ...ctx, config })\n },\n async rotate(ctx) {\n // Quiesce (I5): let any in-flight round-trip finish (it may still be\n // proving under the pre-rotation seed) before the local record is\n // overwritten, then drop the cache — scoped to THIS vault's entries\n // only (`${ctx.vault}\\0`-prefixed keys). A global cache.clear() here\n // would blow away every OTHER vault's cache on this shared strategy\n // too — same root cause as the cross-vault read collision this fixes.\n const vaultPrefix = `${ctx.vault}\\0`\n const scoped = [...cache.entries()].filter(([key]) => key.startsWith(vaultPrefix))\n const inFlight = scoped.map(([, e]) => e.inFlight).filter((p): p is Promise<StoreCredentials> => p !== undefined)\n await Promise.allSettled(inFlight)\n for (const [key] of scoped) cache.delete(key)\n const { rotateSeed } = await import('./seed.js')\n return rotateSeed({ ...ctx, config })\n },\n credentialSource(ctx: BrokerCtx, profile?: string): StoreCredentialSource {\n const key = `${ctx.vault}\\0${profile ?? ''}`\n return async () => {\n let entry = cache.get(key)\n if (!entry) {\n entry = {}\n cache.set(key, entry)\n }\n const now = Date.now()\n if (entry.cached && now < entry.cached.validUntil) return entry.cached.creds\n if (entry.inFlight) return entry.inFlight\n\n const skewMs = config.skewMs ?? DEFAULT_SKEW_MS\n const capturedEntry = entry\n const inFlight = (async () => {\n const { mintStoreCredentials } = await import('./seed.js')\n const creds = await mintStoreCredentials({ ...ctx, config }, profile)\n capturedEntry.cached = { creds, validUntil: cacheFloor(creds, skewMs) }\n return creds\n })()\n entry.inFlight = inFlight\n try {\n return await inFlight\n } finally {\n // Clear-on-settle (I6a): a rejected in-flight promise must never\n // stay pinned in the cache, or every subsequent call would wedge\n // on the same rejection instead of retrying.\n capturedEntry.inFlight = undefined\n }\n }\n },\n }\n}\n","/**\n * `@noy-db/hub/broker` — subpath export for the credential-broker capability\n * (#479, credential-broker spec). Apps that never call `vault.broker()` can\n * exclude this subpath entirely: the floor default `NO_BROKER` throws, and\n * this module's real engine (`with-party/broker/{seed,active}.ts`) is only\n * ever reached through `withBroker()`'s dynamic imports, so it never enters\n * a floor bundle.\n *\n * Also re-exports the host-side helpers (`issueChallenge`, `verifyBrokerProof`)\n * from the enclave barrel, so a Lambda/Worker implementing the reference\n * broker host can import just this one subpath and get everything it\n * needs, `crypto.subtle`-only.\n */\n\n// ─── Capability opt-in seam ──────────────────────────────────\nexport { withBroker } from './active.js'\nexport {\n NO_BROKER,\n type BrokerStrategy,\n type BrokerCtx,\n type BrokerConfig,\n type CredentialBrokerHandle,\n} from '../../port/with/broker-strategy.js'\nexport { BrokerNotEnabledError, BrokerEnrolmentError, BrokerProofError } from '../../kernel/errors.js'\n\n// ─── Host helpers (verify side — for a reference broker host) ───\nimport { issueChallenge as issueChallengeRaw, verifyBrokerProof } from '../../capsule/index.js'\nimport type { IssuedChallenge, VerifyBrokerProofArgs } from '../../capsule/index.js'\n\n/**\n * Floor — a challenge TTL must survive network latency + clock drift\n * between host and client. The enclave's `issueChallenge` is deliberately\n * unclamped (a mechanical primitive, not a policy); this floor is host\n * POLICY, so it lives here in the party layer, not\n * `capsule/enclave-aes/broker/proof.ts` (carried forward from Task 2's review,\n * I6b).\n */\nconst MIN_CHALLENGE_TTL_MS = 10_000\n/** Ceiling — spec §2 step 2: \"TTL ≤ 60 s\". */\nconst MAX_CHALLENGE_TTL_MS = 60_000\n\n/**\n * {@link issueChallengeRaw} (the enclave's mechanical primitive) with a\n * `[10s, 60s]` TTL clamp applied, so a reference host built on this barrel\n * gets a safe challenge TTL without having to know the bounds itself.\n */\nexport function issueChallenge(opts?: { ttlMs?: number }): IssuedChallenge {\n const requested = opts?.ttlMs ?? MAX_CHALLENGE_TTL_MS\n const clamped = Math.min(Math.max(requested, MIN_CHALLENGE_TTL_MS), MAX_CHALLENGE_TTL_MS)\n return issueChallengeRaw({ ttlMs: clamped })\n}\nexport { verifyBrokerProof }\nexport type { VerifyBrokerProofArgs }\n\n// #837 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AAK;AAAA,QACtB;AACA,cAAM,MAAM,KAAK,IAAI;AACrB,YAAI,MAAM,UAAU,MAAM,MAAM,OAAO,WAAY,QAAO,MAAM,OAAO;AACvE,YAAI,MAAM,SAAU,QAAO,MAAM;AAEjC,cAAM,SAAS,OAAO,UAAU;AAChC,cAAM,gBAAgB;AACtB,cAAM,YAAY,YAAY;AAC5B,gBAAM,EAAE,qBAAqB,IAAI,MAAM,OAAO,qBAAW;AACzD,gBAAM,QAAQ,MAAM,qBAAqB,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO;AACpE,wBAAc,SAAS,EAAE,OAAO,YAAY,WAAW,OAAO,MAAM,EAAE;AACtE,iBAAO;AAAA,QACT,GAAG;AACH,cAAM,WAAW;AACjB,YAAI;AACF,iBAAO,MAAM;AAAA,QACf,UAAE;AAIA,wBAAc,WAAW;AAAA,QAC3B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;ACzDA,IAAM,uBAAuB;AAE7B,IAAM,uBAAuB;AAOtB,SAASA,gBAAe,MAA4C;AACzE,QAAM,YAAY,MAAM,SAAS;AACjC,QAAM,UAAU,KAAK,IAAI,KAAK,IAAI,WAAW,oBAAoB,GAAG,oBAAoB;AACxF,SAAO,eAAkB,EAAE,OAAO,QAAQ,CAAC;AAC7C;","names":["issueChallenge"]}
1
+ {"version":3,"sources":["../../src/with-party/broker/active.ts","../../src/with-party/broker/index.ts"],"sourcesContent":["/**\n * Enable the credential-broker capability (#479, spec §5).\n *\n * Pass to `createNoydb({ brokerStrategy: withBroker(config) })` to make\n * `vault.broker()` live. Each method dynamic-imports the seed lifecycle\n * engine (`./seed.js`) — mirroring `via/classified/active.ts`'s per-method\n * dynamic-import seam — so `with-party/broker/seed.ts` (the heavy module:\n * the CAS enrol, quiesce-then-swap rotate, and the challenge/response round\n * trip) is reachable only through the `@noy-db/hub/broker` subpath and\n * never enters the single-user floor bundle.\n *\n * The single-flight, per-vault-per-profile refresh cache (H-6/I6) lives\n * HERE, in this factory's closure — shared across every `credentialSource(profile)`\n * call for this one broker instance (in turn shared across every vault of a\n * `createNoydb()` instance — `vault.broker()` passes the SAME `BrokerStrategy`\n * for all of them), so `rotate()` can quiesce it (await any in-flight\n * round-trip, then drop it) before the seed swap. The cache key is\n * `${vault}\\0${profile}` — keyed by vault FIRST, or two vaults sharing this\n * one strategy would collide and hand vault-B a cached credential minted\n * (and STS-scoped) for vault-A.\n */\nimport type { BrokerStrategy, BrokerConfig, BrokerCtx } from '../../port/with/broker-strategy.js'\nimport type { StoreCredentials, StoreCredentialSource } from '../../kernel/types.js'\n\nconst DEFAULT_SKEW_MS = 60_000\n/** Floor under the skew-adjusted boundary so a sub-skew credential TTL\n * doesn't collapse to \"already expired\" and thrash re-proving every call (I6b). */\nconst MIN_CACHE_MS = 1_000\n\ninterface CacheEntry {\n cached?: { creds: StoreCredentials; validUntil: number } | undefined\n inFlight?: Promise<StoreCredentials> | undefined\n}\n\nfunction cacheFloor(creds: StoreCredentials, skewMs: number): number {\n const expiresAtMs = creds.expiresAt ? Date.parse(creds.expiresAt) : Date.now() + skewMs * 2\n return Math.max(expiresAtMs - skewMs, Date.now() + MIN_CACHE_MS)\n}\n\nexport function withBroker(config: BrokerConfig): BrokerStrategy {\n const cache = new Map<string, CacheEntry>()\n\n return {\n async enroll(ctx) {\n const { enrollSeed } = await import('./seed.js')\n return enrollSeed({ ...ctx, config })\n },\n async rotate(ctx) {\n // Quiesce (I5): let any in-flight round-trip finish (it may still be\n // proving under the pre-rotation seed) before the local record is\n // overwritten, then drop the cache — scoped to THIS vault's entries\n // only (`${ctx.vault}\\0`-prefixed keys). A global cache.clear() here\n // would blow away every OTHER vault's cache on this shared strategy\n // too — same root cause as the cross-vault read collision this fixes.\n const vaultPrefix = `${ctx.vault}\\0`\n const scoped = [...cache.entries()].filter(([key]) => key.startsWith(vaultPrefix))\n const inFlight = scoped.map(([, e]) => e.inFlight).filter((p): p is Promise<StoreCredentials> => p !== undefined)\n await Promise.allSettled(inFlight)\n for (const [key] of scoped) cache.delete(key)\n const { rotateSeed } = await import('./seed.js')\n return rotateSeed({ ...ctx, config })\n },\n async enrolMember(ctx, member) {\n const { enrolMemberSeed } = await import('./seed.js')\n return enrolMemberSeed({ ...ctx, config }, member)\n },\n async revokeMember(ctx, userId) {\n const { revokeMemberSeed } = await import('./seed.js')\n return revokeMemberSeed({ ...ctx, config }, userId)\n },\n credentialSource(ctx: BrokerCtx, profile?: string): StoreCredentialSource {\n const key = `${ctx.vault}\\0${profile ?? ''}`\n return async () => {\n let entry = cache.get(key)\n if (!entry) {\n entry = {}\n cache.set(key, entry)\n }\n const now = Date.now()\n if (entry.cached && now < entry.cached.validUntil) return entry.cached.creds\n if (entry.inFlight) return entry.inFlight\n\n const skewMs = config.skewMs ?? DEFAULT_SKEW_MS\n const capturedEntry = entry\n const inFlight = (async () => {\n const { mintStoreCredentials } = await import('./seed.js')\n const creds = await mintStoreCredentials({ ...ctx, config }, profile)\n capturedEntry.cached = { creds, validUntil: cacheFloor(creds, skewMs) }\n return creds\n })()\n entry.inFlight = inFlight\n try {\n return await inFlight\n } finally {\n // Clear-on-settle (I6a): a rejected in-flight promise must never\n // stay pinned in the cache, or every subsequent call would wedge\n // on the same rejection instead of retrying.\n capturedEntry.inFlight = undefined\n }\n }\n },\n }\n}\n","/**\n * `@noy-db/hub/broker` — subpath export for the credential-broker capability\n * (#479, credential-broker spec). Apps that never call `vault.broker()` can\n * exclude this subpath entirely: the floor default `NO_BROKER` throws, and\n * this module's real engine (`with-party/broker/{seed,active}.ts`) is only\n * ever reached through `withBroker()`'s dynamic imports, so it never enters\n * a floor bundle.\n *\n * Also re-exports the host-side helpers (`issueChallenge`, `verifyBrokerProof`)\n * from the enclave barrel, so a Lambda/Worker implementing the reference\n * broker host can import just this one subpath and get everything it\n * needs, `crypto.subtle`-only.\n */\n\n// ─── Capability opt-in seam ──────────────────────────────────\nexport { withBroker } from './active.js'\nexport {\n NO_BROKER,\n type BrokerStrategy,\n type BrokerCtx,\n type BrokerConfig,\n type CredentialBrokerHandle,\n} from '../../port/with/broker-strategy.js'\nexport { BrokerNotEnabledError, BrokerEnrolmentError, BrokerProofError } from '../../kernel/errors.js'\n\n// ─── Host helpers (verify side — for a reference broker host) ───\nimport { issueChallenge as issueChallengeRaw, verifyBrokerProof } from '../../capsule/index.js'\nimport type { IssuedChallenge, VerifyBrokerProofArgs, BrokerMemberIdentity } from '../../capsule/index.js'\n\n/**\n * Floor — a challenge TTL must survive network latency + clock drift\n * between host and client. The enclave's `issueChallenge` is deliberately\n * unclamped (a mechanical primitive, not a policy); this floor is host\n * POLICY, so it lives here in the party layer, not\n * `capsule/enclave-aes/broker/proof.ts` (carried forward from Task 2's review,\n * I6b).\n */\nconst MIN_CHALLENGE_TTL_MS = 10_000\n/** Ceiling — spec §2 step 2: \"TTL ≤ 60 s\". */\nconst MAX_CHALLENGE_TTL_MS = 60_000\n\n/**\n * {@link issueChallengeRaw} (the enclave's mechanical primitive) with a\n * `[10s, 60s]` TTL clamp applied, so a reference host built on this barrel\n * gets a safe challenge TTL without having to know the bounds itself.\n */\nexport function issueChallenge(opts?: { ttlMs?: number }): IssuedChallenge {\n const requested = opts?.ttlMs ?? MAX_CHALLENGE_TTL_MS\n const clamped = Math.min(Math.max(requested, MIN_CHALLENGE_TTL_MS), MAX_CHALLENGE_TTL_MS)\n return issueChallengeRaw({ ttlMs: clamped })\n}\nexport { verifyBrokerProof }\nexport type { VerifyBrokerProofArgs, BrokerMemberIdentity }\n\n// #837 — issueChallenge's return type must be nameable from this entry.\nexport type { IssuedChallenge } from '../../capsule/index.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,kBAAkB;AAGxB,IAAM,eAAe;AAOrB,SAAS,WAAW,OAAyB,QAAwB;AACnE,QAAM,cAAc,MAAM,YAAY,KAAK,MAAM,MAAM,SAAS,IAAI,KAAK,IAAI,IAAI,SAAS;AAC1F,SAAO,KAAK,IAAI,cAAc,QAAQ,KAAK,IAAI,IAAI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I,KAAK,KAAK;AAAA,QACtB;AACA,cAAM,MAAM,KAAK,IAAI;AACrB,YAAI,MAAM,UAAU,MAAM,MAAM,OAAO,WAAY,QAAO,MAAM,OAAO;AACvE,YAAI,MAAM,SAAU,QAAO,MAAM;AAEjC,cAAM,SAAS,OAAO,UAAU;AAChC,cAAM,gBAAgB;AACtB,cAAM,YAAY,YAAY;AAC5B,gBAAM,EAAE,qBAAqB,IAAI,MAAM,OAAO,qBAAW;AACzD,gBAAM,QAAQ,MAAM,qBAAqB,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO;AACpE,wBAAc,SAAS,EAAE,OAAO,YAAY,WAAW,OAAO,MAAM,EAAE;AACtE,iBAAO;AAAA,QACT,GAAG;AACH,cAAM,WAAW;AACjB,YAAI;AACF,iBAAO,MAAM;AAAA,QACf,UAAE;AAIA,wBAAc,WAAW;AAAA,QAC3B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;ACjEA,IAAM,uBAAuB;AAE7B,IAAM,uBAAuB;AAOtB,SAASA,gBAAe,MAA4C;AACzE,QAAM,YAAY,MAAM,SAAS;AACjC,QAAM,UAAU,KAAK,IAAI,KAAK,IAAI,WAAW,oBAAoB,GAAG,oBAAoB;AACxF,SAAO,eAAkB,EAAE,OAAO,QAAQ,CAAC;AAC7C;","names":["issueChallenge"]}
package/dist/by/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  isQuorum,
3
3
  runDrainBarrier
4
- } from "../chunk-DIZLQVAA.js";
5
- import "../chunk-37EPTBBR.js";
4
+ } from "../chunk-UNSQZSZP.js";
5
+ import "../chunk-VSUQI5Q6.js";
6
6
  export {
7
7
  isQuorum,
8
8
  runDrainBarrier
@@ -29,7 +29,7 @@ export type CapsuleKeyPair = CryptoKeyPair;
29
29
  * suite from the package name, which is what makes the prefix a trust posture
30
30
  * rather than a naming convention.
31
31
  */
32
- export type CapsuleGroup = 'authenticate' | 'seal' | 'cipher' | 'digest' | 'sign' | 'codec' | 'sealing' | 'deterministic' | 'classify';
32
+ export type CapsuleGroup = 'authenticate' | 'seal' | 'cipher' | 'digest' | 'sign' | 'codec' | 'sealing' | 'deterministic' | 'classify' | 'per-record-keys';
33
33
  /**
34
34
  * Thrown at `createNoydb()` when a service needs a group the bound capsule
35
35
  * does not support.