@noy-db/hub 0.10.0-pre.1 → 0.10.0-pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/dist/api-QSEKT4KS.js +15 -0
  3. package/dist/as/index.js +19 -12
  4. package/dist/as/index.js.map +1 -1
  5. package/dist/at/index.js +6 -9
  6. package/dist/attestation/index.js +16 -19
  7. package/dist/attestation/index.js.map +1 -1
  8. package/dist/{backup-6EKBNC67.js → backup-BHKVK5SD.js} +9 -12
  9. package/dist/{backup-6EKBNC67.js.map → backup-BHKVK5SD.js.map} +1 -1
  10. package/dist/blobs/index.js +10 -13
  11. package/dist/blobs/index.js.map +1 -1
  12. package/dist/broker/index.js +11 -14
  13. package/dist/broker/index.js.map +1 -1
  14. package/dist/by/index.js +2 -2
  15. package/dist/capsule/contract.d.ts +176 -16
  16. package/dist/capsule/contract.js +35 -30
  17. package/dist/capsule/enclave-aes/bound.d.ts +11 -1
  18. package/dist/capsule/enclave-aes/classify/digest.d.ts +4 -2
  19. package/dist/capsule/enclave-aes/index.d.ts +9 -0
  20. package/dist/capsule/enclave-aes/index.js +643 -78
  21. package/dist/capsule/enclave-aes/index.js.map +1 -1
  22. package/dist/capsule/enclave-aes/primitives.d.ts +2 -2
  23. package/dist/capsule/index.d.ts +1 -1
  24. package/dist/capsule/plumbing/classify-reveal.d.ts +29 -0
  25. package/dist/capsule/plumbing/classify-verify.d.ts +53 -0
  26. package/dist/capsule/plumbing/index.d.ts +17 -0
  27. package/dist/{capsule-QJJFUUSH.js → capsule-YAITMH77.js} +16 -9
  28. package/dist/cargo/index.js +34 -36
  29. package/dist/{chunk-J57OMNJ4.js → chunk-23A4SBRR.js} +3 -4
  30. package/dist/{chunk-J57OMNJ4.js.map → chunk-23A4SBRR.js.map} +1 -1
  31. package/dist/{chunk-E3CUGBGW.js → chunk-24AGG4PP.js} +3 -3
  32. package/dist/{chunk-M2VLXPRU.js → chunk-24IJZA4M.js} +14 -8
  33. package/dist/chunk-24IJZA4M.js.map +1 -0
  34. package/dist/{chunk-BCJAUHSG.js → chunk-2NVQ5SEA.js} +15 -5
  35. package/dist/chunk-2NVQ5SEA.js.map +1 -0
  36. package/dist/{chunk-MRVQKRXI.js → chunk-2SIREKBR.js} +2 -2
  37. package/dist/{chunk-CE443VXM.js → chunk-37FOG6AE.js} +14 -7
  38. package/dist/chunk-37FOG6AE.js.map +1 -0
  39. package/dist/{chunk-ZZZVNHN2.js → chunk-3M2KK7O7.js} +3 -3
  40. package/dist/{chunk-P6FATPXQ.js → chunk-3ZCVY3T6.js} +2 -2
  41. package/dist/{chunk-I7NDTNHK.js → chunk-4CGWLHPQ.js} +6 -6
  42. package/dist/{chunk-PVQIME6P.js → chunk-56Z4NOC6.js} +3 -3
  43. package/dist/{chunk-XBG6YJPK.js → chunk-5AVIUJP4.js} +11 -9
  44. package/dist/{chunk-XBG6YJPK.js.map → chunk-5AVIUJP4.js.map} +1 -1
  45. package/dist/{chunk-HQFTE3DX.js → chunk-5BGHAVBN.js} +2 -2
  46. package/dist/{chunk-QHG7GQKM.js → chunk-5JNEDW7I.js} +2 -2
  47. package/dist/{chunk-NC6CF37L.js → chunk-5OWJSDTO.js} +4 -4
  48. package/dist/{chunk-NC6CF37L.js.map → chunk-5OWJSDTO.js.map} +1 -1
  49. package/dist/{chunk-YAYDDYRU.js → chunk-5Y4MO7UQ.js} +4 -4
  50. package/dist/{chunk-TLIFNRU5.js → chunk-63LZLRWG.js} +2 -2
  51. package/dist/{chunk-BUFFPAR2.js → chunk-74W56QPY.js} +4 -4
  52. package/dist/{chunk-VPG2UJYR.js → chunk-7KNYLHVX.js} +3 -3
  53. package/dist/chunk-7KNYLHVX.js.map +1 -0
  54. package/dist/{chunk-LFUID7OW.js → chunk-7VJ2SIEI.js} +42 -22
  55. package/dist/chunk-7VJ2SIEI.js.map +1 -0
  56. package/dist/{chunk-U2N7DH4S.js → chunk-AHA7UALU.js} +4 -4
  57. package/dist/{chunk-NB2DYYZL.js → chunk-AIHBYQHF.js} +254 -118
  58. package/dist/chunk-AIHBYQHF.js.map +1 -0
  59. package/dist/{chunk-RNQ7V4LH.js → chunk-ANYX2M6P.js} +3 -3
  60. package/dist/{chunk-VFGLMRO2.js → chunk-ATKYMRBC.js} +4 -4
  61. package/dist/{chunk-7UHLO4ZN.js → chunk-B2HU55QD.js} +2 -2
  62. package/dist/{chunk-RKOXA5GZ.js → chunk-BEKMLYQ4.js} +4 -4
  63. package/dist/{chunk-AYUMAPOS.js → chunk-BPFXD4EX.js} +23 -3
  64. package/dist/chunk-BPFXD4EX.js.map +1 -0
  65. package/dist/{chunk-R4PDYYK5.js → chunk-C2NXAR3D.js} +5 -5
  66. package/dist/{chunk-XBOGGTUJ.js → chunk-CJBWJO5P.js} +6 -6
  67. package/dist/{chunk-XBOGGTUJ.js.map → chunk-CJBWJO5P.js.map} +1 -1
  68. package/dist/{chunk-44CU4N7N.js → chunk-CQLMRCKX.js} +2 -2
  69. package/dist/{chunk-VUBRHJ4H.js → chunk-CR5UPYIJ.js} +1 -1
  70. package/dist/chunk-CR5UPYIJ.js.map +1 -0
  71. package/dist/{chunk-4XXRPSPS.js → chunk-DS2JXSUA.js} +6 -6
  72. package/dist/{chunk-X6Z2SIRF.js → chunk-E2JIE4S3.js} +2 -2
  73. package/dist/{chunk-EQ6C2ZPT.js → chunk-E7Y4J4GL.js} +2 -2
  74. package/dist/{chunk-ZMDSBTFT.js → chunk-ECDM6YRX.js} +2 -2
  75. package/dist/{chunk-WRLWEYHY.js → chunk-EFINFZIF.js} +11 -1
  76. package/dist/chunk-EFINFZIF.js.map +1 -0
  77. package/dist/{chunk-JM72WDAY.js → chunk-EM56MHN5.js} +6 -6
  78. package/dist/{chunk-YWJMM2WY.js → chunk-EQXOJH6O.js} +4 -4
  79. package/dist/{chunk-ME6LY5UG.js → chunk-ET3U2C3A.js} +2 -2
  80. package/dist/{chunk-G2KLVCKO.js → chunk-EU4G7PQH.js} +2 -2
  81. package/dist/{chunk-WJXLTO43.js → chunk-EUCUYK5E.js} +10 -10
  82. package/dist/{chunk-EPMX3SCC.js → chunk-EWSIJDWO.js} +4 -4
  83. package/dist/{chunk-KFYUQMF5.js → chunk-F2FD4LSB.js} +2 -2
  84. package/dist/{chunk-L4UL4IAR.js → chunk-F7ENMZYJ.js} +2 -2
  85. package/dist/{chunk-5OG7YQX5.js → chunk-FIIVYQOW.js} +5 -5
  86. package/dist/{chunk-4RF7DVH2.js → chunk-FPK2LPLR.js} +8 -8
  87. package/dist/chunk-FPK2LPLR.js.map +1 -0
  88. package/dist/{chunk-2EF2Z4UN.js → chunk-FQEUJGBV.js} +2 -2
  89. package/dist/{chunk-UORWAG7K.js → chunk-FY4FFNKK.js} +2 -2
  90. package/dist/{chunk-WA4ZPMKP.js → chunk-GDCYZGPB.js} +2 -2
  91. package/dist/{chunk-3HDBDUX2.js → chunk-H6Q7GKLI.js} +2 -2
  92. package/dist/{chunk-654RE5YC.js → chunk-HDAPQF6Q.js} +3 -3
  93. package/dist/{chunk-B5PWQMZN.js → chunk-HRLMUZLI.js} +5 -5
  94. package/dist/{chunk-QWC2PRUR.js → chunk-HRNQYGLQ.js} +2 -2
  95. package/dist/{chunk-YIVAKBCW.js → chunk-I4S7IZSS.js} +321 -235
  96. package/dist/chunk-I4S7IZSS.js.map +1 -0
  97. package/dist/{chunk-7DWAYY45.js → chunk-IN4XZJYD.js} +4 -3
  98. package/dist/{chunk-7DWAYY45.js.map → chunk-IN4XZJYD.js.map} +1 -1
  99. package/dist/{chunk-JGYCKX56.js → chunk-ISIXU45J.js} +1 -1
  100. package/dist/{chunk-JGYCKX56.js.map → chunk-ISIXU45J.js.map} +1 -1
  101. package/dist/{chunk-7PFOKQOJ.js → chunk-J4L4AS2W.js} +2 -2
  102. package/dist/{chunk-PZZWAHEJ.js → chunk-JPSOFWJR.js} +2 -2
  103. package/dist/{chunk-B24ODIKE.js → chunk-JRCO67NG.js} +2 -2
  104. package/dist/{chunk-PNEBCVXP.js → chunk-JW3I3NNZ.js} +2 -2
  105. package/dist/{chunk-MXNYMFHE.js → chunk-JZMPSQBH.js} +4 -4
  106. package/dist/{chunk-IIQMNZXT.js → chunk-K5TVSOPQ.js} +5 -5
  107. package/dist/{chunk-ZPXCQNXJ.js → chunk-K75SL74I.js} +2 -2
  108. package/dist/{chunk-TA5VTIC4.js → chunk-KA4AAUST.js} +2 -2
  109. package/dist/chunk-KHSBMLQE.js +161 -0
  110. package/dist/chunk-KHSBMLQE.js.map +1 -0
  111. package/dist/{chunk-JWLVBYP4.js → chunk-KUGUML7H.js} +3 -3
  112. package/dist/{chunk-GWYZEPBY.js → chunk-L4J5NC2Q.js} +2 -2
  113. package/dist/{chunk-PIF3TNU2.js → chunk-LIX4QPMM.js} +2 -2
  114. package/dist/{chunk-LCY6ANV2.js → chunk-LWQFGR34.js} +3 -3
  115. package/dist/{chunk-HQPS27BT.js → chunk-MMSSHMHW.js} +2 -2
  116. package/dist/{chunk-T5EXREMW.js → chunk-N25Z6PR4.js} +6 -5
  117. package/dist/chunk-N25Z6PR4.js.map +1 -0
  118. package/dist/{chunk-ND6S2DKC.js → chunk-N5S2BCW3.js} +2 -2
  119. package/dist/{chunk-63INIVE4.js → chunk-NIZH2TYZ.js} +2 -2
  120. package/dist/{chunk-WQHEEYQA.js → chunk-NLDBQHDV.js} +2 -2
  121. package/dist/{chunk-SKSHWV3E.js → chunk-NQQ4MOPC.js} +4 -4
  122. package/dist/{chunk-B6EWMGFX.js → chunk-NUBI6PYH.js} +2 -2
  123. package/dist/{chunk-VWUSOPBF.js → chunk-NYEXUZDW.js} +4 -4
  124. package/dist/{chunk-GU6QXHPZ.js → chunk-OIBFIWVJ.js} +4 -4
  125. package/dist/chunk-OIBFIWVJ.js.map +1 -0
  126. package/dist/{chunk-PIEX7WSG.js → chunk-OOLF5FU2.js} +2 -2
  127. package/dist/{chunk-HOK5KGBO.js → chunk-OQA7UF2Q.js} +3 -3
  128. package/dist/{chunk-JMMG7UWR.js → chunk-ORJPICJI.js} +2 -2
  129. package/dist/{chunk-IF2M43G4.js → chunk-PBRD75JF.js} +2 -2
  130. package/dist/{chunk-X7Q2XL5U.js → chunk-PDCBL23X.js} +39 -17
  131. package/dist/chunk-PDCBL23X.js.map +1 -0
  132. package/dist/{chunk-PR2R57YF.js → chunk-PR36DD2X.js} +7 -7
  133. package/dist/{chunk-LFCX2JAV.js → chunk-PV4HIC4E.js} +2 -2
  134. package/dist/{chunk-SKF3DF7M.js → chunk-PZNK4HTV.js} +3 -3
  135. package/dist/{chunk-5F3KYRG6.js → chunk-QBLPLNPE.js} +3 -3
  136. package/dist/{chunk-4ZRNXWF6.js → chunk-QZXUISRF.js} +5 -5
  137. package/dist/{chunk-7Q72NTBE.js → chunk-RBXYO7MD.js} +5 -5
  138. package/dist/{chunk-S2BQV6HM.js → chunk-RIACRFWA.js} +4 -4
  139. package/dist/{chunk-DO33YCSZ.js → chunk-RL6RNDJQ.js} +8 -8
  140. package/dist/{chunk-2SPWVX6W.js → chunk-SJ2P7UXD.js} +7 -7
  141. package/dist/{chunk-26FMWFAW.js → chunk-SWXS4LV3.js} +11 -11
  142. package/dist/{chunk-J3ECXFU7.js → chunk-TOTCZFRF.js} +2 -2
  143. package/dist/{chunk-AN4GUUQM.js → chunk-TT4D52EK.js} +6 -6
  144. package/dist/{chunk-KOJHCSGS.js → chunk-U7CMJY5P.js} +10 -10
  145. package/dist/{chunk-DDR6SCG7.js → chunk-UNKTZDA2.js} +11 -11
  146. package/dist/{chunk-DDR6SCG7.js.map → chunk-UNKTZDA2.js.map} +1 -1
  147. package/dist/{chunk-WVML7HUZ.js → chunk-UXH4AKH3.js} +95 -151
  148. package/dist/chunk-UXH4AKH3.js.map +1 -0
  149. package/dist/{chunk-MKQHIYUY.js → chunk-UZVHSYIF.js} +2 -2
  150. package/dist/{chunk-FDGE56FS.js → chunk-VHKAW5OI.js} +29 -5
  151. package/dist/chunk-VHKAW5OI.js.map +1 -0
  152. package/dist/{chunk-OCSKQUNE.js → chunk-VKZ3TDET.js} +3 -3
  153. package/dist/{chunk-ESDYDGPH.js → chunk-VLZPUG5A.js} +4 -4
  154. package/dist/{chunk-PCYIDPFM.js → chunk-VSN5FLMI.js} +2 -2
  155. package/dist/{chunk-S4QDN4IQ.js → chunk-VYBBE7RN.js} +5 -5
  156. package/dist/{chunk-XBFJRCRW.js → chunk-WHK4JVKF.js} +8 -8
  157. package/dist/{chunk-CZEWEOOV.js → chunk-X4LDBALX.js} +2 -2
  158. package/dist/{chunk-YWEPWJRG.js → chunk-X67E7NIJ.js} +3 -3
  159. package/dist/{chunk-RRI3JBD6.js → chunk-XMARKBUC.js} +3 -3
  160. package/dist/{chunk-B3B6HV5S.js → chunk-XMBBTETD.js} +2 -2
  161. package/dist/{chunk-GQ4MF3CM.js → chunk-XMBTAN5E.js} +28 -14
  162. package/dist/chunk-XMBTAN5E.js.map +1 -0
  163. package/dist/{chunk-GEICXZCQ.js → chunk-XROQP6IQ.js} +4 -4
  164. package/dist/chunk-XWWDZKLS.js +196 -0
  165. package/dist/chunk-XWWDZKLS.js.map +1 -0
  166. package/dist/{chunk-VX72USUQ.js → chunk-Y2RYUWSQ.js} +10 -10
  167. package/dist/{chunk-6I5RRBPP.js → chunk-YCTSQV7K.js} +5 -5
  168. package/dist/{chunk-7WV6R7RG.js → chunk-YF7P2DG7.js} +2 -2
  169. package/dist/{chunk-ZZLIFVZG.js → chunk-ZG7DBIVX.js} +2 -2
  170. package/dist/{chunk-Y6WJJRVV.js → chunk-ZGJ775X7.js} +2 -2
  171. package/dist/{chunk-PQGCWTTI.js → chunk-ZQQLOEWN.js} +3 -3
  172. package/dist/classified/index.js +5 -5
  173. package/dist/{classified-marker-LY7KQFPH.js → classified-marker-HKMRC7SC.js} +3 -3
  174. package/dist/{reveal-LK3GX4L6.js → classify-reveal-YSJKJEIR.js} +7 -12
  175. package/dist/classify-reveal-YSJKJEIR.js.map +1 -0
  176. package/dist/{verify-FT5COLP2.js → classify-verify-ZCTKYQ43.js} +31 -41
  177. package/dist/classify-verify-ZCTKYQ43.js.map +1 -0
  178. package/dist/collection-facade-PPKNUR2J.js +38 -0
  179. package/dist/{computed-XG7LFB7A.js → computed-UCYVPMZA.js} +3 -3
  180. package/dist/consent/index.js +6 -9
  181. package/dist/consent/index.js.map +1 -1
  182. package/dist/cover/index.js +6 -9
  183. package/dist/custody/index.js +11 -13
  184. package/dist/{dead-filter-F4EKHDQY.js → dead-filter-YOBWRG4O.js} +8 -11
  185. package/dist/{dead-filter-F4EKHDQY.js.map → dead-filter-YOBWRG4O.js.map} +1 -1
  186. package/dist/debug/index.js +5 -8
  187. package/dist/debug/index.js.map +1 -1
  188. package/dist/delegation-SNALWRMO.js +24 -0
  189. package/dist/derivations/index.js +20 -23
  190. package/dist/derive-4GNU4E4I.js +17 -0
  191. package/dist/directory/index.js +7 -10
  192. package/dist/{dispatch-YNHZLB72.js → dispatch-QW32QBLW.js} +17 -20
  193. package/dist/{dispatch-YNHZLB72.js.map → dispatch-QW32QBLW.js.map} +1 -1
  194. package/dist/{dispatch-URNW4Q2T.js → dispatch-V5WLDTVX.js} +5 -5
  195. package/dist/executor-7QN22OKI.js +8 -0
  196. package/dist/executor-BJZJNVBB.js +8 -0
  197. package/dist/executor-JEAAEJUM.js +32 -0
  198. package/dist/export-accessible-TVO2KQPG.js +20 -0
  199. package/dist/extract-partition-43CLDRN4.js +33 -0
  200. package/dist/{fanout-sidecar-6CSMTIVB.js → fanout-sidecar-DDONAFJT.js} +6 -9
  201. package/dist/{fanout-sidecar-6CSMTIVB.js.map → fanout-sidecar-DDONAFJT.js.map} +1 -1
  202. package/dist/forget/index.js +6 -9
  203. package/dist/forget/index.js.map +1 -1
  204. package/dist/guards/index.js +4 -4
  205. package/dist/history/index.js +11 -14
  206. package/dist/history/index.js.map +1 -1
  207. package/dist/i18n/index.js +11 -14
  208. package/dist/i18n/index.js.map +1 -1
  209. package/dist/index.d.ts +2 -2
  210. package/dist/index.js +122 -123
  211. package/dist/index.js.map +1 -1
  212. package/dist/indexing/index.js +5 -5
  213. package/dist/introspection/index.js +8 -11
  214. package/dist/issue-EIHEDAXM.js +16 -0
  215. package/dist/kernel/capsule-requirements.d.ts +84 -0
  216. package/dist/kernel/errors.d.ts +15 -0
  217. package/dist/kernel/export-scope.d.ts +28 -1
  218. package/dist/kernel/store-segment-guard.d.ts +29 -0
  219. package/dist/kernel/types.d.ts +164 -8
  220. package/dist/kernel/validation.d.ts +32 -0
  221. package/dist/kernel/vault.d.ts +3 -3
  222. package/dist/{ledger-FV6NFTOR.js → ledger-BMVUFQ3R.js} +8 -11
  223. package/dist/liberate-7KHXCLNJ.js +23 -0
  224. package/dist/link-set-PC2EJRKL.js +26 -0
  225. package/dist/{managed-secret-PBJZHPQO.js → managed-secret-RPRVEYZA.js} +7 -10
  226. package/dist/materialized-views/index.js +23 -26
  227. package/dist/{migrate-cek-J634S4NU.js → migrate-cek-DTSCWGEF.js} +2 -2
  228. package/dist/money/index.js +5 -5
  229. package/dist/noydb-AYDNOXAX.js +98 -0
  230. package/dist/on/index.js +11 -13
  231. package/dist/overlay-views/index.js +4 -4
  232. package/dist/periods/index.js +9 -12
  233. package/dist/pod/index.js +65 -67
  234. package/dist/{pod-handle-IOEYUDCA.js → pod-handle-KBPQRN6Q.js} +6 -9
  235. package/dist/{pod-handle-IOEYUDCA.js.map → pod-handle-KBPQRN6Q.js.map} +1 -1
  236. package/dist/policy/index.js +7 -10
  237. package/dist/port/at/index.d.ts +1 -0
  238. package/dist/port/with/collection-registries.d.ts +37 -0
  239. package/dist/portability/index.js +8 -8
  240. package/dist/{post-register-L42VXYFB.js → post-register-RITSNASO.js} +6 -6
  241. package/dist/query/all/index.js +15 -15
  242. package/dist/query/index.js +7 -7
  243. package/dist/query/live/index.js +7 -7
  244. package/dist/query/reduce/index.js +10 -10
  245. package/dist/query/relate/index.js +9 -9
  246. package/dist/reduce/index.js +8 -8
  247. package/dist/register-BB34SK7E.js +27 -0
  248. package/dist/registry-65L6V5TO.js +20 -0
  249. package/dist/registry-HU62GPWA.js +32 -0
  250. package/dist/registry-SMNK6UM4.js +8 -0
  251. package/dist/registry-X5VPBKCO.js +8 -0
  252. package/dist/request-withdrawal-4SKAH46W.js +26 -0
  253. package/dist/{restore-to-ZQ2MXOFO.js → restore-to-VQHT67OH.js} +7 -10
  254. package/dist/{restore-to-ZQ2MXOFO.js.map → restore-to-VQHT67OH.js.map} +1 -1
  255. package/dist/revoke-IF5PX2JY.js +21 -0
  256. package/dist/satellites/index.js +1 -1
  257. package/dist/schema-update/index.js +2 -2
  258. package/dist/sealed-record/index.js +9 -12
  259. package/dist/sealed-record/index.js.map +1 -1
  260. package/dist/search/index.js +4 -4
  261. package/dist/{seed-XHQQF6LJ.js → seed-F2OSDZJR.js} +11 -13
  262. package/dist/{seed-XHQQF6LJ.js.map → seed-F2OSDZJR.js.map} +1 -1
  263. package/dist/sequence/index.js +6 -9
  264. package/dist/session/index.js +6 -9
  265. package/dist/session/index.js.map +1 -1
  266. package/dist/shadow/index.js +2 -2
  267. package/dist/signer-5P7IZC2K.js +20 -0
  268. package/dist/snapshots/index.js +8 -10
  269. package/dist/snapshots/index.js.map +1 -1
  270. package/dist/{stale-XY2QUSGU.js → stale-PUCZH5GJ.js} +7 -10
  271. package/dist/storage-5EGY5OYE.js +18 -0
  272. package/dist/store/index.js +1 -1
  273. package/dist/{store-coordination-provider-F7YG22D3.js → store-coordination-provider-SEQM7SHJ.js} +7 -10
  274. package/dist/{store-coordination-provider-F7YG22D3.js.map → store-coordination-provider-SEQM7SHJ.js.map} +1 -1
  275. package/dist/sync/index.js +13 -15
  276. package/dist/sync/index.js.map +1 -1
  277. package/dist/team/index.js +14 -16
  278. package/dist/tiers/index.js +8 -11
  279. package/dist/to/index.js +2 -2
  280. package/dist/transactions/index.js +3 -3
  281. package/dist/util/index.js +1 -1
  282. package/dist/vault-diff-H7LT5ZBJ.js +8 -0
  283. package/dist/vault-head/index.js +5 -8
  284. package/dist/vault-head/index.js.map +1 -1
  285. package/dist/walk-Z4N7PCZ2.js +17 -0
  286. package/dist/with-audit/portability/export-accessible.d.ts +3 -1
  287. package/dist/with-cargo/vault-diff.d.ts +28 -0
  288. package/dist/with-commit/sequence/index.d.ts +22 -0
  289. package/dist/with-party/team/keyring.d.ts +77 -0
  290. package/dist/with-party/team/managed-secret.d.ts +40 -3
  291. package/dist/with-shape/manifest/storage.d.ts +2 -2
  292. package/dist/with-shape/manifest/writer.d.ts +2 -2
  293. package/dist/with-store/store-middleware.d.ts +18 -5
  294. package/dist/withdraw-accessible-CRCIQSTL.js +23 -0
  295. package/package.json +3 -3
  296. package/dist/api-ARU35MCC.js +0 -18
  297. package/dist/capsule/enclave-aes/classify/reveal.d.ts +0 -10
  298. package/dist/capsule/enclave-aes/classify/verify.d.ts +0 -36
  299. package/dist/chunk-4RF7DVH2.js.map +0 -1
  300. package/dist/chunk-6B4X447I.js +0 -40
  301. package/dist/chunk-6B4X447I.js.map +0 -1
  302. package/dist/chunk-6Y3UJT5H.js +0 -157
  303. package/dist/chunk-6Y3UJT5H.js.map +0 -1
  304. package/dist/chunk-AYUMAPOS.js.map +0 -1
  305. package/dist/chunk-BCJAUHSG.js.map +0 -1
  306. package/dist/chunk-CE443VXM.js.map +0 -1
  307. package/dist/chunk-FDGE56FS.js.map +0 -1
  308. package/dist/chunk-GLSRKIU3.js +0 -591
  309. package/dist/chunk-GLSRKIU3.js.map +0 -1
  310. package/dist/chunk-GQ4MF3CM.js.map +0 -1
  311. package/dist/chunk-GU6QXHPZ.js.map +0 -1
  312. package/dist/chunk-LFUID7OW.js.map +0 -1
  313. package/dist/chunk-M2VLXPRU.js.map +0 -1
  314. package/dist/chunk-NB2DYYZL.js.map +0 -1
  315. package/dist/chunk-NH2UOV3B.js +0 -18
  316. package/dist/chunk-NH2UOV3B.js.map +0 -1
  317. package/dist/chunk-OJAFKGI7.js +0 -27
  318. package/dist/chunk-OJAFKGI7.js.map +0 -1
  319. package/dist/chunk-PVBKEBJU.js +0 -22
  320. package/dist/chunk-PVBKEBJU.js.map +0 -1
  321. package/dist/chunk-RQLCOSEJ.js +0 -78
  322. package/dist/chunk-RQLCOSEJ.js.map +0 -1
  323. package/dist/chunk-T5EXREMW.js.map +0 -1
  324. package/dist/chunk-VPG2UJYR.js.map +0 -1
  325. package/dist/chunk-VUBRHJ4H.js.map +0 -1
  326. package/dist/chunk-WRLWEYHY.js.map +0 -1
  327. package/dist/chunk-WVML7HUZ.js.map +0 -1
  328. package/dist/chunk-X7Q2XL5U.js.map +0 -1
  329. package/dist/chunk-YIVAKBCW.js.map +0 -1
  330. package/dist/collection-facade-SETOHJ3R.js +0 -41
  331. package/dist/delegation-JIQCMKW6.js +0 -26
  332. package/dist/derive-45KCFFOS.js +0 -20
  333. package/dist/executor-BVVZ5UHG.js +0 -8
  334. package/dist/executor-R25UN3FA.js +0 -8
  335. package/dist/executor-SIYBLT3P.js +0 -35
  336. package/dist/export-accessible-P672FZEJ.js +0 -22
  337. package/dist/extract-partition-DQ3FVL6H.js +0 -35
  338. package/dist/find-HHF2HBAC.js +0 -10
  339. package/dist/issue-NPLQHB3S.js +0 -19
  340. package/dist/liberate-A7WASOCG.js +0 -25
  341. package/dist/link-set-UMRSGMQ5.js +0 -29
  342. package/dist/noydb-V23UJKHT.js +0 -100
  343. package/dist/register-2VINJWYJ.js +0 -30
  344. package/dist/registry-3VLHDUID.js +0 -8
  345. package/dist/registry-6HVHDR3P.js +0 -35
  346. package/dist/registry-V4FQUMYP.js +0 -23
  347. package/dist/registry-Z2E6ZCPM.js +0 -8
  348. package/dist/request-withdrawal-PSIHKQP4.js +0 -28
  349. package/dist/reveal-LK3GX4L6.js.map +0 -1
  350. package/dist/revoke-2NYMID63.js +0 -24
  351. package/dist/signer-CP6XZLE3.js +0 -23
  352. package/dist/storage-QTM6JYQF.js +0 -21
  353. package/dist/vault-diff-C6WUJFNP.js +0 -8
  354. package/dist/verify-FT5COLP2.js.map +0 -1
  355. package/dist/walk-52FW6EKP.js +0 -20
  356. package/dist/withdraw-accessible-IVMKJGEN.js +0 -25
  357. package/dist/withdraw-accessible-IVMKJGEN.js.map +0 -1
  358. /package/dist/{api-ARU35MCC.js.map → api-QSEKT4KS.js.map} +0 -0
  359. /package/dist/{capsule-QJJFUUSH.js.map → capsule-YAITMH77.js.map} +0 -0
  360. /package/dist/{chunk-E3CUGBGW.js.map → chunk-24AGG4PP.js.map} +0 -0
  361. /package/dist/{chunk-MRVQKRXI.js.map → chunk-2SIREKBR.js.map} +0 -0
  362. /package/dist/{chunk-ZZZVNHN2.js.map → chunk-3M2KK7O7.js.map} +0 -0
  363. /package/dist/{chunk-P6FATPXQ.js.map → chunk-3ZCVY3T6.js.map} +0 -0
  364. /package/dist/{chunk-I7NDTNHK.js.map → chunk-4CGWLHPQ.js.map} +0 -0
  365. /package/dist/{chunk-PVQIME6P.js.map → chunk-56Z4NOC6.js.map} +0 -0
  366. /package/dist/{chunk-HQFTE3DX.js.map → chunk-5BGHAVBN.js.map} +0 -0
  367. /package/dist/{chunk-QHG7GQKM.js.map → chunk-5JNEDW7I.js.map} +0 -0
  368. /package/dist/{chunk-YAYDDYRU.js.map → chunk-5Y4MO7UQ.js.map} +0 -0
  369. /package/dist/{chunk-TLIFNRU5.js.map → chunk-63LZLRWG.js.map} +0 -0
  370. /package/dist/{chunk-BUFFPAR2.js.map → chunk-74W56QPY.js.map} +0 -0
  371. /package/dist/{chunk-U2N7DH4S.js.map → chunk-AHA7UALU.js.map} +0 -0
  372. /package/dist/{chunk-RNQ7V4LH.js.map → chunk-ANYX2M6P.js.map} +0 -0
  373. /package/dist/{chunk-VFGLMRO2.js.map → chunk-ATKYMRBC.js.map} +0 -0
  374. /package/dist/{chunk-7UHLO4ZN.js.map → chunk-B2HU55QD.js.map} +0 -0
  375. /package/dist/{chunk-RKOXA5GZ.js.map → chunk-BEKMLYQ4.js.map} +0 -0
  376. /package/dist/{chunk-R4PDYYK5.js.map → chunk-C2NXAR3D.js.map} +0 -0
  377. /package/dist/{chunk-44CU4N7N.js.map → chunk-CQLMRCKX.js.map} +0 -0
  378. /package/dist/{chunk-4XXRPSPS.js.map → chunk-DS2JXSUA.js.map} +0 -0
  379. /package/dist/{chunk-X6Z2SIRF.js.map → chunk-E2JIE4S3.js.map} +0 -0
  380. /package/dist/{chunk-EQ6C2ZPT.js.map → chunk-E7Y4J4GL.js.map} +0 -0
  381. /package/dist/{chunk-ZMDSBTFT.js.map → chunk-ECDM6YRX.js.map} +0 -0
  382. /package/dist/{chunk-JM72WDAY.js.map → chunk-EM56MHN5.js.map} +0 -0
  383. /package/dist/{chunk-YWJMM2WY.js.map → chunk-EQXOJH6O.js.map} +0 -0
  384. /package/dist/{chunk-ME6LY5UG.js.map → chunk-ET3U2C3A.js.map} +0 -0
  385. /package/dist/{chunk-G2KLVCKO.js.map → chunk-EU4G7PQH.js.map} +0 -0
  386. /package/dist/{chunk-WJXLTO43.js.map → chunk-EUCUYK5E.js.map} +0 -0
  387. /package/dist/{chunk-EPMX3SCC.js.map → chunk-EWSIJDWO.js.map} +0 -0
  388. /package/dist/{chunk-KFYUQMF5.js.map → chunk-F2FD4LSB.js.map} +0 -0
  389. /package/dist/{chunk-L4UL4IAR.js.map → chunk-F7ENMZYJ.js.map} +0 -0
  390. /package/dist/{chunk-5OG7YQX5.js.map → chunk-FIIVYQOW.js.map} +0 -0
  391. /package/dist/{chunk-2EF2Z4UN.js.map → chunk-FQEUJGBV.js.map} +0 -0
  392. /package/dist/{chunk-UORWAG7K.js.map → chunk-FY4FFNKK.js.map} +0 -0
  393. /package/dist/{chunk-WA4ZPMKP.js.map → chunk-GDCYZGPB.js.map} +0 -0
  394. /package/dist/{chunk-3HDBDUX2.js.map → chunk-H6Q7GKLI.js.map} +0 -0
  395. /package/dist/{chunk-654RE5YC.js.map → chunk-HDAPQF6Q.js.map} +0 -0
  396. /package/dist/{chunk-B5PWQMZN.js.map → chunk-HRLMUZLI.js.map} +0 -0
  397. /package/dist/{chunk-QWC2PRUR.js.map → chunk-HRNQYGLQ.js.map} +0 -0
  398. /package/dist/{chunk-7PFOKQOJ.js.map → chunk-J4L4AS2W.js.map} +0 -0
  399. /package/dist/{chunk-PZZWAHEJ.js.map → chunk-JPSOFWJR.js.map} +0 -0
  400. /package/dist/{chunk-B24ODIKE.js.map → chunk-JRCO67NG.js.map} +0 -0
  401. /package/dist/{chunk-PNEBCVXP.js.map → chunk-JW3I3NNZ.js.map} +0 -0
  402. /package/dist/{chunk-MXNYMFHE.js.map → chunk-JZMPSQBH.js.map} +0 -0
  403. /package/dist/{chunk-IIQMNZXT.js.map → chunk-K5TVSOPQ.js.map} +0 -0
  404. /package/dist/{chunk-ZPXCQNXJ.js.map → chunk-K75SL74I.js.map} +0 -0
  405. /package/dist/{chunk-TA5VTIC4.js.map → chunk-KA4AAUST.js.map} +0 -0
  406. /package/dist/{chunk-JWLVBYP4.js.map → chunk-KUGUML7H.js.map} +0 -0
  407. /package/dist/{chunk-GWYZEPBY.js.map → chunk-L4J5NC2Q.js.map} +0 -0
  408. /package/dist/{chunk-PIF3TNU2.js.map → chunk-LIX4QPMM.js.map} +0 -0
  409. /package/dist/{chunk-LCY6ANV2.js.map → chunk-LWQFGR34.js.map} +0 -0
  410. /package/dist/{chunk-HQPS27BT.js.map → chunk-MMSSHMHW.js.map} +0 -0
  411. /package/dist/{chunk-ND6S2DKC.js.map → chunk-N5S2BCW3.js.map} +0 -0
  412. /package/dist/{chunk-63INIVE4.js.map → chunk-NIZH2TYZ.js.map} +0 -0
  413. /package/dist/{chunk-WQHEEYQA.js.map → chunk-NLDBQHDV.js.map} +0 -0
  414. /package/dist/{chunk-SKSHWV3E.js.map → chunk-NQQ4MOPC.js.map} +0 -0
  415. /package/dist/{chunk-B6EWMGFX.js.map → chunk-NUBI6PYH.js.map} +0 -0
  416. /package/dist/{chunk-VWUSOPBF.js.map → chunk-NYEXUZDW.js.map} +0 -0
  417. /package/dist/{chunk-PIEX7WSG.js.map → chunk-OOLF5FU2.js.map} +0 -0
  418. /package/dist/{chunk-HOK5KGBO.js.map → chunk-OQA7UF2Q.js.map} +0 -0
  419. /package/dist/{chunk-JMMG7UWR.js.map → chunk-ORJPICJI.js.map} +0 -0
  420. /package/dist/{chunk-IF2M43G4.js.map → chunk-PBRD75JF.js.map} +0 -0
  421. /package/dist/{chunk-PR2R57YF.js.map → chunk-PR36DD2X.js.map} +0 -0
  422. /package/dist/{chunk-LFCX2JAV.js.map → chunk-PV4HIC4E.js.map} +0 -0
  423. /package/dist/{chunk-SKF3DF7M.js.map → chunk-PZNK4HTV.js.map} +0 -0
  424. /package/dist/{chunk-5F3KYRG6.js.map → chunk-QBLPLNPE.js.map} +0 -0
  425. /package/dist/{chunk-4ZRNXWF6.js.map → chunk-QZXUISRF.js.map} +0 -0
  426. /package/dist/{chunk-7Q72NTBE.js.map → chunk-RBXYO7MD.js.map} +0 -0
  427. /package/dist/{chunk-S2BQV6HM.js.map → chunk-RIACRFWA.js.map} +0 -0
  428. /package/dist/{chunk-DO33YCSZ.js.map → chunk-RL6RNDJQ.js.map} +0 -0
  429. /package/dist/{chunk-2SPWVX6W.js.map → chunk-SJ2P7UXD.js.map} +0 -0
  430. /package/dist/{chunk-26FMWFAW.js.map → chunk-SWXS4LV3.js.map} +0 -0
  431. /package/dist/{chunk-J3ECXFU7.js.map → chunk-TOTCZFRF.js.map} +0 -0
  432. /package/dist/{chunk-AN4GUUQM.js.map → chunk-TT4D52EK.js.map} +0 -0
  433. /package/dist/{chunk-KOJHCSGS.js.map → chunk-U7CMJY5P.js.map} +0 -0
  434. /package/dist/{chunk-MKQHIYUY.js.map → chunk-UZVHSYIF.js.map} +0 -0
  435. /package/dist/{chunk-OCSKQUNE.js.map → chunk-VKZ3TDET.js.map} +0 -0
  436. /package/dist/{chunk-ESDYDGPH.js.map → chunk-VLZPUG5A.js.map} +0 -0
  437. /package/dist/{chunk-PCYIDPFM.js.map → chunk-VSN5FLMI.js.map} +0 -0
  438. /package/dist/{chunk-S4QDN4IQ.js.map → chunk-VYBBE7RN.js.map} +0 -0
  439. /package/dist/{chunk-XBFJRCRW.js.map → chunk-WHK4JVKF.js.map} +0 -0
  440. /package/dist/{chunk-CZEWEOOV.js.map → chunk-X4LDBALX.js.map} +0 -0
  441. /package/dist/{chunk-YWEPWJRG.js.map → chunk-X67E7NIJ.js.map} +0 -0
  442. /package/dist/{chunk-RRI3JBD6.js.map → chunk-XMARKBUC.js.map} +0 -0
  443. /package/dist/{chunk-B3B6HV5S.js.map → chunk-XMBBTETD.js.map} +0 -0
  444. /package/dist/{chunk-GEICXZCQ.js.map → chunk-XROQP6IQ.js.map} +0 -0
  445. /package/dist/{chunk-VX72USUQ.js.map → chunk-Y2RYUWSQ.js.map} +0 -0
  446. /package/dist/{chunk-6I5RRBPP.js.map → chunk-YCTSQV7K.js.map} +0 -0
  447. /package/dist/{chunk-7WV6R7RG.js.map → chunk-YF7P2DG7.js.map} +0 -0
  448. /package/dist/{chunk-ZZLIFVZG.js.map → chunk-ZG7DBIVX.js.map} +0 -0
  449. /package/dist/{chunk-Y6WJJRVV.js.map → chunk-ZGJ775X7.js.map} +0 -0
  450. /package/dist/{chunk-PQGCWTTI.js.map → chunk-ZQQLOEWN.js.map} +0 -0
  451. /package/dist/{classified-marker-LY7KQFPH.js.map → classified-marker-HKMRC7SC.js.map} +0 -0
  452. /package/dist/{collection-facade-SETOHJ3R.js.map → collection-facade-PPKNUR2J.js.map} +0 -0
  453. /package/dist/{computed-XG7LFB7A.js.map → computed-UCYVPMZA.js.map} +0 -0
  454. /package/dist/{delegation-JIQCMKW6.js.map → delegation-SNALWRMO.js.map} +0 -0
  455. /package/dist/{derive-45KCFFOS.js.map → derive-4GNU4E4I.js.map} +0 -0
  456. /package/dist/{dispatch-URNW4Q2T.js.map → dispatch-V5WLDTVX.js.map} +0 -0
  457. /package/dist/{executor-BVVZ5UHG.js.map → executor-7QN22OKI.js.map} +0 -0
  458. /package/dist/{executor-R25UN3FA.js.map → executor-BJZJNVBB.js.map} +0 -0
  459. /package/dist/{executor-SIYBLT3P.js.map → executor-JEAAEJUM.js.map} +0 -0
  460. /package/dist/{export-accessible-P672FZEJ.js.map → export-accessible-TVO2KQPG.js.map} +0 -0
  461. /package/dist/{extract-partition-DQ3FVL6H.js.map → extract-partition-43CLDRN4.js.map} +0 -0
  462. /package/dist/{find-HHF2HBAC.js.map → issue-EIHEDAXM.js.map} +0 -0
  463. /package/dist/{issue-NPLQHB3S.js.map → ledger-BMVUFQ3R.js.map} +0 -0
  464. /package/dist/{ledger-FV6NFTOR.js.map → liberate-7KHXCLNJ.js.map} +0 -0
  465. /package/dist/{liberate-A7WASOCG.js.map → link-set-PC2EJRKL.js.map} +0 -0
  466. /package/dist/{link-set-UMRSGMQ5.js.map → managed-secret-RPRVEYZA.js.map} +0 -0
  467. /package/dist/{migrate-cek-J634S4NU.js.map → migrate-cek-DTSCWGEF.js.map} +0 -0
  468. /package/dist/{managed-secret-PBJZHPQO.js.map → noydb-AYDNOXAX.js.map} +0 -0
  469. /package/dist/{post-register-L42VXYFB.js.map → post-register-RITSNASO.js.map} +0 -0
  470. /package/dist/{noydb-V23UJKHT.js.map → register-BB34SK7E.js.map} +0 -0
  471. /package/dist/{register-2VINJWYJ.js.map → registry-65L6V5TO.js.map} +0 -0
  472. /package/dist/{registry-3VLHDUID.js.map → registry-HU62GPWA.js.map} +0 -0
  473. /package/dist/{registry-6HVHDR3P.js.map → registry-SMNK6UM4.js.map} +0 -0
  474. /package/dist/{registry-V4FQUMYP.js.map → registry-X5VPBKCO.js.map} +0 -0
  475. /package/dist/{registry-Z2E6ZCPM.js.map → request-withdrawal-4SKAH46W.js.map} +0 -0
  476. /package/dist/{request-withdrawal-PSIHKQP4.js.map → revoke-IF5PX2JY.js.map} +0 -0
  477. /package/dist/{revoke-2NYMID63.js.map → signer-5P7IZC2K.js.map} +0 -0
  478. /package/dist/{signer-CP6XZLE3.js.map → stale-PUCZH5GJ.js.map} +0 -0
  479. /package/dist/{stale-XY2QUSGU.js.map → storage-5EGY5OYE.js.map} +0 -0
  480. /package/dist/{storage-QTM6JYQF.js.map → vault-diff-H7LT5ZBJ.js.map} +0 -0
  481. /package/dist/{vault-diff-C6WUJFNP.js.map → walk-Z4N7PCZ2.js.map} +0 -0
  482. /package/dist/{walk-52FW6EKP.js.map → withdraw-accessible-CRCIQSTL.js.map} +0 -0
@@ -10,7 +10,7 @@ import {
10
10
  createExportBlobsHandle,
11
11
  reportOrphanBlobChunks,
12
12
  runCompaction
13
- } from "../chunk-IIQMNZXT.js";
13
+ } from "../chunk-K5TVSOPQ.js";
14
14
  import {
15
15
  BLOB_CHUNKS_COLLECTION,
16
16
  BLOB_COLLECTION,
@@ -25,20 +25,17 @@ import {
25
25
  detectMimeType,
26
26
  isPreCompressed,
27
27
  memoryBlobPinStore
28
- } from "../chunk-6I5RRBPP.js";
29
- import "../chunk-ZZLIFVZG.js";
30
- import "../chunk-OCSKQUNE.js";
31
- import "../chunk-KFYUQMF5.js";
32
- import "../chunk-WRLWEYHY.js";
33
- import "../chunk-OJAFKGI7.js";
34
- import "../chunk-6B4X447I.js";
35
- import "../chunk-NH2UOV3B.js";
36
- import "../chunk-YIVAKBCW.js";
37
- import "../chunk-6Y3UJT5H.js";
38
- import "../chunk-VUBRHJ4H.js";
28
+ } from "../chunk-YCTSQV7K.js";
29
+ import "../chunk-ZG7DBIVX.js";
30
+ import "../chunk-VKZ3TDET.js";
31
+ import "../chunk-F2FD4LSB.js";
32
+ import "../chunk-EFINFZIF.js";
33
+ import "../chunk-I4S7IZSS.js";
34
+ import "../chunk-XWWDZKLS.js";
35
+ import "../chunk-CR5UPYIJ.js";
39
36
  import {
40
37
  BlobOfflineError
41
- } from "../chunk-JGYCKX56.js";
38
+ } from "../chunk-ISIXU45J.js";
42
39
 
43
40
  // src/via/blob/active.ts
44
41
  function withBlobs(options = {}) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/via/blob/active.ts"],"sourcesContent":["/**\n * Active blob strategy factory. Calling `blobs()` returns a\n * `BlobsStrategy` whose `openSlot` constructs a real `BlobSet` bound\n * to the caller's record. The returned strategy is passed into\n * `createNoydb({ blobsStrategy: blobs() })` to light up the\n * `collection.blob(id)` path.\n *\n * This module is only reachable through the `@noy-db/hub/blobs`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { BlobSet } from '../../with-shape/blobs/blob-set.js'\nimport type { BlobsStrategy } from '../../port/with/blob-strategy.js'\nimport { createBlobPinCache } from '../../with-shape/blobs/blob-pinning.js'\nimport type { BlobPinStore } from '../../with-shape/blobs/blob-pinning.js'\n\n/** Options for {@link withBlobs} (#808). */\nexport interface WithBlobsOptions {\n /**\n * Device-local backend for the offline-pin registry + external side-cache\n * (`collection.blob(id).pin()`, the `cacheBudget` LRU stamps). Default:\n * in-memory — pins then last one app session. Supply a durable,\n * DEVICE-LOCAL store (IndexedDB-backed on the web; it must never sync) to\n * keep pins across restarts. See `BlobPinStore`'s doc for the posture.\n */\n readonly pinStore?: BlobPinStore\n}\n\n/**\n * Build a default `BlobsStrategy` ready to pass into `createNoydb`.\n *\n * Named `withBlobs` (plugin-pattern canonical) rather than `blobs` to\n * avoid shadowing the very common local idiom\n * `const blobs = invoices.blob(id)` in user code.\n *\n * One `withBlobs()` instance owns one device-local pin registry + KPI\n * counter set (#808) — treat it as \"this device's\" blob service.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withBlobs } from '@noy-db/hub/blobs'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * blobsStrategy: withBlobs(),\n * })\n *\n * // Now live — delegates to BlobSet.\n * const vault = await db.openVault('acme')\n * await vault.collection('invoices').blob('inv-1').put('receipt.pdf', bytes)\n * ```\n */\nexport function withBlobs(options: WithBlobsOptions = {}): BlobsStrategy {\n const pinCache = createBlobPinCache(options.pinStore)\n return {\n openSlot(args) {\n return new BlobSet({ ...args, pinCache })\n },\n cacheStats() {\n return { ...pinCache.stats }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDO,SAAS,UAAU,UAA4B,CAAC,GAAkB;AACvE,QAAM,WAAW,mBAAmB,QAAQ,QAAQ;AACpD,SAAO;AAAA,IACL,SAAS,MAAM;AACb,aAAO,IAAI,QAAQ,EAAE,GAAG,MAAM,SAAS,CAAC;AAAA,IAC1C;AAAA,IACA,aAAa;AACX,aAAO,EAAE,GAAG,SAAS,MAAM;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/via/blob/active.ts"],"sourcesContent":["/**\n * Active blob strategy factory. Calling `blobs()` returns a\n * `BlobsStrategy` whose `openSlot` constructs a real `BlobSet` bound\n * to the caller's record. The returned strategy is passed into\n * `createNoydb({ blobsStrategy: blobs() })` to light up the\n * `collection.blob(id)` path.\n *\n * This module is only reachable through the `@noy-db/hub/blobs`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { BlobSet } from '../../with-shape/blobs/blob-set.js'\nimport type { BlobsStrategy } from '../../port/with/blob-strategy.js'\nimport { createBlobPinCache } from '../../with-shape/blobs/blob-pinning.js'\nimport type { BlobPinStore } from '../../with-shape/blobs/blob-pinning.js'\n\n/** Options for {@link withBlobs} (#808). */\nexport interface WithBlobsOptions {\n /**\n * Device-local backend for the offline-pin registry + external side-cache\n * (`collection.blob(id).pin()`, the `cacheBudget` LRU stamps). Default:\n * in-memory — pins then last one app session. Supply a durable,\n * DEVICE-LOCAL store (IndexedDB-backed on the web; it must never sync) to\n * keep pins across restarts. See `BlobPinStore`'s doc for the posture.\n */\n readonly pinStore?: BlobPinStore\n}\n\n/**\n * Build a default `BlobsStrategy` ready to pass into `createNoydb`.\n *\n * Named `withBlobs` (plugin-pattern canonical) rather than `blobs` to\n * avoid shadowing the very common local idiom\n * `const blobs = invoices.blob(id)` in user code.\n *\n * One `withBlobs()` instance owns one device-local pin registry + KPI\n * counter set (#808) — treat it as \"this device's\" blob service.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withBlobs } from '@noy-db/hub/blobs'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * blobsStrategy: withBlobs(),\n * })\n *\n * // Now live — delegates to BlobSet.\n * const vault = await db.openVault('acme')\n * await vault.collection('invoices').blob('inv-1').put('receipt.pdf', bytes)\n * ```\n */\nexport function withBlobs(options: WithBlobsOptions = {}): BlobsStrategy {\n const pinCache = createBlobPinCache(options.pinStore)\n return {\n openSlot(args) {\n return new BlobSet({ ...args, pinCache })\n },\n cacheStats() {\n return { ...pinCache.stats }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDO,SAAS,UAAU,UAA4B,CAAC,GAAkB;AACvE,QAAM,WAAW,mBAAmB,QAAQ,QAAQ;AACpD,SAAO;AAAA,IACL,SAAS,MAAM;AACb,aAAO,IAAI,QAAQ,EAAE,GAAG,MAAM,SAAS,CAAC;AAAA,IAC1C;AAAA,IACA,aAAa;AACX,aAAO,EAAE,GAAG,SAAS,MAAM;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
@@ -1,21 +1,18 @@
1
1
  import {
2
2
  NO_BROKER
3
- } from "../chunk-PNEBCVXP.js";
3
+ } from "../chunk-JW3I3NNZ.js";
4
4
  import {
5
5
  issueChallenge,
6
6
  verifyBrokerProof
7
- } from "../chunk-WRLWEYHY.js";
8
- import "../chunk-OJAFKGI7.js";
9
- import "../chunk-6B4X447I.js";
10
- import "../chunk-NH2UOV3B.js";
11
- import "../chunk-YIVAKBCW.js";
12
- import "../chunk-6Y3UJT5H.js";
13
- import "../chunk-VUBRHJ4H.js";
7
+ } from "../chunk-EFINFZIF.js";
8
+ import "../chunk-I4S7IZSS.js";
9
+ import "../chunk-XWWDZKLS.js";
10
+ import "../chunk-CR5UPYIJ.js";
14
11
  import {
15
12
  BrokerEnrolmentError,
16
13
  BrokerNotEnabledError,
17
14
  BrokerProofError
18
- } from "../chunk-JGYCKX56.js";
15
+ } from "../chunk-ISIXU45J.js";
19
16
 
20
17
  // src/with-party/broker/active.ts
21
18
  var DEFAULT_SKEW_MS = 6e4;
@@ -28,7 +25,7 @@ function withBroker(config) {
28
25
  const cache = /* @__PURE__ */ new Map();
29
26
  return {
30
27
  async enroll(ctx) {
31
- const { enrollSeed } = await import("../seed-XHQQF6LJ.js");
28
+ const { enrollSeed } = await import("../seed-F2OSDZJR.js");
32
29
  return enrollSeed({ ...ctx, config });
33
30
  },
34
31
  async rotate(ctx) {
@@ -37,15 +34,15 @@ function withBroker(config) {
37
34
  const inFlight = scoped.map(([, e]) => e.inFlight).filter((p) => p !== void 0);
38
35
  await Promise.allSettled(inFlight);
39
36
  for (const [key] of scoped) cache.delete(key);
40
- const { rotateSeed } = await import("../seed-XHQQF6LJ.js");
37
+ const { rotateSeed } = await import("../seed-F2OSDZJR.js");
41
38
  return rotateSeed({ ...ctx, config });
42
39
  },
43
40
  async enrolMember(ctx, member) {
44
- const { enrolMemberSeed } = await import("../seed-XHQQF6LJ.js");
41
+ const { enrolMemberSeed } = await import("../seed-F2OSDZJR.js");
45
42
  return enrolMemberSeed({ ...ctx, config }, member);
46
43
  },
47
44
  async revokeMember(ctx, userId) {
48
- const { revokeMemberSeed } = await import("../seed-XHQQF6LJ.js");
45
+ const { revokeMemberSeed } = await import("../seed-F2OSDZJR.js");
49
46
  return revokeMemberSeed({ ...ctx, config }, userId);
50
47
  },
51
48
  credentialSource(ctx, profile) {
@@ -62,7 +59,7 @@ function withBroker(config) {
62
59
  const skewMs = config.skewMs ?? DEFAULT_SKEW_MS;
63
60
  const capturedEntry = entry;
64
61
  const inFlight = (async () => {
65
- const { mintStoreCredentials } = await import("../seed-XHQQF6LJ.js");
62
+ const { mintStoreCredentials } = await import("../seed-F2OSDZJR.js");
66
63
  const creds = await mintStoreCredentials({ ...ctx, config }, profile);
67
64
  capturedEntry.cached = { creds, validUntil: cacheFloor(creds, skewMs) };
68
65
  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 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,YAAY;AACjE;AAEO,SAAS,WAAW,QAAsC;AAC/D,QAAM,QAAQ,oBAAI,IAAwB;AAE1C,SAAO;AAAA,IACL,MAAM,OAAO,KAAK;AAChB,YAAM,EAAE,WAAW,IAAI,MAAM,OAAO,qBAAW;AAC/C,aAAO,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;AAAA,IACtC;AAAA,IACA,MAAM,OAAO,KAAK;AAOhB,YAAM,cAAc,GAAG,IAAI,KAAK;AAChC,YAAM,SAAS,CAAC,GAAG,MAAM,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,IAAI,WAAW,WAAW,CAAC;AACjF,YAAM,WAAW,OAAO,IAAI,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAsC,MAAM,MAAS;AAChH,YAAM,QAAQ,WAAW,QAAQ;AACjC,iBAAW,CAAC,GAAG,KAAK,OAAQ,OAAM,OAAO,GAAG;AAC5C,YAAM,EAAE,WAAW,IAAI,MAAM,OAAO,qBAAW;AAC/C,aAAO,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;AAAA,IACtC;AAAA,IACA,MAAM,YAAY,KAAK,QAAQ;AAC7B,YAAM,EAAE,gBAAgB,IAAI,MAAM,OAAO,qBAAW;AACpD,aAAO,gBAAgB,EAAE,GAAG,KAAK,OAAO,GAAG,MAAM;AAAA,IACnD;AAAA,IACA,MAAM,aAAa,KAAK,QAAQ;AAC9B,YAAM,EAAE,iBAAiB,IAAI,MAAM,OAAO,qBAAW;AACrD,aAAO,iBAAiB,EAAE,GAAG,KAAK,OAAO,GAAG,MAAM;AAAA,IACpD;AAAA,IACA,iBAAiB,KAAgB,SAAyC;AACxE,YAAM,MAAM,GAAG,IAAI,KAAK,KAAK,WAAW,EAAE;AAC1C,aAAO,YAAY;AACjB,YAAI,QAAQ,MAAM,IAAI,GAAG;AACzB,YAAI,CAAC,OAAO;AACV,kBAAQ,CAAC;AACT,gBAAM,IAAI,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"]}
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,YAAY;AACjE;AAEO,SAAS,WAAW,QAAsC;AAC/D,QAAM,QAAQ,oBAAI,IAAwB;AAE1C,SAAO;AAAA,IACL,MAAM,OAAO,KAAK;AAChB,YAAM,EAAE,WAAW,IAAI,MAAM,OAAO,qBAAW;AAC/C,aAAO,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;AAAA,IACtC;AAAA,IACA,MAAM,OAAO,KAAK;AAOhB,YAAM,cAAc,GAAG,IAAI,KAAK;AAChC,YAAM,SAAS,CAAC,GAAG,MAAM,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,IAAI,WAAW,WAAW,CAAC;AACjF,YAAM,WAAW,OAAO,IAAI,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAsC,MAAM,MAAS;AAChH,YAAM,QAAQ,WAAW,QAAQ;AACjC,iBAAW,CAAC,GAAG,KAAK,OAAQ,OAAM,OAAO,GAAG;AAC5C,YAAM,EAAE,WAAW,IAAI,MAAM,OAAO,qBAAW;AAC/C,aAAO,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;AAAA,IACtC;AAAA,IACA,MAAM,YAAY,KAAK,QAAQ;AAC7B,YAAM,EAAE,gBAAgB,IAAI,MAAM,OAAO,qBAAW;AACpD,aAAO,gBAAgB,EAAE,GAAG,KAAK,OAAO,GAAG,MAAM;AAAA,IACnD;AAAA,IACA,MAAM,aAAa,KAAK,QAAQ;AAC9B,YAAM,EAAE,iBAAiB,IAAI,MAAM,OAAO,qBAAW;AACrD,aAAO,iBAAiB,EAAE,GAAG,KAAK,OAAO,GAAG,MAAM;AAAA,IACpD;AAAA,IACA,iBAAiB,KAAgB,SAAyC;AACxE,YAAM,MAAM,GAAG,IAAI,KAAK,KAAK,WAAW,EAAE;AAC1C,aAAO,YAAY;AACjB,YAAI,QAAQ,MAAM,IAAI,GAAG;AACzB,YAAI,CAAC,OAAO;AACV,kBAAQ,CAAC;AACT,gBAAM,IAAI,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-PIEX7WSG.js";
5
- import "../chunk-JGYCKX56.js";
4
+ } from "../chunk-OOLF5FU2.js";
5
+ import "../chunk-ISIXU45J.js";
6
6
  export {
7
7
  isQuorum,
8
8
  runDrainBarrier
@@ -24,12 +24,78 @@ export type CapsuleKeyPair = CryptoKeyPair;
24
24
  * The groups a capsule may support. A capsule declares its set via
25
25
  * `capabilities()`; a service needing a group asserts at `createNoydb()`.
26
26
  *
27
- * `authenticate` and `seal` are what an `enclave-*` MUST support and an
28
- * `exclave-*` MUST refuse. That prefix rule is asserted by the conformance
29
- * suite from the package name, which is what makes the prefix a trust posture
30
- * rather than a naming convention.
27
+ * ⭐ `authenticate` AND `seal` ARE POSTURE GROUPS (family#156/#168). They say
28
+ * whether a capsule holds secrets at all — `authenticate` is `deriveKey`
29
+ * (secret → KEK) and `seal` is `wrapKey`/`unwrapKey` (KEK wraps DEK), the
30
+ * keyring's unlock chain. {@link PRIMITIVE_GROUPS} tags no primitive with
31
+ * either, so no field form and no service implies them: what implies them is
32
+ * opening a vault with a secret. An `enclave-*` MUST support both and an
33
+ * `exclave-*` MUST refuse both, and that rule is asserted by the conformance
34
+ * suite FROM THE PACKAGE NAME — which is what makes the prefix a trust posture
35
+ * rather than a naming convention, and why a primitive-completeness check names
36
+ * these two as exempt instead of reporting a green it cannot earn.
37
+ *
38
+ * ⛔ THE SHIPPED EXCLAVE DECLARES FOUR AND REFUSES SIX, and the old wording
39
+ * here named two. `exclave-plain`'s `capabilities()` is exactly `cipher`,
40
+ * `digest`, `sign`, `codec` — so beyond the two posture groups it also refuses
41
+ * `per-record-keys`, `deterministic`, `sealing` and `classify`. Reading "an
42
+ * exclave refuses authenticate and seal" as the whole story is how a consumer
43
+ * concludes a plaintext capsule can still seal a field.
31
44
  */
32
45
  export type CapsuleGroup = 'authenticate' | 'seal' | 'cipher' | 'digest' | 'sign' | 'codec' | 'sealing' | 'deterministic' | 'classify' | 'per-record-keys';
46
+ /**
47
+ * Which group each primitive belongs to — the tag table family#168 asked for,
48
+ * so `capabilities()` cannot drift from the implementation.
49
+ *
50
+ * ⭐ `Record<keyof CapsulePrimitives, …>` IS THE MECHANISM, and the reason this
51
+ * is a table rather than a comment. A new primitive added without a tag is a
52
+ * COMPILE error here, and a tag for a primitive that no longer exists is a
53
+ * compile error too. A hand-kept list of group members is the second copy that
54
+ * drifts; three vocabularies disagreeing about `per-record-keys` (core#42) is
55
+ * what that drift looks like when nothing checks it.
56
+ *
57
+ * ⚠️ FOUR GROUPS HAVE NO PRIMITIVES, and that is correct, not a gap:
58
+ *
59
+ * - `authenticate` and `seal` are POSTURE groups. They say whether a capsule
60
+ * holds secrets at all, which is a property of the implementation's
61
+ * intent — enforced by the `enclave-`/`exclave-` package-name rule the
62
+ * conformance kit asserts, never by calling a function. A completeness
63
+ * check over primitives is VACUOUSLY true for them, so it must name them as
64
+ * exempt rather than report a green it cannot earn.
65
+ * - `digest` and `sign` are PLUMBING. `sha256Hex`, `generateSigningKeyPair`,
66
+ * `signBytes`, `verifyBytes` are shared verbatim by every capsule
67
+ * (`plumbing/digest.ts`, `plumbing/sign.ts`) and are deliberately not
68
+ * primitives — hashes are not secrets, and a capsule choosing its own hash
69
+ * buys nothing but an envelope another capsule cannot read.
70
+ *
71
+ * ⛔ `wrapCek`/`unwrapCek` are `per-record-keys`, NOT `seal`. Ruled 2026-10-12
72
+ * after the two shipped artefacts were found disagreeing: `exclave-plain`
73
+ * refused them as `'seal'` while this union's own `per-record-keys` member was
74
+ * added by core#42 expressly for them, and the conformance kit has tested their
75
+ * refusal under that name since it shipped. The exclave is being corrected.
76
+ */
77
+ export declare const PRIMITIVE_GROUPS: Readonly<Record<keyof CapsulePrimitives, CapsuleGroup>>;
78
+ /**
79
+ * The groups `PRIMITIVE_GROUPS` cannot speak for, with the reason.
80
+ *
81
+ * Published because a completeness check MUST distinguish "this group has no
82
+ * unimplemented primitive" from "this group has no primitive to check" — those
83
+ * are the same green and different facts, and conflating them is how a capsule
84
+ * declares `seal` while implementing nothing a check can name.
85
+ */
86
+ export declare const GROUPS_WITHOUT_PRIMITIVES: Readonly<Partial<Record<CapsuleGroup, string>>>;
87
+ /**
88
+ * The three primitives a capsule MODULE does not expose, so a check driven off
89
+ * the module object reaches 15 of 18.
90
+ *
91
+ * ⚠️ Not a gap in the contract — these are codec-internal by design: the record
92
+ * codec calls them, nothing outside `capsule/` does, and putting them on the
93
+ * door would publish the `_vdig` payload format as a consumer-facing API. A
94
+ * check that silently iterated 15 and reported "every primitive" would be
95
+ * stating a conjunction it never evaluated, which is this repo's own
96
+ * false-green shape.
97
+ */
98
+ export declare const PRIMITIVES_NOT_ON_THE_DOOR: readonly ["mintVdigSlot", "openVdigPayload", "sealVdigPayload"];
33
99
  /**
34
100
  * Thrown at `createNoydb()` when a service needs a group the bound capsule
35
101
  * does not support.
@@ -42,32 +108,75 @@ export type CapsuleGroup = 'authenticate' | 'seal' | 'cipher' | 'digest' | 'sign
42
108
  * Refuse at CONSTRUCTION when a service needs a capsule group the bound
43
109
  * capsule lacks.
44
110
  *
45
- * ⛔ At startup or not at all. A capability discovered on first write is a
46
- * half-built vault: some records sealed, a service silently inert, and a
47
- * consumer who cannot tell a missing capability from a bug. `capabilities()`
48
- * is a set, so this is a membership test — never a try/catch probe against the
49
- * primitive itself, which would make "unsupported" and "broken" the same
50
- * observation.
111
+ * ⛔ At startup or not at all, and "startup" is TWO POINTS since family#156:
112
+ * `createNoydb()` for an enabled SERVICE, and `vault.collection()` for a
113
+ * declared FIELD. Both are needed — a `classifiedFields` declaration writes
114
+ * `_vdig` with no `classifiedStrategy` at all, so a single check at
115
+ * `createNoydb()` would leave every write-side requirement unenforced while
116
+ * looking complete. See `kernel/capsule-requirements.ts`.
117
+ *
118
+ * A capability discovered on first write is a half-built vault: some records
119
+ * sealed, a service silently inert, and a consumer who cannot tell a missing
120
+ * capability from a bug. `capabilities()` is a set, so this is a membership
121
+ * test — never a try/catch probe against the primitive itself, which would make
122
+ * "unsupported" and "broken" the same observation.
51
123
  *
52
124
  * Lives on the CONTRACT, not in the kernel: it depends on nothing but the
53
125
  * declared set, and every capsule's consumers need the same assertion.
54
126
  *
55
- * ⚠️ Per-service wiring is deliberately NOT done yet. `enclave-aes` supports
56
- * every group, so every call site would be unreachable code behind an
57
- * untestable branch. It lands in Stage C with `exclave-plain`, which is the
58
- * first capsule that refuses anything. Until then this is exercised against a
59
- * stub set — see `__tests__/capsule-capabilities.test.ts`.
127
+ * ⚠️ WIRED SINCE family#156, and the reason it waited still shapes how it is
128
+ * tested: `enclave-aes` supports every group, so NO integration path in this
129
+ * repo can reach a refusal, and a test that opens a real vault proves nothing
130
+ * about whether the assertion exists. So the requirement tables are pure
131
+ * functions tested against stub sets
132
+ * (`__tests__/capsule-requirements.test.ts`) and a separate file mocks
133
+ * `capabilities()` down to the exclave's four groups to prove the call sites
134
+ * actually call them (`__tests__/capsule-requirements-wiring.test.ts`). A
135
+ * predicate with no wiring test is the family#172 defect by construction.
60
136
  */
61
137
  export declare function assertCapsuleSupports(caps: ReadonlySet<CapsuleGroup>, group: CapsuleGroup, requirer: string): void;
138
+ /**
139
+ * ⭐ THE CANONICAL not-supported refusal, ruled 2026-10-12 (family#168). Hub
140
+ * throws it, and every capsule throws it for a group it refuses.
141
+ *
142
+ * ⛔ `EnclaveNotSupportedError` (`kernel/errors.ts`, code `ENCLAVE_NOT_SUPPORTED`)
143
+ * is DEPRECATED and removed at a later breaking cut. Two classes with two codes
144
+ * shipped side by side: hub never threw the enclave one, `exclave-plain` threw
145
+ * this one, and the conformance kit matched only the enclave code — so a capsule
146
+ * refusing a group CORRECTLY was reported as not refusing at all. The kit now
147
+ * accepts both codes so existing forks keep passing; new code throws this.
148
+ */
62
149
  export declare class CapsuleNotSupportedError extends NoydbError {
63
150
  readonly group: CapsuleGroup;
64
151
  readonly requirer: string;
65
152
  constructor(group: CapsuleGroup, requirer: string);
66
153
  }
67
154
  /**
68
- * The 13 cipher primitives the shared plumbing needs — the ENTIRE surface a
155
+ * Re-exported at the capsule seam (family#156), because a capsule author binding
156
+ * `@noy-db/hub/capsule` could not previously catch — or construct — the error
157
+ * their own capsule is expected to THROW.
158
+ *
159
+ * ⛔ The asymmetry was the defect: `classify/vdig.ts` raises `TamperedError` on
160
+ * any AAD or auth-tag mismatch, and `record-codec.ts` converts a subtle
161
+ * `OperationError` into one, so it is part of the contract a capsule implements.
162
+ * It shipped only on hub's ROOT barrel, so a capsule package — which must not
163
+ * import hub's root, that being the whole point of a narrow seam — had to
164
+ * either re-declare it (two classes, `instanceof` false across the door) or
165
+ * throw something hub does not recognise.
166
+ *
167
+ * ⚠️ Only the base error belongs here. `KeyringTamperedError` is raised by the
168
+ * keyring, which lives in the kernel on hub's side of the seam — a capsule never
169
+ * throws it and does not need to name it.
170
+ */
171
+ export { TamperedError } from '../kernel/errors.js';
172
+ /**
173
+ * The cipher primitives the shared plumbing needs — the ENTIRE surface a
69
174
  * capsule must actually implement.
70
175
  *
176
+ * ⛔ NO COUNT IS STATED HERE, deliberately. This docstring said "the 13 cipher
177
+ * primitives" while the interface had 16 members, and family#168 added two
178
+ * more; nothing fails when a number in prose goes stale. Count the members.
179
+ *
71
180
  * ⭐ This is the measurement that shaped Stage C. `enclave-aes` is ~4,200
72
181
  * lines, but only ~1,200 of them touch `crypto.subtle`; the other ~3,000 are
73
182
  * envelope assembly, record-identity AAD, tombstones and the record codec —
@@ -126,6 +235,39 @@ export interface CapsulePrimitives<K = CapsuleKey> {
126
235
  bufferToBase64: (buffer: ArrayBuffer | Uint8Array) => string;
127
236
  mintVdigSlot: (value: string, policy: VdigFieldPolicy, prevBlob: string | undefined, cek: K, collection: string, id: string, field: string) => Promise<string>;
128
237
  mintBidxTag: (normalized: string, dek: K, collection: string, field: string) => Promise<string>;
238
+ /**
239
+ * PBKDF2-SHA256 → a fixed 32-byte verify digest over a PRE-NORMALIZED
240
+ * candidate. Promoted to a primitive by family#168.
241
+ *
242
+ * ⭐ It was already a door export and already implemented by both shipped
243
+ * capsules (`enclave-aes` for real, `exclave-plain` as a `refuse('classify')`
244
+ * throw) — but it was not a primitive, so the plumbing could not call it, so
245
+ * the verify oracle that needs it had to live INSIDE the reference capsule
246
+ * and be reached by a dynamic import past the barrel. The missing declaration
247
+ * was the whole reason for `DYNAMIC_ENCLAVE_BYPASS`.
248
+ *
249
+ * ⚠️ `iterations` is a PARAMETER, not a constant read from the capsule: a
250
+ * stored `_vdig` payload carries its own authenticated `iter`, and a verify
251
+ * must digest at the value the payload declares or it cannot compare against
252
+ * a record written before an iteration bump.
253
+ */
254
+ pbkdf2VerifyDigest: (value: string, salt: Uint8Array, iterations: number) => Promise<Uint8Array>;
255
+ /**
256
+ * Blinded equality of two arbitrary-length byte strings — the ONE comparison
257
+ * construction the classify engines use (capsule seam spec §3 rule 2).
258
+ * Promoted by family#168 alongside `pbkdf2VerifyDigest`.
259
+ *
260
+ * ⛔ It is a CAPSULE primitive, not plumbing, although the comparison itself
261
+ * is cipher-free: the reference construction reduces both comparands to
262
+ * 32-byte tags under a fresh ephemeral HMAC key, which is WebCrypto, and
263
+ * `capsule/plumbing/**` may not call `crypto.subtle` (Check 10b). A capsule
264
+ * with no MAC of its own answers the whole `classify` group with a throw.
265
+ *
266
+ * ⚠️ The constant-time tag compare it ends in (`ctEqualTags`) IS plumbing and
267
+ * stays shared — a capsule choosing the blinding must not also get to choose
268
+ * whether the final compare is constant-time.
269
+ */
270
+ blindedEqual: (a: Uint8Array, b: Uint8Array) => Promise<boolean>;
129
271
  /** The vdig payload is sealed under a capsule-derived slot key, so open/seal
130
272
  * are the capsule's, not the plumbing's. `rotateRecordCek` needs both to
131
273
  * carry a classified slot across a key rotation. */
@@ -138,6 +280,24 @@ export interface VdigDigestEntry {
138
280
  readonly salt: string;
139
281
  readonly hash: string;
140
282
  }
283
+ /**
284
+ * The family's verify-digest iteration count (600K) — the value a NEW `_vdig`
285
+ * slot is written at, and the default cost of the verify engines' C4 timing pad.
286
+ *
287
+ * ⚠️ A STORED payload's `iter` wins over this constant everywhere. This is the
288
+ * write-side default only; a record written before an iteration bump must still
289
+ * verify, which is why {@link CapsulePrimitives.pbkdf2VerifyDigest} takes
290
+ * `iterations` as an argument.
291
+ *
292
+ * ⭐ It lives on the SEAM, next to the payload type that declares `iter`, for a
293
+ * mechanical reason found in family#168: the verify engines moved into
294
+ * `capsule/plumbing/` and must stay behind a lazy `import()` (they carry a
295
+ * PBKDF2 oracle no consumer should pay for), while the enclave's WRITE side
296
+ * needs the same constant eagerly. Importing it from the engine module would
297
+ * have made the engine eager and silently undone the laziness — and the only
298
+ * trace would have been a bundle-baseline number.
299
+ */
300
+ export declare const VDIG_ITERATIONS = 600000;
141
301
  export interface VdigPayload {
142
302
  readonly v: 1;
143
303
  readonly alg: 'PBKDF2-SHA256';
@@ -1,22 +1,40 @@
1
1
  import {
2
2
  CapsuleNotSupportedError,
3
- assertCapsuleSupports
4
- } from "../chunk-OJAFKGI7.js";
5
- import {
3
+ GROUPS_WITHOUT_PRIMITIVES,
4
+ KEY_BITS,
5
+ PRIMITIVES_NOT_ON_THE_DOOR,
6
+ PRIMITIVE_GROUPS,
7
+ VDIG_ITERATIONS,
8
+ assertCapsuleSupports,
9
+ base64ToBuffer,
10
+ bufferToBase64,
11
+ ctEqualTags,
12
+ deriveBlobAddressKey,
13
+ derivePresenceKey,
14
+ derivePresenceTagKey,
15
+ encodeEchoParts,
16
+ evaluateKofN,
17
+ generateIV,
18
+ generateRecoverySecret,
19
+ generateSalt,
6
20
  generateSigningKeyPair,
21
+ hkdfAesGcmKey,
22
+ hmacSha256Hex,
23
+ hmacSignHex,
24
+ makeCapsule,
25
+ normalizeForVerify,
26
+ parseSealedSlot,
27
+ sha256Bytes,
28
+ sha256Hex,
7
29
  signBytes,
8
30
  verifyBytes
9
- } from "../chunk-6B4X447I.js";
10
- import {
11
- evaluateKofN
12
- } from "../chunk-NH2UOV3B.js";
31
+ } from "../chunk-I4S7IZSS.js";
13
32
  import {
14
33
  buildDeleteMarker,
15
34
  buildRecordAad,
16
35
  buildRecordEnvelope,
17
36
  buildSealedRecordEnvelope,
18
37
  buildTombstone,
19
- ctEqualTags,
20
38
  envelopeBodyForHash,
21
39
  envelopeBodySize,
22
40
  hasPerRecordKey,
@@ -24,35 +42,22 @@ import {
24
42
  isDeleteMarker,
25
43
  isTombstone,
26
44
  isTombstoneShape,
27
- makeCapsule,
28
- parseSealedSlot,
29
45
  recordAadFor,
30
46
  requireSealedBody,
31
47
  sealedBodyArgs
32
- } from "../chunk-YIVAKBCW.js";
48
+ } from "../chunk-XWWDZKLS.js";
49
+ import "../chunk-CR5UPYIJ.js";
33
50
  import {
34
- KEY_BITS,
35
- base64ToBuffer,
36
- bufferToBase64,
37
- deriveBlobAddressKey,
38
- derivePresenceKey,
39
- derivePresenceTagKey,
40
- encodeEchoParts,
41
- generateIV,
42
- generateRecoverySecret,
43
- generateSalt,
44
- hkdfAesGcmKey,
45
- hmacSha256Hex,
46
- hmacSignHex,
47
- normalizeForVerify,
48
- sha256Bytes,
49
- sha256Hex
50
- } from "../chunk-6Y3UJT5H.js";
51
- import "../chunk-VUBRHJ4H.js";
52
- import "../chunk-JGYCKX56.js";
51
+ TamperedError
52
+ } from "../chunk-ISIXU45J.js";
53
53
  export {
54
54
  CapsuleNotSupportedError,
55
+ GROUPS_WITHOUT_PRIMITIVES,
55
56
  KEY_BITS,
57
+ PRIMITIVES_NOT_ON_THE_DOOR,
58
+ PRIMITIVE_GROUPS,
59
+ TamperedError,
60
+ VDIG_ITERATIONS,
56
61
  assertCapsuleSupports,
57
62
  base64ToBuffer,
58
63
  bufferToBase64,
@@ -48,5 +48,15 @@ export declare const aesCapsule: {
48
48
  perRecordKey?: boolean;
49
49
  }) => Promise<Pick<import("../../index.js").EncryptedEnvelope, "_iv" | "_data" | "_cek">>;
50
50
  verifyRecordIdentity: (ref: import("./index.js").RecordRef, env: import("../../index.js").EncryptedEnvelope, key: import("../contract.js").CapsuleKey) => Promise<boolean>;
51
+ revealSealedField: (ctx: import("../plumbing/classify-reveal.js").RevealEngineCtx, id: string, field: string) => Promise<unknown>;
52
+ verifyDigestField: (ctx: import("../plumbing/classify-verify.js").VerifyEngineCtx, id: string, field: string, candidate: string, policy: import("../../kernel/types.js").VdigFieldPolicy) => Promise<import("../../index.js").ClassifiedVerdict>;
53
+ verifyTextField: (ctx: import("../plumbing/classify-verify.js").VerifyEngineCtx, id: string, field: string, candidate: string, normalize: import("../plumbing/normalize.js").VerifyNormalizeMode) => Promise<import("../../index.js").ClassifiedVerdict>;
54
+ matchGroupFields: (ctx: import("../plumbing/classify-verify.js").VerifyEngineCtx, id: string, answers: Record<string, string>, members: ReadonlyArray<{
55
+ readonly field: string;
56
+ readonly policy: import("../../kernel/types.js").VdigFieldPolicy;
57
+ }>, opts: {
58
+ readonly min: number;
59
+ }) => Promise<{
60
+ readonly passed: boolean;
61
+ }>;
51
62
  };
52
- export declare const dualReadSealedSlot: (blob: string, field: string, collection: string, cek: CryptoKey | undefined, dek: CryptoKey) => Promise<string>;
@@ -1,5 +1,7 @@
1
- /** Family KDF constant — matches crypto.ts PBKDF2_ITERATIONS (600K). */
2
- export declare const VDIG_ITERATIONS = 600000;
1
+ /** Family KDF constant — matches crypto.ts PBKDF2_ITERATIONS (600K). Owned by
2
+ * the seam (`contract.ts`) since family#168 and re-exported here, so the write
3
+ * side and the plumbing verify engines cannot drift to two numbers. */
4
+ export { VDIG_ITERATIONS } from '../../contract.js';
3
5
  /**
4
6
  * Digest a (pre-normalized) candidate/value to exactly 32 bytes.
5
7
  * PBKDF2-SHA256 with a per-record per-write random salt (§2): verify
@@ -101,8 +101,17 @@ export declare const openEnvelopeJson: (ref: import("./index.js").RecordRef, env
101
101
  }) => Promise<void>, rotateRecordCek: (ctx: import("./index.js").SealingContext, collection: string, id: string) => Promise<void>, findByDet: <T>(ctx: import("./index.js").DeterministicContext<T>, field: string, value: unknown) => Promise<T | null>, queryByDet: <T>(ctx: import("./index.js").DeterministicContext<T>, field: string, value: unknown) => Promise<T[]>;
102
102
  export { deriveVdigSlotKey } from './classify/vdig.js';
103
103
  export { pbkdf2VerifyDigest } from './classify/digest.js';
104
+ export { blindedEqual } from './classify/compare.js';
104
105
  export { ctEqualTags } from '../plumbing/ct-equal.js';
105
106
  export { evaluateKofN } from '../plumbing/kofn.js';
107
+ export declare const revealSealedField: (ctx: import("../plumbing/classify-reveal.js").RevealEngineCtx, id: string, field: string) => Promise<unknown>, verifyDigestField: (ctx: import("../plumbing/classify-verify.js").VerifyEngineCtx, id: string, field: string, candidate: string, policy: import("../../kernel/types.js").VdigFieldPolicy) => Promise<import("../../index.js").ClassifiedVerdict>, verifyTextField: (ctx: import("../plumbing/classify-verify.js").VerifyEngineCtx, id: string, field: string, candidate: string, normalize: import("../plumbing/normalize.js").VerifyNormalizeMode) => Promise<import("../../index.js").ClassifiedVerdict>, matchGroupFields: (ctx: import("../plumbing/classify-verify.js").VerifyEngineCtx, id: string, answers: Record<string, string>, members: ReadonlyArray<{
108
+ readonly field: string;
109
+ readonly policy: import("../../kernel/types.js").VdigFieldPolicy;
110
+ }>, opts: {
111
+ readonly min: number;
112
+ }) => Promise<{
113
+ readonly passed: boolean;
114
+ }>;
106
115
  export { deriveClassifyIndexKey, deriveClassifyIndexSalt, mintBidxTag } from './classify/bidx.js';
107
116
  export { computeBidxTarget } from './classify/find.js';
108
117
  export { deriveBrokerProofBits, deriveBrokerProofKey, computeBrokerProof, issueChallenge, verifyBrokerProof, } from './broker/proof.js';