@noy-db/hub 0.4.0-pre.4 → 0.4.0-pre.5
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 +2 -2
- package/dist/aggregate/index.js +4 -4
- package/dist/api-22ES33N3.js +20 -0
- package/dist/as/index.js +11 -11
- package/dist/attestation/index.js +20 -20
- package/dist/{backup-JL2GOTYQ.js → backup-YCHAC575.js} +11 -11
- package/dist/blobs/index.js +12 -12
- package/dist/broker/index.js +12 -12
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.js +29 -29
- package/dist/{chunk-2RMDVWGB.js → chunk-2CRZOVDI.js} +2 -2
- package/dist/{chunk-T7S4V52L.js → chunk-2PDBYF2O.js} +4 -4
- package/dist/{chunk-WJDYZP3U.js → chunk-3LJYHE7S.js} +36 -36
- package/dist/chunk-3LJYHE7S.js.map +1 -0
- package/dist/{chunk-CCT4WZI6.js → chunk-3OWYOECI.js} +5 -5
- package/dist/chunk-3OWYOECI.js.map +1 -0
- package/dist/{chunk-L4OA7G5T.js → chunk-522MBPE5.js} +2 -2
- package/dist/{chunk-ZJGZDOQO.js → chunk-5ATANZSW.js} +6 -6
- package/dist/{chunk-M25ZIEB2.js → chunk-5HSSTOOG.js} +2 -2
- package/dist/{chunk-LLVW4V7R.js → chunk-5WLDZZ6S.js} +3 -3
- package/dist/{chunk-7B4GPCX7.js → chunk-6RPWILRH.js} +5 -5
- package/dist/{chunk-IGM563N5.js → chunk-6SYOHUHM.js} +6 -6
- package/dist/chunk-6SYOHUHM.js.map +1 -0
- package/dist/{chunk-HGVFJL63.js → chunk-7BIJS6II.js} +15 -5
- package/dist/{chunk-HGVFJL63.js.map → chunk-7BIJS6II.js.map} +1 -1
- package/dist/{chunk-KR5EGWI4.js → chunk-7ICV4ASA.js} +5 -5
- package/dist/{chunk-J3VW4J4E.js → chunk-7LP7FFJ2.js} +2 -2
- package/dist/chunk-7LP7FFJ2.js.map +1 -0
- package/dist/{chunk-5P5AAXYA.js → chunk-7U6AB7DZ.js} +7 -7
- package/dist/chunk-7U6AB7DZ.js.map +1 -0
- package/dist/{chunk-KMONEHDJ.js → chunk-AFAPBZAA.js} +2 -2
- package/dist/{chunk-GBEXTC6Z.js → chunk-BAAUFCJK.js} +3 -3
- package/dist/chunk-BAAUFCJK.js.map +1 -0
- package/dist/{chunk-CGPO3ZYB.js → chunk-BY5YBSXA.js} +2 -2
- package/dist/{chunk-3O62PVDW.js → chunk-CJVEAVYH.js} +5 -5
- package/dist/chunk-CJVEAVYH.js.map +1 -0
- package/dist/{chunk-3XVOLB75.js → chunk-CKUYQO2P.js} +3 -3
- package/dist/{chunk-2JZ763FV.js → chunk-D4LAJ737.js} +2 -2
- package/dist/{chunk-OOTTXUNV.js → chunk-DYZ5CCVM.js} +2 -2
- package/dist/{chunk-W7TCXZWU.js → chunk-EEZCB74X.js} +393 -716
- package/dist/chunk-EEZCB74X.js.map +1 -0
- package/dist/{chunk-N4FZ6ITM.js → chunk-EGU4PWQW.js} +2 -2
- package/dist/{chunk-JKWNG3TM.js → chunk-FHHYCBBP.js} +2 -2
- package/dist/{chunk-QUIG6BZT.js → chunk-FIP7KI2P.js} +26 -26
- package/dist/chunk-FIP7KI2P.js.map +1 -0
- package/dist/{chunk-5KI3REO3.js → chunk-FTCGEUOY.js} +7 -7
- package/dist/{chunk-5BB3N4KU.js → chunk-G4MFQXYX.js} +2 -2
- package/dist/{chunk-PEY6ZTCF.js → chunk-GEEJPID6.js} +9 -9
- package/dist/{chunk-PEY6ZTCF.js.map → chunk-GEEJPID6.js.map} +1 -1
- package/dist/{chunk-KVHWEPT2.js → chunk-GHEMAVTN.js} +2 -2
- package/dist/{chunk-OVFCAS7U.js → chunk-GP54LU5N.js} +9 -9
- package/dist/{chunk-XW7NWO4A.js → chunk-GTNRMJYH.js} +2 -2
- package/dist/{chunk-JW3XCZA2.js → chunk-HAPY7WFP.js} +11 -11
- package/dist/{chunk-4X6DJZHY.js → chunk-HQKRZIX6.js} +4 -4
- package/dist/{chunk-OWE4BNTM.js → chunk-I2XEBEEF.js} +4 -4
- package/dist/{chunk-WEC3JGBA.js → chunk-IGLU4ME7.js} +3 -3
- package/dist/{chunk-BZK6JEX4.js → chunk-ILM6X6CP.js} +5 -5
- package/dist/{chunk-2KL6NDD4.js → chunk-J5TEU77Q.js} +4 -4
- package/dist/{chunk-UEO5CHOP.js → chunk-JAMDDLIM.js} +13 -13
- package/dist/chunk-JAMDDLIM.js.map +1 -0
- package/dist/{chunk-V7RGFJ3Z.js → chunk-JIHH26WQ.js} +6 -6
- package/dist/{chunk-XGVDLQJE.js → chunk-JN3SGXJE.js} +3 -3
- package/dist/{chunk-XULHFSHO.js → chunk-K4BWPNJO.js} +5 -5
- package/dist/chunk-K4BWPNJO.js.map +1 -0
- package/dist/{chunk-BZEPJJOK.js → chunk-K7BADAOS.js} +4 -4
- package/dist/{chunk-BLB7P7LS.js → chunk-KJTIAECI.js} +17 -17
- package/dist/chunk-KJTIAECI.js.map +1 -0
- package/dist/{chunk-U73LHVPF.js → chunk-L2CAWCQL.js} +4 -4
- package/dist/{chunk-MSO2C3KG.js → chunk-LC7DSMHR.js} +2 -2
- package/dist/{chunk-JA5B3SLH.js → chunk-M6QA2KK2.js} +2 -2
- package/dist/{chunk-IUIVDVXM.js → chunk-MUPZ6IZX.js} +2 -2
- package/dist/{chunk-QAFWRGVD.js → chunk-OGVE4IJW.js} +7 -7
- package/dist/{chunk-BCOKZC4B.js → chunk-OHV6T5JB.js} +19 -19
- package/dist/chunk-OHV6T5JB.js.map +1 -0
- package/dist/{chunk-25ZDB25Z.js → chunk-OMSKGLYA.js} +3 -3
- package/dist/chunk-OMSKGLYA.js.map +1 -0
- package/dist/{chunk-2U7Y7BNJ.js → chunk-ONB627HU.js} +2 -2
- package/dist/{chunk-GYB2QK5H.js → chunk-OWLZONGX.js} +2 -2
- package/dist/{chunk-YHPUDB7Q.js → chunk-OWOT7CFC.js} +2 -2
- package/dist/{chunk-VEX6G3YL.js → chunk-P4NUJVWL.js} +2 -2
- package/dist/{chunk-NM4LVUXH.js → chunk-PTT2NB46.js} +2 -2
- package/dist/{chunk-2ITLQZV5.js → chunk-PWWWMRT7.js} +2 -2
- package/dist/{chunk-GS3Q2KOZ.js → chunk-QBOQI6PG.js} +2 -2
- package/dist/{chunk-JIMEB4C6.js → chunk-QMMOMBH6.js} +4 -4
- package/dist/{chunk-QDNVHA2F.js → chunk-QMZ5A6FQ.js} +2 -2
- package/dist/{chunk-FLHOTGOO.js → chunk-QVGEVZ5F.js} +3 -3
- package/dist/{chunk-AFBJHD55.js → chunk-QZJEYZ4I.js} +5 -5
- package/dist/{chunk-V3YB7RGR.js → chunk-R2N37AA6.js} +3 -3
- package/dist/{chunk-JLHKBAFY.js → chunk-RWW3I3PO.js} +3 -3
- package/dist/{chunk-IGAIOGCN.js → chunk-S4YERMGJ.js} +4 -4
- package/dist/{chunk-OGFPMCSP.js → chunk-SBOHNJUD.js} +2 -2
- package/dist/{chunk-QXPOEAKR.js → chunk-SC4JLMZI.js} +2 -2
- package/dist/{chunk-EDC6MLXV.js → chunk-SEU6QHH4.js} +2 -2
- package/dist/{chunk-F4COUZLL.js → chunk-TMR64XPL.js} +2 -2
- package/dist/{chunk-DEQ2JTBR.js → chunk-TNATF3HB.js} +3 -3
- package/dist/{chunk-GZ2GKOF6.js → chunk-TNJVDG2B.js} +3 -3
- package/dist/{chunk-5OZCCLNC.js → chunk-TSNRZSRC.js} +2 -2
- package/dist/{chunk-QCUH2G77.js → chunk-UTEATWHO.js} +6 -6
- package/dist/{chunk-JA5O7UEZ.js → chunk-UVBHM7AK.js} +6 -6
- package/dist/chunk-UVBHM7AK.js.map +1 -0
- package/dist/{chunk-HKR25MGX.js → chunk-V5JUAW4M.js} +10 -10
- package/dist/chunk-V5JUAW4M.js.map +1 -0
- package/dist/{chunk-YGBIBOCR.js → chunk-VEGQYPCP.js} +7 -7
- package/dist/{chunk-25G7U6RD.js → chunk-WQN5SM7P.js} +2 -2
- package/dist/{chunk-NOT7XA7Q.js → chunk-X3MWEFPT.js} +5 -5
- package/dist/chunk-XUFAFHQM.js +78 -0
- package/dist/chunk-XUFAFHQM.js.map +1 -0
- package/dist/{chunk-MEKAMERX.js → chunk-YCAJDK4O.js} +29 -29
- package/dist/chunk-YCAJDK4O.js.map +1 -0
- package/dist/{chunk-BVZGNMVM.js → chunk-YFFEF6HR.js} +3 -3
- package/dist/{chunk-H4SMS4O2.js → chunk-YJ3TREAC.js} +2 -2
- package/dist/{chunk-5SZ24DL5.js → chunk-YQQPNXNO.js} +6 -6
- package/dist/{chunk-5BHNQNBI.js → chunk-YTW6ZIPD.js} +1 -1
- package/dist/chunk-YTW6ZIPD.js.map +1 -0
- package/dist/{chunk-EW4HFWGJ.js → chunk-YWZEDG7F.js} +6 -6
- package/dist/{chunk-2VUISNGP.js → chunk-YXIVUWDU.js} +5 -5
- package/dist/{chunk-YG2EG6CB.js → chunk-YXZNGHID.js} +4 -4
- package/dist/{chunk-QYJIOWKN.js → chunk-YZN6NRTR.js} +9 -9
- package/dist/{chunk-IZX3WZBF.js → chunk-YZNKFYDC.js} +4 -4
- package/dist/{chunk-E2R5NRZD.js → chunk-Z4D3YGAB.js} +2 -2
- package/dist/{chunk-STR7WBOB.js → chunk-ZUDAK436.js} +2 -2
- package/dist/{chunk-ITI3SJRB.js → chunk-ZX5FNWH7.js} +2 -2
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-7S5IEP6Q.js → classified-marker-52P3D72W.js} +3 -3
- package/dist/collection-facade-XKCFHSLR.js +44 -0
- package/dist/{computed-WZNKRLCY.js → computed-33DRJDOC.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/{cover-B5MY43CK.js → cover-5BSNJREH.js} +4 -4
- package/dist/{dead-filter-KRRD57MR.js → dead-filter-JXVCKS6W.js} +2 -2
- package/dist/delegation-WWZPEDK2.js +25 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-CWWFEQ4N.js +21 -0
- package/dist/dispatch-PKQQFDBT.js +193 -0
- package/dist/dispatch-PKQQFDBT.js.map +1 -0
- package/dist/dispatch-SMXUO7W5.js +72 -0
- package/dist/dispatch-SMXUO7W5.js.map +1 -0
- package/dist/{enclave-YFKA3GJT.js → enclave-I5H3GINP.js} +11 -11
- package/dist/executor-FCJEH3FU.js +9 -0
- package/dist/executor-OHET7TF7.js +9 -0
- package/dist/executor-SHYLIBOM.js +26 -0
- package/dist/export-accessible-FBL6TDSK.js +23 -0
- package/dist/extract-partition-ZYIRYMTI.js +38 -0
- package/dist/{fanout-sidecar-HJV3A7PM.js → fanout-sidecar-WWXVHHUH.js} +9 -9
- package/dist/find-LEBUXVL7.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +3 -3
- package/dist/history/index.js +12 -12
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +13 -9
- package/dist/index.js +119 -118
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/issue-F76PAGIR.js +19 -0
- package/dist/kernel/collection.d.ts +0 -1
- package/dist/kernel/enclave/crypto.d.ts +8 -8
- package/dist/kernel/enclave/index.d.ts +2 -2
- package/dist/kernel/errors.d.ts +20 -20
- package/dist/kernel/noydb.d.ts +32 -91
- package/dist/kernel/types.d.ts +82 -41
- package/dist/kernel/validation.d.ts +33 -33
- package/dist/kernel/vault.d.ts +12 -149
- package/dist/kernel/via/dispatch.d.ts +7 -0
- package/dist/{ledger-SW6QQOAV.js → ledger-M2BKCNVS.js} +11 -11
- package/dist/liberate-ZP7UB57K.js +24 -0
- package/dist/{link-set-GNGGCFI4.js → link-set-ZU4E5J5S.js} +11 -11
- package/dist/materialized-views/index.js +19 -19
- package/dist/noydb-BNDGEK5X.js +71 -0
- package/dist/on/index.js +9 -9
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +13 -13
- package/dist/pod/index.js +11 -11
- package/dist/{policy-EAXSJNOT.js → policy-IY2YEA3A.js} +5 -5
- package/dist/port/at/index.d.ts +4 -4
- package/dist/port/with/collection-options.d.ts +171 -0
- package/dist/port/with/team-strategy.d.ts +1 -1
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-A7HCFBP5.js → post-register-XIAHB6KF.js} +6 -6
- package/dist/query/index.js +6 -6
- package/dist/register-HB4TQZSV.js +23 -0
- package/dist/registry-6BMBFEXT.js +19 -0
- package/dist/registry-7CZWF3EQ.js +9 -0
- package/dist/registry-JOFO7RAH.js +18 -0
- package/dist/request-withdrawal-UN3TRHWI.js +31 -0
- package/dist/{reveal-PB3YG544.js → reveal-VWXRV2XU.js} +6 -6
- package/dist/revoke-OLO2OVR7.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/sealed-record/index.js +12 -12
- package/dist/{seed-EKF4DIBB.js → seed-CDBFOTIK.js} +12 -12
- package/dist/seed-CDBFOTIK.js.map +1 -0
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-MGGKPYAN.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-4UNPHWOU.js → stale-NBROTA66.js} +10 -10
- package/dist/storage-3R37QZLA.js +23 -0
- package/dist/{store-coordination-provider-3AELCZ4Y.js → store-coordination-provider-P3IU5JHD.js} +3 -3
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +20 -20
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/tx/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/{verify-MXN66IIH.js → verify-5X37OXRY.js} +5 -5
- package/dist/{walk-H4YE52S2.js → walk-E3OVLBFR.js} +11 -11
- package/dist/with/index.js +11 -11
- 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-cargo/adopt-partition.d.ts +7 -7
- package/dist/with-cargo/index.d.ts +1 -1
- package/dist/with-commit/history/time-machine.d.ts +2 -2
- package/dist/with-formula/derivations/dispatch.d.ts +98 -0
- package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
- package/dist/with-party/custody/liberate.d.ts +3 -3
- package/dist/with-party/session/dev-unlock.d.ts +2 -2
- 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 +2 -2
- package/dist/with-party/team/keyring.d.ts +19 -19
- package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
- package/dist/with-party/team/noydb-facade.d.ts +41 -41
- 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 -30
- package/dist/with-pod/format.d.ts +2 -2
- package/dist/withdraw-accessible-Q2EMATCU.js +28 -0
- package/package.json +3 -3
- package/dist/api-UPAT2O3M.js +0 -20
- package/dist/chunk-25ZDB25Z.js.map +0 -1
- package/dist/chunk-3O62PVDW.js.map +0 -1
- package/dist/chunk-5BHNQNBI.js.map +0 -1
- package/dist/chunk-5P5AAXYA.js.map +0 -1
- package/dist/chunk-BCOKZC4B.js.map +0 -1
- package/dist/chunk-BLB7P7LS.js.map +0 -1
- package/dist/chunk-CCT4WZI6.js.map +0 -1
- package/dist/chunk-GBEXTC6Z.js.map +0 -1
- package/dist/chunk-HKR25MGX.js.map +0 -1
- package/dist/chunk-IGM563N5.js.map +0 -1
- package/dist/chunk-J3VW4J4E.js.map +0 -1
- package/dist/chunk-JA5O7UEZ.js.map +0 -1
- package/dist/chunk-MEKAMERX.js.map +0 -1
- package/dist/chunk-QUIG6BZT.js.map +0 -1
- package/dist/chunk-UEO5CHOP.js.map +0 -1
- package/dist/chunk-W7TCXZWU.js.map +0 -1
- package/dist/chunk-WJDYZP3U.js.map +0 -1
- package/dist/chunk-XULHFSHO.js.map +0 -1
- package/dist/collection-facade-CMZGQ6IS.js +0 -44
- package/dist/delegation-UT76AQIG.js +0 -25
- package/dist/derive-SGRCCKVP.js +0 -21
- package/dist/executor-TEZYRDN3.js +0 -9
- package/dist/executor-WQQRU6DO.js +0 -9
- package/dist/executor-YORMIBWV.js +0 -26
- package/dist/export-accessible-HXMKW5LJ.js +0 -23
- package/dist/extract-partition-QGQ2R42J.js +0 -38
- package/dist/find-VV6PBIHK.js +0 -11
- package/dist/issue-7JJ4Z7E2.js +0 -19
- package/dist/liberate-FK7JI2QX.js +0 -24
- package/dist/noydb-N5IW6OFZ.js +0 -70
- package/dist/register-YBMRLZLO.js +0 -23
- package/dist/registry-3LXKNXWI.js +0 -9
- package/dist/registry-4V4YQCXJ.js +0 -19
- package/dist/registry-ZULMLCJK.js +0 -18
- package/dist/request-withdrawal-SEVUEUDG.js +0 -31
- package/dist/revoke-5QULL5GT.js +0 -24
- package/dist/seed-EKF4DIBB.js.map +0 -1
- package/dist/signer-ZMH35FT4.js +0 -25
- package/dist/storage-QOZKQMID.js +0 -23
- package/dist/withdraw-accessible-HPOVNG2G.js +0 -28
- /package/dist/{api-UPAT2O3M.js.map → api-22ES33N3.js.map} +0 -0
- /package/dist/{backup-JL2GOTYQ.js.map → backup-YCHAC575.js.map} +0 -0
- /package/dist/{chunk-2RMDVWGB.js.map → chunk-2CRZOVDI.js.map} +0 -0
- /package/dist/{chunk-T7S4V52L.js.map → chunk-2PDBYF2O.js.map} +0 -0
- /package/dist/{chunk-L4OA7G5T.js.map → chunk-522MBPE5.js.map} +0 -0
- /package/dist/{chunk-ZJGZDOQO.js.map → chunk-5ATANZSW.js.map} +0 -0
- /package/dist/{chunk-M25ZIEB2.js.map → chunk-5HSSTOOG.js.map} +0 -0
- /package/dist/{chunk-LLVW4V7R.js.map → chunk-5WLDZZ6S.js.map} +0 -0
- /package/dist/{chunk-7B4GPCX7.js.map → chunk-6RPWILRH.js.map} +0 -0
- /package/dist/{chunk-KR5EGWI4.js.map → chunk-7ICV4ASA.js.map} +0 -0
- /package/dist/{chunk-KMONEHDJ.js.map → chunk-AFAPBZAA.js.map} +0 -0
- /package/dist/{chunk-CGPO3ZYB.js.map → chunk-BY5YBSXA.js.map} +0 -0
- /package/dist/{chunk-3XVOLB75.js.map → chunk-CKUYQO2P.js.map} +0 -0
- /package/dist/{chunk-2JZ763FV.js.map → chunk-D4LAJ737.js.map} +0 -0
- /package/dist/{chunk-OOTTXUNV.js.map → chunk-DYZ5CCVM.js.map} +0 -0
- /package/dist/{chunk-N4FZ6ITM.js.map → chunk-EGU4PWQW.js.map} +0 -0
- /package/dist/{chunk-JKWNG3TM.js.map → chunk-FHHYCBBP.js.map} +0 -0
- /package/dist/{chunk-5KI3REO3.js.map → chunk-FTCGEUOY.js.map} +0 -0
- /package/dist/{chunk-5BB3N4KU.js.map → chunk-G4MFQXYX.js.map} +0 -0
- /package/dist/{chunk-KVHWEPT2.js.map → chunk-GHEMAVTN.js.map} +0 -0
- /package/dist/{chunk-OVFCAS7U.js.map → chunk-GP54LU5N.js.map} +0 -0
- /package/dist/{chunk-XW7NWO4A.js.map → chunk-GTNRMJYH.js.map} +0 -0
- /package/dist/{chunk-JW3XCZA2.js.map → chunk-HAPY7WFP.js.map} +0 -0
- /package/dist/{chunk-4X6DJZHY.js.map → chunk-HQKRZIX6.js.map} +0 -0
- /package/dist/{chunk-OWE4BNTM.js.map → chunk-I2XEBEEF.js.map} +0 -0
- /package/dist/{chunk-WEC3JGBA.js.map → chunk-IGLU4ME7.js.map} +0 -0
- /package/dist/{chunk-BZK6JEX4.js.map → chunk-ILM6X6CP.js.map} +0 -0
- /package/dist/{chunk-2KL6NDD4.js.map → chunk-J5TEU77Q.js.map} +0 -0
- /package/dist/{chunk-V7RGFJ3Z.js.map → chunk-JIHH26WQ.js.map} +0 -0
- /package/dist/{chunk-XGVDLQJE.js.map → chunk-JN3SGXJE.js.map} +0 -0
- /package/dist/{chunk-BZEPJJOK.js.map → chunk-K7BADAOS.js.map} +0 -0
- /package/dist/{chunk-U73LHVPF.js.map → chunk-L2CAWCQL.js.map} +0 -0
- /package/dist/{chunk-MSO2C3KG.js.map → chunk-LC7DSMHR.js.map} +0 -0
- /package/dist/{chunk-JA5B3SLH.js.map → chunk-M6QA2KK2.js.map} +0 -0
- /package/dist/{chunk-IUIVDVXM.js.map → chunk-MUPZ6IZX.js.map} +0 -0
- /package/dist/{chunk-QAFWRGVD.js.map → chunk-OGVE4IJW.js.map} +0 -0
- /package/dist/{chunk-2U7Y7BNJ.js.map → chunk-ONB627HU.js.map} +0 -0
- /package/dist/{chunk-GYB2QK5H.js.map → chunk-OWLZONGX.js.map} +0 -0
- /package/dist/{chunk-YHPUDB7Q.js.map → chunk-OWOT7CFC.js.map} +0 -0
- /package/dist/{chunk-VEX6G3YL.js.map → chunk-P4NUJVWL.js.map} +0 -0
- /package/dist/{chunk-NM4LVUXH.js.map → chunk-PTT2NB46.js.map} +0 -0
- /package/dist/{chunk-2ITLQZV5.js.map → chunk-PWWWMRT7.js.map} +0 -0
- /package/dist/{chunk-GS3Q2KOZ.js.map → chunk-QBOQI6PG.js.map} +0 -0
- /package/dist/{chunk-JIMEB4C6.js.map → chunk-QMMOMBH6.js.map} +0 -0
- /package/dist/{chunk-QDNVHA2F.js.map → chunk-QMZ5A6FQ.js.map} +0 -0
- /package/dist/{chunk-FLHOTGOO.js.map → chunk-QVGEVZ5F.js.map} +0 -0
- /package/dist/{chunk-AFBJHD55.js.map → chunk-QZJEYZ4I.js.map} +0 -0
- /package/dist/{chunk-V3YB7RGR.js.map → chunk-R2N37AA6.js.map} +0 -0
- /package/dist/{chunk-JLHKBAFY.js.map → chunk-RWW3I3PO.js.map} +0 -0
- /package/dist/{chunk-IGAIOGCN.js.map → chunk-S4YERMGJ.js.map} +0 -0
- /package/dist/{chunk-OGFPMCSP.js.map → chunk-SBOHNJUD.js.map} +0 -0
- /package/dist/{chunk-QXPOEAKR.js.map → chunk-SC4JLMZI.js.map} +0 -0
- /package/dist/{chunk-EDC6MLXV.js.map → chunk-SEU6QHH4.js.map} +0 -0
- /package/dist/{chunk-F4COUZLL.js.map → chunk-TMR64XPL.js.map} +0 -0
- /package/dist/{chunk-DEQ2JTBR.js.map → chunk-TNATF3HB.js.map} +0 -0
- /package/dist/{chunk-GZ2GKOF6.js.map → chunk-TNJVDG2B.js.map} +0 -0
- /package/dist/{chunk-5OZCCLNC.js.map → chunk-TSNRZSRC.js.map} +0 -0
- /package/dist/{chunk-QCUH2G77.js.map → chunk-UTEATWHO.js.map} +0 -0
- /package/dist/{chunk-YGBIBOCR.js.map → chunk-VEGQYPCP.js.map} +0 -0
- /package/dist/{chunk-25G7U6RD.js.map → chunk-WQN5SM7P.js.map} +0 -0
- /package/dist/{chunk-NOT7XA7Q.js.map → chunk-X3MWEFPT.js.map} +0 -0
- /package/dist/{chunk-BVZGNMVM.js.map → chunk-YFFEF6HR.js.map} +0 -0
- /package/dist/{chunk-H4SMS4O2.js.map → chunk-YJ3TREAC.js.map} +0 -0
- /package/dist/{chunk-5SZ24DL5.js.map → chunk-YQQPNXNO.js.map} +0 -0
- /package/dist/{chunk-EW4HFWGJ.js.map → chunk-YWZEDG7F.js.map} +0 -0
- /package/dist/{chunk-2VUISNGP.js.map → chunk-YXIVUWDU.js.map} +0 -0
- /package/dist/{chunk-YG2EG6CB.js.map → chunk-YXZNGHID.js.map} +0 -0
- /package/dist/{chunk-QYJIOWKN.js.map → chunk-YZN6NRTR.js.map} +0 -0
- /package/dist/{chunk-IZX3WZBF.js.map → chunk-YZNKFYDC.js.map} +0 -0
- /package/dist/{chunk-E2R5NRZD.js.map → chunk-Z4D3YGAB.js.map} +0 -0
- /package/dist/{chunk-STR7WBOB.js.map → chunk-ZUDAK436.js.map} +0 -0
- /package/dist/{chunk-ITI3SJRB.js.map → chunk-ZX5FNWH7.js.map} +0 -0
- /package/dist/{classified-marker-7S5IEP6Q.js.map → classified-marker-52P3D72W.js.map} +0 -0
- /package/dist/{collection-facade-CMZGQ6IS.js.map → collection-facade-XKCFHSLR.js.map} +0 -0
- /package/dist/{computed-WZNKRLCY.js.map → computed-33DRJDOC.js.map} +0 -0
- /package/dist/{cover-B5MY43CK.js.map → cover-5BSNJREH.js.map} +0 -0
- /package/dist/{dead-filter-KRRD57MR.js.map → dead-filter-JXVCKS6W.js.map} +0 -0
- /package/dist/{delegation-UT76AQIG.js.map → delegation-WWZPEDK2.js.map} +0 -0
- /package/dist/{derive-SGRCCKVP.js.map → derive-CWWFEQ4N.js.map} +0 -0
- /package/dist/{enclave-YFKA3GJT.js.map → enclave-I5H3GINP.js.map} +0 -0
- /package/dist/{executor-TEZYRDN3.js.map → executor-FCJEH3FU.js.map} +0 -0
- /package/dist/{executor-WQQRU6DO.js.map → executor-OHET7TF7.js.map} +0 -0
- /package/dist/{executor-YORMIBWV.js.map → executor-SHYLIBOM.js.map} +0 -0
- /package/dist/{export-accessible-HXMKW5LJ.js.map → export-accessible-FBL6TDSK.js.map} +0 -0
- /package/dist/{extract-partition-QGQ2R42J.js.map → extract-partition-ZYIRYMTI.js.map} +0 -0
- /package/dist/{fanout-sidecar-HJV3A7PM.js.map → fanout-sidecar-WWXVHHUH.js.map} +0 -0
- /package/dist/{find-VV6PBIHK.js.map → find-LEBUXVL7.js.map} +0 -0
- /package/dist/{issue-7JJ4Z7E2.js.map → issue-F76PAGIR.js.map} +0 -0
- /package/dist/{ledger-SW6QQOAV.js.map → ledger-M2BKCNVS.js.map} +0 -0
- /package/dist/{liberate-FK7JI2QX.js.map → liberate-ZP7UB57K.js.map} +0 -0
- /package/dist/{link-set-GNGGCFI4.js.map → link-set-ZU4E5J5S.js.map} +0 -0
- /package/dist/{noydb-N5IW6OFZ.js.map → noydb-BNDGEK5X.js.map} +0 -0
- /package/dist/{policy-EAXSJNOT.js.map → policy-IY2YEA3A.js.map} +0 -0
- /package/dist/{post-register-A7HCFBP5.js.map → post-register-XIAHB6KF.js.map} +0 -0
- /package/dist/{register-YBMRLZLO.js.map → register-HB4TQZSV.js.map} +0 -0
- /package/dist/{registry-3LXKNXWI.js.map → registry-6BMBFEXT.js.map} +0 -0
- /package/dist/{registry-4V4YQCXJ.js.map → registry-7CZWF3EQ.js.map} +0 -0
- /package/dist/{registry-ZULMLCJK.js.map → registry-JOFO7RAH.js.map} +0 -0
- /package/dist/{request-withdrawal-SEVUEUDG.js.map → request-withdrawal-UN3TRHWI.js.map} +0 -0
- /package/dist/{reveal-PB3YG544.js.map → reveal-VWXRV2XU.js.map} +0 -0
- /package/dist/{revoke-5QULL5GT.js.map → revoke-OLO2OVR7.js.map} +0 -0
- /package/dist/{signer-ZMH35FT4.js.map → signer-MGGKPYAN.js.map} +0 -0
- /package/dist/{stale-4UNPHWOU.js.map → stale-NBROTA66.js.map} +0 -0
- /package/dist/{storage-QOZKQMID.js.map → storage-3R37QZLA.js.map} +0 -0
- /package/dist/{store-coordination-provider-3AELCZ4Y.js.map → store-coordination-provider-P3IU5JHD.js.map} +0 -0
- /package/dist/{verify-MXN66IIH.js.map → verify-5X37OXRY.js.map} +0 -0
- /package/dist/{walk-H4YE52S2.js.map → walk-E3OVLBFR.js.map} +0 -0
- /package/dist/{withdraw-accessible-HPOVNG2G.js.map → withdraw-accessible-Q2EMATCU.js.map} +0 -0
|
@@ -19,7 +19,7 @@ export { liberateVault } from '../with-party/custody/liberate.js';
|
|
|
19
19
|
export type { LiberateOptions, LiberateResult } from '../with-party/custody/liberate.js';
|
|
20
20
|
export { createDeedOwner, loadDeedMarker, isDeedVault } from '../with-party/team/deed.js';
|
|
21
21
|
export type { DeedMarker } from '../with-party/team/deed.js';
|
|
22
|
-
export type { SealingKeyProvider } from '../with-party/team/managed-
|
|
22
|
+
export type { SealingKeyProvider } from '../with-party/team/managed-secret.js';
|
|
23
23
|
export { diffVault } from './vault-diff.js';
|
|
24
24
|
export { STATE_VAULT_NAME } from '../kernel/constants.js';
|
|
25
25
|
export { withCargo } from './active.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ## Usage
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
|
-
* const vault = await db.openVault('acme', {
|
|
8
|
+
* const vault = await db.openVault('acme', { secret })
|
|
9
9
|
* const q1End = vault.at('2026-03-31T23:59:59Z')
|
|
10
10
|
* const invoice = await q1End.collection<Invoice>('invoices').get('inv-001')
|
|
11
11
|
* // → the record as it stood at the close of Q1 2026
|
|
@@ -64,7 +64,7 @@ export interface VaultEngine {
|
|
|
64
64
|
/** Vault name (the compartment). */
|
|
65
65
|
readonly name: string;
|
|
66
66
|
/**
|
|
67
|
-
* `true` when the vault was opened with a
|
|
67
|
+
* `true` when the vault was opened with a secret (the normal
|
|
68
68
|
* case). `false` in plaintext-mode vaults (`encrypt: false`) — in
|
|
69
69
|
* that case `envelope._data` is raw JSON and we skip the DEK lookup.
|
|
70
70
|
*/
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derivation dispatch, lifted out of the kernel spine (#842 part b).
|
|
3
|
+
*
|
|
4
|
+
* `Collection` carried ~380 lines of dispatch logic that belongs to the
|
|
5
|
+
* derivation service, not to the always-on kernel. These are free functions
|
|
6
|
+
* taking an explicit context so the spine keeps only a thin delegator.
|
|
7
|
+
*
|
|
8
|
+
* ## How the spine reaches this module
|
|
9
|
+
*
|
|
10
|
+
* By dynamic `import()`, never a static one. `check-architecture.mjs`'s
|
|
11
|
+
* `port-layering` check forbids the spine from statically importing a
|
|
12
|
+
* `with-*` service; `collection.ts` is grandfathered for ten
|
|
13
|
+
* `with-formula/*` specifiers, but that list is frozen per file and a new
|
|
14
|
+
* one is a violation. A dynamic import is the sanctioned S4 gate recipe, and
|
|
15
|
+
* it keeps this chunk out of the floor bundle for consumers who never fire a
|
|
16
|
+
* derivation.
|
|
17
|
+
*
|
|
18
|
+
* The `Collection` type reference below points back at the spine. That is
|
|
19
|
+
* inward (service → kernel) and so allowed, and it is TYPE-ONLY — erased at
|
|
20
|
+
* build, so no runtime cycle exists.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
import type { NoydbStore } from '../../kernel/types.js';
|
|
25
|
+
import type { TxContext } from '../../with-commit/tx/transaction.js';
|
|
26
|
+
import type { DerivationRegistry } from './registry.js';
|
|
27
|
+
import type { ReadOnlyVaultFacade } from '../../with-audit/guards/types.js';
|
|
28
|
+
import type { Collection } from '../../kernel/collection.js';
|
|
29
|
+
import type { EnclaveKey } from '../../kernel/enclave/index.js';
|
|
30
|
+
import type { EncryptedEnvelope } from '../../kernel/types.js';
|
|
31
|
+
import type { ledgerAuditHook, WaveContext } from '../../kernel/via/dispatch.js';
|
|
32
|
+
/** The per-write dispatch context threaded into `putDerivedOutput`. */
|
|
33
|
+
interface DispatchCtx {
|
|
34
|
+
emit: (e: string, p: unknown) => void;
|
|
35
|
+
source: {
|
|
36
|
+
readonly collection: string;
|
|
37
|
+
readonly id: string;
|
|
38
|
+
};
|
|
39
|
+
audit: ReturnType<typeof ledgerAuditHook>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* What the dispatchers need from the collection that owns them. Passing this
|
|
43
|
+
* explicitly is what lets the logic live outside the class.
|
|
44
|
+
*/
|
|
45
|
+
export interface DerivationDeleteCtx {
|
|
46
|
+
readonly derivationSource: {
|
|
47
|
+
registry(): DerivationRegistry;
|
|
48
|
+
getCollection(name: string): Collection<Record<string, unknown>>;
|
|
49
|
+
getActiveTxContext(): TxContext | null;
|
|
50
|
+
getReadOnlyFacade(): ReadOnlyVaultFacade;
|
|
51
|
+
};
|
|
52
|
+
/** The collection the delete happened in. */
|
|
53
|
+
readonly collectionName: string;
|
|
54
|
+
readonly adapter: NoydbStore;
|
|
55
|
+
readonly vault: string;
|
|
56
|
+
readonly getDEK: (collectionName: string) => Promise<EnclaveKey>;
|
|
57
|
+
readonly storeCiphertext: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Erase the derived rows a deleted source record fanned out to, and drop the
|
|
61
|
+
* fan-out sidecars that recorded them.
|
|
62
|
+
*
|
|
63
|
+
* @param eraseRecordShapeToo also erase same-id `shape: 'record'` outputs.
|
|
64
|
+
* Restricted to a source-triggered strategy writing into a DIFFERENT
|
|
65
|
+
* collection — the self-denorm case would re-delete the record just
|
|
66
|
+
* tombstoned, and triggerBy/sibling strategies derive under a different id.
|
|
67
|
+
* @returns rows ACTUALLY deleted, not edges visited (#622).
|
|
68
|
+
*/
|
|
69
|
+
export declare function dispatchArrayDerivationsOnDelete(ctx: DerivationDeleteCtx, id: string, eraseRecordShapeToo?: boolean): Promise<number>;
|
|
70
|
+
/** Adds what the on-write derivation dispatch needs beyond the delete path. */
|
|
71
|
+
export interface DerivationDispatchCtx extends DerivationDeleteCtx {
|
|
72
|
+
/** Via pipeline, for decoding the stored form back to canonical money shape. */
|
|
73
|
+
readonly via: {
|
|
74
|
+
canonicalizeStored(r: Record<string, unknown>): Record<string, unknown>;
|
|
75
|
+
} | undefined;
|
|
76
|
+
/** Recompute a rollup aggregate onto a parent. Stays on the spine — it walks collections. */
|
|
77
|
+
readonly recomputeRollup: (spec: any, parentId: string, source: {
|
|
78
|
+
readonly collection: string;
|
|
79
|
+
readonly id: string;
|
|
80
|
+
}, wave?: WaveContext) => Promise<unknown>;
|
|
81
|
+
/** Builds the per-write dispatch context threaded into `putDerivedOutput`. */
|
|
82
|
+
readonly dispatchCtx: (source: {
|
|
83
|
+
readonly collection: string;
|
|
84
|
+
readonly id: string;
|
|
85
|
+
}) => DispatchCtx;
|
|
86
|
+
/** Registers a write on the active transaction for rollback. */
|
|
87
|
+
readonly trackPut: (txCtx: TxContext, collectionName: string, id: string, priorEnvelope: EncryptedEnvelope | null) => void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Fire registered derivation strategies for this source collection.
|
|
91
|
+
*
|
|
92
|
+
* Eager mode runs `derive` inline and writes each output; lazy mode records a
|
|
93
|
+
* stale mark for cold-session recompute. Rollups are handled here rather than
|
|
94
|
+
* by the executor — a write to the child recomputes the parent aggregate, and
|
|
95
|
+
* a write to the parent recomputes its own.
|
|
96
|
+
*/
|
|
97
|
+
export declare function dispatchDerivations(ctx: DerivationDispatchCtx, id: string, record: Record<string, unknown>, version: number, wave?: WaveContext): Promise<void>;
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Materialized-view dispatch, lifted out of the kernel spine (#842 part b).
|
|
3
|
+
*
|
|
4
|
+
* Reached from `Collection` by dynamic `import()` only — `port-layering`
|
|
5
|
+
* forbids a static spine→`with-*` import, and rejects a type-only one too
|
|
6
|
+
* (it scans import statements, not their erasure). See
|
|
7
|
+
* `with-formula/derivations/dispatch.ts` for the same note.
|
|
8
|
+
*
|
|
9
|
+
* The `Collection` reference below is TYPE-ONLY and points inward
|
|
10
|
+
* (service → kernel), so it is both allowed and erased at build.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
import type { TxContext } from '../../with-commit/tx/transaction.js';
|
|
15
|
+
import type { Collection } from '../../kernel/collection.js';
|
|
16
|
+
import type { ledgerAuditHook, WaveContext } from '../../kernel/via/dispatch.js';
|
|
17
|
+
import type { MaterializedViewRegistry } from './registry.js';
|
|
18
|
+
import type { MVQueryContext } from './types.js';
|
|
19
|
+
/** The per-write dispatch context the MV executor threads through. */
|
|
20
|
+
interface DispatchCtx {
|
|
21
|
+
emit: (e: string, p: unknown) => void;
|
|
22
|
+
source: {
|
|
23
|
+
readonly collection: string;
|
|
24
|
+
readonly id: string;
|
|
25
|
+
};
|
|
26
|
+
audit: ReturnType<typeof ledgerAuditHook>;
|
|
27
|
+
}
|
|
28
|
+
/** What the MV dispatchers need from the collection that owns them. */
|
|
29
|
+
export interface MvDispatchCtx {
|
|
30
|
+
readonly materializedViewSource: {
|
|
31
|
+
registry(): MaterializedViewRegistry;
|
|
32
|
+
getCollection(name: string): Collection<any>;
|
|
33
|
+
getActiveTxContext(): TxContext | null;
|
|
34
|
+
getQueryContext(): MVQueryContext;
|
|
35
|
+
};
|
|
36
|
+
/** The collection the delete happened in. */
|
|
37
|
+
readonly collectionName: string;
|
|
38
|
+
/** Builds the per-write dispatch context the executor threads through. */
|
|
39
|
+
readonly dispatchCtx: (source: {
|
|
40
|
+
readonly collection: string;
|
|
41
|
+
readonly id: string;
|
|
42
|
+
}) => DispatchCtx;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Fire every MV whose dependency set includes this collection, on write.
|
|
46
|
+
*
|
|
47
|
+
* Skips entirely when the record being written is itself an MV-emitted row
|
|
48
|
+
* (it carries `_materializedFrom`) — a defensive guard against missed cycle
|
|
49
|
+
* detection.
|
|
50
|
+
*
|
|
51
|
+
* @param wave #638 Task 4 — the sync/cutover/restore dispatch wave. An eager
|
|
52
|
+
* MV already refreshed in this wave is skipped, deduped per target on the
|
|
53
|
+
* spec name.
|
|
54
|
+
*/
|
|
55
|
+
export declare function dispatchMaterializedViews(ctx: MvDispatchCtx, id: string, record: Record<string, unknown>, wave?: WaveContext): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Mirror of {@link dispatchMaterializedViews} for the delete/forget path. There is
|
|
58
|
+
* no `_materializedFrom` skip — the record is gone — and the `internal` gate
|
|
59
|
+
* at `_doDelete` is the recursion guard.
|
|
60
|
+
*
|
|
61
|
+
* @returns rows TOMBSTONED across every MV sourced here (#638 T6). Eager and
|
|
62
|
+
* lazy/manual `invalidateMVAtRest` purges both contribute (#761 item 1,
|
|
63
|
+
* previously eager-only): lazy persists a stale mark for cold-session
|
|
64
|
+
* recompute, manual serves empty until `refreshView()`.
|
|
65
|
+
* `residueUndecodable` / `residueDeclined` (#776/#785) carry
|
|
66
|
+
* `outputCollection:id` entries whose ownership stamp `invalidateMVAtRest`
|
|
67
|
+
* could not decode, respectively decoded and stamp-matched but declined to
|
|
68
|
+
* erase — surfaced, not erased.
|
|
69
|
+
*/
|
|
70
|
+
export declare function dispatchMaterializedViewsOnDelete(ctx: MvDispatchCtx, id: string): Promise<{
|
|
71
|
+
deleted: number;
|
|
72
|
+
residueUndecodable: string[];
|
|
73
|
+
residueDeclined: string[];
|
|
74
|
+
}>;
|
|
75
|
+
export {};
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* unseal the original sealed owner. The old sealed-owner credential is left
|
|
25
25
|
* untouched and ORPHANED (its `_keyring/<id>` file remains, its KEK is still
|
|
26
26
|
* sealed under the non-firm provider), never impersonated. The new owner is a
|
|
27
|
-
* DISTINCT principal under a fresh KEK derived from `
|
|
27
|
+
* DISTINCT principal under a fresh KEK derived from `newOwnerSecret`. This
|
|
28
28
|
* preserves the inalienability floor: the act of claiming ownership is itself
|
|
29
29
|
* auditable and produces a different principal, rather than silently assuming
|
|
30
30
|
* the latent owner's identity.
|
|
@@ -47,8 +47,8 @@ import type { FrozenSnapshotRef } from '../../with-audit/portability/withdraw-ac
|
|
|
47
47
|
export interface LiberateOptions {
|
|
48
48
|
/** The id of the new owner principal the custodian mints by claiming ownership. */
|
|
49
49
|
readonly newOwnerId: string;
|
|
50
|
-
/** The
|
|
51
|
-
readonly
|
|
50
|
+
/** The secret that derives the new owner's KEK (the DEKs are re-wrapped under it). */
|
|
51
|
+
readonly newOwnerSecret: string;
|
|
52
52
|
/** Legal/contractual basis recorded in the audit (e.g. 'contractual-handover'). */
|
|
53
53
|
readonly legalBasis: string;
|
|
54
54
|
readonly factors?: FactorProofBundle;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Dev-mode persistent unlock —
|
|
3
3
|
*
|
|
4
4
|
* Solves the developer inner-loop friction: hot-reload destroys the session
|
|
5
|
-
* (page navigation semantics), forcing a
|
|
5
|
+
* (page navigation semantics), forcing a secret re-entry every refresh.
|
|
6
6
|
*
|
|
7
7
|
* This module provides an opt-in, deliberately-named escape hatch that lets
|
|
8
8
|
* developers store the keyring payload in sessionStorage or localStorage so
|
|
9
|
-
* the vault auto-unlocks on every page load — without a
|
|
9
|
+
* the vault auto-unlocks on every page load — without a secret,
|
|
10
10
|
* without a biometric prompt, without any OIDC flow.
|
|
11
11
|
*
|
|
12
12
|
* ⚠️ WARNING — this is a loaded footgun ⚠️
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Session tokens —
|
|
3
3
|
*
|
|
4
|
-
* After a vault is unlocked (via
|
|
4
|
+
* After a vault is unlocked (via secret, WebAuthn, OIDC, or magic-
|
|
5
5
|
* link), the caller can call `createSession()` to get a session token that
|
|
6
6
|
* allows re-establishing the KEK for the session lifetime without re-running
|
|
7
7
|
* PBKDF2 or any interactive auth challenge.
|
|
@@ -75,7 +75,7 @@ export interface CreateSessionOptions {
|
|
|
75
75
|
/**
|
|
76
76
|
* Create a session for an already-unlocked keyring.
|
|
77
77
|
*
|
|
78
|
-
* Call this after any successful unlock (
|
|
78
|
+
* Call this after any successful unlock (secret, WebAuthn, OIDC,
|
|
79
79
|
* magic-link). The returned `sessionId` is the handle for later
|
|
80
80
|
* `resolveSession()` and `revokeSession()` calls.
|
|
81
81
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* FR-6 — Deed: sealed / hidden-owner provisioning.
|
|
3
3
|
*
|
|
4
4
|
* A **Deed** is a vault owned by a *latent* principal who never
|
|
5
|
-
* authenticates. The owner credential (the random
|
|
5
|
+
* authenticates. The owner credential (the random secret that
|
|
6
6
|
* derives `KEK_owner`) is minted machine-side and sealed under a
|
|
7
7
|
* **non-firm** {@link SealingKeyProvider} — that sealing boundary is
|
|
8
8
|
* the cryptographic *inalienability anchor*: whoever holds the
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Provisioning reuses the managed-mode seam:
|
|
15
15
|
* - {@link resolveManagedSecret} mints + seals + persists the random
|
|
16
|
-
*
|
|
16
|
+
* secret at `_meta/sealed-secret` (and unseals it on every
|
|
17
17
|
* subsequent open through the same provider).
|
|
18
18
|
* - {@link createOwnerKeyring} derives `KEK_owner` from that
|
|
19
|
-
*
|
|
19
|
+
* secret and writes the `_keyring/<ownerUserId>` file.
|
|
20
20
|
*
|
|
21
21
|
* On top of that, a Deed writes a `_meta/deed` **marker**. The marker
|
|
22
22
|
* is PLAINTEXT metadata — it records WHO the latent owner is and WHICH
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import type { NoydbStore } from '../../kernel/types.js';
|
|
32
32
|
import type { UnlockedKeyring } from './keyring.js';
|
|
33
|
-
import type { SealingKeyProvider } from './managed-
|
|
33
|
+
import type { SealingKeyProvider } from './managed-secret.js';
|
|
34
34
|
/** Reserved id for the Deed marker under `_meta`. */
|
|
35
35
|
export declare const DEED_RECORD_ID: "deed";
|
|
36
36
|
/**
|
|
@@ -60,7 +60,7 @@ export interface DeedMarker {
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Provision a Deed: a latent owner whose credential is sealed under
|
|
63
|
-
* `sealing` (a NON-firm provider). Mints + seals the owner
|
|
63
|
+
* `sealing` (a NON-firm provider). Mints + seals the owner secret
|
|
64
64
|
* via {@link resolveManagedSecret}, derives the owner keyring via
|
|
65
65
|
* {@link createOwnerKeyring}, then writes the plaintext `_meta/deed`
|
|
66
66
|
* marker. Returns the unlocked owner keyring.
|
|
@@ -68,8 +68,8 @@ export interface DeedMarker {
|
|
|
68
68
|
* The returned keyring is the only in-memory window onto `KEK_owner`
|
|
69
69
|
* for this call; the persistent re-entry point is the sealing provider
|
|
70
70
|
* (re-run {@link resolveManagedSecret} with the same provider to
|
|
71
|
-
* re-resolve the
|
|
72
|
-
* unlock — no interactive
|
|
71
|
+
* re-resolve the secret, then {@link createOwnerKeyring}/load to
|
|
72
|
+
* unlock — no interactive secret is ever required).
|
|
73
73
|
*
|
|
74
74
|
* There is deliberately no firm-controlled fallback: the marker's
|
|
75
75
|
* `sealedUnder` is the single cryptographic anchor of ownership.
|
|
@@ -85,7 +85,7 @@ export declare function loadDeedMarker(store: NoydbStore, vault: string): Promis
|
|
|
85
85
|
export declare function isDeedVault(store: NoydbStore, vault: string): Promise<boolean>;
|
|
86
86
|
/**
|
|
87
87
|
* Persist a {@link DeedMarker} at `_meta/deed`. Mirrors
|
|
88
|
-
* `
|
|
88
|
+
* `saveSealedSecret`'s envelope shape: a standard
|
|
89
89
|
* {@link EncryptedEnvelope} with AES-GCM bypassed (`_iv: ''`), the
|
|
90
90
|
* payload stored as plaintext JSON in `_data`. The marker is metadata,
|
|
91
91
|
* not a secret — sealing it would defeat its purpose (auditors /
|
|
@@ -20,8 +20,8 @@ export { loadKeyring, createOwnerKeyring, grant, revoke, changeSecret, listUsers
|
|
|
20
20
|
export type { BundleRecipient, ListUsersOptions } from './keyring.js';
|
|
21
21
|
export { enrollAuthenticator, removeAuthenticator, updateAuthenticator, findAuthenticator, } from './authenticators.js';
|
|
22
22
|
export type { EnrollAuthenticatorOptions, EnrollAuthenticatorWrappingKEKOptions, EnrollAuthenticatorWrappingDEKsOptions, UpdateAuthenticatorOptions, } from './authenticators.js';
|
|
23
|
-
export {
|
|
24
|
-
export type {
|
|
23
|
+
export { rotateSecret, recoverSecret, } from './rotate-recover.js';
|
|
24
|
+
export type { RotateSecretInput, RecoverSecretInput, RecoverSecretResult, RecoveryProof, SlotRewrapContext, SlotRewrapCeremony, } from './rotate-recover.js';
|
|
25
25
|
export { recoverUser } from './peer-recover.js';
|
|
26
26
|
export type { RecoverUserOptions } from './peer-recover.js';
|
|
27
27
|
export { mintPaperRecoveryEntry, unwrapDeksFromPaperEntry, loadPaperRecoveryEntries, savePaperRecoveryEntries, burnPaperRecoveryEntry, } from './recovery.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NoydbStore, KeyringFile, KeyringAuthenticator, Role, Permissions, GrantOptions, RevokeOptions, UpdateUserOptions, UserInfo, ExportCapability, ExportFormat, ImportCapability, VaultPolicyOnDisk, UserEnvelope } from '../../kernel/types.js';
|
|
2
2
|
import { type EnclaveKey } from '../../kernel/enclave/index.js';
|
|
3
|
-
import { type
|
|
3
|
+
import { type SecretPolicy } from '../../kernel/validation.js';
|
|
4
4
|
/** In-memory representation of an unlocked keyring. */
|
|
5
5
|
export interface UnlockedKeyring {
|
|
6
6
|
readonly userId: string;
|
|
@@ -9,7 +9,7 @@ export interface UnlockedKeyring {
|
|
|
9
9
|
readonly permissions: Permissions;
|
|
10
10
|
readonly deks: Map<string, EnclaveKey>;
|
|
11
11
|
/**
|
|
12
|
-
* The KEK, when this keyring was unlocked via tier 1 (
|
|
12
|
+
* The KEK, when this keyring was unlocked via tier 1 (secret) or
|
|
13
13
|
* a wrap-KEK tier-2 method (WebAuthn / OIDC). `null` when the
|
|
14
14
|
* keyring was opened via:
|
|
15
15
|
*
|
|
@@ -72,7 +72,7 @@ export interface UnlockedKeyring {
|
|
|
72
72
|
/** Mint a fresh wrapped-canary string. Deterministic for a given KEK. */
|
|
73
73
|
export declare function mintKeyringCanary(kek: EnclaveKey): Promise<string>;
|
|
74
74
|
/** Load and unlock a user's keyring for a vault. */
|
|
75
|
-
export declare function loadKeyring(adapter: NoydbStore, vault: string, userId: string,
|
|
75
|
+
export declare function loadKeyring(adapter: NoydbStore, vault: string, userId: string, secret: string): Promise<UnlockedKeyring>;
|
|
76
76
|
/**
|
|
77
77
|
* Open-policy pre-gate: decide create-vs-fail-closed **before** any
|
|
78
78
|
* vault write. `openVault` must not self-provision an owner keyring into a
|
|
@@ -81,21 +81,21 @@ export declare function loadKeyring(adapter: NoydbStore, vault: string, userId:
|
|
|
81
81
|
* `store.list`. Returns when the open may proceed (the caller is a member, or
|
|
82
82
|
* the vault is genuinely-new and `create` is allowed, in which case the caller
|
|
83
83
|
* falls through to the normal `createOwnerKeyring` path); throws `NoAccessError`
|
|
84
|
-
* otherwise. Placed before managed-
|
|
84
|
+
* otherwise. Placed before managed-secret secret resolution (which persists
|
|
85
85
|
* on first open), so a fail-closed open writes nothing.
|
|
86
86
|
*/
|
|
87
87
|
export declare function assertKeyringOpenAllowed(store: NoydbStore, vault: string, userId: string, create: boolean): Promise<void>;
|
|
88
88
|
/**
|
|
89
89
|
* Create the initial owner keyring for a new vault.
|
|
90
90
|
*
|
|
91
|
-
* Pass `{ validate: true }` (or a `
|
|
91
|
+
* Pass `{ validate: true }` (or a `SecretPolicy`) to gate creation
|
|
92
92
|
* on the phrase-format strength rules — `Noydb` threads this from
|
|
93
|
-
* `NoydbOptions.
|
|
93
|
+
* `NoydbOptions.validateSecret`. Direct callers (CLI, scripts,
|
|
94
94
|
* test fixtures) opt in explicitly.
|
|
95
95
|
*/
|
|
96
|
-
export declare function createOwnerKeyring(adapter: NoydbStore, vault: string, userId: string,
|
|
96
|
+
export declare function createOwnerKeyring(adapter: NoydbStore, vault: string, userId: string, secret: string, secretOpts?: SecretPolicy & {
|
|
97
97
|
validate?: boolean;
|
|
98
|
-
|
|
98
|
+
allowWeakSecret?: boolean;
|
|
99
99
|
}): Promise<UnlockedKeyring>;
|
|
100
100
|
/** Grant access to a new user. Caller must have grant privilege. */
|
|
101
101
|
export declare function grant(adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: GrantOptions): Promise<void>;
|
|
@@ -134,23 +134,23 @@ export declare function updateKeyringIdentity(adapter: NoydbStore, vault: string
|
|
|
134
134
|
*/
|
|
135
135
|
export declare function rotateKeys(adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]): Promise<void>;
|
|
136
136
|
/**
|
|
137
|
-
* Change the user's
|
|
137
|
+
* Change the user's secret. Re-wraps every DEK under the new KEK.
|
|
138
138
|
*
|
|
139
|
-
* Validates the new
|
|
140
|
-
* `
|
|
139
|
+
* Validates the new secret against the strength rules unless
|
|
140
|
+
* `allowWeakSecret: true` is passed. Mirrors `rotateSecret`'s
|
|
141
141
|
* default-on validation contract.
|
|
142
142
|
*
|
|
143
|
-
* `db.
|
|
144
|
-
* on top of this primitive and additionally requires the OLD
|
|
143
|
+
* `db.team.rotateSecret()` adds a `checkGate('rotate-secret')` step
|
|
144
|
+
* on top of this primitive and additionally requires the OLD secret
|
|
145
145
|
* for re-derivation; `changeSecret` reuses the cached unlocked KEK so
|
|
146
|
-
* the OLD
|
|
146
|
+
* the OLD secret is not retyped.
|
|
147
147
|
*/
|
|
148
|
-
export declare function changeSecret(adapter: NoydbStore, vault: string, keyring: UnlockedKeyring,
|
|
149
|
-
|
|
148
|
+
export declare function changeSecret(adapter: NoydbStore, vault: string, keyring: UnlockedKeyring, newSecret: string, secretOpts?: SecretPolicy & {
|
|
149
|
+
allowWeakSecret?: boolean;
|
|
150
150
|
}): Promise<UnlockedKeyring>;
|
|
151
151
|
/**
|
|
152
152
|
* Recipient slot in a re-keyed `.noydb` bundle. Each slot becomes its
|
|
153
|
-
* own keyring file inside the bundle, sealed with its own
|
|
153
|
+
* own keyring file inside the bundle, sealed with its own secret.
|
|
154
154
|
* Same role/permission semantics as `db.grant()` but no adapter side
|
|
155
155
|
* effect — the slot only exists inside the bundle bytes.
|
|
156
156
|
*
|
|
@@ -161,8 +161,8 @@ export interface BundleRecipient {
|
|
|
161
161
|
readonly id: string;
|
|
162
162
|
/** Optional display name. Defaults to `id`. */
|
|
163
163
|
readonly displayName?: string;
|
|
164
|
-
/**
|
|
165
|
-
readonly
|
|
164
|
+
/** Secret the recipient will type to unlock. */
|
|
165
|
+
readonly secret: string;
|
|
166
166
|
/** Role on the destination vault. Defaults to `'viewer'`. */
|
|
167
167
|
readonly role?: Role;
|
|
168
168
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Managed-
|
|
2
|
+
* Managed-secret mode — rubber-hose-resistant vaults.
|
|
3
3
|
*
|
|
4
|
-
* A vault mode where the
|
|
4
|
+
* A vault mode where the secret is machine-generated and never
|
|
5
5
|
* exposed to the user, sealed under a developer-provided
|
|
6
6
|
* {@link SealingKeyProvider} (macOS Keychain, Windows Credential
|
|
7
7
|
* Manager, libsecret, AWS KMS, …). The user has no secret to give
|
|
@@ -27,31 +27,31 @@
|
|
|
27
27
|
* implementation of both `RecipientSealer` and
|
|
28
28
|
* `SealingKeyProvider` using real WebCrypto RSA-OAEP + AES-GCM;
|
|
29
29
|
* safe for tests and same-process sender/recipient scenarios.
|
|
30
|
-
* - {@link
|
|
31
|
-
* plaintext envelope storage at `_meta/sealed-
|
|
30
|
+
* - {@link loadSealedSecret} / {@link saveSealedSecret} —
|
|
31
|
+
* plaintext envelope storage at `_meta/sealed-secret`.
|
|
32
32
|
* Mirrors the `_meta/handle` and `_meta/public-envelope` AES-
|
|
33
33
|
* GCM-bypassed patterns. The sealing layer (provider's job)
|
|
34
34
|
* is the security boundary; hub doesn't have a key to encrypt
|
|
35
35
|
* with at this layer — that's the whole point of the design.
|
|
36
36
|
* - {@link resolveManagedSecret} — orchestrates the "generate +
|
|
37
37
|
* seal + persist on first open; unseal on reopen" flow.
|
|
38
|
-
* Returns the plaintext
|
|
38
|
+
* Returns the plaintext secret string that the rest of the
|
|
39
39
|
* `createNoydb` keyring path consumes.
|
|
40
40
|
*
|
|
41
41
|
* Deferred to follow-ups:
|
|
42
|
-
* - Block `rotate-
|
|
42
|
+
* - Block `rotate-secret` policy gate under managed mode.
|
|
43
43
|
* - Mandatory strong-recovery enforcement.
|
|
44
44
|
* - Recovery flow under managed mode (generates fresh sealed phrase).
|
|
45
45
|
*
|
|
46
|
-
* @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/session-tiers.md → Managed-
|
|
46
|
+
* @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/session-tiers.md → Managed-secret mode
|
|
47
47
|
*
|
|
48
48
|
* @module
|
|
49
49
|
*/
|
|
50
50
|
import type { NoydbStore, RecipientSealer } from '../../kernel/types.js';
|
|
51
51
|
/**
|
|
52
52
|
* The contract concrete providers (per-platform key stores) implement
|
|
53
|
-
* to seal and unseal a hub-generated random
|
|
54
|
-
*
|
|
53
|
+
* to seal and unseal a hub-generated random secret. The plaintext
|
|
54
|
+
* secret NEVER leaves hub-controlled memory in unsealed form —
|
|
55
55
|
* the provider receives the bytes, returns opaque sealed bytes, and
|
|
56
56
|
* later reverses the operation. Hub treats the sealed bytes as
|
|
57
57
|
* fully opaque.
|
|
@@ -69,7 +69,7 @@ import type { NoydbStore, RecipientSealer } from '../../kernel/types.js';
|
|
|
69
69
|
export interface SealingKeyProvider {
|
|
70
70
|
/**
|
|
71
71
|
* Non-sensitive identifier disclosed in the persisted envelope.
|
|
72
|
-
* Surfaced to consumers via `
|
|
72
|
+
* Surfaced to consumers via `loadSealedSecret().providerId` so
|
|
73
73
|
* a vault opened with the wrong provider class can detect the
|
|
74
74
|
* mismatch and surface a clear error. NOT secret — fine to log.
|
|
75
75
|
*
|
|
@@ -78,8 +78,8 @@ export interface SealingKeyProvider {
|
|
|
78
78
|
* parses this; it's purely audit metadata.
|
|
79
79
|
*/
|
|
80
80
|
readonly id: string;
|
|
81
|
-
/** Seal raw
|
|
82
|
-
seal(
|
|
81
|
+
/** Seal raw secret bytes. Output bytes are opaque to hub. */
|
|
82
|
+
seal(secret: Uint8Array): Promise<Uint8Array>;
|
|
83
83
|
/**
|
|
84
84
|
* Reverse {@link seal}. MUST throw on tamper, wrong-provider, or
|
|
85
85
|
* any other failure — hub treats a thrown error as "this provider
|
|
@@ -90,7 +90,7 @@ export interface SealingKeyProvider {
|
|
|
90
90
|
/**
|
|
91
91
|
* In-memory test provider. NOT secure — uses a deterministic
|
|
92
92
|
* per-instance "key" (16-byte SHA-256 of `id`) XOR'd over the
|
|
93
|
-
*
|
|
93
|
+
* secret plus a 4-byte provider-id fingerprint prefix. The XOR is
|
|
94
94
|
* sufficient to make different `id` values produce mutually-unsealable
|
|
95
95
|
* outputs (the contract tests for that), but offers ZERO real
|
|
96
96
|
* confidentiality — never use outside tests.
|
|
@@ -104,7 +104,7 @@ export declare class MemorySealingKeyProvider implements SealingKeyProvider {
|
|
|
104
104
|
constructor(opts: {
|
|
105
105
|
id: string;
|
|
106
106
|
});
|
|
107
|
-
seal(
|
|
107
|
+
seal(secret: Uint8Array): Promise<Uint8Array>;
|
|
108
108
|
unseal(sealed: Uint8Array): Promise<Uint8Array>;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
@@ -201,17 +201,17 @@ export declare class MemoryRecipientSealer implements SealingKeyProvider, Recipi
|
|
|
201
201
|
seal(plaintext: Uint8Array): Promise<Uint8Array>;
|
|
202
202
|
unseal(bytes: Uint8Array): Promise<Uint8Array>;
|
|
203
203
|
}
|
|
204
|
-
/** Reserved id for the managed-
|
|
205
|
-
export declare const
|
|
206
|
-
/** Plaintext payload stored inside the `_meta/sealed-
|
|
207
|
-
export interface
|
|
204
|
+
/** Reserved id for the managed-secret envelope under `_meta`. */
|
|
205
|
+
export declare const SEALED_SECRET_RECORD_ID: "sealed-secret";
|
|
206
|
+
/** Plaintext payload stored inside the `_meta/sealed-secret` envelope. */
|
|
207
|
+
export interface SealedSecret {
|
|
208
208
|
readonly _noydb_sealed: 1;
|
|
209
209
|
readonly providerId: string;
|
|
210
210
|
/** Sealed bytes. Base64-encoded on the wire; decoded on load. */
|
|
211
211
|
readonly sealed: Uint8Array;
|
|
212
212
|
}
|
|
213
213
|
/**
|
|
214
|
-
* Wire-format envelope persisted at `_meta/sealed-
|
|
214
|
+
* Wire-format envelope persisted at `_meta/sealed-secret` for
|
|
215
215
|
* managed-mode vaults. The provider produces raw sealed bytes via
|
|
216
216
|
* {@link SealingKeyProvider.seal}; this wrapper carries the dispatch
|
|
217
217
|
* metadata hub needs to pick the right provider on the unseal path.
|
|
@@ -237,8 +237,8 @@ export interface SealedEnvelope {
|
|
|
237
237
|
readonly payload: string;
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
|
-
* Parse a `_meta/sealed-
|
|
241
|
-
* in-memory {@link
|
|
240
|
+
* Parse a `_meta/sealed-secret` `_data` JSON string into the
|
|
241
|
+
* in-memory {@link SealedSecret} representation. Accepts both:
|
|
242
242
|
*
|
|
243
243
|
* 1. v1 wire format `{ v: 1, _noydb_sealed: 1, pid, payload }` —
|
|
244
244
|
* the current shape.
|
|
@@ -251,20 +251,20 @@ export interface SealedEnvelope {
|
|
|
251
251
|
*
|
|
252
252
|
* @internal — exported only for the migration safety-net test suite.
|
|
253
253
|
*/
|
|
254
|
-
export declare function parseSealedEnvelope(raw: unknown):
|
|
255
|
-
export declare function
|
|
254
|
+
export declare function parseSealedEnvelope(raw: unknown): SealedSecret | undefined;
|
|
255
|
+
export declare function saveSealedSecret(store: NoydbStore, vault: string, payload: {
|
|
256
256
|
readonly providerId: string;
|
|
257
257
|
readonly sealed: Uint8Array;
|
|
258
258
|
}): Promise<void>;
|
|
259
|
-
export declare function
|
|
259
|
+
export declare function loadSealedSecret(store: NoydbStore, vault: string): Promise<SealedSecret | undefined>;
|
|
260
260
|
/**
|
|
261
|
-
* Resolve the effective plaintext
|
|
261
|
+
* Resolve the effective plaintext secret string for a managed-mode
|
|
262
262
|
* vault. Two paths:
|
|
263
263
|
*
|
|
264
264
|
* 1. **First open (no envelope persisted):** generate a 256-bit random
|
|
265
265
|
* via `crypto.getRandomValues`, base64-encode for use as a
|
|
266
|
-
*
|
|
267
|
-
* provider, persist `_meta/sealed-
|
|
266
|
+
* secret string, seal the underlying bytes under the
|
|
267
|
+
* provider, persist `_meta/sealed-secret`, return the
|
|
268
268
|
* base64 string.
|
|
269
269
|
*
|
|
270
270
|
* 2. **Reopen (envelope exists):** read + unseal + decode → return.
|