@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
|
@@ -7,25 +7,28 @@ import {
|
|
|
7
7
|
isLinkCollectionName,
|
|
8
8
|
linkCollectionName,
|
|
9
9
|
linkRowKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QNOWNCZS.js";
|
|
11
11
|
import {
|
|
12
12
|
hashFields,
|
|
13
13
|
validateSatelliteDeclaration
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NHEKQWFI.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveStaleOnRead
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZNVBCKMV.js";
|
|
18
18
|
import {
|
|
19
19
|
loadFence
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TLIFNRU5.js";
|
|
21
|
+
import {
|
|
22
|
+
DELEGATIONS_COLLECTION
|
|
23
|
+
} from "./chunk-JQMEXCUZ.js";
|
|
21
24
|
import {
|
|
22
25
|
buildPersistedIndexCallbacks,
|
|
23
26
|
syncTierSearch
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CSAN22QG.js";
|
|
25
28
|
import {
|
|
26
29
|
isBaseLive,
|
|
27
30
|
liveBaseIdSet
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-X6Z2SIRF.js";
|
|
29
32
|
import {
|
|
30
33
|
SchemaUpdateGate
|
|
31
34
|
} from "./chunk-6LJY7X5A.js";
|
|
@@ -33,19 +36,19 @@ import {
|
|
|
33
36
|
NO_TIERS,
|
|
34
37
|
classifySealedShred,
|
|
35
38
|
syncDerivedOutputs
|
|
36
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-BSEPI3HD.js";
|
|
37
40
|
import {
|
|
38
41
|
NO_PORTABILITY
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-R4GLRJ55.js";
|
|
40
43
|
import {
|
|
41
44
|
NO_CARGO
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IFUYLIEY.js";
|
|
43
46
|
import {
|
|
44
47
|
saveSealedSecret
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-GU6QXHPZ.js";
|
|
46
49
|
import {
|
|
47
50
|
runDrainBarrier
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-PWAMX5KU.js";
|
|
49
52
|
import {
|
|
50
53
|
NO_FORMATS
|
|
51
54
|
} from "./chunk-RWFQVNXR.js";
|
|
@@ -55,7 +58,7 @@ import {
|
|
|
55
58
|
import {
|
|
56
59
|
CustodyApi,
|
|
57
60
|
NO_CUSTODY
|
|
58
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-AI35LNWQ.js";
|
|
59
62
|
import {
|
|
60
63
|
DEFAULT_POSTURE,
|
|
61
64
|
ViaGraph,
|
|
@@ -69,21 +72,21 @@ import {
|
|
|
69
72
|
resolveComputedEdges,
|
|
70
73
|
resolveDescribeFieldIds,
|
|
71
74
|
resolveVirtualMoneyFields
|
|
72
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-VLRY2UH4.js";
|
|
73
76
|
import {
|
|
74
77
|
findMatchingIdsByPairs
|
|
75
78
|
} from "./chunk-TFMM5DBB.js";
|
|
76
79
|
import {
|
|
77
80
|
encodeVecId
|
|
78
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-TU6ZJTYT.js";
|
|
79
82
|
import {
|
|
80
83
|
NO_CLASSIFIED,
|
|
81
84
|
guardClassifiedCompat,
|
|
82
85
|
resolveClassifiedFields
|
|
83
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-ID4ZBC3X.js";
|
|
84
87
|
import {
|
|
85
88
|
derivePersistedSchema
|
|
86
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-UORWAG7K.js";
|
|
87
90
|
import {
|
|
88
91
|
findRollupSpecForIntent,
|
|
89
92
|
forgetDerivedFanout,
|
|
@@ -93,7 +96,7 @@ import {
|
|
|
93
96
|
runGraphDispatchWave,
|
|
94
97
|
selfWriteFieldEqual,
|
|
95
98
|
touchFor
|
|
96
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-WIUH6EJ7.js";
|
|
97
100
|
import {
|
|
98
101
|
buildLookupAltIndex,
|
|
99
102
|
buildLookupSnapshotRows,
|
|
@@ -108,17 +111,19 @@ import {
|
|
|
108
111
|
resolveDictSource,
|
|
109
112
|
resolveLabelFromMap,
|
|
110
113
|
updateReferencingRecords
|
|
111
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-PZN76MMV.js";
|
|
112
115
|
import {
|
|
113
116
|
OverlayedCollection
|
|
114
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-PU5ZEV65.js";
|
|
115
118
|
import {
|
|
116
119
|
INDEXED_STORE_POLICY,
|
|
117
|
-
NO_SYNC
|
|
118
|
-
|
|
120
|
+
NO_SYNC,
|
|
121
|
+
openRejection,
|
|
122
|
+
sealRejection
|
|
123
|
+
} from "./chunk-7UHLO4ZN.js";
|
|
119
124
|
import {
|
|
120
125
|
NO_ATTESTATION
|
|
121
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-LZN6DTFI.js";
|
|
122
127
|
import {
|
|
123
128
|
NO_COVERAGE
|
|
124
129
|
} from "./chunk-NV4OESHC.js";
|
|
@@ -131,7 +136,7 @@ import {
|
|
|
131
136
|
resolvePeriodKey,
|
|
132
137
|
resolveReopenState,
|
|
133
138
|
samePartition
|
|
134
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-2T2TGRWE.js";
|
|
135
140
|
import {
|
|
136
141
|
PERIODS_COLLECTION,
|
|
137
142
|
PERIOD_ARCHIVES_COLLECTION,
|
|
@@ -139,7 +144,7 @@ import {
|
|
|
139
144
|
PERIOD_REOPENS_COLLECTION,
|
|
140
145
|
PERIOD_TARGET_PURGES_COLLECTION,
|
|
141
146
|
periodExclusiveUpperBound
|
|
142
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-A52BK5AY.js";
|
|
143
148
|
import {
|
|
144
149
|
NO_SHADOW
|
|
145
150
|
} from "./chunk-SMY5X46Z.js";
|
|
@@ -150,7 +155,7 @@ import {
|
|
|
150
155
|
TxContext,
|
|
151
156
|
bestEffortRevert,
|
|
152
157
|
trackKeyedWrite
|
|
153
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-PFHDQY5L.js";
|
|
154
159
|
import {
|
|
155
160
|
lazy
|
|
156
161
|
} from "./chunk-5D2ALSM5.js";
|
|
@@ -159,26 +164,26 @@ import {
|
|
|
159
164
|
InvertedIndex,
|
|
160
165
|
MemoryIndexStore,
|
|
161
166
|
NO_SEARCH
|
|
162
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-DL4GCSTS.js";
|
|
163
168
|
import {
|
|
164
169
|
NO_SEQUENCE,
|
|
165
170
|
SEQUENCE_COLLECTION,
|
|
166
171
|
compileSequenceFormat,
|
|
167
172
|
resolveSequenceKey
|
|
168
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-CLOSXHR4.js";
|
|
169
174
|
import {
|
|
170
175
|
EXPORT_AUDIT_COLLECTION,
|
|
171
176
|
NO_BLOBS,
|
|
172
177
|
createExportBlobsHandle,
|
|
173
178
|
runCompaction
|
|
174
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-ZK2WT532.js";
|
|
175
180
|
import {
|
|
176
181
|
LazyQuery,
|
|
177
182
|
NO_INDEXING,
|
|
178
183
|
compositeKey,
|
|
179
184
|
decodeIdxId,
|
|
180
185
|
encodeIdxId
|
|
181
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-2ODEFG6K.js";
|
|
182
187
|
import {
|
|
183
188
|
IMPLICIT_LAZY
|
|
184
189
|
} from "./chunk-66TQOPFM.js";
|
|
@@ -196,41 +201,41 @@ import {
|
|
|
196
201
|
} from "./chunk-GSAK56VF.js";
|
|
197
202
|
import {
|
|
198
203
|
NO_SEALED_RECORD
|
|
199
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-UMV5GBTJ.js";
|
|
200
205
|
import {
|
|
201
206
|
normalizeIndexDefs,
|
|
202
207
|
parseFieldIndexSnapshot
|
|
203
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-AYOQZJDB.js";
|
|
204
209
|
import {
|
|
205
210
|
EXPORT_REDACTION_MARKER,
|
|
206
211
|
ViaPipeline,
|
|
207
212
|
exportRedact
|
|
208
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-6WIFF46H.js";
|
|
209
214
|
import {
|
|
210
215
|
ScanBuilder
|
|
211
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-GZISWBCJ.js";
|
|
212
217
|
import {
|
|
213
218
|
Query
|
|
214
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-7C7OF26T.js";
|
|
215
220
|
import {
|
|
216
221
|
NO_REDUCE
|
|
217
222
|
} from "./chunk-3TDUWVWB.js";
|
|
218
223
|
import {
|
|
219
224
|
readPath
|
|
220
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-SXPLIRQH.js";
|
|
221
226
|
import {
|
|
222
227
|
dictCollectionName
|
|
223
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-WVQDY3UM.js";
|
|
224
229
|
import {
|
|
225
230
|
NO_I18N,
|
|
226
231
|
getAtPath,
|
|
227
232
|
isDictCollectionName,
|
|
228
233
|
isStaticDictDescriptor
|
|
229
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-UQRKAM2R.js";
|
|
230
235
|
import {
|
|
231
236
|
isViaInstalled,
|
|
232
237
|
viaBinder
|
|
233
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-PIO6NW7O.js";
|
|
234
239
|
import {
|
|
235
240
|
NO_TEAM,
|
|
236
241
|
describeAllUsersAuth,
|
|
@@ -253,7 +258,7 @@ import {
|
|
|
253
258
|
saveShamirRecoveryEntries,
|
|
254
259
|
updateAuthenticator,
|
|
255
260
|
writeMagicLinkGrant
|
|
256
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-GLSCL74M.js";
|
|
257
262
|
import {
|
|
258
263
|
assertKeyringOpenAllowed,
|
|
259
264
|
buildRecipientKeyringFile,
|
|
@@ -268,15 +273,15 @@ import {
|
|
|
268
273
|
listUsers,
|
|
269
274
|
loadKeyring,
|
|
270
275
|
updateKeyringIdentity
|
|
271
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-QVUMKG3Z.js";
|
|
272
277
|
import {
|
|
273
278
|
persistDirectoryConfig,
|
|
274
279
|
readDirectoryConfig
|
|
275
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-6BEBWHNL.js";
|
|
276
281
|
import {
|
|
277
282
|
NO_BROKER,
|
|
278
283
|
buildCredentialBrokerHandle
|
|
279
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-FVKQ5QUC.js";
|
|
280
285
|
import {
|
|
281
286
|
NO_SESSION
|
|
282
287
|
} from "./chunk-VKQCVU2Z.js";
|
|
@@ -285,16 +290,16 @@ import {
|
|
|
285
290
|
} from "./chunk-4AOERLTV.js";
|
|
286
291
|
import {
|
|
287
292
|
NO_HISTORY
|
|
288
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-L4UL4IAR.js";
|
|
289
294
|
import {
|
|
290
295
|
sha256Hex
|
|
291
|
-
} from "./chunk-
|
|
296
|
+
} from "./chunk-QHG7GQKM.js";
|
|
292
297
|
import {
|
|
293
298
|
assertCutoverTierSafe,
|
|
294
299
|
assertTierWritable,
|
|
295
300
|
dekKey,
|
|
296
301
|
liveRecordIsElevated
|
|
297
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-LJ744WXU.js";
|
|
298
303
|
import {
|
|
299
304
|
NO_VAULT_HEAD
|
|
300
305
|
} from "./chunk-OFD2HD6F.js";
|
|
@@ -306,7 +311,7 @@ import {
|
|
|
306
311
|
readDottedPath,
|
|
307
312
|
rebuildSubjectIndex,
|
|
308
313
|
removeSubjectRef
|
|
309
|
-
} from "./chunk-
|
|
314
|
+
} from "./chunk-P6FATPXQ.js";
|
|
310
315
|
import {
|
|
311
316
|
RecordCodec,
|
|
312
317
|
SEALED_CEK_NS,
|
|
@@ -327,13 +332,13 @@ import {
|
|
|
327
332
|
resolveStableCek,
|
|
328
333
|
rewrapBodyToDek,
|
|
329
334
|
verifyRecordIdentity
|
|
330
|
-
} from "./chunk-
|
|
335
|
+
} from "./chunk-WRLWEYHY.js";
|
|
331
336
|
import {
|
|
332
337
|
validateSchemaInput
|
|
333
|
-
} from "./chunk-
|
|
338
|
+
} from "./chunk-HTRLQ4ZZ.js";
|
|
334
339
|
import {
|
|
335
340
|
SealedHandle
|
|
336
|
-
} from "./chunk-
|
|
341
|
+
} from "./chunk-URGHKZPL.js";
|
|
337
342
|
import {
|
|
338
343
|
AlreadyElevatedError,
|
|
339
344
|
AttestationError,
|
|
@@ -373,19 +378,19 @@ import {
|
|
|
373
378
|
UniqueConstraintError,
|
|
374
379
|
ValidationError,
|
|
375
380
|
isConflictError
|
|
376
|
-
} from "./chunk-
|
|
381
|
+
} from "./chunk-2RH5SEY7.js";
|
|
377
382
|
|
|
378
383
|
// src/kernel/merge-authority.ts
|
|
379
384
|
function buildMergeAuthority(keyring) {
|
|
380
385
|
return {
|
|
381
386
|
verify: async (collection, id, envelope) => {
|
|
382
|
-
const dek = keyring.deks.get(dekKey(collection, envelope._tier ?? 0));
|
|
387
|
+
const dek = keyring().deks.get(dekKey(collection, envelope._tier ?? 0));
|
|
383
388
|
if (dek === void 0) return true;
|
|
384
389
|
return verifyRecordIdentity({ collection, id }, envelope, dek);
|
|
385
390
|
},
|
|
386
391
|
advance: async (collection, id, envelope, toVersion) => {
|
|
387
392
|
if (!hasSealedBody(envelope)) return { ...envelope, _v: toVersion };
|
|
388
|
-
const dek = keyring.deks.get(dekKey(collection, envelope._tier ?? 0));
|
|
393
|
+
const dek = keyring().deks.get(dekKey(collection, envelope._tier ?? 0));
|
|
389
394
|
if (dek === void 0) {
|
|
390
395
|
throw new ValidationError(
|
|
391
396
|
`sync: cannot advance "${collection}/${id}" past the remote \u2014 no key for it, so its body cannot be re-sealed at the new version. The local copy is unchanged.`
|
|
@@ -404,6 +409,24 @@ function buildMergeAuthority(keyring) {
|
|
|
404
409
|
};
|
|
405
410
|
}
|
|
406
411
|
|
|
412
|
+
// src/kernel/sync-wiring.ts
|
|
413
|
+
function wireEngine(host, name, comp, engine) {
|
|
414
|
+
engine.setCacheInvalidator((collection, id, action) => comp._invalidateSyncApplied(collection, id, action));
|
|
415
|
+
engine.setGraphBatchController({ begin: () => comp._beginGraphBatch(), flush: () => comp._flushGraphBatch() });
|
|
416
|
+
engine.setReservedLookupSource({ collections: () => comp._reservedLookupCollectionNames() });
|
|
417
|
+
engine.setReservedDictExpander((names) => comp._reservedDictDepsOf(names));
|
|
418
|
+
engine.setPeriodPullSource({ periods: () => comp.listPeriods() });
|
|
419
|
+
engine.setRosterReload({ userId: host.user, reload: () => comp._reloadKeyringAfterSync() });
|
|
420
|
+
engine.setAdmission({ admit: (collection, id, envelope, origin) => comp._admitRemote(collection, id, envelope, origin) });
|
|
421
|
+
engine.setRejectionCourier({
|
|
422
|
+
// core#107
|
|
423
|
+
seal: (collection, id, rejection, version) => comp._sealRejection(collection, id, rejection, version),
|
|
424
|
+
open: (collection, id, envelope) => comp._openRejection(collection, id, envelope)
|
|
425
|
+
});
|
|
426
|
+
engine.setCollectionNames(() => [...host.keyringCache.get(name)?.deks.keys() ?? []].filter((n) => !n.startsWith("_")));
|
|
427
|
+
for (const [resolverName, resolver] of host.conflictResolvers.get(name) ?? []) engine.registerConflictResolver(resolverName, resolver);
|
|
428
|
+
}
|
|
429
|
+
|
|
407
430
|
// src/with-commit/tx/strategy.ts
|
|
408
431
|
var NOT_ENABLED = new Error(
|
|
409
432
|
'Multi-record transactions require the tx strategy. Import `{ withTransactions }` from "@noy-db/hub/transactions" and pass it to `createNoydb({ transactionsStrategy: withTransactions() })`.'
|
|
@@ -535,7 +558,7 @@ function validateSecretModeOptions(options) {
|
|
|
535
558
|
}
|
|
536
559
|
async function resolveEffectiveSecret(options, store, vault) {
|
|
537
560
|
if (options.secretMode === "managed") {
|
|
538
|
-
const { resolveManagedSecret } = await import("./managed-secret-
|
|
561
|
+
const { resolveManagedSecret } = await import("./managed-secret-H5WYSJ46.js");
|
|
539
562
|
return resolveManagedSecret(store, vault, options.sealingKey);
|
|
540
563
|
}
|
|
541
564
|
return options.secret;
|
|
@@ -553,7 +576,7 @@ function ownerKeyringOptions(options, secret) {
|
|
|
553
576
|
|
|
554
577
|
// src/port/by/default-provider.ts
|
|
555
578
|
async function createDefaultMesh(store) {
|
|
556
|
-
const { StoreMesh } = await import("./store-coordination-provider-
|
|
579
|
+
const { StoreMesh } = await import("./store-coordination-provider-2YD2PTTP.js");
|
|
557
580
|
return new StoreMesh(store);
|
|
558
581
|
}
|
|
559
582
|
|
|
@@ -1729,7 +1752,7 @@ async function commitSequentially(ctx, entries, priors) {
|
|
|
1729
1752
|
}
|
|
1730
1753
|
|
|
1731
1754
|
// src/with-formula/computed/lazy.ts
|
|
1732
|
-
var loadComputed = lazy(() => import("./computed-
|
|
1755
|
+
var loadComputed = lazy(() => import("./computed-LZLSYOPG.js"));
|
|
1733
1756
|
async function loadEvalComputedFields() {
|
|
1734
1757
|
return (await loadComputed()).evalComputedFields;
|
|
1735
1758
|
}
|
|
@@ -2538,7 +2561,7 @@ var Collection = class {
|
|
|
2538
2561
|
}
|
|
2539
2562
|
await this.onAccess?.("find", "*");
|
|
2540
2563
|
if (hits.length === 0) return [];
|
|
2541
|
-
const { verifyDigestField } = await import("./verify-
|
|
2564
|
+
const { verifyDigestField } = await import("./verify-QWO5UKD6.js");
|
|
2542
2565
|
const policy = {
|
|
2543
2566
|
normalize: spec.verifyNormalize ?? "password",
|
|
2544
2567
|
notLastN: spec.notLastN ?? 0,
|
|
@@ -2750,7 +2773,7 @@ var Collection = class {
|
|
|
2750
2773
|
}
|
|
2751
2774
|
}
|
|
2752
2775
|
if (this.materializedViewSource !== void 0) {
|
|
2753
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
2776
|
+
const { resolveStaleMVOnRead } = await import("./stale-CROGJBIJ.js");
|
|
2754
2777
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
2755
2778
|
}
|
|
2756
2779
|
let record;
|
|
@@ -2949,6 +2972,85 @@ var Collection = class {
|
|
|
2949
2972
|
#hooksActive() {
|
|
2950
2973
|
return this.writeHooks !== void 0 && this.writeHooks.hasHandlers && !this.writeHooks.suppressed;
|
|
2951
2974
|
}
|
|
2975
|
+
/**
|
|
2976
|
+
* core#74 — ADMISSION of a record arriving by sync. Runs the same
|
|
2977
|
+
* `beforePut` gate bus (guards, periods) and `db.onBeforeWrite` hooks a
|
|
2978
|
+
* local `put` runs, on the DECRYPTED incoming record against this device's
|
|
2979
|
+
* current state, with `origin: 'sync-apply'`. A throw is a refusal; the
|
|
2980
|
+
* engine parks the envelope and leaves the local copy untouched.
|
|
2981
|
+
*
|
|
2982
|
+
* Not gated, deliberately: tombstones and delete markers (erasure wins, as
|
|
2983
|
+
* on every other path), elevated envelopes (#707 — invisible to gate
|
|
2984
|
+
* handlers), and a record this session holds no key for (it cannot judge;
|
|
2985
|
+
* the merge authority's stated residue, #1042). Schema validation does not
|
|
2986
|
+
* run — the writer validated. Zero cost when nothing is registered.
|
|
2987
|
+
* @internal
|
|
2988
|
+
*/
|
|
2989
|
+
/**
|
|
2990
|
+
* @internal core#74 — judge a record against THIS device's gates and hooks.
|
|
2991
|
+
*
|
|
2992
|
+
* ⚠️ core#108: under `'push-recheck'` the record is already in the local
|
|
2993
|
+
* store, so `resolveGatePrior` returns the record itself and `existing`
|
|
2994
|
+
* equals `incoming` — the state it was written over is gone and cannot be
|
|
2995
|
+
* reconstructed. That makes the re-check sound for rules that read AMBIENT
|
|
2996
|
+
* state (a closed period, a revoked clearance) and degenerate for rules
|
|
2997
|
+
* that compare against a prior, which see a no-op diff and pass. Widening
|
|
2998
|
+
* it would need the pre-write snapshot kept in the dirty log, which is a
|
|
2999
|
+
* different feature; do not "fix" it by synthesising a prior here.
|
|
3000
|
+
*/
|
|
3001
|
+
async _admitRemote(id, envelope, origin = "sync-apply") {
|
|
3002
|
+
const gates = this.subsystemBus?.hasGateHandlers("beforePut") ?? false;
|
|
3003
|
+
const hooks = this.#hooksActive();
|
|
3004
|
+
if (!gates && !hooks) return { admitted: true };
|
|
3005
|
+
if ((envelope._tier ?? 0) > 0) return { admitted: true };
|
|
3006
|
+
let incoming;
|
|
3007
|
+
try {
|
|
3008
|
+
incoming = await this.codec.decryptRecord({ collection: this.name, id }, envelope, { skipValidation: true });
|
|
3009
|
+
} catch {
|
|
3010
|
+
return { admitted: true };
|
|
3011
|
+
}
|
|
3012
|
+
try {
|
|
3013
|
+
const selfIsPrior = origin === "push-recheck" && envelope._v === 1;
|
|
3014
|
+
if (gates) {
|
|
3015
|
+
const { env: existingEnv, record: existingRecord } = await this.resolveGatePrior("beforePut", id);
|
|
3016
|
+
const gateEvent = {
|
|
3017
|
+
op: existingEnv && !selfIsPrior ? "update" : "create",
|
|
3018
|
+
vault: this.vault,
|
|
3019
|
+
collection: this.name,
|
|
3020
|
+
docId: id,
|
|
3021
|
+
incoming,
|
|
3022
|
+
existing: selfIsPrior ? null : this.via ? this.via.canonicalizeStored(existingRecord) : existingRecord,
|
|
3023
|
+
existingVersion: selfIsPrior ? 0 : existingEnv?._v ?? 0,
|
|
3024
|
+
existingTs: selfIsPrior ? void 0 : existingEnv?._ts,
|
|
3025
|
+
origin,
|
|
3026
|
+
userId: envelope._by ?? this.keyring.userId,
|
|
3027
|
+
role: this.keyring.role,
|
|
3028
|
+
...this.computed !== void 0 ? { computedFieldNames: new Set(Object.keys(this.computed)) } : {}
|
|
3029
|
+
};
|
|
3030
|
+
await this.subsystemBus.dispatchGate("beforePut", gateEvent);
|
|
3031
|
+
}
|
|
3032
|
+
if (hooks) {
|
|
3033
|
+
const prior = await this.#priorForHook(id);
|
|
3034
|
+
await this.writeHooks.runBefore({
|
|
3035
|
+
op: prior.record === null || selfIsPrior ? "create" : "update",
|
|
3036
|
+
vault: this.vault,
|
|
3037
|
+
collection: this.name,
|
|
3038
|
+
docId: id,
|
|
3039
|
+
before: selfIsPrior ? null : prior.record,
|
|
3040
|
+
after: incoming,
|
|
3041
|
+
userId: envelope._by ?? this.keyring.userId,
|
|
3042
|
+
timestamp: Date.now(),
|
|
3043
|
+
txId: generateULID(),
|
|
3044
|
+
baseVersion: prior.version,
|
|
3045
|
+
version: envelope._v,
|
|
3046
|
+
origin
|
|
3047
|
+
});
|
|
3048
|
+
}
|
|
3049
|
+
} catch (err) {
|
|
3050
|
+
return { admitted: false, reason: err instanceof Error ? err.message : String(err) };
|
|
3051
|
+
}
|
|
3052
|
+
return { admitted: true };
|
|
3053
|
+
}
|
|
2952
3054
|
/**
|
|
2953
3055
|
* @internal — resolve the prior record for a hook's `before` and
|
|
2954
3056
|
* its version. Critically, this uses the SAME basis `_putInternal` writes from
|
|
@@ -3290,9 +3392,9 @@ var Collection = class {
|
|
|
3290
3392
|
* @internal `wave` (#638 Task 4): when present (the sync/cutover/restore dispatch wave),
|
|
3291
3393
|
* an eager MV already refreshed this wave is skipped (per-target dedup, keyed on spec name).
|
|
3292
3394
|
*/
|
|
3293
|
-
async
|
|
3395
|
+
async _dispatchMaterializedViews(id, record, wave) {
|
|
3294
3396
|
if (this.materializedViewSource === void 0) return;
|
|
3295
|
-
const { dispatchMaterializedViews } = await import("./dispatch-
|
|
3397
|
+
const { dispatchMaterializedViews } = await import("./dispatch-KOPDDPEQ.js");
|
|
3296
3398
|
return dispatchMaterializedViews(this.#mvDispatchCtx(this.materializedViewSource), id, record, wave);
|
|
3297
3399
|
}
|
|
3298
3400
|
/**
|
|
@@ -3435,7 +3537,7 @@ var Collection = class {
|
|
|
3435
3537
|
* and from `forgetDerivedFanout` (#638 Task 6), which needs the per-target outcome to fill
|
|
3436
3538
|
* `ForgetResult.derivedAggregatesRecomputed`/`derivedResidueFrozen`). `wave` (#640): per-target dedup for the sync-apply path; `undefined` on local-delete (byte-identical).
|
|
3437
3539
|
*/
|
|
3438
|
-
async
|
|
3540
|
+
async _dispatchRollupsOnDelete(id, deleted, wave) {
|
|
3439
3541
|
const results = [];
|
|
3440
3542
|
for (const intent of this._rollupDeleteIntents(deleted)) {
|
|
3441
3543
|
const spec = findRollupSpecForIntent(this.derivationSource?.registry(), this.name, intent);
|
|
@@ -3456,15 +3558,15 @@ var Collection = class {
|
|
|
3456
3558
|
}
|
|
3457
3559
|
/** @internal `wave` (#638 Task 4) — threaded to `recomputeRollup` for the sync/cutover/restore
|
|
3458
3560
|
* dispatch wave's per-target dedup; `undefined` on the local-write path (byte-identical). */
|
|
3459
|
-
async
|
|
3561
|
+
async _dispatchDerivations(id, record, version, wave, prior) {
|
|
3460
3562
|
if (this.derivationSource === void 0) return;
|
|
3461
|
-
const { dispatchDerivations } = await import("./dispatch-
|
|
3563
|
+
const { dispatchDerivations } = await import("./dispatch-4BUYPWMJ.js");
|
|
3462
3564
|
return dispatchDerivations(this.#derivationDispatchCtx(), id, record, version, wave, prior);
|
|
3463
3565
|
}
|
|
3464
3566
|
/** @internal — trigger fan-out for a deleted parent (#1249); see dispatch.ts. */
|
|
3465
|
-
async
|
|
3567
|
+
async _dispatchTriggerDerivationsOnDelete(id, deleted) {
|
|
3466
3568
|
if (this.derivationSource === void 0) return;
|
|
3467
|
-
const { dispatchTriggerDerivationsOnDelete } = await import("./dispatch-
|
|
3569
|
+
const { dispatchTriggerDerivationsOnDelete } = await import("./dispatch-4BUYPWMJ.js");
|
|
3468
3570
|
return dispatchTriggerDerivationsOnDelete(this.#derivationDispatchCtx(), id, deleted);
|
|
3469
3571
|
}
|
|
3470
3572
|
/**
|
|
@@ -3712,11 +3814,11 @@ var Collection = class {
|
|
|
3712
3814
|
}
|
|
3713
3815
|
await this._onRecordMutated(id, "delete", "local-delete", { version: marker?._v ?? (existing?.version ?? 0) + 1 });
|
|
3714
3816
|
if (!internal) {
|
|
3715
|
-
await this.
|
|
3716
|
-
await this.
|
|
3817
|
+
await this._dispatchMaterializedViewsOnDelete(id);
|
|
3818
|
+
await this._dispatchArrayDerivationsOnDelete(id);
|
|
3717
3819
|
if (existing) {
|
|
3718
|
-
await this.
|
|
3719
|
-
await this.
|
|
3820
|
+
await this._dispatchRollupsOnDelete(id, existing.record);
|
|
3821
|
+
await this._dispatchTriggerDerivationsOnDelete(id, existing.record);
|
|
3720
3822
|
}
|
|
3721
3823
|
}
|
|
3722
3824
|
return true;
|
|
@@ -3785,9 +3887,9 @@ var Collection = class {
|
|
|
3785
3887
|
* erasure too — forget()'s fanout, GDPR residue. A delete-of-absent contributes 0 either way.
|
|
3786
3888
|
* @internal
|
|
3787
3889
|
*/
|
|
3788
|
-
async
|
|
3890
|
+
async _dispatchArrayDerivationsOnDelete(id, eraseRecordShapeToo = false) {
|
|
3789
3891
|
if (this.derivationSource === void 0) return 0;
|
|
3790
|
-
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-
|
|
3892
|
+
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-4BUYPWMJ.js");
|
|
3791
3893
|
return dispatchArrayDerivationsOnDelete(this.#derivationDeleteCtx(this.derivationSource), id, eraseRecordShapeToo);
|
|
3792
3894
|
}
|
|
3793
3895
|
/**
|
|
@@ -3799,9 +3901,9 @@ var Collection = class {
|
|
|
3799
3901
|
* manual serves empty until `refreshView()`. `residueUndecodable`/`residueDeclined` (#776/#785) carry `outputCollection:id` entries whose ownership stamp `invalidateMVAtRest` could not decode, resp. decoded+stamp-matched but declined erasure — surfaced, not erased.
|
|
3800
3902
|
* @internal
|
|
3801
3903
|
*/
|
|
3802
|
-
async
|
|
3904
|
+
async _dispatchMaterializedViewsOnDelete(id) {
|
|
3803
3905
|
if (this.materializedViewSource === void 0) return { deleted: 0, residueUndecodable: [], residueDeclined: [] };
|
|
3804
|
-
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-
|
|
3906
|
+
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-KOPDDPEQ.js");
|
|
3805
3907
|
return dispatchMaterializedViewsOnDelete(this.#mvDispatchCtx(this.materializedViewSource), id);
|
|
3806
3908
|
}
|
|
3807
3909
|
/**
|
|
@@ -3821,7 +3923,7 @@ var Collection = class {
|
|
|
3821
3923
|
);
|
|
3822
3924
|
}
|
|
3823
3925
|
if (this.materializedViewSource !== void 0) {
|
|
3824
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
3926
|
+
const { resolveStaleMVOnRead } = await import("./stale-CROGJBIJ.js");
|
|
3825
3927
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
3826
3928
|
}
|
|
3827
3929
|
await this.ensureHydrated();
|
|
@@ -3829,6 +3931,53 @@ var Collection = class {
|
|
|
3829
3931
|
if (!this.via) return records;
|
|
3830
3932
|
return Promise.all(records.map((r) => this.applyLocaleToRecord(r, locale)));
|
|
3831
3933
|
}
|
|
3934
|
+
/**
|
|
3935
|
+
* @internal core#122 — forget everything read from the store, so the next
|
|
3936
|
+
* read re-hydrates.
|
|
3937
|
+
*
|
|
3938
|
+
* ⭐ Why this is needed even though the vault drops its collection cache on
|
|
3939
|
+
* restore: `vault.collection(name)` hands back the instance FROM that cache,
|
|
3940
|
+
* so a handle the caller is already holding IS one of the objects in it.
|
|
3941
|
+
* Dropping the map makes the NEXT `vault.collection()` build a fresh
|
|
3942
|
+
* instance and leaves the caller's handle answering from its own pre-restore
|
|
3943
|
+
* cache — correct for the next caller, invisible to the current one, and the
|
|
3944
|
+
* natural shape of restore code holds the handle across the load.
|
|
3945
|
+
*
|
|
3946
|
+
* ⛔ Not a general "refresh": it deliberately does NOT re-read here. The
|
|
3947
|
+
* next read pays for it, so a restore that touches fifty collections does
|
|
3948
|
+
* not hydrate fifty times for a caller who will look at one.
|
|
3949
|
+
*/
|
|
3950
|
+
_invalidateAfterRestore() {
|
|
3951
|
+
this.cache.clear();
|
|
3952
|
+
this.markerIds.clear();
|
|
3953
|
+
this.hydrated = false;
|
|
3954
|
+
}
|
|
3955
|
+
/**
|
|
3956
|
+
* core#103 — `list()` with the hub-assigned id alongside each record.
|
|
3957
|
+
*
|
|
3958
|
+
* ⭐ The id is not derivable from a record, so a caller keyed on it
|
|
3959
|
+
* previously had to `get()` per row after `list()`. Tuple order mirrors
|
|
3960
|
+
* `putMany`: `[id, record]` reads the same going in and coming out.
|
|
3961
|
+
*
|
|
3962
|
+
* Same eager-mode requirement and the same locale/Via pipeline as `list()`
|
|
3963
|
+
* — deliberately, so the two cannot drift into answering differently about
|
|
3964
|
+
* the same collection. `list()` is unchanged.
|
|
3965
|
+
*/
|
|
3966
|
+
async listEntries(locale) {
|
|
3967
|
+
if (this.lazy) {
|
|
3968
|
+
throw new Error(
|
|
3969
|
+
`Collection "${this.name}": listEntries() is not available in lazy mode (prefetch: false). Use collection.listPageEntries({ limit }) to page through the collection.`
|
|
3970
|
+
);
|
|
3971
|
+
}
|
|
3972
|
+
if (this.materializedViewSource !== void 0) {
|
|
3973
|
+
const { resolveStaleMVOnRead } = await import("./stale-CROGJBIJ.js");
|
|
3974
|
+
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
3975
|
+
}
|
|
3976
|
+
await this.ensureHydrated();
|
|
3977
|
+
const entries = [...this.cache.entries()].map(([id, e]) => [id, e.record]);
|
|
3978
|
+
if (!this.via) return entries;
|
|
3979
|
+
return Promise.all(entries.map(async ([id, r]) => [id, await this.applyLocaleToRecord(r, locale)]));
|
|
3980
|
+
}
|
|
3832
3981
|
/**
|
|
3833
3982
|
* Scan-mode full-text search over a plain-text `field`. Decrypts the
|
|
3834
3983
|
* collection in memory and ranks records by BM25 against the tokenized query.
|
|
@@ -4280,6 +4429,21 @@ var Collection = class {
|
|
|
4280
4429
|
* developers can spot adapters that should opt into the fast path.
|
|
4281
4430
|
*/
|
|
4282
4431
|
async listPage(opts = {}) {
|
|
4432
|
+
const page = await this.listPageEntries(opts);
|
|
4433
|
+
return { items: page.items.map(([, record]) => record), nextCursor: page.nextCursor };
|
|
4434
|
+
}
|
|
4435
|
+
/**
|
|
4436
|
+
* core#103 — `listPage()` with the hub-assigned id alongside each record.
|
|
4437
|
+
*
|
|
4438
|
+
* ⭐ The id is not derivable from the record. An app that stores its own key
|
|
4439
|
+
* in a field is fine; one that relies on the id hub assigned had no bulk
|
|
4440
|
+
* read that returned it and had to `get()` per row to find out — which is
|
|
4441
|
+
* the shape pilot-1 hit writing a rule keyed on the record id.
|
|
4442
|
+
*
|
|
4443
|
+
* Tuple order mirrors `putMany`, so `[id, record]` reads the same way going
|
|
4444
|
+
* in and coming out. `listPage()` is unchanged and delegates here.
|
|
4445
|
+
*/
|
|
4446
|
+
async listPageEntries(opts = {}) {
|
|
4283
4447
|
const limit = opts.limit ?? 100;
|
|
4284
4448
|
if (this.adapter.listPage) {
|
|
4285
4449
|
const result = await this.adapter.listPage(this.vault, this.name, opts.cursor, limit);
|
|
@@ -4288,7 +4452,7 @@ var Collection = class {
|
|
|
4288
4452
|
if (!this.lazy && !this.cache.has(id)) {
|
|
4289
4453
|
this.cache.set(id, { record, version });
|
|
4290
4454
|
}
|
|
4291
|
-
decrypted.push(record);
|
|
4455
|
+
decrypted.push([id, record]);
|
|
4292
4456
|
}
|
|
4293
4457
|
return { items: decrypted, nextCursor: result.nextCursor };
|
|
4294
4458
|
}
|
|
@@ -4303,7 +4467,7 @@ var Collection = class {
|
|
|
4303
4467
|
if (envelope && (envelope._tier ?? 0) === 0) {
|
|
4304
4468
|
const record = await this.codec.decryptRecord({ collection: this.name, id }, envelope, { sealedAsHandles: true });
|
|
4305
4469
|
if (record === null) continue;
|
|
4306
|
-
items.push(record);
|
|
4470
|
+
items.push([id, record]);
|
|
4307
4471
|
if (!this.lazy && !this.cache.has(id)) {
|
|
4308
4472
|
this.cache.set(id, { record, version: envelope._v });
|
|
4309
4473
|
}
|
|
@@ -4506,8 +4670,8 @@ var Collection = class {
|
|
|
4506
4670
|
this.searchIndexStore?.markDirty();
|
|
4507
4671
|
this.fieldIndexStore?.markDirty();
|
|
4508
4672
|
await this.onAccess?.("put", id);
|
|
4509
|
-
await this.
|
|
4510
|
-
await this.
|
|
4673
|
+
await this._dispatchDerivations(id, record, version, void 0, ctx.prior);
|
|
4674
|
+
await this._dispatchMaterializedViews(id, record);
|
|
4511
4675
|
return;
|
|
4512
4676
|
}
|
|
4513
4677
|
case "local-delete": {
|
|
@@ -4986,14 +5150,14 @@ var Collection = class {
|
|
|
4986
5150
|
/** C-A/R10: persist the classified marker once per classified handle (store I/O in config-drift.ts). */
|
|
4987
5151
|
async _ensureClassifiedMarker() {
|
|
4988
5152
|
if (this._markerPersisted || this.vdigFields === null) return;
|
|
4989
|
-
const { persistClassifiedMarkerForFields } = await import("./classified-marker-
|
|
5153
|
+
const { persistClassifiedMarkerForFields } = await import("./classified-marker-7HXDMYHI.js");
|
|
4990
5154
|
await persistClassifiedMarkerForFields(this.adapter, this.vault, this.name, this.vdigFields, await this.getDEK(this.name));
|
|
4991
5155
|
this._markerPersisted = true;
|
|
4992
5156
|
}
|
|
4993
5157
|
/** C-A/R10 drift signal — the marker's declared digest-only set, memoized to one store read per handle (see config-drift.ts). */
|
|
4994
5158
|
async _classifiedMarkerDigestOnly() {
|
|
4995
5159
|
if (this._markerDigestOnlyCache !== void 0) return this._markerDigestOnlyCache;
|
|
4996
|
-
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-
|
|
5160
|
+
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-7HXDMYHI.js");
|
|
4997
5161
|
this._markerDigestOnlyCache = await readClassifiedMarkerDigestOnly(this.adapter, this.vault, this.name, await this.getDEK(this.name));
|
|
4998
5162
|
return this._markerDigestOnlyCache;
|
|
4999
5163
|
}
|
|
@@ -6661,7 +6825,7 @@ var VaultLinks = class {
|
|
|
6661
6825
|
// src/with-shape/links/lazy-handle.ts
|
|
6662
6826
|
function makeLazyLinkSetHandle(d) {
|
|
6663
6827
|
let engine = null;
|
|
6664
|
-
const load = () => engine ??= import("./link-set-
|
|
6828
|
+
const load = () => engine ??= import("./link-set-KMUBFN2L.js").then(
|
|
6665
6829
|
({ LinkSet }) => new LinkSet(d.adapter, d.vault, d.name, d.spec, d.encrypted, d.getDEK, d.actor, d.emitter, d.endpointExists)
|
|
6666
6830
|
);
|
|
6667
6831
|
return {
|
|
@@ -7314,7 +7478,7 @@ function declareSatellite(ctx, collectionName, options, existingRegistry) {
|
|
|
7314
7478
|
ctx.forEachSyncEngine((e) => e.remirrorPairResolvers([spec.base, spec.satellite]));
|
|
7315
7479
|
const registry = reg;
|
|
7316
7480
|
const baseSchema = ctx.getBaseSchema(spec.base);
|
|
7317
|
-
void import("./post-register-
|
|
7481
|
+
void import("./post-register-2AC2STHC.js").then((m) => m.postRegister(ctx.adapter, ctx.vaultName, spec, ctx.getDEK, baseSchema, registry)).catch(() => {
|
|
7318
7482
|
});
|
|
7319
7483
|
return reg;
|
|
7320
7484
|
}
|
|
@@ -7955,6 +8119,7 @@ var Vault = class {
|
|
|
7955
8119
|
* `load()` after the on-disk keyring file has been replaced. Provided by Noydb at openVault()
|
|
7956
8120
|
* time; `undefined` in tests that construct Vault directly (load() then skips the refresh). */
|
|
7957
8121
|
reloadKeyring;
|
|
8122
|
+
onRestore;
|
|
7958
8123
|
collectionCache = /* @__PURE__ */ new Map();
|
|
7959
8124
|
satelliteRegistry = null;
|
|
7960
8125
|
// spec #591, archetype-③
|
|
@@ -8060,7 +8225,7 @@ var Vault = class {
|
|
|
8060
8225
|
/** — currently-active elevation, or null. One per vault. */
|
|
8061
8226
|
activeElevation = null;
|
|
8062
8227
|
/**
|
|
8063
|
-
* Optional translator callback threaded from `Noydb.
|
|
8228
|
+
* Optional translator callback threaded from `Noydb._invokeTranslator`.
|
|
8064
8229
|
* Present only when `plaintextTranslator` was configured on `createNoydb()`.
|
|
8065
8230
|
*/
|
|
8066
8231
|
translateText;
|
|
@@ -8117,6 +8282,7 @@ var Vault = class {
|
|
|
8117
8282
|
void opts.guardStrategies;
|
|
8118
8283
|
this.historyConfig = opts.historyConfig ?? { enabled: true };
|
|
8119
8284
|
this.reloadKeyring = opts.reloadKeyring;
|
|
8285
|
+
this.onRestore = opts.onRestore;
|
|
8120
8286
|
this.locale = opts.locale;
|
|
8121
8287
|
this.vaultMeta = opts.meta;
|
|
8122
8288
|
this.translateText = opts.plaintextTranslator;
|
|
@@ -8144,7 +8310,7 @@ var Vault = class {
|
|
|
8144
8310
|
this.custody = new CustodyApi(
|
|
8145
8311
|
(options, factors) => this.noydb.grantCustodian(this.name, options, factors),
|
|
8146
8312
|
(options, factors) => this.noydb.revokeCustodian(this.name, options, factors),
|
|
8147
|
-
(opts2) => this.noydb.
|
|
8313
|
+
(opts2) => this.noydb._custodyStrategy.liberate(this, opts2)
|
|
8148
8314
|
);
|
|
8149
8315
|
}
|
|
8150
8316
|
/**
|
|
@@ -8291,7 +8457,7 @@ var Vault = class {
|
|
|
8291
8457
|
const strategies = options.schemaUpdate ?? [];
|
|
8292
8458
|
const work = (async () => {
|
|
8293
8459
|
const dek = await this.getDEK(collectionName);
|
|
8294
|
-
const { persistSchemaIfNeeded } = await import("./register-
|
|
8460
|
+
const { persistSchemaIfNeeded } = await import("./register-PIORIMMR.js");
|
|
8295
8461
|
const result = await persistSchemaIfNeeded({
|
|
8296
8462
|
store: this.adapter,
|
|
8297
8463
|
vault: this.name,
|
|
@@ -8441,7 +8607,7 @@ var Vault = class {
|
|
|
8441
8607
|
const work = (async () => {
|
|
8442
8608
|
try {
|
|
8443
8609
|
const dek = await this.getDEK(collectionName);
|
|
8444
|
-
await (await import("./register-
|
|
8610
|
+
await (await import("./register-PIORIMMR.js")).persistSchemaIfNeeded({
|
|
8445
8611
|
store: this.adapter,
|
|
8446
8612
|
vault: this.name,
|
|
8447
8613
|
collectionName,
|
|
@@ -8487,7 +8653,7 @@ var Vault = class {
|
|
|
8487
8653
|
* writes (unfenced walk — see `with-shape/satellites/migrate-cek.ts`); resumable.
|
|
8488
8654
|
*/
|
|
8489
8655
|
async migrateSatellitePerRecordKeys(satelliteName) {
|
|
8490
|
-
const { migrateSatelliteCek } = await import("./migrate-cek-
|
|
8656
|
+
const { migrateSatelliteCek } = await import("./migrate-cek-SPESQAAO.js");
|
|
8491
8657
|
return migrateSatelliteCek(satelliteName, this.collection(satelliteName, { perRecordKeys: true }));
|
|
8492
8658
|
}
|
|
8493
8659
|
/**
|
|
@@ -8539,6 +8705,21 @@ var Vault = class {
|
|
|
8539
8705
|
* its already-warmed `LookupHandle._syncCache` (membership/altIndex/snapshot reads never see a
|
|
8540
8706
|
* stale verdict for a pulled vocabulary edit) and collect the touch into any open graph batch
|
|
8541
8707
|
* (the sync-apply wave-reachability seam Task 5's ref edges will use). No-op if never warmed. */
|
|
8708
|
+
/** core#74 — admission of a sync-applied record: the collection's own gates and hooks judge it. Reserved names are never gated. @internal */
|
|
8709
|
+
async _admitRemote(collection, id, envelope, origin = "sync-apply") {
|
|
8710
|
+
if (collection.startsWith("_")) return { admitted: true };
|
|
8711
|
+
return this.collection(collection)._admitRemote(id, envelope, origin);
|
|
8712
|
+
}
|
|
8713
|
+
/** @internal core#107 — seal a refusal under the refused record's own collection DEK. `null`: no DEK here. */
|
|
8714
|
+
async _sealRejection(collection, id, rejection, version) {
|
|
8715
|
+
const dek = this.keyring.deks.get(collection);
|
|
8716
|
+
return dek ? sealRejection(collection, id, rejection, dek, version) : null;
|
|
8717
|
+
}
|
|
8718
|
+
/** @internal core#107 — open a replicated refusal. `null` when this device holds no DEK for it. */
|
|
8719
|
+
async _openRejection(collection, id, envelope) {
|
|
8720
|
+
const dek = this.keyring.deks.get(collection);
|
|
8721
|
+
return dek ? openRejection(collection, id, envelope, dek) : null;
|
|
8722
|
+
}
|
|
8542
8723
|
async _invalidateSyncApplied(collection, id, action) {
|
|
8543
8724
|
const coll = this.collectionCache.get(collection);
|
|
8544
8725
|
if (coll) {
|
|
@@ -9122,7 +9303,7 @@ var Vault = class {
|
|
|
9122
9303
|
*/
|
|
9123
9304
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
9124
9305
|
async _loadPodSigner() {
|
|
9125
|
-
const { loadSigner } = await import("./signer-
|
|
9306
|
+
const { loadSigner } = await import("./signer-TW5MAQJP.js");
|
|
9126
9307
|
return loadSigner(this.adapter, this.name, this.getDEK);
|
|
9127
9308
|
}
|
|
9128
9309
|
async writeExportAudit(entry) {
|
|
@@ -9624,7 +9805,7 @@ var Vault = class {
|
|
|
9624
9805
|
async _initGuards(handles) {
|
|
9625
9806
|
if (handles.length === 0) return;
|
|
9626
9807
|
const [{ GuardRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
9627
|
-
import("./registry-
|
|
9808
|
+
import("./registry-SELCBYEQ.js"),
|
|
9628
9809
|
import("./read-only-facade-BIGO37U3.js")
|
|
9629
9810
|
]);
|
|
9630
9811
|
const registry = new GuardRegistry();
|
|
@@ -9652,7 +9833,7 @@ var Vault = class {
|
|
|
9652
9833
|
async _initDerivations(handles) {
|
|
9653
9834
|
if (handles.length === 0) return;
|
|
9654
9835
|
const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
9655
|
-
import("./registry-
|
|
9836
|
+
import("./registry-JGWLW53D.js"),
|
|
9656
9837
|
import("./read-only-facade-BIGO37U3.js")
|
|
9657
9838
|
]);
|
|
9658
9839
|
const registry = new DerivationRegistry();
|
|
@@ -9684,7 +9865,7 @@ var Vault = class {
|
|
|
9684
9865
|
*/
|
|
9685
9866
|
async _initMaterializedViews(handles) {
|
|
9686
9867
|
if (handles.length === 0) return;
|
|
9687
|
-
const { MaterializedViewRegistry } = await import("./registry-
|
|
9868
|
+
const { MaterializedViewRegistry } = await import("./registry-BIMICFUH.js");
|
|
9688
9869
|
const registry = new MaterializedViewRegistry();
|
|
9689
9870
|
this.materializedViewRegistry = registry;
|
|
9690
9871
|
const db = this;
|
|
@@ -9709,7 +9890,7 @@ var Vault = class {
|
|
|
9709
9890
|
*/
|
|
9710
9891
|
async _initOverlayedViews(handles) {
|
|
9711
9892
|
if (handles.length === 0) return;
|
|
9712
|
-
const { OverlayedViewRegistry } = await import("./registry-
|
|
9893
|
+
const { OverlayedViewRegistry } = await import("./registry-W327UNYH.js");
|
|
9713
9894
|
const registry = new OverlayedViewRegistry();
|
|
9714
9895
|
const mvRegistry = this.materializedViewRegistry;
|
|
9715
9896
|
const overlayNames = /* @__PURE__ */ new Set();
|
|
@@ -9772,14 +9953,14 @@ var Vault = class {
|
|
|
9772
9953
|
if (!reg) {
|
|
9773
9954
|
throw new Error(`refreshView: no MV registered with name "${name}"`);
|
|
9774
9955
|
}
|
|
9775
|
-
const { MaterializedViewExecutor } = await import("./executor-
|
|
9956
|
+
const { MaterializedViewExecutor } = await import("./executor-SNHW4ELF.js");
|
|
9776
9957
|
const result = await MaterializedViewExecutor.refresh(reg, {
|
|
9777
9958
|
getCollection: (n) => this.collection(n),
|
|
9778
9959
|
getActiveTxContext: () => this.noydb._activeTxContextOrNull,
|
|
9779
9960
|
getQueryContext: () => this,
|
|
9780
9961
|
dispatchCtx: this._dispatchCtx({ collection: name, id: "refreshView" })
|
|
9781
9962
|
});
|
|
9782
|
-
const { clearMVStaleFully } = await import("./stale-
|
|
9963
|
+
const { clearMVStaleFully } = await import("./stale-CROGJBIJ.js");
|
|
9783
9964
|
await clearMVStaleFully(this.adapter, this.name, registry, name);
|
|
9784
9965
|
return result;
|
|
9785
9966
|
}
|
|
@@ -9792,7 +9973,7 @@ var Vault = class {
|
|
|
9792
9973
|
if (registry === null) return { derived: 0, failed: 0, skippedFrozen: 0 };
|
|
9793
9974
|
const strategies = registry.strategiesForSource(sourceCollection);
|
|
9794
9975
|
if (strategies.length === 0) return { derived: 0, failed: 0, skippedFrozen: 0 };
|
|
9795
|
-
const { DerivationExecutor } = await import("./executor-
|
|
9976
|
+
const { DerivationExecutor } = await import("./executor-Z3IKK7G3.js");
|
|
9796
9977
|
const sourceColl = this.collection(sourceCollection);
|
|
9797
9978
|
const records = await sourceColl.list();
|
|
9798
9979
|
const ctx = { vault: this.derivationFacade ?? new (await import("./read-only-facade-BIGO37U3.js")).ReadOnlyVaultFacade(this, "derivation") };
|
|
@@ -9819,7 +10000,7 @@ var Vault = class {
|
|
|
9819
10000
|
if (!outSpec) continue;
|
|
9820
10001
|
const outputColl = this.collection(outSpec.collection);
|
|
9821
10002
|
if (out.kind === "array") {
|
|
9822
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
10003
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-FYDRL7F3.js");
|
|
9823
10004
|
const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key, this.getDEK, this.encrypted);
|
|
9824
10005
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
9825
10006
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -10046,24 +10227,16 @@ var Vault = class {
|
|
|
10046
10227
|
* collection.
|
|
10047
10228
|
*/
|
|
10048
10229
|
async delegate(opts) {
|
|
10049
|
-
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
10230
|
+
const { issueDelegation, DELEGATIONS_COLLECTION: DELEGATIONS_COLLECTION2 } = await import("./delegation-7SSGIETH.js");
|
|
10050
10231
|
if (!this.keyring.kek) {
|
|
10051
10232
|
throw new ValidationError(
|
|
10052
10233
|
"issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (secret) first."
|
|
10053
10234
|
);
|
|
10054
10235
|
}
|
|
10055
|
-
const
|
|
10056
|
-
|
|
10057
|
-
return issueDelegation(
|
|
10058
|
-
this.adapter,
|
|
10059
|
-
this.name,
|
|
10060
|
-
this.keyring,
|
|
10061
|
-
targetKek,
|
|
10062
|
-
delegationsDek,
|
|
10063
|
-
opts
|
|
10064
|
-
);
|
|
10236
|
+
const delegationsDek = await this.getDEK(DELEGATIONS_COLLECTION2);
|
|
10237
|
+
return issueDelegation(this.adapter, this.name, this.keyring, delegationsDek, opts);
|
|
10065
10238
|
}
|
|
10066
|
-
/** Merge live delegations into the keyring — core#56's read half
|
|
10239
|
+
/** 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. */
|
|
10067
10240
|
async refreshDelegations(now) {
|
|
10068
10241
|
return this.strategies.tiers.refreshDelegations({ vault: this.name, adapter: this.adapter, keyring: this.keyring }, now);
|
|
10069
10242
|
}
|
|
@@ -10072,9 +10245,9 @@ var Vault = class {
|
|
|
10072
10245
|
* if the id does not exist.
|
|
10073
10246
|
*/
|
|
10074
10247
|
async revokeDelegation(id) {
|
|
10075
|
-
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
10248
|
+
const { revokeDelegation, DELEGATIONS_COLLECTION: DELEGATIONS_COLLECTION2 } = await import("./delegation-7SSGIETH.js");
|
|
10076
10249
|
await revokeDelegation(this.adapter, this.name, id);
|
|
10077
|
-
await this.onDirty?.(
|
|
10250
|
+
await this.onDirty?.(DELEGATIONS_COLLECTION2, id, "delete", 1);
|
|
10078
10251
|
}
|
|
10079
10252
|
// ─── Scoped tier elevation ───────────────────────────
|
|
10080
10253
|
/**
|
|
@@ -10329,7 +10502,7 @@ var Vault = class {
|
|
|
10329
10502
|
* @see design-history/2026-05-22-schema-dump-design.md
|
|
10330
10503
|
*/
|
|
10331
10504
|
async dumpSchema(opts = {}) {
|
|
10332
|
-
const { dumpVaultSchema } = await import("./walk-
|
|
10505
|
+
const { dumpVaultSchema } = await import("./walk-3KEOL7BY.js");
|
|
10333
10506
|
return dumpVaultSchema(this, opts);
|
|
10334
10507
|
}
|
|
10335
10508
|
/**
|
|
@@ -10425,7 +10598,7 @@ var Vault = class {
|
|
|
10425
10598
|
* separate vault instances now.
|
|
10426
10599
|
*/
|
|
10427
10600
|
async getPodHandle() {
|
|
10428
|
-
const { buildPodHandle } = await import("./pod-handle-
|
|
10601
|
+
const { buildPodHandle } = await import("./pod-handle-GJLCOUGK.js");
|
|
10429
10602
|
return buildPodHandle(this.adapter, this.name);
|
|
10430
10603
|
}
|
|
10431
10604
|
/**
|
|
@@ -10457,7 +10630,7 @@ var Vault = class {
|
|
|
10457
10630
|
* both modes round-trip cleanly.
|
|
10458
10631
|
*/
|
|
10459
10632
|
async dump() {
|
|
10460
|
-
const { dumpVault } = await import("./backup-
|
|
10633
|
+
const { dumpVault } = await import("./backup-E3GBMNDA.js");
|
|
10461
10634
|
return dumpVault(this.backupContext());
|
|
10462
10635
|
}
|
|
10463
10636
|
/**
|
|
@@ -10466,6 +10639,11 @@ var Vault = class {
|
|
|
10466
10639
|
* collection-cache clear, ledger-store reset) that `load()` performs on this
|
|
10467
10640
|
* Vault's private state.
|
|
10468
10641
|
*/
|
|
10642
|
+
/** 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. */
|
|
10643
|
+
_enableSync(onDirty) {
|
|
10644
|
+
this.onDirty = onDirty;
|
|
10645
|
+
this.collectionCache.clear();
|
|
10646
|
+
}
|
|
10469
10647
|
/** core#82 — sync pulled a newer copy of THIS user's keyring file: reload it in place, rebuild the DEK resolver, drop cached collections. */
|
|
10470
10648
|
async _reloadKeyringAfterSync() {
|
|
10471
10649
|
await this.backupContext().reloadKeyringAndRebuildDEK();
|
|
@@ -10484,10 +10662,18 @@ var Vault = class {
|
|
|
10484
10662
|
this.getDEK = this.makeGetDEK();
|
|
10485
10663
|
}
|
|
10486
10664
|
},
|
|
10487
|
-
|
|
10665
|
+
// core#122 — invalidate the instances BEFORE dropping the map. A handle
|
|
10666
|
+
// the caller already holds is one of these objects, so clearing the map
|
|
10667
|
+
// alone fixes the next `vault.collection()` and leaves the caller reading
|
|
10668
|
+
// pre-restore data from the handle they were told to use.
|
|
10669
|
+
clearCollectionCache: () => {
|
|
10670
|
+
for (const c of this.collectionCache.values()) c._invalidateAfterRestore();
|
|
10671
|
+
this.collectionCache.clear();
|
|
10672
|
+
},
|
|
10488
10673
|
resetLedgerStore: () => {
|
|
10489
10674
|
this.ledgerStore = null;
|
|
10490
10675
|
},
|
|
10676
|
+
...this.onRestore !== void 0 ? { resetSync: this.onRestore } : {},
|
|
10491
10677
|
exportStream: (opts) => this.exportStream(opts)
|
|
10492
10678
|
};
|
|
10493
10679
|
}
|
|
@@ -10513,9 +10699,38 @@ var Vault = class {
|
|
|
10513
10699
|
* with a console warning and skip the integrity check entirely
|
|
10514
10700
|
* — there's no chain to verify against.
|
|
10515
10701
|
*/
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10702
|
+
/**
|
|
10703
|
+
* core#76 — restore this vault to its state at `timestamp`, as FORWARD
|
|
10704
|
+
* WRITES. Every record whose state at T differs from its state now is put
|
|
10705
|
+
* back at T's value; every record that exists now and did not exist at T is
|
|
10706
|
+
* deleted.
|
|
10707
|
+
*
|
|
10708
|
+
* ⭐ The writes go through `Collection.put`/`.delete`, so guards, periods,
|
|
10709
|
+
* history and the ledger all see them. The restore is therefore an audited,
|
|
10710
|
+
* reversible event that replicates through ordinary sync — no pod, and none
|
|
10711
|
+
* of the state-replacement machinery core#71/#72 exists to make safe.
|
|
10712
|
+
*
|
|
10713
|
+
* `{ dryRun: true }` returns the same report having written nothing.
|
|
10714
|
+
*
|
|
10715
|
+
* ⚠️ Bounded by history retention, and ⛔ blobs are not restored — see the
|
|
10716
|
+
* module header on `with-commit/history/restore-to.ts`, which states both
|
|
10717
|
+
* limits and why the blob one is not reported rather than reported empty.
|
|
10718
|
+
*/
|
|
10719
|
+
async restoreTo(timestamp, options) {
|
|
10720
|
+
const iso = timestamp instanceof Date ? timestamp.toISOString() : timestamp;
|
|
10721
|
+
const { restoreTo } = await import("./restore-to-OOPKLAPU.js");
|
|
10722
|
+
const instant = this.at(iso);
|
|
10723
|
+
return restoreTo({
|
|
10724
|
+
adapter: this.adapter,
|
|
10725
|
+
vault: this.name,
|
|
10726
|
+
instantCollection: (name) => instant.collection(name),
|
|
10727
|
+
liveCollection: (name) => this.collection(name),
|
|
10728
|
+
liveCollectionNames: async () => Object.keys(await this.adapter.loadAll(this.name))
|
|
10729
|
+
}, iso, options);
|
|
10730
|
+
}
|
|
10731
|
+
async load(backupJson, options) {
|
|
10732
|
+
const { loadVault } = await import("./backup-E3GBMNDA.js");
|
|
10733
|
+
return loadVault(this.backupContext(), backupJson, options);
|
|
10519
10734
|
}
|
|
10520
10735
|
/**
|
|
10521
10736
|
* End-to-end backup integrity check. Runs both:
|
|
@@ -10546,7 +10761,7 @@ var Vault = class {
|
|
|
10546
10761
|
* way to detect tampering of an in-place vault.
|
|
10547
10762
|
*/
|
|
10548
10763
|
async verifyBackupIntegrity() {
|
|
10549
|
-
const { verifyBackupIntegrity } = await import("./backup-
|
|
10764
|
+
const { verifyBackupIntegrity } = await import("./backup-E3GBMNDA.js");
|
|
10550
10765
|
return verifyBackupIntegrity(this.backupContext());
|
|
10551
10766
|
}
|
|
10552
10767
|
/**
|
|
@@ -10776,7 +10991,7 @@ var Vault = class {
|
|
|
10776
10991
|
* is the live validator object, not a serialization of it).
|
|
10777
10992
|
*/
|
|
10778
10993
|
async exportJSON(opts = {}) {
|
|
10779
|
-
const { exportVaultJSON } = await import("./backup-
|
|
10994
|
+
const { exportVaultJSON } = await import("./backup-E3GBMNDA.js");
|
|
10780
10995
|
return exportVaultJSON(this.backupContext(), opts);
|
|
10781
10996
|
}
|
|
10782
10997
|
};
|
|
@@ -11790,6 +12005,9 @@ var TeamFacade = class {
|
|
|
11790
12005
|
if (this.deps.options.periodsStrategy !== void 0) {
|
|
11791
12006
|
await (await ensureCollectionDEK(this.deps.options.store, vault, keyring))(PERIODS_COLLECTION);
|
|
11792
12007
|
}
|
|
12008
|
+
if (this.deps.options.tiersStrategy !== void 0) {
|
|
12009
|
+
await (await ensureCollectionDEK(this.deps.options.store, vault, keyring))(DELEGATIONS_COLLECTION);
|
|
12010
|
+
}
|
|
11793
12011
|
await engine(this.deps.options.store, vault, keyring, options);
|
|
11794
12012
|
}
|
|
11795
12013
|
/** Gate + run a `revoke` engine. See `Noydb.revoke` for the public contract. */
|
|
@@ -11797,7 +12015,7 @@ var TeamFacade = class {
|
|
|
11797
12015
|
this.deps.checkPolicyOperation(vault, "revoke");
|
|
11798
12016
|
await this.deps.checkGate(vault, "revoke-user", factors);
|
|
11799
12017
|
const keyring = await this.deps.getKeyringInternal(vault);
|
|
11800
|
-
|
|
12018
|
+
return engine(this.deps.options.store, vault, keyring, options);
|
|
11801
12019
|
}
|
|
11802
12020
|
/** Gate + run a `rotateKeys` engine. See `Noydb.rotate` for the public contract. */
|
|
11803
12021
|
async runRotate(engine, vault, collections) {
|
|
@@ -11928,6 +12146,7 @@ var TeamFacade = class {
|
|
|
11928
12146
|
* meta: {
|
|
11929
12147
|
* credentialId: e.credentialId,
|
|
11930
12148
|
* wrapIv: e.wrapIv,
|
|
12149
|
+
* rpId: e.rpId,
|
|
11931
12150
|
* prfUsed: e.prfUsed,
|
|
11932
12151
|
* beFlag: e.beFlag,
|
|
11933
12152
|
* requireSingleDevice: e.requireSingleDevice,
|
|
@@ -11936,6 +12155,15 @@ var TeamFacade = class {
|
|
|
11936
12155
|
* })
|
|
11937
12156
|
* ```
|
|
11938
12157
|
*
|
|
12158
|
+
* `meta` is a free-form blob — hub validates `credentialId` and nothing
|
|
12159
|
+
* else, so this example IS the contract for what a slot carries. Record
|
|
12160
|
+
* `rpId` (core#140): the slot rewrap / rotation ceremony falls back to
|
|
12161
|
+
* `meta.rpId` when the caller passes no `options.rpId` and the enrollment
|
|
12162
|
+
* record predates `WebAuthnEnrollment.rpId`. Omitting it does not break
|
|
12163
|
+
* single-hostname deployments — absence correctly reads as "send no RP ID"
|
|
12164
|
+
* — but on a shared registrable domain rotation then works only if every
|
|
12165
|
+
* caller remembers to pass the RP ID by hand.
|
|
12166
|
+
*
|
|
11939
12167
|
* Returns the WebAuthn `credentialId` (extracted from `meta.credentialId`)
|
|
11940
12168
|
* for the caller's lookup index (a bootstrap vault, a Cover,
|
|
11941
12169
|
* a server-side allowlist).
|
|
@@ -12377,6 +12605,7 @@ var TeamFacade = class {
|
|
|
12377
12605
|
*/
|
|
12378
12606
|
async recoverUser(vault, options, factors) {
|
|
12379
12607
|
await this.deps.checkGate(vault, "peer-recover-user", factors);
|
|
12608
|
+
await this.deps.refreshRoster(vault, options.userId);
|
|
12380
12609
|
const callerKeyring = await this.deps.getKeyringInternal(vault);
|
|
12381
12610
|
await recoverUser(this.deps.options.store, vault, callerKeyring, options);
|
|
12382
12611
|
await this.deps.enrolBrokerMember(vault, { userId: options.userId, secret: options.secret });
|
|
@@ -12588,6 +12817,8 @@ var Noydb = class {
|
|
|
12588
12817
|
vaultOpening = /* @__PURE__ */ new Map();
|
|
12589
12818
|
keyringCache = /* @__PURE__ */ new Map();
|
|
12590
12819
|
syncEngines = /* @__PURE__ */ new Map();
|
|
12820
|
+
/** core#90 — conflict resolvers registered per vault, replayed onto a target attached after open. */
|
|
12821
|
+
conflictResolvers = /* @__PURE__ */ new Map();
|
|
12591
12822
|
/**
|
|
12592
12823
|
* Per-vault active session tier — defaults to `1` after a secret
|
|
12593
12824
|
* unlock; tier-2 / tier-3 unlocks downgrade it. Used by
|
|
@@ -12627,10 +12858,10 @@ var Noydb = class {
|
|
|
12627
12858
|
/**
|
|
12628
12859
|
* Opt-in sovereign-custody (FR-6) strategy — `NO_CUSTODY` (throwing) unless
|
|
12629
12860
|
* `withCustody()` was passed. Kept as a public accessor because `Vault`
|
|
12630
|
-
* routes `vault.custody.liberate` through `this.noydb.
|
|
12861
|
+
* routes `vault.custody.liberate` through `this.noydb._custodyStrategy`.
|
|
12631
12862
|
* @internal
|
|
12632
12863
|
*/
|
|
12633
|
-
get
|
|
12864
|
+
get _custodyStrategy() {
|
|
12634
12865
|
return this.strategies.custody;
|
|
12635
12866
|
}
|
|
12636
12867
|
snapshots;
|
|
@@ -12725,6 +12956,7 @@ var Noydb = class {
|
|
|
12725
12956
|
checkPolicyOperation: (vault, op) => this.checkPolicyOperation(vault, op),
|
|
12726
12957
|
getKeyringInternal: (vault, opts) => this._getKeyringInternal(vault, opts),
|
|
12727
12958
|
enrolBrokerMember: (vault, member) => this.#enrolBrokerMember(vault, member),
|
|
12959
|
+
refreshRoster: (vault, userId) => this.#refreshRoster(vault, userId),
|
|
12728
12960
|
assertRecoveryEnrolled: (vault, policy, opts) => this.assertRecoveryEnrolled(vault, policy, opts),
|
|
12729
12961
|
openVault: (vault, opts) => this.openVault(vault, opts),
|
|
12730
12962
|
setSkipNextManagedRecoveryCheck: (value) => {
|
|
@@ -12833,9 +13065,9 @@ var Noydb = class {
|
|
|
12833
13065
|
}
|
|
12834
13066
|
const facade = v._getReadOnlyFacade();
|
|
12835
13067
|
if (!facade) return;
|
|
12836
|
-
const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
|
|
13068
|
+
const ctx = { existing, vault: facade, userId: e.userId, role: e.role, ...e.origin !== void 0 ? { origin: e.origin } : {} };
|
|
12837
13069
|
await registry.runChecks(e.collection, incoming, ctx);
|
|
12838
|
-
const { GuardExecutor } = await import("./executor-
|
|
13070
|
+
const { GuardExecutor } = await import("./executor-7SY3M6TZ.js");
|
|
12839
13071
|
for (const g of guards) {
|
|
12840
13072
|
await GuardExecutor.checkFrozenFields(g, e.docId, existing, incoming, e.computedFieldNames);
|
|
12841
13073
|
}
|
|
@@ -12859,7 +13091,7 @@ var Noydb = class {
|
|
|
12859
13091
|
if (e.internal) return;
|
|
12860
13092
|
const facade = v._getReadOnlyFacade();
|
|
12861
13093
|
if (!facade) return;
|
|
12862
|
-
const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
|
|
13094
|
+
const ctx = { existing, vault: facade, userId: e.userId, role: e.role, ...e.origin !== void 0 ? { origin: e.origin } : {} };
|
|
12863
13095
|
await registry.runOnDelete(e.collection, existing ?? {}, ctx);
|
|
12864
13096
|
});
|
|
12865
13097
|
}
|
|
@@ -12963,11 +13195,13 @@ var Noydb = class {
|
|
|
12963
13195
|
if (this.options.encrypt !== false && !this.policyCache.has(name)) {
|
|
12964
13196
|
await this.bootstrapPolicy(name);
|
|
12965
13197
|
}
|
|
12966
|
-
const mergeAuthority = buildMergeAuthority(keyring);
|
|
13198
|
+
const mergeAuthority = buildMergeAuthority(() => this.keyringCache.get(name) ?? keyring);
|
|
12967
13199
|
let syncEngine;
|
|
12968
13200
|
const targets = normalizeSyncTargets(this.options.sync);
|
|
13201
|
+
const primaryTarget = targets.find((t) => t.role === "sync-peer") ?? targets[0];
|
|
13202
|
+
const primaryStore = primaryTarget?.store;
|
|
12969
13203
|
if (targets.length > 0) {
|
|
12970
|
-
const primary =
|
|
13204
|
+
const primary = primaryTarget;
|
|
12971
13205
|
const declaredPolicy = this.options.syncPolicy ?? primary.policy;
|
|
12972
13206
|
const effectivePolicy = declaredPolicy ?? INDEXED_STORE_POLICY;
|
|
12973
13207
|
syncEngine = this.strategies.sync.buildSyncEngine({
|
|
@@ -13008,16 +13242,26 @@ var Noydb = class {
|
|
|
13008
13242
|
keyring,
|
|
13009
13243
|
encrypted: this.options.encrypt !== false,
|
|
13010
13244
|
emitter: this.emitter,
|
|
13011
|
-
onDirty
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13245
|
+
// `onDirty` PRESENCE is Collection's sync-mode flag (delete markers instead of
|
|
13246
|
+
// physical deletes, #1439's memo gate), so it stays gated on a target existing;
|
|
13247
|
+
// the first `attachSyncTarget()` on a target-less vault switches it on (core#90).
|
|
13248
|
+
onDirty: targets.length > 0 ? this.#dirtyFanout(name) : void 0,
|
|
13249
|
+
// Recorded per vault so a target attached later (core#90) is registered too.
|
|
13250
|
+
onRegisterConflictResolver: (resolverName, resolver) => {
|
|
13251
|
+
let m = this.conflictResolvers.get(name);
|
|
13252
|
+
if (!m) {
|
|
13253
|
+
m = /* @__PURE__ */ new Map();
|
|
13254
|
+
this.conflictResolvers.set(name, m);
|
|
13017
13255
|
}
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13256
|
+
m.set(resolverName, resolver);
|
|
13257
|
+
this._forEachSyncEngine(name, (e) => e.registerConflictResolver(resolverName, resolver));
|
|
13258
|
+
},
|
|
13259
|
+
// core#139 — the SAME selector the record-sync engine uses, not `targets[0]`.
|
|
13260
|
+
// Presence is published to this store and polled back from it, so on
|
|
13261
|
+
// `[{backup}, {sync-peer}]` the positional read sent presence to a
|
|
13262
|
+
// push-only archive target — quietly, since a presence write that nobody
|
|
13263
|
+
// reads back degrades instead of throwing.
|
|
13264
|
+
syncAdapter: primaryStore,
|
|
13021
13265
|
getPurgeableTargets: () => targets.filter((t) => t.role === "backup" || t.role === "archive").map((t) => ({ store: t.store, role: t.role, ...t.label !== void 0 ? { label: t.label } : {} })),
|
|
13022
13266
|
historyConfig: this.options.history,
|
|
13023
13267
|
// #838 — the 21 conditional strategy spreads that used to live here are
|
|
@@ -13031,29 +13275,45 @@ var Noydb = class {
|
|
|
13031
13275
|
locale: opts?.locale,
|
|
13032
13276
|
...opts?.meta !== void 0 ? { meta: opts.meta } : {},
|
|
13033
13277
|
// Thread the translator hook so Collection.put() can invoke it
|
|
13034
|
-
plaintextTranslator: this.options.plaintextTranslator ? (text, from, to, field, collection) => this.
|
|
13278
|
+
plaintextTranslator: this.options.plaintextTranslator ? (text, from, to, field, collection) => this._invokeTranslator(text, from, to, field, collection) : void 0,
|
|
13035
13279
|
// Refresh callback used by Vault.load() to re-derive
|
|
13036
13280
|
// the in-memory keyring from a freshly-loaded keyring file.
|
|
13037
13281
|
// Encrypted compartments need this so post-load decrypts work
|
|
13038
13282
|
// against the loaded session's wrapped DEKs; plaintext
|
|
13039
13283
|
// compartments leave it null and load() skips the refresh.
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
const
|
|
13043
|
-
|
|
13044
|
-
|
|
13284
|
+
// core#71 — a restore resets every engine attached to this vault.
|
|
13285
|
+
onRestore: async () => {
|
|
13286
|
+
const engines = [];
|
|
13287
|
+
this._forEachSyncEngine(name, (e) => {
|
|
13288
|
+
engines.push(e);
|
|
13045
13289
|
});
|
|
13290
|
+
for (const e of engines) await e.resetAfterRestore();
|
|
13291
|
+
},
|
|
13292
|
+
reloadKeyring: this.options.encrypt !== false ? async () => {
|
|
13293
|
+
const held = this.keyringCache.get(name)?.kek ?? null;
|
|
13294
|
+
const secret = this.options.secret;
|
|
13295
|
+
if (!held && !secret) {
|
|
13296
|
+
throw new ValidationError(
|
|
13297
|
+
`reloadKeyring: vault "${name}" holds no KEK (tier-2 or session open) \u2014 reopen the vault to adopt the roster change.`
|
|
13298
|
+
);
|
|
13299
|
+
}
|
|
13300
|
+
this.keyringCache.delete(name);
|
|
13301
|
+
let refreshed;
|
|
13302
|
+
try {
|
|
13303
|
+
refreshed = await loadKeyring(this.options.store, name, {
|
|
13304
|
+
userId: this.options.user,
|
|
13305
|
+
...held ? { kek: held } : { secret }
|
|
13306
|
+
});
|
|
13307
|
+
} catch (err) {
|
|
13308
|
+
if (!(err instanceof InvalidKeyError) || !held || !secret) throw err;
|
|
13309
|
+
refreshed = await loadKeyring(this.options.store, name, { userId: this.options.user, secret });
|
|
13310
|
+
}
|
|
13046
13311
|
this.keyringCache.set(name, refreshed);
|
|
13047
13312
|
return refreshed;
|
|
13048
13313
|
} : void 0
|
|
13049
13314
|
});
|
|
13050
13315
|
this._forEachSyncEngine(name, (engine) => {
|
|
13051
|
-
|
|
13052
|
-
engine.setGraphBatchController({ begin: () => comp._beginGraphBatch(), flush: () => comp._flushGraphBatch() });
|
|
13053
|
-
engine.setReservedLookupSource({ collections: () => comp._reservedLookupCollectionNames() });
|
|
13054
|
-
engine.setReservedDictExpander((names) => comp._reservedDictDepsOf(names));
|
|
13055
|
-
engine.setPeriodPullSource({ periods: () => comp.listPeriods() });
|
|
13056
|
-
engine.setRosterReload({ userId: this.options.user, reload: () => comp._reloadKeyringAfterSync() });
|
|
13316
|
+
wireEngine(this.#wiring, name, comp, engine);
|
|
13057
13317
|
});
|
|
13058
13318
|
await comp._initGuards(this.options.guardStrategies ?? []);
|
|
13059
13319
|
await comp._initDerivations(this.options.derivationStrategies ?? []);
|
|
@@ -13086,6 +13346,13 @@ var Noydb = class {
|
|
|
13086
13346
|
/**
|
|
13087
13347
|
* Grant access to a user for a vault.
|
|
13088
13348
|
*
|
|
13349
|
+
* ⚠️ On an EXISTING user this RE-KEYS them: a new KEK from `secret`,
|
|
13350
|
+
* authenticator slots dropped, the file overwritten. So it needs the
|
|
13351
|
+
* member's CURRENT secret — after `acceptInvite` or `rotateSecret` an
|
|
13352
|
+
* owner never holds it, and a re-grant with a stale one locks the member
|
|
13353
|
+
* out. To change what an existing member may do, use `updateUser`
|
|
13354
|
+
* (core#96); re-grant only to re-key, with a fresh temporary secret.
|
|
13355
|
+
*
|
|
13089
13356
|
* Gated by `enroll-user`. `STRICT_POLICY` requires a TOTP / email-OTP
|
|
13090
13357
|
* factor proof so the operator affirmatively re-asserts identity at
|
|
13091
13358
|
* the moment of grant; `PERSONAL_POLICY` accepts a tier-1 unlock alone.
|
|
@@ -13095,9 +13362,26 @@ var Noydb = class {
|
|
|
13095
13362
|
* Opt-in (#267): throws {@link TeamNotEnabledError} without `withTeam()`.
|
|
13096
13363
|
*/
|
|
13097
13364
|
async grant(vault, options, factors) {
|
|
13365
|
+
await this.#refreshRoster(vault, options.userId);
|
|
13098
13366
|
await this.strategies.team.grant(this.team, vault, options, factors);
|
|
13099
13367
|
await this.#enrolBrokerMember(vault, { userId: options.userId, secret: options.secret });
|
|
13100
13368
|
}
|
|
13369
|
+
/**
|
|
13370
|
+
* core#96 (pilot-1, finding B) — before an AUTHORITY edit of a member's
|
|
13371
|
+
* keyring, bring that file down from every sync target that supersedes
|
|
13372
|
+
* ours. The roster replicates by epoch ("higher wins"), so an edit made on a
|
|
13373
|
+
* stale local copy would push as the loser and be discarded; refreshing
|
|
13374
|
+
* first makes the edit land on the current file. One GET per target; a
|
|
13375
|
+
* target that cannot be reached fails the edit (fail-closed — the edit
|
|
13376
|
+
* would otherwise be a silent no-op on that target).
|
|
13377
|
+
*/
|
|
13378
|
+
async #refreshRoster(vault, userId) {
|
|
13379
|
+
const engines = [];
|
|
13380
|
+
this._forEachSyncEngine(vault, (e) => {
|
|
13381
|
+
engines.push(e);
|
|
13382
|
+
});
|
|
13383
|
+
for (const e of engines) await e.refreshKeyring(userId);
|
|
13384
|
+
}
|
|
13101
13385
|
/** core#73 — register a (re-)granted or recovered sub-admin member with the broker host; a no-op without a broker. */
|
|
13102
13386
|
async #enrolBrokerMember(vault, member) {
|
|
13103
13387
|
await this.strategies.broker.enrolMember({ store: this.options.store, vault, keyring: await this._getKeyringInternal(vault) }, member);
|
|
@@ -13113,11 +13397,14 @@ var Noydb = class {
|
|
|
13113
13397
|
* Opt-in (#267): throws {@link TeamNotEnabledError} without `withTeam()`.
|
|
13114
13398
|
*/
|
|
13115
13399
|
async revoke(vault, options, factors) {
|
|
13116
|
-
await this
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13400
|
+
await this.#refreshRoster(vault, options.userId);
|
|
13401
|
+
const { rewritten } = await this.strategies.team.revoke(this.team, vault, options, factors);
|
|
13402
|
+
await this.#trackRewrites(vault, rewritten);
|
|
13403
|
+
await this.options.store.delete(vault, "_users", options.userId);
|
|
13120
13404
|
await this.strategies.broker.revokeMember({ store: this.options.store, vault, keyring: await this._getKeyringInternal(vault) }, options.userId);
|
|
13405
|
+
for (const coll of ["_keyring", "_users", "_broker_member"]) {
|
|
13406
|
+
await Promise.all([...this.syncEngines].filter(([k]) => k === vault || k.startsWith(`${vault}::`)).map(([, e]) => e.trackChange(coll, options.userId, "delete", 1)));
|
|
13407
|
+
}
|
|
13121
13408
|
}
|
|
13122
13409
|
/**
|
|
13123
13410
|
* Grant the FR-6 `custodian` role to a user (owner-only custody API).
|
|
@@ -13158,24 +13445,39 @@ var Noydb = class {
|
|
|
13158
13445
|
await this.checkGate(vault, "revoke-user", factors);
|
|
13159
13446
|
const keyring = await this._getKeyringInternal(vault);
|
|
13160
13447
|
if (keyring.role !== "owner") throw new PermissionDeniedError("only the Deed owner can revoke a custodian");
|
|
13161
|
-
await engine(this.options.store, vault, keyring, options);
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
* `displayName`, and/or
|
|
13166
|
-
*
|
|
13167
|
-
*
|
|
13448
|
+
const { rewritten } = await engine(this.options.store, vault, keyring, options);
|
|
13449
|
+
await this.#trackRewrites(vault, rewritten);
|
|
13450
|
+
}
|
|
13451
|
+
/**
|
|
13452
|
+
* Change what an EXISTING member may do — `role`, `displayName`, and/or
|
|
13453
|
+
* `permissions` — without holding their secret. The member's KEK, salt
|
|
13454
|
+
* and authenticator slots are untouched; tier-2 enrollments and recovery
|
|
13455
|
+
* codes survive.
|
|
13456
|
+
*
|
|
13457
|
+
* core#96 — the keys follow the header. A change that widens access
|
|
13458
|
+
* delivers the DEKs the member lacks through their keyring INBOX
|
|
13459
|
+
* (sealed to a per-member key pair only their KEK opens; drained at
|
|
13460
|
+
* their next tier-1 unlock, or at the next pull of an open session). A
|
|
13461
|
+
* change that narrows access drops the DEKs and rotates those
|
|
13462
|
+
* collections, as a narrowing `grant` does (#1097). A role change
|
|
13463
|
+
* re-registers the member with a configured broker host under a fresh
|
|
13464
|
+
* `_broker_member` key. This is the widening path: `db.grant` on an
|
|
13465
|
+
* existing user RE-KEYS them from `secret`, so it needs their CURRENT
|
|
13466
|
+
* secret — after `acceptInvite` or `rotateSecret` an owner never holds it.
|
|
13168
13467
|
*
|
|
13169
13468
|
* Different from `db.revoke + db.grant`:
|
|
13170
13469
|
*
|
|
13171
|
-
* - Same `userId`, same
|
|
13172
|
-
* `_users/<keyringId>` envelope.
|
|
13173
|
-
*
|
|
13470
|
+
* - Same `userId`, same KEK, same `granted_by`, same
|
|
13471
|
+
* `_users/<keyringId>` envelope. Last-write-wins via the standard
|
|
13472
|
+
* keyring put.
|
|
13174
13473
|
* - No cascade on role demotion (admins demoted to operator keep
|
|
13175
13474
|
* the keyrings they previously granted; the cascade rules are
|
|
13176
13475
|
* a `db.revoke` concern, not `db.updateUser`).
|
|
13177
13476
|
* - Tier-2 slots NOT dropped — the wrapping is unaffected.
|
|
13178
13477
|
*
|
|
13478
|
+
* @throws `MemberInboxMissingError` when a DEK must be delivered to a
|
|
13479
|
+
* member whose keyring predates inboxes — re-grant them once.
|
|
13480
|
+
*
|
|
13179
13481
|
* Role-elevation guard: BOTH the old and new role must satisfy
|
|
13180
13482
|
* `db.grant`'s hierarchy. Owner can do anything; admin manages
|
|
13181
13483
|
* admin/operator/viewer/client laterally; admin cannot promote to
|
|
@@ -13196,14 +13498,60 @@ var Noydb = class {
|
|
|
13196
13498
|
* }, { factors: [{ kind: 'totp' }] })
|
|
13197
13499
|
* ```
|
|
13198
13500
|
*
|
|
13501
|
+
* ## ⚠️ A NARROWING DOES NOT REACH A SESSION THAT IS ALREADY OPEN
|
|
13502
|
+
*
|
|
13503
|
+
* This writes the target's keyring. It cannot reach into a `Noydb` the
|
|
13504
|
+
* target already has open: an eager collection holds the records it
|
|
13505
|
+
* hydrated, and nothing polls the keyring, so that session keeps serving
|
|
13506
|
+
* rows it read while it still had the key. A FRESH open throws
|
|
13507
|
+
* `NoAccessError` correctly (core#101), and so does that session for any
|
|
13508
|
+
* collection it had not already hydrated.
|
|
13509
|
+
*
|
|
13510
|
+
* ⭐ A long-lived admin console — one holding a vault open while changing
|
|
13511
|
+
* somebody's permissions — must RE-OPEN the affected session rather than
|
|
13512
|
+
* expect its next read to start failing.
|
|
13513
|
+
*
|
|
13514
|
+
* ## What the window is, MEASURED — it is narrower than it sounds
|
|
13515
|
+
*
|
|
13516
|
+
* The consumer building that console asked the two questions a security
|
|
13517
|
+
* reviewer asks, and reasoning would have got both wrong in the cautious
|
|
13518
|
+
* direction. Measured on a synced vault, after `updateUser` narrowed the
|
|
13519
|
+
* member away and `rotate()` re-keyed:
|
|
13520
|
+
*
|
|
13521
|
+
* 1. **Records arriving AFTER the narrowing are not readable.** A `pull()`
|
|
13522
|
+
* into the open session brings the new roster, the session reloads its
|
|
13523
|
+
* keyring, and reads then throw `NoAccessError` — including for rows it
|
|
13524
|
+
* had already cached. ⭐ So with sync on, the window CLOSES at the next
|
|
13525
|
+
* pull; it is not open until re-open.
|
|
13526
|
+
* 2. **Writes are refused locally.** `put()` throws `ReadOnlyError` on the
|
|
13527
|
+
* narrowed collection — the record is never encrypted, never queued, and
|
|
13528
|
+
* `push()` carries nothing. Nothing reaches the remote to be judged, so
|
|
13529
|
+
* this does not even rest on the admission gate (core#74).
|
|
13530
|
+
*
|
|
13531
|
+
* ⛔ So it is not a confidentiality hole and not a write hole: no access is
|
|
13532
|
+
* gained, nothing new becomes readable, and nothing can be written. What
|
|
13533
|
+
* survives is a read of rows the session ALREADY HELD, on a device with no
|
|
13534
|
+
* sync or one that has not pulled since.
|
|
13535
|
+
*
|
|
13536
|
+
* ⚠️ Which is still the window that matters when a narrowing is
|
|
13537
|
+
* security-motivated rather than administrative — a departing member, a
|
|
13538
|
+
* suspected device. `rotate()` is the answer there and a console should
|
|
13539
|
+
* REQUIRE it for that case rather than offer it.
|
|
13540
|
+
*
|
|
13199
13541
|
* @throws `NoAccessError` when no keyring exists for the target.
|
|
13200
13542
|
* @throws `PermissionDeniedError` when the role hierarchy rejects.
|
|
13201
13543
|
* @throws `ValidationError` when no field is provided.
|
|
13202
13544
|
*/
|
|
13203
13545
|
async updateUser(vault, options, factors) {
|
|
13204
13546
|
await this.checkGate(vault, "update-user", factors);
|
|
13547
|
+
await this.#refreshRoster(vault, options.userId);
|
|
13205
13548
|
const keyring = await this._getKeyringInternal(vault);
|
|
13206
|
-
await updateKeyringIdentity(this.options.store, vault, keyring, options);
|
|
13549
|
+
const { roleChanged, brokerMemberDek } = await updateKeyringIdentity(this.options.store, vault, keyring, options);
|
|
13550
|
+
if (roleChanged) {
|
|
13551
|
+
const ctx = { store: this.options.store, vault, keyring };
|
|
13552
|
+
if (brokerMemberDek) await this.strategies.broker.enrolMember(ctx, { userId: options.userId, dek: brokerMemberDek });
|
|
13553
|
+
else if (await this.options.store.get(vault, "_broker_member", options.userId)) await this.strategies.broker.revokeMember(ctx, options.userId);
|
|
13554
|
+
}
|
|
13207
13555
|
if (options.userId === this.options.user) {
|
|
13208
13556
|
this.keyringCache.delete(vault);
|
|
13209
13557
|
}
|
|
@@ -13237,8 +13585,36 @@ var Noydb = class {
|
|
|
13237
13585
|
* reaching into internals. See `noy-db rotate` for the CLI wrapper.
|
|
13238
13586
|
* Opt-in (#267): throws {@link TeamNotEnabledError} without `withTeam()`.
|
|
13239
13587
|
*/
|
|
13588
|
+
/**
|
|
13589
|
+
* core#74 — the records this device's admission gate refused on pull
|
|
13590
|
+
* (`PullResult.rejected`, `sync:rejected`), parked under `_sync_rejected`
|
|
13591
|
+
* with the envelope intact. `list()` them; `readmit()` applies one after all
|
|
13592
|
+
* (bypassing the gate); `discard()` drops the parking record. Per device:
|
|
13593
|
+
* a refusal is local to the device that judged it.
|
|
13594
|
+
*/
|
|
13595
|
+
rejected(vault) {
|
|
13596
|
+
const engine = this.syncEngines.get(vault);
|
|
13597
|
+
if (!engine) throw new ValidationError(`rejected: vault "${vault}" has no sync target.`);
|
|
13598
|
+
return engine.rejected();
|
|
13599
|
+
}
|
|
13240
13600
|
async rotate(vault, collections) {
|
|
13241
|
-
|
|
13601
|
+
const result = await this.strategies.team.rotate(this.team, vault, collections);
|
|
13602
|
+
await this.#trackRewrites(vault, result.rewritten);
|
|
13603
|
+
return result;
|
|
13604
|
+
}
|
|
13605
|
+
/**
|
|
13606
|
+
* core#100 — a rotation re-encrypts records through the raw store, which the
|
|
13607
|
+
* sync dirty log cannot see; without this a replica kept the OLD ciphertext
|
|
13608
|
+
* until each record was edited again — a revoked member with store access
|
|
13609
|
+
* read on, and a survivor handed the new DEK read `TamperedError`.
|
|
13610
|
+
*/
|
|
13611
|
+
async #trackRewrites(vault, rewritten) {
|
|
13612
|
+
if (rewritten.length === 0) return;
|
|
13613
|
+
const engines = [];
|
|
13614
|
+
this._forEachSyncEngine(vault, (e) => {
|
|
13615
|
+
engines.push(e);
|
|
13616
|
+
});
|
|
13617
|
+
for (const e of engines) for (const r of rewritten) await e.trackChange(r.collection, r.id, "rekey", r.version);
|
|
13242
13618
|
}
|
|
13243
13619
|
/**
|
|
13244
13620
|
* Verify every `_keyring` file in the vault. Read-only (#1121).
|
|
@@ -13463,9 +13839,13 @@ var Noydb = class {
|
|
|
13463
13839
|
return results;
|
|
13464
13840
|
}
|
|
13465
13841
|
/**
|
|
13466
|
-
*
|
|
13467
|
-
*
|
|
13468
|
-
* `
|
|
13842
|
+
* True once `close()` has been called.
|
|
13843
|
+
*
|
|
13844
|
+
* ⭐ NOT `@internal`, and core#128 removed that tag rather than `_`-prefixing
|
|
13845
|
+
* this: the doc's own reason — "read by outward orchestration frameworks
|
|
13846
|
+
* whose entry points can't see the private `closed` field" — IS a public
|
|
13847
|
+
* contract. Prefixing it would have broken the readers it exists for. The
|
|
13848
|
+
* tag was the defect, not the name.
|
|
13469
13849
|
*/
|
|
13470
13850
|
get isClosed() {
|
|
13471
13851
|
return this.closed;
|
|
@@ -13523,6 +13903,20 @@ var Noydb = class {
|
|
|
13523
13903
|
async realign(vault) {
|
|
13524
13904
|
return this.getSyncEngine(vault).realign();
|
|
13525
13905
|
}
|
|
13906
|
+
/**
|
|
13907
|
+
* core#72 — make THIS device's vault authoritative on its primary target:
|
|
13908
|
+
* every local record is written unconditionally (re-versioned above the
|
|
13909
|
+
* target's copy where the target moved on), every id the target holds that
|
|
13910
|
+
* the local vault does not gets a delete marker, the reserved collections
|
|
13911
|
+
* are mirrored, and a new restore EPOCH is written on the target. Every
|
|
13912
|
+
* other device's next pull crosses that epoch: its unpushed edits are parked
|
|
13913
|
+
* (`db.rejected(vault)`, reason `restore-epoch`), its dirty log dropped, the
|
|
13914
|
+
* target adopted wholesale. The act of a restore (`vault.load` then this), or
|
|
13915
|
+
* of declaring one replica the truth. Owner/admin, ledgered by the pushes.
|
|
13916
|
+
*/
|
|
13917
|
+
async replaceRemote(vault) {
|
|
13918
|
+
return this.getSyncEngine(vault).replaceRemote();
|
|
13919
|
+
}
|
|
13526
13920
|
/**
|
|
13527
13921
|
* Bidirectional sync: pull then push for all targets.
|
|
13528
13922
|
* `sync-peer` targets do pull+push; `backup`/`archive` targets do push-only.
|
|
@@ -13599,7 +13993,7 @@ var Noydb = class {
|
|
|
13599
13993
|
}
|
|
13600
13994
|
/**
|
|
13601
13995
|
* Currently-running multi-record transaction, or `null` outside
|
|
13602
|
-
* Phase 2. `Collection.
|
|
13996
|
+
* Phase 2. `Collection._dispatchDerivations` consults this so a
|
|
13603
13997
|
* recursive derived-output write inside `Collection.put` can register
|
|
13604
13998
|
* its envelope onto `ctx._executed` and roll back with the main
|
|
13605
13999
|
* staged ops on mid-batch failure.
|
|
@@ -13667,9 +14061,9 @@ var Noydb = class {
|
|
|
13667
14061
|
const targets = [];
|
|
13668
14062
|
for (const [key, engine] of this.syncEngines) {
|
|
13669
14063
|
if (key !== vault && !key.startsWith(`${vault}::`)) continue;
|
|
13670
|
-
const { dirty, lastPush, lastPull, inFlight } = engine.status();
|
|
14064
|
+
const { dirty, lastPush, lastPull, inFlight, epoch } = engine.status();
|
|
13671
14065
|
const { label, role } = engine;
|
|
13672
|
-
targets.push({ label, role, dirty, lastPush, lastPull, caughtUp: dirty === 0, ...inFlight ? { inFlight } : {} });
|
|
14066
|
+
targets.push({ label, role, dirty, lastPush, lastPull, caughtUp: dirty === 0, ...inFlight ? { inFlight } : {}, ...epoch !== void 0 ? { epoch } : {} });
|
|
13673
14067
|
}
|
|
13674
14068
|
return targets;
|
|
13675
14069
|
}
|
|
@@ -13706,6 +14100,43 @@ var Noydb = class {
|
|
|
13706
14100
|
}
|
|
13707
14101
|
return engine;
|
|
13708
14102
|
}
|
|
14103
|
+
/** Dirty tracking fans out to every engine of the vault; 'revert' (satellite fan-out compensation, spec #591) un-dirties instead. */
|
|
14104
|
+
#dirtyFanout(name) {
|
|
14105
|
+
return async (coll, id, action, version) => {
|
|
14106
|
+
for (const [key, engine] of this.syncEngines) {
|
|
14107
|
+
if (key === name || key.startsWith(`${name}::`)) {
|
|
14108
|
+
if (action === "revert") void engine.removeDirty(coll, id);
|
|
14109
|
+
else void engine.trackChange(coll, id, action, version);
|
|
14110
|
+
}
|
|
14111
|
+
}
|
|
14112
|
+
};
|
|
14113
|
+
}
|
|
14114
|
+
/** core#90 — attach a sync target to an OPEN vault (primary when it had none, else keyed by position); records written before it are sent by `push({ full: true })`. Rationale in `kernel/sync-wiring.ts`. */
|
|
14115
|
+
async attachSyncTarget(vault, target) {
|
|
14116
|
+
const comp = this.vault(vault);
|
|
14117
|
+
const t = normalizeSyncTargets(target)[0];
|
|
14118
|
+
const declared = t.policy ?? this.options.syncPolicy;
|
|
14119
|
+
const keyring = await this._getKeyringInternal(vault);
|
|
14120
|
+
const engine = this.strategies.sync.buildSyncEngine({
|
|
14121
|
+
local: this.options.store,
|
|
14122
|
+
remote: t.store,
|
|
14123
|
+
vault,
|
|
14124
|
+
strategy: this.options.conflict ?? "version",
|
|
14125
|
+
emitter: this.emitter,
|
|
14126
|
+
syncPolicy: declared ?? INDEXED_STORE_POLICY,
|
|
14127
|
+
role: t.role,
|
|
14128
|
+
mergeAuthority: buildMergeAuthority(() => this.keyringCache.get(vault) ?? keyring),
|
|
14129
|
+
...t.label !== void 0 ? { label: t.label } : {}
|
|
14130
|
+
});
|
|
14131
|
+
const existing = [...this.syncEngines.keys()].filter((k) => k === vault || k.startsWith(`${vault}::`)).length;
|
|
14132
|
+
this.syncEngines.set(existing === 0 ? vault : `${vault}::${existing}`, engine);
|
|
14133
|
+
if (existing === 0) comp._enableSync(this.#dirtyFanout(vault));
|
|
14134
|
+
wireEngine(this.#wiring, vault, comp, engine);
|
|
14135
|
+
if (declared) engine.startScheduler();
|
|
14136
|
+
}
|
|
14137
|
+
get #wiring() {
|
|
14138
|
+
return { user: this.options.user, keyringCache: this.keyringCache, conflictResolvers: this.conflictResolvers };
|
|
14139
|
+
}
|
|
13709
14140
|
_forEachSyncEngine(vault, fn) {
|
|
13710
14141
|
for (const [key, engine] of this.syncEngines) if (key === vault || key.startsWith(`${vault}::`)) fn(engine);
|
|
13711
14142
|
}
|
|
@@ -13861,9 +14292,15 @@ var Noydb = class {
|
|
|
13861
14292
|
return this.sessionId;
|
|
13862
14293
|
}
|
|
13863
14294
|
/**
|
|
13864
|
-
*
|
|
13865
|
-
*
|
|
13866
|
-
*
|
|
14295
|
+
* Drain-barrier coordination transport for the schema fence. The default
|
|
14296
|
+
* store-backed provider reproduces today's fence behavior; a `by-*`
|
|
14297
|
+
* real-time transport is injected via the `mesh` option.
|
|
14298
|
+
*
|
|
14299
|
+
* ⭐ NOT `@internal`, and core#128 removed that tag rather than
|
|
14300
|
+
* `_`-prefixing this. `db.mesh` is documented as a public handle in
|
|
14301
|
+
* `port/by/index.ts` — "a `Noydb` handle (`db.mesh`) without ever naming a
|
|
14302
|
+
* `by-*` pack" — and `createNoydb({ mesh })` is a public option. The tag
|
|
14303
|
+
* contradicted both; prefixing would have broken the documented handle.
|
|
13867
14304
|
*/
|
|
13868
14305
|
get mesh() {
|
|
13869
14306
|
return this.meshPort;
|
|
@@ -13955,7 +14392,7 @@ var Noydb = class {
|
|
|
13955
14392
|
*
|
|
13956
14393
|
* @internal — not part of the public API surface
|
|
13957
14394
|
*/
|
|
13958
|
-
async
|
|
14395
|
+
async _invokeTranslator(text, from, to, field, collection) {
|
|
13959
14396
|
const cacheKey = `${field}\0${collection}\0${from}\0${to}\0${text}`;
|
|
13960
14397
|
const translatorName = this.options.plaintextTranslatorName ?? "anonymous";
|
|
13961
14398
|
const cached = this.translatorCache.get(cacheKey);
|
|
@@ -14238,7 +14675,7 @@ async function createNoydb(options) {
|
|
|
14238
14675
|
if (!options.store) options = { ...options, store: memoryStore() };
|
|
14239
14676
|
validateSecretModeOptions(options);
|
|
14240
14677
|
if (!options.mesh) options = { ...options, mesh: await createDefaultMesh(options.store) };
|
|
14241
|
-
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-
|
|
14678
|
+
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-H4B7ZQXP.js")).createUserApi };
|
|
14242
14679
|
if (!options.policyFactory) {
|
|
14243
14680
|
const policyModule = await import("./policy/index.js");
|
|
14244
14681
|
options = { ...options, policyFactory: policyModule.createNoydbPolicy, policyCheckGateFn: policyModule.checkGate };
|
|
@@ -14271,4 +14708,4 @@ export {
|
|
|
14271
14708
|
Noydb,
|
|
14272
14709
|
createNoydb
|
|
14273
14710
|
};
|
|
14274
|
-
//# sourceMappingURL=chunk-
|
|
14711
|
+
//# sourceMappingURL=chunk-U277K5GR.js.map
|