@noy-db/hub 0.6.0-pre.8 → 0.6.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 +7079 -0
- package/codemods/0.6.0-pre.json +211 -0
- package/dist/api-6X2VLZ7J.js +20 -0
- package/dist/attestation/index.js +19 -19
- package/dist/{backup-KULFZ2T4.js → backup-VL4GRIEW.js} +36 -18
- package/dist/backup-VL4GRIEW.js.map +1 -0
- package/dist/blobs/index.js +22 -20
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +35 -35
- package/dist/{chunk-KUDZVJKQ.js → chunk-22GR3O4J.js} +2 -2
- package/dist/{chunk-CCZJJ4I2.js → chunk-2CBFYXJX.js} +6 -6
- package/dist/{chunk-JJNOLSG5.js → chunk-2J5IT37K.js} +15 -16
- package/dist/chunk-2J5IT37K.js.map +1 -0
- package/dist/{chunk-PNKHAKQ7.js → chunk-2ZCWHCLF.js} +17 -10
- package/dist/chunk-2ZCWHCLF.js.map +1 -0
- package/dist/{chunk-2BMRJ6LQ.js → chunk-2ZT4INZ4.js} +8 -11
- package/dist/{chunk-2BMRJ6LQ.js.map → chunk-2ZT4INZ4.js.map} +1 -1
- package/dist/{chunk-FAXZQ5UF.js → chunk-323MN67Z.js} +2 -2
- package/dist/{chunk-VMCCGUQB.js → chunk-36CEG6CM.js} +2 -2
- package/dist/{chunk-PDLLCOGD.js → chunk-3OE2QNSM.js} +20 -17
- package/dist/chunk-3OE2QNSM.js.map +1 -0
- package/dist/{chunk-AHLJSVRL.js → chunk-3YGUHUJA.js} +5 -7
- package/dist/chunk-3YGUHUJA.js.map +1 -0
- package/dist/{chunk-ZJADGNYF.js → chunk-4AOERLTV.js} +1 -1
- package/dist/chunk-4AOERLTV.js.map +1 -0
- package/dist/{chunk-J7FM3RAU.js → chunk-4ATF4BLF.js} +87 -34
- package/dist/chunk-4ATF4BLF.js.map +1 -0
- package/dist/{chunk-747LRSOO.js → chunk-4K6BIMLF.js} +2 -2
- package/dist/{chunk-PXCBVDFY.js → chunk-5ATC6UT4.js} +40 -7
- package/dist/chunk-5ATC6UT4.js.map +1 -0
- package/dist/{chunk-4GZ6XOVW.js → chunk-5F7BZAGV.js} +44 -42
- package/dist/chunk-5F7BZAGV.js.map +1 -0
- package/dist/{chunk-FNSMZQS4.js → chunk-5IHGJHWC.js} +2 -2
- package/dist/{chunk-4I72F5DF.js → chunk-5LZZQMIC.js} +11 -14
- package/dist/chunk-5LZZQMIC.js.map +1 -0
- package/dist/{chunk-JXIDGFKS.js → chunk-5O5ZSW7N.js} +4 -2
- package/dist/chunk-5O5ZSW7N.js.map +1 -0
- package/dist/{chunk-CEJWMBXO.js → chunk-5OT4G5N5.js} +6 -2
- package/dist/chunk-5OT4G5N5.js.map +1 -0
- package/dist/{chunk-GAG7QOVO.js → chunk-64WHKBMP.js} +53 -18
- package/dist/chunk-64WHKBMP.js.map +1 -0
- package/dist/{chunk-7TSYBD3E.js → chunk-65JXA63J.js} +2 -2
- package/dist/{chunk-Z45YRGFO.js → chunk-6NR36UNB.js} +2 -2
- package/dist/{chunk-W77KZHCW.js → chunk-6RH7PRTL.js} +16 -17
- package/dist/chunk-6RH7PRTL.js.map +1 -0
- package/dist/{chunk-3JVXVJ7L.js → chunk-7OBIBPCV.js} +10 -10
- package/dist/{chunk-AR2JDFAE.js → chunk-7Q3RHOA5.js} +2 -2
- package/dist/chunk-7ZGPQOFV.js +190 -0
- package/dist/chunk-7ZGPQOFV.js.map +1 -0
- package/dist/{chunk-QULVCV3M.js → chunk-AJGGBXWA.js} +4 -4
- package/dist/{chunk-CADUYBQD.js → chunk-ATL3ZVXT.js} +2 -2
- package/dist/{chunk-DMQCLZ4Z.js → chunk-ATY3ZASK.js} +2 -2
- package/dist/{chunk-4HDYQL3J.js → chunk-B4CRUZPR.js} +2 -2
- package/dist/{chunk-IMZLOJTK.js → chunk-BMU2DS3S.js} +30 -21
- package/dist/chunk-BMU2DS3S.js.map +1 -0
- package/dist/{chunk-6SAFL5YE.js → chunk-BZ3WMOYX.js} +3 -3
- package/dist/{chunk-UHXCLPGC.js → chunk-C3XWJCG7.js} +2 -2
- package/dist/chunk-C3XWJCG7.js.map +1 -0
- package/dist/{chunk-HXGUIPQB.js → chunk-CKKN25P2.js} +3 -3
- package/dist/{chunk-3URQC7EH.js → chunk-CXPOG3ZY.js} +355 -132
- package/dist/chunk-CXPOG3ZY.js.map +1 -0
- package/dist/{chunk-3FSX6LDG.js → chunk-D2YFQ7XG.js} +18 -3
- package/dist/{chunk-3FSX6LDG.js.map → chunk-D2YFQ7XG.js.map} +1 -1
- package/dist/{chunk-52JPHN5N.js → chunk-D6SXRMZZ.js} +27 -149
- package/dist/chunk-D6SXRMZZ.js.map +1 -0
- package/dist/{chunk-2DHSSLOD.js → chunk-DECNV4QK.js} +13 -15
- package/dist/chunk-DECNV4QK.js.map +1 -0
- package/dist/{chunk-6BU3L4UE.js → chunk-DNKVKO7K.js} +7 -10
- package/dist/chunk-DNKVKO7K.js.map +1 -0
- package/dist/{chunk-6HFM7EIT.js → chunk-EHRIDNZX.js} +2 -2
- package/dist/{chunk-3737A6EA.js → chunk-EHW7NLGD.js} +127 -31
- package/dist/chunk-EHW7NLGD.js.map +1 -0
- package/dist/{chunk-BEFVYAR5.js → chunk-EQOTJL76.js} +4 -4
- package/dist/chunk-EQOTJL76.js.map +1 -0
- package/dist/{chunk-E6427JU2.js → chunk-EV2TDHQZ.js} +19 -3
- package/dist/chunk-EV2TDHQZ.js.map +1 -0
- package/dist/{chunk-WFUIE565.js → chunk-FNYCT27B.js} +17 -14
- package/dist/chunk-FNYCT27B.js.map +1 -0
- package/dist/{chunk-RTAMLDWP.js → chunk-FU5VYEYK.js} +2 -2
- package/dist/chunk-FX3UIDCS.js +66 -0
- package/dist/chunk-FX3UIDCS.js.map +1 -0
- package/dist/{chunk-7F4DBNSP.js → chunk-GANFIM2M.js} +135 -18
- package/dist/chunk-GANFIM2M.js.map +1 -0
- package/dist/{chunk-4VUPLMZ6.js → chunk-GCU42IG7.js} +66 -71
- package/dist/chunk-GCU42IG7.js.map +1 -0
- package/dist/{chunk-RXYYFSBB.js → chunk-GKTW3KLV.js} +4 -4
- package/dist/chunk-HK67PX4J.js +27 -0
- package/dist/chunk-HK67PX4J.js.map +1 -0
- package/dist/{chunk-OF3L2SD6.js → chunk-HOPNIR5R.js} +2 -2
- package/dist/{chunk-WLZ47GSL.js → chunk-HSJBJIB2.js} +12 -10
- package/dist/{chunk-WLZ47GSL.js.map → chunk-HSJBJIB2.js.map} +1 -1
- package/dist/{chunk-ADW22QSB.js → chunk-HWI7GHJZ.js} +4 -4
- package/dist/{chunk-GQ3BX5EA.js → chunk-I3ISCYT7.js} +2 -2
- package/dist/{chunk-YJ6IONGA.js → chunk-IWKCJCLP.js} +11 -3
- package/dist/{chunk-YJ6IONGA.js.map → chunk-IWKCJCLP.js.map} +1 -1
- package/dist/{chunk-NJDQ4YSV.js → chunk-IWQPYT6S.js} +4 -4
- package/dist/{chunk-JRKZTEZZ.js → chunk-J6I5VR6P.js} +444 -73
- package/dist/chunk-J6I5VR6P.js.map +1 -0
- package/dist/{chunk-2Z3NCLNX.js → chunk-JHYKSMVX.js} +7 -7
- package/dist/{chunk-6FJWSWFT.js → chunk-JIHWBKMQ.js} +3 -3
- package/dist/{chunk-YAWK6AWF.js → chunk-JKATP6OE.js} +2 -2
- package/dist/{chunk-PL2GHSCM.js → chunk-JMJSCI7U.js} +157 -90
- package/dist/chunk-JMJSCI7U.js.map +1 -0
- package/dist/{chunk-Q6TEJXBX.js → chunk-JXHNUYQO.js} +31 -49
- package/dist/chunk-JXHNUYQO.js.map +1 -0
- package/dist/{chunk-WK5XUYYF.js → chunk-JYPRZWCZ.js} +473 -231
- package/dist/chunk-JYPRZWCZ.js.map +1 -0
- package/dist/{chunk-5ZKS6ZE2.js → chunk-K6CPIK3R.js} +4 -4
- package/dist/chunk-K6CPIK3R.js.map +1 -0
- package/dist/{chunk-CDB2HVQW.js → chunk-KM6ZXG7U.js} +14 -15
- package/dist/chunk-KM6ZXG7U.js.map +1 -0
- package/dist/{chunk-DG27IUVI.js → chunk-LC6NE4IQ.js} +2 -2
- package/dist/{chunk-WASHZV34.js → chunk-LIR2DJWP.js} +63 -25
- package/dist/chunk-LIR2DJWP.js.map +1 -0
- package/dist/{chunk-VZ3XFUQ7.js → chunk-LUYPYCHY.js} +16 -22
- package/dist/chunk-LUYPYCHY.js.map +1 -0
- package/dist/{chunk-G6S5VVHP.js → chunk-M7WBE3OR.js} +10 -10
- package/dist/chunk-M7WBE3OR.js.map +1 -0
- package/dist/{chunk-VJFMXYKP.js → chunk-MPKP6L5E.js} +2 -2
- package/dist/{chunk-IGJCYUT5.js → chunk-NSITFOCJ.js} +1 -1
- package/dist/chunk-NSITFOCJ.js.map +1 -0
- package/dist/{chunk-FUHKW252.js → chunk-OCJ3JA4O.js} +2 -2
- package/dist/{chunk-VCETL77O.js → chunk-ONPVHX2Y.js} +36 -7
- package/dist/chunk-ONPVHX2Y.js.map +1 -0
- package/dist/{chunk-WLYIROCJ.js → chunk-OQMCFHUX.js} +2 -2
- package/dist/{chunk-JRCYZEHU.js → chunk-OR2FYRYR.js} +2 -2
- package/dist/{chunk-HNHCQ556.js → chunk-PFWE7FJG.js} +2 -2
- package/dist/{chunk-NPP5R7FF.js → chunk-PJX72ICF.js} +22 -18
- package/dist/chunk-PJX72ICF.js.map +1 -0
- package/dist/{chunk-U5O6GIWZ.js → chunk-POFYIGQ2.js} +3 -3
- package/dist/{chunk-35EBKWQU.js → chunk-QH47SQLD.js} +4 -4
- package/dist/{chunk-FZ6NYJ7L.js → chunk-QQRRKO7W.js} +11 -8
- package/dist/chunk-QQRRKO7W.js.map +1 -0
- package/dist/{chunk-HVQGCKY4.js → chunk-QVXZFJBU.js} +2 -2
- package/dist/{chunk-FMQJZH4R.js → chunk-RDB66EKD.js} +6 -6
- package/dist/{chunk-X56RTUK3.js → chunk-RJZQ2PVD.js} +3 -3
- package/dist/{chunk-SUFG5E73.js → chunk-RPRASGEY.js} +2 -2
- package/dist/{chunk-XWX7GL56.js → chunk-S2I5MYSA.js} +7 -10
- package/dist/chunk-S2I5MYSA.js.map +1 -0
- package/dist/{chunk-FFDNKRCY.js → chunk-S6PJ6ZKE.js} +2 -2
- package/dist/chunk-S6PJ6ZKE.js.map +1 -0
- package/dist/{chunk-JIUVJ4M7.js → chunk-S7PM7Z4K.js} +3 -3
- package/dist/{chunk-55LKVALY.js → chunk-T7IR4N2S.js} +1 -3
- package/dist/chunk-T7IR4N2S.js.map +1 -0
- package/dist/{chunk-N35NC4JH.js → chunk-TKBB62DN.js} +2 -2
- package/dist/{chunk-YPYHVOXP.js → chunk-UJ4Z67UQ.js} +2 -2
- package/dist/chunk-UJ4Z67UQ.js.map +1 -0
- package/dist/{chunk-7MNBICB5.js → chunk-W3HAIN6U.js} +16 -14
- package/dist/chunk-W3HAIN6U.js.map +1 -0
- package/dist/{chunk-4UVDI4XE.js → chunk-WPZ5FVAS.js} +4 -4
- package/dist/{chunk-MSWYQLMQ.js → chunk-XINT4VJA.js} +2 -2
- package/dist/{chunk-7G6VDWXB.js → chunk-XPEPMK4Y.js} +3 -3
- package/dist/chunk-XPEPMK4Y.js.map +1 -0
- package/dist/{chunk-W3TVWF6N.js → chunk-YCGLAANM.js} +2 -2
- package/dist/{chunk-O2ERS4UJ.js → chunk-YTUFV7U7.js} +80 -51
- package/dist/chunk-YTUFV7U7.js.map +1 -0
- package/dist/{chunk-FDX7OWWI.js → chunk-YYV53EHO.js} +2 -2
- package/dist/{chunk-HNGSV2YC.js → chunk-Z3BZXPRO.js} +67 -10
- package/dist/chunk-Z3BZXPRO.js.map +1 -0
- package/dist/{chunk-6NVPFKN3.js → chunk-ZIMQDXTQ.js} +92 -35
- package/dist/chunk-ZIMQDXTQ.js.map +1 -0
- package/dist/{chunk-5JY5TSVY.js → chunk-ZJUZOJVW.js} +25 -31
- package/dist/chunk-ZJUZOJVW.js.map +1 -0
- package/dist/{chunk-3IXIU6FP.js → chunk-ZY6P7M52.js} +7 -10
- package/dist/chunk-ZY6P7M52.js.map +1 -0
- package/dist/{chunk-H73G4XF4.js → chunk-ZYZJLYNS.js} +7 -11
- package/dist/chunk-ZYZJLYNS.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-2KJAXRRO.js → classified-marker-AZDSDG6V.js} +3 -3
- package/dist/collection-facade-WSUAYFJ4.js +45 -0
- package/dist/{computed-6G5M3UPH.js → computed-VG2PCM4L.js} +3 -3
- package/dist/consent/index.js +10 -10
- package/dist/cover/index.js +10 -3
- package/dist/custody/index.js +12 -11
- package/dist/{dead-filter-DCB62VWW.js → dead-filter-JNQNB3TA.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-MO7YZYJS.js → delegation-5F36DRDH.js} +24 -23
- package/dist/delegation-5F36DRDH.js.map +1 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-MPOGZ4NR.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-MJ6SHB3Y.js → dispatch-3ZA733EY.js} +18 -18
- package/dist/{dispatch-FZEAWKVM.js → dispatch-TNM5CRLZ.js} +9 -6
- package/dist/dispatch-TNM5CRLZ.js.map +1 -0
- package/dist/{enclave-JU4YIEPB.js → enclave-Y2ALNDRD.js} +31 -9
- package/dist/executor-BBEEUFO3.js +9 -0
- package/dist/executor-G6G3YEWR.js +9 -0
- package/dist/executor-ZUTUMTPA.js +29 -0
- package/dist/export-accessible-S3KEB763.js +23 -0
- package/dist/extract-partition-KVCTSUVE.js +38 -0
- package/dist/{fanout-sidecar-NNAJQXMX.js → fanout-sidecar-3QZU7ZZX.js} +18 -27
- package/dist/fanout-sidecar-3QZU7ZZX.js.map +1 -0
- package/dist/find-V4FN5ITT.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +7 -7
- package/dist/history/index.js +23 -20
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +30 -13
- package/dist/index.js +180 -188
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -4
- package/dist/introspection/index.js +11 -11
- package/dist/issue-5CFBWBRX.js +19 -0
- package/dist/kernel/collection.d.ts +8 -2
- package/dist/kernel/constants.d.ts +36 -0
- package/dist/kernel/enclave/crypto.d.ts +52 -4
- package/dist/kernel/enclave/index.d.ts +10 -3
- package/dist/kernel/enclave/record-aad.d.ts +131 -0
- package/dist/kernel/enclave/record-envelope.d.ts +76 -0
- package/dist/kernel/enclave/record-keys/envelope-body.d.ts +34 -2
- package/dist/kernel/enclave/record-keys/lifecycle.d.ts +22 -5
- package/dist/kernel/enclave/record-keys/record-codec.d.ts +47 -14
- package/dist/kernel/enclave/record-keys/rekey-blob.d.ts +88 -0
- package/dist/kernel/enclave/record-keys/rekey.d.ts +91 -0
- package/dist/kernel/enclave/record-keys/tombstone.d.ts +3 -2
- package/dist/kernel/errors.d.ts +132 -12
- package/dist/kernel/merge-authority.d.ts +25 -0
- package/dist/kernel/noydb.d.ts +27 -4
- package/dist/kernel/query/builder.d.ts +51 -4
- package/dist/kernel/query/join.d.ts +27 -0
- package/dist/kernel/query/live.d.ts +31 -9
- package/dist/kernel/query/predicate.d.ts +9 -0
- package/dist/kernel/refs.d.ts +3 -1
- package/dist/kernel/sync-policy.d.ts +0 -2
- package/dist/kernel/tier-visibility.d.ts +34 -0
- package/dist/kernel/types.d.ts +111 -13
- package/dist/kernel/vault.d.ts +14 -8
- package/dist/kernel/via/index.d.ts +11 -2
- package/dist/kernel/via/reconcile.d.ts +12 -0
- package/dist/{ledger-AETNF4OM.js → ledger-MQIIOTZB.js} +11 -11
- package/dist/liberate-LW7OKVBH.js +25 -0
- package/dist/{link-set-E5HNY67I.js → link-set-5PJBBR63.js} +11 -11
- package/dist/{managed-secret-CWQ6PND5.js → managed-secret-ETDG6AAE.js} +11 -3
- package/dist/materialized-views/index.js +24 -24
- package/dist/migrate-cek-V3VDRV24.js +19 -0
- package/dist/migrate-cek-V3VDRV24.js.map +1 -0
- package/dist/money/index.js +5 -5
- package/dist/noydb-LFDRMYZ5.js +85 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +18 -12
- package/dist/pod/index.js +79 -89
- package/dist/pod-handle-AZ3CXY5Y.js +41 -0
- package/dist/pod-handle-AZ3CXY5Y.js.map +1 -0
- package/dist/policy/index.js +11 -4
- package/dist/port/to/index.d.ts +4 -4
- package/dist/port/to/locator.d.ts +54 -8
- package/dist/port/with/i18n-strategy.d.ts +4 -1
- package/dist/port/with/lookup-strategy.d.ts +4 -1
- package/dist/port/with/merge-authority.d.ts +52 -0
- package/dist/port/with/service-bus.d.ts +0 -4
- package/dist/port/with/strategies.d.ts +2 -0
- package/dist/port/with/team-strategy.d.ts +5 -1
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-2XSSMGEQ.js → post-register-QCJYRMIK.js} +6 -6
- package/dist/query/index.js +6 -6
- package/dist/reduce/index.js +6 -6
- package/dist/register-JBOEHTVX.js +32 -0
- package/dist/registry-5DYHQFJS.js +9 -0
- package/dist/registry-EANV44W2.js +9 -0
- package/dist/registry-J25H6VB4.js +19 -0
- package/dist/registry-R23SQUQH.js +18 -0
- package/dist/request-withdrawal-KQ4W4UT5.js +31 -0
- package/dist/{reveal-BW36KCOQ.js → reveal-W7BKZSUP.js} +6 -6
- package/dist/revoke-H3VSTAIE.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +20 -13
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/{seed-GDV5PT4R.js → seed-55FPOMYP.js} +20 -22
- package/dist/seed-55FPOMYP.js.map +1 -0
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +10 -10
- package/dist/shadow/index.js +2 -2
- package/dist/share-link/index.js +1 -1
- package/dist/signer-53AQ3BU2.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-ARHFVL5U.js → stale-TH7SSVRV.js} +10 -10
- package/dist/storage-WSF7ZKTL.js +23 -0
- package/dist/{store-coordination-provider-GFCUOBR6.js → store-coordination-provider-R27VRD6K.js} +18 -12
- package/dist/store-coordination-provider-R27VRD6K.js.map +1 -0
- package/dist/sync/index.js +11 -11
- package/dist/team/index.js +15 -14
- package/dist/tiers/index.js +11 -10
- package/dist/to/index.js +17 -9
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +4 -4
- package/dist/{ulid-PTAIMDG4.js → ulid-VQW6ERQN.js} +2 -2
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +115 -0
- package/dist/vault-head/index.js.map +1 -0
- package/dist/{verify-RO5RTZOJ.js → verify-M5LQH43C.js} +5 -5
- package/dist/via/blob/index.d.ts +3 -0
- package/dist/via/lookup/handle.d.ts +4 -1
- package/dist/walk-NABCHDZN.js +21 -0
- package/dist/with-audit/periods/index.d.ts +3 -3
- package/dist/with-audit/periods/periods.d.ts +82 -2
- package/dist/with-audit/periods/strategy.d.ts +1 -1
- package/dist/with-audit/periods/vault-facade.d.ts +54 -1
- package/dist/with-audit/periods/window.d.ts +10 -0
- package/dist/with-audit/sealed-record/index.d.ts +13 -0
- package/dist/with-audit/tiers/index.d.ts +17 -2
- package/dist/with-cargo/adopt-partition.d.ts +1 -1
- package/dist/with-cargo/extract-partition.d.ts +1 -1
- package/dist/with-cargo/index.d.ts +1 -1
- package/dist/with-commit/history/history.d.ts +26 -0
- package/dist/with-commit/history/index.d.ts +2 -1
- package/dist/with-commit/history/ledger/store.d.ts +7 -1
- package/dist/with-commit/history/strategy.d.ts +11 -1
- package/dist/with-commit/numbering/index.d.ts +0 -5
- package/dist/with-commit/vault-head/active.d.ts +2 -0
- package/dist/with-commit/vault-head/head.d.ts +28 -0
- package/dist/with-commit/vault-head/index.d.ts +10 -0
- package/dist/with-commit/vault-head/strategy.d.ts +127 -0
- package/dist/with-commit/vault-head/verify.d.ts +90 -0
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +4 -0
- package/dist/with-formula/materialized-views/projection-legs.d.ts +59 -0
- package/dist/with-formula/materialized-views/registry.d.ts +50 -0
- package/dist/with-formula/materialized-views/types.d.ts +68 -10
- package/dist/with-party/directory/cover/storage.d.ts +0 -8
- package/dist/with-party/directory/storage.d.ts +0 -11
- package/dist/with-party/directory/visibility.d.ts +0 -21
- package/dist/with-party/policy/storage.d.ts +0 -10
- package/dist/with-party/team/index.d.ts +1 -1
- package/dist/with-party/team/keyring.d.ts +139 -2
- package/dist/with-party/team/noydb-facade.d.ts +5 -1
- package/dist/with-party/team/roster-tag.d.ts +101 -0
- package/dist/with-party/team/tiers.d.ts +2 -1
- package/dist/with-pod/format.d.ts +10 -12
- package/dist/with-pod/index.d.ts +10 -10
- package/dist/with-pod/open.d.ts +2 -2
- package/dist/with-pod/pod-handle.d.ts +19 -0
- package/dist/with-pod/pod-store.d.ts +0 -8
- package/dist/with-pod/{bundle.d.ts → pod.d.ts} +11 -19
- package/dist/with-pod/ulid.d.ts +1 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +13 -0
- package/dist/with-shape/blobs/blob-set.d.ts +83 -11
- package/dist/with-shape/blobs/orphan-report.d.ts +62 -0
- package/dist/with-shape/introspection/index.d.ts +1 -0
- package/dist/with-sync/engine.d.ts +54 -5
- package/dist/with-sync/strategy.d.ts +3 -0
- package/dist/withdraw-accessible-VCINIG6V.js +28 -0
- package/package.json +10 -4
- package/dist/api-RXUMEKT3.js +0 -20
- package/dist/backup-KULFZ2T4.js.map +0 -1
- package/dist/bundle-handle-GFNHT52M.js +0 -36
- package/dist/bundle-handle-GFNHT52M.js.map +0 -1
- package/dist/chunk-2DHSSLOD.js.map +0 -1
- package/dist/chunk-3737A6EA.js.map +0 -1
- package/dist/chunk-3IXIU6FP.js.map +0 -1
- package/dist/chunk-3URQC7EH.js.map +0 -1
- package/dist/chunk-4GZ6XOVW.js.map +0 -1
- package/dist/chunk-4I72F5DF.js.map +0 -1
- package/dist/chunk-4VUPLMZ6.js.map +0 -1
- package/dist/chunk-52JPHN5N.js.map +0 -1
- package/dist/chunk-55LKVALY.js.map +0 -1
- package/dist/chunk-5JY5TSVY.js.map +0 -1
- package/dist/chunk-5ZKS6ZE2.js.map +0 -1
- package/dist/chunk-6BU3L4UE.js.map +0 -1
- package/dist/chunk-6NVPFKN3.js.map +0 -1
- package/dist/chunk-7F4DBNSP.js.map +0 -1
- package/dist/chunk-7G6VDWXB.js.map +0 -1
- package/dist/chunk-7H73RIE3.js +0 -45
- package/dist/chunk-7H73RIE3.js.map +0 -1
- package/dist/chunk-7MNBICB5.js.map +0 -1
- package/dist/chunk-AFHQATY4.js +0 -47
- package/dist/chunk-AFHQATY4.js.map +0 -1
- package/dist/chunk-AHLJSVRL.js.map +0 -1
- package/dist/chunk-BEFVYAR5.js.map +0 -1
- package/dist/chunk-CDB2HVQW.js.map +0 -1
- package/dist/chunk-CEJWMBXO.js.map +0 -1
- package/dist/chunk-E6427JU2.js.map +0 -1
- package/dist/chunk-FFDNKRCY.js.map +0 -1
- package/dist/chunk-FZ6NYJ7L.js.map +0 -1
- package/dist/chunk-G6S5VVHP.js.map +0 -1
- package/dist/chunk-GAG7QOVO.js.map +0 -1
- package/dist/chunk-H73G4XF4.js.map +0 -1
- package/dist/chunk-HNGSV2YC.js.map +0 -1
- package/dist/chunk-IGJCYUT5.js.map +0 -1
- package/dist/chunk-IMZLOJTK.js.map +0 -1
- package/dist/chunk-J7FM3RAU.js.map +0 -1
- package/dist/chunk-JJNOLSG5.js.map +0 -1
- package/dist/chunk-JRKZTEZZ.js.map +0 -1
- package/dist/chunk-JXIDGFKS.js.map +0 -1
- package/dist/chunk-NPP5R7FF.js.map +0 -1
- package/dist/chunk-O2ERS4UJ.js.map +0 -1
- package/dist/chunk-PDLLCOGD.js.map +0 -1
- package/dist/chunk-PL2GHSCM.js.map +0 -1
- package/dist/chunk-PNKHAKQ7.js.map +0 -1
- package/dist/chunk-PXCBVDFY.js.map +0 -1
- package/dist/chunk-Q6TEJXBX.js.map +0 -1
- package/dist/chunk-UHXCLPGC.js.map +0 -1
- package/dist/chunk-VCETL77O.js.map +0 -1
- package/dist/chunk-VZ3XFUQ7.js.map +0 -1
- package/dist/chunk-W77KZHCW.js.map +0 -1
- package/dist/chunk-WASHZV34.js.map +0 -1
- package/dist/chunk-WFUIE565.js.map +0 -1
- package/dist/chunk-WK5XUYYF.js.map +0 -1
- package/dist/chunk-XWX7GL56.js.map +0 -1
- package/dist/chunk-YPYHVOXP.js.map +0 -1
- package/dist/chunk-ZJADGNYF.js.map +0 -1
- package/dist/collection-facade-QEJIM6BC.js +0 -45
- package/dist/delegation-MO7YZYJS.js.map +0 -1
- package/dist/derive-IUA6JFLB.js +0 -22
- package/dist/dispatch-FZEAWKVM.js.map +0 -1
- package/dist/executor-CYJQLKKI.js +0 -9
- package/dist/executor-S4QIKEHW.js +0 -9
- package/dist/executor-YIQB2S6N.js +0 -29
- package/dist/export-accessible-4S36PQNR.js +0 -23
- package/dist/extract-partition-IO7FDZ2P.js +0 -38
- package/dist/fanout-sidecar-NNAJQXMX.js.map +0 -1
- package/dist/find-RBBYKXI7.js +0 -11
- package/dist/issue-RIVHSY2S.js +0 -19
- package/dist/liberate-GFN4C7RR.js +0 -24
- package/dist/noydb-3MT74MZS.js +0 -83
- package/dist/register-4EFJCVYD.js +0 -32
- package/dist/registry-4SDHHOJ7.js +0 -18
- package/dist/registry-CZVINVQH.js +0 -9
- package/dist/registry-IKUR2MXD.js +0 -9
- package/dist/registry-OYTFGWVK.js +0 -19
- package/dist/request-withdrawal-KGXGDPVQ.js +0 -31
- package/dist/revoke-JFN773KF.js +0 -24
- package/dist/seed-GDV5PT4R.js.map +0 -1
- package/dist/signer-TA55QB6R.js +0 -25
- package/dist/storage-V7MTFAQJ.js +0 -23
- package/dist/store-coordination-provider-GFCUOBR6.js.map +0 -1
- package/dist/walk-3ZECBFDA.js +0 -21
- package/dist/with-pod/bundle-handle.d.ts +0 -9
- package/dist/withdraw-accessible-7PG4DYQK.js +0 -28
- /package/dist/{api-RXUMEKT3.js.map → api-6X2VLZ7J.js.map} +0 -0
- /package/dist/{chunk-KUDZVJKQ.js.map → chunk-22GR3O4J.js.map} +0 -0
- /package/dist/{chunk-CCZJJ4I2.js.map → chunk-2CBFYXJX.js.map} +0 -0
- /package/dist/{chunk-FAXZQ5UF.js.map → chunk-323MN67Z.js.map} +0 -0
- /package/dist/{chunk-VMCCGUQB.js.map → chunk-36CEG6CM.js.map} +0 -0
- /package/dist/{chunk-747LRSOO.js.map → chunk-4K6BIMLF.js.map} +0 -0
- /package/dist/{chunk-FNSMZQS4.js.map → chunk-5IHGJHWC.js.map} +0 -0
- /package/dist/{chunk-7TSYBD3E.js.map → chunk-65JXA63J.js.map} +0 -0
- /package/dist/{chunk-Z45YRGFO.js.map → chunk-6NR36UNB.js.map} +0 -0
- /package/dist/{chunk-3JVXVJ7L.js.map → chunk-7OBIBPCV.js.map} +0 -0
- /package/dist/{chunk-AR2JDFAE.js.map → chunk-7Q3RHOA5.js.map} +0 -0
- /package/dist/{chunk-QULVCV3M.js.map → chunk-AJGGBXWA.js.map} +0 -0
- /package/dist/{chunk-CADUYBQD.js.map → chunk-ATL3ZVXT.js.map} +0 -0
- /package/dist/{chunk-DMQCLZ4Z.js.map → chunk-ATY3ZASK.js.map} +0 -0
- /package/dist/{chunk-4HDYQL3J.js.map → chunk-B4CRUZPR.js.map} +0 -0
- /package/dist/{chunk-6SAFL5YE.js.map → chunk-BZ3WMOYX.js.map} +0 -0
- /package/dist/{chunk-HXGUIPQB.js.map → chunk-CKKN25P2.js.map} +0 -0
- /package/dist/{chunk-6HFM7EIT.js.map → chunk-EHRIDNZX.js.map} +0 -0
- /package/dist/{chunk-RTAMLDWP.js.map → chunk-FU5VYEYK.js.map} +0 -0
- /package/dist/{chunk-RXYYFSBB.js.map → chunk-GKTW3KLV.js.map} +0 -0
- /package/dist/{chunk-OF3L2SD6.js.map → chunk-HOPNIR5R.js.map} +0 -0
- /package/dist/{chunk-ADW22QSB.js.map → chunk-HWI7GHJZ.js.map} +0 -0
- /package/dist/{chunk-GQ3BX5EA.js.map → chunk-I3ISCYT7.js.map} +0 -0
- /package/dist/{chunk-NJDQ4YSV.js.map → chunk-IWQPYT6S.js.map} +0 -0
- /package/dist/{chunk-2Z3NCLNX.js.map → chunk-JHYKSMVX.js.map} +0 -0
- /package/dist/{chunk-6FJWSWFT.js.map → chunk-JIHWBKMQ.js.map} +0 -0
- /package/dist/{chunk-YAWK6AWF.js.map → chunk-JKATP6OE.js.map} +0 -0
- /package/dist/{chunk-DG27IUVI.js.map → chunk-LC6NE4IQ.js.map} +0 -0
- /package/dist/{chunk-VJFMXYKP.js.map → chunk-MPKP6L5E.js.map} +0 -0
- /package/dist/{chunk-FUHKW252.js.map → chunk-OCJ3JA4O.js.map} +0 -0
- /package/dist/{chunk-WLYIROCJ.js.map → chunk-OQMCFHUX.js.map} +0 -0
- /package/dist/{chunk-JRCYZEHU.js.map → chunk-OR2FYRYR.js.map} +0 -0
- /package/dist/{chunk-HNHCQ556.js.map → chunk-PFWE7FJG.js.map} +0 -0
- /package/dist/{chunk-U5O6GIWZ.js.map → chunk-POFYIGQ2.js.map} +0 -0
- /package/dist/{chunk-35EBKWQU.js.map → chunk-QH47SQLD.js.map} +0 -0
- /package/dist/{chunk-HVQGCKY4.js.map → chunk-QVXZFJBU.js.map} +0 -0
- /package/dist/{chunk-FMQJZH4R.js.map → chunk-RDB66EKD.js.map} +0 -0
- /package/dist/{chunk-X56RTUK3.js.map → chunk-RJZQ2PVD.js.map} +0 -0
- /package/dist/{chunk-SUFG5E73.js.map → chunk-RPRASGEY.js.map} +0 -0
- /package/dist/{chunk-JIUVJ4M7.js.map → chunk-S7PM7Z4K.js.map} +0 -0
- /package/dist/{chunk-N35NC4JH.js.map → chunk-TKBB62DN.js.map} +0 -0
- /package/dist/{chunk-4UVDI4XE.js.map → chunk-WPZ5FVAS.js.map} +0 -0
- /package/dist/{chunk-MSWYQLMQ.js.map → chunk-XINT4VJA.js.map} +0 -0
- /package/dist/{chunk-W3TVWF6N.js.map → chunk-YCGLAANM.js.map} +0 -0
- /package/dist/{chunk-FDX7OWWI.js.map → chunk-YYV53EHO.js.map} +0 -0
- /package/dist/{classified-marker-2KJAXRRO.js.map → classified-marker-AZDSDG6V.js.map} +0 -0
- /package/dist/{collection-facade-QEJIM6BC.js.map → collection-facade-WSUAYFJ4.js.map} +0 -0
- /package/dist/{computed-6G5M3UPH.js.map → computed-VG2PCM4L.js.map} +0 -0
- /package/dist/{dead-filter-DCB62VWW.js.map → dead-filter-JNQNB3TA.js.map} +0 -0
- /package/dist/{derive-IUA6JFLB.js.map → derive-MPOGZ4NR.js.map} +0 -0
- /package/dist/{dispatch-MJ6SHB3Y.js.map → dispatch-3ZA733EY.js.map} +0 -0
- /package/dist/{enclave-JU4YIEPB.js.map → enclave-Y2ALNDRD.js.map} +0 -0
- /package/dist/{executor-CYJQLKKI.js.map → executor-BBEEUFO3.js.map} +0 -0
- /package/dist/{executor-S4QIKEHW.js.map → executor-G6G3YEWR.js.map} +0 -0
- /package/dist/{executor-YIQB2S6N.js.map → executor-ZUTUMTPA.js.map} +0 -0
- /package/dist/{export-accessible-4S36PQNR.js.map → export-accessible-S3KEB763.js.map} +0 -0
- /package/dist/{extract-partition-IO7FDZ2P.js.map → extract-partition-KVCTSUVE.js.map} +0 -0
- /package/dist/{find-RBBYKXI7.js.map → find-V4FN5ITT.js.map} +0 -0
- /package/dist/{issue-RIVHSY2S.js.map → issue-5CFBWBRX.js.map} +0 -0
- /package/dist/{ledger-AETNF4OM.js.map → ledger-MQIIOTZB.js.map} +0 -0
- /package/dist/{liberate-GFN4C7RR.js.map → liberate-LW7OKVBH.js.map} +0 -0
- /package/dist/{link-set-E5HNY67I.js.map → link-set-5PJBBR63.js.map} +0 -0
- /package/dist/{managed-secret-CWQ6PND5.js.map → managed-secret-ETDG6AAE.js.map} +0 -0
- /package/dist/{noydb-3MT74MZS.js.map → noydb-LFDRMYZ5.js.map} +0 -0
- /package/dist/{post-register-2XSSMGEQ.js.map → post-register-QCJYRMIK.js.map} +0 -0
- /package/dist/{register-4EFJCVYD.js.map → register-JBOEHTVX.js.map} +0 -0
- /package/dist/{registry-4SDHHOJ7.js.map → registry-5DYHQFJS.js.map} +0 -0
- /package/dist/{registry-CZVINVQH.js.map → registry-EANV44W2.js.map} +0 -0
- /package/dist/{registry-IKUR2MXD.js.map → registry-J25H6VB4.js.map} +0 -0
- /package/dist/{registry-OYTFGWVK.js.map → registry-R23SQUQH.js.map} +0 -0
- /package/dist/{request-withdrawal-KGXGDPVQ.js.map → request-withdrawal-KQ4W4UT5.js.map} +0 -0
- /package/dist/{reveal-BW36KCOQ.js.map → reveal-W7BKZSUP.js.map} +0 -0
- /package/dist/{revoke-JFN773KF.js.map → revoke-H3VSTAIE.js.map} +0 -0
- /package/dist/{signer-TA55QB6R.js.map → signer-53AQ3BU2.js.map} +0 -0
- /package/dist/{stale-ARHFVL5U.js.map → stale-TH7SSVRV.js.map} +0 -0
- /package/dist/{storage-V7MTFAQJ.js.map → storage-WSF7ZKTL.js.map} +0 -0
- /package/dist/{ulid-PTAIMDG4.js.map → ulid-VQW6ERQN.js.map} +0 -0
- /package/dist/{verify-RO5RTZOJ.js.map → verify-M5LQH43C.js.map} +0 -0
- /package/dist/{walk-3ZECBFDA.js.map → walk-NABCHDZN.js.map} +0 -0
- /package/dist/{withdraw-accessible-7PG4DYQK.js.map → withdraw-accessible-VCINIG6V.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-formula/materialized-views/dispatch.ts"],"sourcesContent":["/**\n * Materialized-view dispatch, lifted out of the kernel spine (#842 part b).\n *\n * Reached from `Collection` by dynamic `import()` only — `port-layering`\n * forbids a static spine→`with-*` import, and rejects a type-only one too\n * (it scans import statements, not their erasure). See\n * `with-formula/derivations/dispatch.ts` for the same note.\n *\n * The `Collection` reference below is TYPE-ONLY and points inward\n * (service → kernel), so it is both allowed and erased at build.\n *\n * @internal\n */\n\nimport type { TxContext } from '../../with-commit/tx/transaction.js'\nimport type { Collection } from '../../kernel/collection.js'\nimport type { ledgerAuditHook, WaveContext } from '../../kernel/via/dispatch.js'\nimport type { MaterializedViewExecutor } from './executor.js'\nimport type * as MVStale from './stale.js'\nimport type { MaterializedViewRegistry } from './registry.js'\nimport type { MVQueryContext } from './types.js'\n\n/** The per-write dispatch context the MV executor threads through. */\ninterface DispatchCtx {\n emit: (e: string, p: unknown) => void\n source: { readonly collection: string; readonly id: string }\n audit: ReturnType<typeof ledgerAuditHook>\n}\n\n/** What the MV dispatchers need from the collection that owns them. */\nexport interface MvDispatchCtx {\n readonly materializedViewSource: {\n registry(): MaterializedViewRegistry\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getCollection(name: string): Collection<any>\n getActiveTxContext(): TxContext | null\n getQueryContext(): MVQueryContext\n }\n /** The collection the delete happened in. */\n readonly collectionName: string\n /** Builds the per-write dispatch context the executor threads through. */\n readonly dispatchCtx: (source: { readonly collection: string; readonly id: string }) => DispatchCtx\n}\n\n/**\n * Fire every MV whose dependency set includes this collection, on write.\n *\n * Skips entirely when the record being written is itself an MV-emitted row\n * (it carries `_materializedFrom`) — a defensive guard against missed cycle\n * detection.\n *\n * @param wave #638 Task 4 — the sync/cutover/restore dispatch wave. An eager\n * MV already refreshed in this wave is skipped, deduped per target on the\n * spec name.\n */\nexport async function dispatchMaterializedViews(\n ctx: MvDispatchCtx,\n id: string,\n record: Record<string, unknown>,\n wave?: WaveContext,\n): Promise<void> {\n const { materializedViewSource: source, collectionName, dispatchCtx } = ctx\n\n if (record && typeof record === 'object' && '_materializedFrom' in record) return\n\n const registry = source.registry()\n // #1139 — replan any query-form strategy parked at vault open because its\n // join named a ref that had not been declared yet. No-op once drained.\n await registry.resolvePendingPlans()\n const mvs = registry.mvsForSource(collectionName)\n if (mvs.length === 0) return\n\n let executor: typeof MaterializedViewExecutor | null = null\n let staleHelpers: typeof MVStale | null = null\n\n for (const reg of mvs) {\n const mode = reg.spec.refresh\n\n if (mode === 'eager') {\n if (wave?.seen(`mv\\0${reg.spec.name}`)) continue\n if (executor === null) {\n ;({ MaterializedViewExecutor: executor } = await import('./executor.js'))\n }\n await executor.refresh(reg, {\n getCollection: (name) => source.getCollection(name),\n getActiveTxContext: () => source.getActiveTxContext(),\n getQueryContext: () => source.getQueryContext(),\n dispatchCtx: dispatchCtx({ collection: collectionName, id }),\n })\n } else if (mode === 'lazy') {\n if (staleHelpers === null) staleHelpers = await import('./stale.js')\n staleHelpers.markMVStale(registry, reg.spec.name)\n }\n // manual: no-op on source-write. `vault.refreshView(name)` is the only\n // path that materializes a manual MV.\n }\n}\n\n/**\n * Mirror of {@link dispatchMaterializedViews} for the delete/forget path. There is\n * no `_materializedFrom` skip — the record is gone — and the `internal` gate\n * at `_doDelete` is the recursion guard.\n *\n * @returns rows TOMBSTONED across every MV sourced here (#638 T6). Eager and\n * lazy/manual `invalidateMVAtRest` purges both contribute (#761 item 1,\n * previously eager-only): lazy persists a stale mark for cold-session\n * recompute, manual serves empty until `refreshView()`.\n * `residueUndecodable` / `residueDeclined` (#776/#785) carry\n * `outputCollection:id` entries whose ownership stamp `invalidateMVAtRest`\n * could not decode, respectively decoded and stamp-matched but declined to\n * erase — surfaced, not erased.\n */\nexport async function dispatchMaterializedViewsOnDelete(\n ctx: MvDispatchCtx,\n id: string,\n): Promise<{ deleted: number; residueUndecodable: string[]; residueDeclined: string[] }> {\n const { materializedViewSource: source, collectionName, dispatchCtx } = ctx\n\n const registry = source.registry()\n await registry.resolvePendingPlans() // #1139 — see the put-path dispatcher\n const mvs = registry.mvsForSource(collectionName)\n const empty = { deleted: 0, residueUndecodable: [], residueDeclined: [] }\n if (mvs.length === 0) return empty\n\n let executor: typeof MaterializedViewExecutor | null = null\n let staleHelpers: typeof MVStale | null = null\n\n let deleted = 0\n const residueUndecodable: string[] = []\n const residueDeclined: string[] = []\n\n for (const reg of mvs) {\n const mode = reg.spec.refresh\n\n if (mode === 'eager') {\n if (executor === null) {\n ;({ MaterializedViewExecutor: executor } = await import('./executor.js'))\n }\n const rr = await executor.refresh(reg, {\n getCollection: (name) => source.getCollection(name),\n getActiveTxContext: () => source.getActiveTxContext(),\n getQueryContext: () => source.getQueryContext(),\n dispatchCtx: dispatchCtx({ collection: collectionName, id }),\n })\n // #782/#785 — the eager leg reports both residue channels.\n deleted += rr.deleted\n residueUndecodable.push(...rr.residueUndecodable)\n residueDeclined.push(...rr.residueDeclined)\n continue\n }\n\n if (staleHelpers === null) staleHelpers = await import('./stale.js')\n const inv = await staleHelpers.invalidateMVAtRest(source, reg, mode)\n deleted += inv.deleted\n residueUndecodable.push(...inv.residueUndecodable.map((rid) => `${reg.outputCollection}:${rid}`))\n residueDeclined.push(...inv.residueDeclined.map((rid) => `${reg.outputCollection}:${rid}`))\n }\n\n return { deleted, residueUndecodable, residueDeclined }\n}\n"],"mappings":";;;AAuDA,eAAsB,0BACpB,KACA,IACA,QACA,MACe;AACf,QAAM,EAAE,wBAAwB,QAAQ,gBAAgB,YAAY,IAAI;AAExE,MAAI,UAAU,OAAO,WAAW,YAAY,uBAAuB,OAAQ;AAE3E,QAAM,WAAW,OAAO,SAAS;AAGjC,QAAM,SAAS,oBAAoB;AACnC,QAAM,MAAM,SAAS,aAAa,cAAc;AAChD,MAAI,IAAI,WAAW,EAAG;AAEtB,MAAI,WAAmD;AACvD,MAAI,eAAsC;AAE1C,aAAW,OAAO,KAAK;AACrB,UAAM,OAAO,IAAI,KAAK;AAEtB,QAAI,SAAS,SAAS;AACpB,UAAI,MAAM,KAAK,OAAO,IAAI,KAAK,IAAI,EAAE,EAAG;AACxC,UAAI,aAAa,MAAM;AACrB;AAAC,SAAC,EAAE,0BAA0B,SAAS,IAAI,MAAM,OAAO,wBAAe;AAAA,MACzE;AACA,YAAM,SAAS,QAAQ,KAAK;AAAA,QAC1B,eAAe,CAAC,SAAS,OAAO,cAAc,IAAI;AAAA,QAClD,oBAAoB,MAAM,OAAO,mBAAmB;AAAA,QACpD,iBAAiB,MAAM,OAAO,gBAAgB;AAAA,QAC9C,aAAa,YAAY,EAAE,YAAY,gBAAgB,GAAG,CAAC;AAAA,MAC7D,CAAC;AAAA,IACH,WAAW,SAAS,QAAQ;AAC1B,UAAI,iBAAiB,KAAM,gBAAe,MAAM,OAAO,qBAAY;AACnE,mBAAa,YAAY,UAAU,IAAI,KAAK,IAAI;AAAA,IAClD;AAAA,EAGF;AACF;AAgBA,eAAsB,kCACpB,KACA,IACuF;AACvF,QAAM,EAAE,wBAAwB,QAAQ,gBAAgB,YAAY,IAAI;AAExE,QAAM,WAAW,OAAO,SAAS;AACjC,QAAM,SAAS,oBAAoB;AACnC,QAAM,MAAM,SAAS,aAAa,cAAc;AAChD,QAAM,QAAQ,EAAE,SAAS,GAAG,oBAAoB,CAAC,GAAG,iBAAiB,CAAC,EAAE;AACxE,MAAI,IAAI,WAAW,EAAG,QAAO;AAE7B,MAAI,WAAmD;AACvD,MAAI,eAAsC;AAE1C,MAAI,UAAU;AACd,QAAM,qBAA+B,CAAC;AACtC,QAAM,kBAA4B,CAAC;AAEnC,aAAW,OAAO,KAAK;AACrB,UAAM,OAAO,IAAI,KAAK;AAEtB,QAAI,SAAS,SAAS;AACpB,UAAI,aAAa,MAAM;AACrB;AAAC,SAAC,EAAE,0BAA0B,SAAS,IAAI,MAAM,OAAO,wBAAe;AAAA,MACzE;AACA,YAAM,KAAK,MAAM,SAAS,QAAQ,KAAK;AAAA,QACrC,eAAe,CAAC,SAAS,OAAO,cAAc,IAAI;AAAA,QAClD,oBAAoB,MAAM,OAAO,mBAAmB;AAAA,QACpD,iBAAiB,MAAM,OAAO,gBAAgB;AAAA,QAC9C,aAAa,YAAY,EAAE,YAAY,gBAAgB,GAAG,CAAC;AAAA,MAC7D,CAAC;AAED,iBAAW,GAAG;AACd,yBAAmB,KAAK,GAAG,GAAG,kBAAkB;AAChD,sBAAgB,KAAK,GAAG,GAAG,eAAe;AAC1C;AAAA,IACF;AAEA,QAAI,iBAAiB,KAAM,gBAAe,MAAM,OAAO,qBAAY;AACnE,UAAM,MAAM,MAAM,aAAa,mBAAmB,QAAQ,KAAK,IAAI;AACnE,eAAW,IAAI;AACf,uBAAmB,KAAK,GAAG,IAAI,mBAAmB,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,IAAI,GAAG,EAAE,CAAC;AAChG,oBAAgB,KAAK,GAAG,IAAI,gBAAgB,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,IAAI,GAAG,EAAE,CAAC;AAAA,EAC5F;AAEA,SAAO,EAAE,SAAS,oBAAoB,gBAAgB;AACxD;","names":[]}
|
|
@@ -2,18 +2,25 @@ import {
|
|
|
2
2
|
RecordCodec,
|
|
3
3
|
SEALED_CEK_NS,
|
|
4
4
|
applyRewrappedBody,
|
|
5
|
+
buildRecordAad,
|
|
5
6
|
computeBrokerProof,
|
|
6
7
|
deriveBrokerProofBits,
|
|
7
8
|
deriveBrokerProofKey,
|
|
8
9
|
envelopeBodyForHash,
|
|
9
10
|
envelopeBodySize,
|
|
11
|
+
envelopeOpensUnderAny,
|
|
10
12
|
findByDet,
|
|
11
13
|
hasPerRecordKey,
|
|
14
|
+
hasSealedBody,
|
|
12
15
|
isRewrappedUnder,
|
|
13
16
|
issueChallenge,
|
|
14
17
|
makeReservedEnvelopes,
|
|
15
18
|
openEnvelopeJson,
|
|
16
19
|
queryByDet,
|
|
20
|
+
recordAadFor,
|
|
21
|
+
rekeyBlobSet,
|
|
22
|
+
rekeyEnvelopeIfNeeded,
|
|
23
|
+
rekeyEnvelopeToDek,
|
|
17
24
|
resolveStableCek,
|
|
18
25
|
revokeSealedRecord,
|
|
19
26
|
rewrapBodyToDek,
|
|
@@ -21,27 +28,30 @@ import {
|
|
|
21
28
|
rotateRecordCek,
|
|
22
29
|
sealRecordToHost,
|
|
23
30
|
verifyBrokerProof,
|
|
31
|
+
verifyRecordIdentity,
|
|
24
32
|
writeEnvelopeBody
|
|
25
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-CXPOG3ZY.js";
|
|
26
34
|
import {
|
|
27
35
|
buildDeleteMarker,
|
|
36
|
+
buildRecordEnvelope,
|
|
37
|
+
buildSealedRecordEnvelope,
|
|
28
38
|
buildTombstone,
|
|
29
39
|
isDeleteMarker,
|
|
30
40
|
isTombstone,
|
|
31
41
|
isTombstoneShape
|
|
32
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FX3UIDCS.js";
|
|
33
43
|
import {
|
|
34
44
|
ctEqualTags,
|
|
35
45
|
deriveVdigSlotKey,
|
|
36
46
|
evaluateKofN
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-CKKN25P2.js";
|
|
48
|
+
import "./chunk-7Q3RHOA5.js";
|
|
39
49
|
import {
|
|
40
50
|
computeBidxTarget,
|
|
41
51
|
deriveClassifyIndexKey,
|
|
42
52
|
deriveClassifyIndexSalt,
|
|
43
53
|
mintBidxTag
|
|
44
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-4K6BIMLF.js";
|
|
45
55
|
import {
|
|
46
56
|
pbkdf2VerifyDigest
|
|
47
57
|
} from "./chunk-LP7BEXCT.js";
|
|
@@ -52,6 +62,7 @@ import {
|
|
|
52
62
|
decryptBytes,
|
|
53
63
|
decryptBytesWithAAD,
|
|
54
64
|
decryptDeterministic,
|
|
65
|
+
deriveBlobAddressKey,
|
|
55
66
|
deriveDeterministicKey,
|
|
56
67
|
deriveEchoKey,
|
|
57
68
|
deriveKey,
|
|
@@ -74,9 +85,9 @@ import {
|
|
|
74
85
|
unwrapKey,
|
|
75
86
|
wrapCek,
|
|
76
87
|
wrapKey
|
|
77
|
-
} from "./chunk-
|
|
78
|
-
import "./chunk-
|
|
79
|
-
import "./chunk-
|
|
88
|
+
} from "./chunk-ONPVHX2Y.js";
|
|
89
|
+
import "./chunk-UJ4Z67UQ.js";
|
|
90
|
+
import "./chunk-Z3BZXPRO.js";
|
|
80
91
|
import "./chunk-PZ5AY32C.js";
|
|
81
92
|
export {
|
|
82
93
|
RecordCodec,
|
|
@@ -85,6 +96,9 @@ export {
|
|
|
85
96
|
base64ToBuffer,
|
|
86
97
|
bufferToBase64,
|
|
87
98
|
buildDeleteMarker,
|
|
99
|
+
buildRecordAad,
|
|
100
|
+
buildRecordEnvelope,
|
|
101
|
+
buildSealedRecordEnvelope,
|
|
88
102
|
buildTombstone,
|
|
89
103
|
computeBidxTarget,
|
|
90
104
|
computeBrokerProof,
|
|
@@ -93,6 +107,7 @@ export {
|
|
|
93
107
|
decryptBytes,
|
|
94
108
|
decryptBytesWithAAD,
|
|
95
109
|
decryptDeterministic,
|
|
110
|
+
deriveBlobAddressKey,
|
|
96
111
|
deriveBrokerProofBits,
|
|
97
112
|
deriveBrokerProofKey,
|
|
98
113
|
deriveClassifyIndexKey,
|
|
@@ -112,12 +127,14 @@ export {
|
|
|
112
127
|
encryptDeterministic,
|
|
113
128
|
envelopeBodyForHash,
|
|
114
129
|
envelopeBodySize,
|
|
130
|
+
envelopeOpensUnderAny,
|
|
115
131
|
evaluateKofN,
|
|
116
132
|
findByDet,
|
|
117
133
|
generateDEK,
|
|
118
134
|
generateIV,
|
|
119
135
|
generateSalt,
|
|
120
136
|
hasPerRecordKey,
|
|
137
|
+
hasSealedBody,
|
|
121
138
|
hmacSha256Hex,
|
|
122
139
|
importCek,
|
|
123
140
|
isDeleteMarker,
|
|
@@ -130,6 +147,10 @@ export {
|
|
|
130
147
|
openEnvelopeJson,
|
|
131
148
|
pbkdf2VerifyDigest,
|
|
132
149
|
queryByDet,
|
|
150
|
+
recordAadFor,
|
|
151
|
+
rekeyBlobSet,
|
|
152
|
+
rekeyEnvelopeIfNeeded,
|
|
153
|
+
rekeyEnvelopeToDek,
|
|
133
154
|
resolveStableCek,
|
|
134
155
|
revokeSealedRecord,
|
|
135
156
|
rewrapBodyToDek,
|
|
@@ -140,8 +161,9 @@ export {
|
|
|
140
161
|
unwrapCek,
|
|
141
162
|
unwrapKey,
|
|
142
163
|
verifyBrokerProof,
|
|
164
|
+
verifyRecordIdentity,
|
|
143
165
|
wrapCek,
|
|
144
166
|
wrapKey,
|
|
145
167
|
writeEnvelopeBody
|
|
146
168
|
};
|
|
147
|
-
//# sourceMappingURL=enclave-
|
|
169
|
+
//# sourceMappingURL=enclave-Y2ALNDRD.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MaterializedViewExecutor
|
|
3
|
+
} from "./chunk-64WHKBMP.js";
|
|
4
|
+
import "./chunk-GANFIM2M.js";
|
|
5
|
+
import "./chunk-GKTW3KLV.js";
|
|
6
|
+
import "./chunk-K6CPIK3R.js";
|
|
7
|
+
import "./chunk-EV2TDHQZ.js";
|
|
8
|
+
import "./chunk-2CBFYXJX.js";
|
|
9
|
+
import "./chunk-XZHEOSQ2.js";
|
|
10
|
+
import "./chunk-ATL3ZVXT.js";
|
|
11
|
+
import "./chunk-NSITFOCJ.js";
|
|
12
|
+
import "./chunk-FNYCT27B.js";
|
|
13
|
+
import "./chunk-XPEPMK4Y.js";
|
|
14
|
+
import "./chunk-C3XWJCG7.js";
|
|
15
|
+
import "./chunk-BZ3WMOYX.js";
|
|
16
|
+
import "./chunk-CXPOG3ZY.js";
|
|
17
|
+
import "./chunk-FX3UIDCS.js";
|
|
18
|
+
import "./chunk-CKKN25P2.js";
|
|
19
|
+
import "./chunk-7Q3RHOA5.js";
|
|
20
|
+
import "./chunk-4K6BIMLF.js";
|
|
21
|
+
import "./chunk-LP7BEXCT.js";
|
|
22
|
+
import "./chunk-ONPVHX2Y.js";
|
|
23
|
+
import "./chunk-UJ4Z67UQ.js";
|
|
24
|
+
import "./chunk-Z3BZXPRO.js";
|
|
25
|
+
import "./chunk-PZ5AY32C.js";
|
|
26
|
+
export {
|
|
27
|
+
MaterializedViewExecutor
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=executor-ZUTUMTPA.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildAccessibleBundle,
|
|
3
|
+
exportAccessibleData,
|
|
4
|
+
resolveAccessibleCollections
|
|
5
|
+
} from "./chunk-S6PJ6ZKE.js";
|
|
6
|
+
import "./chunk-GCU42IG7.js";
|
|
7
|
+
import "./chunk-2ZT4INZ4.js";
|
|
8
|
+
import "./chunk-CXPOG3ZY.js";
|
|
9
|
+
import "./chunk-FX3UIDCS.js";
|
|
10
|
+
import "./chunk-CKKN25P2.js";
|
|
11
|
+
import "./chunk-7Q3RHOA5.js";
|
|
12
|
+
import "./chunk-4K6BIMLF.js";
|
|
13
|
+
import "./chunk-LP7BEXCT.js";
|
|
14
|
+
import "./chunk-ONPVHX2Y.js";
|
|
15
|
+
import "./chunk-UJ4Z67UQ.js";
|
|
16
|
+
import "./chunk-Z3BZXPRO.js";
|
|
17
|
+
import "./chunk-PZ5AY32C.js";
|
|
18
|
+
export {
|
|
19
|
+
buildAccessibleBundle,
|
|
20
|
+
exportAccessibleData,
|
|
21
|
+
resolveAccessibleCollections
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=export-accessible-S3KEB763.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractPartition,
|
|
3
|
+
extractPartitionCore,
|
|
4
|
+
reKeyBlobs,
|
|
5
|
+
reKeyClosure,
|
|
6
|
+
reKeyLedger,
|
|
7
|
+
reKeySchemas,
|
|
8
|
+
sealDeks
|
|
9
|
+
} from "./chunk-5F7BZAGV.js";
|
|
10
|
+
import "./chunk-KM6ZXG7U.js";
|
|
11
|
+
import "./chunk-GCU42IG7.js";
|
|
12
|
+
import "./chunk-2ZT4INZ4.js";
|
|
13
|
+
import "./chunk-JMJSCI7U.js";
|
|
14
|
+
import "./chunk-3YGUHUJA.js";
|
|
15
|
+
import "./chunk-4AOERLTV.js";
|
|
16
|
+
import "./chunk-I7FD46FF.js";
|
|
17
|
+
import "./chunk-BZ3WMOYX.js";
|
|
18
|
+
import "./chunk-D2YFQ7XG.js";
|
|
19
|
+
import "./chunk-CXPOG3ZY.js";
|
|
20
|
+
import "./chunk-FX3UIDCS.js";
|
|
21
|
+
import "./chunk-CKKN25P2.js";
|
|
22
|
+
import "./chunk-7Q3RHOA5.js";
|
|
23
|
+
import "./chunk-4K6BIMLF.js";
|
|
24
|
+
import "./chunk-LP7BEXCT.js";
|
|
25
|
+
import "./chunk-ONPVHX2Y.js";
|
|
26
|
+
import "./chunk-UJ4Z67UQ.js";
|
|
27
|
+
import "./chunk-Z3BZXPRO.js";
|
|
28
|
+
import "./chunk-PZ5AY32C.js";
|
|
29
|
+
export {
|
|
30
|
+
extractPartition,
|
|
31
|
+
extractPartitionCore,
|
|
32
|
+
reKeyBlobs,
|
|
33
|
+
reKeyClosure,
|
|
34
|
+
reKeyLedger,
|
|
35
|
+
reKeySchemas,
|
|
36
|
+
sealDeks
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=extract-partition-KVCTSUVE.js.map
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
+
buildRecordAad,
|
|
2
3
|
openEnvelopeJson
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-CXPOG3ZY.js";
|
|
5
|
+
import {
|
|
6
|
+
buildRecordEnvelope
|
|
7
|
+
} from "./chunk-FX3UIDCS.js";
|
|
8
|
+
import "./chunk-CKKN25P2.js";
|
|
9
|
+
import "./chunk-7Q3RHOA5.js";
|
|
10
|
+
import "./chunk-4K6BIMLF.js";
|
|
8
11
|
import "./chunk-LP7BEXCT.js";
|
|
9
12
|
import {
|
|
10
13
|
encrypt
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
} from "./chunk-YPYHVOXP.js";
|
|
15
|
-
import "./chunk-HNGSV2YC.js";
|
|
14
|
+
} from "./chunk-ONPVHX2Y.js";
|
|
15
|
+
import "./chunk-UJ4Z67UQ.js";
|
|
16
|
+
import "./chunk-Z3BZXPRO.js";
|
|
16
17
|
import "./chunk-PZ5AY32C.js";
|
|
17
18
|
|
|
18
19
|
// src/with-formula/derivations/fanout-sidecar.ts
|
|
@@ -23,7 +24,7 @@ function recordId(source, sourceId, outputKey) {
|
|
|
23
24
|
async function loadFanoutSidecar(store, vault, source, sourceId, outputKey, getDEK, encrypted) {
|
|
24
25
|
const envelope = await store.get(vault, "_meta", recordId(source, sourceId, outputKey));
|
|
25
26
|
if (!envelope) return void 0;
|
|
26
|
-
const json = !encrypted || envelope._iv === "" ? envelope._data : await openEnvelopeJson(envelope, await getDEK(FANOUT_DEK_COLLECTION));
|
|
27
|
+
const json = !encrypted || envelope._iv === "" ? envelope._data : await openEnvelopeJson({ collection: "_meta", id: recordId(source, sourceId, outputKey) }, envelope, await getDEK(FANOUT_DEK_COLLECTION));
|
|
27
28
|
const parsed = JSON.parse(json);
|
|
28
29
|
if (parsed._noydb_fanout !== 1) return void 0;
|
|
29
30
|
if (!Array.isArray(parsed.keys)) return void 0;
|
|
@@ -42,24 +43,14 @@ async function saveFanoutSidecar(store, vault, payload, getDEK, encrypted) {
|
|
|
42
43
|
const id = recordId(payload.source, payload.sourceId, payload.outputKey);
|
|
43
44
|
const prior = await store.get(vault, "_meta", id);
|
|
44
45
|
const json = JSON.stringify(doc);
|
|
46
|
+
const version = (prior?._v ?? 0) + 1;
|
|
47
|
+
const identity = { collection: "_meta", id, version };
|
|
45
48
|
let envelope;
|
|
46
49
|
if (!encrypted) {
|
|
47
|
-
envelope = {
|
|
48
|
-
_noydb: NOYDB_FORMAT_VERSION,
|
|
49
|
-
_v: (prior?._v ?? 0) + 1,
|
|
50
|
-
_ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
51
|
-
_iv: "",
|
|
52
|
-
_data: json
|
|
53
|
-
};
|
|
50
|
+
envelope = buildRecordEnvelope(identity, { iv: "", data: json });
|
|
54
51
|
} else {
|
|
55
|
-
const { iv, data } = await encrypt(json, await getDEK(FANOUT_DEK_COLLECTION));
|
|
56
|
-
envelope = {
|
|
57
|
-
_noydb: NOYDB_FORMAT_VERSION,
|
|
58
|
-
_v: (prior?._v ?? 0) + 1,
|
|
59
|
-
_ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
60
|
-
_iv: iv,
|
|
61
|
-
_data: data
|
|
62
|
-
};
|
|
52
|
+
const { iv, data } = await encrypt(json, await getDEK(FANOUT_DEK_COLLECTION), buildRecordAad(identity));
|
|
53
|
+
envelope = buildRecordEnvelope(identity, { iv, data });
|
|
63
54
|
}
|
|
64
55
|
await store.put(vault, "_meta", id, envelope);
|
|
65
56
|
}
|
|
@@ -71,4 +62,4 @@ export {
|
|
|
71
62
|
loadFanoutSidecar,
|
|
72
63
|
saveFanoutSidecar
|
|
73
64
|
};
|
|
74
|
-
//# sourceMappingURL=fanout-sidecar-
|
|
65
|
+
//# sourceMappingURL=fanout-sidecar-3QZU7ZZX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-formula/derivations/fanout-sidecar.ts"],"sourcesContent":["/**\n * Per-source-row fanout sidecar for `shape: 'array'` derivations.\n *\n * Each `(sourceCollection, sourceId, outputKey)` triple gets its own\n * envelope at:\n *\n * _meta/derivations-fanout/<sourceCollection>/<sourceId>/<outputKey>\n *\n * The envelope records the last-emitted derived row ids so the\n * dispatcher can compute the diff on every source-row update in O(1):\n * read prior keys, compute `toDelete = prev \\ new`, write new, persist\n * back.\n *\n * The body is encrypted (AES-GCM under the `_meta` collection DEK) when\n * the vault is encrypted — the `keys[]` are derived-row ids produced by a\n * user-supplied key extractor and can be content-bearing (SKU, tag, email),\n * so a ciphertext-only store must not read them, the derivation graph, or\n * `emittedAt`. Back-compat: sidecars written before this fix are plaintext\n * (`_iv === ''`); `loadFanoutSidecar` dual-reads them.\n *\n * @module\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport { buildRecordAad, buildRecordEnvelope, encrypt, openEnvelopeJson, type EnclaveKey } from '../../kernel/enclave/index.js'\n\ntype GetDEK = (collectionName: string) => Promise<EnclaveKey>\n\n/** The `_meta` collection name whose DEK encrypts the sidecar body. */\nconst FANOUT_DEK_COLLECTION = '_meta'\n\n/** Magic-prefixed JSON payload at `_meta/<recordId>`. */\nexport interface FanoutSidecar {\n readonly _noydb_fanout: 1\n /** Source collection name. */\n readonly source: string\n /** Source record id. */\n readonly sourceId: string\n /** Strategy output key (the key in `strategy.outputs`). */\n readonly outputKey: string\n /** Output collection name (audit / forensics). */\n readonly outputCollection: string\n /** Derived-row ids last emitted for this (source, output) pair. */\n readonly keys: ReadonlyArray<string>\n /** ISO timestamp of last dispatch. */\n readonly emittedAt: string\n}\n\n/**\n * Build the canonical `_meta` record id for a fanout sidecar.\n *\n * The full path inside the store is `_meta/<this-string>`. We pack the\n * full triple into the id so a single `_meta` collection holds all\n * sidecars (collection-per-source would proliferate names; the\n * existing `_meta` flat namespace is cheaper).\n */\nfunction recordId(source: string, sourceId: string, outputKey: string): string {\n // Use `/` as a separator. None of the components is supposed to\n // contain it (collection names + output keys are bare identifiers;\n // source ids are typically ULIDs / UUIDs / app-chosen strings\n // without slashes). If a future source carries `/` in its id, we'd\n // need an escape; deferred until that's a real case.\n return `derivations-fanout/${source}/${sourceId}/${outputKey}`\n}\n\n/**\n * Read the sidecar; returns `undefined` only when it's legitimately absent\n * (no envelope at that id) — the correct signal for callers to skip\n * orphan-row reconciliation because there's nothing to reconcile against.\n *\n * A PRESENT envelope that fails to decrypt or parse is a data-integrity\n * problem, not an absence, and is deliberately NOT caught here: swallowing\n * it to `undefined` would look identical to \"no sidecar\" and make callers\n * (the array-derivation dispatch in `vault.ts`/`collection.ts`) silently\n * skip deleting stale derived rows on a shrink. Let `openEnvelopeJson`'s\n * `DecryptionError`/`TamperedError` and `JSON.parse` failures propagate,\n * matching the no-catch convention of sibling decrypt call-sites (e.g.\n * `with-audit/consent/consent.ts`'s `decryptEntry`).\n *\n * Dual-reads for back-compat: an envelope with `_iv === ''` is a legacy\n * plaintext sidecar (parse `_data` directly); otherwise the body was\n * encrypted under the `_meta` DEK and is decrypted first.\n */\nexport async function loadFanoutSidecar(\n store: NoydbStore,\n vault: string,\n source: string,\n sourceId: string,\n outputKey: string,\n getDEK: GetDEK,\n encrypted: boolean,\n): Promise<FanoutSidecar | undefined> {\n const envelope = await store.get(vault, '_meta', recordId(source, sourceId, outputKey))\n if (!envelope) return undefined\n // Legacy plaintext (`_iv === ''`) reads directly; encrypted bodies decrypt.\n const json = (!encrypted || envelope._iv === '')\n ? envelope._data\n : await openEnvelopeJson({ collection: '_meta', id: recordId(source, sourceId, outputKey) }, envelope, await getDEK(FANOUT_DEK_COLLECTION))\n const parsed = JSON.parse(json) as FanoutSidecar\n if (parsed._noydb_fanout !== 1) return undefined\n if (!Array.isArray(parsed.keys)) return undefined\n return parsed\n}\n\n/**\n * Persist (insert/replace) the sidecar with a fresh key set. The body is\n * encrypted under the `_meta` DEK when the vault is encrypted (the `keys[]`\n * can be content-bearing); plaintext only in debug/unencrypted vaults.\n */\nexport async function saveFanoutSidecar(\n store: NoydbStore,\n vault: string,\n payload: {\n readonly source: string\n readonly sourceId: string\n readonly outputKey: string\n readonly outputCollection: string\n readonly keys: ReadonlyArray<string>\n },\n getDEK: GetDEK,\n encrypted: boolean,\n): Promise<void> {\n const doc: FanoutSidecar = {\n _noydb_fanout: 1,\n source: payload.source,\n sourceId: payload.sourceId,\n outputKey: payload.outputKey,\n outputCollection: payload.outputCollection,\n keys: payload.keys,\n emittedAt: new Date().toISOString(),\n }\n const id = recordId(payload.source, payload.sourceId, payload.outputKey)\n const prior = await store.get(vault, '_meta', id)\n const json = JSON.stringify(doc)\n const version = (prior?._v ?? 0) + 1\n const identity = { collection: '_meta', id, version }\n let envelope: EncryptedEnvelope\n if (!encrypted) {\n envelope = buildRecordEnvelope(identity, { iv: '', data: json })\n } else {\n const { iv, data } = await encrypt(json, await getDEK(FANOUT_DEK_COLLECTION), buildRecordAad(identity))\n envelope = buildRecordEnvelope(identity, { iv, data })\n }\n await store.put(vault, '_meta', id, envelope)\n}\n\n/** Delete the sidecar (used on source-row delete cascade). */\nexport async function deleteFanoutSidecar(\n store: NoydbStore,\n vault: string,\n source: string,\n sourceId: string,\n outputKey: string,\n): Promise<void> {\n await store.delete(vault, '_meta', recordId(source, sourceId, outputKey))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,IAAM,wBAAwB;AA2B9B,SAAS,SAAS,QAAgB,UAAkB,WAA2B;AAM7E,SAAO,sBAAsB,MAAM,IAAI,QAAQ,IAAI,SAAS;AAC9D;AAoBA,eAAsB,kBACpB,OACA,OACA,QACA,UACA,WACA,QACA,WACoC;AACpC,QAAM,WAAW,MAAM,MAAM,IAAI,OAAO,SAAS,SAAS,QAAQ,UAAU,SAAS,CAAC;AACtF,MAAI,CAAC,SAAU,QAAO;AAEtB,QAAM,OAAQ,CAAC,aAAa,SAAS,QAAQ,KACzC,SAAS,QACT,MAAM,iBAAiB,EAAE,YAAY,SAAS,IAAI,SAAS,QAAQ,UAAU,SAAS,EAAE,GAAG,UAAU,MAAM,OAAO,qBAAqB,CAAC;AAC5I,QAAM,SAAS,KAAK,MAAM,IAAI;AAC9B,MAAI,OAAO,kBAAkB,EAAG,QAAO;AACvC,MAAI,CAAC,MAAM,QAAQ,OAAO,IAAI,EAAG,QAAO;AACxC,SAAO;AACT;AAOA,eAAsB,kBACpB,OACA,OACA,SAOA,QACA,WACe;AACf,QAAM,MAAqB;AAAA,IACzB,eAAe;AAAA,IACf,QAAQ,QAAQ;AAAA,IAChB,UAAU,QAAQ;AAAA,IAClB,WAAW,QAAQ;AAAA,IACnB,kBAAkB,QAAQ;AAAA,IAC1B,MAAM,QAAQ;AAAA,IACd,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,EACpC;AACA,QAAM,KAAK,SAAS,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,SAAS;AACvE,QAAM,QAAQ,MAAM,MAAM,IAAI,OAAO,SAAS,EAAE;AAChD,QAAM,OAAO,KAAK,UAAU,GAAG;AAC/B,QAAM,WAAW,OAAO,MAAM,KAAK;AACnC,QAAM,WAAW,EAAE,YAAY,SAAS,IAAI,QAAQ;AACpD,MAAI;AACJ,MAAI,CAAC,WAAW;AACd,eAAW,oBAAoB,UAAU,EAAE,IAAI,IAAI,MAAM,KAAK,CAAC;AAAA,EACjE,OAAO;AACL,UAAM,EAAE,IAAI,KAAK,IAAI,MAAM,QAAQ,MAAM,MAAM,OAAO,qBAAqB,GAAG,eAAe,QAAQ,CAAC;AACtG,eAAW,oBAAoB,UAAU,EAAE,IAAI,KAAK,CAAC;AAAA,EACvD;AACA,QAAM,MAAM,IAAI,OAAO,SAAS,IAAI,QAAQ;AAC9C;AAGA,eAAsB,oBACpB,OACA,OACA,QACA,UACA,WACe;AACf,QAAM,MAAM,OAAO,OAAO,SAAS,SAAS,QAAQ,UAAU,SAAS,CAAC;AAC1E;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computeBidxTarget
|
|
3
|
+
} from "./chunk-4K6BIMLF.js";
|
|
4
|
+
import "./chunk-LP7BEXCT.js";
|
|
5
|
+
import "./chunk-ONPVHX2Y.js";
|
|
6
|
+
import "./chunk-Z3BZXPRO.js";
|
|
7
|
+
import "./chunk-PZ5AY32C.js";
|
|
8
|
+
export {
|
|
9
|
+
computeBidxTarget
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=find-V4FN5ITT.js.map
|
package/dist/forget/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NO_FORGET,
|
|
3
3
|
SUBJECT_INDEX_COLLECTION
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-HSJBJIB2.js";
|
|
5
|
+
import "../chunk-CXPOG3ZY.js";
|
|
6
|
+
import "../chunk-FX3UIDCS.js";
|
|
7
|
+
import "../chunk-CKKN25P2.js";
|
|
8
|
+
import "../chunk-7Q3RHOA5.js";
|
|
9
|
+
import "../chunk-4K6BIMLF.js";
|
|
10
10
|
import "../chunk-LP7BEXCT.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-ONPVHX2Y.js";
|
|
12
|
+
import "../chunk-UJ4Z67UQ.js";
|
|
13
|
+
import "../chunk-Z3BZXPRO.js";
|
|
14
14
|
import "../chunk-PZ5AY32C.js";
|
|
15
15
|
|
|
16
16
|
// src/with-audit/forget/active.ts
|
package/dist/guards/index.js
CHANGED
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
immutableGuard,
|
|
3
3
|
transitionGuard,
|
|
4
4
|
withGuard
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-FU5VYEYK.js";
|
|
6
|
+
import {
|
|
7
|
+
ReadOnlyVaultFacade
|
|
8
|
+
} from "../chunk-JK733I5V.js";
|
|
6
9
|
import {
|
|
7
10
|
GuardExecutor
|
|
8
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-OQMCFHUX.js";
|
|
9
12
|
import {
|
|
10
13
|
GuardRegistry
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import {
|
|
13
|
-
ReadOnlyVaultFacade
|
|
14
|
-
} from "../chunk-JK733I5V.js";
|
|
14
|
+
} from "../chunk-22GR3O4J.js";
|
|
15
15
|
import {
|
|
16
16
|
AmendmentForbiddenError,
|
|
17
17
|
FieldFrozenError,
|
|
18
18
|
IllegalTransitionError,
|
|
19
19
|
InvariantError,
|
|
20
20
|
RecordLockedError
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-Z3BZXPRO.js";
|
|
22
22
|
import "../chunk-PZ5AY32C.js";
|
|
23
23
|
export {
|
|
24
24
|
AmendmentForbiddenError,
|
package/dist/history/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CollectionInstant,
|
|
3
|
-
VaultInstant
|
|
3
|
+
VaultInstant
|
|
4
|
+
} from "../chunk-D6SXRMZZ.js";
|
|
5
|
+
import {
|
|
6
|
+
diff,
|
|
7
|
+
formatDiff
|
|
8
|
+
} from "../chunk-SVLR4POP.js";
|
|
9
|
+
import {
|
|
10
|
+
NO_HISTORY,
|
|
4
11
|
clearHistory,
|
|
5
12
|
getHistory,
|
|
6
13
|
getVersionEnvelope,
|
|
14
|
+
historyIdentity,
|
|
7
15
|
pruneHistory,
|
|
8
16
|
rewrapHistory,
|
|
9
17
|
saveHistory,
|
|
10
18
|
tombstoneHistory
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import {
|
|
13
|
-
diff,
|
|
14
|
-
formatDiff
|
|
15
|
-
} from "../chunk-SVLR4POP.js";
|
|
16
|
-
import {
|
|
17
|
-
NO_HISTORY
|
|
18
|
-
} from "../chunk-AFHQATY4.js";
|
|
19
|
+
} from "../chunk-7ZGPQOFV.js";
|
|
19
20
|
import {
|
|
20
21
|
LedgerStore,
|
|
21
22
|
applyPatch,
|
|
22
23
|
computePatch
|
|
23
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-JXHNUYQO.js";
|
|
24
25
|
import {
|
|
25
26
|
LEDGER_COLLECTION,
|
|
26
27
|
LEDGER_DELTAS_COLLECTION
|
|
27
28
|
} from "../chunk-I7FD46FF.js";
|
|
28
|
-
import "../chunk-3FSX6LDG.js";
|
|
29
29
|
import {
|
|
30
30
|
canonicalJson,
|
|
31
31
|
envelopePayloadHash,
|
|
@@ -33,22 +33,24 @@ import {
|
|
|
33
33
|
paddedIndex,
|
|
34
34
|
parseIndex,
|
|
35
35
|
sha256Hex
|
|
36
|
-
} from "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
36
|
+
} from "../chunk-BZ3WMOYX.js";
|
|
37
|
+
import "../chunk-D2YFQ7XG.js";
|
|
38
|
+
import "../chunk-CXPOG3ZY.js";
|
|
39
|
+
import "../chunk-FX3UIDCS.js";
|
|
40
|
+
import "../chunk-CKKN25P2.js";
|
|
41
|
+
import "../chunk-7Q3RHOA5.js";
|
|
42
|
+
import "../chunk-4K6BIMLF.js";
|
|
42
43
|
import "../chunk-LP7BEXCT.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-ONPVHX2Y.js";
|
|
45
|
+
import "../chunk-UJ4Z67UQ.js";
|
|
46
|
+
import "../chunk-Z3BZXPRO.js";
|
|
46
47
|
import "../chunk-PZ5AY32C.js";
|
|
47
48
|
|
|
48
49
|
// src/with-commit/history/active.ts
|
|
49
50
|
function withHistory() {
|
|
50
51
|
return {
|
|
51
52
|
saveHistory,
|
|
53
|
+
historyIdentity,
|
|
52
54
|
getHistoryEntries: getHistory,
|
|
53
55
|
getVersionEnvelope,
|
|
54
56
|
pruneHistory,
|
|
@@ -89,6 +91,7 @@ export {
|
|
|
89
91
|
getHistory,
|
|
90
92
|
getVersionEnvelope,
|
|
91
93
|
hashEntry,
|
|
94
|
+
historyIdentity,
|
|
92
95
|
paddedIndex,
|
|
93
96
|
parseIndex,
|
|
94
97
|
pruneHistory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/with-commit/history/active.ts"],"sourcesContent":["/**\n * Active history strategy — `withHistory()` returns the real\n * implementation that wires per-record snapshots, the hash-chained\n * audit ledger, JSON-patch deltas, and time-machine reads into the\n * core write/read paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withHistory } from '@noy-db/hub/history'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * historyStrategy: withHistory(),\n * })\n * ```\n *\n * The factory is a thin wrapper that delegates to the existing\n * `history.ts`, `diff.ts`, `ledger/store.ts`, `ledger/patch.ts`, and\n * `time-machine.ts` modules. Splitting the import chain through this\n * file is what lets `tsup` tree-shake the heavy modules out of the\n * default `@noy-db/hub` bundle when no `withHistory()` import is\n * present in the consumer.\n *\n * @public\n */\n\nimport type { HistoryStrategy, BuildLedgerOptions } from './strategy.js'\nimport {\n saveHistory,\n getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n rewrapHistory,\n} from './history.js'\nimport { diff as computeDiff } from './diff.js'\nimport { LedgerStore, envelopePayloadHash } from './ledger/store.js'\nimport { computePatch } from './ledger/patch.js'\nimport { VaultInstant } from './time-machine.js'\n\n/**\n * Build the active history strategy. Today the factory takes no\n * options; per-collection retention tuning still flows through\n * `HistoryConfig` on `Vault.collection()` / `vault.openVault()`.\n *\n * Future option slots (kept off the LTS surface for now):\n * - global maxVersions cap\n * - global beforeDate prune cadence\n * - ledger encryption toggle (today inferred from vault.encrypted)\n */\nexport function withHistory(): HistoryStrategy {\n return {\n saveHistory,\n getHistoryEntries: getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n rewrapHistory,\n envelopePayloadHash,\n computePatch,\n diff: computeDiff,\n buildLedger(opts: BuildLedgerOptions): LedgerStore {\n return new LedgerStore({\n adapter: opts.adapter,\n vault: opts.vault,\n encrypted: opts.encrypted,\n getDEK: opts.getDEK,\n actor: opts.actor,\n })\n },\n buildVaultInstant(engine, timestamp): VaultInstant {\n return new VaultInstant(engine, timestamp)\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/with-commit/history/active.ts"],"sourcesContent":["/**\n * Active history strategy — `withHistory()` returns the real\n * implementation that wires per-record snapshots, the hash-chained\n * audit ledger, JSON-patch deltas, and time-machine reads into the\n * core write/read paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withHistory } from '@noy-db/hub/history'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * historyStrategy: withHistory(),\n * })\n * ```\n *\n * The factory is a thin wrapper that delegates to the existing\n * `history.ts`, `diff.ts`, `ledger/store.ts`, `ledger/patch.ts`, and\n * `time-machine.ts` modules. Splitting the import chain through this\n * file is what lets `tsup` tree-shake the heavy modules out of the\n * default `@noy-db/hub` bundle when no `withHistory()` import is\n * present in the consumer.\n *\n * @public\n */\n\nimport type { HistoryStrategy, BuildLedgerOptions } from './strategy.js'\nimport {\n saveHistory,\n historyIdentity,\n getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n rewrapHistory,\n} from './history.js'\nimport { diff as computeDiff } from './diff.js'\nimport { LedgerStore, envelopePayloadHash } from './ledger/store.js'\nimport { computePatch } from './ledger/patch.js'\nimport { VaultInstant } from './time-machine.js'\n\n/**\n * Build the active history strategy. Today the factory takes no\n * options; per-collection retention tuning still flows through\n * `HistoryConfig` on `Vault.collection()` / `vault.openVault()`.\n *\n * Future option slots (kept off the LTS surface for now):\n * - global maxVersions cap\n * - global beforeDate prune cadence\n * - ledger encryption toggle (today inferred from vault.encrypted)\n */\nexport function withHistory(): HistoryStrategy {\n return {\n saveHistory,\n historyIdentity,\n getHistoryEntries: getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n tombstoneHistory,\n rewrapHistory,\n envelopePayloadHash,\n computePatch,\n diff: computeDiff,\n buildLedger(opts: BuildLedgerOptions): LedgerStore {\n return new LedgerStore({\n adapter: opts.adapter,\n vault: opts.vault,\n encrypted: opts.encrypted,\n getDEK: opts.getDEK,\n actor: opts.actor,\n })\n },\n buildVaultInstant(engine, timestamp): VaultInstant {\n return new VaultInstant(engine, timestamp)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,MAAuC;AACjD,aAAO,IAAI,YAAY;AAAA,QACrB,SAAS,KAAK;AAAA,QACd,OAAO,KAAK;AAAA,QACZ,WAAW,KAAK;AAAA,QAChB,QAAQ,KAAK;AAAA,QACb,OAAO,KAAK;AAAA,MACd,CAAC;AAAA,IACH;AAAA,IACA,kBAAkB,QAAQ,WAAyB;AACjD,aAAO,IAAI,aAAa,QAAQ,SAAS;AAAA,IAC3C;AAAA,EACF;AACF;","names":[]}
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withLookup
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RPRASGEY.js";
|
|
4
4
|
import {
|
|
5
5
|
dictKey,
|
|
6
6
|
staticDict
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-XINT4VJA.js";
|
|
8
8
|
import {
|
|
9
9
|
DICT_COLLECTION_PREFIX,
|
|
10
10
|
LookupHandle,
|
|
11
11
|
dictCollectionName
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-FNYCT27B.js";
|
|
13
13
|
import {
|
|
14
14
|
NO_I18N,
|
|
15
15
|
applyI18nLocale,
|
|
@@ -26,17 +26,17 @@ import {
|
|
|
26
26
|
resolvePolicy,
|
|
27
27
|
stripI18nFilled,
|
|
28
28
|
validateI18nTextValue
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-XPEPMK4Y.js";
|
|
30
|
+
import "../chunk-C3XWJCG7.js";
|
|
31
|
+
import "../chunk-BZ3WMOYX.js";
|
|
32
|
+
import "../chunk-CXPOG3ZY.js";
|
|
33
|
+
import "../chunk-FX3UIDCS.js";
|
|
34
|
+
import "../chunk-CKKN25P2.js";
|
|
35
|
+
import "../chunk-7Q3RHOA5.js";
|
|
36
|
+
import "../chunk-4K6BIMLF.js";
|
|
37
37
|
import "../chunk-LP7BEXCT.js";
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-ONPVHX2Y.js";
|
|
39
|
+
import "../chunk-UJ4Z67UQ.js";
|
|
40
40
|
import {
|
|
41
41
|
DictKeyInUseError,
|
|
42
42
|
DictKeyMissingError,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
StaticDictReadonlyError,
|
|
48
48
|
TranslatorNotConfiguredError,
|
|
49
49
|
UnknownDictCodeError
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-Z3BZXPRO.js";
|
|
51
51
|
import "../chunk-PZ5AY32C.js";
|
|
52
52
|
|
|
53
53
|
// src/via/i18n/densify.ts
|