@noy-db/hub 0.7.0-pre.8 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1379 -0
- package/README.md +7 -6
- package/dist/api-TXFOVOXX.js +19 -0
- package/dist/as/index.js +14 -14
- package/dist/at/index.js +9 -10
- package/dist/attestation/index.js +18 -19
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-SZBDQQSL.js → backup-IJTB4S4M.js} +14 -15
- package/dist/{backup-SZBDQQSL.js.map → backup-IJTB4S4M.js.map} +1 -1
- package/dist/blobs/index.js +13 -14
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -13
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -3
- package/dist/cargo/index.js +33 -34
- package/dist/{chunk-X6TBQKHW.js → chunk-2577DKXB.js} +2 -2
- package/dist/chunk-2C3AQB46.js +1652 -0
- package/dist/chunk-2C3AQB46.js.map +1 -0
- package/dist/{chunk-L3FHEWA3.js → chunk-2N4GY74U.js} +6 -6
- package/dist/{chunk-626TSARM.js → chunk-2Y4IMKA6.js} +4 -4
- package/dist/{chunk-7CWII4BL.js → chunk-3RCJJBNR.js} +10 -10
- package/dist/{chunk-M7UC2QPT.js → chunk-453F654R.js} +2 -2
- package/dist/{chunk-2QNKXGUS.js → chunk-4GVM6QZA.js} +2 -2
- package/dist/{chunk-AB5P32RE.js → chunk-4OZNXTO4.js} +2 -2
- package/dist/{chunk-L3HDEHGM.js → chunk-5VCRVKOZ.js} +4 -4
- package/dist/{chunk-6AQIFBSP.js → chunk-5WDXHNSW.js} +5 -5
- package/dist/chunk-66TQOPFM.js +37 -0
- package/dist/chunk-66TQOPFM.js.map +1 -0
- package/dist/{chunk-BOFRKAUS.js → chunk-6GMZ7HEE.js} +6 -6
- package/dist/{chunk-PRHCMEUK.js → chunk-6GOE5PGN.js} +168 -1328
- package/dist/chunk-6GOE5PGN.js.map +1 -0
- package/dist/{chunk-XBFEKTIY.js → chunk-6I2RQCET.js} +4 -4
- package/dist/{chunk-PUJTKLPL.js → chunk-6X6SEMEE.js} +6 -4
- package/dist/{chunk-PUJTKLPL.js.map → chunk-6X6SEMEE.js.map} +1 -1
- package/dist/{chunk-UCUALOSM.js → chunk-6YXCPL4T.js} +2 -2
- package/dist/{chunk-BYBB4ABD.js → chunk-77K4PG6P.js} +8 -8
- package/dist/{chunk-S2VG3ABP.js → chunk-7MG2LHO5.js} +3 -3
- package/dist/{chunk-GU3LQYW2.js → chunk-7MG7SJT7.js} +1 -1
- package/dist/chunk-7MG7SJT7.js.map +1 -0
- package/dist/{chunk-JBIV4FLR.js → chunk-7O3Y4PPD.js} +5 -1
- package/dist/chunk-7O3Y4PPD.js.map +1 -0
- package/dist/{chunk-EO2KGKEJ.js → chunk-7V4TP3AF.js} +4 -4
- package/dist/{chunk-LFDMKZIP.js → chunk-ANATMFIO.js} +5 -5
- package/dist/{chunk-T3PHCEN4.js → chunk-ANSIZYEG.js} +3 -3
- package/dist/{chunk-ZKRRBRSZ.js → chunk-AO42KJO6.js} +7 -7
- package/dist/{chunk-VFIWDPXZ.js → chunk-BLN54W3L.js} +3 -3
- package/dist/{chunk-ZQ2UUHSL.js → chunk-BM5TWITZ.js} +7 -7
- package/dist/{chunk-WLFABTZ6.js → chunk-BOET4NA4.js} +3 -3
- package/dist/{chunk-FOG7YEJP.js → chunk-BOWNCWZT.js} +3 -3
- package/dist/{chunk-7XODKGTW.js → chunk-BSFNRLK2.js} +5 -5
- package/dist/{chunk-YPSOHDNC.js → chunk-BUE2D7PX.js} +26 -3
- package/dist/chunk-BUE2D7PX.js.map +1 -0
- package/dist/{chunk-J4MN6XIU.js → chunk-BZ3534YM.js} +2 -2
- package/dist/chunk-CARABLSQ.js +176 -0
- package/dist/chunk-CARABLSQ.js.map +1 -0
- package/dist/{chunk-4MZEZ37W.js → chunk-CHJBLCOG.js} +10 -8
- package/dist/{chunk-4MZEZ37W.js.map → chunk-CHJBLCOG.js.map} +1 -1
- package/dist/{chunk-IF56DYJK.js → chunk-CPWQB3N5.js} +7 -7
- package/dist/{chunk-SHILAQH5.js → chunk-DGOZ4UZD.js} +2 -2
- package/dist/{chunk-BWWUXE3L.js → chunk-ELNXJMGB.js} +6 -6
- package/dist/{chunk-44C2URL7.js → chunk-EQEYOJBM.js} +3 -3
- package/dist/{chunk-Y3XWRDAM.js → chunk-EYBQEIUY.js} +3 -3
- package/dist/{chunk-Z7ZXZL6Y.js → chunk-FAHMLERK.js} +2 -2
- package/dist/chunk-FFWI7UH7.js +53 -0
- package/dist/chunk-FFWI7UH7.js.map +1 -0
- package/dist/{chunk-EXDIHWFO.js → chunk-FMZY5Q6L.js} +3 -3
- package/dist/{chunk-H6WXKZL7.js → chunk-FXBIP2WD.js} +6 -6
- package/dist/{chunk-ZTYG36DH.js → chunk-G56KBWFY.js} +67 -22
- package/dist/chunk-G56KBWFY.js.map +1 -0
- package/dist/{chunk-672U6STZ.js → chunk-GPEQUXHL.js} +4 -4
- package/dist/{chunk-Z2PWOSCJ.js → chunk-GY4WYNNG.js} +2 -2
- package/dist/{chunk-RDHUZ674.js → chunk-HDOU6I2Y.js} +80 -8
- package/dist/chunk-HDOU6I2Y.js.map +1 -0
- package/dist/{chunk-OMHHGOG4.js → chunk-J6FXAEUG.js} +15 -13
- package/dist/chunk-J6FXAEUG.js.map +1 -0
- package/dist/{chunk-4A4TYISP.js → chunk-JBDFMYKQ.js} +2 -2
- package/dist/{chunk-POS53FG6.js → chunk-JMGDHKQF.js} +2 -2
- package/dist/{chunk-Q7GEDVHC.js → chunk-K6LHRFBL.js} +7 -7
- package/dist/{chunk-4JDIRUTT.js → chunk-K7NTTA6P.js} +2 -2
- package/dist/{chunk-26W5VETY.js → chunk-KG7TZKZG.js} +5 -5
- package/dist/{chunk-RJ7RIIX6.js → chunk-KJIMGIWO.js} +8 -8
- package/dist/{chunk-F7ZFRPGQ.js → chunk-KTFRCC5C.js} +2 -2
- package/dist/{chunk-HSGEIMJS.js → chunk-KUJDV5QH.js} +5 -5
- package/dist/{chunk-XWNLKG6R.js → chunk-KUX3OB6D.js} +7 -5
- package/dist/{chunk-XWNLKG6R.js.map → chunk-KUX3OB6D.js.map} +1 -1
- package/dist/{chunk-UPJMBMCR.js → chunk-L742JPKZ.js} +6 -6
- package/dist/{chunk-4TZUFNXL.js → chunk-L7CIOOBW.js} +2 -2
- package/dist/{chunk-7LYUJNU3.js → chunk-LWBCUYZW.js} +2 -2
- package/dist/{chunk-JHLJQUXU.js → chunk-MUM7IANK.js} +3 -3
- package/dist/{chunk-2GXEQUEX.js → chunk-MVMXZYXT.js} +2 -2
- package/dist/{chunk-XLPXGN66.js → chunk-NA2NIJZI.js} +8 -8
- package/dist/{chunk-S6YB5ZRP.js → chunk-NKHRDYOR.js} +4 -4
- package/dist/{chunk-XJ3FEKEY.js → chunk-NQKIUNW5.js} +2 -2
- package/dist/{chunk-6NRVFD55.js → chunk-PT43Y56J.js} +6 -6
- package/dist/{chunk-5ACAVJUI.js → chunk-Q2PU57HC.js} +2 -2
- package/dist/{chunk-E6YA6UAP.js → chunk-Q7HZX3IF.js} +2 -2
- package/dist/{chunk-4ZPE6SKS.js → chunk-QIBVIOXO.js} +3 -3
- package/dist/{chunk-WLLUM35R.js → chunk-QIZPZMUI.js} +2 -2
- package/dist/{chunk-P6ASQOZR.js → chunk-REDOOY2Q.js} +3 -3
- package/dist/chunk-REDOOY2Q.js.map +1 -0
- package/dist/{chunk-LKFKXS5K.js → chunk-RMF67KCG.js} +2 -2
- package/dist/{chunk-YCSM3GZU.js → chunk-RMS3NEA3.js} +2 -2
- package/dist/{chunk-4FPEWQKF.js → chunk-RRNRNANG.js} +27 -17
- package/dist/chunk-RRNRNANG.js.map +1 -0
- package/dist/chunk-RTBJ5IOO.js +87 -0
- package/dist/chunk-RTBJ5IOO.js.map +1 -0
- package/dist/chunk-RXLYKVTF.js +17 -0
- package/dist/chunk-RXLYKVTF.js.map +1 -0
- package/dist/{chunk-OPXR4PB2.js → chunk-SFAWCTEM.js} +2 -2
- package/dist/{chunk-3QARDAYW.js → chunk-SKGMN35F.js} +2 -2
- package/dist/{chunk-W5LHQXZU.js → chunk-SL3JAAKN.js} +2 -2
- package/dist/chunk-SMH6SRX7.js +87 -0
- package/dist/chunk-SMH6SRX7.js.map +1 -0
- package/dist/{chunk-JJZIIJSA.js → chunk-SPXXX5E4.js} +12 -82
- package/dist/chunk-SPXXX5E4.js.map +1 -0
- package/dist/{chunk-UALOYGCP.js → chunk-SPYWXKJN.js} +3 -3
- package/dist/{chunk-QU3YUP2X.js → chunk-SZJ3DLZA.js} +2 -2
- package/dist/chunk-TFMM5DBB.js +20 -0
- package/dist/chunk-TFMM5DBB.js.map +1 -0
- package/dist/{chunk-225O5CXQ.js → chunk-TFR7DSOV.js} +2 -2
- package/dist/{chunk-X67FCULK.js → chunk-TRGTKX5E.js} +3 -3
- package/dist/{chunk-JVLSU7S2.js → chunk-TUFM4UZP.js} +2 -2
- package/dist/{chunk-VVAVTSTR.js → chunk-U4FOQDY4.js} +5 -172
- package/dist/chunk-U4FOQDY4.js.map +1 -0
- package/dist/{chunk-HTGRQZFB.js → chunk-UGTBXF5U.js} +3 -3
- package/dist/{chunk-THNJ3IKU.js → chunk-ULUMAZ5S.js} +2 -2
- package/dist/{chunk-XDVVBETV.js → chunk-UXVWEX5L.js} +2 -2
- package/dist/{chunk-FKFIEEY6.js → chunk-UXWB3FPF.js} +10 -10
- package/dist/{chunk-NO272T7Q.js → chunk-V4PXLYWM.js} +2 -31
- package/dist/chunk-V4PXLYWM.js.map +1 -0
- package/dist/{chunk-CBRS2NEK.js → chunk-VTFVLCUH.js} +2 -2
- package/dist/{chunk-TOV6VMHF.js → chunk-VXANTWBJ.js} +3 -3
- package/dist/{chunk-VSLUSXVK.js → chunk-VXGSWL6L.js} +6 -6
- package/dist/{chunk-KHKKD62N.js → chunk-VYYM3MEN.js} +2 -16
- package/dist/chunk-VYYM3MEN.js.map +1 -0
- package/dist/{chunk-HQINBNHM.js → chunk-WEQEYLCS.js} +7 -7
- package/dist/{chunk-U6GCYG2T.js → chunk-X2DLENDQ.js} +3 -3
- package/dist/{chunk-XVU7J43V.js → chunk-XLMEZIAJ.js} +2 -2
- package/dist/{chunk-ILSR22WM.js → chunk-XTXOCYOJ.js} +5 -5
- package/dist/{chunk-KDJGJR7F.js → chunk-YSRUYAVU.js} +2 -2
- package/dist/{chunk-NLKLXXTO.js → chunk-YYP7WSEB.js} +2 -2
- package/dist/{chunk-4G25SDQL.js → chunk-ZN4FD4PE.js} +4 -4
- package/dist/{chunk-XSN63FUS.js → chunk-ZORTV6NH.js} +2 -2
- package/dist/{chunk-S3I7VKID.js → chunk-ZVO4QVPD.js} +5 -5
- package/dist/classified/index.js +5 -6
- package/dist/{classified-marker-KL4YXUXD.js → classified-marker-LI2SF2E4.js} +3 -5
- package/dist/{classified-marker-KL4YXUXD.js.map → classified-marker-LI2SF2E4.js.map} +1 -1
- package/dist/collection-facade-4GRREZ6C.js +45 -0
- package/dist/computed-VPOKQK4N.js +10 -0
- package/dist/consent/index.js +9 -10
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +9 -10
- package/dist/crdt/index.js +0 -1
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +12 -13
- package/dist/{dead-filter-ZGRFZKYE.js → dead-filter-TSWZQRR5.js} +2 -3
- package/dist/{dead-filter-ZGRFZKYE.js.map → dead-filter-TSWZQRR5.js.map} +1 -1
- package/dist/debug/index.js +1 -2
- package/dist/debug/index.js.map +1 -1
- package/dist/{delegation-2DO3VI5E.js → delegation-OVIFFPG4.js} +11 -12
- package/dist/{delegation-2DO3VI5E.js.map → delegation-OVIFFPG4.js.map} +1 -1
- package/dist/derivations/index.js +30 -16
- package/dist/derive-6O5SWQKN.js +21 -0
- package/dist/directory/index.js +10 -11
- package/dist/dispatch-S73TK3IY.js +302 -0
- package/dist/dispatch-S73TK3IY.js.map +1 -0
- package/dist/{dispatch-M62IAL2S.js → dispatch-WC6X2M6C.js} +5 -7
- package/dist/{dispatch-M62IAL2S.js.map → dispatch-WC6X2M6C.js.map} +1 -1
- package/dist/{enclave-4P4KH5ZW.js → enclave-KJOTOH7X.js} +9 -10
- package/dist/executor-5NIMLSKZ.js +8 -0
- package/dist/executor-AQVXV5GZ.js +8 -0
- package/dist/executor-PUAO6AKJ.js +29 -0
- package/dist/export-accessible-72EQNBMR.js +22 -0
- package/dist/extract-partition-PUYNU3UF.js +37 -0
- package/dist/{fanout-sidecar-BRQHWTZQ.js → fanout-sidecar-WUFXNYP4.js} +9 -10
- package/dist/{fanout-sidecar-BRQHWTZQ.js.map → fanout-sidecar-WUFXNYP4.js.map} +1 -1
- package/dist/{fence-watcher-ZVSMLKQD.js → fence-watcher-U2PW6JU5.js} +1 -3
- package/dist/{fence-watcher-ZVSMLKQD.js.map → fence-watcher-U2PW6JU5.js.map} +1 -1
- package/dist/find-2ABFCZX4.js +10 -0
- package/dist/forget/index.js +9 -10
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -5
- package/dist/history/index.js +13 -14
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -15
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +20 -4
- package/dist/index.js +122 -115
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -3
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +13 -13
- package/dist/issue-SIDORTSZ.js +18 -0
- package/dist/{json-schema-I22JCYCG.js → json-schema-V3M5MUCM.js} +1 -3
- package/dist/{json-schema-I22JCYCG.js.map → json-schema-V3M5MUCM.js.map} +1 -1
- package/dist/kernel/collection-config.d.ts +34 -0
- package/dist/kernel/collection.d.ts +11 -6
- package/dist/kernel/errors.d.ts +45 -0
- package/dist/kernel/match-pairs.d.ts +30 -0
- package/dist/kernel/types.d.ts +66 -0
- package/dist/lazy/index.js +3 -3
- package/dist/{ledger-4X5ZH43X.js → ledger-F33ZVMTK.js} +11 -12
- package/dist/liberate-LCDPNAG2.js +24 -0
- package/dist/link-set-FKNWAYKS.js +30 -0
- package/dist/{managed-secret-CXALLEUB.js → managed-secret-PQYKSR6T.js} +10 -11
- package/dist/materialized-views/index.js +21 -21
- package/dist/{migrate-cek-LBRKYUZZ.js → migrate-cek-5ENH64AA.js} +2 -3
- package/dist/{migrate-cek-LBRKYUZZ.js.map → migrate-cek-5ENH64AA.js.map} +1 -1
- package/dist/money/index.js +4 -5
- package/dist/noydb-DUXZPKSN.js +90 -0
- package/dist/overlay-views/index.js +4 -5
- package/dist/periods/index.js +12 -13
- package/dist/pod/index.js +64 -60
- package/dist/{pod-handle-DHEYBTJ2.js → pod-handle-Q736KYON.js} +10 -11
- package/dist/{pod-handle-DHEYBTJ2.js.map → pod-handle-Q736KYON.js.map} +1 -1
- package/dist/policy/index.js +10 -11
- package/dist/port/to/index.d.ts +40 -0
- package/dist/portability/index.js +8 -9
- package/dist/portability/index.js.map +1 -1
- package/dist/{post-register-4DXRYGTU.js → post-register-LNE2FE2A.js} +6 -7
- package/dist/{post-register-4DXRYGTU.js.map → post-register-LNE2FE2A.js.map} +1 -1
- package/dist/{purge-scope-FGNNLWHD.js → purge-scope-4HEFPDOW.js} +1 -3
- package/dist/{purge-scope-FGNNLWHD.js.map → purge-scope-4HEFPDOW.js.map} +1 -1
- package/dist/query/index.js +3 -4
- package/dist/{read-only-facade-CHCKSEPD.js → read-only-facade-BIGO37U3.js} +1 -2
- package/dist/reduce/index.js +4 -5
- package/dist/reduce/index.js.map +1 -1
- package/dist/register-I2DZXGAR.js +31 -0
- package/dist/registry-23WF3TGH.js +8 -0
- package/dist/registry-4AYVUNXK.js +8 -0
- package/dist/registry-VSSQPIGF.js +18 -0
- package/dist/registry-YLEWMGAC.js +32 -0
- package/dist/request-withdrawal-KFQHEZ25.js +30 -0
- package/dist/{reveal-X2QMWOVX.js → reveal-67RDQRIN.js} +6 -7
- package/dist/{reveal-X2QMWOVX.js.map → reveal-67RDQRIN.js.map} +1 -1
- package/dist/revoke-DQDZAZZM.js +23 -0
- package/dist/satellites/index.js +1 -2
- package/dist/schema-update/index.js +2 -3
- package/dist/sealed-record/index.js +12 -13
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +4 -5
- package/dist/{seed-IX5NFSH5.js → seed-G42JYN56.js} +12 -13
- package/dist/{seed-IX5NFSH5.js.map → seed-G42JYN56.js.map} +1 -1
- package/dist/sequence/index.js +9 -10
- package/dist/session/index.js +9 -10
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +2 -3
- package/dist/shadow/index.js.map +1 -1
- package/dist/share-link/index.js +0 -1
- package/dist/share-link/index.js.map +1 -1
- package/dist/signer-WAMDZHEN.js +24 -0
- package/dist/snapshots/index.js +10 -11
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-5I36LPVK.js → stale-DDL7WQEZ.js} +10 -11
- package/dist/storage-FLR73HHF.js +22 -0
- package/dist/store/index.js +0 -1
- package/dist/{store-coordination-provider-OLPNRMFO.js → store-coordination-provider-MEQ2MJQG.js} +10 -11
- package/dist/{store-coordination-provider-OLPNRMFO.js.map → store-coordination-provider-MEQ2MJQG.js.map} +1 -1
- package/dist/sync/index.js +10 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +15 -16
- package/dist/tiers/index.js +11 -12
- package/dist/to/index.js +2 -3
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +3 -4
- package/dist/transactions/index.js.map +1 -1
- package/dist/{ulid-VQW6ERQN.js → ulid-4MKXG325.js} +1 -2
- package/dist/util/index.js +1 -2
- package/dist/util/index.js.map +1 -1
- package/dist/{vault-diff-FE5J35NJ.js → vault-diff-C6WUJFNP.js} +1 -2
- package/dist/vault-head/index.js +8 -9
- package/dist/vault-head/index.js.map +1 -1
- package/dist/{verify-WYOFLSNA.js → verify-KOV2G5D6.js} +5 -6
- package/dist/{verify-WYOFLSNA.js.map → verify-KOV2G5D6.js.map} +1 -1
- package/dist/walk-3UQBRMDV.js +21 -0
- package/dist/with-formula/derivations/dispatch.d.ts +16 -1
- package/dist/with-formula/derivations/registry.d.ts +20 -0
- package/dist/with-formula/derivations/trigger-match.d.ts +104 -0
- package/dist/with-formula/derivations/types.d.ts +61 -0
- package/dist/with-party/team/roster-epoch.d.ts +71 -0
- package/dist/with-party/team/roster-tag.d.ts +1 -1
- package/dist/with-shape/introspection/behaviors.d.ts +7 -0
- package/dist/with-shape/introspection/describe.d.ts +10 -1
- package/dist/with-shape/introspection/field-meta.d.ts +86 -0
- package/dist/withdraw-accessible-EL5GXZBS.js +27 -0
- package/package.json +8 -3
- package/dist/api-OAZLPNVV.js +0 -20
- package/dist/chunk-4FPEWQKF.js.map +0 -1
- package/dist/chunk-5263OEM3.js +0 -344
- package/dist/chunk-5263OEM3.js.map +0 -1
- package/dist/chunk-GU3LQYW2.js.map +0 -1
- package/dist/chunk-JBIV4FLR.js.map +0 -1
- package/dist/chunk-JJZIIJSA.js.map +0 -1
- package/dist/chunk-KHKKD62N.js.map +0 -1
- package/dist/chunk-NO272T7Q.js.map +0 -1
- package/dist/chunk-OMHHGOG4.js.map +0 -1
- package/dist/chunk-P6ASQOZR.js.map +0 -1
- package/dist/chunk-PRHCMEUK.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-RDHUZ674.js.map +0 -1
- package/dist/chunk-VAG47QHV.js +0 -81
- package/dist/chunk-VAG47QHV.js.map +0 -1
- package/dist/chunk-VVAVTSTR.js.map +0 -1
- package/dist/chunk-YPSOHDNC.js.map +0 -1
- package/dist/chunk-ZTYG36DH.js.map +0 -1
- package/dist/collection-facade-6IY2LW6W.js +0 -45
- package/dist/computed-ASBNTLOK.js +0 -11
- package/dist/derive-TCTS7ULE.js +0 -22
- package/dist/dispatch-FNCCONFK.js +0 -194
- package/dist/dispatch-FNCCONFK.js.map +0 -1
- package/dist/executor-AFHQYRAU.js +0 -9
- package/dist/executor-CDIMJVE2.js +0 -29
- package/dist/executor-YYDW6XQI.js +0 -9
- package/dist/export-accessible-WADNWX35.js +0 -23
- package/dist/extract-partition-SHQYQSWE.js +0 -38
- package/dist/find-SZBL2HPB.js +0 -11
- package/dist/issue-2DGG7NKE.js +0 -19
- package/dist/liberate-7NEPRE52.js +0 -25
- package/dist/link-set-WHTYVTOV.js +0 -31
- package/dist/noydb-BQ3ZTN2Z.js +0 -86
- package/dist/register-GLCOH73C.js +0 -32
- package/dist/registry-GWGHZWGP.js +0 -19
- package/dist/registry-IWFMXCHX.js +0 -9
- package/dist/registry-Q3FG3OAX.js +0 -9
- package/dist/registry-T346IZCF.js +0 -18
- package/dist/request-withdrawal-2RERJECX.js +0 -31
- package/dist/revoke-4NRSCPNW.js +0 -24
- package/dist/signer-HJHTGX7X.js +0 -25
- package/dist/storage-ZYYAB3J3.js +0 -23
- package/dist/walk-LTV7LOCN.js +0 -21
- package/dist/withdraw-accessible-V4XCPH7U.js +0 -28
- package/dist/withdraw-accessible-V4XCPH7U.js.map +0 -1
- package/dist/zod-HAJM7LMS.js +0 -14763
- package/dist/zod-HAJM7LMS.js.map +0 -1
- /package/dist/{api-OAZLPNVV.js.map → api-TXFOVOXX.js.map} +0 -0
- /package/dist/{chunk-X6TBQKHW.js.map → chunk-2577DKXB.js.map} +0 -0
- /package/dist/{chunk-L3FHEWA3.js.map → chunk-2N4GY74U.js.map} +0 -0
- /package/dist/{chunk-626TSARM.js.map → chunk-2Y4IMKA6.js.map} +0 -0
- /package/dist/{chunk-7CWII4BL.js.map → chunk-3RCJJBNR.js.map} +0 -0
- /package/dist/{chunk-M7UC2QPT.js.map → chunk-453F654R.js.map} +0 -0
- /package/dist/{chunk-2QNKXGUS.js.map → chunk-4GVM6QZA.js.map} +0 -0
- /package/dist/{chunk-AB5P32RE.js.map → chunk-4OZNXTO4.js.map} +0 -0
- /package/dist/{chunk-L3HDEHGM.js.map → chunk-5VCRVKOZ.js.map} +0 -0
- /package/dist/{chunk-6AQIFBSP.js.map → chunk-5WDXHNSW.js.map} +0 -0
- /package/dist/{chunk-BOFRKAUS.js.map → chunk-6GMZ7HEE.js.map} +0 -0
- /package/dist/{chunk-XBFEKTIY.js.map → chunk-6I2RQCET.js.map} +0 -0
- /package/dist/{chunk-UCUALOSM.js.map → chunk-6YXCPL4T.js.map} +0 -0
- /package/dist/{chunk-BYBB4ABD.js.map → chunk-77K4PG6P.js.map} +0 -0
- /package/dist/{chunk-S2VG3ABP.js.map → chunk-7MG2LHO5.js.map} +0 -0
- /package/dist/{chunk-EO2KGKEJ.js.map → chunk-7V4TP3AF.js.map} +0 -0
- /package/dist/{chunk-LFDMKZIP.js.map → chunk-ANATMFIO.js.map} +0 -0
- /package/dist/{chunk-T3PHCEN4.js.map → chunk-ANSIZYEG.js.map} +0 -0
- /package/dist/{chunk-ZKRRBRSZ.js.map → chunk-AO42KJO6.js.map} +0 -0
- /package/dist/{chunk-VFIWDPXZ.js.map → chunk-BLN54W3L.js.map} +0 -0
- /package/dist/{chunk-ZQ2UUHSL.js.map → chunk-BM5TWITZ.js.map} +0 -0
- /package/dist/{chunk-WLFABTZ6.js.map → chunk-BOET4NA4.js.map} +0 -0
- /package/dist/{chunk-FOG7YEJP.js.map → chunk-BOWNCWZT.js.map} +0 -0
- /package/dist/{chunk-7XODKGTW.js.map → chunk-BSFNRLK2.js.map} +0 -0
- /package/dist/{chunk-J4MN6XIU.js.map → chunk-BZ3534YM.js.map} +0 -0
- /package/dist/{chunk-IF56DYJK.js.map → chunk-CPWQB3N5.js.map} +0 -0
- /package/dist/{chunk-SHILAQH5.js.map → chunk-DGOZ4UZD.js.map} +0 -0
- /package/dist/{chunk-BWWUXE3L.js.map → chunk-ELNXJMGB.js.map} +0 -0
- /package/dist/{chunk-44C2URL7.js.map → chunk-EQEYOJBM.js.map} +0 -0
- /package/dist/{chunk-Y3XWRDAM.js.map → chunk-EYBQEIUY.js.map} +0 -0
- /package/dist/{chunk-Z7ZXZL6Y.js.map → chunk-FAHMLERK.js.map} +0 -0
- /package/dist/{chunk-EXDIHWFO.js.map → chunk-FMZY5Q6L.js.map} +0 -0
- /package/dist/{chunk-H6WXKZL7.js.map → chunk-FXBIP2WD.js.map} +0 -0
- /package/dist/{chunk-672U6STZ.js.map → chunk-GPEQUXHL.js.map} +0 -0
- /package/dist/{chunk-Z2PWOSCJ.js.map → chunk-GY4WYNNG.js.map} +0 -0
- /package/dist/{chunk-4A4TYISP.js.map → chunk-JBDFMYKQ.js.map} +0 -0
- /package/dist/{chunk-POS53FG6.js.map → chunk-JMGDHKQF.js.map} +0 -0
- /package/dist/{chunk-Q7GEDVHC.js.map → chunk-K6LHRFBL.js.map} +0 -0
- /package/dist/{chunk-4JDIRUTT.js.map → chunk-K7NTTA6P.js.map} +0 -0
- /package/dist/{chunk-26W5VETY.js.map → chunk-KG7TZKZG.js.map} +0 -0
- /package/dist/{chunk-RJ7RIIX6.js.map → chunk-KJIMGIWO.js.map} +0 -0
- /package/dist/{chunk-F7ZFRPGQ.js.map → chunk-KTFRCC5C.js.map} +0 -0
- /package/dist/{chunk-HSGEIMJS.js.map → chunk-KUJDV5QH.js.map} +0 -0
- /package/dist/{chunk-UPJMBMCR.js.map → chunk-L742JPKZ.js.map} +0 -0
- /package/dist/{chunk-4TZUFNXL.js.map → chunk-L7CIOOBW.js.map} +0 -0
- /package/dist/{chunk-7LYUJNU3.js.map → chunk-LWBCUYZW.js.map} +0 -0
- /package/dist/{chunk-JHLJQUXU.js.map → chunk-MUM7IANK.js.map} +0 -0
- /package/dist/{chunk-2GXEQUEX.js.map → chunk-MVMXZYXT.js.map} +0 -0
- /package/dist/{chunk-XLPXGN66.js.map → chunk-NA2NIJZI.js.map} +0 -0
- /package/dist/{chunk-S6YB5ZRP.js.map → chunk-NKHRDYOR.js.map} +0 -0
- /package/dist/{chunk-XJ3FEKEY.js.map → chunk-NQKIUNW5.js.map} +0 -0
- /package/dist/{chunk-6NRVFD55.js.map → chunk-PT43Y56J.js.map} +0 -0
- /package/dist/{chunk-5ACAVJUI.js.map → chunk-Q2PU57HC.js.map} +0 -0
- /package/dist/{chunk-E6YA6UAP.js.map → chunk-Q7HZX3IF.js.map} +0 -0
- /package/dist/{chunk-4ZPE6SKS.js.map → chunk-QIBVIOXO.js.map} +0 -0
- /package/dist/{chunk-WLLUM35R.js.map → chunk-QIZPZMUI.js.map} +0 -0
- /package/dist/{chunk-LKFKXS5K.js.map → chunk-RMF67KCG.js.map} +0 -0
- /package/dist/{chunk-YCSM3GZU.js.map → chunk-RMS3NEA3.js.map} +0 -0
- /package/dist/{chunk-OPXR4PB2.js.map → chunk-SFAWCTEM.js.map} +0 -0
- /package/dist/{chunk-3QARDAYW.js.map → chunk-SKGMN35F.js.map} +0 -0
- /package/dist/{chunk-W5LHQXZU.js.map → chunk-SL3JAAKN.js.map} +0 -0
- /package/dist/{chunk-UALOYGCP.js.map → chunk-SPYWXKJN.js.map} +0 -0
- /package/dist/{chunk-QU3YUP2X.js.map → chunk-SZJ3DLZA.js.map} +0 -0
- /package/dist/{chunk-225O5CXQ.js.map → chunk-TFR7DSOV.js.map} +0 -0
- /package/dist/{chunk-X67FCULK.js.map → chunk-TRGTKX5E.js.map} +0 -0
- /package/dist/{chunk-JVLSU7S2.js.map → chunk-TUFM4UZP.js.map} +0 -0
- /package/dist/{chunk-HTGRQZFB.js.map → chunk-UGTBXF5U.js.map} +0 -0
- /package/dist/{chunk-THNJ3IKU.js.map → chunk-ULUMAZ5S.js.map} +0 -0
- /package/dist/{chunk-XDVVBETV.js.map → chunk-UXVWEX5L.js.map} +0 -0
- /package/dist/{chunk-FKFIEEY6.js.map → chunk-UXWB3FPF.js.map} +0 -0
- /package/dist/{chunk-CBRS2NEK.js.map → chunk-VTFVLCUH.js.map} +0 -0
- /package/dist/{chunk-TOV6VMHF.js.map → chunk-VXANTWBJ.js.map} +0 -0
- /package/dist/{chunk-VSLUSXVK.js.map → chunk-VXGSWL6L.js.map} +0 -0
- /package/dist/{chunk-HQINBNHM.js.map → chunk-WEQEYLCS.js.map} +0 -0
- /package/dist/{chunk-U6GCYG2T.js.map → chunk-X2DLENDQ.js.map} +0 -0
- /package/dist/{chunk-XVU7J43V.js.map → chunk-XLMEZIAJ.js.map} +0 -0
- /package/dist/{chunk-ILSR22WM.js.map → chunk-XTXOCYOJ.js.map} +0 -0
- /package/dist/{chunk-KDJGJR7F.js.map → chunk-YSRUYAVU.js.map} +0 -0
- /package/dist/{chunk-NLKLXXTO.js.map → chunk-YYP7WSEB.js.map} +0 -0
- /package/dist/{chunk-4G25SDQL.js.map → chunk-ZN4FD4PE.js.map} +0 -0
- /package/dist/{chunk-XSN63FUS.js.map → chunk-ZORTV6NH.js.map} +0 -0
- /package/dist/{chunk-S3I7VKID.js.map → chunk-ZVO4QVPD.js.map} +0 -0
- /package/dist/{chunk-PZ5AY32C.js.map → collection-facade-4GRREZ6C.js.map} +0 -0
- /package/dist/{collection-facade-6IY2LW6W.js.map → computed-VPOKQK4N.js.map} +0 -0
- /package/dist/{computed-ASBNTLOK.js.map → derive-6O5SWQKN.js.map} +0 -0
- /package/dist/{derive-TCTS7ULE.js.map → enclave-KJOTOH7X.js.map} +0 -0
- /package/dist/{enclave-4P4KH5ZW.js.map → executor-5NIMLSKZ.js.map} +0 -0
- /package/dist/{executor-AFHQYRAU.js.map → executor-AQVXV5GZ.js.map} +0 -0
- /package/dist/{executor-CDIMJVE2.js.map → executor-PUAO6AKJ.js.map} +0 -0
- /package/dist/{executor-YYDW6XQI.js.map → export-accessible-72EQNBMR.js.map} +0 -0
- /package/dist/{export-accessible-WADNWX35.js.map → extract-partition-PUYNU3UF.js.map} +0 -0
- /package/dist/{extract-partition-SHQYQSWE.js.map → find-2ABFCZX4.js.map} +0 -0
- /package/dist/{find-SZBL2HPB.js.map → issue-SIDORTSZ.js.map} +0 -0
- /package/dist/{issue-2DGG7NKE.js.map → ledger-F33ZVMTK.js.map} +0 -0
- /package/dist/{ledger-4X5ZH43X.js.map → liberate-LCDPNAG2.js.map} +0 -0
- /package/dist/{liberate-7NEPRE52.js.map → link-set-FKNWAYKS.js.map} +0 -0
- /package/dist/{link-set-WHTYVTOV.js.map → managed-secret-PQYKSR6T.js.map} +0 -0
- /package/dist/{managed-secret-CXALLEUB.js.map → noydb-DUXZPKSN.js.map} +0 -0
- /package/dist/{noydb-BQ3ZTN2Z.js.map → read-only-facade-BIGO37U3.js.map} +0 -0
- /package/dist/{read-only-facade-CHCKSEPD.js.map → register-I2DZXGAR.js.map} +0 -0
- /package/dist/{register-GLCOH73C.js.map → registry-23WF3TGH.js.map} +0 -0
- /package/dist/{registry-GWGHZWGP.js.map → registry-4AYVUNXK.js.map} +0 -0
- /package/dist/{registry-IWFMXCHX.js.map → registry-VSSQPIGF.js.map} +0 -0
- /package/dist/{registry-Q3FG3OAX.js.map → registry-YLEWMGAC.js.map} +0 -0
- /package/dist/{registry-T346IZCF.js.map → request-withdrawal-KFQHEZ25.js.map} +0 -0
- /package/dist/{request-withdrawal-2RERJECX.js.map → revoke-DQDZAZZM.js.map} +0 -0
- /package/dist/{revoke-4NRSCPNW.js.map → signer-WAMDZHEN.js.map} +0 -0
- /package/dist/{signer-HJHTGX7X.js.map → stale-DDL7WQEZ.js.map} +0 -0
- /package/dist/{stale-5I36LPVK.js.map → storage-FLR73HHF.js.map} +0 -0
- /package/dist/{storage-ZYYAB3J3.js.map → ulid-4MKXG325.js.map} +0 -0
- /package/dist/{ulid-VQW6ERQN.js.map → vault-diff-C6WUJFNP.js.map} +0 -0
- /package/dist/{vault-diff-FE5J35NJ.js.map → walk-3UQBRMDV.js.map} +0 -0
- /package/dist/{walk-LTV7LOCN.js.map → withdraw-accessible-EL5GXZBS.js.map} +0 -0
|
@@ -7,27 +7,27 @@ import {
|
|
|
7
7
|
PERIOD_FREEZES_COLLECTION,
|
|
8
8
|
PERIOD_TARGET_PURGES_COLLECTION,
|
|
9
9
|
periodExclusiveUpperBound
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FAHMLERK.js";
|
|
11
11
|
import {
|
|
12
12
|
envelopeBodySize
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-77K4PG6P.js";
|
|
14
14
|
import {
|
|
15
15
|
buildRecordEnvelope,
|
|
16
16
|
isDeleteMarker,
|
|
17
17
|
isTombstoneShape
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
19
19
|
import {
|
|
20
20
|
decrypt,
|
|
21
21
|
derivePresenceKey,
|
|
22
22
|
encrypt
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SL3JAAKN.js";
|
|
24
24
|
import {
|
|
25
25
|
NOYDB_SYNC_VERSION
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7MG7SJT7.js";
|
|
27
27
|
import {
|
|
28
28
|
ValidationError,
|
|
29
29
|
isConflictError
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
31
31
|
|
|
32
32
|
// src/with-sync/presence.ts
|
|
33
33
|
var subtle = globalThis.crypto.subtle;
|
|
@@ -1213,4 +1213,4 @@ export {
|
|
|
1213
1213
|
SyncEngine,
|
|
1214
1214
|
SyncTransaction
|
|
1215
1215
|
};
|
|
1216
|
-
//# sourceMappingURL=chunk-
|
|
1216
|
+
//# sourceMappingURL=chunk-CPWQB3N5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DuplicateBehaviorNameError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/guards/registry.ts
|
|
6
6
|
var GuardRegistry = class {
|
|
@@ -141,4 +141,4 @@ var GuardRegistry = class {
|
|
|
141
141
|
export {
|
|
142
142
|
GuardRegistry
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=chunk-
|
|
144
|
+
//# sourceMappingURL=chunk-DGOZ4UZD.js.map
|
|
@@ -2,21 +2,21 @@ import {
|
|
|
2
2
|
ATTESTATIONS_COLLECTION,
|
|
3
3
|
REVOKED_RECORD_ID,
|
|
4
4
|
loadOrCreateSigner
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ANATMFIO.js";
|
|
6
6
|
import {
|
|
7
7
|
buildRecordAad,
|
|
8
8
|
openEnvelopeJson
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-77K4PG6P.js";
|
|
10
10
|
import {
|
|
11
11
|
buildRecordEnvelope
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
13
13
|
import {
|
|
14
14
|
encrypt
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SL3JAAKN.js";
|
|
16
16
|
import {
|
|
17
17
|
AttestationError,
|
|
18
18
|
ConflictError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
20
20
|
|
|
21
21
|
// src/with-audit/attestation/revoke.ts
|
|
22
22
|
import { signRevocationList } from "@noy-db/attestation";
|
|
@@ -81,4 +81,4 @@ export {
|
|
|
81
81
|
getRevokedDocIdsCore,
|
|
82
82
|
publishRevocationListCore
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-ELNXJMGB.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordEnvelope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
4
4
|
import {
|
|
5
5
|
ValidationError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
7
7
|
|
|
8
8
|
// src/with-party/directory/cover/custom.ts
|
|
9
9
|
var CUSTOM_KEY_PATTERN = /^[a-z0-9]+([.-][a-z0-9]+)+$/i;
|
|
@@ -230,4 +230,4 @@ export {
|
|
|
230
230
|
resolveLocale,
|
|
231
231
|
pickLocale
|
|
232
232
|
};
|
|
233
|
-
//# sourceMappingURL=chunk-
|
|
233
|
+
//# sourceMappingURL=chunk-EQEYOJBM.js.map
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
verifyPrompt,
|
|
11
11
|
verifyRoster,
|
|
12
12
|
verifyTypedEcho
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-G56KBWFY.js";
|
|
14
14
|
import {
|
|
15
15
|
NoAccessError,
|
|
16
16
|
NoydbError,
|
|
17
17
|
ValidationError,
|
|
18
18
|
WrongEchoError,
|
|
19
19
|
WrongPromptError
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
21
21
|
|
|
22
22
|
// src/with-party/team/echo-ceremony.ts
|
|
23
23
|
async function beginEchoUnlock(store, vault, opts) {
|
|
@@ -122,4 +122,4 @@ export {
|
|
|
122
122
|
MemoryDeviceSeal,
|
|
123
123
|
withTeam
|
|
124
124
|
};
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
125
|
+
//# sourceMappingURL=chunk-EYBQEIUY.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ValidationError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/periods/window.ts
|
|
6
6
|
var PERIODS_COLLECTION = "_periods";
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
PERIOD_REOPENS_COLLECTION,
|
|
24
24
|
periodExclusiveUpperBound
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-FAHMLERK.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// src/with-formula/derivations/trigger-match.ts
|
|
2
|
+
function hopCollections(match) {
|
|
3
|
+
return [...new Set(match.flatMap((p) => p.via ? [p.via.collection] : []))];
|
|
4
|
+
}
|
|
5
|
+
function normalizeTriggerBy(triggerBy) {
|
|
6
|
+
if (triggerBy === void 0) return [];
|
|
7
|
+
return triggerBy.map((t) => ({
|
|
8
|
+
collection: t.collection,
|
|
9
|
+
match: t.match ?? [{ from: "id", to: t.on }],
|
|
10
|
+
...t.maxFanout !== void 0 ? { maxFanout: t.maxFanout } : {}
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
var scalar = (v) => typeof v === "string" || typeof v === "number" ? String(v) : null;
|
|
14
|
+
async function resolveTuple(match, writtenId, record, lookup) {
|
|
15
|
+
const out = [];
|
|
16
|
+
for (const pair of match) {
|
|
17
|
+
const raw = pair.from === "id" ? writtenId : scalar(record?.[pair.from]);
|
|
18
|
+
if (raw === null) return null;
|
|
19
|
+
if (pair.via === void 0) {
|
|
20
|
+
out.push({ field: pair.to, value: raw });
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const intermediate = await lookup(pair.via.collection, pair.via.take, raw);
|
|
24
|
+
if (intermediate === null) return null;
|
|
25
|
+
const hopped = scalar(intermediate[pair.via.on]);
|
|
26
|
+
if (hopped === null) return null;
|
|
27
|
+
out.push({ field: pair.to, value: hopped });
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
function tupleFromIntermediate(match, collection, record) {
|
|
32
|
+
const out = [];
|
|
33
|
+
for (const pair of match) {
|
|
34
|
+
if (pair.via?.collection !== collection) continue;
|
|
35
|
+
const v = scalar(record?.[pair.via.on]);
|
|
36
|
+
if (v === null) return null;
|
|
37
|
+
out.push({ field: pair.to, value: v });
|
|
38
|
+
}
|
|
39
|
+
return out.length > 0 ? out : null;
|
|
40
|
+
}
|
|
41
|
+
function sameTuple(a, b) {
|
|
42
|
+
if (a === null || b === null) return a === b;
|
|
43
|
+
return a.length === b.length && a.every((p, i) => p.field === b[i].field && p.value === b[i].value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
hopCollections,
|
|
48
|
+
normalizeTriggerBy,
|
|
49
|
+
resolveTuple,
|
|
50
|
+
tupleFromIntermediate,
|
|
51
|
+
sameTuple
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=chunk-FFWI7UH7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-formula/derivations/trigger-match.ts"],"sourcesContent":["/**\n * Pure helpers behind composite `triggerBy` (#1249).\n *\n * A trigger entry is a CONJUNCTION of equality pairs: a source record\n * matches when EVERY pair satisfies String(source[to]) === String(written[from]).\n * `from: 'id'` reads the written record's id (winning over any stored field\n * named `id`, matching dispatch's `{ ...incoming, id }` convention). The\n * legacy `on` form normalizes to `[{ from: 'id', to: on }]` so everything\n * downstream has ONE shape.\n *\n * Scalar coercion is verbatim from `_findMatchingIds`: both sides must be\n * string | number; anything else fails the pair (never throws).\n * Spec: docs/superpowers/specs/2026-08-29-composite-triggerby-design.md §4-§5.\n * @module\n */\n\n/** One declared hop through an intermediate collection (#1277). */\nexport interface MatchVia {\n /** The intermediate collection to resolve through. */\n readonly collection: string\n /** Field on the intermediate whose value equals `written[from]`. */\n readonly take: string\n /** Field on the intermediate whose value is compared against `source[to]`. */\n readonly on: string\n}\n\nexport interface MatchPair {\n readonly from: string\n readonly to: string\n readonly via?: MatchVia\n}\n\n/** True when any pair in this trigger resolves through an intermediate. */\nexport function hasHop(match: ReadonlyArray<MatchPair>): boolean {\n return match.some((p) => p.via !== undefined)\n}\n\n/** Every intermediate collection named by a trigger's pairs, deduplicated. */\nexport function hopCollections(match: ReadonlyArray<MatchPair>): string[] {\n return [...new Set(match.flatMap((p) => (p.via ? [p.via.collection] : [])))]\n}\n\nexport interface NormalizedTrigger {\n readonly collection: string\n readonly match: ReadonlyArray<MatchPair>\n readonly maxFanout?: number\n}\n\ninterface RawTrigger {\n readonly collection: string\n readonly on?: string\n readonly match?: ReadonlyArray<MatchPair>\n readonly maxFanout?: number\n}\n\nexport function normalizeTriggerBy(triggerBy: ReadonlyArray<RawTrigger> | undefined): NormalizedTrigger[] {\n if (triggerBy === undefined) return []\n return triggerBy.map((t) => ({\n collection: t.collection,\n match: t.match ?? [{ from: 'id', to: t.on! }],\n ...(t.maxFanout !== undefined ? { maxFanout: t.maxFanout } : {}),\n }))\n}\n\nconst scalar = (v: unknown): string | null =>\n (typeof v === 'string' || typeof v === 'number') ? String(v) : null\n\n/**\n * Resolve one trigger's pairs into the value tuple a written record presents,\n * following any declared hop (#1277).\n *\n * Non-hop pairs behave exactly as {@link tupleFromWritten}. A hop pair reads\n * `written[from]`, finds the intermediate record whose `via.take` equals it,\n * and substitutes that record's `via.on` value — so everything downstream\n * still compares a flat `{ field, value }` tuple against source records and\n * the existing index-backed matcher is unchanged.\n *\n * Returns `null` when ANY pair cannot produce a value — a missing field, a\n * non-scalar, or an intermediate that does not resolve. That is a legitimate\n * no-match, not an error: a dangling reference addresses nothing, and refusing\n * here would turn a data condition into a thrown exception on every write.\n *\n * Supersedes the sync `tupleFromWritten`, which was DELETED rather than kept\n * (#1294): having two tuple builders that had to agree is precisely how the\n * delete path drifted — it called the unhopped one, so a mapped pair compared\n * the wrong side of the relationship and matched nothing, silently. One path\n * cannot disagree with itself.\n *\n * ONE lookup per hop per written record. `take: 'id'` is a direct `get`; any\n * other `take` is a field match on the intermediate, which uses its index when\n * one is declared.\n */\nexport async function resolveTuple(\n match: ReadonlyArray<MatchPair>,\n writtenId: string,\n record: Record<string, unknown> | null,\n lookup: (collection: string, field: string, value: string) => Promise<Record<string, unknown> | null>,\n): Promise<Array<{ field: string; value: string }> | null> {\n const out: Array<{ field: string; value: string }> = []\n for (const pair of match) {\n const raw = pair.from === 'id' ? writtenId : scalar(record?.[pair.from])\n if (raw === null) return null\n if (pair.via === undefined) {\n out.push({ field: pair.to, value: raw })\n continue\n }\n const intermediate = await lookup(pair.via.collection, pair.via.take, raw)\n if (intermediate === null) return null\n const hopped = scalar(intermediate[pair.via.on])\n if (hopped === null) return null\n out.push({ field: pair.to, value: hopped })\n }\n return out\n}\n\n/**\n * The tuple a written INTERMEDIATE record presents (#1277 option 2).\n *\n * When a record of `via.collection` is written, the sources it addresses are\n * those whose `to` equals the intermediate's own `via.on` value — no lookup is\n * needed, because the intermediate IS the written record. Pairs that do not\n * hop through this collection cannot be constrained by such a write and are\n * skipped, which makes the fan-out deliberately WIDER than a trigger write:\n * refreshing too much is recoverable, refreshing too little is the silent\n * staleness this feature exists to remove.\n *\n * Returns `null` when no pair hops through `collection`, or when the\n * intermediate carries no scalar at `via.on`.\n */\nexport function tupleFromIntermediate(\n match: ReadonlyArray<MatchPair>,\n collection: string,\n record: Record<string, unknown> | null,\n): Array<{ field: string; value: string }> | null {\n const out: Array<{ field: string; value: string }> = []\n for (const pair of match) {\n if (pair.via?.collection !== collection) continue\n const v = scalar(record?.[pair.via.on])\n if (v === null) return null\n out.push({ field: pair.to, value: v })\n }\n return out.length > 0 ? out : null\n}\n\n/** Any single component differing means NOT the same tuple (spec §7). */\nexport function sameTuple(\n a: Array<{ field: string; value: string }> | null,\n b: Array<{ field: string; value: string }> | null,\n): boolean {\n if (a === null || b === null) return a === b\n return a.length === b.length && a.every((p, i) => p.field === b[i]!.field && p.value === b[i]!.value)\n}\n\n/** Moved to the kernel (#1249) so `collection.ts` can import statically without\n * dragging derivations code into the floor bundle; re-exported here for\n * compatibility with existing consumers of this module. */\nexport { recordMatchesPairs, findMatchingIdsByPairs } from '../../kernel/match-pairs.js'\n"],"mappings":";AAsCO,SAAS,eAAe,OAA2C;AACxE,SAAO,CAAC,GAAG,IAAI,IAAI,MAAM,QAAQ,CAAC,MAAO,EAAE,MAAM,CAAC,EAAE,IAAI,UAAU,IAAI,CAAC,CAAE,CAAC,CAAC;AAC7E;AAeO,SAAS,mBAAmB,WAAuE;AACxG,MAAI,cAAc,OAAW,QAAO,CAAC;AACrC,SAAO,UAAU,IAAI,CAAC,OAAO;AAAA,IAC3B,YAAY,EAAE;AAAA,IACd,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,MAAM,IAAI,EAAE,GAAI,CAAC;AAAA,IAC5C,GAAI,EAAE,cAAc,SAAY,EAAE,WAAW,EAAE,UAAU,IAAI,CAAC;AAAA,EAChE,EAAE;AACJ;AAEA,IAAM,SAAS,CAAC,MACb,OAAO,MAAM,YAAY,OAAO,MAAM,WAAY,OAAO,CAAC,IAAI;AA2BjE,eAAsB,aACpB,OACA,WACA,QACA,QACyD;AACzD,QAAM,MAA+C,CAAC;AACtD,aAAW,QAAQ,OAAO;AACxB,UAAM,MAAM,KAAK,SAAS,OAAO,YAAY,OAAO,SAAS,KAAK,IAAI,CAAC;AACvE,QAAI,QAAQ,KAAM,QAAO;AACzB,QAAI,KAAK,QAAQ,QAAW;AAC1B,UAAI,KAAK,EAAE,OAAO,KAAK,IAAI,OAAO,IAAI,CAAC;AACvC;AAAA,IACF;AACA,UAAM,eAAe,MAAM,OAAO,KAAK,IAAI,YAAY,KAAK,IAAI,MAAM,GAAG;AACzE,QAAI,iBAAiB,KAAM,QAAO;AAClC,UAAM,SAAS,OAAO,aAAa,KAAK,IAAI,EAAE,CAAC;AAC/C,QAAI,WAAW,KAAM,QAAO;AAC5B,QAAI,KAAK,EAAE,OAAO,KAAK,IAAI,OAAO,OAAO,CAAC;AAAA,EAC5C;AACA,SAAO;AACT;AAgBO,SAAS,sBACd,OACA,YACA,QACgD;AAChD,QAAM,MAA+C,CAAC;AACtD,aAAW,QAAQ,OAAO;AACxB,QAAI,KAAK,KAAK,eAAe,WAAY;AACzC,UAAM,IAAI,OAAO,SAAS,KAAK,IAAI,EAAE,CAAC;AACtC,QAAI,MAAM,KAAM,QAAO;AACvB,QAAI,KAAK,EAAE,OAAO,KAAK,IAAI,OAAO,EAAE,CAAC;AAAA,EACvC;AACA,SAAO,IAAI,SAAS,IAAI,MAAM;AAChC;AAGO,SAAS,UACd,GACA,GACS;AACT,MAAI,MAAM,QAAQ,MAAM,KAAM,QAAO,MAAM;AAC3C,SAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,CAAC,EAAG,SAAS,EAAE,UAAU,EAAE,CAAC,EAAG,KAAK;AACtG;","names":[]}
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-5D2ALSM5.js";
|
|
4
4
|
import {
|
|
5
5
|
RecordCodec
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-77K4PG6P.js";
|
|
7
7
|
|
|
8
8
|
// src/with-formula/materialized-views/stale.ts
|
|
9
|
-
var loadMVExecutor = lazy(() => import("./executor-
|
|
9
|
+
var loadMVExecutor = lazy(() => import("./executor-PUAO6AKJ.js"));
|
|
10
10
|
var _staleByRegistry = /* @__PURE__ */ new WeakMap();
|
|
11
11
|
function markMVStale(registry, mvName) {
|
|
12
12
|
let set = _staleByRegistry.get(registry);
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
clearMVStale,
|
|
135
135
|
clearMVStaleFully
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-FMZY5Q6L.js.map
|
|
@@ -201,7 +201,7 @@ var engineCtx = (ctx) => ({
|
|
|
201
201
|
function withClassified() {
|
|
202
202
|
return {
|
|
203
203
|
async reveal(ctx, id, field) {
|
|
204
|
-
const { revealSealedField } = await import("./reveal-
|
|
204
|
+
const { revealSealedField } = await import("./reveal-67RDQRIN.js");
|
|
205
205
|
const value = await revealSealedField({
|
|
206
206
|
collection: ctx.collection,
|
|
207
207
|
encrypted: ctx.encrypted,
|
|
@@ -213,26 +213,26 @@ function withClassified() {
|
|
|
213
213
|
return value;
|
|
214
214
|
},
|
|
215
215
|
async verify(ctx, id, field, candidate) {
|
|
216
|
-
const { verifyDigestField } = await import("./verify-
|
|
216
|
+
const { verifyDigestField } = await import("./verify-KOV2G5D6.js");
|
|
217
217
|
const verdict = await verifyDigestField(engineCtx(ctx), id, field, candidate, policyOf(ctx.spec));
|
|
218
218
|
await ctx.onAccess?.("verify", id);
|
|
219
219
|
return verdict;
|
|
220
220
|
},
|
|
221
221
|
async verifyText(ctx, id, field, candidate) {
|
|
222
|
-
const { verifyTextField } = await import("./verify-
|
|
222
|
+
const { verifyTextField } = await import("./verify-KOV2G5D6.js");
|
|
223
223
|
const verdict = await verifyTextField(engineCtx(ctx), id, field, candidate, ctx.spec.verifyNormalize ?? "password");
|
|
224
224
|
await ctx.onAccess?.("verify", id);
|
|
225
225
|
return verdict;
|
|
226
226
|
},
|
|
227
227
|
async matchGroup(ctx, id, answers, opts) {
|
|
228
|
-
const { matchGroupFields } = await import("./verify-
|
|
228
|
+
const { matchGroupFields } = await import("./verify-KOV2G5D6.js");
|
|
229
229
|
const members = (ctx.groupMembers ?? []).map((m) => ({ field: m.field, policy: policyOf(m.spec) }));
|
|
230
230
|
const result = await matchGroupFields(engineCtx(ctx), id, answers, members, opts);
|
|
231
231
|
await ctx.onAccess?.("verify", id);
|
|
232
232
|
return result;
|
|
233
233
|
},
|
|
234
234
|
async computeTarget(ctx, field, candidate, costByte) {
|
|
235
|
-
const { computeBidxTarget } = await import("./find-
|
|
235
|
+
const { computeBidxTarget } = await import("./find-2ABFCZX4.js");
|
|
236
236
|
const dek = await ctx.getDEK();
|
|
237
237
|
return computeBidxTarget(candidate, policyOf(ctx.spec).normalize, dek, ctx.collection, field, costByte);
|
|
238
238
|
}
|
|
@@ -244,4 +244,4 @@ export {
|
|
|
244
244
|
classified,
|
|
245
245
|
withClassified
|
|
246
246
|
};
|
|
247
|
-
//# sourceMappingURL=chunk-
|
|
247
|
+
//# sourceMappingURL=chunk-FXBIP2WD.js.map
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
readDirectoryConfig,
|
|
6
6
|
readUserVisibility,
|
|
7
7
|
saveUserEnvelope
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KG7TZKZG.js";
|
|
9
9
|
import {
|
|
10
10
|
parseDekKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JMGDHKQF.js";
|
|
12
12
|
import {
|
|
13
13
|
envelopeOpensUnderAny,
|
|
14
14
|
rekeyBlobSet,
|
|
15
15
|
rekeyEnvelopeIfNeeded
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-77K4PG6P.js";
|
|
17
17
|
import {
|
|
18
18
|
buildRecordEnvelope
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
20
20
|
import {
|
|
21
21
|
base64ToBuffer,
|
|
22
22
|
bufferToBase64,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
generateSalt,
|
|
32
32
|
unwrapKey,
|
|
33
33
|
wrapKey
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SL3JAAKN.js";
|
|
35
35
|
import {
|
|
36
36
|
NOYDB_KEYRING_VERSION
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7MG7SJT7.js";
|
|
38
38
|
import {
|
|
39
39
|
BLOB_ADDRESS_KEY_ID,
|
|
40
40
|
DirectoryDisabledError,
|
|
@@ -51,7 +51,21 @@ import {
|
|
|
51
51
|
USER_ENVELOPE_COLLECTION,
|
|
52
52
|
ValidationError,
|
|
53
53
|
WrongPromptError
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
55
|
+
|
|
56
|
+
// src/with-party/team/roster-epoch.ts
|
|
57
|
+
function assertRosterEpochCurrent(found, expected, userId) {
|
|
58
|
+
if (expected === void 0) return;
|
|
59
|
+
if (found === void 0) {
|
|
60
|
+
throw new KeyringTamperedError({ userId, reason: "roster-epoch-absent" });
|
|
61
|
+
}
|
|
62
|
+
if (!Number.isFinite(found) || found < expected) {
|
|
63
|
+
throw new KeyringTamperedError({ userId, reason: "roster-epoch-rewound" });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function nextRosterEpoch(current) {
|
|
67
|
+
return Number.isFinite(current) ? current + 1 : 1;
|
|
68
|
+
}
|
|
55
69
|
|
|
56
70
|
// src/with-party/team/roster-tag.ts
|
|
57
71
|
function stable(value) {
|
|
@@ -89,7 +103,24 @@ function rosterCanonical(file) {
|
|
|
89
103
|
pending_dek_slots: Object.keys(file.pending_deks ?? {}).sort(),
|
|
90
104
|
expires_at: file.expires_at ?? null,
|
|
91
105
|
export_capability: file.export_capability ?? null,
|
|
92
|
-
import_capability: file.import_capability ?? null
|
|
106
|
+
import_capability: file.import_capability ?? null,
|
|
107
|
+
// #1097 — the roster epoch, bound ONLY WHEN PRESENT.
|
|
108
|
+
//
|
|
109
|
+
// The conditional spread is the entire backward-compatibility story, not a
|
|
110
|
+
// style choice. `stable()` drops `undefined`, so a file written before the
|
|
111
|
+
// epoch existed produces the byte-identical canonical string it always did
|
|
112
|
+
// and its roster tag still verifies. Writing `file.roster_epoch ?? null` —
|
|
113
|
+
// the shape every other optional field above uses — would have changed that
|
|
114
|
+
// string for every existing keyring, failed every existing tag, and
|
|
115
|
+
// rendered every existing vault unopenable. #1115 took exactly that cost
|
|
116
|
+
// deliberately; there is no reason to take it again for a field that can be
|
|
117
|
+
// additive.
|
|
118
|
+
//
|
|
119
|
+
// A PRESENT epoch is authenticated: stripping it changes the canonical and
|
|
120
|
+
// the tag stops verifying, so a store cannot downgrade a file to the
|
|
121
|
+
// no-epoch shape. It can only replay a file that genuinely never had one,
|
|
122
|
+
// which is why absence must read as UNKNOWN rather than as zero.
|
|
123
|
+
...file.roster_epoch !== void 0 ? { roster_epoch: file.roster_epoch } : {}
|
|
93
124
|
});
|
|
94
125
|
}
|
|
95
126
|
async function mintRosterTag(file, rosterKey) {
|
|
@@ -531,13 +562,14 @@ async function createOwnerKeyring(store, vault, opts) {
|
|
|
531
562
|
[BLOB_ADDRESS_KEY_ID]: wrappedBlobAddressKey
|
|
532
563
|
}
|
|
533
564
|
};
|
|
565
|
+
const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(void 0) };
|
|
534
566
|
const keyringFile = {
|
|
535
567
|
_noydb_keyring: NOYDB_KEYRING_VERSION,
|
|
536
|
-
...
|
|
568
|
+
...withEpoch,
|
|
537
569
|
salt: bufferToBase64(salt),
|
|
538
570
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
539
571
|
canary,
|
|
540
|
-
roster_tag: await mintRosterTag(
|
|
572
|
+
roster_tag: await mintRosterTag(withEpoch, rosterKey),
|
|
541
573
|
// The presence of this block is what makes the keyring an echo keyring —
|
|
542
574
|
// `deriveKekForKeyring` reads it to refuse a single-string unlock (AG-1).
|
|
543
575
|
...typeof secret !== "string" ? {
|
|
@@ -637,15 +669,16 @@ async function grant(store, vault, callerKeyring, options) {
|
|
|
637
669
|
...options.importCapability !== void 0 && { import_capability: options.importCapability }
|
|
638
670
|
};
|
|
639
671
|
const authorityWithDeks = { ...authority, deks: wrappedDeks };
|
|
672
|
+
const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(previousGrantFound?.file.roster_epoch) };
|
|
640
673
|
const keyringFile = {
|
|
641
674
|
_noydb_keyring: NOYDB_KEYRING_VERSION,
|
|
642
|
-
...
|
|
675
|
+
...withEpoch,
|
|
643
676
|
salt: bufferToBase64(newSalt),
|
|
644
677
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
645
678
|
canary,
|
|
646
679
|
// The grantee's own copy of the roster key rode in via the `_`-prefix
|
|
647
680
|
// propagation loop above, so they can verify this tag on first unlock.
|
|
648
|
-
roster_tag: await mintRosterTag(
|
|
681
|
+
roster_tag: await mintRosterTag(withEpoch, callerRosterKey)
|
|
649
682
|
};
|
|
650
683
|
await writeKeyringFile(store, vault, options.userId, keyringFile);
|
|
651
684
|
if (previousDekNames !== null && options.userId !== callerKeyring.userId) {
|
|
@@ -873,7 +906,8 @@ async function updateKeyringIdentity(store, vault, callerKeyring, options) {
|
|
|
873
906
|
},
|
|
874
907
|
...options.permissions !== void 0 && { permissions: options.permissions }
|
|
875
908
|
};
|
|
876
|
-
const
|
|
909
|
+
const withEpoch = { ...edited, roster_epoch: nextRosterEpoch(target.roster_epoch) };
|
|
910
|
+
const next = { ...withEpoch, roster_tag: await mintRosterTag(withEpoch, rosterKey) };
|
|
877
911
|
await writeKeyringFile(store, vault, options.userId, next);
|
|
878
912
|
}
|
|
879
913
|
var HISTORY_COLLECTION = "_history";
|
|
@@ -1011,9 +1045,10 @@ async function rotateKeys(store, vault, callerKeyring, opts) {
|
|
|
1011
1045
|
deks: updatedDeks,
|
|
1012
1046
|
permissions: updatedPermissions
|
|
1013
1047
|
};
|
|
1048
|
+
const withEpoch = { ...edited, roster_epoch: nextRosterEpoch(userKeyringFile.roster_epoch) };
|
|
1014
1049
|
const updatedKeyring = {
|
|
1015
|
-
...
|
|
1016
|
-
roster_tag: await mintRosterTag(
|
|
1050
|
+
...withEpoch,
|
|
1051
|
+
roster_tag: await mintRosterTag(withEpoch, callerRosterKey)
|
|
1017
1052
|
};
|
|
1018
1053
|
await writeKeyringFile(store, vault, userId, updatedKeyring);
|
|
1019
1054
|
}
|
|
@@ -1050,13 +1085,14 @@ async function changeSecret(store, vault, keyring, opts) {
|
|
|
1050
1085
|
...existingAuthority?.import_capability !== void 0 && { import_capability: existingAuthority.import_capability }
|
|
1051
1086
|
};
|
|
1052
1087
|
const authorityWithDeks = { ...authority, deks: wrappedDeks };
|
|
1088
|
+
const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(existingAuthority?.roster_epoch) };
|
|
1053
1089
|
const keyringFile = {
|
|
1054
1090
|
_noydb_keyring: NOYDB_KEYRING_VERSION,
|
|
1055
|
-
...
|
|
1091
|
+
...withEpoch,
|
|
1056
1092
|
salt: bufferToBase64(newSalt),
|
|
1057
1093
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1058
1094
|
canary,
|
|
1059
|
-
roster_tag: await mintRosterTag(
|
|
1095
|
+
roster_tag: await mintRosterTag(withEpoch, rosterKey)
|
|
1060
1096
|
};
|
|
1061
1097
|
await writeKeyringFile(store, vault, keyring.userId, keyringFile);
|
|
1062
1098
|
return {
|
|
@@ -1124,15 +1160,16 @@ async function buildRecipientKeyringFile(callerKeyring, recipient) {
|
|
|
1124
1160
|
...recipient.expiresAt !== void 0 ? { expires_at: recipient.expiresAt } : {}
|
|
1125
1161
|
};
|
|
1126
1162
|
const authorityWithDeks = { ...authority, deks: wrappedDeks };
|
|
1163
|
+
const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(void 0) };
|
|
1127
1164
|
return {
|
|
1128
1165
|
_noydb_keyring: NOYDB_KEYRING_VERSION,
|
|
1129
|
-
...
|
|
1166
|
+
...withEpoch,
|
|
1130
1167
|
salt: bufferToBase64(newSalt),
|
|
1131
1168
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1132
1169
|
canary,
|
|
1133
1170
|
// The recipient's copy of the roster key rode in via the `_`-prefix
|
|
1134
1171
|
// propagation loop above, so the slot verifies on first unlock.
|
|
1135
|
-
roster_tag: await mintRosterTag(
|
|
1172
|
+
roster_tag: await mintRosterTag(withEpoch, rosterKey),
|
|
1136
1173
|
// The presence of this block is what makes the recipient's slot an
|
|
1137
1174
|
// echo keyring — mirrors `createOwnerKeyring`'s same dance so the
|
|
1138
1175
|
// ceremony (prompt → echo → key) travels with the pod, not just a
|
|
@@ -1291,13 +1328,14 @@ async function persistKeyring(store, vault, keyring) {
|
|
|
1291
1328
|
deks: wrappedDeks,
|
|
1292
1329
|
...Object.keys(wrappedPending).length > 0 ? { pending_deks: wrappedPending } : {}
|
|
1293
1330
|
};
|
|
1331
|
+
const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(existingFound?.file.roster_epoch) };
|
|
1294
1332
|
const keyringFile = {
|
|
1295
1333
|
_noydb_keyring: NOYDB_KEYRING_VERSION,
|
|
1296
|
-
...
|
|
1334
|
+
...withEpoch,
|
|
1297
1335
|
salt: bufferToBase64(keyring.salt),
|
|
1298
1336
|
created_at: existingCreatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
1299
1337
|
canary,
|
|
1300
|
-
roster_tag: await mintRosterTag(
|
|
1338
|
+
roster_tag: await mintRosterTag(withEpoch, rosterKey),
|
|
1301
1339
|
...keyring.authenticators.length > 0 && { authenticators: keyring.authenticators },
|
|
1302
1340
|
...keyring.policy !== void 0 && { policy: keyring.policy },
|
|
1303
1341
|
...existingEcho !== void 0 && { echo: existingEcho }
|
|
@@ -1342,6 +1380,11 @@ function resolvePermissions(role, explicit) {
|
|
|
1342
1380
|
return explicit ?? {};
|
|
1343
1381
|
}
|
|
1344
1382
|
async function writeKeyringFile(store, vault, userId, keyringFile) {
|
|
1383
|
+
if (keyringFile.roster_epoch === void 0) {
|
|
1384
|
+
throw new Error(
|
|
1385
|
+
`writeKeyringFile: refusing to write a keyring for "${userId}" with no roster_epoch (#1097). Stamp it with nextRosterEpoch(previous) onto the authority object BEFORE minting the roster tag, so it is covered by rosterCanonical.`
|
|
1386
|
+
);
|
|
1387
|
+
}
|
|
1345
1388
|
const envelope = buildRecordEnvelope(
|
|
1346
1389
|
{ collection: "_keyring", id: userId, version: 1 },
|
|
1347
1390
|
{ iv: "", data: JSON.stringify(keyringFile) }
|
|
@@ -1350,6 +1393,8 @@ async function writeKeyringFile(store, vault, userId, keyringFile) {
|
|
|
1350
1393
|
}
|
|
1351
1394
|
|
|
1352
1395
|
export {
|
|
1396
|
+
assertRosterEpochCurrent,
|
|
1397
|
+
nextRosterEpoch,
|
|
1353
1398
|
mintRosterTag,
|
|
1354
1399
|
assertRosterAuthenticated,
|
|
1355
1400
|
assertRosterTagValid,
|
|
@@ -1395,4 +1440,4 @@ export {
|
|
|
1395
1440
|
hasImportCapability,
|
|
1396
1441
|
evaluateImportCapability
|
|
1397
1442
|
};
|
|
1398
|
-
//# sourceMappingURL=chunk-
|
|
1443
|
+
//# sourceMappingURL=chunk-G56KBWFY.js.map
|