@noy-db/hub 0.4.0-pre.0 → 0.4.0-pre.10
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/README.md +3 -4
- package/dist/api-ZDKTWNBB.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-YPUEKIJC.js → backup-2UX7PRM5.js} +13 -13
- package/dist/blobs/index.js +30 -15
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/broker/index.js.map +1 -1
- package/dist/cargo/index.js +58 -29
- package/dist/{chunk-IY23KFNZ.js → chunk-35NMVJ7I.js} +3 -3
- package/dist/{chunk-S3BFKGET.js → chunk-3HUYRN24.js} +4 -4
- package/dist/chunk-3HUYRN24.js.map +1 -0
- package/dist/{walk-IPLXE36W.js → chunk-3V3XR4S4.js} +4 -13
- package/dist/{walk-IPLXE36W.js.map → chunk-3V3XR4S4.js.map} +1 -1
- package/dist/{chunk-RTEK4C4I.js → chunk-4JQK3L4V.js} +2 -2
- package/dist/{chunk-3ELCWU56.js → chunk-4ZKNC6A6.js} +2 -2
- package/dist/{chunk-VQNJ7UZL.js → chunk-55LKVALY.js} +106 -10
- package/dist/chunk-55LKVALY.js.map +1 -0
- package/dist/{chunk-VAIS3SOM.js → chunk-55LX6FSX.js} +2 -2
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-6HPG2YNX.js → chunk-5DRROK5W.js} +2 -2
- package/dist/{chunk-S6Q37VGE.js → chunk-5GQEU4DN.js} +2 -2
- package/dist/chunk-5JOFWL4G.js +25 -0
- package/dist/chunk-5JOFWL4G.js.map +1 -0
- package/dist/{chunk-ZXEZCY6F.js → chunk-63FE525P.js} +6 -6
- package/dist/chunk-6LJY7X5A.js +18 -0
- package/dist/chunk-6LJY7X5A.js.map +1 -0
- package/dist/{chunk-JVBO4SZL.js → chunk-6UBZ6I5Z.js} +2 -2
- package/dist/{chunk-BOKIKJJB.js → chunk-6ZNSB3H6.js} +5 -17
- package/dist/chunk-6ZNSB3H6.js.map +1 -0
- package/dist/{chunk-IK43HLDQ.js → chunk-7YVBQJ7K.js} +13 -355
- package/dist/chunk-7YVBQJ7K.js.map +1 -0
- package/dist/{chunk-VRBTNCM4.js → chunk-ABS7FMMD.js} +6 -6
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-HOONYZY2.js → chunk-AKKRXT23.js} +7 -7
- package/dist/chunk-AKKRXT23.js.map +1 -0
- package/dist/{chunk-DDHM2TLX.js → chunk-AT2JJEKJ.js} +4 -4
- package/dist/chunk-AT2JJEKJ.js.map +1 -0
- package/dist/{chunk-M75ZZHSR.js → chunk-BLBAQRBM.js} +2 -2
- package/dist/{chunk-554KLAAN.js → chunk-BLCWSJLN.js} +88 -81
- package/dist/chunk-BLCWSJLN.js.map +1 -0
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-WOM2HTML.js → chunk-CI32CAFS.js} +5 -5
- package/dist/{chunk-FH52K7EG.js → chunk-CUZLNGD5.js} +2 -6
- package/dist/{chunk-FH52K7EG.js.map → chunk-CUZLNGD5.js.map} +1 -1
- package/dist/{chunk-U6JMEH2P.js → chunk-CXQW2NWO.js} +145 -3
- package/dist/chunk-CXQW2NWO.js.map +1 -0
- package/dist/{chunk-EO43ANYJ.js → chunk-DABACXEF.js} +3 -3
- package/dist/{chunk-CJ5KKU6X.js → chunk-DMH3VZU5.js} +4 -4
- package/dist/chunk-DSDXAKIP.js +50 -0
- package/dist/chunk-DSDXAKIP.js.map +1 -0
- package/dist/{chunk-WZSHL6DQ.js → chunk-DZ2JXHWK.js} +5 -5
- package/dist/chunk-DZFQVICS.js +23 -0
- package/dist/chunk-DZFQVICS.js.map +1 -0
- package/dist/chunk-E23UGFVC.js +63 -0
- package/dist/chunk-E23UGFVC.js.map +1 -0
- package/dist/{chunk-Z4PD65VQ.js → chunk-EE7UHLKH.js} +4 -4
- package/dist/chunk-EIPVYUEP.js +654 -0
- package/dist/chunk-EIPVYUEP.js.map +1 -0
- package/dist/{chunk-RNG4VRP4.js → chunk-EKRSCRNM.js} +3 -3
- package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
- package/dist/chunk-FQ5CHJR7.js.map +1 -0
- package/dist/{chunk-RFI7GGFO.js → chunk-FQZ6XTQ7.js} +17 -20
- package/dist/chunk-FQZ6XTQ7.js.map +1 -0
- package/dist/{chunk-MT62YSPZ.js → chunk-FRMPM7WG.js} +4 -4
- package/dist/{chunk-W4TCUGQR.js → chunk-G2JUIDFA.js} +13 -9
- package/dist/{chunk-W4TCUGQR.js.map → chunk-G2JUIDFA.js.map} +1 -1
- package/dist/{chunk-T3GY65MA.js → chunk-G6WWZNJP.js} +13 -13
- package/dist/chunk-G6WWZNJP.js.map +1 -0
- package/dist/chunk-GJW4HX2O.js +1 -0
- package/dist/{chunk-KS6SAVCZ.js → chunk-GU3IP74F.js} +6 -6
- package/dist/{chunk-UHNGNKLV.js → chunk-GWWOGNBK.js} +308 -18
- package/dist/chunk-GWWOGNBK.js.map +1 -0
- package/dist/{chunk-5PFOMHTB.js → chunk-H2GPHUZD.js} +12 -13
- package/dist/chunk-H2GPHUZD.js.map +1 -0
- package/dist/{chunk-H2KSZMIX.js → chunk-HMU5P6RL.js} +5 -5
- package/dist/chunk-HMU5P6RL.js.map +1 -0
- package/dist/{chunk-JFCV5QIK.js → chunk-I5GEJX3R.js} +5 -5
- package/dist/chunk-I5GEJX3R.js.map +1 -0
- package/dist/{chunk-GWKAVKHI.js → chunk-IG6KUWBX.js} +2 -2
- package/dist/chunk-IG6KUWBX.js.map +1 -0
- package/dist/{chunk-LVGTA624.js → chunk-IPUG56GJ.js} +15 -5
- package/dist/{chunk-LVGTA624.js.map → chunk-IPUG56GJ.js.map} +1 -1
- package/dist/{chunk-SMIRGMS7.js → chunk-IXNCZTWA.js} +2 -2
- package/dist/{chunk-WQIYTNJV.js → chunk-IXTSNGYY.js} +3 -3
- package/dist/{chunk-WHXXI3W5.js → chunk-IYZISPGD.js} +7 -5
- package/dist/chunk-IYZISPGD.js.map +1 -0
- package/dist/{chunk-HQBM64EE.js → chunk-JDOMW53O.js} +145 -16
- package/dist/chunk-JDOMW53O.js.map +1 -0
- package/dist/{chunk-NCCBLYEB.js → chunk-JJZGIE4U.js} +6 -5
- package/dist/{chunk-DRWBEDYO.js → chunk-JYJFGD2H.js} +2 -2
- package/dist/{chunk-TAGR72IR.js → chunk-KRCBZYTZ.js} +26 -177
- package/dist/chunk-KRCBZYTZ.js.map +1 -0
- package/dist/{chunk-DSBQODMZ.js → chunk-L2DGWBCT.js} +14 -14
- package/dist/chunk-L2DGWBCT.js.map +1 -0
- package/dist/{chunk-VEALDPHW.js → chunk-L3YYLT4E.js} +15 -2
- package/dist/chunk-L3YYLT4E.js.map +1 -0
- package/dist/{chunk-FXZDAV62.js → chunk-LNPUSMZL.js} +29 -31
- package/dist/chunk-LNPUSMZL.js.map +1 -0
- package/dist/{chunk-XJMBYYQK.js → chunk-LNZKOUJR.js} +2 -2
- package/dist/{chunk-R3BLCFD2.js → chunk-MBKVNOJS.js} +6 -6
- package/dist/chunk-MCHBCNCE.js +367 -0
- package/dist/chunk-MCHBCNCE.js.map +1 -0
- package/dist/{chunk-VCBHAE4R.js → chunk-MHMLXJ3I.js} +2 -2
- package/dist/chunk-MHMLXJ3I.js.map +1 -0
- package/dist/{chunk-WNGGJWF7.js → chunk-MSMJJB4J.js} +2 -2
- package/dist/chunk-MSMJJB4J.js.map +1 -0
- package/dist/{chunk-T36RFODW.js → chunk-MXUT7FTE.js} +2 -2
- package/dist/chunk-MXUT7FTE.js.map +1 -0
- package/dist/{chunk-WG4QBZDN.js → chunk-N4BBNYIB.js} +11 -9
- package/dist/chunk-N4BBNYIB.js.map +1 -0
- package/dist/{chunk-PK6JIDQ4.js → chunk-NFIBXF4V.js} +1084 -1583
- package/dist/chunk-NFIBXF4V.js.map +1 -0
- package/dist/{chunk-VKCADNMR.js → chunk-NFNJLRY7.js} +368 -52
- package/dist/chunk-NFNJLRY7.js.map +1 -0
- package/dist/{chunk-N6WF5PKC.js → chunk-NFZGZ4AK.js} +2 -2
- package/dist/{chunk-JRBNCUNT.js → chunk-NGSJZFGL.js} +21 -4
- package/dist/chunk-NGSJZFGL.js.map +1 -0
- package/dist/chunk-NJ4DYYO5.js +81 -0
- package/dist/chunk-NJ4DYYO5.js.map +1 -0
- package/dist/chunk-NM5UYF6Q.js +24 -0
- package/dist/chunk-NM5UYF6Q.js.map +1 -0
- package/dist/{chunk-JBBSYJHP.js → chunk-NYEFP7DY.js} +4 -4
- package/dist/chunk-NYEFP7DY.js.map +1 -0
- package/dist/{chunk-GDG5VVYG.js → chunk-NZ24MX4J.js} +8 -46
- package/dist/chunk-NZ24MX4J.js.map +1 -0
- package/dist/{chunk-IFJTPAQQ.js → chunk-OLEPKFTW.js} +4 -4
- package/dist/chunk-OLEPKFTW.js.map +1 -0
- package/dist/{chunk-THVIPWRF.js → chunk-PEATRIYJ.js} +9 -9
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/{chunk-UC2ETWF3.js → chunk-PTHKZWEH.js} +2 -14
- package/dist/{chunk-UC2ETWF3.js.map → chunk-PTHKZWEH.js.map} +1 -1
- package/dist/chunk-PVEWA2DU.js +23 -0
- package/dist/chunk-PVEWA2DU.js.map +1 -0
- package/dist/{chunk-VCTXU4AT.js → chunk-QBAC3GXA.js} +1 -1
- package/dist/chunk-QBAC3GXA.js.map +1 -0
- package/dist/{chunk-RDXW3OBQ.js → chunk-QD46HPZG.js} +2 -2
- package/dist/chunk-QD46HPZG.js.map +1 -0
- package/dist/{chunk-YZQOGE2L.js → chunk-QDIH2744.js} +2 -2
- package/dist/{chunk-6HY2X62D.js → chunk-QJNCB5SK.js} +2 -2
- package/dist/{chunk-IAO54J4R.js → chunk-QX76XVQH.js} +6 -6
- package/dist/chunk-QX76XVQH.js.map +1 -0
- package/dist/{chunk-W2OG6JOL.js → chunk-QZWTRENR.js} +24 -7
- package/dist/chunk-QZWTRENR.js.map +1 -0
- package/dist/{chunk-6NQMXTYC.js → chunk-RO5NM6UI.js} +2 -2
- package/dist/chunk-RO5NM6UI.js.map +1 -0
- package/dist/chunk-SGDPRCC4.js +1075 -0
- package/dist/chunk-SGDPRCC4.js.map +1 -0
- package/dist/{chunk-2PCAVW2I.js → chunk-SHEEBRZ4.js} +2 -2
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-ISMV2QVG.js → chunk-TG634KCO.js} +11 -2
- package/dist/chunk-TG634KCO.js.map +1 -0
- package/dist/{chunk-XUW3PXHU.js → chunk-TUXQSFHZ.js} +4 -16
- package/dist/{chunk-XUW3PXHU.js.map → chunk-TUXQSFHZ.js.map} +1 -1
- package/dist/{chunk-GULTLPFB.js → chunk-UADPR6F4.js} +3 -3
- package/dist/{chunk-GULTLPFB.js.map → chunk-UADPR6F4.js.map} +1 -1
- package/dist/{chunk-XTHCN77N.js → chunk-UDHBXYGG.js} +29 -19
- package/dist/chunk-UDHBXYGG.js.map +1 -0
- package/dist/{chunk-RA5VTXXG.js → chunk-V6UQZA2H.js} +2 -2
- package/dist/chunk-VG2ZSFYD.js +32 -0
- package/dist/chunk-VG2ZSFYD.js.map +1 -0
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/{chunk-QDPZWTN2.js → chunk-W3G5REIU.js} +2 -2
- package/dist/{chunk-A4FXFAKF.js → chunk-W3L64Y3J.js} +2 -2
- package/dist/{chunk-ONTBCHCP.js → chunk-W66AM5IB.js} +2 -2
- package/dist/chunk-W66AM5IB.js.map +1 -0
- package/dist/{chunk-A5BDDEXK.js → chunk-WBKZUO5V.js} +26 -43
- package/dist/chunk-WBKZUO5V.js.map +1 -0
- package/dist/{chunk-XDIAFPUM.js → chunk-WLXMTYGO.js} +2 -2
- package/dist/{chunk-RJ6K6K5M.js → chunk-X3F5YJG2.js} +2 -2
- package/dist/{chunk-WKGF2TJR.js → chunk-X45JYIAY.js} +3 -3
- package/dist/chunk-X45JYIAY.js.map +1 -0
- package/dist/{chunk-6XE5TMPR.js → chunk-X4MVWPHV.js} +3 -3
- package/dist/chunk-X4MVWPHV.js.map +1 -0
- package/dist/chunk-XZHEOSQ2.js +16 -0
- package/dist/chunk-XZHEOSQ2.js.map +1 -0
- package/dist/chunk-Y2NBBT6K.js +18 -0
- package/dist/chunk-Y2NBBT6K.js.map +1 -0
- package/dist/{chunk-CZTLE22N.js → chunk-Y2NJBNX3.js} +8 -8
- package/dist/{chunk-CZTLE22N.js.map → chunk-Y2NJBNX3.js.map} +1 -1
- package/dist/{chunk-YTGDPCPW.js → chunk-Y6B6HVKC.js} +2 -2
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-SV6EAJEP.js → chunk-YWWQM7KP.js} +5 -14
- package/dist/chunk-YWWQM7KP.js.map +1 -0
- package/dist/{chunk-UDSR4X4L.js → chunk-YZJSJOUI.js} +239 -16
- package/dist/chunk-YZJSJOUI.js.map +1 -0
- package/dist/{chunk-5WZXVULX.js → chunk-ZTLOXFPB.js} +2 -2
- package/dist/chunk-ZTLOXFPB.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-QWMASIT7.js → classified-marker-7PKJBFCG.js} +3 -3
- package/dist/collection-facade-6I5K5IOD.js +45 -0
- package/dist/{computed-DSMPXG2Y.js → computed-AB45PS4V.js} +3 -3
- package/dist/consent/index.js +13 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +37 -0
- package/dist/crdt/index.js +4 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +26 -0
- package/dist/{dead-filter-66VGI6JV.js → dead-filter-FL3WIUZS.js} +2 -2
- package/dist/{chunk-OCVM6KDH.js → delegation-QXZ4MPPH.js} +12 -6
- package/dist/{chunk-OCVM6KDH.js.map → delegation-QXZ4MPPH.js.map} +1 -1
- package/dist/derivations/index.js +12 -12
- package/dist/derive-VGS7FKE3.js +22 -0
- package/dist/directory/index.js +46 -0
- package/dist/dispatch-EGGC7UD7.js +72 -0
- package/dist/dispatch-EGGC7UD7.js.map +1 -0
- package/dist/dispatch-GDSTUTVP.js +194 -0
- package/dist/dispatch-GDSTUTVP.js.map +1 -0
- package/dist/{enclave-TKPN2G2U.js → enclave-SPEEDYZ4.js} +13 -11
- package/dist/executor-IEBLTBCW.js +9 -0
- package/dist/executor-OTF556PL.js +28 -0
- package/dist/executor-RM7XWQDU.js +9 -0
- package/dist/export-accessible-P42BQ4PB.js +23 -0
- package/dist/extract-partition-TCYXRWBN.js +38 -0
- package/dist/{fanout-sidecar-B5LVUMQX.js → fanout-sidecar-SSMRSC2L.js} +9 -9
- package/dist/find-OZMTRIK3.js +11 -0
- package/dist/forget/index.js +11 -11
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +16 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +16 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +42 -42
- package/dist/index.js +332 -2106
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -2
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +28 -0
- package/dist/issue-FCKN5O6C.js +19 -0
- package/dist/kernel/best-effort-revert.d.ts +9 -1
- package/dist/kernel/collection-config.d.ts +12 -70
- package/dist/kernel/collection.d.ts +11 -23
- package/dist/kernel/enclave/crypto.d.ts +8 -8
- package/dist/kernel/enclave/index.d.ts +4 -4
- package/dist/kernel/enclave/record-keys/envelope-body.d.ts +8 -0
- package/dist/kernel/errors.d.ts +41 -22
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +81 -124
- package/dist/kernel/query/builder.d.ts +10 -10
- package/dist/kernel/query/index.d.ts +0 -6
- package/dist/kernel/query/scan-builder.d.ts +4 -4
- package/dist/kernel/sync-policy.d.ts +76 -4
- package/dist/kernel/types.d.ts +187 -86
- package/dist/kernel/validation.d.ts +33 -33
- package/dist/kernel/vault.d.ts +41 -229
- package/dist/kernel/via/dispatch.d.ts +7 -0
- package/dist/{ledger-PTK7XZYT.js → ledger-6XBEVWYP.js} +11 -11
- package/dist/liberate-CYUOS4NC.js +24 -0
- package/dist/{link-set-SLJHDNRB.js → link-set-NK6L2A5S.js} +11 -11
- package/dist/materialized-views/index.js +22 -19
- package/dist/money/index.js +31 -0
- package/dist/noydb-FZZIMLCI.js +81 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +21 -17
- package/dist/pod/index.js +26 -12
- package/dist/{policy-YDLCOX4P.js → policy/index.js} +6 -6
- package/dist/port/with/archive-strategy.d.ts +31 -0
- package/dist/port/with/blob-strategy.d.ts +15 -5
- package/dist/port/with/collection-options.d.ts +171 -0
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +134 -0
- package/dist/port/with/team-strategy.d.ts +3 -2
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-2YHSADFI.js → post-register-VFIYISUK.js} +6 -6
- package/dist/query/index.js +6 -46
- package/dist/{aggregate → reduce}/index.js +24 -17
- package/dist/reduce/index.js.map +1 -0
- package/dist/register-UKU2J6MN.js +25 -0
- package/dist/registry-2VCWVHZS.js +19 -0
- package/dist/registry-7Y5WF7GS.js +9 -0
- package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
- package/dist/registry-DTWRJLSF.js +18 -0
- package/dist/request-withdrawal-JYDZ5XY2.js +31 -0
- package/dist/{reveal-HWO4YMTJ.js → reveal-CL2BCW6A.js} +6 -6
- package/dist/revoke-2TSAD2T4.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +26 -0
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +36 -0
- package/dist/{seed-3ZMF5EQA.js → seed-NUVJEL7T.js} +12 -12
- package/dist/seed-NUVJEL7T.js.map +1 -0
- package/dist/sequence/index.js +30 -0
- package/dist/session/index.js +13 -9
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +6 -2
- package/dist/shadow/index.js.map +1 -1
- package/dist/share-link/index.d.ts +19 -0
- package/dist/share-link/index.js +201 -0
- package/dist/share-link/index.js.map +1 -0
- package/dist/share-link/share-link.d.ts +123 -0
- package/dist/signer-K7Z2EOMG.js +25 -0
- package/dist/snapshots/index.js +14 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-VZL4OGUB.js → stale-A4J26OIC.js} +11 -10
- package/dist/storage-YVHZUISN.js +23 -0
- package/dist/store/index.js +22 -0
- package/dist/{store-coordination-provider-FKX3F6TQ.js → store-coordination-provider-EWRZL7XF.js} +3 -3
- package/dist/sync/index.js +15 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +33 -47
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/{tx → transactions}/index.js +7 -3
- package/dist/transactions/index.js.map +1 -0
- package/dist/util/index.js +1 -1
- package/dist/{verify-26Y5GNMK.js → verify-7XWHJWUN.js} +5 -5
- package/dist/via/blob/active.d.ts +23 -7
- package/dist/via/blob/binding.d.ts +1 -1
- package/dist/via/blob/index.d.ts +7 -1
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/i18n/index.d.ts +2 -0
- package/dist/via/money/money-reducer.d.ts +2 -2
- package/dist/walk-P5D6CF4V.js +21 -0
- package/dist/with-audit/consent/index.d.ts +2 -0
- package/dist/with-audit/forget/active.d.ts +3 -3
- package/dist/with-audit/forget/index.d.ts +6 -5
- package/dist/with-audit/forget/strategy.d.ts +3 -3
- package/dist/with-audit/guards/executor.d.ts +4 -4
- package/dist/with-audit/guards/immutable-guard.d.ts +3 -3
- package/dist/with-audit/guards/index.d.ts +1 -1
- package/dist/with-audit/guards/registry.d.ts +3 -3
- package/dist/with-audit/guards/transition-guard.d.ts +3 -3
- package/dist/with-audit/guards/types.d.ts +10 -10
- package/dist/with-audit/guards/with-guard.d.ts +2 -2
- package/dist/with-audit/periods/index.d.ts +2 -0
- package/dist/with-audit/periods/periods.d.ts +1 -16
- package/dist/with-audit/periods/vault-facade.d.ts +6 -0
- package/dist/with-audit/periods/window.d.ts +16 -0
- package/dist/with-audit/portability/export-accessible.d.ts +4 -4
- package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
- package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
- package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
- package/dist/with-audit/tiers/index.d.ts +1 -0
- package/dist/with-cargo/adopt-partition.d.ts +7 -7
- package/dist/{legacy/kernel.d.ts → with-cargo/floor.d.ts} +4 -4
- package/dist/with-cargo/index.d.ts +15 -2
- package/dist/with-commit/crdt/index.d.ts +2 -0
- package/dist/with-commit/history/index.d.ts +2 -0
- package/dist/with-commit/history/time-machine.d.ts +2 -2
- package/dist/with-commit/numbering/descriptor.d.ts +16 -6
- package/dist/with-commit/tx/active.d.ts +5 -5
- package/dist/with-commit/tx/index.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/strategy.d.ts +3 -3
- package/dist/with-fork/shadow/index.d.ts +2 -0
- package/dist/with-fork/snapshots/active.d.ts +2 -2
- package/dist/with-fork/snapshots/index.d.ts +3 -1
- package/dist/with-fork/snapshots/noydb-facade.d.ts +3 -3
- package/dist/with-fork/snapshots/strategy.d.ts +2 -2
- package/dist/with-formula/derivations/dispatch.d.ts +98 -0
- package/dist/with-formula/derivations/executor.d.ts +2 -2
- package/dist/with-formula/derivations/index.d.ts +4 -1
- package/dist/with-formula/derivations/registry.d.ts +3 -3
- package/dist/with-formula/derivations/stale.d.ts +2 -2
- package/dist/with-formula/derivations/types.d.ts +3 -3
- package/dist/with-formula/derivations/with-derivation.d.ts +2 -2
- package/dist/with-formula/derivations/with-rollup.d.ts +15 -8
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +3 -3
- package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
- package/dist/with-formula/materialized-views/index.d.ts +2 -1
- package/dist/with-formula/materialized-views/registry.d.ts +4 -4
- package/dist/with-formula/materialized-views/types.d.ts +11 -11
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +2 -2
- package/dist/with-formula/overlay-views/index.d.ts +1 -1
- package/dist/with-formula/overlay-views/registry.d.ts +4 -4
- package/dist/with-formula/overlay-views/types.d.ts +3 -3
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +2 -2
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +2 -2
- package/dist/with-lookup/indexing/active.d.ts +5 -5
- package/dist/with-lookup/indexing/index.d.ts +3 -1
- package/dist/with-lookup/indexing/strategy.d.ts +3 -3
- package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
- package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
- package/dist/with-lookup/reduce/index.d.ts +34 -0
- package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +11 -12
- package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
- package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
- package/dist/with-lookup/search/build-docs.d.ts +7 -2
- package/dist/with-lookup/search/index.d.ts +1 -1
- package/dist/with-party/broker/index.d.ts +1 -0
- package/dist/with-party/broker/seed.d.ts +1 -1
- package/dist/with-party/custody/liberate.d.ts +3 -3
- package/dist/with-party/directory/cover/index.d.ts +1 -5
- package/dist/with-party/directory/cover/schema.d.ts +0 -6
- package/dist/with-party/directory/cover/storage.d.ts +0 -8
- package/dist/with-party/directory/cover/types.d.ts +0 -21
- package/dist/with-party/directory/index.d.ts +2 -0
- package/dist/with-party/session/dev-unlock.d.ts +2 -2
- package/dist/with-party/session/index.d.ts +2 -0
- package/dist/with-party/session/session.d.ts +2 -2
- package/dist/with-party/team/deed.d.ts +8 -8
- package/dist/with-party/team/index.d.ts +4 -7
- package/dist/with-party/team/keyring.d.ts +83 -35
- package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
- package/dist/with-party/team/noydb-facade.d.ts +43 -42
- package/dist/with-party/team/peer-recover.d.ts +13 -13
- package/dist/with-party/team/recovery.d.ts +5 -5
- package/dist/with-party/team/rotate-recover.d.ts +30 -30
- package/dist/with-pod/bundle.d.ts +30 -32
- package/dist/with-pod/format.d.ts +2 -2
- package/dist/with-pod/index.d.ts +2 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +43 -3
- package/dist/with-shape/blobs/blob-pinning.d.ts +112 -0
- package/dist/with-shape/blobs/blob-set.d.ts +86 -2
- package/dist/with-shape/introspection/index.d.ts +6 -0
- package/dist/with-shape/schema-update/index.d.ts +1 -0
- package/dist/with-store/index.d.ts +3 -2
- package/dist/with-store/route-store.d.ts +1 -1
- package/dist/{with-party/team/sync-active.d.ts → with-sync/active.d.ts} +1 -1
- package/dist/{with-party/team/sync-credentials.d.ts → with-sync/credentials.d.ts} +3 -3
- package/dist/{with-party/team/sync.d.ts → with-sync/engine.d.ts} +17 -4
- package/dist/{with-party/sync → with-sync}/index.d.ts +4 -2
- package/dist/with-sync/period-scope.d.ts +78 -0
- package/dist/{with-party/team → with-sync}/presence.d.ts +2 -2
- package/dist/{with-party/team/sync-strategy.d.ts → with-sync/strategy.d.ts} +6 -6
- package/dist/{with-party/team/sync-transaction.d.ts → with-sync/transaction.d.ts} +3 -3
- package/dist/withdraw-accessible-A2PWF5MZ.js +28 -0
- package/dist/withdraw-accessible-A2PWF5MZ.js.map +1 -0
- package/package.json +49 -36
- package/dist/aggregate/index.js.map +0 -1
- package/dist/api-3A3S4SHH.js +0 -20
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/bundle/index.js +0 -153
- package/dist/bundle/index.js.map +0 -1
- package/dist/by/index.js +0 -11
- package/dist/chunk-554KLAAN.js.map +0 -1
- package/dist/chunk-5PFOMHTB.js.map +0 -1
- package/dist/chunk-5WZXVULX.js.map +0 -1
- package/dist/chunk-6NQMXTYC.js.map +0 -1
- package/dist/chunk-6XE5TMPR.js.map +0 -1
- package/dist/chunk-A5BDDEXK.js.map +0 -1
- package/dist/chunk-ANATMTOA.js +0 -205
- package/dist/chunk-ANATMTOA.js.map +0 -1
- package/dist/chunk-BOKIKJJB.js.map +0 -1
- package/dist/chunk-CHFZDSE4.js +0 -1
- package/dist/chunk-DDHM2TLX.js.map +0 -1
- package/dist/chunk-DSBQODMZ.js.map +0 -1
- package/dist/chunk-EWPOHMN2.js +0 -255
- package/dist/chunk-EWPOHMN2.js.map +0 -1
- package/dist/chunk-FXZDAV62.js.map +0 -1
- package/dist/chunk-GDG5VVYG.js.map +0 -1
- package/dist/chunk-GWKAVKHI.js.map +0 -1
- package/dist/chunk-H2KSZMIX.js.map +0 -1
- package/dist/chunk-HOONYZY2.js.map +0 -1
- package/dist/chunk-HQBM64EE.js.map +0 -1
- package/dist/chunk-IAO54J4R.js.map +0 -1
- package/dist/chunk-IFJTPAQQ.js.map +0 -1
- package/dist/chunk-IK43HLDQ.js.map +0 -1
- package/dist/chunk-ISMV2QVG.js.map +0 -1
- package/dist/chunk-JBBSYJHP.js.map +0 -1
- package/dist/chunk-JFCV5QIK.js.map +0 -1
- package/dist/chunk-JRBNCUNT.js.map +0 -1
- package/dist/chunk-LB7FD65R.js +0 -163
- package/dist/chunk-LB7FD65R.js.map +0 -1
- package/dist/chunk-ONTBCHCP.js.map +0 -1
- package/dist/chunk-PK6JIDQ4.js.map +0 -1
- package/dist/chunk-RDXW3OBQ.js.map +0 -1
- package/dist/chunk-RFI7GGFO.js.map +0 -1
- package/dist/chunk-S3BFKGET.js.map +0 -1
- package/dist/chunk-SV6EAJEP.js.map +0 -1
- package/dist/chunk-T36RFODW.js.map +0 -1
- package/dist/chunk-T3GY65MA.js.map +0 -1
- package/dist/chunk-TAGR72IR.js.map +0 -1
- package/dist/chunk-TIGPQDYP.js +0 -14
- package/dist/chunk-TIGPQDYP.js.map +0 -1
- package/dist/chunk-U6JMEH2P.js.map +0 -1
- package/dist/chunk-UDSR4X4L.js.map +0 -1
- package/dist/chunk-UHNGNKLV.js.map +0 -1
- package/dist/chunk-VCBHAE4R.js.map +0 -1
- package/dist/chunk-VCTXU4AT.js.map +0 -1
- package/dist/chunk-VEALDPHW.js.map +0 -1
- package/dist/chunk-VKCADNMR.js.map +0 -1
- package/dist/chunk-VQNJ7UZL.js.map +0 -1
- package/dist/chunk-W2OG6JOL.js.map +0 -1
- package/dist/chunk-WG4QBZDN.js.map +0 -1
- package/dist/chunk-WHXXI3W5.js.map +0 -1
- package/dist/chunk-WKGF2TJR.js.map +0 -1
- package/dist/chunk-WNGGJWF7.js.map +0 -1
- package/dist/chunk-XTHCN77N.js.map +0 -1
- package/dist/chunk-YCH5GBN6.js +0 -99
- package/dist/chunk-YCH5GBN6.js.map +0 -1
- package/dist/chunk-YMUGBZN2.js.map +0 -1
- package/dist/collection-facade-KMBWNCYP.js +0 -44
- package/dist/cover-QJRXINN5.js +0 -52
- package/dist/delegation-SU6CV3W7.js +0 -25
- package/dist/derive-6RWU4EOA.js +0 -21
- package/dist/executor-KGNLJD6M.js +0 -9
- package/dist/executor-UX4FASYZ.js +0 -26
- package/dist/executor-XGIS6CR7.js +0 -9
- package/dist/export-accessible-LKW3QV22.js +0 -23
- package/dist/extract-partition-UP2ARO75.js +0 -38
- package/dist/find-YS6XWB46.js +0 -11
- package/dist/in/index.js +0 -1
- package/dist/issue-3ACYX7LO.js +0 -19
- package/dist/legacy/bundle.d.ts +0 -30
- package/dist/liberate-MQQXBUCY.js +0 -24
- package/dist/noydb-ANIW5FLE.js +0 -69
- package/dist/on/index.js +0 -17
- package/dist/port/as/index.d.ts +0 -26
- package/dist/port/at/index.d.ts +0 -18
- package/dist/port/in/index.d.ts +0 -21
- package/dist/port/on/index.d.ts +0 -27
- package/dist/port/ui/index.d.ts +0 -21
- package/dist/port/with/index.d.ts +0 -18
- package/dist/register-PAM3ASRZ.js +0 -23
- package/dist/registry-4S2U2TR4.js +0 -19
- package/dist/registry-NPOWJHC4.js +0 -9
- package/dist/registry-VZ3CCI2R.js +0 -18
- package/dist/request-withdrawal-DI3H5WUI.js +0 -31
- package/dist/revoke-R5CZSVUT.js +0 -24
- package/dist/seed-3ZMF5EQA.js.map +0 -1
- package/dist/signer-MBVHW4WE.js +0 -25
- package/dist/storage-3MEJUENZ.js +0 -23
- package/dist/tx/index.js.map +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/with/index.js +0 -31
- package/dist/with-lookup/aggregate/index.d.ts +0 -23
- package/dist/withdraw-accessible-TZDATQVR.js +0 -28
- /package/dist/{api-3A3S4SHH.js.map → api-ZDKTWNBB.js.map} +0 -0
- /package/dist/{backup-YPUEKIJC.js.map → backup-2UX7PRM5.js.map} +0 -0
- /package/dist/{chunk-IY23KFNZ.js.map → chunk-35NMVJ7I.js.map} +0 -0
- /package/dist/{chunk-RTEK4C4I.js.map → chunk-4JQK3L4V.js.map} +0 -0
- /package/dist/{chunk-3ELCWU56.js.map → chunk-4ZKNC6A6.js.map} +0 -0
- /package/dist/{chunk-VAIS3SOM.js.map → chunk-55LX6FSX.js.map} +0 -0
- /package/dist/{chunk-6HPG2YNX.js.map → chunk-5DRROK5W.js.map} +0 -0
- /package/dist/{chunk-S6Q37VGE.js.map → chunk-5GQEU4DN.js.map} +0 -0
- /package/dist/{chunk-ZXEZCY6F.js.map → chunk-63FE525P.js.map} +0 -0
- /package/dist/{chunk-JVBO4SZL.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
- /package/dist/{chunk-VRBTNCM4.js.map → chunk-ABS7FMMD.js.map} +0 -0
- /package/dist/{chunk-M75ZZHSR.js.map → chunk-BLBAQRBM.js.map} +0 -0
- /package/dist/{chunk-WOM2HTML.js.map → chunk-CI32CAFS.js.map} +0 -0
- /package/dist/{chunk-EO43ANYJ.js.map → chunk-DABACXEF.js.map} +0 -0
- /package/dist/{chunk-CJ5KKU6X.js.map → chunk-DMH3VZU5.js.map} +0 -0
- /package/dist/{chunk-WZSHL6DQ.js.map → chunk-DZ2JXHWK.js.map} +0 -0
- /package/dist/{chunk-Z4PD65VQ.js.map → chunk-EE7UHLKH.js.map} +0 -0
- /package/dist/{chunk-RNG4VRP4.js.map → chunk-EKRSCRNM.js.map} +0 -0
- /package/dist/{chunk-MT62YSPZ.js.map → chunk-FRMPM7WG.js.map} +0 -0
- /package/dist/{as/index.js.map → chunk-GJW4HX2O.js.map} +0 -0
- /package/dist/{chunk-KS6SAVCZ.js.map → chunk-GU3IP74F.js.map} +0 -0
- /package/dist/{chunk-SMIRGMS7.js.map → chunk-IXNCZTWA.js.map} +0 -0
- /package/dist/{chunk-WQIYTNJV.js.map → chunk-IXTSNGYY.js.map} +0 -0
- /package/dist/{chunk-NCCBLYEB.js.map → chunk-JJZGIE4U.js.map} +0 -0
- /package/dist/{chunk-DRWBEDYO.js.map → chunk-JYJFGD2H.js.map} +0 -0
- /package/dist/{chunk-XJMBYYQK.js.map → chunk-LNZKOUJR.js.map} +0 -0
- /package/dist/{chunk-R3BLCFD2.js.map → chunk-MBKVNOJS.js.map} +0 -0
- /package/dist/{chunk-N6WF5PKC.js.map → chunk-NFZGZ4AK.js.map} +0 -0
- /package/dist/{chunk-THVIPWRF.js.map → chunk-PEATRIYJ.js.map} +0 -0
- /package/dist/{chunk-YZQOGE2L.js.map → chunk-QDIH2744.js.map} +0 -0
- /package/dist/{chunk-6HY2X62D.js.map → chunk-QJNCB5SK.js.map} +0 -0
- /package/dist/{chunk-2PCAVW2I.js.map → chunk-SHEEBRZ4.js.map} +0 -0
- /package/dist/{chunk-RA5VTXXG.js.map → chunk-V6UQZA2H.js.map} +0 -0
- /package/dist/{chunk-QDPZWTN2.js.map → chunk-W3G5REIU.js.map} +0 -0
- /package/dist/{chunk-A4FXFAKF.js.map → chunk-W3L64Y3J.js.map} +0 -0
- /package/dist/{chunk-XDIAFPUM.js.map → chunk-WLXMTYGO.js.map} +0 -0
- /package/dist/{chunk-RJ6K6K5M.js.map → chunk-X3F5YJG2.js.map} +0 -0
- /package/dist/{chunk-YTGDPCPW.js.map → chunk-Y6B6HVKC.js.map} +0 -0
- /package/dist/{classified-marker-QWMASIT7.js.map → classified-marker-7PKJBFCG.js.map} +0 -0
- /package/dist/{at/index.js.map → collection-facade-6I5K5IOD.js.map} +0 -0
- /package/dist/{by/index.js.map → computed-AB45PS4V.js.map} +0 -0
- /package/dist/{in → cover}/index.js.map +0 -0
- /package/dist/{on → custody}/index.js.map +0 -0
- /package/dist/{dead-filter-66VGI6JV.js.map → dead-filter-FL3WIUZS.js.map} +0 -0
- /package/dist/{chunk-CHFZDSE4.js.map → derive-VGS7FKE3.js.map} +0 -0
- /package/dist/{ui → directory}/index.js.map +0 -0
- /package/dist/{collection-facade-KMBWNCYP.js.map → enclave-SPEEDYZ4.js.map} +0 -0
- /package/dist/{computed-DSMPXG2Y.js.map → executor-IEBLTBCW.js.map} +0 -0
- /package/dist/{cover-QJRXINN5.js.map → executor-OTF556PL.js.map} +0 -0
- /package/dist/{delegation-SU6CV3W7.js.map → executor-RM7XWQDU.js.map} +0 -0
- /package/dist/{derive-6RWU4EOA.js.map → export-accessible-P42BQ4PB.js.map} +0 -0
- /package/dist/{enclave-TKPN2G2U.js.map → extract-partition-TCYXRWBN.js.map} +0 -0
- /package/dist/{fanout-sidecar-B5LVUMQX.js.map → fanout-sidecar-SSMRSC2L.js.map} +0 -0
- /package/dist/{executor-KGNLJD6M.js.map → find-OZMTRIK3.js.map} +0 -0
- /package/dist/{with → introspection}/index.js.map +0 -0
- /package/dist/{executor-UX4FASYZ.js.map → issue-FCKN5O6C.js.map} +0 -0
- /package/dist/{executor-XGIS6CR7.js.map → ledger-6XBEVWYP.js.map} +0 -0
- /package/dist/{export-accessible-LKW3QV22.js.map → liberate-CYUOS4NC.js.map} +0 -0
- /package/dist/{extract-partition-UP2ARO75.js.map → link-set-NK6L2A5S.js.map} +0 -0
- /package/dist/{find-YS6XWB46.js.map → money/index.js.map} +0 -0
- /package/dist/{issue-3ACYX7LO.js.map → noydb-FZZIMLCI.js.map} +0 -0
- /package/dist/{ledger-PTK7XZYT.js.map → policy/index.js.map} +0 -0
- /package/dist/{post-register-2YHSADFI.js.map → post-register-VFIYISUK.js.map} +0 -0
- /package/dist/{liberate-MQQXBUCY.js.map → register-UKU2J6MN.js.map} +0 -0
- /package/dist/{link-set-SLJHDNRB.js.map → registry-2VCWVHZS.js.map} +0 -0
- /package/dist/{noydb-ANIW5FLE.js.map → registry-7Y5WF7GS.js.map} +0 -0
- /package/dist/{policy-YDLCOX4P.js.map → registry-BWD2ED52.js.map} +0 -0
- /package/dist/{register-PAM3ASRZ.js.map → registry-DTWRJLSF.js.map} +0 -0
- /package/dist/{registry-4S2U2TR4.js.map → request-withdrawal-JYDZ5XY2.js.map} +0 -0
- /package/dist/{reveal-HWO4YMTJ.js.map → reveal-CL2BCW6A.js.map} +0 -0
- /package/dist/{registry-NPOWJHC4.js.map → revoke-2TSAD2T4.js.map} +0 -0
- /package/dist/{registry-VW6P6A3J.js.map → schema-update/index.js.map} +0 -0
- /package/dist/{registry-VZ3CCI2R.js.map → search/index.js.map} +0 -0
- /package/dist/{request-withdrawal-DI3H5WUI.js.map → sequence/index.js.map} +0 -0
- /package/dist/{revoke-R5CZSVUT.js.map → signer-K7Z2EOMG.js.map} +0 -0
- /package/dist/{signer-MBVHW4WE.js.map → stale-A4J26OIC.js.map} +0 -0
- /package/dist/{stale-VZL4OGUB.js.map → storage-YVHZUISN.js.map} +0 -0
- /package/dist/{storage-3MEJUENZ.js.map → store/index.js.map} +0 -0
- /package/dist/{store-coordination-provider-FKX3F6TQ.js.map → store-coordination-provider-EWRZL7XF.js.map} +0 -0
- /package/dist/{verify-26Y5GNMK.js.map → verify-7XWHJWUN.js.map} +0 -0
- /package/dist/{withdraw-accessible-TZDATQVR.js.map → walk-P5D6CF4V.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-coordination.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-write-relay.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NoydbStore, KeyringFile, KeyringAuthenticator, Role, Permissions, GrantOptions, RevokeOptions, UpdateUserOptions, UserInfo, ExportCapability, ExportFormat, ImportCapability, VaultPolicyOnDisk, UserEnvelope
|
|
1
|
+
import type { NoydbStore, KeyringFile, KeyringAuthenticator, Role, Permissions, GrantOptions, RevokeOptions, UpdateUserOptions, UserInfo, ExportCapability, ExportFormat, ImportCapability, VaultPolicyOnDisk, UserEnvelope } from '../../kernel/types.js';
|
|
2
2
|
import { type EnclaveKey } from '../../kernel/enclave/index.js';
|
|
3
|
-
import { type
|
|
3
|
+
import { type SecretPolicy } from '../../kernel/validation.js';
|
|
4
4
|
/** In-memory representation of an unlocked keyring. */
|
|
5
5
|
export interface UnlockedKeyring {
|
|
6
6
|
readonly userId: string;
|
|
@@ -9,7 +9,7 @@ export interface UnlockedKeyring {
|
|
|
9
9
|
readonly permissions: Permissions;
|
|
10
10
|
readonly deks: Map<string, EnclaveKey>;
|
|
11
11
|
/**
|
|
12
|
-
* The KEK, when this keyring was unlocked via tier 1 (
|
|
12
|
+
* The KEK, when this keyring was unlocked via tier 1 (secret) or
|
|
13
13
|
* a wrap-KEK tier-2 method (WebAuthn / OIDC). `null` when the
|
|
14
14
|
* keyring was opened via:
|
|
15
15
|
*
|
|
@@ -71,8 +71,15 @@ export interface UnlockedKeyring {
|
|
|
71
71
|
}
|
|
72
72
|
/** Mint a fresh wrapped-canary string. Deterministic for a given KEK. */
|
|
73
73
|
export declare function mintKeyringCanary(kek: EnclaveKey): Promise<string>;
|
|
74
|
+
/** Options for {@link loadKeyring} (#846b). */
|
|
75
|
+
export interface LoadKeyringOptions {
|
|
76
|
+
/** The user whose keyring to unlock. */
|
|
77
|
+
readonly userId: string;
|
|
78
|
+
/** That user's secret. */
|
|
79
|
+
readonly secret: string;
|
|
80
|
+
}
|
|
74
81
|
/** Load and unlock a user's keyring for a vault. */
|
|
75
|
-
export declare function loadKeyring(
|
|
82
|
+
export declare function loadKeyring(store: NoydbStore, vault: string, opts: LoadKeyringOptions): Promise<UnlockedKeyring>;
|
|
76
83
|
/**
|
|
77
84
|
* Open-policy pre-gate: decide create-vs-fail-closed **before** any
|
|
78
85
|
* vault write. `openVault` must not self-provision an owner keyring into a
|
|
@@ -81,26 +88,38 @@ export declare function loadKeyring(adapter: NoydbStore, vault: string, userId:
|
|
|
81
88
|
* `store.list`. Returns when the open may proceed (the caller is a member, or
|
|
82
89
|
* the vault is genuinely-new and `create` is allowed, in which case the caller
|
|
83
90
|
* falls through to the normal `createOwnerKeyring` path); throws `NoAccessError`
|
|
84
|
-
* otherwise. Placed before managed-
|
|
91
|
+
* otherwise. Placed before managed-secret secret resolution (which persists
|
|
85
92
|
* on first open), so a fail-closed open writes nothing.
|
|
86
93
|
*/
|
|
87
94
|
export declare function assertKeyringOpenAllowed(store: NoydbStore, vault: string, userId: string, create: boolean): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Options for {@link createOwnerKeyring} (#846b). The `SecretPolicy` knobs are
|
|
97
|
+
* flattened into the same bag rather than nested, so `assertStrongSecret` can
|
|
98
|
+
* take `opts` directly.
|
|
99
|
+
*/
|
|
100
|
+
export interface CreateOwnerKeyringOptions extends SecretPolicy {
|
|
101
|
+
/** The owner to create. */
|
|
102
|
+
readonly userId: string;
|
|
103
|
+
/** The owner's secret. */
|
|
104
|
+
readonly secret: string;
|
|
105
|
+
/** Gate creation on the phrase-format strength rules. Default false. */
|
|
106
|
+
readonly validate?: boolean;
|
|
107
|
+
/** Escape hatch for fixtures and migrations — skips the strength gate. */
|
|
108
|
+
readonly allowWeakSecret?: boolean;
|
|
109
|
+
}
|
|
88
110
|
/**
|
|
89
111
|
* Create the initial owner keyring for a new vault.
|
|
90
112
|
*
|
|
91
|
-
* Pass `{ validate: true }` (or
|
|
113
|
+
* Pass `{ validate: true }` (or any `SecretPolicy` knob) to gate creation
|
|
92
114
|
* on the phrase-format strength rules — `Noydb` threads this from
|
|
93
|
-
* `NoydbOptions.
|
|
115
|
+
* `NoydbOptions.validateSecret`. Direct callers (CLI, scripts,
|
|
94
116
|
* test fixtures) opt in explicitly.
|
|
95
117
|
*/
|
|
96
|
-
export declare function createOwnerKeyring(
|
|
97
|
-
validate?: boolean;
|
|
98
|
-
allowWeakPassphrase?: boolean;
|
|
99
|
-
}): Promise<UnlockedKeyring>;
|
|
118
|
+
export declare function createOwnerKeyring(store: NoydbStore, vault: string, opts: CreateOwnerKeyringOptions): Promise<UnlockedKeyring>;
|
|
100
119
|
/** Grant access to a new user. Caller must have grant privilege. */
|
|
101
|
-
export declare function grant(
|
|
120
|
+
export declare function grant(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: GrantOptions): Promise<void>;
|
|
102
121
|
/** Revoke a user's access. Optionally rotate keys for affected collections. */
|
|
103
|
-
export declare function revoke(
|
|
122
|
+
export declare function revoke(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions): Promise<void>;
|
|
104
123
|
/**
|
|
105
124
|
* Mutate `role`, `displayName`, and/or `permissions` on an existing
|
|
106
125
|
* keyring. Pure plaintext-header rewrite — no DEK rewrap, no KEK
|
|
@@ -125,33 +144,62 @@ export declare function revoke(adapter: NoydbStore, vault: string, callerKeyring
|
|
|
125
144
|
* @throws `ValidationError` when the diff is empty (nothing to update).
|
|
126
145
|
*
|
|
127
146
|
*/
|
|
128
|
-
export declare function updateKeyringIdentity(
|
|
147
|
+
export declare function updateKeyringIdentity(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: UpdateUserOptions): Promise<void>;
|
|
129
148
|
/**
|
|
130
149
|
* Rotate DEKs for specified collections:
|
|
131
150
|
* 1. Generate new DEKs
|
|
132
151
|
* 2. Re-encrypt all records in affected collections
|
|
133
152
|
* 3. Re-wrap new DEKs for all remaining users
|
|
134
153
|
*/
|
|
135
|
-
export declare function rotateKeys(adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]): Promise<void>;
|
|
136
154
|
/**
|
|
137
|
-
*
|
|
155
|
+
* What a DEK rotation leaves behind (#854).
|
|
156
|
+
*
|
|
157
|
+
* A member's DEKs are wrapped under that member's KEK, and a KEK derives only
|
|
158
|
+
* from that member's secret — so the caller cannot re-wrap a fresh DEK for
|
|
159
|
+
* anyone else. That is the zero-knowledge property working as designed, but it
|
|
160
|
+
* means rotation necessarily DROPS the rotated collections from every other
|
|
161
|
+
* member's keyring rather than re-keying them.
|
|
162
|
+
*
|
|
163
|
+
* `needsRegrant` names exactly who lost what, so the caller can re-run
|
|
164
|
+
* `grant()` instead of discovering the access loss later.
|
|
165
|
+
*/
|
|
166
|
+
export interface RotateResult {
|
|
167
|
+
/** (member, collection) pairs whose access was dropped by the rotation. */
|
|
168
|
+
readonly needsRegrant: ReadonlyArray<{
|
|
169
|
+
readonly userId: string;
|
|
170
|
+
readonly collection: string;
|
|
171
|
+
}>;
|
|
172
|
+
}
|
|
173
|
+
/** Options for {@link rotateKeys} (#846b — was a bare `string[]`). */
|
|
174
|
+
export interface RotateKeysOptions {
|
|
175
|
+
/** Collections whose DEKs are re-minted. */
|
|
176
|
+
readonly collections: readonly string[];
|
|
177
|
+
}
|
|
178
|
+
export declare function rotateKeys(store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, opts: RotateKeysOptions): Promise<RotateResult>;
|
|
179
|
+
/** Options for {@link changeSecret} (#846b). */
|
|
180
|
+
export interface ChangeSecretOptions extends SecretPolicy {
|
|
181
|
+
/** The replacement secret. */
|
|
182
|
+
readonly newSecret: string;
|
|
183
|
+
/** Escape hatch for fixtures and migrations — skips the strength gate. */
|
|
184
|
+
readonly allowWeakSecret?: boolean;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Change the user's secret. Re-wraps every DEK under the new KEK.
|
|
138
188
|
*
|
|
139
|
-
* Validates the new
|
|
140
|
-
* `
|
|
189
|
+
* Validates the new secret against the strength rules unless
|
|
190
|
+
* `allowWeakSecret: true` is passed. Mirrors `rotateSecret`'s
|
|
141
191
|
* default-on validation contract.
|
|
142
192
|
*
|
|
143
|
-
* `db.
|
|
144
|
-
* on top of this primitive and additionally requires the OLD
|
|
193
|
+
* `db.team.rotateSecret()` adds a `checkGate('rotate-secret')` step
|
|
194
|
+
* on top of this primitive and additionally requires the OLD secret
|
|
145
195
|
* for re-derivation; `changeSecret` reuses the cached unlocked KEK so
|
|
146
|
-
* the OLD
|
|
196
|
+
* the OLD secret is not retyped.
|
|
147
197
|
*/
|
|
148
|
-
export declare function changeSecret(
|
|
149
|
-
allowWeakPassphrase?: boolean;
|
|
150
|
-
}): Promise<UnlockedKeyring>;
|
|
198
|
+
export declare function changeSecret(store: NoydbStore, vault: string, keyring: UnlockedKeyring, opts: ChangeSecretOptions): Promise<UnlockedKeyring>;
|
|
151
199
|
/**
|
|
152
200
|
* Recipient slot in a re-keyed `.noydb` bundle. Each slot becomes its
|
|
153
|
-
* own keyring file inside the bundle, sealed with its own
|
|
154
|
-
* Same role/permission semantics as `db.grant()` but no
|
|
201
|
+
* own keyring file inside the bundle, sealed with its own secret.
|
|
202
|
+
* Same role/permission semantics as `db.grant()` but no store side
|
|
155
203
|
* effect — the slot only exists inside the bundle bytes.
|
|
156
204
|
*
|
|
157
205
|
* @public
|
|
@@ -161,8 +209,8 @@ export interface BundleRecipient {
|
|
|
161
209
|
readonly id: string;
|
|
162
210
|
/** Optional display name. Defaults to `id`. */
|
|
163
211
|
readonly displayName?: string;
|
|
164
|
-
/**
|
|
165
|
-
readonly
|
|
212
|
+
/** Secret the recipient will type to unlock. */
|
|
213
|
+
readonly secret: string;
|
|
166
214
|
/** Role on the destination vault. Defaults to `'viewer'`. */
|
|
167
215
|
readonly role?: Role;
|
|
168
216
|
/**
|
|
@@ -193,7 +241,7 @@ export interface BundleRecipient {
|
|
|
193
241
|
}
|
|
194
242
|
/**
|
|
195
243
|
* Build a `KeyringFile` for one bundle recipient, given the source
|
|
196
|
-
* vault's unwrapped DEKs. Mirrors `grant()` minus the
|
|
244
|
+
* vault's unwrapped DEKs. Mirrors `grant()` minus the store write —
|
|
197
245
|
* the produced file is meant to be embedded in the bundle's
|
|
198
246
|
* `keyrings` map, never persisted to the source vault.
|
|
199
247
|
*
|
|
@@ -204,7 +252,7 @@ export interface BundleRecipient {
|
|
|
204
252
|
*/
|
|
205
253
|
export declare function buildRecipientKeyringFile(callerKeyring: UnlockedKeyring, recipient: BundleRecipient): Promise<KeyringFile>;
|
|
206
254
|
/** List all users with access to a vault. */
|
|
207
|
-
export declare function listUsers(
|
|
255
|
+
export declare function listUsers(store: NoydbStore, vault: string): Promise<UserInfo[]>;
|
|
208
256
|
/**
|
|
209
257
|
* Optional filter knobs for {@link listUsersWithEnvelopes}.
|
|
210
258
|
*
|
|
@@ -254,18 +302,18 @@ export interface ListUsersOptions {
|
|
|
254
302
|
* Order matches `listUsers()` (store-defined; sort if you need a
|
|
255
303
|
* stable display order).
|
|
256
304
|
*/
|
|
257
|
-
export declare function listUsersWithEnvelopes<T = unknown>(
|
|
305
|
+
export declare function listUsersWithEnvelopes<T = unknown>(store: NoydbStore, vault: string, userEnvelopeDek: EnclaveKey, callerRole: Role, options?: ListUsersOptions): Promise<Array<{
|
|
258
306
|
user: UserInfo;
|
|
259
|
-
envelope:
|
|
307
|
+
envelope: UserEnvelope<T> | null;
|
|
260
308
|
}>>;
|
|
261
309
|
/** Ensure a DEK exists for a collection. Generates one if new. */
|
|
262
|
-
export declare function ensureCollectionDEK(
|
|
310
|
+
export declare function ensureCollectionDEK(store: NoydbStore, vault: string, keyring: UnlockedKeyring): Promise<(collectionName: string) => Promise<EnclaveKey>>;
|
|
263
311
|
/** Check if a user has write permission for a collection. */
|
|
264
312
|
export declare function hasWritePermission(keyring: UnlockedKeyring, collectionName: string): boolean;
|
|
265
313
|
/** Check if a user has any access to a collection. */
|
|
266
314
|
export declare function hasAccess(keyring: UnlockedKeyring, collectionName: string): boolean;
|
|
267
|
-
/** Persist a keyring file to the
|
|
268
|
-
export declare function persistKeyring(
|
|
315
|
+
/** Persist a keyring file to the store. */
|
|
316
|
+
export declare function persistKeyring(store: NoydbStore, vault: string, keyring: UnlockedKeyring): Promise<void>;
|
|
269
317
|
/**
|
|
270
318
|
* Check whether a keyring is authorised for a given `@noy-db/as-*`
|
|
271
319
|
* export tier.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Managed-
|
|
2
|
+
* Managed-secret mode — rubber-hose-resistant vaults.
|
|
3
3
|
*
|
|
4
|
-
* A vault mode where the
|
|
4
|
+
* A vault mode where the secret is machine-generated and never
|
|
5
5
|
* exposed to the user, sealed under a developer-provided
|
|
6
6
|
* {@link SealingKeyProvider} (macOS Keychain, Windows Credential
|
|
7
7
|
* Manager, libsecret, AWS KMS, …). The user has no secret to give
|
|
@@ -27,31 +27,31 @@
|
|
|
27
27
|
* implementation of both `RecipientSealer` and
|
|
28
28
|
* `SealingKeyProvider` using real WebCrypto RSA-OAEP + AES-GCM;
|
|
29
29
|
* safe for tests and same-process sender/recipient scenarios.
|
|
30
|
-
* - {@link
|
|
31
|
-
* plaintext envelope storage at `_meta/sealed-
|
|
30
|
+
* - {@link loadSealedSecret} / {@link saveSealedSecret} —
|
|
31
|
+
* plaintext envelope storage at `_meta/sealed-secret`.
|
|
32
32
|
* Mirrors the `_meta/handle` and `_meta/public-envelope` AES-
|
|
33
33
|
* GCM-bypassed patterns. The sealing layer (provider's job)
|
|
34
34
|
* is the security boundary; hub doesn't have a key to encrypt
|
|
35
35
|
* with at this layer — that's the whole point of the design.
|
|
36
36
|
* - {@link resolveManagedSecret} — orchestrates the "generate +
|
|
37
37
|
* seal + persist on first open; unseal on reopen" flow.
|
|
38
|
-
* Returns the plaintext
|
|
38
|
+
* Returns the plaintext secret string that the rest of the
|
|
39
39
|
* `createNoydb` keyring path consumes.
|
|
40
40
|
*
|
|
41
41
|
* Deferred to follow-ups:
|
|
42
|
-
* - Block `rotate-
|
|
42
|
+
* - Block `rotate-secret` policy gate under managed mode.
|
|
43
43
|
* - Mandatory strong-recovery enforcement.
|
|
44
44
|
* - Recovery flow under managed mode (generates fresh sealed phrase).
|
|
45
45
|
*
|
|
46
|
-
* @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/session-tiers.md → Managed-
|
|
46
|
+
* @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/session-tiers.md → Managed-secret mode
|
|
47
47
|
*
|
|
48
48
|
* @module
|
|
49
49
|
*/
|
|
50
50
|
import type { NoydbStore, RecipientSealer } from '../../kernel/types.js';
|
|
51
51
|
/**
|
|
52
52
|
* The contract concrete providers (per-platform key stores) implement
|
|
53
|
-
* to seal and unseal a hub-generated random
|
|
54
|
-
*
|
|
53
|
+
* to seal and unseal a hub-generated random secret. The plaintext
|
|
54
|
+
* secret NEVER leaves hub-controlled memory in unsealed form —
|
|
55
55
|
* the provider receives the bytes, returns opaque sealed bytes, and
|
|
56
56
|
* later reverses the operation. Hub treats the sealed bytes as
|
|
57
57
|
* fully opaque.
|
|
@@ -69,7 +69,7 @@ import type { NoydbStore, RecipientSealer } from '../../kernel/types.js';
|
|
|
69
69
|
export interface SealingKeyProvider {
|
|
70
70
|
/**
|
|
71
71
|
* Non-sensitive identifier disclosed in the persisted envelope.
|
|
72
|
-
* Surfaced to consumers via `
|
|
72
|
+
* Surfaced to consumers via `loadSealedSecret().providerId` so
|
|
73
73
|
* a vault opened with the wrong provider class can detect the
|
|
74
74
|
* mismatch and surface a clear error. NOT secret — fine to log.
|
|
75
75
|
*
|
|
@@ -78,8 +78,8 @@ export interface SealingKeyProvider {
|
|
|
78
78
|
* parses this; it's purely audit metadata.
|
|
79
79
|
*/
|
|
80
80
|
readonly id: string;
|
|
81
|
-
/** Seal raw
|
|
82
|
-
seal(
|
|
81
|
+
/** Seal raw secret bytes. Output bytes are opaque to hub. */
|
|
82
|
+
seal(secret: Uint8Array): Promise<Uint8Array>;
|
|
83
83
|
/**
|
|
84
84
|
* Reverse {@link seal}. MUST throw on tamper, wrong-provider, or
|
|
85
85
|
* any other failure — hub treats a thrown error as "this provider
|
|
@@ -90,7 +90,7 @@ export interface SealingKeyProvider {
|
|
|
90
90
|
/**
|
|
91
91
|
* In-memory test provider. NOT secure — uses a deterministic
|
|
92
92
|
* per-instance "key" (16-byte SHA-256 of `id`) XOR'd over the
|
|
93
|
-
*
|
|
93
|
+
* secret plus a 4-byte provider-id fingerprint prefix. The XOR is
|
|
94
94
|
* sufficient to make different `id` values produce mutually-unsealable
|
|
95
95
|
* outputs (the contract tests for that), but offers ZERO real
|
|
96
96
|
* confidentiality — never use outside tests.
|
|
@@ -104,7 +104,7 @@ export declare class MemorySealingKeyProvider implements SealingKeyProvider {
|
|
|
104
104
|
constructor(opts: {
|
|
105
105
|
id: string;
|
|
106
106
|
});
|
|
107
|
-
seal(
|
|
107
|
+
seal(secret: Uint8Array): Promise<Uint8Array>;
|
|
108
108
|
unseal(sealed: Uint8Array): Promise<Uint8Array>;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
@@ -201,17 +201,17 @@ export declare class MemoryRecipientSealer implements SealingKeyProvider, Recipi
|
|
|
201
201
|
seal(plaintext: Uint8Array): Promise<Uint8Array>;
|
|
202
202
|
unseal(bytes: Uint8Array): Promise<Uint8Array>;
|
|
203
203
|
}
|
|
204
|
-
/** Reserved id for the managed-
|
|
205
|
-
export declare const
|
|
206
|
-
/** Plaintext payload stored inside the `_meta/sealed-
|
|
207
|
-
export interface
|
|
204
|
+
/** Reserved id for the managed-secret envelope under `_meta`. */
|
|
205
|
+
export declare const SEALED_SECRET_RECORD_ID: "sealed-secret";
|
|
206
|
+
/** Plaintext payload stored inside the `_meta/sealed-secret` envelope. */
|
|
207
|
+
export interface SealedSecret {
|
|
208
208
|
readonly _noydb_sealed: 1;
|
|
209
209
|
readonly providerId: string;
|
|
210
210
|
/** Sealed bytes. Base64-encoded on the wire; decoded on load. */
|
|
211
211
|
readonly sealed: Uint8Array;
|
|
212
212
|
}
|
|
213
213
|
/**
|
|
214
|
-
* Wire-format envelope persisted at `_meta/sealed-
|
|
214
|
+
* Wire-format envelope persisted at `_meta/sealed-secret` for
|
|
215
215
|
* managed-mode vaults. The provider produces raw sealed bytes via
|
|
216
216
|
* {@link SealingKeyProvider.seal}; this wrapper carries the dispatch
|
|
217
217
|
* metadata hub needs to pick the right provider on the unseal path.
|
|
@@ -237,8 +237,8 @@ export interface SealedEnvelope {
|
|
|
237
237
|
readonly payload: string;
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
|
-
* Parse a `_meta/sealed-
|
|
241
|
-
* in-memory {@link
|
|
240
|
+
* Parse a `_meta/sealed-secret` `_data` JSON string into the
|
|
241
|
+
* in-memory {@link SealedSecret} representation. Accepts both:
|
|
242
242
|
*
|
|
243
243
|
* 1. v1 wire format `{ v: 1, _noydb_sealed: 1, pid, payload }` —
|
|
244
244
|
* the current shape.
|
|
@@ -251,20 +251,20 @@ export interface SealedEnvelope {
|
|
|
251
251
|
*
|
|
252
252
|
* @internal — exported only for the migration safety-net test suite.
|
|
253
253
|
*/
|
|
254
|
-
export declare function parseSealedEnvelope(raw: unknown):
|
|
255
|
-
export declare function
|
|
254
|
+
export declare function parseSealedEnvelope(raw: unknown): SealedSecret | undefined;
|
|
255
|
+
export declare function saveSealedSecret(store: NoydbStore, vault: string, payload: {
|
|
256
256
|
readonly providerId: string;
|
|
257
257
|
readonly sealed: Uint8Array;
|
|
258
258
|
}): Promise<void>;
|
|
259
|
-
export declare function
|
|
259
|
+
export declare function loadSealedSecret(store: NoydbStore, vault: string): Promise<SealedSecret | undefined>;
|
|
260
260
|
/**
|
|
261
|
-
* Resolve the effective plaintext
|
|
261
|
+
* Resolve the effective plaintext secret string for a managed-mode
|
|
262
262
|
* vault. Two paths:
|
|
263
263
|
*
|
|
264
264
|
* 1. **First open (no envelope persisted):** generate a 256-bit random
|
|
265
265
|
* via `crypto.getRandomValues`, base64-encode for use as a
|
|
266
|
-
*
|
|
267
|
-
* provider, persist `_meta/sealed-
|
|
266
|
+
* secret string, seal the underlying bytes under the
|
|
267
|
+
* provider, persist `_meta/sealed-secret`, return the
|
|
268
268
|
* base64 string.
|
|
269
269
|
*
|
|
270
270
|
* 2. **Reopen (envelope exists):** read + unseal + decode → return.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Noydb-side auth / recovery / enrollment facade.
|
|
3
3
|
*
|
|
4
4
|
* Holds the tier-2 authenticator enrollment/unlock wrappers, WebAuthn
|
|
5
|
-
* enrollment, auth-config introspection, the tier-1
|
|
5
|
+
* enrollment, auth-config introspection, the tier-1 secret
|
|
6
6
|
* rotate/recover flows, the paper/Shamir recovery rotate/enroll flows,
|
|
7
|
-
* managed-
|
|
7
|
+
* managed-secret recovery, peer-recovery, tier-3 PIN unlock, and the
|
|
8
8
|
* public `getKeyring` accessor.
|
|
9
9
|
*
|
|
10
10
|
* The near-parallel rotate/recover variants (managed vs user vs paper vs
|
|
@@ -16,17 +16,18 @@
|
|
|
16
16
|
* (`assertRecoveryEnrolled`), `openVault`, and the one-shot
|
|
17
17
|
* managed-recovery skip flag stay kernel-resident and arrive as callbacks.
|
|
18
18
|
*
|
|
19
|
-
* Internal service — reached through `noydb.
|
|
19
|
+
* Internal service — reached through `noydb.team.rotateSecret(...)` etc.
|
|
20
20
|
*/
|
|
21
21
|
import type { NoydbOptions, NoydbStore, KeyringAuthenticator } from '../../kernel/types.js';
|
|
22
|
-
import
|
|
22
|
+
import type { RotateResult, RotateKeysOptions } from './keyring.js';
|
|
23
|
+
import { type RotateSecretInput, type RecoverSecretInput, type RecoverSecretResult, type RotateRecoveryOptions, type RotateRecoveryResult, type EnrollRecoveryResult, type RecoveryEnrollmentInput, type RecoveryProof } from './rotate-recover.js';
|
|
23
24
|
import { type RecoverUserOptions } from './peer-recover.js';
|
|
24
25
|
import { type PaperRecoveryEntry, type ShamirRecoveryEntry } from './recovery.js';
|
|
25
26
|
import type { Vault } from '../../kernel/vault.js';
|
|
26
27
|
import type { UnlockedKeyring } from './keyring.js';
|
|
27
28
|
import { type EnrollAuthenticatorOptions, type UpdateAuthenticatorOptions } from './authenticators.js';
|
|
28
29
|
import type { QuickUnlockStore, QuickUnlockState } from '../session/unlock-state.js';
|
|
29
|
-
import type {
|
|
30
|
+
import type { SecretPolicy } from '../../kernel/validation.js';
|
|
30
31
|
import type { ActiveTier, FactorProofBundle, GateName, GrantOptions, ReAuthOperation, RevokeOptions, VaultPolicy } from '../../kernel/types.js';
|
|
31
32
|
/** NoydbOptions with the store resolved to a non-optional value (internal use only). */
|
|
32
33
|
type ResolvedNoydbOptions = NoydbOptions & {
|
|
@@ -34,7 +35,7 @@ type ResolvedNoydbOptions = NoydbOptions & {
|
|
|
34
35
|
};
|
|
35
36
|
/** Everything the moving auth/recovery/enrollment methods touched on the Noydb instance's `this.*`. */
|
|
36
37
|
export interface TeamFacadeDeps {
|
|
37
|
-
/** Resolved Noydb options (store, user,
|
|
38
|
+
/** Resolved Noydb options (store, user, secretMode, sealingKey, shamirRecovery, …). */
|
|
38
39
|
readonly options: ResolvedNoydbOptions;
|
|
39
40
|
/** Live unlocked-keyring cache (Noydb-resident; read/written by reference). */
|
|
40
41
|
readonly keyringCache: Map<string, UnlockedKeyring>;
|
|
@@ -72,7 +73,7 @@ export declare class TeamFacade {
|
|
|
72
73
|
/** Gate + run a `revoke` engine. See `Noydb.revoke` for the public contract. */
|
|
73
74
|
runRevoke(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<void>, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
|
|
74
75
|
/** Gate + run a `rotateKeys` engine. See `Noydb.rotate` for the public contract. */
|
|
75
|
-
runRotate(engine: (
|
|
76
|
+
runRotate(engine: (store: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, opts: RotateKeysOptions) => Promise<RotateResult>, vault: string, collections: string[]): Promise<RotateResult>;
|
|
76
77
|
/**
|
|
77
78
|
* Add a tier-2 authenticator slot to the calling user's keyring.
|
|
78
79
|
* Each slot independently wraps the SAME KEK under a method-specific
|
|
@@ -143,7 +144,7 @@ export declare class TeamFacade {
|
|
|
143
144
|
* ```ts
|
|
144
145
|
* import { enrollWebAuthn } from '@noy-db/on-webauthn'
|
|
145
146
|
*
|
|
146
|
-
* await db.enrollWebAuthn('demo', async (keyring) => {
|
|
147
|
+
* await db.team.enrollWebAuthn('demo', async (keyring) => {
|
|
147
148
|
* const e = await enrollWebAuthn(keyring, 'demo', { rp: {...} })
|
|
148
149
|
* return {
|
|
149
150
|
* id: `webauthn-${e.credentialId.slice(0, 8)}`,
|
|
@@ -207,38 +208,38 @@ export declare class TeamFacade {
|
|
|
207
208
|
description: string;
|
|
208
209
|
}>>;
|
|
209
210
|
/**
|
|
210
|
-
* Rotate the user's
|
|
211
|
-
* new phrase against the configured `
|
|
212
|
-
* `rotate-
|
|
211
|
+
* Rotate the user's secret (user remembers old). Validates the
|
|
212
|
+
* new phrase against the configured `secret` policy, runs the
|
|
213
|
+
* `rotate-secret` gate, then re-derives + re-wraps every DEK.
|
|
213
214
|
*
|
|
214
215
|
* Tier-2 authenticator slots are dropped — each slot wraps the old
|
|
215
216
|
* KEK and would need its derivation key to be re-presented. Re-enrol
|
|
216
217
|
* via `db.enrollAuthenticator` after rotation.
|
|
217
218
|
*
|
|
218
|
-
* @throws `
|
|
219
|
+
* @throws `WeakSecretError` on a weak new phrase.
|
|
219
220
|
* @throws `PolicyDeniedError` when the gate denies (missing factor, …).
|
|
220
|
-
* @throws `InvalidKeyError` when `
|
|
221
|
+
* @throws `InvalidKeyError` when `oldSecret` is wrong.
|
|
221
222
|
*/
|
|
222
|
-
|
|
223
|
+
rotateSecret(vault: string, input: RotateSecretInput, factors?: FactorProofBundle): Promise<void>;
|
|
223
224
|
/**
|
|
224
|
-
* Reset the
|
|
225
|
+
* Reset the secret using a recovery proof (user forgot the old).
|
|
225
226
|
* Currently supports the `'paper'` profile end-to-end; the
|
|
226
227
|
* other profiles throw {@link RecoveryProfileNotImplementedError}.
|
|
227
228
|
*
|
|
228
229
|
* Burns the used recovery entry on success.
|
|
229
230
|
*/
|
|
230
|
-
|
|
231
|
+
recoverSecret(vault: string, input: RecoverSecretInput, factors?: FactorProofBundle): Promise<RecoverSecretResult>;
|
|
231
232
|
/**
|
|
232
233
|
* Deliberate paper-recovery-code regeneration. User knows their
|
|
233
|
-
*
|
|
234
|
+
* secret but wants a fresh sheet — they lost the printout or
|
|
234
235
|
* suspect compromise of the off-site copy.
|
|
235
236
|
*
|
|
236
|
-
* Symmetric to {@link
|
|
237
|
+
* Symmetric to {@link rotateSecret} for the recovery profile:
|
|
237
238
|
* gated, audit-trackable, ergonomic. Replaces (not appends) the
|
|
238
239
|
* paper sheet under `_meta/recovery-paper` in a single envelope `put`.
|
|
239
240
|
*
|
|
240
241
|
* Gated by the `rotate-recovery` policy gate:
|
|
241
|
-
* - PERSONAL_POLICY: `{ minTier: 1 }` — knowing the
|
|
242
|
+
* - PERSONAL_POLICY: `{ minTier: 1 }` — knowing the secret
|
|
242
243
|
* suffices, matching the lower-level flow's bar.
|
|
243
244
|
* - STRICT_POLICY: `{ minTier: 1, factors: [{ anyOf: ['totp',
|
|
244
245
|
* 'email-otp', 'webauthn-roaming'] }] }` — rotation is an
|
|
@@ -258,13 +259,13 @@ export declare class TeamFacade {
|
|
|
258
259
|
*
|
|
259
260
|
* @example Default count + show-once UI
|
|
260
261
|
* ```ts
|
|
261
|
-
* const { newCodes } = await db.rotateRecovery('acme', { profile: 'paper' })
|
|
262
|
+
* const { newCodes } = await db.team.rotateRecovery('acme', { profile: 'paper' })
|
|
262
263
|
* showCodesToUser(newCodes)
|
|
263
264
|
* ```
|
|
264
265
|
*
|
|
265
266
|
* @example STRICT-policy site with TOTP factor proof
|
|
266
267
|
* ```ts
|
|
267
|
-
* await db.rotateRecovery(
|
|
268
|
+
* await db.team.rotateRecovery(
|
|
268
269
|
* 'acme',
|
|
269
270
|
* { profile: 'paper', count: 10 },
|
|
270
271
|
* { factors: [{ kind: 'totp', proof: '123456' }] },
|
|
@@ -278,7 +279,7 @@ export declare class TeamFacade {
|
|
|
278
279
|
* **Atomic create-and-enroll for managed-mode vaults.**
|
|
279
280
|
*
|
|
280
281
|
* Bootstraps a managed-mode vault and enrolls strong recovery in
|
|
281
|
-
* a single ceremony. Under `
|
|
282
|
+
* a single ceremony. Under `secretMode: 'managed'`, every
|
|
282
283
|
* `openVault` call requires a strong recovery profile (Shamir
|
|
283
284
|
* today) to be enrolled — otherwise it throws
|
|
284
285
|
* {@link ManagedRecoveryNotEnrolledError}. This method bypasses
|
|
@@ -297,11 +298,11 @@ export declare class TeamFacade {
|
|
|
297
298
|
* ```ts
|
|
298
299
|
* const db = await createNoydb({
|
|
299
300
|
* store, user: 'alice',
|
|
300
|
-
*
|
|
301
|
+
* secretMode: 'managed',
|
|
301
302
|
* sealingKey: macosKeychainSealingProvider({ ... }),
|
|
302
303
|
* })
|
|
303
304
|
*
|
|
304
|
-
* const { vault, recoveryEnrollments } = await db.openVaultAndEnrollRecovery('acme', {
|
|
305
|
+
* const { vault, recoveryEnrollments } = await db.team.openVaultAndEnrollRecovery('acme', {
|
|
305
306
|
* recovery: [{ profile: 'shamir', k: 2, n: 3 }],
|
|
306
307
|
* })
|
|
307
308
|
* for (const r of recoveryEnrollments) {
|
|
@@ -320,20 +321,20 @@ export declare class TeamFacade {
|
|
|
320
321
|
readonly recoveryEnrollments: ReadonlyArray<EnrollRecoveryResult>;
|
|
321
322
|
}>;
|
|
322
323
|
/**
|
|
323
|
-
* **Recovery flow under managed-
|
|
324
|
+
* **Recovery flow under managed-secret mode.**
|
|
324
325
|
*
|
|
325
|
-
* Replaces the sealed
|
|
326
|
+
* Replaces the sealed secret of a managed-mode vault with a
|
|
326
327
|
* fresh 256-bit random, sealed under the configured
|
|
327
|
-
* `SealingKeyProvider`. The user never sees the new
|
|
328
|
+
* `SealingKeyProvider`. The user never sees the new secret.
|
|
328
329
|
*
|
|
329
330
|
* Internally:
|
|
330
331
|
* 1. Verify the recovery proof (Shamir today) and unwrap the
|
|
331
332
|
* DEK set.
|
|
332
|
-
* 2. Mint a fresh 256-bit random as the new effective
|
|
333
|
+
* 2. Mint a fresh 256-bit random as the new effective secret.
|
|
333
334
|
* 3. Rewrap the DEK set under a fresh KEK derived from the new
|
|
334
|
-
*
|
|
335
|
+
* secret (via the existing `recoverSecret` path).
|
|
335
336
|
* 4. Seal the random bytes under the provider and overwrite
|
|
336
|
-
* `_meta/sealed-
|
|
337
|
+
* `_meta/sealed-secret`.
|
|
337
338
|
* 5. Drop the keyring cache so the next operation re-derives.
|
|
338
339
|
*
|
|
339
340
|
* The vault's strong-recovery enrollment is preserved across
|
|
@@ -341,13 +342,13 @@ export declare class TeamFacade {
|
|
|
341
342
|
*
|
|
342
343
|
* @throws ValidationError if the Noydb instance is not in managed mode.
|
|
343
344
|
*/
|
|
344
|
-
|
|
345
|
+
recoverManagedSecret(vault: string, options: {
|
|
345
346
|
readonly recoveryProof: RecoveryProof;
|
|
346
|
-
readonly
|
|
347
|
+
readonly secretPolicy?: SecretPolicy;
|
|
347
348
|
}): Promise<void>;
|
|
348
349
|
/**
|
|
349
350
|
* Atomic peer-recovery — re-wraps an EXISTING user's keyring under
|
|
350
|
-
* a fresh temp
|
|
351
|
+
* a fresh temp secret in a single store write. Closes the
|
|
351
352
|
* partial-failure window (the previous compose-from-primitives
|
|
352
353
|
* pattern was `db.revoke + db.grant`, two writes — if the issuer
|
|
353
354
|
* cancelled between them the target was locked out entirely).
|
|
@@ -366,17 +367,17 @@ export declare class TeamFacade {
|
|
|
366
367
|
* recovery / TOTP / email-OTP factor proof at the moment of
|
|
367
368
|
* recovery, so the issuer affirmatively re-asserts identity.
|
|
368
369
|
*
|
|
369
|
-
* The recipient should call `db.
|
|
370
|
+
* The recipient should call `db.rotateSecret` on first session
|
|
370
371
|
* to choose their own phrase — the temp acts as a single-use
|
|
371
372
|
* bridge.
|
|
372
373
|
*
|
|
373
374
|
* ```ts
|
|
374
|
-
* await db.recoverUser('acme', {
|
|
375
|
+
* await db.team.recoverUser('acme', {
|
|
375
376
|
* userId: 'bob',
|
|
376
|
-
*
|
|
377
|
+
* secret: 'temporary-correct-horse-battery-staple-printer',
|
|
377
378
|
* }, { factors: [{ kind: 'recovery' }] })
|
|
378
379
|
* // Bob opens createNoydb({ user: 'bob', secret: tempPhrase })
|
|
379
|
-
* // and immediately calls db.
|
|
380
|
+
* // and immediately calls db.rotateSecret to set his own.
|
|
380
381
|
* ```
|
|
381
382
|
*
|
|
382
383
|
* @throws `NoAccessError` when no keyring exists for the target.
|
|
@@ -395,17 +396,17 @@ export declare class TeamFacade {
|
|
|
395
396
|
* The hub wraps the user's DEK set (not the KEK) under a code-derived
|
|
396
397
|
* AES-GCM key — see `team/recovery.ts` for the rationale. The mint
|
|
397
398
|
* helper {@link mintPaperRecoveryEntry} is the canonical primitive;
|
|
398
|
-
* pair it with `db.getKeyring(vault)` to obtain the live DEK set:
|
|
399
|
+
* pair it with `db.team.getKeyring(vault)` to obtain the live DEK set:
|
|
399
400
|
*
|
|
400
401
|
* ```ts
|
|
401
402
|
* import { mintPaperRecoveryEntry } from '@noy-db/hub'
|
|
402
403
|
*
|
|
403
|
-
* const keyring = await db.getKeyring('acme')
|
|
404
|
+
* const keyring = await db.team.getKeyring('acme')
|
|
404
405
|
* const codes: string[] = ['CORRECT-HORSE-1', 'BATTERY-STAPLE-2', ...]
|
|
405
406
|
* const entries = await Promise.all(
|
|
406
407
|
* codes.map((code, i) => mintPaperRecoveryEntry(keyring.deks, code, `code-${i}`)),
|
|
407
408
|
* )
|
|
408
|
-
* await db.enrollRecovery('acme', { profile: 'paper', entries })
|
|
409
|
+
* await db.team.enrollRecovery('acme', { profile: 'paper', entries })
|
|
409
410
|
* showCodesToUser(codes)
|
|
410
411
|
* ```
|
|
411
412
|
*
|
|
@@ -416,7 +417,7 @@ export declare class TeamFacade {
|
|
|
416
417
|
* ```ts
|
|
417
418
|
* import { generateRecoveryCodeSet } from '@noy-db/on-recovery'
|
|
418
419
|
* const { codes, entries } = await generateRecoveryCodeSet({ deks: keyring.deks, count: 8 })
|
|
419
|
-
* await db.enrollRecovery('acme', { profile: 'paper', entries })
|
|
420
|
+
* await db.team.enrollRecovery('acme', { profile: 'paper', entries })
|
|
420
421
|
* ```
|
|
421
422
|
*/
|
|
422
423
|
enrollRecovery(vault: string, enrollment: RecoveryEnrollmentInput): Promise<EnrollRecoveryResult>;
|
|
@@ -473,7 +474,7 @@ export declare class TeamFacade {
|
|
|
473
474
|
* and no `secret` / `getKeyring` is configured.
|
|
474
475
|
*
|
|
475
476
|
* ```ts
|
|
476
|
-
* const keyring = await db.getKeyring('acme')
|
|
477
|
+
* const keyring = await db.team.getKeyring('acme')
|
|
477
478
|
* // keyring.deks: Map<collection, CryptoKey>
|
|
478
479
|
* // keyring.kek: CryptoKey | null (null for tier-3 / wrap-DEKs sessions)
|
|
479
480
|
* // keyring.role / .permissions / .authenticators
|