@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
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* gate `peer-recover-user` carries the freshness requirement.
|
|
23
23
|
* 5. **Tier-2 slots dropped.** The slots wrap the OLD KEK under
|
|
24
24
|
* method-derived keys; after recovery the KEK is re-derived
|
|
25
|
-
* from the new temp
|
|
25
|
+
* from the new temp secret. Match `rotateSecret`'s
|
|
26
26
|
* precedent — the recovered user re-enrols slots after picking
|
|
27
27
|
* their own phrase.
|
|
28
28
|
*
|
|
@@ -34,47 +34,47 @@
|
|
|
34
34
|
* @module
|
|
35
35
|
*/
|
|
36
36
|
import type { NoydbStore, Role } from '../../kernel/types.js';
|
|
37
|
-
import { type
|
|
37
|
+
import { type SecretPolicy } from '../../kernel/validation.js';
|
|
38
38
|
import type { UnlockedKeyring } from './keyring.js';
|
|
39
39
|
/** Input shape for {@link recoverUser}. */
|
|
40
40
|
export interface RecoverUserOptions {
|
|
41
41
|
/** Target user id whose keyring is being recovered. */
|
|
42
42
|
readonly userId: string;
|
|
43
43
|
/**
|
|
44
|
-
* Temporary
|
|
45
|
-
* The recipient should call `db.
|
|
44
|
+
* Temporary secret under which the new keyring is wrapped.
|
|
45
|
+
* The recipient should call `db.rotateSecret` immediately on
|
|
46
46
|
* acceptance to choose their own phrase — this temp acts as a
|
|
47
47
|
* single-use bridge in invite / peer-recovery flows.
|
|
48
48
|
*/
|
|
49
|
-
readonly
|
|
49
|
+
readonly secret: string;
|
|
50
50
|
/** Override the target's role. Defaults to the existing target's role. */
|
|
51
51
|
readonly role?: Role;
|
|
52
52
|
/** Override the target's display name. Defaults to existing. */
|
|
53
53
|
readonly displayName?: string;
|
|
54
54
|
/** Validate phrase strength against the configured policy. */
|
|
55
|
-
readonly
|
|
55
|
+
readonly validateSecret?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* Skip phrase strength validation even when `
|
|
57
|
+
* Skip phrase strength validation even when `validateSecret` is
|
|
58
58
|
* set. The escape hatch matches `grant`'s shape — used when the
|
|
59
59
|
* temp phrase is a high-entropy one-shot string that doesn't need
|
|
60
60
|
* to satisfy the human-typeable rules.
|
|
61
61
|
*/
|
|
62
|
-
readonly
|
|
62
|
+
readonly allowWeakSecret?: boolean;
|
|
63
63
|
/**
|
|
64
64
|
* Optional explicit phrase policy override (passed through to
|
|
65
|
-
* `
|
|
66
|
-
* `
|
|
65
|
+
* `assertStrongSecret`). Mirrors how `grant` accepts a custom
|
|
66
|
+
* `SecretPolicy` for app-specific tightening.
|
|
67
67
|
*/
|
|
68
|
-
readonly
|
|
68
|
+
readonly secretPolicy?: SecretPolicy;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Atomically rewrap the target user's keyring under a fresh temp
|
|
72
|
-
*
|
|
72
|
+
* secret. Single store write; no revoke step; no key rotation.
|
|
73
73
|
*
|
|
74
74
|
* Caller's responsibilities (NOT enforced here):
|
|
75
75
|
* - Run the `peer-recover-user` policy gate first via
|
|
76
76
|
* `Noydb.checkGate` to enforce the freshness factor proof.
|
|
77
|
-
* - Communicate the temp
|
|
77
|
+
* - Communicate the temp secret to the recipient via a secure
|
|
78
78
|
* channel (URL fragment, in-person, etc.) — the hub does not
|
|
79
79
|
* transport secrets.
|
|
80
80
|
*/
|
|
@@ -34,7 +34,7 @@ import type { ShamirRecoveryProvider } from './shamir-recovery-provider.js';
|
|
|
34
34
|
* we wrap a serialized DEK set: the entry holds the AES-GCM
|
|
35
35
|
* ciphertext of `{ deks: { collection: rawDekBase64 } }`. Recovery
|
|
36
36
|
* deserializes the DEK set, then mints a fresh KEK from the new
|
|
37
|
-
*
|
|
37
|
+
* secret and rewraps the DEKs under it.
|
|
38
38
|
*
|
|
39
39
|
* This is the same pattern `@noy-db/on-pin` uses for tier-3 quick
|
|
40
40
|
* resume — the cryptographic guarantee is identical (AES-GCM with a
|
|
@@ -67,8 +67,8 @@ export declare function hasRecoveryEnrolled(store: NoydbStore, vault: string): P
|
|
|
67
67
|
/**
|
|
68
68
|
* Whether at least one **strong** recovery profile is enrolled.
|
|
69
69
|
*
|
|
70
|
-
* "Strong" excludes paper-alone — under managed-
|
|
71
|
-
* user has no memorized
|
|
70
|
+
* "Strong" excludes paper-alone — under managed-secret mode the
|
|
71
|
+
* user has no memorized secret, so a stolen/lost paper sheet
|
|
72
72
|
* would be a single point of total loss. Strong profiles today:
|
|
73
73
|
*
|
|
74
74
|
* - `shamir` (k-of-n threshold; survives loss of up to n-k shares)
|
|
@@ -167,7 +167,7 @@ export declare function unwrapDeksFromShamirEntry(provider: ShamirRecoveryProvid
|
|
|
167
167
|
*
|
|
168
168
|
* Returns the serializable entry (persisted via
|
|
169
169
|
* {@link savePaperRecoveryEntries}). The recovery flow unwraps the
|
|
170
|
-
* DEK set, then mints a fresh KEK from the user's new
|
|
170
|
+
* DEK set, then mints a fresh KEK from the user's new secret.
|
|
171
171
|
*
|
|
172
172
|
* Thin wrapper over {@link mintWrappedDeksBlob} — the crypto
|
|
173
173
|
* lives in the shared primitive; this function just adds paper-
|
|
@@ -182,7 +182,7 @@ export declare function unwrapDeksFromShamirEntry(provider: ShamirRecoveryProvid
|
|
|
182
182
|
export declare function mintPaperRecoveryEntry(deks: Map<string, EnclaveKey>, code: string, codeId: string): Promise<PaperRecoveryEntry>;
|
|
183
183
|
/**
|
|
184
184
|
* Decrypt a recovery entry to recover the raw DEK set. Used by the
|
|
185
|
-
* `
|
|
185
|
+
* `recoverSecret` flow after the user's code has been parsed.
|
|
186
186
|
*
|
|
187
187
|
* Thin wrapper over {@link unwrapDeksFromBlob}.
|
|
188
188
|
*
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tier-1 change flows — `
|
|
3
|
-
* `
|
|
2
|
+
* Tier-1 change flows — `rotateSecret` (user remembers old) and
|
|
3
|
+
* `recoverSecret` (user supplies a recovery proof).
|
|
4
4
|
*
|
|
5
5
|
* The two flows share the post-verification half — fresh salt, fresh
|
|
6
6
|
* KEK, rewrap every DEK — and differ only in how they re-derive the
|
|
7
7
|
* old KEK:
|
|
8
8
|
*
|
|
9
|
-
* - **Rotate**: derive from the supplied `
|
|
9
|
+
* - **Rotate**: derive from the supplied `oldSecret`.
|
|
10
10
|
* - **Recover (paper)**: unwrap from a `RecoveryCodeEntry` using a
|
|
11
11
|
* user-supplied recovery code. The entry is burned on success.
|
|
12
12
|
*
|
|
@@ -20,12 +20,12 @@ import type { NoydbStore } from '../../kernel/types.js';
|
|
|
20
20
|
import { type EnclaveKey } from '../../kernel/enclave/index.js';
|
|
21
21
|
import { type PaperRecoveryEntry } from './recovery.js';
|
|
22
22
|
import type { ShamirRecoveryProvider } from './shamir-recovery-provider.js';
|
|
23
|
-
import { type
|
|
23
|
+
import { type SecretPolicy } from '../../kernel/validation.js';
|
|
24
24
|
import type { UnlockedKeyring } from './keyring.js';
|
|
25
25
|
import type { KeyringAuthenticator } from '../../kernel/types.js';
|
|
26
26
|
import type { EnrollAuthenticatorOptions } from './authenticators.js';
|
|
27
27
|
/**
|
|
28
|
-
* Context handed to a {@link SlotRewrapCeremony} when `
|
|
28
|
+
* Context handed to a {@link SlotRewrapCeremony} when `rotateSecret`
|
|
29
29
|
* preserves a tier-2 slot. The ceremony's job is to re-derive its
|
|
30
30
|
* method-specific wrapping material (PRF assertion, PBKDF2 of the
|
|
31
31
|
* password, etc.) and wrap the freshly rewrapped DEK set under
|
|
@@ -57,25 +57,25 @@ export interface SlotRewrapContext {
|
|
|
57
57
|
readonly oldSlot: KeyringAuthenticator;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Callback that re-enrolls one tier-2 slot during `
|
|
60
|
+
* Callback that re-enrolls one tier-2 slot during `rotateSecret`.
|
|
61
61
|
* Returns the new slot's `EnrollAuthenticatorOptions` — same shape
|
|
62
62
|
* the consumer would pass to `db.enrollAuthenticator` for a fresh
|
|
63
63
|
* enrollment. Hub persists the result atomically with the rotation.
|
|
64
64
|
*/
|
|
65
65
|
export type SlotRewrapCeremony = (ctx: SlotRewrapContext) => Promise<EnrollAuthenticatorOptions>;
|
|
66
|
-
/** Caller payload for {@link
|
|
67
|
-
export interface
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
66
|
+
/** Caller payload for {@link rotateSecret}. */
|
|
67
|
+
export interface RotateSecretInput {
|
|
68
|
+
readonly oldSecret: string;
|
|
69
|
+
readonly newSecret: string;
|
|
70
|
+
readonly secretPolicy?: SecretPolicy;
|
|
71
|
+
readonly allowWeakSecret?: boolean;
|
|
72
72
|
/**
|
|
73
73
|
* Map of slot id → re-enrolment ceremony. Slots whose id appears
|
|
74
74
|
* here are PRESERVED across rotation (the ceremony re-derives the
|
|
75
75
|
* method-specific wrapping under the new keyring); slots whose id
|
|
76
76
|
* is absent are DROPPED (the pre-slot-ceremony behavior).
|
|
77
77
|
*
|
|
78
|
-
* Without this map, `
|
|
78
|
+
* Without this map, `rotateSecret` wipes every tier-2 slot. Consumers building a
|
|
79
79
|
* "rotate without losing my biometric" flow supply ceremonies for
|
|
80
80
|
* each slot they want to keep.
|
|
81
81
|
*
|
|
@@ -90,8 +90,8 @@ export interface RotatePassphraseInput {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Re-derive the user's KEK from `
|
|
94
|
-
* under a freshly-derived KEK from `
|
|
93
|
+
* Re-derive the user's KEK from `oldSecret`, rewrap every DEK
|
|
94
|
+
* under a freshly-derived KEK from `newSecret`, and persist.
|
|
95
95
|
*
|
|
96
96
|
* Tier-2 authenticator slots are dropped UNLESS the caller supplies
|
|
97
97
|
* a `slotCeremonies` map — each ceremony re-derives its
|
|
@@ -99,14 +99,14 @@ export interface RotatePassphraseInput {
|
|
|
99
99
|
* the rewrapped slots atomically with the rotation. Slots whose id
|
|
100
100
|
* isn't in the map are still dropped.
|
|
101
101
|
*
|
|
102
|
-
* @throws `InvalidKeyError` if `
|
|
103
|
-
* @throws `
|
|
102
|
+
* @throws `InvalidKeyError` if `oldSecret` does not unwrap the keyring.
|
|
103
|
+
* @throws `WeakSecretError` if `newSecret` fails the strength rule.
|
|
104
104
|
* @throws `ValidationError` if a ceremony's result mismatches the
|
|
105
105
|
* slot's id or method (anti-slot-swap guard).
|
|
106
106
|
*/
|
|
107
|
-
export declare function
|
|
107
|
+
export declare function rotateSecret(store: NoydbStore, vault: string, userId: string, input: RotateSecretInput): Promise<UnlockedKeyring>;
|
|
108
108
|
/**
|
|
109
|
-
* Caller payload for {@link
|
|
109
|
+
* Caller payload for {@link recoverSecret}.
|
|
110
110
|
*
|
|
111
111
|
* `paper` and `shamir` are wired end-to-end.
|
|
112
112
|
* The remaining two profiles (`multi-channel`, `admin-mediated`)
|
|
@@ -129,11 +129,11 @@ export type RecoveryProof = {
|
|
|
129
129
|
readonly shares: ReadonlyArray<string>;
|
|
130
130
|
};
|
|
131
131
|
};
|
|
132
|
-
export interface
|
|
133
|
-
readonly
|
|
132
|
+
export interface RecoverSecretInput {
|
|
133
|
+
readonly newSecret: string;
|
|
134
134
|
readonly recoveryProof: RecoveryProof;
|
|
135
|
-
readonly
|
|
136
|
-
readonly
|
|
135
|
+
readonly secretPolicy?: SecretPolicy;
|
|
136
|
+
readonly allowWeakSecret?: boolean;
|
|
137
137
|
/**
|
|
138
138
|
* After a successful paper-recovery, replace ALL remaining recovery
|
|
139
139
|
* entries with freshly-minted ones. Defaults to `true` (defensive).
|
|
@@ -177,27 +177,27 @@ export interface RecoverPassphraseInput {
|
|
|
177
177
|
readonly codeGenerator?: () => string;
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Return shape of `db.
|
|
180
|
+
* Return shape of `db.recoverSecret`. `newCodes` is populated when
|
|
181
181
|
* `rotateRemainingCodes` was enabled and at least one entry was
|
|
182
182
|
* rotated; an empty array means no rotation happened (rotation
|
|
183
183
|
* disabled, or no remaining codes after burn). Show the codes to the
|
|
184
184
|
* user once — they are the canonical credential for future recovery
|
|
185
185
|
* and CANNOT be retrieved again.
|
|
186
186
|
*/
|
|
187
|
-
export interface
|
|
187
|
+
export interface RecoverSecretResult {
|
|
188
188
|
readonly newCodes: readonly string[];
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* Input for {@link Noydb.rotateRecovery} — deliberate
|
|
192
192
|
* recovery-credential regeneration when the user knows their
|
|
193
|
-
*
|
|
194
|
-
* (shamir). Symmetric to {@link
|
|
193
|
+
* secret but wants a fresh sheet (paper) or fresh shares
|
|
194
|
+
* (shamir). Symmetric to {@link RotateSecretInput}.
|
|
195
195
|
*/
|
|
196
196
|
export type RotateRecoveryOptions = {
|
|
197
197
|
readonly profile: 'paper';
|
|
198
198
|
/** How many fresh codes to mint. Default: existing sheet size. */
|
|
199
199
|
readonly count?: number;
|
|
200
|
-
/** Optional code generator — see {@link
|
|
200
|
+
/** Optional code generator — see {@link RecoverSecretInput.codeGenerator}. */
|
|
201
201
|
readonly codeGenerator?: () => string;
|
|
202
202
|
} | {
|
|
203
203
|
readonly profile: 'shamir';
|
|
@@ -265,11 +265,11 @@ export type RecoveryEnrollmentInput = {
|
|
|
265
265
|
readonly entryId?: string;
|
|
266
266
|
};
|
|
267
267
|
/**
|
|
268
|
-
* Reset the user's
|
|
268
|
+
* Reset the user's secret using a recovery proof.
|
|
269
269
|
* Supports `'paper'` and `'shamir'` profiles. The other profiles throw
|
|
270
270
|
* {@link RecoveryProfileNotImplementedError}.
|
|
271
271
|
*
|
|
272
272
|
* On success, the used recovery entry is burned (deleted from the
|
|
273
273
|
* stored set).
|
|
274
274
|
*/
|
|
275
|
-
export declare function
|
|
275
|
+
export declare function recoverSecret(provider: ShamirRecoveryProvider | undefined, store: NoydbStore, vault: string, userId: string, input: RecoverSecretInput): Promise<UnlockedKeyring>;
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
* **Why split read/load?** `readPod` returns the
|
|
27
27
|
* *unwrapped JSON string*, not a Vault object. The caller
|
|
28
28
|
* is responsible for piping that JSON into
|
|
29
|
-
* `vault.load(json,
|
|
30
|
-
* keeps the bundle module free of any crypto/
|
|
29
|
+
* `vault.load(json, secret)`. Splitting the layers
|
|
30
|
+
* keeps the bundle module free of any crypto/secret
|
|
31
31
|
* concerns — it's purely a format layer. The same `readPod`
|
|
32
32
|
* call can also feed verification tools, format inspectors, or
|
|
33
33
|
* archive utilities that don't care about decryption.
|
|
@@ -36,18 +36,18 @@ import { type NoydbPodHeader } from './format.js';
|
|
|
36
36
|
import type { Vault } from '../kernel/vault.js';
|
|
37
37
|
import type { BundleRecipient } from '../with-party/team/keyring.js';
|
|
38
38
|
import type { Cover } from '../with-party/directory/cover/types.js';
|
|
39
|
-
import type { SealingKeyProvider, RecipientSealer, RecipientHint } from '../with-party/team/managed-
|
|
39
|
+
import type { SealingKeyProvider, RecipientSealer, RecipientHint } from '../with-party/team/managed-secret.js';
|
|
40
40
|
/**
|
|
41
41
|
* The credential kinds that can be bundled for auto-unlock.
|
|
42
42
|
* WebAuthn is intentionally excluded — it is hardware-bound and
|
|
43
43
|
* cannot be embedded as a portable credential.
|
|
44
44
|
*/
|
|
45
|
-
export type AutoCredentialKind = '
|
|
45
|
+
export type AutoCredentialKind = 'secret' | 'password' | 'pin';
|
|
46
46
|
/**
|
|
47
47
|
* A typed credential for auto-unlock. Carries the credential `kind`
|
|
48
48
|
* alongside the plaintext `value`, so consumers can dispatch the
|
|
49
49
|
* correct login/prefill path rather than treating all credentials
|
|
50
|
-
* as
|
|
50
|
+
* as secrets.
|
|
51
51
|
*
|
|
52
52
|
* `bundle.ts` is a pure format layer — it carries the credential
|
|
53
53
|
* without interpreting it. The consumer is responsible for
|
|
@@ -112,17 +112,17 @@ export interface WritePodOptions {
|
|
|
112
112
|
/**
|
|
113
113
|
* Single-recipient re-keying shorthand. When set, the
|
|
114
114
|
* bundle's keyring is replaced with one freshly-derived entry sealed
|
|
115
|
-
* with this
|
|
115
|
+
* with this secret. The recipient inherits the source keyring's
|
|
116
116
|
* userId, role, and permissions. Mutually exclusive with `recipients`.
|
|
117
117
|
*/
|
|
118
|
-
readonly
|
|
118
|
+
readonly exportSecret?: string;
|
|
119
119
|
/**
|
|
120
120
|
* Multi-recipient re-keying. Replaces the bundle's keyring
|
|
121
121
|
* map with one slot per recipient, each sealed with its own
|
|
122
|
-
*
|
|
122
|
+
* secret. DEKs are unwrapped from the source keyring once and
|
|
123
123
|
* re-wrapped per recipient — record ciphertext is unchanged.
|
|
124
124
|
*
|
|
125
|
-
* Mutually exclusive with `
|
|
125
|
+
* Mutually exclusive with `exportSecret`. When neither is set,
|
|
126
126
|
* the bundle inherits the source keyring as-is (today's behaviour,
|
|
127
127
|
* suited to personal backup-and-restore).
|
|
128
128
|
*/
|
|
@@ -130,8 +130,8 @@ export interface WritePodOptions {
|
|
|
130
130
|
/**
|
|
131
131
|
* Auto-unlock — unsealed per-user credentials.
|
|
132
132
|
*
|
|
133
|
-
* Generalises `
|
|
134
|
-
* kind (`
|
|
133
|
+
* Generalises `autoSecrets` to support any bundleable credential
|
|
134
|
+
* kind (`secret` | `password` | `pin`).
|
|
135
135
|
*
|
|
136
136
|
* Public-by-design: anyone holding the bundle bytes can read these
|
|
137
137
|
* plaintext credentials. Use for demo data, sample vaults,
|
|
@@ -141,8 +141,8 @@ export interface WritePodOptions {
|
|
|
141
141
|
* bare `{ perUser }` without it is rejected at write time — the
|
|
142
142
|
* safety net against a careless call against a production vault.
|
|
143
143
|
*
|
|
144
|
-
* Mutually exclusive with `sealedCredentials`, `
|
|
145
|
-
* and `
|
|
144
|
+
* Mutually exclusive with `sealedCredentials`, `autoSecrets`,
|
|
145
|
+
* and `sealedSecrets`.
|
|
146
146
|
*/
|
|
147
147
|
readonly autoCredentials?: {
|
|
148
148
|
readonly policy: 'public-by-design';
|
|
@@ -152,8 +152,8 @@ export interface WritePodOptions {
|
|
|
152
152
|
* Auto-unlock — per-user credentials sealed under a
|
|
153
153
|
* {@link SealingKeyProvider}.
|
|
154
154
|
*
|
|
155
|
-
* Generalises `
|
|
156
|
-
* credential kind (`
|
|
155
|
+
* Generalises `sealedSecrets` to support any bundleable
|
|
156
|
+
* credential kind (`secret` | `password` | `pin`).
|
|
157
157
|
*
|
|
158
158
|
* The hub seals each user's plaintext credential under `provider`
|
|
159
159
|
* and embeds the resulting sealed envelopes in the bundle. The
|
|
@@ -170,8 +170,8 @@ export interface WritePodOptions {
|
|
|
170
170
|
* The bundle can only be unsealed by the holder of the matching
|
|
171
171
|
* private key.
|
|
172
172
|
*
|
|
173
|
-
* Mutually exclusive with `autoCredentials`, `
|
|
174
|
-
* and `
|
|
173
|
+
* Mutually exclusive with `autoCredentials`, `autoSecrets`,
|
|
174
|
+
* and `sealedSecrets`.
|
|
175
175
|
*/
|
|
176
176
|
readonly sealedCredentials?: {
|
|
177
177
|
readonly mode: 'self-target';
|
|
@@ -188,7 +188,7 @@ export interface WritePodOptions {
|
|
|
188
188
|
/**
|
|
189
189
|
* @deprecated Use `autoCredentials` instead.
|
|
190
190
|
*
|
|
191
|
-
* Auto-unlock — unsealed per-user
|
|
191
|
+
* Auto-unlock — unsealed per-user secrets.
|
|
192
192
|
*
|
|
193
193
|
* Public-by-design: anyone holding the bundle bytes can read these
|
|
194
194
|
* plaintext credentials. Use for demo data, sample vaults,
|
|
@@ -199,33 +199,33 @@ export interface WritePodOptions {
|
|
|
199
199
|
* safety net against a careless call against a production vault.
|
|
200
200
|
*
|
|
201
201
|
* Mutually exclusive with `autoCredentials`, `sealedCredentials`,
|
|
202
|
-
* and `
|
|
202
|
+
* and `sealedSecrets`.
|
|
203
203
|
*/
|
|
204
|
-
readonly
|
|
204
|
+
readonly autoSecrets?: {
|
|
205
205
|
readonly policy: 'public-by-design';
|
|
206
206
|
readonly perUser: Record<string, string>;
|
|
207
207
|
};
|
|
208
208
|
/**
|
|
209
209
|
* @deprecated Use `sealedCredentials` instead.
|
|
210
210
|
*
|
|
211
|
-
* Auto-unlock — per-user
|
|
211
|
+
* Auto-unlock — per-user secrets sealed under a
|
|
212
212
|
* {@link SealingKeyProvider} (self-target only).
|
|
213
213
|
*
|
|
214
|
-
* The hub seals each user's plaintext
|
|
214
|
+
* The hub seals each user's plaintext secret under `provider`
|
|
215
215
|
* and embeds the resulting sealed envelopes in the bundle. The
|
|
216
216
|
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
217
217
|
* `provider.id`) to auto-unseal on import.
|
|
218
218
|
*
|
|
219
|
-
* `mode: 'self-target'` is the only mode for `
|
|
219
|
+
* `mode: 'self-target'` is the only mode for `sealedSecrets` — sender
|
|
220
220
|
* and recipient share the same provider identity (same iCloud Keychain
|
|
221
221
|
* entry, same MDM-provisioned bundle id, same KMS account, etc.).
|
|
222
222
|
* For recipient-target sealing via the `RecipientSealer` interface,
|
|
223
223
|
* use `sealedCredentials` with `mode: 'recipient-target'` (§11.4).
|
|
224
224
|
*
|
|
225
225
|
* Mutually exclusive with `autoCredentials`, `sealedCredentials`,
|
|
226
|
-
* and `
|
|
226
|
+
* and `autoSecrets`.
|
|
227
227
|
*/
|
|
228
|
-
readonly
|
|
228
|
+
readonly sealedSecrets?: {
|
|
229
229
|
readonly mode: 'self-target';
|
|
230
230
|
readonly provider: SealingKeyProvider;
|
|
231
231
|
readonly perUser: Record<string, string>;
|
|
@@ -235,7 +235,7 @@ export interface WritePodOptions {
|
|
|
235
235
|
export type WriteNoydbBundleOptions = WritePodOptions;
|
|
236
236
|
/**
|
|
237
237
|
* Result returned by `readPod`. The caller is expected to
|
|
238
|
-
* pass `dumpJson` into `vault.load(json,
|
|
238
|
+
* pass `dumpJson` into `vault.load(json, secret)` to
|
|
239
239
|
* actually restore a vault. Splitting the layers keeps the
|
|
240
240
|
* bundle module free of crypto concerns — see file-level docs.
|
|
241
241
|
*/
|
|
@@ -251,7 +251,7 @@ export interface NoydbBundleReadResult {
|
|
|
251
251
|
*
|
|
252
252
|
* Consumers dispatch on `cred.kind` to choose the correct login /
|
|
253
253
|
* prefill path. Pre-0.2 bundles (bare string entries) are coerced
|
|
254
|
-
* to `{ kind: '
|
|
254
|
+
* to `{ kind: 'secret', value }` on read for back-compat.
|
|
255
255
|
*
|
|
256
256
|
* For `kind: 'sealed'` bundles read without `sealingProviders`, the
|
|
257
257
|
* `value` field is the raw base64 sealed bytes — opaque to the
|
|
@@ -270,7 +270,7 @@ export interface NoydbBundleReadResult {
|
|
|
270
270
|
export interface ReadNoydbBundleOptions {
|
|
271
271
|
/**
|
|
272
272
|
* Recipient-side sealing providers used to unseal entries from
|
|
273
|
-
* `
|
|
273
|
+
* `sealedSecrets`. The reader picks the one whose `.id`
|
|
274
274
|
* matches each entry's `pid`. Multiple providers may be supplied
|
|
275
275
|
* (different users may seal under different identities).
|
|
276
276
|
*
|
|
@@ -391,8 +391,6 @@ export declare const readNoydbBundleHeader: typeof readPodHeader;
|
|
|
391
391
|
export declare function readPodCover(bytes: Uint8Array, opts?: {
|
|
392
392
|
readonly locale?: string;
|
|
393
393
|
}): Cover | undefined;
|
|
394
|
-
/** @deprecated Use `readPodCover` (#799 rename). */
|
|
395
|
-
export declare const readNoydbBundlePublicEnvelope: typeof readPodCover;
|
|
396
394
|
/**
|
|
397
395
|
* Read a full `.noydb` bundle: validate magic + header, verify
|
|
398
396
|
* integrity hash over the body bytes, decompress, and return the
|
|
@@ -404,9 +402,9 @@ export declare const readNoydbBundlePublicEnvelope: typeof readPodCover;
|
|
|
404
402
|
* format error so consumers can pattern-match in catch blocks
|
|
405
403
|
* (corrupted-in-transit vs malformed-by-producer).
|
|
406
404
|
*
|
|
407
|
-
* Note: this function does NOT take a
|
|
405
|
+
* Note: this function does NOT take a secret. The dump JSON
|
|
408
406
|
* inside the body still contains encrypted records — restoring
|
|
409
|
-
* the vault requires `vault.load(dumpJson,
|
|
407
|
+
* the vault requires `vault.load(dumpJson, secret)`
|
|
410
408
|
* after this call. Splitting the layers keeps the bundle module
|
|
411
409
|
* free of crypto concerns and lets the same code feed format
|
|
412
410
|
* inspectors that never decrypt anything.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* The dump JSON inside the body still contains the original
|
|
35
35
|
* metadata, but that's only readable by someone who already has the
|
|
36
36
|
* file bytes — the same person who could read the encrypted records
|
|
37
|
-
* with the right
|
|
37
|
+
* with the right secret.
|
|
38
38
|
*
|
|
39
39
|
* **Why minimum disclosure** in the header? Because consumers will
|
|
40
40
|
* inevitably store these in services where the filename, file size,
|
|
@@ -128,7 +128,7 @@ export interface NoydbPodHeader {
|
|
|
128
128
|
/**
|
|
129
129
|
* Auto-unlock material indicator. When present, the bundle
|
|
130
130
|
* body wraps the dump JSON in a structure carrying per-user
|
|
131
|
-
*
|
|
131
|
+
* secrets — either plaintext (`'unsealed'`, public-by-design)
|
|
132
132
|
* or sealed under a `SealingKeyProvider` (`'sealed'`, requires
|
|
133
133
|
* matching provider on the recipient side).
|
|
134
134
|
*
|
package/dist/with-pod/index.d.ts
CHANGED
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
export { writePod, readPod, readPodHeader, readPodCover, writeNoydbBundle, readNoydbBundle, readNoydbBundleHeader, resetBrotliSupportCache, } from './bundle.js';
|
|
15
15
|
export type { Cover } from '../with-party/directory/cover/types.js';
|
|
16
16
|
export type { WritePodOptions, WriteNoydbBundleOptions, ReadNoydbBundleOptions, NoydbBundleReadResult, } from './bundle.js';
|
|
17
|
-
export { NOYDB_BUNDLE_MAGIC, NOYDB_BUNDLE_PREFIX_BYTES, NOYDB_BUNDLE_FORMAT_VERSION, FLAG_COMPRESSED, FLAG_HAS_INTEGRITY_HASH, COMPRESSION_NONE, COMPRESSION_GZIP, COMPRESSION_BROTLI, validateBundleHeader, encodeBundleHeader, } from './format.js';
|
|
17
|
+
export { NOYDB_BUNDLE_MAGIC, NOYDB_BUNDLE_PREFIX_BYTES, NOYDB_BUNDLE_FORMAT_VERSION, FLAG_COMPRESSED, FLAG_HAS_INTEGRITY_HASH, COMPRESSION_NONE, COMPRESSION_GZIP, COMPRESSION_BROTLI, validateBundleHeader, encodeBundleHeader, hasNoydbBundleMagic, } from './format.js';
|
|
18
18
|
export type { CompressionAlgo, NoydbPodHeader, NoydbBundleHeader, } from './format.js';
|
|
19
19
|
export { generateULID, isULID } from './ulid.js';
|
|
20
20
|
export { wrapPodStore, createPodStore, wrapBundleStore, createBundleStore } from './pod-store.js';
|
|
21
21
|
export type { WrappedPodNoydbStore, WrapPodStoreOptions, WrappedBundleNoydbStore, WrapBundleStoreOptions, } from './pod-store.js';
|
|
22
|
+
export { BundleIntegrityError, BundleSealMismatchError, PodVersionConflictError, BundleVersionConflictError, BackupLedgerError, BackupCorruptedError, } from '../kernel/errors.js';
|
|
@@ -105,24 +105,41 @@ export interface BlobEvictionEntry {
|
|
|
105
105
|
readonly recordId: string;
|
|
106
106
|
readonly slotName: string;
|
|
107
107
|
readonly blobHash: string;
|
|
108
|
-
|
|
108
|
+
/** `'budget'` — evicted by the #808 cache-budget LRU pass, not a policy. */
|
|
109
|
+
readonly reason: 'ttl' | 'predicate' | 'both' | 'budget';
|
|
109
110
|
readonly evictedAt: string;
|
|
110
111
|
readonly actor: string;
|
|
111
112
|
}
|
|
112
113
|
export interface CompactionResult {
|
|
113
|
-
/** Number of blob slots evicted across all collections. */
|
|
114
|
+
/** Number of blob slots evicted by the policy pass across all collections. */
|
|
114
115
|
readonly evicted: number;
|
|
115
116
|
/** Number of records touched (iterated + policy checked). */
|
|
116
117
|
readonly records: number;
|
|
117
118
|
/** Number of collections with `blobFields` configured. */
|
|
118
119
|
readonly collections: number;
|
|
119
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Number of audit entries written — one per policy eviction plus one per
|
|
122
|
+
* budget SLOT eviction (dropping a device-local cache copy writes none).
|
|
123
|
+
*/
|
|
120
124
|
readonly auditEntries: number;
|
|
121
125
|
/**
|
|
122
126
|
* Number of slots that would have evicted (TTL/predicate triggered)
|
|
123
127
|
* but were retained by a `legalHold` or `retainUntil` floor.
|
|
124
128
|
*/
|
|
125
129
|
readonly held: number;
|
|
130
|
+
/**
|
|
131
|
+
* #808: number of slots whose due policy eviction was skipped because they
|
|
132
|
+
* are pinned for offline on THIS device (pin state is device-local).
|
|
133
|
+
*/
|
|
134
|
+
readonly pinned: number;
|
|
135
|
+
/**
|
|
136
|
+
* #808: number of evictions performed by the `cacheBudget` LRU pass —
|
|
137
|
+
* internal slots evicted through the standard eviction writer plus
|
|
138
|
+
* device-local external cache copies dropped. 0 when no budget was given.
|
|
139
|
+
*/
|
|
140
|
+
readonly budgetEvicted: number;
|
|
141
|
+
/** #808: plaintext bytes freed by the `cacheBudget` LRU pass. */
|
|
142
|
+
readonly budgetBytesFreed: number;
|
|
126
143
|
/** Per-collection breakdown for diagnostics. */
|
|
127
144
|
readonly byCollection: Record<string, {
|
|
128
145
|
records: number;
|
|
@@ -143,6 +160,22 @@ export interface CompactRunOptions {
|
|
|
143
160
|
* what would happen.
|
|
144
161
|
*/
|
|
145
162
|
readonly dryRun?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* #808 mobile cache budget: cap the locally-cached UNPINNED blob bytes.
|
|
165
|
+
* After the policy pass, a dedicated LRU pass walks every collection's
|
|
166
|
+
* slots (pinned slots and `legalHold`/`retainUntil`-held slots are exempt
|
|
167
|
+
* and uncounted) and evicts oldest-access-first — internal slots through
|
|
168
|
+
* the standard eviction writer (`deleteSlot` + a `'budget'` audit entry),
|
|
169
|
+
* external slots by dropping their device-local encrypted cache copy only
|
|
170
|
+
* (the object-store copy is authoritative and untouched) — until the
|
|
171
|
+
* remaining unpinned bytes fit `maxBytes`. Internal slots count their
|
|
172
|
+
* uncompressed `size`; external slots count `cachedBytes` (0 = nothing
|
|
173
|
+
* local, nothing to evict). LRU order comes from the device-local
|
|
174
|
+
* `lastAccessAt` stamp, falling back to `uploadedAt`.
|
|
175
|
+
*/
|
|
176
|
+
readonly cacheBudget?: {
|
|
177
|
+
readonly maxBytes: number;
|
|
178
|
+
};
|
|
146
179
|
}
|
|
147
180
|
export interface CompactionContext {
|
|
148
181
|
readonly adapter: NoydbStore;
|
|
@@ -166,5 +199,12 @@ export interface CompactionContext {
|
|
|
166
199
|
readonly listSlots: (collection: string, id: string) => Promise<SlotInfo[]>;
|
|
167
200
|
/** Delete a slot and decrement its blob's refCount. */
|
|
168
201
|
readonly deleteSlot: (collection: string, id: string, slotName: string) => Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* #808: drop a slot's DEVICE-LOCAL cached copy (the encrypted external
|
|
204
|
+
* side-cache) without touching the slot or the object store. Returns the
|
|
205
|
+
* plaintext bytes freed. Optional — absent (or a 0 return) means external
|
|
206
|
+
* cache entries simply cannot be budget-evicted through this context.
|
|
207
|
+
*/
|
|
208
|
+
readonly dropLocalCache?: (collection: string, id: string, slotName: string) => Promise<number>;
|
|
169
209
|
}
|
|
170
210
|
export declare function runCompaction(ctx: CompactionContext, options?: CompactRunOptions): Promise<CompactionResult>;
|