@noy-db/hub 0.10.0-pre.0 → 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.
- package/CHANGELOG.md +90 -0
- package/README.md +2 -2
- package/dist/api-QSEKT4KS.js +15 -0
- package/dist/as/index.js +19 -12
- package/dist/as/index.js.map +1 -1
- package/dist/at/index.js +6 -9
- package/dist/attestation/index.js +16 -19
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-E3GBMNDA.js → backup-BHKVK5SD.js} +9 -12
- package/dist/{backup-E3GBMNDA.js.map → backup-BHKVK5SD.js.map} +1 -1
- package/dist/blobs/index.js +10 -13
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +11 -14
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -2
- package/dist/capsule/contract.d.ts +176 -16
- package/dist/capsule/contract.js +35 -30
- package/dist/capsule/enclave-aes/bound.d.ts +11 -1
- package/dist/capsule/enclave-aes/classify/digest.d.ts +4 -2
- package/dist/capsule/enclave-aes/index.d.ts +9 -0
- package/dist/capsule/enclave-aes/index.js +643 -78
- package/dist/capsule/enclave-aes/index.js.map +1 -1
- package/dist/capsule/enclave-aes/primitives.d.ts +2 -2
- package/dist/capsule/index.d.ts +1 -1
- package/dist/capsule/plumbing/classify-reveal.d.ts +29 -0
- package/dist/capsule/plumbing/classify-verify.d.ts +53 -0
- package/dist/capsule/plumbing/index.d.ts +17 -0
- package/dist/{capsule-YQKQZPH7.js → capsule-YAITMH77.js} +16 -9
- package/dist/cargo/index.js +34 -36
- package/dist/{chunk-U43RSPPX.js → chunk-23A4SBRR.js} +3 -4
- package/dist/{chunk-U43RSPPX.js.map → chunk-23A4SBRR.js.map} +1 -1
- package/dist/{chunk-PREYKC76.js → chunk-24AGG4PP.js} +3 -3
- package/dist/{chunk-ZVJKHGE5.js → chunk-24IJZA4M.js} +14 -8
- package/dist/chunk-24IJZA4M.js.map +1 -0
- package/dist/{chunk-4N4OIVK3.js → chunk-2NVQ5SEA.js} +15 -5
- package/dist/chunk-2NVQ5SEA.js.map +1 -0
- package/dist/{chunk-ZNVBCKMV.js → chunk-2SIREKBR.js} +2 -2
- package/dist/{chunk-N6EWQ5VB.js → chunk-37FOG6AE.js} +14 -7
- package/dist/chunk-37FOG6AE.js.map +1 -0
- package/dist/{chunk-UQRKAM2R.js → chunk-3M2KK7O7.js} +3 -3
- package/dist/{chunk-P6FATPXQ.js → chunk-3ZCVY3T6.js} +2 -2
- package/dist/{chunk-PBEHTFUG.js → chunk-4CGWLHPQ.js} +6 -6
- package/dist/{chunk-PFHDQY5L.js → chunk-56Z4NOC6.js} +3 -3
- package/dist/{chunk-GLSCL74M.js → chunk-5AVIUJP4.js} +13 -9
- package/dist/chunk-5AVIUJP4.js.map +1 -0
- package/dist/{chunk-F7X7MPK4.js → chunk-5BGHAVBN.js} +2 -2
- package/dist/{chunk-QHG7GQKM.js → chunk-5JNEDW7I.js} +2 -2
- package/dist/{chunk-GHMINSER.js → chunk-5OWJSDTO.js} +4 -4
- package/dist/{chunk-GHMINSER.js.map → chunk-5OWJSDTO.js.map} +1 -1
- package/dist/{chunk-DYIR6RC3.js → chunk-5Y4MO7UQ.js} +4 -4
- package/dist/{chunk-TLIFNRU5.js → chunk-63LZLRWG.js} +2 -2
- package/dist/{chunk-GZISWBCJ.js → chunk-74W56QPY.js} +4 -4
- package/dist/{chunk-CLOSXHR4.js → chunk-7KNYLHVX.js} +3 -3
- package/dist/chunk-7KNYLHVX.js.map +1 -0
- package/dist/{chunk-LFUID7OW.js → chunk-7VJ2SIEI.js} +42 -22
- package/dist/chunk-7VJ2SIEI.js.map +1 -0
- package/dist/{chunk-WVQDY3UM.js → chunk-AHA7UALU.js} +4 -4
- package/dist/{chunk-U277K5GR.js → chunk-AIHBYQHF.js} +259 -123
- package/dist/chunk-AIHBYQHF.js.map +1 -0
- package/dist/{chunk-S2ORTQGS.js → chunk-ANYX2M6P.js} +3 -3
- package/dist/{chunk-6WEPFEMJ.js → chunk-ATKYMRBC.js} +4 -4
- package/dist/{chunk-7UHLO4ZN.js → chunk-B2HU55QD.js} +2 -2
- package/dist/{chunk-Y22JWHCP.js → chunk-BEKMLYQ4.js} +4 -4
- package/dist/{chunk-27NCEPKM.js → chunk-BPFXD4EX.js} +23 -3
- package/dist/chunk-BPFXD4EX.js.map +1 -0
- package/dist/{chunk-7C7OF26T.js → chunk-C2NXAR3D.js} +5 -5
- package/dist/{chunk-Z2KP6PNF.js → chunk-CJBWJO5P.js} +6 -6
- package/dist/{chunk-Z2KP6PNF.js.map → chunk-CJBWJO5P.js.map} +1 -1
- package/dist/{chunk-6WIFF46H.js → chunk-CQLMRCKX.js} +2 -2
- package/dist/{chunk-URGHKZPL.js → chunk-CR5UPYIJ.js} +1 -1
- package/dist/chunk-CR5UPYIJ.js.map +1 -0
- package/dist/{chunk-LMC5L3MM.js → chunk-DS2JXSUA.js} +6 -6
- package/dist/{chunk-X6Z2SIRF.js → chunk-E2JIE4S3.js} +2 -2
- package/dist/{chunk-EQ6C2ZPT.js → chunk-E7Y4J4GL.js} +2 -2
- package/dist/{chunk-LZN6DTFI.js → chunk-ECDM6YRX.js} +2 -2
- package/dist/{chunk-WRLWEYHY.js → chunk-EFINFZIF.js} +11 -1
- package/dist/chunk-EFINFZIF.js.map +1 -0
- package/dist/{chunk-2T2TGRWE.js → chunk-EM56MHN5.js} +6 -6
- package/dist/{chunk-NK4LGBGQ.js → chunk-EQXOJH6O.js} +4 -4
- package/dist/{chunk-OK44MD3C.js → chunk-ET3U2C3A.js} +2 -2
- package/dist/{chunk-RF5WDM25.js → chunk-EU4G7PQH.js} +2 -2
- package/dist/{chunk-K5JNK63R.js → chunk-EUCUYK5E.js} +10 -10
- package/dist/{chunk-2ODEFG6K.js → chunk-EWSIJDWO.js} +4 -4
- package/dist/{chunk-LJ744WXU.js → chunk-F2FD4LSB.js} +2 -2
- package/dist/{chunk-L4UL4IAR.js → chunk-F7ENMZYJ.js} +2 -2
- package/dist/{chunk-KBIS64X4.js → chunk-FIIVYQOW.js} +5 -5
- package/dist/{chunk-TBVDI3LY.js → chunk-FPK2LPLR.js} +8 -8
- package/dist/chunk-FPK2LPLR.js.map +1 -0
- package/dist/{chunk-BQJ5ORU5.js → chunk-FQEUJGBV.js} +2 -2
- package/dist/{chunk-UORWAG7K.js → chunk-FY4FFNKK.js} +2 -2
- package/dist/{chunk-MMWX5OT5.js → chunk-GDCYZGPB.js} +2 -2
- package/dist/{chunk-7ONMS7QI.js → chunk-H6Q7GKLI.js} +2 -2
- package/dist/{chunk-654RE5YC.js → chunk-HDAPQF6Q.js} +3 -3
- package/dist/{chunk-5SMCBPJ2.js → chunk-HRLMUZLI.js} +5 -5
- package/dist/{chunk-R4GLRJ55.js → chunk-HRNQYGLQ.js} +2 -2
- package/dist/{chunk-HTRLQ4ZZ.js → chunk-I4S7IZSS.js} +321 -235
- package/dist/chunk-I4S7IZSS.js.map +1 -0
- package/dist/{chunk-UNAMWK2Q.js → chunk-IN4XZJYD.js} +4 -3
- package/dist/{chunk-UNAMWK2Q.js.map → chunk-IN4XZJYD.js.map} +1 -1
- package/dist/{chunk-2RH5SEY7.js → chunk-ISIXU45J.js} +2 -2
- package/dist/chunk-ISIXU45J.js.map +1 -0
- package/dist/{chunk-NHEKQWFI.js → chunk-J4L4AS2W.js} +2 -2
- package/dist/{chunk-UMV5GBTJ.js → chunk-JPSOFWJR.js} +2 -2
- package/dist/{chunk-A52BK5AY.js → chunk-JRCO67NG.js} +2 -2
- package/dist/{chunk-FVKQ5QUC.js → chunk-JW3I3NNZ.js} +2 -2
- package/dist/{chunk-BNYDOF2Q.js → chunk-JZMPSQBH.js} +4 -4
- package/dist/{chunk-ZK2WT532.js → chunk-K5TVSOPQ.js} +5 -5
- package/dist/{chunk-2IASHJPS.js → chunk-K75SL74I.js} +2 -2
- package/dist/{chunk-O3NGOHXQ.js → chunk-KA4AAUST.js} +2 -2
- package/dist/chunk-KHSBMLQE.js +161 -0
- package/dist/chunk-KHSBMLQE.js.map +1 -0
- package/dist/{chunk-QQLXKDGC.js → chunk-KUGUML7H.js} +3 -3
- package/dist/{chunk-AMSSAOOB.js → chunk-L4J5NC2Q.js} +2 -2
- package/dist/{chunk-AYOQZJDB.js → chunk-LIX4QPMM.js} +2 -2
- package/dist/{chunk-WIUH6EJ7.js → chunk-LWQFGR34.js} +3 -3
- package/dist/{chunk-QNOWNCZS.js → chunk-MMSSHMHW.js} +2 -2
- package/dist/{chunk-T5EXREMW.js → chunk-N25Z6PR4.js} +6 -5
- package/dist/chunk-N25Z6PR4.js.map +1 -0
- package/dist/{chunk-ND6S2DKC.js → chunk-N5S2BCW3.js} +2 -2
- package/dist/{chunk-X5RGG3ZW.js → chunk-NIZH2TYZ.js} +2 -2
- package/dist/{chunk-SXPLIRQH.js → chunk-NLDBQHDV.js} +2 -2
- package/dist/{chunk-AI35LNWQ.js → chunk-NQQ4MOPC.js} +4 -4
- package/dist/{chunk-B6EWMGFX.js → chunk-NUBI6PYH.js} +2 -2
- package/dist/{chunk-ID4ZBC3X.js → chunk-NYEXUZDW.js} +4 -4
- package/dist/{chunk-GU6QXHPZ.js → chunk-OIBFIWVJ.js} +4 -4
- package/dist/chunk-OIBFIWVJ.js.map +1 -0
- package/dist/{chunk-PWAMX5KU.js → chunk-OOLF5FU2.js} +2 -2
- package/dist/{chunk-WQUIJPN4.js → chunk-OQA7UF2Q.js} +3 -3
- package/dist/{chunk-7JRLCP2J.js → chunk-ORJPICJI.js} +2 -2
- package/dist/{chunk-IF2M43G4.js → chunk-PBRD75JF.js} +2 -2
- package/dist/{chunk-RKBCUP5D.js → chunk-PDCBL23X.js} +39 -17
- package/dist/chunk-PDCBL23X.js.map +1 -0
- package/dist/{chunk-BSEPI3HD.js → chunk-PR36DD2X.js} +7 -7
- package/dist/{chunk-52ZFNK46.js → chunk-PV4HIC4E.js} +2 -2
- package/dist/{chunk-TU6ZJTYT.js → chunk-PZNK4HTV.js} +3 -3
- package/dist/{chunk-LUQBG637.js → chunk-QBLPLNPE.js} +3 -3
- package/dist/{chunk-UADW5NOU.js → chunk-QZXUISRF.js} +5 -5
- package/dist/{chunk-BMAXBTYH.js → chunk-RBXYO7MD.js} +5 -5
- package/dist/{chunk-PZN76MMV.js → chunk-RIACRFWA.js} +4 -4
- package/dist/{chunk-ICHHNI5E.js → chunk-RL6RNDJQ.js} +8 -8
- package/dist/{chunk-4WLI37WK.js → chunk-SJ2P7UXD.js} +7 -7
- package/dist/{chunk-2QH3I7QC.js → chunk-SWXS4LV3.js} +11 -11
- package/dist/{chunk-4KYKRYRT.js → chunk-TOTCZFRF.js} +2 -2
- package/dist/{chunk-CSAN22QG.js → chunk-TT4D52EK.js} +6 -6
- package/dist/{chunk-VLRY2UH4.js → chunk-U7CMJY5P.js} +10 -10
- package/dist/{chunk-NIUHKKMM.js → chunk-UNKTZDA2.js} +11 -11
- package/dist/{chunk-NIUHKKMM.js.map → chunk-UNKTZDA2.js.map} +1 -1
- package/dist/{chunk-QVUMKG3Z.js → chunk-UXH4AKH3.js} +95 -151
- package/dist/chunk-UXH4AKH3.js.map +1 -0
- package/dist/{chunk-PU5ZEV65.js → chunk-UZVHSYIF.js} +2 -2
- package/dist/{chunk-3EXQXOQ2.js → chunk-VHKAW5OI.js} +29 -5
- package/dist/chunk-VHKAW5OI.js.map +1 -0
- package/dist/{chunk-XQGKS4OW.js → chunk-VKZ3TDET.js} +3 -3
- package/dist/{chunk-ZOFNZLAA.js → chunk-VLZPUG5A.js} +4 -4
- package/dist/{chunk-OR3OHKU6.js → chunk-VSN5FLMI.js} +2 -2
- package/dist/{chunk-JQMEXCUZ.js → chunk-VYBBE7RN.js} +8 -8
- package/dist/chunk-VYBBE7RN.js.map +1 -0
- package/dist/{chunk-SVXFCCSX.js → chunk-WHK4JVKF.js} +8 -8
- package/dist/{chunk-YVA6UPRN.js → chunk-X4LDBALX.js} +2 -2
- package/dist/{chunk-35CNOVQE.js → chunk-X67E7NIJ.js} +3 -3
- package/dist/{chunk-IPF5ORDI.js → chunk-XMARKBUC.js} +3 -3
- package/dist/{chunk-B3B6HV5S.js → chunk-XMBBTETD.js} +2 -2
- package/dist/{chunk-GQ4MF3CM.js → chunk-XMBTAN5E.js} +28 -14
- package/dist/chunk-XMBTAN5E.js.map +1 -0
- package/dist/{chunk-FUHUGKDN.js → chunk-XROQP6IQ.js} +4 -4
- package/dist/chunk-XWWDZKLS.js +196 -0
- package/dist/chunk-XWWDZKLS.js.map +1 -0
- package/dist/{chunk-DL4GCSTS.js → chunk-Y2RYUWSQ.js} +10 -10
- package/dist/{chunk-7IV7GVOS.js → chunk-YCTSQV7K.js} +5 -5
- package/dist/{chunk-IFUYLIEY.js → chunk-YF7P2DG7.js} +2 -2
- package/dist/{chunk-PIO6NW7O.js → chunk-ZG7DBIVX.js} +2 -2
- package/dist/{chunk-NUZ7ROUZ.js → chunk-ZGJ775X7.js} +2 -2
- package/dist/{chunk-6BEBWHNL.js → chunk-ZQQLOEWN.js} +3 -3
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-7HXDMYHI.js → classified-marker-HKMRC7SC.js} +3 -3
- package/dist/{reveal-UAPBG743.js → classify-reveal-YSJKJEIR.js} +7 -12
- package/dist/classify-reveal-YSJKJEIR.js.map +1 -0
- package/dist/{verify-QWO5UKD6.js → classify-verify-ZCTKYQ43.js} +31 -41
- package/dist/classify-verify-ZCTKYQ43.js.map +1 -0
- package/dist/collection-facade-PPKNUR2J.js +38 -0
- package/dist/{computed-LZLSYOPG.js → computed-UCYVPMZA.js} +3 -3
- package/dist/consent/index.js +6 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +6 -9
- package/dist/custody/index.js +11 -13
- package/dist/{dead-filter-PZIJ4F4G.js → dead-filter-YOBWRG4O.js} +8 -11
- package/dist/{dead-filter-PZIJ4F4G.js.map → dead-filter-YOBWRG4O.js.map} +1 -1
- package/dist/debug/index.js +5 -8
- package/dist/debug/index.js.map +1 -1
- package/dist/delegation-SNALWRMO.js +24 -0
- package/dist/derivations/index.js +20 -23
- package/dist/derive-4GNU4E4I.js +17 -0
- package/dist/directory/index.js +7 -10
- package/dist/{dispatch-4BUYPWMJ.js → dispatch-QW32QBLW.js} +17 -20
- package/dist/{dispatch-4BUYPWMJ.js.map → dispatch-QW32QBLW.js.map} +1 -1
- package/dist/{dispatch-KOPDDPEQ.js → dispatch-V5WLDTVX.js} +5 -5
- package/dist/executor-7QN22OKI.js +8 -0
- package/dist/executor-BJZJNVBB.js +8 -0
- package/dist/executor-JEAAEJUM.js +32 -0
- package/dist/export-accessible-TVO2KQPG.js +20 -0
- package/dist/extract-partition-43CLDRN4.js +33 -0
- package/dist/{fanout-sidecar-FYDRL7F3.js → fanout-sidecar-DDONAFJT.js} +6 -9
- package/dist/{fanout-sidecar-FYDRL7F3.js.map → fanout-sidecar-DDONAFJT.js.map} +1 -1
- package/dist/forget/index.js +6 -9
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +11 -14
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +11 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +122 -123
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +5 -5
- package/dist/introspection/index.js +8 -11
- package/dist/issue-EIHEDAXM.js +16 -0
- package/dist/kernel/capsule-requirements.d.ts +84 -0
- package/dist/kernel/errors.d.ts +19 -3
- package/dist/kernel/export-scope.d.ts +28 -1
- package/dist/kernel/store-segment-guard.d.ts +29 -0
- package/dist/kernel/types.d.ts +169 -13
- package/dist/kernel/validation.d.ts +32 -0
- package/dist/kernel/vault.d.ts +5 -5
- package/dist/{ledger-UFJCB6T5.js → ledger-BMVUFQ3R.js} +8 -11
- package/dist/liberate-7KHXCLNJ.js +23 -0
- package/dist/link-set-PC2EJRKL.js +26 -0
- package/dist/{managed-secret-H5WYSJ46.js → managed-secret-RPRVEYZA.js} +7 -10
- package/dist/materialized-views/index.js +23 -26
- package/dist/{migrate-cek-SPESQAAO.js → migrate-cek-DTSCWGEF.js} +2 -2
- package/dist/money/index.js +5 -5
- package/dist/noydb-AYDNOXAX.js +98 -0
- package/dist/on/index.js +11 -13
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +9 -12
- package/dist/pod/index.js +65 -67
- package/dist/{pod-handle-GJLCOUGK.js → pod-handle-KBPQRN6Q.js} +6 -9
- package/dist/{pod-handle-GJLCOUGK.js.map → pod-handle-KBPQRN6Q.js.map} +1 -1
- package/dist/policy/index.js +7 -10
- package/dist/port/at/index.d.ts +1 -0
- package/dist/port/with/admission-authority.d.ts +2 -1
- package/dist/port/with/collection-registries.d.ts +37 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-2AC2STHC.js → post-register-RITSNASO.js} +6 -6
- package/dist/query/all/index.js +15 -15
- package/dist/query/index.js +7 -7
- package/dist/query/live/index.js +7 -7
- package/dist/query/reduce/index.js +10 -10
- package/dist/query/relate/index.js +9 -9
- package/dist/reduce/index.js +8 -8
- package/dist/register-BB34SK7E.js +27 -0
- package/dist/registry-65L6V5TO.js +20 -0
- package/dist/registry-HU62GPWA.js +32 -0
- package/dist/registry-SMNK6UM4.js +8 -0
- package/dist/registry-X5VPBKCO.js +8 -0
- package/dist/request-withdrawal-4SKAH46W.js +26 -0
- package/dist/{restore-to-OOPKLAPU.js → restore-to-VQHT67OH.js} +7 -10
- package/dist/{restore-to-OOPKLAPU.js.map → restore-to-VQHT67OH.js.map} +1 -1
- package/dist/revoke-IF5PX2JY.js +21 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +9 -12
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/{seed-BVYDPVIW.js → seed-F2OSDZJR.js} +11 -13
- package/dist/{seed-BVYDPVIW.js.map → seed-F2OSDZJR.js.map} +1 -1
- package/dist/sequence/index.js +6 -9
- package/dist/session/index.js +6 -9
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +2 -2
- package/dist/signer-5P7IZC2K.js +20 -0
- package/dist/snapshots/index.js +8 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-CROGJBIJ.js → stale-PUCZH5GJ.js} +7 -10
- package/dist/storage-5EGY5OYE.js +18 -0
- package/dist/store/index.js +1 -1
- package/dist/{store-coordination-provider-2YD2PTTP.js → store-coordination-provider-SEQM7SHJ.js} +7 -10
- package/dist/{store-coordination-provider-2YD2PTTP.js.map → store-coordination-provider-SEQM7SHJ.js.map} +1 -1
- package/dist/sync/index.js +13 -15
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +14 -16
- package/dist/tiers/index.js +8 -11
- package/dist/to/index.js +2 -2
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-diff-H7LT5ZBJ.js +8 -0
- package/dist/vault-head/index.js +5 -8
- package/dist/vault-head/index.js.map +1 -1
- package/dist/walk-Z4N7PCZ2.js +17 -0
- package/dist/with-audit/portability/export-accessible.d.ts +3 -1
- package/dist/with-cargo/vault-diff.d.ts +28 -0
- package/dist/with-commit/sequence/index.d.ts +22 -0
- package/dist/with-party/team/delegation.d.ts +16 -12
- package/dist/with-party/team/keyring.d.ts +77 -0
- package/dist/with-party/team/managed-secret.d.ts +40 -3
- package/dist/with-party/team/noydb-facade.d.ts +2 -2
- package/dist/with-party/team/peer-recover.d.ts +2 -2
- package/dist/with-party/team/rotate-recover.d.ts +3 -3
- package/dist/with-shape/manifest/storage.d.ts +2 -2
- package/dist/with-shape/manifest/writer.d.ts +2 -2
- package/dist/with-store/store-middleware.d.ts +18 -5
- package/dist/with-sync/engine.d.ts +0 -2
- package/dist/withdraw-accessible-CRCIQSTL.js +23 -0
- package/package.json +3 -3
- package/dist/api-H4B7ZQXP.js +0 -18
- package/dist/capsule/enclave-aes/classify/reveal.d.ts +0 -10
- package/dist/capsule/enclave-aes/classify/verify.d.ts +0 -36
- package/dist/chunk-27NCEPKM.js.map +0 -1
- package/dist/chunk-2RH5SEY7.js.map +0 -1
- package/dist/chunk-3EXQXOQ2.js.map +0 -1
- package/dist/chunk-4N4OIVK3.js.map +0 -1
- package/dist/chunk-5A3HOTP5.js +0 -591
- package/dist/chunk-5A3HOTP5.js.map +0 -1
- package/dist/chunk-CLOSXHR4.js.map +0 -1
- package/dist/chunk-EPPAEGH5.js +0 -157
- package/dist/chunk-EPPAEGH5.js.map +0 -1
- package/dist/chunk-GLSCL74M.js.map +0 -1
- package/dist/chunk-GQ4MF3CM.js.map +0 -1
- package/dist/chunk-GU6QXHPZ.js.map +0 -1
- package/dist/chunk-HTRLQ4ZZ.js.map +0 -1
- package/dist/chunk-JQMEXCUZ.js.map +0 -1
- package/dist/chunk-LFUID7OW.js.map +0 -1
- package/dist/chunk-N6EWQ5VB.js.map +0 -1
- package/dist/chunk-NH2UOV3B.js +0 -18
- package/dist/chunk-NH2UOV3B.js.map +0 -1
- package/dist/chunk-O6VOR4NH.js +0 -27
- package/dist/chunk-O6VOR4NH.js.map +0 -1
- package/dist/chunk-ODBOHPZU.js +0 -22
- package/dist/chunk-ODBOHPZU.js.map +0 -1
- package/dist/chunk-Q4DBU5RM.js +0 -78
- package/dist/chunk-Q4DBU5RM.js.map +0 -1
- package/dist/chunk-QVUMKG3Z.js.map +0 -1
- package/dist/chunk-RKBCUP5D.js.map +0 -1
- package/dist/chunk-T5EXREMW.js.map +0 -1
- package/dist/chunk-TBVDI3LY.js.map +0 -1
- package/dist/chunk-U277K5GR.js.map +0 -1
- package/dist/chunk-URGHKZPL.js.map +0 -1
- package/dist/chunk-VZFTON37.js +0 -40
- package/dist/chunk-VZFTON37.js.map +0 -1
- package/dist/chunk-WRLWEYHY.js.map +0 -1
- package/dist/chunk-ZVJKHGE5.js.map +0 -1
- package/dist/collection-facade-V63BEBGU.js +0 -41
- package/dist/delegation-7SSGIETH.js +0 -26
- package/dist/derive-IMI3BMDS.js +0 -20
- package/dist/executor-7SY3M6TZ.js +0 -8
- package/dist/executor-SNHW4ELF.js +0 -35
- package/dist/executor-Z3IKK7G3.js +0 -8
- package/dist/export-accessible-O7DIVFUO.js +0 -22
- package/dist/extract-partition-ELZEJKXM.js +0 -35
- package/dist/find-KWB2RYWJ.js +0 -10
- package/dist/issue-5ZHXK4HJ.js +0 -19
- package/dist/liberate-OEOSNNFH.js +0 -25
- package/dist/link-set-KMUBFN2L.js +0 -29
- package/dist/noydb-QDZ4QIKO.js +0 -100
- package/dist/register-PIORIMMR.js +0 -30
- package/dist/registry-BIMICFUH.js +0 -23
- package/dist/registry-JGWLW53D.js +0 -35
- package/dist/registry-SELCBYEQ.js +0 -8
- package/dist/registry-W327UNYH.js +0 -8
- package/dist/request-withdrawal-K3SXXODI.js +0 -28
- package/dist/reveal-UAPBG743.js.map +0 -1
- package/dist/revoke-6AFVXTWF.js +0 -24
- package/dist/signer-TW5MAQJP.js +0 -23
- package/dist/storage-SO2L2Z5J.js +0 -21
- package/dist/vault-diff-C6WUJFNP.js +0 -8
- package/dist/verify-QWO5UKD6.js.map +0 -1
- package/dist/walk-3KEOL7BY.js +0 -20
- package/dist/withdraw-accessible-OZU525ND.js +0 -25
- package/dist/withdraw-accessible-OZU525ND.js.map +0 -1
- /package/dist/{api-H4B7ZQXP.js.map → api-QSEKT4KS.js.map} +0 -0
- /package/dist/{capsule-YQKQZPH7.js.map → capsule-YAITMH77.js.map} +0 -0
- /package/dist/{chunk-PREYKC76.js.map → chunk-24AGG4PP.js.map} +0 -0
- /package/dist/{chunk-ZNVBCKMV.js.map → chunk-2SIREKBR.js.map} +0 -0
- /package/dist/{chunk-UQRKAM2R.js.map → chunk-3M2KK7O7.js.map} +0 -0
- /package/dist/{chunk-P6FATPXQ.js.map → chunk-3ZCVY3T6.js.map} +0 -0
- /package/dist/{chunk-PBEHTFUG.js.map → chunk-4CGWLHPQ.js.map} +0 -0
- /package/dist/{chunk-PFHDQY5L.js.map → chunk-56Z4NOC6.js.map} +0 -0
- /package/dist/{chunk-F7X7MPK4.js.map → chunk-5BGHAVBN.js.map} +0 -0
- /package/dist/{chunk-QHG7GQKM.js.map → chunk-5JNEDW7I.js.map} +0 -0
- /package/dist/{chunk-DYIR6RC3.js.map → chunk-5Y4MO7UQ.js.map} +0 -0
- /package/dist/{chunk-TLIFNRU5.js.map → chunk-63LZLRWG.js.map} +0 -0
- /package/dist/{chunk-GZISWBCJ.js.map → chunk-74W56QPY.js.map} +0 -0
- /package/dist/{chunk-WVQDY3UM.js.map → chunk-AHA7UALU.js.map} +0 -0
- /package/dist/{chunk-S2ORTQGS.js.map → chunk-ANYX2M6P.js.map} +0 -0
- /package/dist/{chunk-6WEPFEMJ.js.map → chunk-ATKYMRBC.js.map} +0 -0
- /package/dist/{chunk-7UHLO4ZN.js.map → chunk-B2HU55QD.js.map} +0 -0
- /package/dist/{chunk-Y22JWHCP.js.map → chunk-BEKMLYQ4.js.map} +0 -0
- /package/dist/{chunk-7C7OF26T.js.map → chunk-C2NXAR3D.js.map} +0 -0
- /package/dist/{chunk-6WIFF46H.js.map → chunk-CQLMRCKX.js.map} +0 -0
- /package/dist/{chunk-LMC5L3MM.js.map → chunk-DS2JXSUA.js.map} +0 -0
- /package/dist/{chunk-X6Z2SIRF.js.map → chunk-E2JIE4S3.js.map} +0 -0
- /package/dist/{chunk-EQ6C2ZPT.js.map → chunk-E7Y4J4GL.js.map} +0 -0
- /package/dist/{chunk-LZN6DTFI.js.map → chunk-ECDM6YRX.js.map} +0 -0
- /package/dist/{chunk-2T2TGRWE.js.map → chunk-EM56MHN5.js.map} +0 -0
- /package/dist/{chunk-NK4LGBGQ.js.map → chunk-EQXOJH6O.js.map} +0 -0
- /package/dist/{chunk-OK44MD3C.js.map → chunk-ET3U2C3A.js.map} +0 -0
- /package/dist/{chunk-RF5WDM25.js.map → chunk-EU4G7PQH.js.map} +0 -0
- /package/dist/{chunk-K5JNK63R.js.map → chunk-EUCUYK5E.js.map} +0 -0
- /package/dist/{chunk-2ODEFG6K.js.map → chunk-EWSIJDWO.js.map} +0 -0
- /package/dist/{chunk-LJ744WXU.js.map → chunk-F2FD4LSB.js.map} +0 -0
- /package/dist/{chunk-L4UL4IAR.js.map → chunk-F7ENMZYJ.js.map} +0 -0
- /package/dist/{chunk-KBIS64X4.js.map → chunk-FIIVYQOW.js.map} +0 -0
- /package/dist/{chunk-BQJ5ORU5.js.map → chunk-FQEUJGBV.js.map} +0 -0
- /package/dist/{chunk-UORWAG7K.js.map → chunk-FY4FFNKK.js.map} +0 -0
- /package/dist/{chunk-MMWX5OT5.js.map → chunk-GDCYZGPB.js.map} +0 -0
- /package/dist/{chunk-7ONMS7QI.js.map → chunk-H6Q7GKLI.js.map} +0 -0
- /package/dist/{chunk-654RE5YC.js.map → chunk-HDAPQF6Q.js.map} +0 -0
- /package/dist/{chunk-5SMCBPJ2.js.map → chunk-HRLMUZLI.js.map} +0 -0
- /package/dist/{chunk-R4GLRJ55.js.map → chunk-HRNQYGLQ.js.map} +0 -0
- /package/dist/{chunk-NHEKQWFI.js.map → chunk-J4L4AS2W.js.map} +0 -0
- /package/dist/{chunk-UMV5GBTJ.js.map → chunk-JPSOFWJR.js.map} +0 -0
- /package/dist/{chunk-A52BK5AY.js.map → chunk-JRCO67NG.js.map} +0 -0
- /package/dist/{chunk-FVKQ5QUC.js.map → chunk-JW3I3NNZ.js.map} +0 -0
- /package/dist/{chunk-BNYDOF2Q.js.map → chunk-JZMPSQBH.js.map} +0 -0
- /package/dist/{chunk-ZK2WT532.js.map → chunk-K5TVSOPQ.js.map} +0 -0
- /package/dist/{chunk-2IASHJPS.js.map → chunk-K75SL74I.js.map} +0 -0
- /package/dist/{chunk-O3NGOHXQ.js.map → chunk-KA4AAUST.js.map} +0 -0
- /package/dist/{chunk-QQLXKDGC.js.map → chunk-KUGUML7H.js.map} +0 -0
- /package/dist/{chunk-AMSSAOOB.js.map → chunk-L4J5NC2Q.js.map} +0 -0
- /package/dist/{chunk-AYOQZJDB.js.map → chunk-LIX4QPMM.js.map} +0 -0
- /package/dist/{chunk-WIUH6EJ7.js.map → chunk-LWQFGR34.js.map} +0 -0
- /package/dist/{chunk-QNOWNCZS.js.map → chunk-MMSSHMHW.js.map} +0 -0
- /package/dist/{chunk-ND6S2DKC.js.map → chunk-N5S2BCW3.js.map} +0 -0
- /package/dist/{chunk-X5RGG3ZW.js.map → chunk-NIZH2TYZ.js.map} +0 -0
- /package/dist/{chunk-SXPLIRQH.js.map → chunk-NLDBQHDV.js.map} +0 -0
- /package/dist/{chunk-AI35LNWQ.js.map → chunk-NQQ4MOPC.js.map} +0 -0
- /package/dist/{chunk-B6EWMGFX.js.map → chunk-NUBI6PYH.js.map} +0 -0
- /package/dist/{chunk-ID4ZBC3X.js.map → chunk-NYEXUZDW.js.map} +0 -0
- /package/dist/{chunk-PWAMX5KU.js.map → chunk-OOLF5FU2.js.map} +0 -0
- /package/dist/{chunk-WQUIJPN4.js.map → chunk-OQA7UF2Q.js.map} +0 -0
- /package/dist/{chunk-7JRLCP2J.js.map → chunk-ORJPICJI.js.map} +0 -0
- /package/dist/{chunk-IF2M43G4.js.map → chunk-PBRD75JF.js.map} +0 -0
- /package/dist/{chunk-BSEPI3HD.js.map → chunk-PR36DD2X.js.map} +0 -0
- /package/dist/{chunk-52ZFNK46.js.map → chunk-PV4HIC4E.js.map} +0 -0
- /package/dist/{chunk-TU6ZJTYT.js.map → chunk-PZNK4HTV.js.map} +0 -0
- /package/dist/{chunk-LUQBG637.js.map → chunk-QBLPLNPE.js.map} +0 -0
- /package/dist/{chunk-UADW5NOU.js.map → chunk-QZXUISRF.js.map} +0 -0
- /package/dist/{chunk-BMAXBTYH.js.map → chunk-RBXYO7MD.js.map} +0 -0
- /package/dist/{chunk-PZN76MMV.js.map → chunk-RIACRFWA.js.map} +0 -0
- /package/dist/{chunk-ICHHNI5E.js.map → chunk-RL6RNDJQ.js.map} +0 -0
- /package/dist/{chunk-4WLI37WK.js.map → chunk-SJ2P7UXD.js.map} +0 -0
- /package/dist/{chunk-2QH3I7QC.js.map → chunk-SWXS4LV3.js.map} +0 -0
- /package/dist/{chunk-4KYKRYRT.js.map → chunk-TOTCZFRF.js.map} +0 -0
- /package/dist/{chunk-CSAN22QG.js.map → chunk-TT4D52EK.js.map} +0 -0
- /package/dist/{chunk-VLRY2UH4.js.map → chunk-U7CMJY5P.js.map} +0 -0
- /package/dist/{chunk-PU5ZEV65.js.map → chunk-UZVHSYIF.js.map} +0 -0
- /package/dist/{chunk-XQGKS4OW.js.map → chunk-VKZ3TDET.js.map} +0 -0
- /package/dist/{chunk-ZOFNZLAA.js.map → chunk-VLZPUG5A.js.map} +0 -0
- /package/dist/{chunk-OR3OHKU6.js.map → chunk-VSN5FLMI.js.map} +0 -0
- /package/dist/{chunk-SVXFCCSX.js.map → chunk-WHK4JVKF.js.map} +0 -0
- /package/dist/{chunk-YVA6UPRN.js.map → chunk-X4LDBALX.js.map} +0 -0
- /package/dist/{chunk-35CNOVQE.js.map → chunk-X67E7NIJ.js.map} +0 -0
- /package/dist/{chunk-IPF5ORDI.js.map → chunk-XMARKBUC.js.map} +0 -0
- /package/dist/{chunk-B3B6HV5S.js.map → chunk-XMBBTETD.js.map} +0 -0
- /package/dist/{chunk-FUHUGKDN.js.map → chunk-XROQP6IQ.js.map} +0 -0
- /package/dist/{chunk-DL4GCSTS.js.map → chunk-Y2RYUWSQ.js.map} +0 -0
- /package/dist/{chunk-7IV7GVOS.js.map → chunk-YCTSQV7K.js.map} +0 -0
- /package/dist/{chunk-IFUYLIEY.js.map → chunk-YF7P2DG7.js.map} +0 -0
- /package/dist/{chunk-PIO6NW7O.js.map → chunk-ZG7DBIVX.js.map} +0 -0
- /package/dist/{chunk-NUZ7ROUZ.js.map → chunk-ZGJ775X7.js.map} +0 -0
- /package/dist/{chunk-6BEBWHNL.js.map → chunk-ZQQLOEWN.js.map} +0 -0
- /package/dist/{classified-marker-7HXDMYHI.js.map → classified-marker-HKMRC7SC.js.map} +0 -0
- /package/dist/{collection-facade-V63BEBGU.js.map → collection-facade-PPKNUR2J.js.map} +0 -0
- /package/dist/{computed-LZLSYOPG.js.map → computed-UCYVPMZA.js.map} +0 -0
- /package/dist/{delegation-7SSGIETH.js.map → delegation-SNALWRMO.js.map} +0 -0
- /package/dist/{derive-IMI3BMDS.js.map → derive-4GNU4E4I.js.map} +0 -0
- /package/dist/{dispatch-KOPDDPEQ.js.map → dispatch-V5WLDTVX.js.map} +0 -0
- /package/dist/{executor-7SY3M6TZ.js.map → executor-7QN22OKI.js.map} +0 -0
- /package/dist/{executor-SNHW4ELF.js.map → executor-BJZJNVBB.js.map} +0 -0
- /package/dist/{executor-Z3IKK7G3.js.map → executor-JEAAEJUM.js.map} +0 -0
- /package/dist/{export-accessible-O7DIVFUO.js.map → export-accessible-TVO2KQPG.js.map} +0 -0
- /package/dist/{extract-partition-ELZEJKXM.js.map → extract-partition-43CLDRN4.js.map} +0 -0
- /package/dist/{find-KWB2RYWJ.js.map → issue-EIHEDAXM.js.map} +0 -0
- /package/dist/{issue-5ZHXK4HJ.js.map → ledger-BMVUFQ3R.js.map} +0 -0
- /package/dist/{ledger-UFJCB6T5.js.map → liberate-7KHXCLNJ.js.map} +0 -0
- /package/dist/{liberate-OEOSNNFH.js.map → link-set-PC2EJRKL.js.map} +0 -0
- /package/dist/{link-set-KMUBFN2L.js.map → managed-secret-RPRVEYZA.js.map} +0 -0
- /package/dist/{migrate-cek-SPESQAAO.js.map → migrate-cek-DTSCWGEF.js.map} +0 -0
- /package/dist/{managed-secret-H5WYSJ46.js.map → noydb-AYDNOXAX.js.map} +0 -0
- /package/dist/{post-register-2AC2STHC.js.map → post-register-RITSNASO.js.map} +0 -0
- /package/dist/{noydb-QDZ4QIKO.js.map → register-BB34SK7E.js.map} +0 -0
- /package/dist/{register-PIORIMMR.js.map → registry-65L6V5TO.js.map} +0 -0
- /package/dist/{registry-BIMICFUH.js.map → registry-HU62GPWA.js.map} +0 -0
- /package/dist/{registry-JGWLW53D.js.map → registry-SMNK6UM4.js.map} +0 -0
- /package/dist/{registry-SELCBYEQ.js.map → registry-X5VPBKCO.js.map} +0 -0
- /package/dist/{registry-W327UNYH.js.map → request-withdrawal-4SKAH46W.js.map} +0 -0
- /package/dist/{request-withdrawal-K3SXXODI.js.map → revoke-IF5PX2JY.js.map} +0 -0
- /package/dist/{revoke-6AFVXTWF.js.map → signer-5P7IZC2K.js.map} +0 -0
- /package/dist/{signer-TW5MAQJP.js.map → stale-PUCZH5GJ.js.map} +0 -0
- /package/dist/{stale-CROGJBIJ.js.map → storage-5EGY5OYE.js.map} +0 -0
- /package/dist/{storage-SO2L2Z5J.js.map → vault-diff-H7LT5ZBJ.js.map} +0 -0
- /package/dist/{vault-diff-C6WUJFNP.js.map → walk-Z4N7PCZ2.js.map} +0 -0
- /package/dist/{walk-3KEOL7BY.js.map → withdraw-accessible-CRCIQSTL.js.map} +0 -0
package/dist/blobs/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
createExportBlobsHandle,
|
|
11
11
|
reportOrphanBlobChunks,
|
|
12
12
|
runCompaction
|
|
13
|
-
} from "../chunk-
|
|
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-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-HTRLQ4ZZ.js";
|
|
37
|
-
import "../chunk-EPPAEGH5.js";
|
|
38
|
-
import "../chunk-URGHKZPL.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-
|
|
38
|
+
} from "../chunk-ISIXU45J.js";
|
|
42
39
|
|
|
43
40
|
// src/via/blob/active.ts
|
|
44
41
|
function withBlobs(options = {}) {
|
package/dist/blobs/index.js.map
CHANGED
|
@@ -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":"
|
|
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":[]}
|
package/dist/broker/index.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NO_BROKER
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-JW3I3NNZ.js";
|
|
4
4
|
import {
|
|
5
5
|
issueChallenge,
|
|
6
6
|
verifyBrokerProof
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-HTRLQ4ZZ.js";
|
|
12
|
-
import "../chunk-EPPAEGH5.js";
|
|
13
|
-
import "../chunk-URGHKZPL.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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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;
|
package/dist/broker/index.js.map
CHANGED
|
@@ -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":"
|
|
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
|
@@ -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`
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
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
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
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
|
-
* ⚠️
|
|
56
|
-
* every group, so
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
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
|
-
*
|
|
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';
|
package/dist/capsule/contract.js
CHANGED
|
@@ -1,22 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CapsuleNotSupportedError,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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-
|
|
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-
|
|
48
|
+
} from "../chunk-XWWDZKLS.js";
|
|
49
|
+
import "../chunk-CR5UPYIJ.js";
|
|
33
50
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
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-EPPAEGH5.js";
|
|
51
|
-
import "../chunk-URGHKZPL.js";
|
|
52
|
-
import "../chunk-2RH5SEY7.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
|
-
|
|
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';
|