@noy-db/hub 0.4.0 → 0.6.0-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-67SBPMMH.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-X7F3TCFV.js → backup-GAYWQAFN.js} +16 -11
- package/dist/backup-GAYWQAFN.js.map +1 -0
- package/dist/blobs/index.js +20 -20
- package/dist/broker/index.js +12 -12
- package/dist/bundle-handle-5OUAI7CV.js +36 -0
- package/dist/bundle-handle-5OUAI7CV.js.map +1 -0
- package/dist/cargo/index.js +36 -36
- package/dist/{chunk-DQZXPGGZ.js → chunk-24UICKTB.js} +3 -3
- package/dist/{chunk-77AEMXFA.js → chunk-24ZLWWEO.js} +1 -1
- package/dist/chunk-24ZLWWEO.js.map +1 -0
- package/dist/{chunk-2BET5QTS.js → chunk-27TCYH6G.js} +5 -5
- package/dist/{chunk-MSMJJB4J.js → chunk-2KIV7BEK.js} +2 -2
- package/dist/{chunk-6ZNSB3H6.js → chunk-2LGDCNFJ.js} +2 -2
- package/dist/{chunk-GTYFIVIZ.js → chunk-35EBKWQU.js} +5 -5
- package/dist/chunk-35EBKWQU.js.map +1 -0
- package/dist/{chunk-WBKZUO5V.js → chunk-3737A6EA.js} +3 -3
- package/dist/{chunk-ZBYFMI6D.js → chunk-3CLZY46Y.js} +638 -300
- package/dist/chunk-3CLZY46Y.js.map +1 -0
- package/dist/{chunk-HLKXPJ4V.js → chunk-3EO7RZLJ.js} +6 -6
- package/dist/{chunk-JYJFGD2H.js → chunk-3FSX6LDG.js} +2 -2
- package/dist/{chunk-MXUT7FTE.js → chunk-3HYWYLXL.js} +2 -2
- package/dist/{chunk-IVYQAVWO.js → chunk-3IIPWA75.js} +11 -11
- package/dist/{chunk-7H3WWH6J.js → chunk-3UK6STWO.js} +3 -3
- package/dist/chunk-46V67XP5.js +117 -0
- package/dist/chunk-46V67XP5.js.map +1 -0
- package/dist/{chunk-NJ4DYYO5.js → chunk-4HDYQL3J.js} +2 -2
- package/dist/{chunk-P4JO3H6R.js → chunk-4MQDV3HZ.js} +2 -2
- package/dist/{chunk-X4MVWPHV.js → chunk-4UVDI4XE.js} +3 -3
- package/dist/{chunk-LXRTP3AQ.js → chunk-4VCWI42L.js} +2 -2
- package/dist/{chunk-QJNCB5SK.js → chunk-747LRSOO.js} +2 -2
- package/dist/{chunk-3HUYRN24.js → chunk-7F4DBNSP.js} +3 -3
- package/dist/{chunk-UADPR6F4.js → chunk-7G6VDWXB.js} +3 -3
- package/dist/{chunk-PTHKZWEH.js → chunk-AHLJSVRL.js} +2 -2
- package/dist/{chunk-NFZGZ4AK.js → chunk-AR2JDFAE.js} +2 -2
- package/dist/{chunk-3ECU57YH.js → chunk-BPTZ4K5L.js} +11 -11
- package/dist/{chunk-KRCBZYTZ.js → chunk-CCZJJ4I2.js} +4 -4
- package/dist/{chunk-NYEFP7DY.js → chunk-CJ73OLMW.js} +2 -2
- package/dist/{chunk-Q36YXK77.js → chunk-CYQOUTMY.js} +3 -3
- package/dist/{chunk-RBTVFPHF.js → chunk-DCMQR46R.js} +5 -5
- package/dist/{chunk-TG634KCO.js → chunk-DG27IUVI.js} +2 -2
- package/dist/{chunk-E23UGFVC.js → chunk-DMQCLZ4Z.js} +8 -6
- package/dist/chunk-DMQCLZ4Z.js.map +1 -0
- package/dist/{chunk-ZNWSG7XC.js → chunk-DPJTDNUF.js} +68 -34
- package/dist/chunk-DPJTDNUF.js.map +1 -0
- package/dist/{chunk-V6UQZA2H.js → chunk-E6427JU2.js} +2 -2
- package/dist/{chunk-JEI6JJNI.js → chunk-EK7DT5BT.js} +220 -13
- package/dist/chunk-EK7DT5BT.js.map +1 -0
- package/dist/chunk-EPFF7LOX.js +14 -0
- package/dist/chunk-EPFF7LOX.js.map +1 -0
- package/dist/{chunk-TWPK7KUJ.js → chunk-F3GVO44K.js} +6 -6
- package/dist/{chunk-QD46HPZG.js → chunk-FAXZQ5UF.js} +2 -2
- package/dist/{chunk-IG6KUWBX.js → chunk-FNSMZQS4.js} +2 -2
- package/dist/{chunk-BLBAQRBM.js → chunk-FUHKW252.js} +2 -2
- package/dist/{chunk-SU6SGWXM.js → chunk-FY343IZR.js} +8 -8
- package/dist/{chunk-KPZS5QAQ.js → chunk-GQ3BX5EA.js} +9 -1
- package/dist/chunk-GQ3BX5EA.js.map +1 -0
- package/dist/{chunk-DAFBJS4Y.js → chunk-GS5RT2KK.js} +4 -4
- package/dist/{chunk-5UQ7Y6SQ.js → chunk-HFKGIBMD.js} +3 -3
- package/dist/{chunk-QZWTRENR.js → chunk-HNGSV2YC.js} +133 -1
- package/dist/chunk-HNGSV2YC.js.map +1 -0
- package/dist/chunk-HNHCQ556.js +63 -0
- package/dist/chunk-HNHCQ556.js.map +1 -0
- package/dist/chunk-HS7HNYBD.js +91 -0
- package/dist/chunk-HS7HNYBD.js.map +1 -0
- package/dist/{chunk-SHEEBRZ4.js → chunk-HVQGCKY4.js} +2 -2
- package/dist/{chunk-35NMVJ7I.js → chunk-HXGUIPQB.js} +3 -3
- package/dist/{chunk-ERGECZEI.js → chunk-JEM2IGS3.js} +9 -9
- package/dist/chunk-JH3OHQM4.js +260 -0
- package/dist/chunk-JH3OHQM4.js.map +1 -0
- package/dist/{chunk-L3YYLT4E.js → chunk-JIUVJ4M7.js} +2 -2
- package/dist/{chunk-55LX6FSX.js → chunk-JRCYZEHU.js} +2 -2
- package/dist/{chunk-SFBYQMZM.js → chunk-JSRU5W2M.js} +5 -5
- package/dist/{chunk-NM5UYF6Q.js → chunk-JXIDGFKS.js} +2 -2
- package/dist/{chunk-VYYM3MEN.js → chunk-KHKKD62N.js} +16 -2
- package/dist/chunk-KHKKD62N.js.map +1 -0
- package/dist/{chunk-FQ5CHJR7.js → chunk-KUDZVJKQ.js} +21 -2
- package/dist/chunk-KUDZVJKQ.js.map +1 -0
- package/dist/{chunk-RO5NM6UI.js → chunk-KZ3KMDN3.js} +2 -2
- package/dist/{chunk-HZZP2ZIG.js → chunk-LBGPO5RL.js} +6 -6
- package/dist/{chunk-ZFG5EBI3.js → chunk-LTU4FLHG.js} +57 -27
- package/dist/chunk-LTU4FLHG.js.map +1 -0
- package/dist/{chunk-CLE3TMIS.js → chunk-MC2LFTQM.js} +5 -2
- package/dist/{chunk-467SWYT5.js → chunk-MJWCLSQL.js} +17 -8
- package/dist/chunk-MJWCLSQL.js.map +1 -0
- package/dist/{chunk-W3G5REIU.js → chunk-MSWYQLMQ.js} +2 -2
- package/dist/{chunk-WK7ULBTP.js → chunk-MVOWXQHN.js} +5 -3
- package/dist/chunk-MVOWXQHN.js.map +1 -0
- package/dist/{chunk-2J6UEN2V.js → chunk-MXZ5TSTR.js} +118 -4
- package/dist/chunk-MXZ5TSTR.js.map +1 -0
- package/dist/{chunk-SGDPRCC4.js → chunk-MZ5ZFO2D.js} +3 -3
- package/dist/{chunk-NBXFCQX4.js → chunk-NQCNSVGI.js} +9 -9
- package/dist/chunk-NQCNSVGI.js.map +1 -0
- package/dist/{chunk-EFJAAFBW.js → chunk-NQRJ5AJO.js} +2 -2
- package/dist/{chunk-Q2SEJMP2.js → chunk-NVU7ZMPN.js} +2 -2
- package/dist/{chunk-ZTLOXFPB.js → chunk-OF3L2SD6.js} +2 -2
- package/dist/{chunk-LLYIMSQQ.js → chunk-OMSAULZM.js} +11 -11
- package/dist/{chunk-SF2ZIRD6.js → chunk-OSFPNKY4.js} +3 -3
- package/dist/{chunk-WUHEP3HH.js → chunk-P7NGLLUF.js} +5 -5
- package/dist/{chunk-RQ4ZI4ZI.js → chunk-PGAPBZEK.js} +7 -7
- package/dist/{chunk-T2MOJF76.js → chunk-PP5CO2PR.js} +6 -6
- package/dist/{chunk-Q5YJCVJY.js → chunk-RLWY6Z44.js} +227 -41
- package/dist/chunk-RLWY6Z44.js.map +1 -0
- package/dist/{chunk-QGIBI6GL.js → chunk-ROWL352P.js} +5 -5
- package/dist/{chunk-ZHDSUZQU.js → chunk-RPXL6KSX.js} +4 -4
- package/dist/{chunk-DTFA5DO4.js → chunk-SKONR2OL.js} +3 -3
- package/dist/{chunk-AT2JJEKJ.js → chunk-SRGJET2F.js} +16 -5
- package/dist/chunk-SRGJET2F.js.map +1 -0
- package/dist/{chunk-4ZKNC6A6.js → chunk-T4GPR2IR.js} +2 -2
- package/dist/{chunk-NLYALJMY.js → chunk-TFZ7LLOQ.js} +113 -36
- package/dist/chunk-TFZ7LLOQ.js.map +1 -0
- package/dist/{chunk-TS5XLBZR.js → chunk-TLNNHG3A.js} +4 -4
- package/dist/{chunk-6UBZ6I5Z.js → chunk-UHXCLPGC.js} +2 -2
- package/dist/{chunk-KD4HGBJV.js → chunk-V5C5NNBR.js} +4 -4
- package/dist/{chunk-WYUAEZSC.js → chunk-VBY6ZLJT.js} +15 -14
- package/dist/chunk-VBY6ZLJT.js.map +1 -0
- package/dist/{chunk-AKKRXT23.js → chunk-VCETL77O.js} +34 -16
- package/dist/chunk-VCETL77O.js.map +1 -0
- package/dist/{chunk-5GQEU4DN.js → chunk-VJFMXYKP.js} +2 -2
- package/dist/{chunk-5DRROK5W.js → chunk-VMCCGUQB.js} +2 -2
- package/dist/{chunk-IXNCZTWA.js → chunk-W3TVWF6N.js} +2 -2
- package/dist/{chunk-W66AM5IB.js → chunk-WLYIROCJ.js} +2 -2
- package/dist/{chunk-OWHP3H5C.js → chunk-XB7LUDKM.js} +4 -4
- package/dist/{chunk-KYRDJI5O.js → chunk-XBLKM73C.js} +10 -10
- package/dist/{chunk-MHMLXJ3I.js → chunk-YAWK6AWF.js} +2 -2
- package/dist/{chunk-PWPYO73B.js → chunk-ZGGVOADG.js} +5 -5
- package/dist/{chunk-YGK2HMLR.js → chunk-ZK4CO2KZ.js} +9 -9
- package/dist/chunk-ZK4CO2KZ.js.map +1 -0
- package/dist/{chunk-DSDXAKIP.js → chunk-ZVF37PKE.js} +34 -5
- package/dist/chunk-ZVF37PKE.js.map +1 -0
- package/dist/{chunk-IFOH7RBI.js → chunk-ZWMO5GL5.js} +5 -5
- package/dist/{chunk-LRRX57UA.js → chunk-ZXJXDHNK.js} +4 -4
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-LE54HWSX.js → classified-marker-MH3ON5OL.js} +3 -3
- package/dist/collection-facade-AHT7FATG.js +45 -0
- package/dist/{computed-AB45PS4V.js → computed-6G5M3UPH.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/cover/index.js +3 -3
- package/dist/custody/index.js +11 -11
- package/dist/{dead-filter-V3LVWYEJ.js → dead-filter-U575NGSH.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-JDUMAF6L.js → delegation-PDYL6RWT.js} +10 -10
- package/dist/derivations/index.js +12 -12
- package/dist/derive-AKT4KU36.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-6TV3DGO6.js → dispatch-4XIJSFTT.js} +5 -5
- package/dist/{dispatch-W7NWQ637.js → dispatch-N5HGVUGU.js} +18 -18
- package/dist/{enclave-YFCLPIDR.js → enclave-OPK24QDR.js} +13 -9
- package/dist/executor-3JZ4POTW.js +28 -0
- package/dist/executor-CYJQLKKI.js +9 -0
- package/dist/executor-S4QIKEHW.js +9 -0
- package/dist/export-accessible-CPTP5STN.js +23 -0
- package/dist/extract-partition-TWXPHVU7.js +38 -0
- package/dist/{fanout-sidecar-273RDMYS.js → fanout-sidecar-T2ZGLQFE.js} +9 -9
- package/dist/find-RBBYKXI7.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +6 -6
- package/dist/history/index.js +15 -15
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +35 -7
- package/dist/index.js +279 -202
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +3 -3
- package/dist/introspection/index.js +12 -12
- package/dist/issue-N74C55X6.js +19 -0
- package/dist/kernel/collection-config.d.ts +4 -0
- package/dist/kernel/collection.d.ts +34 -8
- package/dist/kernel/cutover-transform.d.ts +64 -0
- package/dist/kernel/enclave/crypto.d.ts +24 -0
- package/dist/kernel/enclave/index.d.ts +2 -1
- package/dist/kernel/errors.d.ts +138 -0
- package/dist/kernel/noydb.d.ts +10 -1
- package/dist/kernel/put-many-atomic.d.ts +45 -0
- package/dist/kernel/secret-mode.d.ts +59 -0
- package/dist/kernel/types.d.ts +98 -7
- package/dist/kernel/validation.d.ts +33 -0
- package/dist/kernel/vault.d.ts +32 -6
- package/dist/{ledger-XE7JF2I2.js → ledger-DONWFC5M.js} +11 -11
- package/dist/liberate-KICI7AJN.js +24 -0
- package/dist/{link-set-CGYC3OH5.js → link-set-2TTP4VLO.js} +11 -11
- package/dist/managed-secret-EAOYWRYF.js +27 -0
- package/dist/materialized-views/index.js +19 -19
- package/dist/money/index.js +3 -3
- package/dist/noydb-6W2XGQCS.js +83 -0
- package/dist/overlay-views/index.js +6 -6
- package/dist/periods/index.js +16 -16
- package/dist/pod/index.js +121 -12
- package/dist/policy/index.js +4 -4
- package/dist/port/to/index.d.ts +3 -1
- package/dist/port/to/locator.d.ts +84 -0
- package/dist/port/with/device-seal-strategy.d.ts +16 -0
- package/dist/port/with/strategies.d.ts +2 -0
- package/dist/port/with/write-hooks.d.ts +6 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-LY35EDTJ.js → post-register-ORQOQJCS.js} +6 -6
- package/dist/query/index.js +4 -4
- package/dist/reduce/index.js +4 -4
- package/dist/register-LHETZRJM.js +32 -0
- package/dist/registry-AMAZ6QRZ.js +19 -0
- package/dist/registry-CZVINVQH.js +9 -0
- package/dist/registry-IKUR2MXD.js +9 -0
- package/dist/registry-JRIN447B.js +18 -0
- package/dist/request-withdrawal-2DN2RGCO.js +31 -0
- package/dist/{reveal-T34ADTPY.js → reveal-AG4SCHUQ.js} +6 -6
- package/dist/revoke-ZX4NM2CJ.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +6 -6
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +4 -4
- package/dist/{seed-JOV54PB3.js → seed-IRCDGIRK.js} +15 -15
- package/dist/seed-IRCDGIRK.js.map +1 -0
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-7KHD4OL2.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-T3V7XEOB.js → stale-K734VACF.js} +10 -10
- package/dist/storage-4H2GF6RQ.js +23 -0
- package/dist/{store-coordination-provider-AHGFEMFA.js → store-coordination-provider-4SKLSFUG.js} +3 -3
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +27 -15
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +28 -3
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/{verify-7XWHJWUN.js → verify-RO5RTZOJ.js} +5 -5
- package/dist/walk-MQHYNDLZ.js +21 -0
- package/dist/with-audit/guards/registry.d.ts +8 -1
- package/dist/with-audit/guards/types.d.ts +5 -0
- package/dist/with-audit/periods/index.d.ts +1 -1
- package/dist/with-audit/periods/periods.d.ts +7 -0
- package/dist/with-commit/tx/atomic-eligibility.d.ts +13 -11
- package/dist/with-formula/derivations/registry.d.ts +6 -0
- package/dist/with-formula/derivations/types.d.ts +5 -0
- package/dist/with-lookup/indexing/eager-indexes.d.ts +10 -0
- package/dist/with-party/team/device-seal.d.ts +25 -0
- package/dist/with-party/team/echo-ceremony.d.ts +74 -0
- package/dist/with-party/team/echo-secret.d.ts +56 -0
- package/dist/with-party/team/index.d.ts +8 -0
- package/dist/with-party/team/keyring.d.ts +71 -9
- package/dist/with-party/team/rotate-recover.d.ts +99 -5
- package/dist/with-pod/bundle-handle.d.ts +9 -0
- package/dist/with-pod/bundle.d.ts +100 -2
- package/dist/with-pod/format.d.ts +92 -1
- package/dist/with-pod/index.d.ts +22 -1
- package/dist/with-pod/open.d.ts +117 -0
- package/dist/with-pod/redirect.d.ts +78 -0
- package/dist/with-pod/signature.d.ts +13 -0
- package/dist/with-shape/introspection/behaviors.d.ts +100 -0
- package/dist/with-shape/introspection/derivation-key.d.ts +17 -0
- package/dist/with-shape/introspection/describe.d.ts +36 -0
- package/dist/with-shape/introspection/index.d.ts +1 -0
- package/dist/with-shape/introspection/subsystem-matrix.d.ts +22 -0
- package/dist/with-shape/introspection/types.d.ts +2 -1
- package/dist/with-shape/links/names.d.ts +14 -0
- package/dist/with-shape/manifest/derive.d.ts +86 -0
- package/dist/with-shape/manifest/reserved-collections.d.ts +27 -0
- package/dist/with-shape/manifest/storage.d.ts +62 -0
- package/dist/with-shape/manifest/sync.d.ts +135 -0
- package/dist/with-shape/manifest/types.d.ts +49 -0
- package/dist/with-shape/manifest/writer.d.ts +32 -0
- package/dist/with-shape/persisted-schemas/field-ids.d.ts +29 -0
- package/dist/with-shape/persisted-schemas/register.d.ts +3 -0
- package/dist/with-shape/persisted-schemas/types.d.ts +17 -0
- package/dist/with-shape/schema-update/fence-controller.d.ts +34 -0
- package/dist/with-shape/schema-update/fence.d.ts +9 -0
- package/dist/with-shape/schema-update/strategies.d.ts +18 -2
- package/dist/with-shape/schema-update/types.d.ts +11 -0
- package/dist/with-sync/engine.d.ts +17 -0
- package/dist/with-sync/presence.d.ts +31 -1
- package/dist/withdraw-accessible-JSDQHXHE.js +28 -0
- package/dist/withdraw-accessible-JSDQHXHE.js.map +1 -0
- package/package.json +3 -3
- package/dist/api-SI2IVBQO.js +0 -20
- package/dist/backup-X7F3TCFV.js.map +0 -1
- package/dist/chunk-2J6UEN2V.js.map +0 -1
- package/dist/chunk-467SWYT5.js.map +0 -1
- package/dist/chunk-4JQK3L4V.js +0 -41
- package/dist/chunk-4JQK3L4V.js.map +0 -1
- package/dist/chunk-77AEMXFA.js.map +0 -1
- package/dist/chunk-AKKRXT23.js.map +0 -1
- package/dist/chunk-AT2JJEKJ.js.map +0 -1
- package/dist/chunk-DSDXAKIP.js.map +0 -1
- package/dist/chunk-E23UGFVC.js.map +0 -1
- package/dist/chunk-FQ5CHJR7.js.map +0 -1
- package/dist/chunk-GTYFIVIZ.js.map +0 -1
- package/dist/chunk-JEI6JJNI.js.map +0 -1
- package/dist/chunk-JQ2AX4T5.js +0 -23
- package/dist/chunk-JQ2AX4T5.js.map +0 -1
- package/dist/chunk-KPZS5QAQ.js.map +0 -1
- package/dist/chunk-NBXFCQX4.js.map +0 -1
- package/dist/chunk-NLYALJMY.js.map +0 -1
- package/dist/chunk-Q5YJCVJY.js.map +0 -1
- package/dist/chunk-QZWTRENR.js.map +0 -1
- package/dist/chunk-S7GIXBXV.js +0 -129
- package/dist/chunk-S7GIXBXV.js.map +0 -1
- package/dist/chunk-SBHN6QUT.js +0 -25
- package/dist/chunk-SBHN6QUT.js.map +0 -1
- package/dist/chunk-VYYM3MEN.js.map +0 -1
- package/dist/chunk-WK7ULBTP.js.map +0 -1
- package/dist/chunk-WYUAEZSC.js.map +0 -1
- package/dist/chunk-YGK2HMLR.js.map +0 -1
- package/dist/chunk-ZBYFMI6D.js.map +0 -1
- package/dist/chunk-ZFG5EBI3.js.map +0 -1
- package/dist/chunk-ZNWSG7XC.js.map +0 -1
- package/dist/collection-facade-DO2AABZT.js +0 -45
- package/dist/derive-ZPGVLE2Q.js +0 -22
- package/dist/executor-FPHKWDWT.js +0 -28
- package/dist/executor-IEBLTBCW.js +0 -9
- package/dist/executor-RM7XWQDU.js +0 -9
- package/dist/export-accessible-EKM3HGB2.js +0 -23
- package/dist/extract-partition-LS4ET5A6.js +0 -38
- package/dist/find-OZMTRIK3.js +0 -11
- package/dist/issue-LIA7FXBJ.js +0 -19
- package/dist/liberate-WZ3RHVKW.js +0 -24
- package/dist/noydb-ZLPVCDES.js +0 -81
- package/dist/register-6RIBIT3I.js +0 -25
- package/dist/registry-7Y5WF7GS.js +0 -9
- package/dist/registry-BWD2ED52.js +0 -8
- package/dist/registry-MUSL4AW6.js +0 -19
- package/dist/registry-RON4WHAP.js +0 -18
- package/dist/request-withdrawal-FT3ORAWN.js +0 -31
- package/dist/revoke-HC7WG3HE.js +0 -24
- package/dist/seed-JOV54PB3.js.map +0 -1
- package/dist/signer-CTWOH6KT.js +0 -25
- package/dist/storage-LLNLPWWB.js +0 -23
- package/dist/walk-G3NFEP5L.js +0 -21
- package/dist/withdraw-accessible-ANSVG6XG.js +0 -28
- /package/dist/{api-SI2IVBQO.js.map → api-67SBPMMH.js.map} +0 -0
- /package/dist/{chunk-DQZXPGGZ.js.map → chunk-24UICKTB.js.map} +0 -0
- /package/dist/{chunk-2BET5QTS.js.map → chunk-27TCYH6G.js.map} +0 -0
- /package/dist/{chunk-MSMJJB4J.js.map → chunk-2KIV7BEK.js.map} +0 -0
- /package/dist/{chunk-6ZNSB3H6.js.map → chunk-2LGDCNFJ.js.map} +0 -0
- /package/dist/{chunk-WBKZUO5V.js.map → chunk-3737A6EA.js.map} +0 -0
- /package/dist/{chunk-HLKXPJ4V.js.map → chunk-3EO7RZLJ.js.map} +0 -0
- /package/dist/{chunk-JYJFGD2H.js.map → chunk-3FSX6LDG.js.map} +0 -0
- /package/dist/{chunk-MXUT7FTE.js.map → chunk-3HYWYLXL.js.map} +0 -0
- /package/dist/{chunk-IVYQAVWO.js.map → chunk-3IIPWA75.js.map} +0 -0
- /package/dist/{chunk-7H3WWH6J.js.map → chunk-3UK6STWO.js.map} +0 -0
- /package/dist/{chunk-NJ4DYYO5.js.map → chunk-4HDYQL3J.js.map} +0 -0
- /package/dist/{chunk-P4JO3H6R.js.map → chunk-4MQDV3HZ.js.map} +0 -0
- /package/dist/{chunk-X4MVWPHV.js.map → chunk-4UVDI4XE.js.map} +0 -0
- /package/dist/{chunk-LXRTP3AQ.js.map → chunk-4VCWI42L.js.map} +0 -0
- /package/dist/{chunk-QJNCB5SK.js.map → chunk-747LRSOO.js.map} +0 -0
- /package/dist/{chunk-3HUYRN24.js.map → chunk-7F4DBNSP.js.map} +0 -0
- /package/dist/{chunk-UADPR6F4.js.map → chunk-7G6VDWXB.js.map} +0 -0
- /package/dist/{chunk-PTHKZWEH.js.map → chunk-AHLJSVRL.js.map} +0 -0
- /package/dist/{chunk-NFZGZ4AK.js.map → chunk-AR2JDFAE.js.map} +0 -0
- /package/dist/{chunk-3ECU57YH.js.map → chunk-BPTZ4K5L.js.map} +0 -0
- /package/dist/{chunk-KRCBZYTZ.js.map → chunk-CCZJJ4I2.js.map} +0 -0
- /package/dist/{chunk-NYEFP7DY.js.map → chunk-CJ73OLMW.js.map} +0 -0
- /package/dist/{chunk-Q36YXK77.js.map → chunk-CYQOUTMY.js.map} +0 -0
- /package/dist/{chunk-RBTVFPHF.js.map → chunk-DCMQR46R.js.map} +0 -0
- /package/dist/{chunk-TG634KCO.js.map → chunk-DG27IUVI.js.map} +0 -0
- /package/dist/{chunk-V6UQZA2H.js.map → chunk-E6427JU2.js.map} +0 -0
- /package/dist/{chunk-TWPK7KUJ.js.map → chunk-F3GVO44K.js.map} +0 -0
- /package/dist/{chunk-QD46HPZG.js.map → chunk-FAXZQ5UF.js.map} +0 -0
- /package/dist/{chunk-IG6KUWBX.js.map → chunk-FNSMZQS4.js.map} +0 -0
- /package/dist/{chunk-BLBAQRBM.js.map → chunk-FUHKW252.js.map} +0 -0
- /package/dist/{chunk-SU6SGWXM.js.map → chunk-FY343IZR.js.map} +0 -0
- /package/dist/{chunk-DAFBJS4Y.js.map → chunk-GS5RT2KK.js.map} +0 -0
- /package/dist/{chunk-5UQ7Y6SQ.js.map → chunk-HFKGIBMD.js.map} +0 -0
- /package/dist/{chunk-SHEEBRZ4.js.map → chunk-HVQGCKY4.js.map} +0 -0
- /package/dist/{chunk-35NMVJ7I.js.map → chunk-HXGUIPQB.js.map} +0 -0
- /package/dist/{chunk-ERGECZEI.js.map → chunk-JEM2IGS3.js.map} +0 -0
- /package/dist/{chunk-L3YYLT4E.js.map → chunk-JIUVJ4M7.js.map} +0 -0
- /package/dist/{chunk-55LX6FSX.js.map → chunk-JRCYZEHU.js.map} +0 -0
- /package/dist/{chunk-SFBYQMZM.js.map → chunk-JSRU5W2M.js.map} +0 -0
- /package/dist/{chunk-NM5UYF6Q.js.map → chunk-JXIDGFKS.js.map} +0 -0
- /package/dist/{chunk-RO5NM6UI.js.map → chunk-KZ3KMDN3.js.map} +0 -0
- /package/dist/{chunk-HZZP2ZIG.js.map → chunk-LBGPO5RL.js.map} +0 -0
- /package/dist/{chunk-CLE3TMIS.js.map → chunk-MC2LFTQM.js.map} +0 -0
- /package/dist/{chunk-W3G5REIU.js.map → chunk-MSWYQLMQ.js.map} +0 -0
- /package/dist/{chunk-SGDPRCC4.js.map → chunk-MZ5ZFO2D.js.map} +0 -0
- /package/dist/{chunk-EFJAAFBW.js.map → chunk-NQRJ5AJO.js.map} +0 -0
- /package/dist/{chunk-Q2SEJMP2.js.map → chunk-NVU7ZMPN.js.map} +0 -0
- /package/dist/{chunk-ZTLOXFPB.js.map → chunk-OF3L2SD6.js.map} +0 -0
- /package/dist/{chunk-LLYIMSQQ.js.map → chunk-OMSAULZM.js.map} +0 -0
- /package/dist/{chunk-SF2ZIRD6.js.map → chunk-OSFPNKY4.js.map} +0 -0
- /package/dist/{chunk-WUHEP3HH.js.map → chunk-P7NGLLUF.js.map} +0 -0
- /package/dist/{chunk-RQ4ZI4ZI.js.map → chunk-PGAPBZEK.js.map} +0 -0
- /package/dist/{chunk-T2MOJF76.js.map → chunk-PP5CO2PR.js.map} +0 -0
- /package/dist/{chunk-QGIBI6GL.js.map → chunk-ROWL352P.js.map} +0 -0
- /package/dist/{chunk-ZHDSUZQU.js.map → chunk-RPXL6KSX.js.map} +0 -0
- /package/dist/{chunk-DTFA5DO4.js.map → chunk-SKONR2OL.js.map} +0 -0
- /package/dist/{chunk-4ZKNC6A6.js.map → chunk-T4GPR2IR.js.map} +0 -0
- /package/dist/{chunk-TS5XLBZR.js.map → chunk-TLNNHG3A.js.map} +0 -0
- /package/dist/{chunk-6UBZ6I5Z.js.map → chunk-UHXCLPGC.js.map} +0 -0
- /package/dist/{chunk-KD4HGBJV.js.map → chunk-V5C5NNBR.js.map} +0 -0
- /package/dist/{chunk-5GQEU4DN.js.map → chunk-VJFMXYKP.js.map} +0 -0
- /package/dist/{chunk-5DRROK5W.js.map → chunk-VMCCGUQB.js.map} +0 -0
- /package/dist/{chunk-IXNCZTWA.js.map → chunk-W3TVWF6N.js.map} +0 -0
- /package/dist/{chunk-W66AM5IB.js.map → chunk-WLYIROCJ.js.map} +0 -0
- /package/dist/{chunk-OWHP3H5C.js.map → chunk-XB7LUDKM.js.map} +0 -0
- /package/dist/{chunk-KYRDJI5O.js.map → chunk-XBLKM73C.js.map} +0 -0
- /package/dist/{chunk-MHMLXJ3I.js.map → chunk-YAWK6AWF.js.map} +0 -0
- /package/dist/{chunk-PWPYO73B.js.map → chunk-ZGGVOADG.js.map} +0 -0
- /package/dist/{chunk-IFOH7RBI.js.map → chunk-ZWMO5GL5.js.map} +0 -0
- /package/dist/{chunk-LRRX57UA.js.map → chunk-ZXJXDHNK.js.map} +0 -0
- /package/dist/{classified-marker-LE54HWSX.js.map → classified-marker-MH3ON5OL.js.map} +0 -0
- /package/dist/{collection-facade-DO2AABZT.js.map → collection-facade-AHT7FATG.js.map} +0 -0
- /package/dist/{computed-AB45PS4V.js.map → computed-6G5M3UPH.js.map} +0 -0
- /package/dist/{dead-filter-V3LVWYEJ.js.map → dead-filter-U575NGSH.js.map} +0 -0
- /package/dist/{delegation-JDUMAF6L.js.map → delegation-PDYL6RWT.js.map} +0 -0
- /package/dist/{derive-ZPGVLE2Q.js.map → derive-AKT4KU36.js.map} +0 -0
- /package/dist/{dispatch-6TV3DGO6.js.map → dispatch-4XIJSFTT.js.map} +0 -0
- /package/dist/{dispatch-W7NWQ637.js.map → dispatch-N5HGVUGU.js.map} +0 -0
- /package/dist/{enclave-YFCLPIDR.js.map → enclave-OPK24QDR.js.map} +0 -0
- /package/dist/{executor-FPHKWDWT.js.map → executor-3JZ4POTW.js.map} +0 -0
- /package/dist/{executor-IEBLTBCW.js.map → executor-CYJQLKKI.js.map} +0 -0
- /package/dist/{executor-RM7XWQDU.js.map → executor-S4QIKEHW.js.map} +0 -0
- /package/dist/{export-accessible-EKM3HGB2.js.map → export-accessible-CPTP5STN.js.map} +0 -0
- /package/dist/{extract-partition-LS4ET5A6.js.map → extract-partition-TWXPHVU7.js.map} +0 -0
- /package/dist/{fanout-sidecar-273RDMYS.js.map → fanout-sidecar-T2ZGLQFE.js.map} +0 -0
- /package/dist/{find-OZMTRIK3.js.map → find-RBBYKXI7.js.map} +0 -0
- /package/dist/{issue-LIA7FXBJ.js.map → issue-N74C55X6.js.map} +0 -0
- /package/dist/{ledger-XE7JF2I2.js.map → ledger-DONWFC5M.js.map} +0 -0
- /package/dist/{liberate-WZ3RHVKW.js.map → liberate-KICI7AJN.js.map} +0 -0
- /package/dist/{link-set-CGYC3OH5.js.map → link-set-2TTP4VLO.js.map} +0 -0
- /package/dist/{noydb-ZLPVCDES.js.map → managed-secret-EAOYWRYF.js.map} +0 -0
- /package/dist/{register-6RIBIT3I.js.map → noydb-6W2XGQCS.js.map} +0 -0
- /package/dist/{post-register-LY35EDTJ.js.map → post-register-ORQOQJCS.js.map} +0 -0
- /package/dist/{registry-7Y5WF7GS.js.map → register-LHETZRJM.js.map} +0 -0
- /package/dist/{registry-BWD2ED52.js.map → registry-AMAZ6QRZ.js.map} +0 -0
- /package/dist/{registry-MUSL4AW6.js.map → registry-CZVINVQH.js.map} +0 -0
- /package/dist/{registry-RON4WHAP.js.map → registry-IKUR2MXD.js.map} +0 -0
- /package/dist/{request-withdrawal-FT3ORAWN.js.map → registry-JRIN447B.js.map} +0 -0
- /package/dist/{revoke-HC7WG3HE.js.map → request-withdrawal-2DN2RGCO.js.map} +0 -0
- /package/dist/{reveal-T34ADTPY.js.map → reveal-AG4SCHUQ.js.map} +0 -0
- /package/dist/{signer-CTWOH6KT.js.map → revoke-ZX4NM2CJ.js.map} +0 -0
- /package/dist/{stale-T3V7XEOB.js.map → signer-7KHD4OL2.js.map} +0 -0
- /package/dist/{storage-LLNLPWWB.js.map → stale-K734VACF.js.map} +0 -0
- /package/dist/{walk-G3NFEP5L.js.map → storage-4H2GF6RQ.js.map} +0 -0
- /package/dist/{store-coordination-provider-AHGFEMFA.js.map → store-coordination-provider-4SKLSFUG.js.map} +0 -0
- /package/dist/{verify-7XWHJWUN.js.map → verify-RO5RTZOJ.js.map} +0 -0
- /package/dist/{withdraw-accessible-ANSVG6XG.js.map → walk-MQHYNDLZ.js.map} +0 -0
|
@@ -5,24 +5,29 @@ import {
|
|
|
5
5
|
readDirectoryConfig,
|
|
6
6
|
readUserVisibility,
|
|
7
7
|
saveUserEnvelope
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-27TCYH6G.js";
|
|
9
9
|
import {
|
|
10
10
|
base64ToBuffer,
|
|
11
11
|
bufferToBase64,
|
|
12
12
|
decrypt,
|
|
13
|
+
deriveEchoKey,
|
|
13
14
|
deriveKey,
|
|
15
|
+
deriveSecretKey,
|
|
16
|
+
encodeEchoParts,
|
|
14
17
|
encrypt,
|
|
15
18
|
generateDEK,
|
|
19
|
+
generateIV,
|
|
16
20
|
generateSalt,
|
|
17
21
|
unwrapKey,
|
|
18
22
|
wrapKey
|
|
19
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VCETL77O.js";
|
|
20
24
|
import {
|
|
21
25
|
NOYDB_FORMAT_VERSION,
|
|
22
26
|
NOYDB_KEYRING_VERSION
|
|
23
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-24ZLWWEO.js";
|
|
24
28
|
import {
|
|
25
29
|
DirectoryDisabledError,
|
|
30
|
+
EchoCeremonyRequiredError,
|
|
26
31
|
InvalidKeyError,
|
|
27
32
|
KeyringCorruptError,
|
|
28
33
|
KeyringExpiredError,
|
|
@@ -31,8 +36,9 @@ import {
|
|
|
31
36
|
PermissionDeniedError,
|
|
32
37
|
PrivilegeEscalationError,
|
|
33
38
|
USER_ENVELOPE_COLLECTION,
|
|
34
|
-
ValidationError
|
|
35
|
-
|
|
39
|
+
ValidationError,
|
|
40
|
+
WrongPromptError
|
|
41
|
+
} from "./chunk-HNGSV2YC.js";
|
|
36
42
|
|
|
37
43
|
// src/kernel/validation.ts
|
|
38
44
|
var WeakSecretError = class extends NoydbError {
|
|
@@ -105,6 +111,130 @@ function estimateEntropy(secret) {
|
|
|
105
111
|
if (!result.ok) return 0;
|
|
106
112
|
return Math.round(result.words * Math.log2(7776));
|
|
107
113
|
}
|
|
114
|
+
var DEFAULT_ECHO_PROMPT_MIN_WORDS = 3;
|
|
115
|
+
var DEFAULT_ECHO_MIN_WORD_LENGTH = 1;
|
|
116
|
+
function validateEchoSecretDetailed(parts, opts) {
|
|
117
|
+
for (const part of [parts.prompt, parts.echo, parts.key]) {
|
|
118
|
+
if (part.trim().length === 0) return { result: { ok: false, reason: "empty" }, failedCheck: "empty" };
|
|
119
|
+
}
|
|
120
|
+
const promptPolicy = {
|
|
121
|
+
minWords: opts?.prompt?.minWords ?? DEFAULT_ECHO_PROMPT_MIN_WORDS,
|
|
122
|
+
minWordLength: opts?.prompt?.minWordLength ?? DEFAULT_ECHO_MIN_WORD_LENGTH,
|
|
123
|
+
...opts?.prompt?.rejectRepeatedAdjacent !== void 0 && { rejectRepeatedAdjacent: opts.prompt.rejectRepeatedAdjacent },
|
|
124
|
+
...opts?.prompt?.pattern !== void 0 && { pattern: opts.prompt.pattern },
|
|
125
|
+
...opts?.prompt?.customValidator !== void 0 && { customValidator: opts.prompt.customValidator }
|
|
126
|
+
};
|
|
127
|
+
const promptResult = validateSecret(parts.prompt, promptPolicy);
|
|
128
|
+
if (!promptResult.ok) return { result: promptResult, failedCheck: "prompt" };
|
|
129
|
+
const combinedPolicy = {
|
|
130
|
+
...opts?.combined?.minWords !== void 0 && { minWords: opts.combined.minWords },
|
|
131
|
+
minWordLength: opts?.combined?.minWordLength ?? DEFAULT_ECHO_MIN_WORD_LENGTH,
|
|
132
|
+
...opts?.combined?.rejectRepeatedAdjacent !== void 0 && { rejectRepeatedAdjacent: opts.combined.rejectRepeatedAdjacent },
|
|
133
|
+
...opts?.combined?.pattern !== void 0 && { pattern: opts.combined.pattern },
|
|
134
|
+
...opts?.combined?.customValidator !== void 0 && { customValidator: opts.combined.customValidator }
|
|
135
|
+
};
|
|
136
|
+
const combinedResult = validateSecret(`${parts.prompt} ${parts.echo} ${parts.key}`, combinedPolicy);
|
|
137
|
+
return { result: combinedResult, failedCheck: "combined" };
|
|
138
|
+
}
|
|
139
|
+
function validateEchoSecret(parts, opts) {
|
|
140
|
+
return validateEchoSecretDetailed(parts, opts).result;
|
|
141
|
+
}
|
|
142
|
+
function promptSuggestion(reason, minWords) {
|
|
143
|
+
if (reason === "too-few-words") {
|
|
144
|
+
return `The prompt (the part you type first) must be at least ${minWords} words. Example: "sono chiamato vicio".`;
|
|
145
|
+
}
|
|
146
|
+
return `The prompt (the part you type first) is the problem. ${SUGGESTIONS[reason]}`;
|
|
147
|
+
}
|
|
148
|
+
function assertStrongEchoSecret(parts, opts) {
|
|
149
|
+
if (opts?.allowWeakSecret) return;
|
|
150
|
+
const { result, failedCheck } = validateEchoSecretDetailed(parts, opts);
|
|
151
|
+
if (result.ok) return;
|
|
152
|
+
const promptMinWords = opts?.prompt?.minWords ?? DEFAULT_ECHO_PROMPT_MIN_WORDS;
|
|
153
|
+
const suggestion = failedCheck === "prompt" ? promptSuggestion(result.reason, promptMinWords) : SUGGESTIONS[result.reason];
|
|
154
|
+
throw new WeakSecretError(result.reason, suggestion);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// src/with-party/team/echo-secret.ts
|
|
158
|
+
var ECHO_KDF_ITERATIONS = 6e5;
|
|
159
|
+
var VERIFIER_PLAINTEXT = new Uint8Array(32).fill(90);
|
|
160
|
+
var subtle = globalThis.crypto.subtle;
|
|
161
|
+
async function getVerifierKey() {
|
|
162
|
+
return subtle.importKey("raw", VERIFIER_PLAINTEXT, { name: "AES-GCM" }, true, ["encrypt"]);
|
|
163
|
+
}
|
|
164
|
+
async function mintVerifier(part, salt) {
|
|
165
|
+
const kek = await deriveSecretKey(part, salt, { iterations: ECHO_KDF_ITERATIONS, keyUsage: "aes-kw" });
|
|
166
|
+
return wrapKey(await getVerifierKey(), kek);
|
|
167
|
+
}
|
|
168
|
+
async function checkVerifier(verifier, part, saltB64) {
|
|
169
|
+
try {
|
|
170
|
+
const kek = await deriveSecretKey(part, base64ToBuffer(saltB64), { iterations: ECHO_KDF_ITERATIONS, keyUsage: "aes-kw" });
|
|
171
|
+
await subtle.unwrapKey("raw", base64ToBuffer(verifier), kek, "AES-KW", { name: "AES-GCM" }, false, ["encrypt"]);
|
|
172
|
+
return true;
|
|
173
|
+
} catch {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
async function buildEchoBlock(parts, reveal, maskHint) {
|
|
178
|
+
encodeEchoParts(parts);
|
|
179
|
+
const promptSalt = generateSalt();
|
|
180
|
+
const echoSalt = generateSalt();
|
|
181
|
+
let revealField;
|
|
182
|
+
if (reveal.kind === "portable") {
|
|
183
|
+
const blobSalt = generateSalt();
|
|
184
|
+
const iv = generateIV();
|
|
185
|
+
const gcmKey = await deriveSecretKey(parts.prompt, blobSalt, { iterations: ECHO_KDF_ITERATIONS, keyUsage: "aes-gcm" });
|
|
186
|
+
const ct = new Uint8Array(
|
|
187
|
+
await subtle.encrypt({ name: "AES-GCM", iv }, gcmKey, new TextEncoder().encode(parts.echo))
|
|
188
|
+
);
|
|
189
|
+
revealField = { kind: "portable", blob: bufferToBase64(ct), iv: bufferToBase64(iv), salt: bufferToBase64(blobSalt) };
|
|
190
|
+
} else if (reveal.kind === "sealed") {
|
|
191
|
+
const sealed = await reveal.deviceSeal.seal(new TextEncoder().encode(parts.echo));
|
|
192
|
+
revealField = { kind: "sealed", blob: bufferToBase64(sealed), provider_hint: reveal.deviceSeal.id };
|
|
193
|
+
} else {
|
|
194
|
+
revealField = { kind: "none" };
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
v: 1,
|
|
198
|
+
prompt_salt: bufferToBase64(promptSalt),
|
|
199
|
+
prompt_verifier: await mintVerifier(parts.prompt, promptSalt),
|
|
200
|
+
echo_salt: bufferToBase64(echoSalt),
|
|
201
|
+
echo_verifier: await mintVerifier(parts.echo, echoSalt),
|
|
202
|
+
reveal: revealField,
|
|
203
|
+
...maskHint !== void 0 ? { mask_hint: maskHint } : {}
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
async function verifyPrompt(block, prompt) {
|
|
207
|
+
return checkVerifier(block.prompt_verifier, prompt, block.prompt_salt);
|
|
208
|
+
}
|
|
209
|
+
async function resolveEchoReveal(block, prompt, deviceSeal) {
|
|
210
|
+
if (block.reveal.kind === "portable") {
|
|
211
|
+
try {
|
|
212
|
+
const gcmKey = await deriveSecretKey(prompt, base64ToBuffer(block.reveal.salt), {
|
|
213
|
+
iterations: ECHO_KDF_ITERATIONS,
|
|
214
|
+
keyUsage: "aes-gcm"
|
|
215
|
+
});
|
|
216
|
+
const plain = await subtle.decrypt(
|
|
217
|
+
{ name: "AES-GCM", iv: base64ToBuffer(block.reveal.iv) },
|
|
218
|
+
gcmKey,
|
|
219
|
+
base64ToBuffer(block.reveal.blob)
|
|
220
|
+
);
|
|
221
|
+
return new TextDecoder().decode(plain);
|
|
222
|
+
} catch {
|
|
223
|
+
throw new WrongPromptError();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (block.reveal.kind === "sealed" && deviceSeal !== void 0) {
|
|
227
|
+
if (deviceSeal.id !== block.reveal.provider_hint) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
const plain = await deviceSeal.unseal(base64ToBuffer(block.reveal.blob));
|
|
231
|
+
return new TextDecoder().decode(plain);
|
|
232
|
+
}
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
async function verifyTypedEcho(block, echo) {
|
|
236
|
+
return checkVerifier(block.echo_verifier, echo, block.echo_salt);
|
|
237
|
+
}
|
|
108
238
|
|
|
109
239
|
// src/with-party/team/reserved-secret-collections.ts
|
|
110
240
|
var SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
|
|
@@ -164,21 +294,42 @@ async function verifyKeyringCanary(wrappedCanary, kek) {
|
|
|
164
294
|
return false;
|
|
165
295
|
}
|
|
166
296
|
}
|
|
167
|
-
async function
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
throw new NoAccessError(`No keyring found for user "${userId}" in vault "${vault}"`);
|
|
297
|
+
async function deriveKekForKeyring(file, secret, salt) {
|
|
298
|
+
if (file.echo !== void 0) {
|
|
299
|
+
if (typeof secret === "string") throw new EchoCeremonyRequiredError();
|
|
300
|
+
return deriveEchoKey(secret, salt);
|
|
172
301
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
302
|
+
if (typeof secret !== "string") {
|
|
303
|
+
throw new ValidationError("This keyring uses a standard secret \u2014 pass a string, not echo parts.");
|
|
304
|
+
}
|
|
305
|
+
return deriveKey(secret, salt);
|
|
306
|
+
}
|
|
307
|
+
function parseKeyringEnvelope(envelope) {
|
|
308
|
+
return JSON.parse(envelope._data);
|
|
309
|
+
}
|
|
310
|
+
async function readKeyringFile(store, vault, userId) {
|
|
311
|
+
const envelope = await store.get(vault, "_keyring", userId);
|
|
312
|
+
if (!envelope) return void 0;
|
|
313
|
+
return { envelope, file: parseKeyringEnvelope(envelope) };
|
|
314
|
+
}
|
|
315
|
+
function assertKeyringNotExpired(file) {
|
|
316
|
+
if (file.expires_at !== void 0) {
|
|
317
|
+
const cutoff = Date.parse(file.expires_at);
|
|
176
318
|
if (Number.isFinite(cutoff) && Date.now() >= cutoff) {
|
|
177
|
-
throw new KeyringExpiredError({ userId:
|
|
319
|
+
throw new KeyringExpiredError({ userId: file.user_id, expiresAt: file.expires_at });
|
|
178
320
|
}
|
|
179
321
|
}
|
|
322
|
+
}
|
|
323
|
+
async function loadKeyring(store, vault, opts) {
|
|
324
|
+
const { userId, secret } = opts;
|
|
325
|
+
const found = await readKeyringFile(store, vault, userId);
|
|
326
|
+
if (!found) {
|
|
327
|
+
throw new NoAccessError(`No keyring found for user "${userId}" in vault "${vault}"`);
|
|
328
|
+
}
|
|
329
|
+
const { file: keyringFile } = found;
|
|
330
|
+
assertKeyringNotExpired(keyringFile);
|
|
180
331
|
const salt = base64ToBuffer(keyringFile.salt);
|
|
181
|
-
const kek = await
|
|
332
|
+
const kek = await deriveKekForKeyring(keyringFile, secret, salt);
|
|
182
333
|
const canaryOk = keyringFile.canary !== void 0 ? await verifyKeyringCanary(keyringFile.canary, kek) : null;
|
|
183
334
|
const deks = /* @__PURE__ */ new Map();
|
|
184
335
|
const failedCollections = [];
|
|
@@ -241,10 +392,16 @@ async function assertKeyringOpenAllowed(store, vault, userId, create) {
|
|
|
241
392
|
async function createOwnerKeyring(store, vault, opts) {
|
|
242
393
|
const { userId, secret } = opts;
|
|
243
394
|
if (opts.validate && !opts.allowWeakSecret) {
|
|
244
|
-
assertStrongSecret(secret, opts);
|
|
395
|
+
if (typeof secret === "string") assertStrongSecret(secret, opts);
|
|
396
|
+
else {
|
|
397
|
+
assertStrongEchoSecret(secret, {
|
|
398
|
+
...opts.echoSecretPolicy,
|
|
399
|
+
...opts.allowWeakSecret !== void 0 && { allowWeakSecret: opts.allowWeakSecret }
|
|
400
|
+
});
|
|
401
|
+
}
|
|
245
402
|
}
|
|
246
403
|
const salt = generateSalt();
|
|
247
|
-
const kek = await deriveKey(secret, salt);
|
|
404
|
+
const kek = typeof secret === "string" ? await deriveKey(secret, salt) : await deriveEchoKey(secret, salt);
|
|
248
405
|
const userEnvelopeDek = await generateDEK();
|
|
249
406
|
const wrappedUserEnvelopeDek = await wrapKey(userEnvelopeDek, kek);
|
|
250
407
|
const canary = await mintKeyringCanary(kek);
|
|
@@ -258,7 +415,16 @@ async function createOwnerKeyring(store, vault, opts) {
|
|
|
258
415
|
salt: bufferToBase64(salt),
|
|
259
416
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
260
417
|
granted_by: userId,
|
|
261
|
-
canary
|
|
418
|
+
canary,
|
|
419
|
+
// The presence of this block is what makes the keyring an echo keyring —
|
|
420
|
+
// `deriveKekForKeyring` reads it to refuse a single-string unlock (AG-1).
|
|
421
|
+
...typeof secret !== "string" ? {
|
|
422
|
+
echo: await buildEchoBlock(
|
|
423
|
+
secret,
|
|
424
|
+
opts.deviceSeal ? { kind: "sealed", deviceSeal: opts.deviceSeal } : { kind: "portable" },
|
|
425
|
+
opts.echoMaskHint
|
|
426
|
+
)
|
|
427
|
+
} : {}
|
|
262
428
|
};
|
|
263
429
|
await writeKeyringFile(store, vault, userId, keyringFile);
|
|
264
430
|
return {
|
|
@@ -347,9 +513,9 @@ async function findAdminDescendants(store, vault, rootUserId) {
|
|
|
347
513
|
const allUserIds = await store.list(vault, "_keyring");
|
|
348
514
|
const childrenByParent = /* @__PURE__ */ new Map();
|
|
349
515
|
for (const userId of allUserIds) {
|
|
350
|
-
const
|
|
351
|
-
if (!
|
|
352
|
-
const kf =
|
|
516
|
+
const found = await readKeyringFile(store, vault, userId);
|
|
517
|
+
if (!found) continue;
|
|
518
|
+
const kf = found.file;
|
|
353
519
|
if (kf.role !== "admin") continue;
|
|
354
520
|
if (kf.user_id === rootUserId) continue;
|
|
355
521
|
const list = childrenByParent.get(kf.granted_by) ?? [];
|
|
@@ -371,11 +537,11 @@ async function findAdminDescendants(store, vault, rootUserId) {
|
|
|
371
537
|
return order;
|
|
372
538
|
}
|
|
373
539
|
async function revoke(store, vault, callerKeyring, options) {
|
|
374
|
-
const
|
|
375
|
-
if (!
|
|
540
|
+
const targetFound = await readKeyringFile(store, vault, options.userId);
|
|
541
|
+
if (!targetFound) {
|
|
376
542
|
throw new NoAccessError(`User "${options.userId}" has no keyring in vault "${vault}"`);
|
|
377
543
|
}
|
|
378
|
-
const targetKeyring =
|
|
544
|
+
const targetKeyring = targetFound.file;
|
|
379
545
|
if (!canRevoke(callerKeyring.role, targetKeyring.role)) {
|
|
380
546
|
throw new PermissionDeniedError(
|
|
381
547
|
`Role "${callerKeyring.role}" cannot revoke role "${targetKeyring.role}"`
|
|
@@ -393,11 +559,10 @@ async function revoke(store, vault, callerKeyring, options) {
|
|
|
393
559
|
);
|
|
394
560
|
} else {
|
|
395
561
|
for (const userId of descendants) {
|
|
396
|
-
const
|
|
397
|
-
if (!
|
|
398
|
-
const descKf = JSON.parse(descEnv._data);
|
|
562
|
+
const descFound = await readKeyringFile(store, vault, userId);
|
|
563
|
+
if (!descFound) continue;
|
|
399
564
|
usersToRevoke.push(userId);
|
|
400
|
-
for (const c of Object.keys(
|
|
565
|
+
for (const c of Object.keys(descFound.file.deks)) affectedCollections.add(c);
|
|
401
566
|
}
|
|
402
567
|
}
|
|
403
568
|
}
|
|
@@ -417,13 +582,13 @@ async function updateKeyringIdentity(store, vault, callerKeyring, options) {
|
|
|
417
582
|
`updateUser: at least one of role / displayName / permissions must be provided (userId: "${options.userId}").`
|
|
418
583
|
);
|
|
419
584
|
}
|
|
420
|
-
const
|
|
421
|
-
if (!
|
|
585
|
+
const found = await readKeyringFile(store, vault, options.userId);
|
|
586
|
+
if (!found) {
|
|
422
587
|
throw new NoAccessError(
|
|
423
588
|
`updateUser: user "${options.userId}" has no keyring in vault "${vault}".`
|
|
424
589
|
);
|
|
425
590
|
}
|
|
426
|
-
const target =
|
|
591
|
+
const target = found.file;
|
|
427
592
|
if (!canUpdateRole(callerKeyring.role, target.role)) {
|
|
428
593
|
throw new PermissionDeniedError(
|
|
429
594
|
`Role "${callerKeyring.role}" cannot update a keyring with role "${target.role}"`
|
|
@@ -484,9 +649,9 @@ async function rotateKeys(store, vault, callerKeyring, opts) {
|
|
|
484
649
|
const userIds = await store.list(vault, "_keyring");
|
|
485
650
|
for (const userId of userIds) {
|
|
486
651
|
if (userId === callerKeyring.userId) continue;
|
|
487
|
-
const
|
|
488
|
-
if (!
|
|
489
|
-
const userKeyringFile =
|
|
652
|
+
const userFound = await readKeyringFile(store, vault, userId);
|
|
653
|
+
if (!userFound) continue;
|
|
654
|
+
const userKeyringFile = userFound.file;
|
|
490
655
|
const updatedDeks = { ...userKeyringFile.deks };
|
|
491
656
|
const updatedPermissions = { ...userKeyringFile.permissions };
|
|
492
657
|
for (const collName of collections) {
|
|
@@ -506,6 +671,8 @@ async function rotateKeys(store, vault, callerKeyring, opts) {
|
|
|
506
671
|
return { needsRegrant };
|
|
507
672
|
}
|
|
508
673
|
async function changeSecret(store, vault, keyring, opts) {
|
|
674
|
+
const existingFound = await readKeyringFile(store, vault, keyring.userId);
|
|
675
|
+
if (existingFound && existingFound.file.echo !== void 0) throw new EchoCeremonyRequiredError();
|
|
509
676
|
const { newSecret } = opts;
|
|
510
677
|
if (!opts.allowWeakSecret) {
|
|
511
678
|
assertStrongSecret(newSecret, opts);
|
|
@@ -557,7 +724,7 @@ async function buildRecipientKeyringFile(callerKeyring, recipient) {
|
|
|
557
724
|
const role = recipient.role ?? "viewer";
|
|
558
725
|
const permissions = resolvePermissions(role, recipient.permissions);
|
|
559
726
|
const newSalt = generateSalt();
|
|
560
|
-
const newKek = await deriveKey(recipient.secret, newSalt);
|
|
727
|
+
const newKek = typeof recipient.secret === "string" ? await deriveKey(recipient.secret, newSalt) : await deriveEchoKey(recipient.secret, newSalt);
|
|
561
728
|
const wrappedDeks = {};
|
|
562
729
|
for (const collName of Object.keys(permissions)) {
|
|
563
730
|
const dek = callerKeyring.deks.get(collName);
|
|
@@ -596,16 +763,21 @@ async function buildRecipientKeyringFile(callerKeyring, recipient) {
|
|
|
596
763
|
canary,
|
|
597
764
|
...recipient.exportCapability !== void 0 ? { export_capability: recipient.exportCapability } : {},
|
|
598
765
|
...recipient.importCapability !== void 0 ? { import_capability: recipient.importCapability } : {},
|
|
599
|
-
...recipient.expiresAt !== void 0 ? { expires_at: recipient.expiresAt } : {}
|
|
766
|
+
...recipient.expiresAt !== void 0 ? { expires_at: recipient.expiresAt } : {},
|
|
767
|
+
// The presence of this block is what makes the recipient's slot an
|
|
768
|
+
// echo keyring — mirrors `createOwnerKeyring`'s same dance so the
|
|
769
|
+
// ceremony (prompt → echo → key) travels with the pod, not just a
|
|
770
|
+
// live owner keyring.
|
|
771
|
+
...typeof recipient.secret !== "string" ? { echo: await buildEchoBlock(recipient.secret, { kind: recipient.secret.reveal ?? "portable" }) } : {}
|
|
600
772
|
};
|
|
601
773
|
}
|
|
602
774
|
async function listUsers(store, vault) {
|
|
603
775
|
const userIds = await store.list(vault, "_keyring");
|
|
604
776
|
const users = [];
|
|
605
777
|
for (const userId of userIds) {
|
|
606
|
-
const
|
|
607
|
-
if (!
|
|
608
|
-
const kf =
|
|
778
|
+
const found = await readKeyringFile(store, vault, userId);
|
|
779
|
+
if (!found) continue;
|
|
780
|
+
const kf = found.file;
|
|
609
781
|
users.push({
|
|
610
782
|
userId: kf.user_id,
|
|
611
783
|
displayName: kf.display_name,
|
|
@@ -682,6 +854,8 @@ async function persistKeyring(store, vault, keyring) {
|
|
|
682
854
|
"persistKeyring: keyring.kek is null \u2014 cannot wrap DEKs without the KEK. This typically means the keyring was opened via tier-3 PIN resume, session restore, or a wrap-DEKs tier-2 unlock. Re-authenticate at tier 1 (secret) before persisting."
|
|
683
855
|
);
|
|
684
856
|
}
|
|
857
|
+
const existingFound = await readKeyringFile(store, vault, keyring.userId);
|
|
858
|
+
const existingEcho = existingFound?.file.echo;
|
|
685
859
|
const wrappedDeks = {};
|
|
686
860
|
for (const [collName, dek] of keyring.deks) {
|
|
687
861
|
wrappedDeks[collName] = await wrapKey(dek, keyring.kek);
|
|
@@ -701,7 +875,8 @@ async function persistKeyring(store, vault, keyring) {
|
|
|
701
875
|
...keyring.exportCapability !== void 0 && { export_capability: keyring.exportCapability },
|
|
702
876
|
...keyring.importCapability !== void 0 && { import_capability: keyring.importCapability },
|
|
703
877
|
...keyring.authenticators.length > 0 && { authenticators: keyring.authenticators },
|
|
704
|
-
...keyring.policy !== void 0 && { policy: keyring.policy }
|
|
878
|
+
...keyring.policy !== void 0 && { policy: keyring.policy },
|
|
879
|
+
...existingEcho !== void 0 && { echo: existingEcho }
|
|
705
880
|
};
|
|
706
881
|
await writeKeyringFile(store, vault, keyring.userId, keyringFile);
|
|
707
882
|
}
|
|
@@ -758,10 +933,21 @@ export {
|
|
|
758
933
|
validateSecret,
|
|
759
934
|
assertStrongSecret,
|
|
760
935
|
estimateEntropy,
|
|
936
|
+
DEFAULT_ECHO_PROMPT_MIN_WORDS,
|
|
937
|
+
DEFAULT_ECHO_MIN_WORD_LENGTH,
|
|
938
|
+
validateEchoSecret,
|
|
939
|
+
assertStrongEchoSecret,
|
|
940
|
+
buildEchoBlock,
|
|
941
|
+
verifyPrompt,
|
|
942
|
+
resolveEchoReveal,
|
|
943
|
+
verifyTypedEcho,
|
|
761
944
|
SYNC_CREDENTIALS_COLLECTION,
|
|
762
945
|
BROKER_COLLECTION,
|
|
763
946
|
isSecretBearingReservedCollection,
|
|
764
947
|
mintKeyringCanary,
|
|
948
|
+
deriveKekForKeyring,
|
|
949
|
+
readKeyringFile,
|
|
950
|
+
assertKeyringNotExpired,
|
|
765
951
|
loadKeyring,
|
|
766
952
|
assertKeyringOpenAllowed,
|
|
767
953
|
createOwnerKeyring,
|
|
@@ -782,4 +968,4 @@ export {
|
|
|
782
968
|
hasImportCapability,
|
|
783
969
|
evaluateImportCapability
|
|
784
970
|
};
|
|
785
|
-
//# sourceMappingURL=chunk-
|
|
971
|
+
//# sourceMappingURL=chunk-RLWY6Z44.js.map
|