@noy-db/hub 0.9.0-pre.0 → 0.9.0-pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/api-H4B7ZQXP.js +18 -0
- package/dist/as/index.js +10 -10
- package/dist/at/index.js +8 -8
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-7RKNZMQO.js → backup-E3GBMNDA.js} +92 -31
- package/dist/backup-E3GBMNDA.js.map +1 -0
- package/dist/blobs/index.js +12 -12
- package/dist/broker/index.js +13 -13
- package/dist/by/index.js +2 -2
- package/dist/capsule/contract.js +6 -6
- package/dist/capsule/enclave-aes/crypto.d.ts +18 -0
- package/dist/capsule/enclave-aes/index.d.ts +2 -2
- package/dist/capsule/enclave-aes/index.js +14 -8
- package/dist/capsule/enclave-aes/index.js.map +1 -1
- package/dist/capsule/index.d.ts +1 -1
- package/dist/{capsule-57BDK7LG.js → capsule-YQKQZPH7.js} +14 -8
- package/dist/cargo/index.js +35 -35
- package/dist/{chunk-AJFPAHMW.js → chunk-27NCEPKM.js} +3 -3
- package/dist/{chunk-PGC35KXE.js → chunk-2IASHJPS.js} +2 -2
- package/dist/{chunk-NYJBYVBG.js → chunk-2ODEFG6K.js} +4 -4
- package/dist/{chunk-7BMOS4JQ.js → chunk-2QH3I7QC.js} +11 -11
- package/dist/{chunk-VSUQI5Q6.js → chunk-2RH5SEY7.js} +16 -2
- package/dist/chunk-2RH5SEY7.js.map +1 -0
- package/dist/{chunk-IVMFIKNA.js → chunk-2T2TGRWE.js} +6 -6
- package/dist/{chunk-G66YXUTY.js → chunk-35CNOVQE.js} +3 -3
- package/dist/{chunk-OJU67C23.js → chunk-3EXQXOQ2.js} +4 -4
- package/dist/{chunk-BJH77UY2.js → chunk-4KYKRYRT.js} +2 -2
- package/dist/{chunk-RDOEOPOI.js → chunk-4N4OIVK3.js} +5 -5
- package/dist/{chunk-WHOKGHJ3.js → chunk-4WLI37WK.js} +7 -7
- package/dist/{chunk-RNACRT5H.js → chunk-52ZFNK46.js} +2 -2
- package/dist/{chunk-CB4467G3.js → chunk-5A3HOTP5.js} +33 -7
- package/dist/chunk-5A3HOTP5.js.map +1 -0
- package/dist/{chunk-QDHHHI5Q.js → chunk-5SMCBPJ2.js} +5 -5
- package/dist/{chunk-EMAWOGVH.js → chunk-654RE5YC.js} +3 -3
- package/dist/{chunk-FZXRLNJO.js → chunk-6BEBWHNL.js} +3 -3
- package/dist/{chunk-EUD3HQM4.js → chunk-6WEPFEMJ.js} +4 -4
- package/dist/{chunk-YFFMPZPY.js → chunk-6WIFF46H.js} +2 -2
- package/dist/{chunk-ZVSKSUGI.js → chunk-7C7OF26T.js} +5 -5
- package/dist/{chunk-QXJXG7DN.js → chunk-7IV7GVOS.js} +5 -5
- package/dist/{chunk-MQ7YWBQ5.js → chunk-7JRLCP2J.js} +2 -2
- package/dist/{chunk-QSHATAXJ.js → chunk-7ONMS7QI.js} +2 -2
- package/dist/{chunk-JBMMWYOH.js → chunk-7UHLO4ZN.js} +35 -2
- package/dist/chunk-7UHLO4ZN.js.map +1 -0
- package/dist/{chunk-6WS35E6X.js → chunk-A52BK5AY.js} +2 -2
- package/dist/{chunk-GOJQ5DZA.js → chunk-AI35LNWQ.js} +4 -4
- package/dist/chunk-AI35LNWQ.js.map +1 -0
- package/dist/{chunk-XXQ5XIYY.js → chunk-AMSSAOOB.js} +2 -2
- package/dist/{chunk-3V6LZHUO.js → chunk-AYOQZJDB.js} +2 -2
- package/dist/{chunk-DL6BZKP3.js → chunk-B3B6HV5S.js} +2 -2
- package/dist/{chunk-5XONHAFD.js → chunk-B6EWMGFX.js} +2 -2
- package/dist/{chunk-6Y5E4SJU.js → chunk-BMAXBTYH.js} +5 -5
- package/dist/{chunk-LGGIFKJP.js → chunk-BNYDOF2Q.js} +4 -4
- package/dist/{chunk-XXNWU5QZ.js → chunk-BQJ5ORU5.js} +2 -2
- package/dist/{chunk-Z3ZXVB2Y.js → chunk-BSEPI3HD.js} +12 -12
- package/dist/chunk-BSEPI3HD.js.map +1 -0
- package/dist/{chunk-BYHCKX73.js → chunk-CLOSXHR4.js} +3 -3
- package/dist/{chunk-5HNW4ZTA.js → chunk-CSAN22QG.js} +6 -6
- package/dist/{chunk-TZYTMZZY.js → chunk-DL4GCSTS.js} +10 -10
- package/dist/{chunk-EA4VDI5D.js → chunk-DYIR6RC3.js} +4 -4
- package/dist/{chunk-PUBI455O.js → chunk-EPPAEGH5.js} +2 -2
- package/dist/{chunk-2A56DSRI.js → chunk-EQ6C2ZPT.js} +17 -51
- package/dist/chunk-EQ6C2ZPT.js.map +1 -0
- package/dist/{chunk-BNFNQNEP.js → chunk-F7X7MPK4.js} +2 -2
- package/dist/{chunk-SNM7LSYG.js → chunk-FUHUGKDN.js} +4 -4
- package/dist/{chunk-72XBVN4J.js → chunk-FVKQ5QUC.js} +2 -2
- package/dist/chunk-FVKQ5QUC.js.map +1 -0
- package/dist/{chunk-D4V5JJAK.js → chunk-GHMINSER.js} +4 -4
- package/dist/{chunk-APFFJN5T.js → chunk-GLSCL74M.js} +31 -34
- package/dist/chunk-GLSCL74M.js.map +1 -0
- package/dist/{chunk-XKBTJGFP.js → chunk-GU6QXHPZ.js} +3 -3
- package/dist/chunk-GU6QXHPZ.js.map +1 -0
- package/dist/{chunk-QGFEBNHO.js → chunk-GZISWBCJ.js} +4 -4
- package/dist/{chunk-OM3SEDI4.js → chunk-HTRLQ4ZZ.js} +4 -4
- package/dist/{chunk-SWXLZ4HX.js → chunk-ICHHNI5E.js} +8 -8
- package/dist/{chunk-K673OO6B.js → chunk-ID4ZBC3X.js} +4 -4
- package/dist/{chunk-H3YM66EI.js → chunk-IF2M43G4.js} +2 -2
- package/dist/{chunk-QGSNJD3B.js → chunk-IFUYLIEY.js} +2 -2
- package/dist/{chunk-D5A3GCZ4.js → chunk-IPF5ORDI.js} +3 -3
- package/dist/{delegation-ONLM4JFI.js → chunk-JQMEXCUZ.js} +59 -16
- package/dist/chunk-JQMEXCUZ.js.map +1 -0
- package/dist/{chunk-TFWFPZRU.js → chunk-K5JNK63R.js} +11 -11
- package/dist/{chunk-TFWFPZRU.js.map → chunk-K5JNK63R.js.map} +1 -1
- package/dist/{chunk-BVF3SXD7.js → chunk-KBIS64X4.js} +5 -5
- package/dist/chunk-L4UL4IAR.js +55 -0
- package/dist/chunk-L4UL4IAR.js.map +1 -0
- package/dist/{chunk-RIZTZJX6.js → chunk-LJ744WXU.js} +2 -2
- package/dist/{chunk-XITHENBI.js → chunk-LMC5L3MM.js} +7 -7
- package/dist/{chunk-XITHENBI.js.map → chunk-LMC5L3MM.js.map} +1 -1
- package/dist/{chunk-L5A3KR7R.js → chunk-LUQBG637.js} +3 -3
- package/dist/{chunk-6QLCS7ET.js → chunk-LZN6DTFI.js} +2 -2
- package/dist/{chunk-NIXRB5BP.js → chunk-MMWX5OT5.js} +2 -2
- package/dist/{chunk-JA25QG5M.js → chunk-N6EWQ5VB.js} +622 -119
- package/dist/chunk-N6EWQ5VB.js.map +1 -0
- package/dist/{chunk-UOZOWN73.js → chunk-ND6S2DKC.js} +2 -2
- package/dist/{chunk-WFWFXDNS.js → chunk-NHEKQWFI.js} +2 -2
- package/dist/{chunk-2ZFD2UJC.js → chunk-NIUHKKMM.js} +9 -9
- package/dist/{chunk-XA34THLF.js → chunk-NK4LGBGQ.js} +4 -4
- package/dist/{chunk-JSWKVZCR.js → chunk-NUZ7ROUZ.js} +2 -2
- package/dist/{chunk-DHU2AQ6T.js → chunk-O3NGOHXQ.js} +2 -2
- package/dist/{chunk-ZBUAX4EF.js → chunk-O6VOR4NH.js} +2 -2
- package/dist/{chunk-JZ4EDEIP.js → chunk-ODBOHPZU.js} +3 -3
- package/dist/{chunk-5UUJE4FP.js → chunk-OK44MD3C.js} +2 -2
- package/dist/{chunk-ECGXA4LT.js → chunk-OR3OHKU6.js} +2 -2
- package/dist/{chunk-ZWF3EWZA.js → chunk-P6FATPXQ.js} +2 -2
- package/dist/{chunk-PCYPXLEX.js → chunk-PBEHTFUG.js} +6 -6
- package/dist/{chunk-7CT6SX4M.js → chunk-PFHDQY5L.js} +3 -3
- package/dist/{chunk-PTJY5R3O.js → chunk-PIO6NW7O.js} +2 -2
- package/dist/{chunk-TMIJAR2X.js → chunk-PREYKC76.js} +3 -3
- package/dist/{chunk-ZHQJAV6D.js → chunk-PU5ZEV65.js} +2 -2
- package/dist/{chunk-UNSQZSZP.js → chunk-PWAMX5KU.js} +2 -2
- package/dist/{chunk-GETUTTZU.js → chunk-PZN76MMV.js} +4 -4
- package/dist/{chunk-ABU6A4Z5.js → chunk-Q4DBU5RM.js} +2 -2
- package/dist/{chunk-2WJKJZSO.js → chunk-QHG7GQKM.js} +2 -2
- package/dist/{chunk-UAKY6E4N.js → chunk-QNOWNCZS.js} +2 -2
- package/dist/{chunk-JPSL5GIZ.js → chunk-QQLXKDGC.js} +3 -3
- package/dist/{chunk-45VHWE4C.js → chunk-QVUMKG3Z.js} +271 -69
- package/dist/chunk-QVUMKG3Z.js.map +1 -0
- package/dist/{chunk-OK57EATL.js → chunk-R4GLRJ55.js} +2 -2
- package/dist/{chunk-B65CC6Z6.js → chunk-RF5WDM25.js} +2 -2
- package/dist/{chunk-G46JSSVX.js → chunk-RKBCUP5D.js} +7 -7
- package/dist/{chunk-GCUMOKTN.js → chunk-S2ORTQGS.js} +3 -3
- package/dist/{chunk-MRJDLXI3.js → chunk-SVXFCCSX.js} +8 -8
- package/dist/{chunk-BUE7R3B5.js → chunk-SXPLIRQH.js} +2 -2
- package/dist/{chunk-5LMCVBMY.js → chunk-T5EXREMW.js} +5 -5
- package/dist/{chunk-PT2YCQVK.js → chunk-TBVDI3LY.js} +4 -4
- package/dist/{chunk-BMHQHH7Q.js → chunk-TLIFNRU5.js} +2 -2
- package/dist/{chunk-YKGJ44Z7.js → chunk-TU6ZJTYT.js} +3 -3
- package/dist/{chunk-FSQNGPHH.js → chunk-U277K5GR.js} +612 -175
- package/dist/chunk-U277K5GR.js.map +1 -0
- package/dist/{chunk-55P6OBB7.js → chunk-U43RSPPX.js} +2 -2
- package/dist/{chunk-K7RW7FI4.js → chunk-UADW5NOU.js} +5 -5
- package/dist/{chunk-GRS2HIV6.js → chunk-UMV5GBTJ.js} +2 -2
- package/dist/{chunk-4UIP3QNW.js → chunk-UNAMWK2Q.js} +2 -2
- package/dist/{chunk-J4KAPKBJ.js → chunk-UORWAG7K.js} +2 -2
- package/dist/{chunk-V55JASXO.js → chunk-UQRKAM2R.js} +3 -3
- package/dist/{chunk-2ELOCEXE.js → chunk-URGHKZPL.js} +1 -1
- package/dist/chunk-URGHKZPL.js.map +1 -0
- package/dist/{chunk-ZMVSKYTJ.js → chunk-VLRY2UH4.js} +10 -10
- package/dist/{chunk-SPPOUJLN.js → chunk-VZFTON37.js} +2 -2
- package/dist/{chunk-CAD7N6HQ.js → chunk-WIUH6EJ7.js} +10 -10
- package/dist/chunk-WIUH6EJ7.js.map +1 -0
- package/dist/{chunk-YQFBH5ZJ.js → chunk-WQUIJPN4.js} +3 -3
- package/dist/{chunk-4J3MNVVX.js → chunk-WRLWEYHY.js} +7 -1
- package/dist/{chunk-4J3MNVVX.js.map → chunk-WRLWEYHY.js.map} +1 -1
- package/dist/{chunk-NZULV7LK.js → chunk-WVQDY3UM.js} +4 -4
- package/dist/{chunk-3Y5JLSXS.js → chunk-X5RGG3ZW.js} +2 -2
- package/dist/{chunk-PFCTSXHU.js → chunk-X6Z2SIRF.js} +2 -2
- package/dist/{chunk-UHFGK6YA.js → chunk-XQGKS4OW.js} +3 -3
- package/dist/{chunk-L2F3CFCH.js → chunk-Y22JWHCP.js} +4 -4
- package/dist/{chunk-C53ER7AG.js → chunk-YVA6UPRN.js} +2 -2
- package/dist/{chunk-226V6XXJ.js → chunk-Z2KP6PNF.js} +6 -6
- package/dist/{chunk-G5EDYVSE.js → chunk-ZK2WT532.js} +5 -5
- package/dist/{chunk-SFCD6OU7.js → chunk-ZNVBCKMV.js} +2 -2
- package/dist/{chunk-BU2ABHFW.js → chunk-ZOFNZLAA.js} +4 -4
- package/dist/{chunk-X2RP4TO5.js → chunk-ZVJKHGE5.js} +7 -7
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-KHDOYIJB.js → classified-marker-7HXDMYHI.js} +3 -3
- package/dist/collection-facade-V63BEBGU.js +41 -0
- package/dist/{computed-XMFTHAXV.js → computed-LZLSYOPG.js} +3 -3
- package/dist/consent/index.js +8 -8
- package/dist/cover/index.js +8 -8
- package/dist/custody/index.js +12 -12
- package/dist/{dead-filter-CXV5NS67.js → dead-filter-PZIJ4F4G.js} +10 -10
- package/dist/debug/index.js +7 -7
- package/dist/delegation-7SSGIETH.js +26 -0
- package/dist/derivations/index.js +22 -22
- package/dist/derive-IMI3BMDS.js +20 -0
- package/dist/directory/index.js +9 -9
- package/dist/{dispatch-2MQFMEGY.js → dispatch-4BUYPWMJ.js} +19 -19
- package/dist/{dispatch-OFDA4WQV.js → dispatch-KOPDDPEQ.js} +5 -5
- package/dist/executor-7SY3M6TZ.js +8 -0
- package/dist/executor-SNHW4ELF.js +35 -0
- package/dist/executor-Z3IKK7G3.js +8 -0
- package/dist/export-accessible-O7DIVFUO.js +22 -0
- package/dist/extract-partition-ELZEJKXM.js +35 -0
- package/dist/{fanout-sidecar-BO67PCPO.js → fanout-sidecar-FYDRL7F3.js} +8 -8
- package/dist/find-KWB2RYWJ.js +10 -0
- package/dist/forget/index.js +8 -8
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +15 -13
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +13 -13
- package/dist/index.d.ts +3 -2
- package/dist/index.js +111 -107
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +5 -5
- package/dist/introspection/index.js +10 -10
- package/dist/issue-5ZHXK4HJ.js +19 -0
- package/dist/kernel/collection.d.ts +85 -6
- package/dist/kernel/constants.d.ts +7 -0
- package/dist/kernel/errors.d.ts +9 -0
- package/dist/kernel/merge-authority.d.ts +5 -1
- package/dist/kernel/noydb.d.ts +116 -21
- package/dist/kernel/rejection-seal.d.ts +13 -0
- package/dist/kernel/sync-wiring.d.ts +55 -0
- package/dist/kernel/types.d.ts +366 -8
- package/dist/kernel/vault.d.ts +39 -5
- package/dist/{ledger-MSJGWKGW.js → ledger-UFJCB6T5.js} +10 -10
- package/dist/liberate-OEOSNNFH.js +25 -0
- package/dist/{link-set-QXXSPPHL.js → link-set-KMUBFN2L.js} +10 -10
- package/dist/{managed-secret-VSK7ANQI.js → managed-secret-H5WYSJ46.js} +9 -9
- package/dist/materialized-views/index.js +25 -25
- package/dist/{migrate-cek-GEBFYBDC.js → migrate-cek-SPESQAAO.js} +2 -2
- package/dist/money/index.js +5 -5
- package/dist/noydb-QDZ4QIKO.js +100 -0
- package/dist/on/index.js +12 -12
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +11 -11
- package/dist/pod/index.js +66 -64
- package/dist/{pod-handle-YE7CT66T.js → pod-handle-GJLCOUGK.js} +8 -8
- package/dist/policy/index.js +9 -9
- package/dist/port/at/index.d.ts +1 -1
- package/dist/port/by/index.d.ts +1 -1
- package/dist/port/on/index.d.ts +1 -1
- package/dist/port/with/admission-authority.d.ts +34 -0
- package/dist/port/with/broker-strategy.d.ts +10 -0
- package/dist/port/with/rejection-courier.d.ts +37 -0
- package/dist/port/with/restore-host.d.ts +33 -0
- package/dist/port/with/service-bus.d.ts +18 -0
- package/dist/port/with/team-strategy.d.ts +2 -2
- package/dist/port/with/write-hooks.d.ts +2 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-QC5TEAW3.js → post-register-2AC2STHC.js} +6 -6
- package/dist/query/all/index.js +15 -15
- package/dist/query/index.js +7 -7
- package/dist/query/live/index.js +7 -7
- package/dist/query/reduce/index.js +10 -10
- package/dist/query/relate/index.js +9 -9
- package/dist/reduce/index.js +8 -8
- package/dist/register-PIORIMMR.js +30 -0
- package/dist/registry-BIMICFUH.js +23 -0
- package/dist/registry-JGWLW53D.js +35 -0
- package/dist/registry-SELCBYEQ.js +8 -0
- package/dist/registry-W327UNYH.js +8 -0
- package/dist/request-withdrawal-K3SXXODI.js +28 -0
- package/dist/restore-to-OOPKLAPU.js +66 -0
- package/dist/restore-to-OOPKLAPU.js.map +1 -0
- package/dist/{reveal-YQTRNQFH.js → reveal-UAPBG743.js} +7 -7
- package/dist/revoke-6AFVXTWF.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +11 -11
- package/dist/search/index.js +4 -4
- package/dist/{seed-JMQTRKRE.js → seed-BVYDPVIW.js} +33 -18
- package/dist/seed-BVYDPVIW.js.map +1 -0
- package/dist/sequence/index.js +8 -8
- package/dist/session/index.js +8 -8
- package/dist/shadow/index.js +2 -2
- package/dist/signer-TW5MAQJP.js +23 -0
- package/dist/snapshots/index.js +9 -9
- package/dist/{stale-SKV33PBU.js → stale-CROGJBIJ.js} +9 -9
- package/dist/storage-SO2L2Z5J.js +21 -0
- package/dist/{store-coordination-provider-Z6HKPOGM.js → store-coordination-provider-2YD2PTTP.js} +9 -9
- package/dist/sync/index.js +16 -16
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +15 -15
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +2 -2
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +7 -7
- package/dist/{verify-KWQIWLGH.js → verify-QWO5UKD6.js} +7 -7
- package/dist/walk-3KEOL7BY.js +20 -0
- package/dist/with-audit/guards/types.d.ts +2 -0
- package/dist/with-audit/tiers/index.d.ts +5 -5
- package/dist/with-commit/history/history.d.ts +16 -0
- package/dist/with-commit/history/restore-to.d.ts +40 -0
- package/dist/with-party/broker/seed.d.ts +4 -0
- package/dist/with-party/custody/strategy.d.ts +2 -2
- package/dist/with-party/team/delegation.d.ts +41 -11
- package/dist/with-party/team/index.d.ts +2 -0
- package/dist/with-party/team/keyring.d.ts +133 -3
- package/dist/with-party/team/managed-secret.d.ts +1 -1
- package/dist/with-party/team/noydb-facade.d.ts +14 -2
- package/dist/with-party/team/roster-tag.d.ts +1 -1
- package/dist/with-pod/backup.d.ts +9 -17
- package/dist/with-sync/active.d.ts +28 -1
- package/dist/with-sync/engine.d.ts +59 -2
- package/dist/with-sync/index.d.ts +1 -0
- package/dist/with-sync/reserved-mirror.d.ts +27 -4
- package/dist/with-sync/strategy.d.ts +2 -0
- package/dist/withdraw-accessible-OZU525ND.js +25 -0
- package/dist/withdraw-accessible-OZU525ND.js.map +1 -0
- package/package.json +3 -3
- package/dist/api-MSJXVYQG.js +0 -18
- package/dist/backup-7RKNZMQO.js.map +0 -1
- package/dist/chunk-2A56DSRI.js.map +0 -1
- package/dist/chunk-2ELOCEXE.js.map +0 -1
- package/dist/chunk-45VHWE4C.js.map +0 -1
- package/dist/chunk-72XBVN4J.js.map +0 -1
- package/dist/chunk-APFFJN5T.js.map +0 -1
- package/dist/chunk-CAD7N6HQ.js.map +0 -1
- package/dist/chunk-CB4467G3.js.map +0 -1
- package/dist/chunk-FSQNGPHH.js.map +0 -1
- package/dist/chunk-GOJQ5DZA.js.map +0 -1
- package/dist/chunk-JA25QG5M.js.map +0 -1
- package/dist/chunk-JBMMWYOH.js.map +0 -1
- package/dist/chunk-VSUQI5Q6.js.map +0 -1
- package/dist/chunk-XKBTJGFP.js.map +0 -1
- package/dist/chunk-Z3ZXVB2Y.js.map +0 -1
- package/dist/collection-facade-LZIF7GWD.js +0 -41
- package/dist/delegation-ONLM4JFI.js.map +0 -1
- package/dist/derive-3YSIS36W.js +0 -20
- package/dist/executor-E6YDJ7YA.js +0 -8
- package/dist/executor-NJX3YQQ4.js +0 -35
- package/dist/executor-WWM3DD4P.js +0 -8
- package/dist/export-accessible-RLHU5G4W.js +0 -22
- package/dist/extract-partition-QII2EDCS.js +0 -35
- package/dist/find-6M7GYDUZ.js +0 -10
- package/dist/issue-LPEEEMPP.js +0 -19
- package/dist/liberate-LEKDYKTC.js +0 -25
- package/dist/noydb-F2AUF6KL.js +0 -98
- package/dist/register-SN72QALV.js +0 -30
- package/dist/registry-253FF7C6.js +0 -35
- package/dist/registry-3AZWQTDT.js +0 -23
- package/dist/registry-7UEBTHWG.js +0 -8
- package/dist/registry-IVJ67NFQ.js +0 -8
- package/dist/request-withdrawal-UKVJZKX2.js +0 -28
- package/dist/revoke-G2KXJQA5.js +0 -24
- package/dist/seed-JMQTRKRE.js.map +0 -1
- package/dist/signer-IUIYR3CX.js +0 -23
- package/dist/storage-NPBYP2SM.js +0 -21
- package/dist/walk-F4OLXI5H.js +0 -20
- package/dist/withdraw-accessible-ZKPLZ66E.js +0 -25
- /package/dist/{api-MSJXVYQG.js.map → api-H4B7ZQXP.js.map} +0 -0
- /package/dist/{capsule-57BDK7LG.js.map → capsule-YQKQZPH7.js.map} +0 -0
- /package/dist/{chunk-AJFPAHMW.js.map → chunk-27NCEPKM.js.map} +0 -0
- /package/dist/{chunk-PGC35KXE.js.map → chunk-2IASHJPS.js.map} +0 -0
- /package/dist/{chunk-NYJBYVBG.js.map → chunk-2ODEFG6K.js.map} +0 -0
- /package/dist/{chunk-7BMOS4JQ.js.map → chunk-2QH3I7QC.js.map} +0 -0
- /package/dist/{chunk-IVMFIKNA.js.map → chunk-2T2TGRWE.js.map} +0 -0
- /package/dist/{chunk-G66YXUTY.js.map → chunk-35CNOVQE.js.map} +0 -0
- /package/dist/{chunk-OJU67C23.js.map → chunk-3EXQXOQ2.js.map} +0 -0
- /package/dist/{chunk-BJH77UY2.js.map → chunk-4KYKRYRT.js.map} +0 -0
- /package/dist/{chunk-RDOEOPOI.js.map → chunk-4N4OIVK3.js.map} +0 -0
- /package/dist/{chunk-WHOKGHJ3.js.map → chunk-4WLI37WK.js.map} +0 -0
- /package/dist/{chunk-RNACRT5H.js.map → chunk-52ZFNK46.js.map} +0 -0
- /package/dist/{chunk-QDHHHI5Q.js.map → chunk-5SMCBPJ2.js.map} +0 -0
- /package/dist/{chunk-EMAWOGVH.js.map → chunk-654RE5YC.js.map} +0 -0
- /package/dist/{chunk-FZXRLNJO.js.map → chunk-6BEBWHNL.js.map} +0 -0
- /package/dist/{chunk-EUD3HQM4.js.map → chunk-6WEPFEMJ.js.map} +0 -0
- /package/dist/{chunk-YFFMPZPY.js.map → chunk-6WIFF46H.js.map} +0 -0
- /package/dist/{chunk-ZVSKSUGI.js.map → chunk-7C7OF26T.js.map} +0 -0
- /package/dist/{chunk-QXJXG7DN.js.map → chunk-7IV7GVOS.js.map} +0 -0
- /package/dist/{chunk-MQ7YWBQ5.js.map → chunk-7JRLCP2J.js.map} +0 -0
- /package/dist/{chunk-QSHATAXJ.js.map → chunk-7ONMS7QI.js.map} +0 -0
- /package/dist/{chunk-6WS35E6X.js.map → chunk-A52BK5AY.js.map} +0 -0
- /package/dist/{chunk-XXQ5XIYY.js.map → chunk-AMSSAOOB.js.map} +0 -0
- /package/dist/{chunk-3V6LZHUO.js.map → chunk-AYOQZJDB.js.map} +0 -0
- /package/dist/{chunk-DL6BZKP3.js.map → chunk-B3B6HV5S.js.map} +0 -0
- /package/dist/{chunk-5XONHAFD.js.map → chunk-B6EWMGFX.js.map} +0 -0
- /package/dist/{chunk-6Y5E4SJU.js.map → chunk-BMAXBTYH.js.map} +0 -0
- /package/dist/{chunk-LGGIFKJP.js.map → chunk-BNYDOF2Q.js.map} +0 -0
- /package/dist/{chunk-XXNWU5QZ.js.map → chunk-BQJ5ORU5.js.map} +0 -0
- /package/dist/{chunk-BYHCKX73.js.map → chunk-CLOSXHR4.js.map} +0 -0
- /package/dist/{chunk-5HNW4ZTA.js.map → chunk-CSAN22QG.js.map} +0 -0
- /package/dist/{chunk-TZYTMZZY.js.map → chunk-DL4GCSTS.js.map} +0 -0
- /package/dist/{chunk-EA4VDI5D.js.map → chunk-DYIR6RC3.js.map} +0 -0
- /package/dist/{chunk-PUBI455O.js.map → chunk-EPPAEGH5.js.map} +0 -0
- /package/dist/{chunk-BNFNQNEP.js.map → chunk-F7X7MPK4.js.map} +0 -0
- /package/dist/{chunk-SNM7LSYG.js.map → chunk-FUHUGKDN.js.map} +0 -0
- /package/dist/{chunk-D4V5JJAK.js.map → chunk-GHMINSER.js.map} +0 -0
- /package/dist/{chunk-QGFEBNHO.js.map → chunk-GZISWBCJ.js.map} +0 -0
- /package/dist/{chunk-OM3SEDI4.js.map → chunk-HTRLQ4ZZ.js.map} +0 -0
- /package/dist/{chunk-SWXLZ4HX.js.map → chunk-ICHHNI5E.js.map} +0 -0
- /package/dist/{chunk-K673OO6B.js.map → chunk-ID4ZBC3X.js.map} +0 -0
- /package/dist/{chunk-H3YM66EI.js.map → chunk-IF2M43G4.js.map} +0 -0
- /package/dist/{chunk-QGSNJD3B.js.map → chunk-IFUYLIEY.js.map} +0 -0
- /package/dist/{chunk-D5A3GCZ4.js.map → chunk-IPF5ORDI.js.map} +0 -0
- /package/dist/{chunk-BVF3SXD7.js.map → chunk-KBIS64X4.js.map} +0 -0
- /package/dist/{chunk-RIZTZJX6.js.map → chunk-LJ744WXU.js.map} +0 -0
- /package/dist/{chunk-L5A3KR7R.js.map → chunk-LUQBG637.js.map} +0 -0
- /package/dist/{chunk-6QLCS7ET.js.map → chunk-LZN6DTFI.js.map} +0 -0
- /package/dist/{chunk-NIXRB5BP.js.map → chunk-MMWX5OT5.js.map} +0 -0
- /package/dist/{chunk-UOZOWN73.js.map → chunk-ND6S2DKC.js.map} +0 -0
- /package/dist/{chunk-WFWFXDNS.js.map → chunk-NHEKQWFI.js.map} +0 -0
- /package/dist/{chunk-2ZFD2UJC.js.map → chunk-NIUHKKMM.js.map} +0 -0
- /package/dist/{chunk-XA34THLF.js.map → chunk-NK4LGBGQ.js.map} +0 -0
- /package/dist/{chunk-JSWKVZCR.js.map → chunk-NUZ7ROUZ.js.map} +0 -0
- /package/dist/{chunk-DHU2AQ6T.js.map → chunk-O3NGOHXQ.js.map} +0 -0
- /package/dist/{chunk-ZBUAX4EF.js.map → chunk-O6VOR4NH.js.map} +0 -0
- /package/dist/{chunk-JZ4EDEIP.js.map → chunk-ODBOHPZU.js.map} +0 -0
- /package/dist/{chunk-5UUJE4FP.js.map → chunk-OK44MD3C.js.map} +0 -0
- /package/dist/{chunk-ECGXA4LT.js.map → chunk-OR3OHKU6.js.map} +0 -0
- /package/dist/{chunk-ZWF3EWZA.js.map → chunk-P6FATPXQ.js.map} +0 -0
- /package/dist/{chunk-PCYPXLEX.js.map → chunk-PBEHTFUG.js.map} +0 -0
- /package/dist/{chunk-7CT6SX4M.js.map → chunk-PFHDQY5L.js.map} +0 -0
- /package/dist/{chunk-PTJY5R3O.js.map → chunk-PIO6NW7O.js.map} +0 -0
- /package/dist/{chunk-TMIJAR2X.js.map → chunk-PREYKC76.js.map} +0 -0
- /package/dist/{chunk-ZHQJAV6D.js.map → chunk-PU5ZEV65.js.map} +0 -0
- /package/dist/{chunk-UNSQZSZP.js.map → chunk-PWAMX5KU.js.map} +0 -0
- /package/dist/{chunk-GETUTTZU.js.map → chunk-PZN76MMV.js.map} +0 -0
- /package/dist/{chunk-ABU6A4Z5.js.map → chunk-Q4DBU5RM.js.map} +0 -0
- /package/dist/{chunk-2WJKJZSO.js.map → chunk-QHG7GQKM.js.map} +0 -0
- /package/dist/{chunk-UAKY6E4N.js.map → chunk-QNOWNCZS.js.map} +0 -0
- /package/dist/{chunk-JPSL5GIZ.js.map → chunk-QQLXKDGC.js.map} +0 -0
- /package/dist/{chunk-OK57EATL.js.map → chunk-R4GLRJ55.js.map} +0 -0
- /package/dist/{chunk-B65CC6Z6.js.map → chunk-RF5WDM25.js.map} +0 -0
- /package/dist/{chunk-G46JSSVX.js.map → chunk-RKBCUP5D.js.map} +0 -0
- /package/dist/{chunk-GCUMOKTN.js.map → chunk-S2ORTQGS.js.map} +0 -0
- /package/dist/{chunk-MRJDLXI3.js.map → chunk-SVXFCCSX.js.map} +0 -0
- /package/dist/{chunk-BUE7R3B5.js.map → chunk-SXPLIRQH.js.map} +0 -0
- /package/dist/{chunk-5LMCVBMY.js.map → chunk-T5EXREMW.js.map} +0 -0
- /package/dist/{chunk-PT2YCQVK.js.map → chunk-TBVDI3LY.js.map} +0 -0
- /package/dist/{chunk-BMHQHH7Q.js.map → chunk-TLIFNRU5.js.map} +0 -0
- /package/dist/{chunk-YKGJ44Z7.js.map → chunk-TU6ZJTYT.js.map} +0 -0
- /package/dist/{chunk-55P6OBB7.js.map → chunk-U43RSPPX.js.map} +0 -0
- /package/dist/{chunk-K7RW7FI4.js.map → chunk-UADW5NOU.js.map} +0 -0
- /package/dist/{chunk-GRS2HIV6.js.map → chunk-UMV5GBTJ.js.map} +0 -0
- /package/dist/{chunk-4UIP3QNW.js.map → chunk-UNAMWK2Q.js.map} +0 -0
- /package/dist/{chunk-J4KAPKBJ.js.map → chunk-UORWAG7K.js.map} +0 -0
- /package/dist/{chunk-V55JASXO.js.map → chunk-UQRKAM2R.js.map} +0 -0
- /package/dist/{chunk-ZMVSKYTJ.js.map → chunk-VLRY2UH4.js.map} +0 -0
- /package/dist/{chunk-SPPOUJLN.js.map → chunk-VZFTON37.js.map} +0 -0
- /package/dist/{chunk-YQFBH5ZJ.js.map → chunk-WQUIJPN4.js.map} +0 -0
- /package/dist/{chunk-NZULV7LK.js.map → chunk-WVQDY3UM.js.map} +0 -0
- /package/dist/{chunk-3Y5JLSXS.js.map → chunk-X5RGG3ZW.js.map} +0 -0
- /package/dist/{chunk-PFCTSXHU.js.map → chunk-X6Z2SIRF.js.map} +0 -0
- /package/dist/{chunk-UHFGK6YA.js.map → chunk-XQGKS4OW.js.map} +0 -0
- /package/dist/{chunk-L2F3CFCH.js.map → chunk-Y22JWHCP.js.map} +0 -0
- /package/dist/{chunk-C53ER7AG.js.map → chunk-YVA6UPRN.js.map} +0 -0
- /package/dist/{chunk-226V6XXJ.js.map → chunk-Z2KP6PNF.js.map} +0 -0
- /package/dist/{chunk-G5EDYVSE.js.map → chunk-ZK2WT532.js.map} +0 -0
- /package/dist/{chunk-SFCD6OU7.js.map → chunk-ZNVBCKMV.js.map} +0 -0
- /package/dist/{chunk-BU2ABHFW.js.map → chunk-ZOFNZLAA.js.map} +0 -0
- /package/dist/{chunk-X2RP4TO5.js.map → chunk-ZVJKHGE5.js.map} +0 -0
- /package/dist/{classified-marker-KHDOYIJB.js.map → classified-marker-7HXDMYHI.js.map} +0 -0
- /package/dist/{collection-facade-LZIF7GWD.js.map → collection-facade-V63BEBGU.js.map} +0 -0
- /package/dist/{computed-XMFTHAXV.js.map → computed-LZLSYOPG.js.map} +0 -0
- /package/dist/{dead-filter-CXV5NS67.js.map → dead-filter-PZIJ4F4G.js.map} +0 -0
- /package/dist/{derive-3YSIS36W.js.map → delegation-7SSGIETH.js.map} +0 -0
- /package/dist/{executor-E6YDJ7YA.js.map → derive-IMI3BMDS.js.map} +0 -0
- /package/dist/{dispatch-2MQFMEGY.js.map → dispatch-4BUYPWMJ.js.map} +0 -0
- /package/dist/{dispatch-OFDA4WQV.js.map → dispatch-KOPDDPEQ.js.map} +0 -0
- /package/dist/{executor-NJX3YQQ4.js.map → executor-7SY3M6TZ.js.map} +0 -0
- /package/dist/{executor-WWM3DD4P.js.map → executor-SNHW4ELF.js.map} +0 -0
- /package/dist/{export-accessible-RLHU5G4W.js.map → executor-Z3IKK7G3.js.map} +0 -0
- /package/dist/{extract-partition-QII2EDCS.js.map → export-accessible-O7DIVFUO.js.map} +0 -0
- /package/dist/{find-6M7GYDUZ.js.map → extract-partition-ELZEJKXM.js.map} +0 -0
- /package/dist/{fanout-sidecar-BO67PCPO.js.map → fanout-sidecar-FYDRL7F3.js.map} +0 -0
- /package/dist/{issue-LPEEEMPP.js.map → find-KWB2RYWJ.js.map} +0 -0
- /package/dist/{ledger-MSJGWKGW.js.map → issue-5ZHXK4HJ.js.map} +0 -0
- /package/dist/{liberate-LEKDYKTC.js.map → ledger-UFJCB6T5.js.map} +0 -0
- /package/dist/{link-set-QXXSPPHL.js.map → liberate-OEOSNNFH.js.map} +0 -0
- /package/dist/{managed-secret-VSK7ANQI.js.map → link-set-KMUBFN2L.js.map} +0 -0
- /package/dist/{noydb-F2AUF6KL.js.map → managed-secret-H5WYSJ46.js.map} +0 -0
- /package/dist/{migrate-cek-GEBFYBDC.js.map → migrate-cek-SPESQAAO.js.map} +0 -0
- /package/dist/{register-SN72QALV.js.map → noydb-QDZ4QIKO.js.map} +0 -0
- /package/dist/{pod-handle-YE7CT66T.js.map → pod-handle-GJLCOUGK.js.map} +0 -0
- /package/dist/{post-register-QC5TEAW3.js.map → post-register-2AC2STHC.js.map} +0 -0
- /package/dist/{registry-253FF7C6.js.map → register-PIORIMMR.js.map} +0 -0
- /package/dist/{registry-3AZWQTDT.js.map → registry-BIMICFUH.js.map} +0 -0
- /package/dist/{registry-7UEBTHWG.js.map → registry-JGWLW53D.js.map} +0 -0
- /package/dist/{registry-IVJ67NFQ.js.map → registry-SELCBYEQ.js.map} +0 -0
- /package/dist/{request-withdrawal-UKVJZKX2.js.map → registry-W327UNYH.js.map} +0 -0
- /package/dist/{revoke-G2KXJQA5.js.map → request-withdrawal-K3SXXODI.js.map} +0 -0
- /package/dist/{reveal-YQTRNQFH.js.map → reveal-UAPBG743.js.map} +0 -0
- /package/dist/{signer-IUIYR3CX.js.map → revoke-6AFVXTWF.js.map} +0 -0
- /package/dist/{stale-SKV33PBU.js.map → signer-TW5MAQJP.js.map} +0 -0
- /package/dist/{storage-NPBYP2SM.js.map → stale-CROGJBIJ.js.map} +0 -0
- /package/dist/{walk-F4OLXI5H.js.map → storage-SO2L2Z5J.js.map} +0 -0
- /package/dist/{store-coordination-provider-Z6HKPOGM.js.map → store-coordination-provider-2YD2PTTP.js.map} +0 -0
- /package/dist/{verify-KWQIWLGH.js.map → verify-QWO5UKD6.js.map} +0 -0
- /package/dist/{withdraw-accessible-ZKPLZ66E.js.map → walk-3KEOL7BY.js.map} +0 -0
package/dist/kernel/types.d.ts
CHANGED
|
@@ -656,7 +656,29 @@ export interface NoydbStore {
|
|
|
656
656
|
capabilities?: StoreCapabilities;
|
|
657
657
|
/** Get a single record. Returns null if not found. */
|
|
658
658
|
get(vault: string, collection: string, id: string): Promise<EncryptedEnvelope | null>;
|
|
659
|
-
/**
|
|
659
|
+
/**
|
|
660
|
+
* Put a record. Throws ConflictError if `expectedVersion` doesn't match an
|
|
661
|
+
* EXISTING record's `_v`.
|
|
662
|
+
*
|
|
663
|
+
* ⚠️ **Against an ABSENT id the comparison does not happen and the write
|
|
664
|
+
* lands.** That is not an implementation detail of the reference store — it is
|
|
665
|
+
* the contract, asserted by `@noy-db/ports/to` (core#134, core#138) and run
|
|
666
|
+
* green across all 19 `to-*` adapters.
|
|
667
|
+
*
|
|
668
|
+
* ⭐ **So `expectedVersion: 0` is an exact "write only if absent."** hub never
|
|
669
|
+
* stores a version below 1, so the first create is let through and every
|
|
670
|
+
* later one mismatches. No sentinel was added to this signature and no
|
|
671
|
+
* seventh method to this contract; both were costed and neither was needed.
|
|
672
|
+
* `writeKeyringFile` uses it to make a keyring create race-safe.
|
|
673
|
+
*
|
|
674
|
+
* ⛔ **Adapter authors: do not implement absence by throwing.** The assertion
|
|
675
|
+
* is that the FIRST create succeeds. If your backend's conditional write
|
|
676
|
+
* rejects a missing item, OR in an existence check the way `to-aws-dynamo`
|
|
677
|
+
* does (`#v = :expected OR attribute_not_exists(pk)`); `to-aws-s3`
|
|
678
|
+
* special-cases `expectedVersion === 0` by name into a real precondition.
|
|
679
|
+
* The kit case asserts both halves, so this failure mode is caught rather
|
|
680
|
+
* than assumed away.
|
|
681
|
+
*/
|
|
660
682
|
put(vault: string, collection: string, id: string, envelope: EncryptedEnvelope, expectedVersion?: number): Promise<void>;
|
|
661
683
|
/** Delete a record. */
|
|
662
684
|
delete(vault: string, collection: string, id: string): Promise<void>;
|
|
@@ -1159,6 +1181,125 @@ export interface KeyringFile {
|
|
|
1159
1181
|
* using standard/managed mode, or written before this extension.
|
|
1160
1182
|
*/
|
|
1161
1183
|
readonly echo?: KeyringEchoBlock;
|
|
1184
|
+
/**
|
|
1185
|
+
* core#96 — the member's INBOX KEY PAIR, minted by the grantor at grant /
|
|
1186
|
+
* recovery time. `pub` is the SPKI public half, plaintext and bound into the
|
|
1187
|
+
* roster tag (a store must not be able to swap it for its own); `priv` is the
|
|
1188
|
+
* PKCS#8 private half sealed under the AES key in `deks[INBOX_KEY_ID]`, which
|
|
1189
|
+
* only this member's KEK unwraps. It lets an owner/admin hand this member a
|
|
1190
|
+
* DEK LATER, without the member's secret — see `inbox`.
|
|
1191
|
+
*
|
|
1192
|
+
* Absent on every keyring written before this existed: such a member can be
|
|
1193
|
+
* re-granted (re-keyed) but not amended in place (`MemberInboxMissingError`).
|
|
1194
|
+
*/
|
|
1195
|
+
readonly inbox_key?: {
|
|
1196
|
+
readonly pub: string;
|
|
1197
|
+
readonly priv: {
|
|
1198
|
+
readonly iv: string;
|
|
1199
|
+
readonly data: string;
|
|
1200
|
+
};
|
|
1201
|
+
};
|
|
1202
|
+
/**
|
|
1203
|
+
* core#96 — DEKs delivered to this member by `updateUser` and not yet
|
|
1204
|
+
* drained: a random CEK RSA-OAEP-wrapped to `inbox_key.pub` (`cek`), and the
|
|
1205
|
+
* exported DEK set AES-GCM-sealed under that CEK (`iv`/`data`). `slots` names
|
|
1206
|
+
* the collections inside, plaintext, and is bound into the roster tag so the
|
|
1207
|
+
* rotation scope of a later `revoke` cannot be hidden from it.
|
|
1208
|
+
*
|
|
1209
|
+
* Drained by the member's next tier-1 unlock (`loadKeyring`): the DEKs move
|
|
1210
|
+
* into `deks` under the member's own KEK and the field is dropped. A member
|
|
1211
|
+
* who unlocks only through a tier-2 slot sees them at their next tier-1
|
|
1212
|
+
* open. A revoked admin who cached nothing but the file cannot open a box —
|
|
1213
|
+
* the private half never left this member's keyring.
|
|
1214
|
+
*/
|
|
1215
|
+
readonly inbox?: ReadonlyArray<KeyringInboxBox>;
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* core#96 / core#100 — one sealed delivery to a member: `slots` names the
|
|
1219
|
+
* collections inside (plaintext, tag-bound as the union over all boxes), `cek`
|
|
1220
|
+
* is a random key RSA-OAEP-wrapped to the member's inbox public half, and the
|
|
1221
|
+
* exported DEK set is AES-GCM under it. Deliveries APPEND a box (`updateUser`,
|
|
1222
|
+
* a rotation, a revoke); a caller can never open an earlier box (only the
|
|
1223
|
+
* member's private half can), so nothing is re-sealed or merged. The drain
|
|
1224
|
+
* opens the boxes in order — a later box wins a slot, so a rotation's new key
|
|
1225
|
+
* overrides an earlier pending one.
|
|
1226
|
+
*/
|
|
1227
|
+
export interface KeyringInboxBox {
|
|
1228
|
+
readonly slots: readonly string[];
|
|
1229
|
+
readonly cek: string;
|
|
1230
|
+
readonly iv: string;
|
|
1231
|
+
readonly data: string;
|
|
1232
|
+
}
|
|
1233
|
+
/** core#76 — scope and mode for `vault.restoreTo(T)`. */
|
|
1234
|
+
export interface RestoreToOptions {
|
|
1235
|
+
/**
|
|
1236
|
+
* Restrict the restore to these collections. Omitted, every collection that
|
|
1237
|
+
* is live now OR appears in history is considered — the union matters,
|
|
1238
|
+
* because a collection dropped since T is absent from the live store and a
|
|
1239
|
+
* restore that skipped it would decline to bring back exactly what was lost.
|
|
1240
|
+
*/
|
|
1241
|
+
readonly collections?: readonly string[];
|
|
1242
|
+
/**
|
|
1243
|
+
* Compute the diff and write NOTHING. The result names every id that would
|
|
1244
|
+
* be written or deleted, per collection, so an admin sees the blast radius
|
|
1245
|
+
* before committing to it.
|
|
1246
|
+
*/
|
|
1247
|
+
readonly dryRun?: boolean;
|
|
1248
|
+
}
|
|
1249
|
+
/** core#76 — what `restoreTo(T)` did, or (with `dryRun`) would do. */
|
|
1250
|
+
export interface RestoreToResult {
|
|
1251
|
+
/** The target instant, as given. */
|
|
1252
|
+
readonly restoredTo: string;
|
|
1253
|
+
/** True when nothing was written. */
|
|
1254
|
+
readonly dryRun: boolean;
|
|
1255
|
+
/** Records put back to their state at T. */
|
|
1256
|
+
readonly written: number;
|
|
1257
|
+
/** Records that exist now and did not exist at T. */
|
|
1258
|
+
readonly deleted: number;
|
|
1259
|
+
/** Records already identical to their state at T. */
|
|
1260
|
+
readonly unchanged: number;
|
|
1261
|
+
/** Per collection, only where something happened. */
|
|
1262
|
+
readonly collections: Readonly<Record<string, {
|
|
1263
|
+
written: string[];
|
|
1264
|
+
deleted: string[];
|
|
1265
|
+
unchanged: number;
|
|
1266
|
+
}>>;
|
|
1267
|
+
}
|
|
1268
|
+
/** core#77 — how `vault.load()` reconciles a pod against the current store. */
|
|
1269
|
+
export interface LoadPodOptions {
|
|
1270
|
+
/**
|
|
1271
|
+
* `'replace'` (default) is the historical behaviour: `saveAll` the data
|
|
1272
|
+
* collections and rewrite the internal ones. Whole-vault replace,
|
|
1273
|
+
* destructive on SQL adapters, and every envelope is written whether or not
|
|
1274
|
+
* the store already holds it byte-identical.
|
|
1275
|
+
*
|
|
1276
|
+
* `'incremental'` writes only what DIFFERS — envelopes whose `(id, _v)` the
|
|
1277
|
+
* store does not already have — and deletes ids the pod does not carry. ⭐
|
|
1278
|
+
* The END STATE IS THE SAME; only the cost differs. In particular a restore
|
|
1279
|
+
* still rewinds (core#111): ids absent from the pod are deleted, never left
|
|
1280
|
+
* behind, so this is not a merge.
|
|
1281
|
+
*
|
|
1282
|
+
* ⛔ Valid only when the pod and the store are the same vault. A pod from
|
|
1283
|
+
* another vault is refused, because "write only the differences" between
|
|
1284
|
+
* unrelated vaults is not a restore, it is a silent union.
|
|
1285
|
+
*/
|
|
1286
|
+
readonly mode?: 'replace' | 'incremental';
|
|
1287
|
+
}
|
|
1288
|
+
/** core#77 — what an incremental load did, per collection and in total. */
|
|
1289
|
+
export interface LoadPodResult {
|
|
1290
|
+
readonly mode: 'replace' | 'incremental';
|
|
1291
|
+
/** Envelopes written because the store lacked them at that version. */
|
|
1292
|
+
readonly written: number;
|
|
1293
|
+
/** Envelopes already present byte-for-version — the saving. */
|
|
1294
|
+
readonly skipped: number;
|
|
1295
|
+
/** Ids the store held and the pod does not carry. */
|
|
1296
|
+
readonly deleted: number;
|
|
1297
|
+
/** Per collection, only where something happened. */
|
|
1298
|
+
readonly collections: Readonly<Record<string, {
|
|
1299
|
+
written: number;
|
|
1300
|
+
skipped: number;
|
|
1301
|
+
deleted: number;
|
|
1302
|
+
}>>;
|
|
1162
1303
|
}
|
|
1163
1304
|
export interface VaultBackup {
|
|
1164
1305
|
readonly _noydb_backup: typeof NOYDB_BACKUP_VERSION;
|
|
@@ -1322,7 +1463,13 @@ export interface DirtyEntry {
|
|
|
1322
1463
|
readonly vault: string;
|
|
1323
1464
|
readonly collection: string;
|
|
1324
1465
|
readonly id: string;
|
|
1325
|
-
|
|
1466
|
+
/**
|
|
1467
|
+
* `rekey` (core#100): a DEK rotation re-encrypted this record IN PLACE — same
|
|
1468
|
+
* `_v`, new bytes. Pushed with a CAS at the CURRENT version (a `put` expects
|
|
1469
|
+
* `version - 1`), so a target still at that version takes the new ciphertext
|
|
1470
|
+
* and one that moved on reports a conflict as usual.
|
|
1471
|
+
*/
|
|
1472
|
+
readonly action: 'put' | 'delete' | 'rekey';
|
|
1326
1473
|
readonly version: number;
|
|
1327
1474
|
readonly timestamp: string;
|
|
1328
1475
|
}
|
|
@@ -1331,6 +1478,32 @@ export interface SyncMetadata {
|
|
|
1331
1478
|
readonly last_push: string | null;
|
|
1332
1479
|
readonly last_pull: string | null;
|
|
1333
1480
|
readonly dirty: DirtyEntry[];
|
|
1481
|
+
/** core#72 — the target's restore epoch this device last adopted (`_sync/epoch` on the target). Absent before any restore. */
|
|
1482
|
+
readonly epoch?: number;
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* core#72 — the record a restorer writes on the target at `_sync/epoch`:
|
|
1486
|
+
* "the vault was REPLACED; merge nothing across this line, resync." Peers read
|
|
1487
|
+
* it at the start of every pull; a newer epoch than the one they adopted parks
|
|
1488
|
+
* their pre-epoch local edits and adopts the target wholesale.
|
|
1489
|
+
*/
|
|
1490
|
+
export interface SyncEpochRecord {
|
|
1491
|
+
readonly epoch: number;
|
|
1492
|
+
readonly at: string;
|
|
1493
|
+
readonly by: string;
|
|
1494
|
+
readonly replaced: number;
|
|
1495
|
+
readonly tombstoned: number;
|
|
1496
|
+
}
|
|
1497
|
+
/** core#72 — what `db.replaceRemote(vault)` did. */
|
|
1498
|
+
export interface ReplaceRemoteResult {
|
|
1499
|
+
/** The epoch now on the target. */
|
|
1500
|
+
readonly epoch: number;
|
|
1501
|
+
/** Local records written to the target unconditionally (re-versioned above the target's copy where needed). */
|
|
1502
|
+
readonly replaced: number;
|
|
1503
|
+
/** Ids the target held that the local vault does not: delete markers written, so every peer removes them. */
|
|
1504
|
+
readonly tombstoned: number;
|
|
1505
|
+
/** Reserved-collection records mirrored (keyrings, users, broker seeds). */
|
|
1506
|
+
readonly reserved: number;
|
|
1334
1507
|
}
|
|
1335
1508
|
export interface Conflict {
|
|
1336
1509
|
readonly vault: string;
|
|
@@ -1348,6 +1521,66 @@ export interface Conflict {
|
|
|
1348
1521
|
*/
|
|
1349
1522
|
readonly resolve?: (winner: EncryptedEnvelope | null) => void;
|
|
1350
1523
|
}
|
|
1524
|
+
/** core#74 — one record a pull applied. */
|
|
1525
|
+
export interface SyncApplied {
|
|
1526
|
+
readonly collection: string;
|
|
1527
|
+
readonly id: string;
|
|
1528
|
+
readonly action: 'put' | 'delete';
|
|
1529
|
+
/** The local copy this replaced, when there was one at a lower version: its version and its author (`_by`). */
|
|
1530
|
+
readonly replaced?: {
|
|
1531
|
+
readonly version: number;
|
|
1532
|
+
readonly by?: string;
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
/** core#74 — one record a pull refused at admission. Emitted as `sync:rejected` and listed by `db.rejected(vault)`. */
|
|
1536
|
+
export interface SyncRejection {
|
|
1537
|
+
readonly vault: string;
|
|
1538
|
+
readonly collection: string;
|
|
1539
|
+
readonly id: string;
|
|
1540
|
+
/** The gate's or hook's message. */
|
|
1541
|
+
readonly reason: string;
|
|
1542
|
+
/** The refused envelope's version. */
|
|
1543
|
+
readonly version: number;
|
|
1544
|
+
/** The refused envelope's author, when it carries one. */
|
|
1545
|
+
readonly by?: string;
|
|
1546
|
+
/** ISO time of the refusal — when it was JUDGED, on the judging device. */
|
|
1547
|
+
readonly at: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* core#107 (pilot-1, witnessed) — ISO time the refused RECORD was written,
|
|
1550
|
+
* from its envelope. Present when the envelope carries one.
|
|
1551
|
+
*
|
|
1552
|
+
* ⭐ Why both: an arbiter judges at PULL time, not at write time, so a
|
|
1553
|
+
* record legitimately written and pushed while a period was open can be
|
|
1554
|
+
* refused later when it re-closes. Under report-only that is harmless, but
|
|
1555
|
+
* a notice saying only `at` reads as "your push was wrong". With `recordAt`
|
|
1556
|
+
* a UI can say what actually happened — written then, refused now.
|
|
1557
|
+
*/
|
|
1558
|
+
readonly recordAt?: string;
|
|
1559
|
+
/**
|
|
1560
|
+
* core#108 — which judgement refused it. Set on every path since core#107;
|
|
1561
|
+
* ⚠️ absent only on a rejection parked by an older hub. `'sync-apply'` is a
|
|
1562
|
+
* record that ARRIVED here and was turned away. `'push-recheck'`
|
|
1563
|
+
* is this device's OWN record, refused on the way out: it is still in the
|
|
1564
|
+
* local store and still dirty, so it pushes by itself as soon as it passes
|
|
1565
|
+
* again. ⛔ `readmit()` is a sync-apply affordance — for a push-recheck
|
|
1566
|
+
* parking there is nothing to re-apply, the record never left.
|
|
1567
|
+
*
|
|
1568
|
+
* core#107 — `'arbiter'` is a refusal made on ANOTHER device (the vault's
|
|
1569
|
+
* configured arbiter) and replicated here, which is how the writer finds
|
|
1570
|
+
* out at all. It is REPORT ONLY: the local record is untouched, never
|
|
1571
|
+
* deleted or hidden, and `readmit()` is meaningless for it too — this
|
|
1572
|
+
* device never refused anything.
|
|
1573
|
+
*/
|
|
1574
|
+
readonly origin?: 'sync-apply' | 'push-recheck' | 'arbiter';
|
|
1575
|
+
}
|
|
1576
|
+
/** core#74 — what `db.rejected(vault)` returns: the parked envelopes and their two fates. */
|
|
1577
|
+
export interface SyncRejectedApi {
|
|
1578
|
+
list(): Promise<readonly SyncRejection[]>;
|
|
1579
|
+
/** Apply the parked envelope after all — bypassing the gate that refused it — and drop the parking record. */
|
|
1580
|
+
readmit(collection: string, id: string): Promise<void>;
|
|
1581
|
+
/** Drop the parking record; the local copy stays as it was. */
|
|
1582
|
+
discard(collection: string, id: string): Promise<void>;
|
|
1583
|
+
}
|
|
1351
1584
|
/**
|
|
1352
1585
|
* #590: sync suppressed a live envelope because a crypto-shred tombstone is
|
|
1353
1586
|
* terminal for its record id. Reported on push/pull results (`erasures`) and
|
|
@@ -1415,11 +1648,55 @@ export type CollectionConflictResolver = (id: string, local: EncryptedEnvelope,
|
|
|
1415
1648
|
export interface PushOptions {
|
|
1416
1649
|
/** Only push records belonging to these collections. Omit to push all dirty. */
|
|
1417
1650
|
collections?: string[];
|
|
1651
|
+
/**
|
|
1652
|
+
* core#92 — "everything local is authoritative, send it": mark EVERY record
|
|
1653
|
+
* in the local store dirty before pushing, so records that reached the store
|
|
1654
|
+
* with no target present (written before `attachSyncTarget()`, or loaded
|
|
1655
|
+
* from a pod — core#71's shape) are pushed. CAS still applies per record:
|
|
1656
|
+
* a remote that already advanced a record resolves through the ordinary
|
|
1657
|
+
* conflict path. Default `false`.
|
|
1658
|
+
*/
|
|
1659
|
+
full?: boolean;
|
|
1660
|
+
/**
|
|
1661
|
+
* core#93 — bounded parallelism over the dirty entries: this many in-flight
|
|
1662
|
+
* puts at once. Each record keeps its own CAS and conflict path; only the
|
|
1663
|
+
* interleaving changes. Default `1` (serial, byte-for-byte the previous
|
|
1664
|
+
* behaviour). A cloud store with ~45 ms per put goes from N×45 ms to
|
|
1665
|
+
* roughly N×45/concurrency ms.
|
|
1666
|
+
*
|
|
1667
|
+
* ⚠️ **There is a ceiling, and it is the STORE's partition, not this pool.**
|
|
1668
|
+
* Measured on `to-aws-dynamo` (noy-db/to#10, 300 records against a latency
|
|
1669
|
+
* fake): 1-wide 14.1 s, 8-wide 1.79 s, 32-wide 0.48 s — linear, because
|
|
1670
|
+
* nothing in the adapter serializes. That is not permission to go there
|
|
1671
|
+
* against a real table. The single-table layout puts every record of a vault
|
|
1672
|
+
* under ONE partition key — the vault name IS the whole partition key, which
|
|
1673
|
+
* is the same decision that makes `loadAll()` a single Query — and a
|
|
1674
|
+
* DynamoDB partition tops out at ~1000 write units per second, with an
|
|
1675
|
+
* envelope over 1 KB costing more than one unit. 8-wide at ~45 ms is ~178
|
|
1676
|
+
* writes/sec, comfortably under; raising the knob far past that meets
|
|
1677
|
+
* per-partition throttling, not a connection-pool limit, so a bigger pool is
|
|
1678
|
+
* not the fix. `8` is the number pilot-1 runs and the one to start from.
|
|
1679
|
+
*/
|
|
1680
|
+
concurrency?: number;
|
|
1418
1681
|
}
|
|
1419
1682
|
/** Options for targeted pull operations. */
|
|
1420
1683
|
export interface PullOptions {
|
|
1421
1684
|
/** Only pull these collections. Omit to pull all. */
|
|
1422
1685
|
collections?: string[];
|
|
1686
|
+
/**
|
|
1687
|
+
* core#81 — walk the remote page by page instead of `loadAll()`: memory is
|
|
1688
|
+
* bounded by one page, and the total is known BEFORE the first record is
|
|
1689
|
+
* applied (one `list()` per collection), so `sync:progress` is real from
|
|
1690
|
+
* the start. Uses the store's `listPage` when it offers one, else
|
|
1691
|
+
* `list` + `get` in batches.
|
|
1692
|
+
*
|
|
1693
|
+
* ⚠️ Scope, stated: the store contract cannot enumerate collections, so a
|
|
1694
|
+
* paged pull walks the collections THIS keyring names (its DEK map) plus
|
|
1695
|
+
* any `collections` filter — the ones the caller can open. A full pull
|
|
1696
|
+
* also carries ciphertext for collections the caller holds no key for;
|
|
1697
|
+
* paged mode cannot. Default `false`.
|
|
1698
|
+
*/
|
|
1699
|
+
paged?: boolean;
|
|
1423
1700
|
/**
|
|
1424
1701
|
* Only pull records with `_ts` strictly after this ISO timestamp.
|
|
1425
1702
|
* Stores that implement `listSince` use it directly; others fall back
|
|
@@ -1451,6 +1728,29 @@ export interface PushResult {
|
|
|
1451
1728
|
readonly errors: Error[];
|
|
1452
1729
|
/** #590: tombstone enforcements applied during this run (never resolver-visible). */
|
|
1453
1730
|
readonly erasures?: ErasureEnforcement[];
|
|
1731
|
+
/**
|
|
1732
|
+
* core#96 — reserved-collection records mirrored by this run (`_keyring`,
|
|
1733
|
+
* `_users`, `_broker*`, …): they travel outside the dirty log, so `pushed`
|
|
1734
|
+
* / `pulled` never count them. Present when non-zero, so "did my new key
|
|
1735
|
+
* get out" is observable. A local `_keyring` the target already supersedes
|
|
1736
|
+
* is reported in `conflicts` (collection `_keyring`), never silently dropped.
|
|
1737
|
+
*/
|
|
1738
|
+
readonly reserved?: number;
|
|
1739
|
+
/**
|
|
1740
|
+
* core#108 — this device's own dirty records, refused by its OWN gates when
|
|
1741
|
+
* re-judged against current local state just before the push. They were
|
|
1742
|
+
* WITHHELD: nothing left for them, the local copy is untouched, and they
|
|
1743
|
+
* stay dirty so a later push carries them once the rule passes. Present
|
|
1744
|
+
* when non-zero.
|
|
1745
|
+
*
|
|
1746
|
+
* ⛔ NOT AN ERROR, and a sync indicator must not render it as one (pilot-1,
|
|
1747
|
+
* on the shipped behaviour). `pushed: 0` with `rejected` present means
|
|
1748
|
+
* "N records waiting on a rule", not "N records failed": nothing was lost,
|
|
1749
|
+
* nothing needs resubmitting, and the next push carries them by itself once
|
|
1750
|
+
* the rule passes. The failure fates are `errors` and `conflicts`; this is
|
|
1751
|
+
* a third thing and reads as a queue, not a fault.
|
|
1752
|
+
*/
|
|
1753
|
+
readonly rejected?: SyncRejection[];
|
|
1454
1754
|
}
|
|
1455
1755
|
/**
|
|
1456
1756
|
* core#81 — a progress sample during a pull or push. Emitted as
|
|
@@ -1487,6 +1787,38 @@ export interface PullResult {
|
|
|
1487
1787
|
readonly errors: Error[];
|
|
1488
1788
|
/** #590: tombstone enforcements applied during this run (never resolver-visible). */
|
|
1489
1789
|
readonly erasures?: ErasureEnforcement[];
|
|
1790
|
+
/** core#96 — reserved-collection records mirrored (copied + deleted) by this run; see `PushResult.reserved`. */
|
|
1791
|
+
readonly reserved?: number;
|
|
1792
|
+
/**
|
|
1793
|
+
* core#74 — every record this pull APPLIED, in order, with what it replaced
|
|
1794
|
+
* when the local copy was superseded. This is the per-record visibility a
|
|
1795
|
+
* count cannot give: an app can list what arrived, and a writer whose record
|
|
1796
|
+
* was overwritten by a newer version from another device sees `replaced`
|
|
1797
|
+
* — the "you lost" the conflict path never told it (same-id concurrent edits
|
|
1798
|
+
* resolve to the LAST pusher, reported to that pusher only). Present when
|
|
1799
|
+
* non-empty.
|
|
1800
|
+
*/
|
|
1801
|
+
readonly applied?: readonly SyncApplied[];
|
|
1802
|
+
/**
|
|
1803
|
+
* core#74 — records this pull REFUSED at admission: a `beforePut` gate or a
|
|
1804
|
+
* `db.onBeforeWrite` hook on this device threw for the incoming record (a
|
|
1805
|
+
* write into a period closed here, say). Each is parked under
|
|
1806
|
+
* `_sync_rejected` with the envelope intact; the local copy is untouched.
|
|
1807
|
+
* `db.rejected(vault)` lists, readmits or discards them. Present when
|
|
1808
|
+
* non-empty.
|
|
1809
|
+
*/
|
|
1810
|
+
readonly rejected?: readonly SyncRejection[];
|
|
1811
|
+
/** core#72 — the target's restore epoch, when the target carries one. */
|
|
1812
|
+
readonly epoch?: number;
|
|
1813
|
+
/**
|
|
1814
|
+
* core#72 — this pull crossed a restore epoch: the target was REPLACED since
|
|
1815
|
+
* this device last synced (`db.replaceRemote` on another device). Every
|
|
1816
|
+
* local edit not yet pushed was parked under `_sync_rejected` (reason
|
|
1817
|
+
* `restore-epoch`, listed by `db.rejected(vault)`), the dirty log was
|
|
1818
|
+
* dropped, and the target's state was adopted wholesale — records the
|
|
1819
|
+
* restore removed arrive as delete markers.
|
|
1820
|
+
*/
|
|
1821
|
+
readonly resynced?: true;
|
|
1490
1822
|
/**
|
|
1491
1823
|
* #807: present on period-scoped pulls only — per-phase KPI counters
|
|
1492
1824
|
* (`summaries` = the `_periods` navigation index + companions; `records`
|
|
@@ -1524,6 +1856,8 @@ export interface SyncStatus {
|
|
|
1524
1856
|
readonly lastPush: string | null;
|
|
1525
1857
|
/** As {@link SyncStatus.lastPush}, for pulls: last pull that had no errors. */
|
|
1526
1858
|
readonly lastPull: string | null;
|
|
1859
|
+
/** core#72 — the target's restore epoch this device has adopted, when any. */
|
|
1860
|
+
readonly epoch?: number;
|
|
1527
1861
|
/** core#81 — the running sync's latest progress sample, or absent when idle. */
|
|
1528
1862
|
readonly inFlight?: SyncProgress;
|
|
1529
1863
|
/**
|
|
@@ -1615,6 +1949,8 @@ export interface SyncTargetStatus {
|
|
|
1615
1949
|
readonly lastPush: string | null;
|
|
1616
1950
|
/** Last pull that completed with no errors, or `null`. */
|
|
1617
1951
|
readonly lastPull: string | null;
|
|
1952
|
+
/** core#72 — the target's restore epoch this device has adopted, when any. */
|
|
1953
|
+
readonly epoch?: number;
|
|
1618
1954
|
/**
|
|
1619
1955
|
* Nothing queued for this target — `dirty === 0`.
|
|
1620
1956
|
*
|
|
@@ -1673,6 +2009,19 @@ export interface NoydbEventMap {
|
|
|
1673
2009
|
'sync:progress': SyncProgress;
|
|
1674
2010
|
'sync:erasure': ErasureEnforcement;
|
|
1675
2011
|
'sync:conflict': Conflict;
|
|
2012
|
+
/** core#74 — a pulled record refused by this device's admission gate; parked under `_sync_rejected`. */
|
|
2013
|
+
'sync:rejected': SyncRejection;
|
|
2014
|
+
/** core#72 — this device replaced a target: the epoch it wrote and the counts. */
|
|
2015
|
+
'sync:replace': ReplaceRemoteResult & {
|
|
2016
|
+
readonly vault: string;
|
|
2017
|
+
};
|
|
2018
|
+
/** core#72 — a pull crossed a restore epoch on the target; the local dirty log was parked and the target adopted. */
|
|
2019
|
+
'sync:epoch': {
|
|
2020
|
+
readonly vault: string;
|
|
2021
|
+
readonly from: number | null;
|
|
2022
|
+
readonly to: number;
|
|
2023
|
+
readonly parked: number;
|
|
2024
|
+
};
|
|
1676
2025
|
'write:conflict': WriteConflict;
|
|
1677
2026
|
'sync:online': void;
|
|
1678
2027
|
'sync:offline': void;
|
|
@@ -1857,15 +2206,24 @@ export interface GrantOptions {
|
|
|
1857
2206
|
readonly initialProfile?: unknown;
|
|
1858
2207
|
}
|
|
1859
2208
|
/**
|
|
1860
|
-
* Caller payload for `db.updateUser
|
|
1861
|
-
*
|
|
2209
|
+
* Caller payload for `db.updateUser`: change what an EXISTING member may
|
|
2210
|
+
* do, without holding their secret.
|
|
1862
2211
|
*
|
|
1863
2212
|
* `role`, `displayName`, and `permissions` live in the plaintext header
|
|
1864
2213
|
* of `_keyring/<userId>` (the sync engine reads them without keys).
|
|
1865
|
-
*
|
|
1866
|
-
*
|
|
1867
|
-
*
|
|
1868
|
-
*
|
|
2214
|
+
* The member's KEK, salt, authenticator slots and recovery enrollments
|
|
2215
|
+
* are untouched. Last-write-wins through the existing keyring put (same
|
|
2216
|
+
* concurrency story as `db.grant` / `db.revoke`).
|
|
2217
|
+
*
|
|
2218
|
+
* core#96 — a change that WIDENS access (a new collection, a wrap-all
|
|
2219
|
+
* role) delivers the DEKs the member lacks through their keyring inbox
|
|
2220
|
+
* (`KeyringFile.inbox`): sealed to the member's inbox key pair, drained at
|
|
2221
|
+
* their next tier-1 unlock. A change that NARROWS access drops the DEKs
|
|
2222
|
+
* and rotates those collections, exactly as a narrowing `grant` does
|
|
2223
|
+
* (#1097). Before this existed, `updateUser` could name a collection the
|
|
2224
|
+
* member had no key for — a permanently blind slot — and `grant` was the
|
|
2225
|
+
* only widening path, which re-keys the member and needs their CURRENT
|
|
2226
|
+
* secret. Use `grant` to create or re-key; use this to change access.
|
|
1869
2227
|
*
|
|
1870
2228
|
* Top-level fields are partial-merge: absent fields are not modified.
|
|
1871
2229
|
* `null` on `displayName` clears the field (stored as the empty string;
|
package/dist/kernel/vault.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OpenCollectionOptions } from '../port/with/collection-options.js';
|
|
2
2
|
import type { StrategyBag } from '../port/with/strategies.js';
|
|
3
3
|
import type { NoydbFormat, ImportPlan, FormatExportOptions, FormatImportOptions } from '../port/with/formats-strategy.js';
|
|
4
|
-
import type { NoydbStore, EncryptedEnvelope, HistoryConfig, ExportStreamOptions, ExportChunk, CollectionConflictResolver, CrossTierAccessEvent, Role, VaultUserApi, CollectionShape, SensitiveOf, IndexedOf, MoneyOf } from './types.js';
|
|
4
|
+
import type { NoydbStore, EncryptedEnvelope, SyncRejection, LoadPodOptions, LoadPodResult, RestoreToOptions, RestoreToResult, HistoryConfig, ExportStreamOptions, ExportChunk, CollectionConflictResolver, CrossTierAccessEvent, Role, VaultUserApi, CollectionShape, SensitiveOf, IndexedOf, MoneyOf } from './types.js';
|
|
5
5
|
import type { Noydb } from './noydb.js';
|
|
6
6
|
import type { IssueDelegationOptions, DelegationToken } from '../with-party/team/delegation.js';
|
|
7
7
|
import { Collection } from './collection.js';
|
|
@@ -69,7 +69,7 @@ export declare class Vault {
|
|
|
69
69
|
private keyring;
|
|
70
70
|
private readonly encrypted;
|
|
71
71
|
private readonly emitter;
|
|
72
|
-
private
|
|
72
|
+
private onDirty;
|
|
73
73
|
private readonly onRegisterConflictResolver;
|
|
74
74
|
private readonly syncAdapter;
|
|
75
75
|
private readonly getPurgeableTargets;
|
|
@@ -140,6 +140,7 @@ export declare class Vault {
|
|
|
140
140
|
* `load()` after the on-disk keyring file has been replaced. Provided by Noydb at openVault()
|
|
141
141
|
* time; `undefined` in tests that construct Vault directly (load() then skips the refresh). */
|
|
142
142
|
private readonly reloadKeyring;
|
|
143
|
+
private readonly onRestore;
|
|
143
144
|
private readonly collectionCache;
|
|
144
145
|
private satelliteRegistry;
|
|
145
146
|
/** Vault-level schema cutover fence/controller. */
|
|
@@ -239,7 +240,7 @@ export declare class Vault {
|
|
|
239
240
|
/** — currently-active elevation, or null. One per vault. */
|
|
240
241
|
private activeElevation;
|
|
241
242
|
/**
|
|
242
|
-
* Optional translator callback threaded from `Noydb.
|
|
243
|
+
* Optional translator callback threaded from `Noydb._invokeTranslator`.
|
|
243
244
|
* Present only when `plaintextTranslator` was configured on `createNoydb()`.
|
|
244
245
|
*/
|
|
245
246
|
private readonly translateText;
|
|
@@ -253,6 +254,8 @@ export declare class Vault {
|
|
|
253
254
|
onDirty?: OnDirtyCallback | undefined;
|
|
254
255
|
historyConfig?: HistoryConfig | undefined;
|
|
255
256
|
reloadKeyring?: (() => Promise<UnlockedKeyring>) | undefined;
|
|
257
|
+
/** core#71 — reset the vault's sync engines after a restore (`load()`). */
|
|
258
|
+
onRestore?: (() => Promise<void>) | undefined;
|
|
256
259
|
/** Vault-default locale. */
|
|
257
260
|
locale?: string | undefined;
|
|
258
261
|
/** Translator callback from Noydb. */
|
|
@@ -373,6 +376,17 @@ export declare class Vault {
|
|
|
373
376
|
* its already-warmed `LookupHandle._syncCache` (membership/altIndex/snapshot reads never see a
|
|
374
377
|
* stale verdict for a pulled vocabulary edit) and collect the touch into any open graph batch
|
|
375
378
|
* (the sync-apply wave-reachability seam Task 5's ref edges will use). No-op if never warmed. */
|
|
379
|
+
/** core#74 — admission of a sync-applied record: the collection's own gates and hooks judge it. Reserved names are never gated. @internal */
|
|
380
|
+
_admitRemote(collection: string, id: string, envelope: EncryptedEnvelope, origin?: 'sync-apply' | 'push-recheck'): Promise<{
|
|
381
|
+
admitted: true;
|
|
382
|
+
} | {
|
|
383
|
+
admitted: false;
|
|
384
|
+
reason: string;
|
|
385
|
+
}>;
|
|
386
|
+
/** @internal core#107 — seal a refusal under the refused record's own collection DEK. `null`: no DEK here. */
|
|
387
|
+
_sealRejection(collection: string, id: string, rejection: SyncRejection, version: number): Promise<EncryptedEnvelope | null>;
|
|
388
|
+
/** @internal core#107 — open a replicated refusal. `null` when this device holds no DEK for it. */
|
|
389
|
+
_openRejection(collection: string, id: string, envelope: EncryptedEnvelope): Promise<SyncRejection | null>;
|
|
376
390
|
_invalidateSyncApplied(collection: string, id: string, action: 'put' | 'delete'): Promise<void>;
|
|
377
391
|
/** @internal #650 Task 4 (#647) — declared reserved-lookup collection names, for `SyncEngine.pull()`'s explicit prefix registry. */
|
|
378
392
|
_reservedLookupCollectionNames(): readonly string[];
|
|
@@ -1152,7 +1166,7 @@ export declare class Vault {
|
|
|
1152
1166
|
* collection.
|
|
1153
1167
|
*/
|
|
1154
1168
|
delegate(opts: IssueDelegationOptions): Promise<DelegationToken>;
|
|
1155
|
-
/** Merge live delegations into the keyring — core#56's read half
|
|
1169
|
+
/** Merge live delegations addressed to this user into the keyring — core#56's read half, cross-user since core#65. Explicit, never automatic: `with-party/team/delegation.ts` says why. */
|
|
1156
1170
|
refreshDelegations(now?: Date): Promise<DelegationToken[]>;
|
|
1157
1171
|
/**
|
|
1158
1172
|
* revoke an issued delegation by id. Safe to call even
|
|
@@ -1391,6 +1405,8 @@ export declare class Vault {
|
|
|
1391
1405
|
* collection-cache clear, ledger-store reset) that `load()` performs on this
|
|
1392
1406
|
* Vault's private state.
|
|
1393
1407
|
*/
|
|
1408
|
+
/** core#90 — the first `attachSyncTarget()` on a vault opened without one: from here every write is dirty-tracked. Cached collection handles are rebuilt (as after `load()`); re-acquire handles obtained before the attach. */
|
|
1409
|
+
_enableSync(onDirty: OnDirtyCallback): void;
|
|
1394
1410
|
/** core#82 — sync pulled a newer copy of THIS user's keyring file: reload it in place, rebuild the DEK resolver, drop cached collections. */
|
|
1395
1411
|
_reloadKeyringAfterSync(): Promise<void>;
|
|
1396
1412
|
private backupContext;
|
|
@@ -1416,7 +1432,25 @@ export declare class Vault {
|
|
|
1416
1432
|
* with a console warning and skip the integrity check entirely
|
|
1417
1433
|
* — there's no chain to verify against.
|
|
1418
1434
|
*/
|
|
1419
|
-
|
|
1435
|
+
/**
|
|
1436
|
+
* core#76 — restore this vault to its state at `timestamp`, as FORWARD
|
|
1437
|
+
* WRITES. Every record whose state at T differs from its state now is put
|
|
1438
|
+
* back at T's value; every record that exists now and did not exist at T is
|
|
1439
|
+
* deleted.
|
|
1440
|
+
*
|
|
1441
|
+
* ⭐ The writes go through `Collection.put`/`.delete`, so guards, periods,
|
|
1442
|
+
* history and the ledger all see them. The restore is therefore an audited,
|
|
1443
|
+
* reversible event that replicates through ordinary sync — no pod, and none
|
|
1444
|
+
* of the state-replacement machinery core#71/#72 exists to make safe.
|
|
1445
|
+
*
|
|
1446
|
+
* `{ dryRun: true }` returns the same report having written nothing.
|
|
1447
|
+
*
|
|
1448
|
+
* ⚠️ Bounded by history retention, and ⛔ blobs are not restored — see the
|
|
1449
|
+
* module header on `with-commit/history/restore-to.ts`, which states both
|
|
1450
|
+
* limits and why the blob one is not reported rather than reported empty.
|
|
1451
|
+
*/
|
|
1452
|
+
restoreTo(timestamp: string | Date, options?: RestoreToOptions): Promise<RestoreToResult>;
|
|
1453
|
+
load(backupJson: string, options?: LoadPodOptions): Promise<LoadPodResult>;
|
|
1420
1454
|
/**
|
|
1421
1455
|
* End-to-end backup integrity check. Runs both:
|
|
1422
1456
|
*
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
LedgerStore,
|
|
4
4
|
applyPatch,
|
|
5
5
|
computePatch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y22JWHCP.js";
|
|
7
7
|
import {
|
|
8
8
|
LEDGER_COLLECTION,
|
|
9
9
|
LEDGER_DELTAS_COLLECTION
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
paddedIndex,
|
|
16
16
|
parseIndex,
|
|
17
17
|
sha256Hex
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-QHG7GQKM.js";
|
|
19
|
+
import "./chunk-WRLWEYHY.js";
|
|
20
|
+
import "./chunk-O6VOR4NH.js";
|
|
21
|
+
import "./chunk-VZFTON37.js";
|
|
22
22
|
import "./chunk-NH2UOV3B.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-HTRLQ4ZZ.js";
|
|
24
|
+
import "./chunk-EPPAEGH5.js";
|
|
25
|
+
import "./chunk-URGHKZPL.js";
|
|
26
|
+
import "./chunk-2RH5SEY7.js";
|
|
27
27
|
export {
|
|
28
28
|
LEDGER_COLLECTION,
|
|
29
29
|
LEDGER_DELTAS_COLLECTION,
|
|
@@ -37,4 +37,4 @@ export {
|
|
|
37
37
|
parseIndex,
|
|
38
38
|
sha256Hex
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=ledger-
|
|
40
|
+
//# sourceMappingURL=ledger-UFJCB6T5.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
liberateVault
|
|
3
|
+
} from "./chunk-LMC5L3MM.js";
|
|
4
|
+
import "./chunk-FUHUGKDN.js";
|
|
5
|
+
import "./chunk-U43RSPPX.js";
|
|
6
|
+
import "./chunk-GU6QXHPZ.js";
|
|
7
|
+
import "./chunk-4N4OIVK3.js";
|
|
8
|
+
import "./chunk-WQUIJPN4.js";
|
|
9
|
+
import "./chunk-GMKGGY7V.js";
|
|
10
|
+
import "./chunk-QVUMKG3Z.js";
|
|
11
|
+
import "./chunk-6BEBWHNL.js";
|
|
12
|
+
import "./chunk-XQGKS4OW.js";
|
|
13
|
+
import "./chunk-LJ744WXU.js";
|
|
14
|
+
import "./chunk-WRLWEYHY.js";
|
|
15
|
+
import "./chunk-O6VOR4NH.js";
|
|
16
|
+
import "./chunk-VZFTON37.js";
|
|
17
|
+
import "./chunk-NH2UOV3B.js";
|
|
18
|
+
import "./chunk-HTRLQ4ZZ.js";
|
|
19
|
+
import "./chunk-EPPAEGH5.js";
|
|
20
|
+
import "./chunk-URGHKZPL.js";
|
|
21
|
+
import "./chunk-2RH5SEY7.js";
|
|
22
|
+
export {
|
|
23
|
+
liberateVault
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=liberate-OEOSNNFH.js.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LinkEndpointError,
|
|
3
3
|
LinkSet
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6WEPFEMJ.js";
|
|
5
5
|
import {
|
|
6
6
|
LINK_COLLECTION_PREFIX,
|
|
7
7
|
LinkIntegrityError,
|
|
8
8
|
isLinkCollectionName,
|
|
9
9
|
linkCollectionName,
|
|
10
10
|
linkRowKey
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-QNOWNCZS.js";
|
|
12
|
+
import "./chunk-WRLWEYHY.js";
|
|
13
|
+
import "./chunk-O6VOR4NH.js";
|
|
14
|
+
import "./chunk-VZFTON37.js";
|
|
15
15
|
import "./chunk-NH2UOV3B.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-HTRLQ4ZZ.js";
|
|
17
|
+
import "./chunk-EPPAEGH5.js";
|
|
18
|
+
import "./chunk-URGHKZPL.js";
|
|
19
|
+
import "./chunk-2RH5SEY7.js";
|
|
20
20
|
export {
|
|
21
21
|
LINK_COLLECTION_PREFIX,
|
|
22
22
|
LinkEndpointError,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
linkCollectionName,
|
|
27
27
|
linkRowKey
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=link-set-
|
|
29
|
+
//# sourceMappingURL=link-set-KMUBFN2L.js.map
|