@noy-db/hub 0.6.0-pre.16 → 0.6.0-pre.18
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/dist/{api-NAY63UIE.js → api-FRFEJ6WR.js} +6 -6
- package/dist/attestation/index.js +12 -12
- package/dist/{backup-M2VND2VS.js → backup-OLBRFYY7.js} +10 -10
- package/dist/{backup-M2VND2VS.js.map → backup-OLBRFYY7.js.map} +1 -1
- package/dist/blobs/index.js +8 -8
- package/dist/broker/index.js +6 -6
- package/dist/cargo/index.js +26 -26
- package/dist/{chunk-4CSG6KBX.js → chunk-2ION5ZRH.js} +17 -14
- package/dist/chunk-2ION5ZRH.js.map +1 -0
- package/dist/{chunk-466KGOQB.js → chunk-2NE7ILO7.js} +2 -2
- package/dist/{chunk-CZV57HHC.js → chunk-3KXIGMZ4.js} +2 -2
- package/dist/{chunk-5CH4DWQA.js → chunk-3ODOWQMV.js} +13 -14
- package/dist/chunk-3ODOWQMV.js.map +1 -0
- package/dist/{chunk-3OEWD45V.js → chunk-3RZ7QLJ4.js} +5 -5
- package/dist/{chunk-SFY6NT7D.js → chunk-3Y4OFWQJ.js} +1 -1
- package/dist/chunk-3Y4OFWQJ.js.map +1 -0
- package/dist/{chunk-FZ2SSI5R.js → chunk-6AL6O4CS.js} +2 -2
- package/dist/{chunk-4XEUSZWN.js → chunk-6D3CN2JR.js} +2 -2
- package/dist/{chunk-6UAVKAG6.js → chunk-6QCXMCLZ.js} +3 -3
- package/dist/{chunk-B4G3JPH5.js → chunk-7EH322GJ.js} +14 -7
- package/dist/chunk-7EH322GJ.js.map +1 -0
- package/dist/{chunk-AMKCY454.js → chunk-7WD2G6K4.js} +7 -2
- package/dist/{chunk-AMKCY454.js.map → chunk-7WD2G6K4.js.map} +1 -1
- package/dist/{chunk-VUUUIKRG.js → chunk-A5QQKWCK.js} +14 -23
- package/dist/chunk-A5QQKWCK.js.map +1 -0
- package/dist/{chunk-RRMXMJUP.js → chunk-AA2WWTS3.js} +9 -7
- package/dist/chunk-AA2WWTS3.js.map +1 -0
- package/dist/{chunk-WMUN7ZUD.js → chunk-AA7LM2A3.js} +2 -2
- package/dist/{chunk-PJGMBELR.js → chunk-AIZNLHKN.js} +4 -4
- package/dist/chunk-AIZNLHKN.js.map +1 -0
- package/dist/{chunk-MKSTUVMJ.js → chunk-AMMYIT7F.js} +35 -31
- package/dist/chunk-AMMYIT7F.js.map +1 -0
- package/dist/{chunk-TWPTRJEU.js → chunk-BBU3OD3D.js} +2 -2
- package/dist/{chunk-OJEDR25M.js → chunk-BVIGGV6D.js} +33 -45
- package/dist/chunk-BVIGGV6D.js.map +1 -0
- package/dist/{chunk-IQGIPRSE.js → chunk-CFTPERGL.js} +14 -11
- package/dist/chunk-CFTPERGL.js.map +1 -0
- package/dist/{chunk-T6CCRXD3.js → chunk-CGQUSSW7.js} +26 -142
- package/dist/chunk-CGQUSSW7.js.map +1 -0
- package/dist/{chunk-4JDTLWUZ.js → chunk-DFFSCYIW.js} +9 -9
- package/dist/{chunk-JZVXGOJE.js → chunk-DKYEVHZH.js} +7 -10
- package/dist/chunk-DKYEVHZH.js.map +1 -0
- package/dist/{chunk-YVOW35HH.js → chunk-DL4GDOWL.js} +4 -6
- package/dist/chunk-DL4GDOWL.js.map +1 -0
- package/dist/{chunk-LGGLPURL.js → chunk-DWO55ZWE.js} +13 -22
- package/dist/chunk-DWO55ZWE.js.map +1 -0
- package/dist/{chunk-MKV2KYRV.js → chunk-ER3BQCCE.js} +2 -2
- package/dist/{chunk-JU3JKOY5.js → chunk-EWAGI3EM.js} +2 -2
- package/dist/{chunk-WMZQCXZ5.js → chunk-EZ3UHHND.js} +13 -15
- package/dist/chunk-EZ3UHHND.js.map +1 -0
- package/dist/{chunk-5TF5DUQ5.js → chunk-FDIZHZ3C.js} +29 -47
- package/dist/chunk-FDIZHZ3C.js.map +1 -0
- package/dist/{chunk-56W3T5O2.js → chunk-FOABWV7L.js} +45 -18
- package/dist/chunk-FOABWV7L.js.map +1 -0
- package/dist/{chunk-H5U4T6JK.js → chunk-FRGF56PD.js} +11 -14
- package/dist/chunk-FRGF56PD.js.map +1 -0
- package/dist/{chunk-53PWELSC.js → chunk-FY33DKPH.js} +2 -2
- package/dist/{chunk-KKRFL5E2.js → chunk-GSRW5MTU.js} +220 -169
- package/dist/chunk-GSRW5MTU.js.map +1 -0
- package/dist/{chunk-4VRZDYRE.js → chunk-HJRTFXAA.js} +7 -10
- package/dist/chunk-HJRTFXAA.js.map +1 -0
- package/dist/chunk-HK67PX4J.js +27 -0
- package/dist/chunk-HK67PX4J.js.map +1 -0
- package/dist/{chunk-A3WHDOWI.js → chunk-IN5EZWYQ.js} +13 -14
- package/dist/chunk-IN5EZWYQ.js.map +1 -0
- package/dist/{chunk-PZLIA5R3.js → chunk-ITXPKEDP.js} +23 -29
- package/dist/chunk-ITXPKEDP.js.map +1 -0
- package/dist/{chunk-343FH4S5.js → chunk-JYFJNSTW.js} +9 -9
- package/dist/chunk-JYFJNSTW.js.map +1 -0
- package/dist/{chunk-35RIRCGW.js → chunk-KLVGF2D4.js} +11 -9
- package/dist/{chunk-35RIRCGW.js.map → chunk-KLVGF2D4.js.map} +1 -1
- package/dist/{chunk-7LLKPODL.js → chunk-LPAGIMXJ.js} +2 -2
- package/dist/{chunk-3JQVA527.js → chunk-LU6NPJWN.js} +3 -3
- package/dist/{chunk-UVFO25FJ.js → chunk-NAAPSNCS.js} +90 -33
- package/dist/chunk-NAAPSNCS.js.map +1 -0
- package/dist/{chunk-OPGKH5RD.js → chunk-NFPSC2HL.js} +3 -3
- package/dist/{chunk-55B3KHZW.js → chunk-NRNTXBHT.js} +7 -10
- package/dist/chunk-NRNTXBHT.js.map +1 -0
- package/dist/{chunk-I5OLA3H6.js → chunk-O4QDBAB6.js} +7 -10
- package/dist/{chunk-I5OLA3H6.js.map → chunk-O4QDBAB6.js.map} +1 -1
- package/dist/{chunk-4DJQU3PH.js → chunk-OCCNYGKG.js} +7 -7
- package/dist/{chunk-76FBDG6M.js → chunk-OZD3D2DZ.js} +10 -13
- package/dist/chunk-OZD3D2DZ.js.map +1 -0
- package/dist/{chunk-YX6J3Z3Z.js → chunk-PBPYQZDW.js} +2 -2
- package/dist/{chunk-TTAND7MR.js → chunk-PBRIHUQ5.js} +5 -5
- package/dist/{chunk-TTAND7MR.js.map → chunk-PBRIHUQ5.js.map} +1 -1
- package/dist/{chunk-NBLLQOMR.js → chunk-Q67P7S2I.js} +14 -15
- package/dist/chunk-Q67P7S2I.js.map +1 -0
- package/dist/{chunk-NY6RQBUN.js → chunk-RAYGDC4A.js} +50 -63
- package/dist/chunk-RAYGDC4A.js.map +1 -0
- package/dist/{chunk-RVTOCAHQ.js → chunk-SQSZRCYT.js} +1 -1
- package/dist/chunk-SQSZRCYT.js.map +1 -0
- package/dist/{chunk-JN64WH3U.js → chunk-T7IR4N2S.js} +1 -1
- package/dist/{chunk-JN64WH3U.js.map → chunk-T7IR4N2S.js.map} +1 -1
- package/dist/{chunk-THUITYH7.js → chunk-TNOQNU3R.js} +5 -4
- package/dist/{chunk-THUITYH7.js.map → chunk-TNOQNU3R.js.map} +1 -1
- package/dist/{chunk-TY6N3PAC.js → chunk-TXDOMADN.js} +9 -6
- package/dist/chunk-TXDOMADN.js.map +1 -0
- package/dist/{chunk-6EF3N2MH.js → chunk-U6D5XTI5.js} +13 -13
- package/dist/{chunk-6EF3N2MH.js.map → chunk-U6D5XTI5.js.map} +1 -1
- package/dist/{chunk-HNX47VTC.js → chunk-UE72AQDZ.js} +6 -6
- package/dist/chunk-UIYZ5SOU.js +190 -0
- package/dist/chunk-UIYZ5SOU.js.map +1 -0
- package/dist/{chunk-IGE6XWKK.js → chunk-VXVKEWYC.js} +3 -3
- package/dist/{chunk-LTVETWDH.js → chunk-X3AXSYBL.js} +217 -123
- package/dist/chunk-X3AXSYBL.js.map +1 -0
- package/dist/{chunk-AD2PJGSS.js → chunk-ZDATYUYG.js} +2 -2
- package/dist/{chunk-LJDW6LQJ.js → chunk-ZSOTZ2RZ.js} +41 -24
- package/dist/chunk-ZSOTZ2RZ.js.map +1 -0
- package/dist/{chunk-6E2JZRBD.js → chunk-ZVAFJQZB.js} +25 -19
- package/dist/chunk-ZVAFJQZB.js.map +1 -0
- package/dist/classified/index.js +4 -4
- package/dist/{classified-marker-L7LXKS6Q.js → classified-marker-GWQTNDSL.js} +3 -3
- package/dist/{collection-facade-KN3UFKZ4.js → collection-facade-56RTPO4G.js} +12 -12
- package/dist/consent/index.js +4 -4
- package/dist/cover/index.js +9 -2
- package/dist/custody/index.js +6 -6
- package/dist/{dead-filter-6HG5FP3I.js → dead-filter-XP7MPHCJ.js} +2 -2
- package/dist/{delegation-7EGBYBRN.js → delegation-Q3HEAVLA.js} +18 -19
- package/dist/delegation-Q3HEAVLA.js.map +1 -0
- package/dist/derivations/index.js +3 -3
- package/dist/{derive-XKAYJ2OA.js → derive-SVDY36ER.js} +4 -4
- package/dist/directory/index.js +5 -5
- package/dist/{dispatch-56T7VPGE.js → dispatch-MG5KNMWG.js} +5 -5
- package/dist/{dispatch-BM5GNCE2.js → dispatch-RVJQ4BOL.js} +11 -11
- package/dist/{enclave-KDLGVX5Z.js → enclave-AOZTWFZK.js} +16 -4
- package/dist/{executor-LFHRV6JH.js → executor-FRUVM36Q.js} +12 -12
- package/dist/{export-accessible-HFBJ4JJY.js → export-accessible-HDDHZYPM.js} +7 -7
- package/dist/{extract-partition-7ZRFN6QP.js → extract-partition-TRADP234.js} +12 -12
- package/dist/{fanout-sidecar-MT2OBMZB.js → fanout-sidecar-NZA6J7QB.js} +13 -22
- package/dist/fanout-sidecar-NZA6J7QB.js.map +1 -0
- package/dist/forget/index.js +4 -4
- package/dist/history/index.js +18 -15
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +9 -9
- package/dist/index.d.ts +16 -0
- package/dist/index.js +129 -127
- package/dist/index.js.map +1 -1
- package/dist/introspection/index.js +5 -5
- package/dist/{issue-LCOOEH45.js → issue-GZQDW5TQ.js} +6 -6
- package/dist/kernel/enclave/index.d.ts +7 -5
- package/dist/kernel/enclave/record-aad.d.ts +79 -7
- package/dist/kernel/enclave/record-envelope.d.ts +54 -7
- 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.d.ts +68 -0
- package/dist/kernel/enclave/record-keys/tombstone.d.ts +3 -3
- package/dist/kernel/merge-authority.d.ts +25 -0
- package/dist/kernel/tier-visibility.d.ts +15 -0
- package/dist/kernel/types.d.ts +23 -0
- package/dist/kernel/vault.d.ts +1 -1
- package/dist/kernel/via/index.d.ts +11 -2
- package/dist/{ledger-6IHXJHDD.js → ledger-KQAJPEMZ.js} +6 -6
- package/dist/liberate-Z2EXJY2S.js +24 -0
- package/dist/{link-set-XRVHGYWC.js → link-set-XKN5V7VM.js} +5 -5
- package/dist/{managed-secret-IDAOXSSX.js → managed-secret-7WIIVMJ5.js} +11 -3
- package/dist/materialized-views/index.js +14 -14
- package/dist/money/index.js +3 -3
- package/dist/{noydb-M5WII7RP.js → noydb-NPW3C2EX.js} +39 -38
- package/dist/periods/index.js +6 -6
- package/dist/pod/index.js +42 -41
- package/dist/{pod-handle-BYUSBXCT.js → pod-handle-SKDKRPOR.js} +6 -6
- package/dist/{pod-handle-BYUSBXCT.js.map → pod-handle-SKDKRPOR.js.map} +1 -1
- package/dist/policy/index.js +10 -3
- package/dist/port/with/merge-authority.d.ts +52 -0
- package/dist/port/with/strategies.d.ts +2 -0
- package/dist/portability/index.js +6 -6
- package/dist/{post-register-O3YW6CGS.js → post-register-CVS7CCJE.js} +4 -4
- package/dist/reduce/index.js +3 -3
- package/dist/{register-XHOOX37G.js → register-GJ6PW4KP.js} +10 -10
- package/dist/{registry-OFMM4WAC.js → registry-6LUJ5IJW.js} +4 -4
- package/dist/{registry-CYAFB35H.js → registry-KI77RVK7.js} +4 -4
- package/dist/{request-withdrawal-GCE2SLNW.js → request-withdrawal-LICOUGXG.js} +9 -9
- package/dist/{reveal-UHBP5IH3.js → reveal-PWM47FQN.js} +3 -3
- package/dist/{revoke-6KY4VGZY.js → revoke-AWZKZLZB.js} +6 -6
- package/dist/sealed-record/index.js +14 -7
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +3 -3
- package/dist/{seed-DGLQTCIO.js → seed-LNTLU2A3.js} +14 -17
- package/dist/seed-LNTLU2A3.js.map +1 -0
- package/dist/sequence/index.js +4 -4
- package/dist/session/index.js +3 -3
- package/dist/{signer-SLOMB6HS.js → signer-JE6NEURY.js} +5 -5
- package/dist/snapshots/index.js +5 -5
- package/dist/{stale-26ZJLNLG.js → stale-ZWTKUVZX.js} +5 -5
- package/dist/{storage-N3IMFNGS.js → storage-WCZOCA46.js} +5 -5
- package/dist/{store-coordination-provider-RGHCIRWV.js → store-coordination-provider-7H62VO2C.js} +18 -12
- package/dist/store-coordination-provider-7H62VO2C.js.map +1 -0
- package/dist/sync/index.js +5 -5
- package/dist/team/index.js +10 -9
- package/dist/tiers/index.js +6 -5
- package/dist/vault-head/index.js +111 -0
- package/dist/vault-head/index.js.map +1 -0
- package/dist/{walk-B4YFJJ7S.js → walk-HSS3NLQ3.js} +6 -6
- package/dist/with-audit/periods/periods.d.ts +1 -1
- package/dist/with-audit/periods/strategy.d.ts +1 -1
- package/dist/with-audit/sealed-record/index.d.ts +13 -0
- package/dist/with-audit/tiers/index.d.ts +17 -2
- 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/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 +50 -0
- 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/keyring.d.ts +5 -0
- package/dist/with-party/team/tiers.d.ts +2 -1
- package/dist/with-sync/engine.d.ts +33 -5
- package/dist/with-sync/strategy.d.ts +3 -0
- package/dist/{withdraw-accessible-OYG7YZUR.js → withdraw-accessible-GHBA4DAA.js} +8 -8
- package/package.json +7 -3
- package/dist/chunk-343FH4S5.js.map +0 -1
- package/dist/chunk-4CSG6KBX.js.map +0 -1
- package/dist/chunk-4VRZDYRE.js.map +0 -1
- package/dist/chunk-55B3KHZW.js.map +0 -1
- package/dist/chunk-56W3T5O2.js.map +0 -1
- package/dist/chunk-5CH4DWQA.js.map +0 -1
- package/dist/chunk-5TF5DUQ5.js.map +0 -1
- package/dist/chunk-6E2JZRBD.js.map +0 -1
- package/dist/chunk-76FBDG6M.js.map +0 -1
- package/dist/chunk-A3WHDOWI.js.map +0 -1
- package/dist/chunk-AFHQATY4.js +0 -47
- package/dist/chunk-AFHQATY4.js.map +0 -1
- package/dist/chunk-B4G3JPH5.js.map +0 -1
- package/dist/chunk-H5U4T6JK.js.map +0 -1
- package/dist/chunk-IQGIPRSE.js.map +0 -1
- package/dist/chunk-JZVXGOJE.js.map +0 -1
- package/dist/chunk-KKRFL5E2.js.map +0 -1
- package/dist/chunk-LGGLPURL.js.map +0 -1
- package/dist/chunk-LJDW6LQJ.js.map +0 -1
- package/dist/chunk-LTVETWDH.js.map +0 -1
- package/dist/chunk-MKSTUVMJ.js.map +0 -1
- package/dist/chunk-NBLLQOMR.js.map +0 -1
- package/dist/chunk-NY6RQBUN.js.map +0 -1
- package/dist/chunk-OJEDR25M.js.map +0 -1
- package/dist/chunk-PJGMBELR.js.map +0 -1
- package/dist/chunk-PZLIA5R3.js.map +0 -1
- package/dist/chunk-RRMXMJUP.js.map +0 -1
- package/dist/chunk-RVTOCAHQ.js.map +0 -1
- package/dist/chunk-SFY6NT7D.js.map +0 -1
- package/dist/chunk-T6CCRXD3.js.map +0 -1
- package/dist/chunk-TY6N3PAC.js.map +0 -1
- package/dist/chunk-UVFO25FJ.js.map +0 -1
- package/dist/chunk-VUUUIKRG.js.map +0 -1
- package/dist/chunk-WMZQCXZ5.js.map +0 -1
- package/dist/chunk-YVOW35HH.js.map +0 -1
- package/dist/delegation-7EGBYBRN.js.map +0 -1
- package/dist/fanout-sidecar-MT2OBMZB.js.map +0 -1
- package/dist/liberate-UEYC4QLJ.js +0 -24
- package/dist/seed-DGLQTCIO.js.map +0 -1
- package/dist/store-coordination-provider-RGHCIRWV.js.map +0 -1
- /package/dist/{api-NAY63UIE.js.map → api-FRFEJ6WR.js.map} +0 -0
- /package/dist/{chunk-466KGOQB.js.map → chunk-2NE7ILO7.js.map} +0 -0
- /package/dist/{chunk-CZV57HHC.js.map → chunk-3KXIGMZ4.js.map} +0 -0
- /package/dist/{chunk-3OEWD45V.js.map → chunk-3RZ7QLJ4.js.map} +0 -0
- /package/dist/{chunk-FZ2SSI5R.js.map → chunk-6AL6O4CS.js.map} +0 -0
- /package/dist/{chunk-4XEUSZWN.js.map → chunk-6D3CN2JR.js.map} +0 -0
- /package/dist/{chunk-6UAVKAG6.js.map → chunk-6QCXMCLZ.js.map} +0 -0
- /package/dist/{chunk-WMUN7ZUD.js.map → chunk-AA7LM2A3.js.map} +0 -0
- /package/dist/{chunk-TWPTRJEU.js.map → chunk-BBU3OD3D.js.map} +0 -0
- /package/dist/{chunk-4JDTLWUZ.js.map → chunk-DFFSCYIW.js.map} +0 -0
- /package/dist/{chunk-MKV2KYRV.js.map → chunk-ER3BQCCE.js.map} +0 -0
- /package/dist/{chunk-JU3JKOY5.js.map → chunk-EWAGI3EM.js.map} +0 -0
- /package/dist/{chunk-53PWELSC.js.map → chunk-FY33DKPH.js.map} +0 -0
- /package/dist/{chunk-7LLKPODL.js.map → chunk-LPAGIMXJ.js.map} +0 -0
- /package/dist/{chunk-3JQVA527.js.map → chunk-LU6NPJWN.js.map} +0 -0
- /package/dist/{chunk-OPGKH5RD.js.map → chunk-NFPSC2HL.js.map} +0 -0
- /package/dist/{chunk-4DJQU3PH.js.map → chunk-OCCNYGKG.js.map} +0 -0
- /package/dist/{chunk-YX6J3Z3Z.js.map → chunk-PBPYQZDW.js.map} +0 -0
- /package/dist/{chunk-HNX47VTC.js.map → chunk-UE72AQDZ.js.map} +0 -0
- /package/dist/{chunk-IGE6XWKK.js.map → chunk-VXVKEWYC.js.map} +0 -0
- /package/dist/{chunk-AD2PJGSS.js.map → chunk-ZDATYUYG.js.map} +0 -0
- /package/dist/{classified-marker-L7LXKS6Q.js.map → classified-marker-GWQTNDSL.js.map} +0 -0
- /package/dist/{collection-facade-KN3UFKZ4.js.map → collection-facade-56RTPO4G.js.map} +0 -0
- /package/dist/{dead-filter-6HG5FP3I.js.map → dead-filter-XP7MPHCJ.js.map} +0 -0
- /package/dist/{derive-XKAYJ2OA.js.map → derive-SVDY36ER.js.map} +0 -0
- /package/dist/{dispatch-56T7VPGE.js.map → dispatch-MG5KNMWG.js.map} +0 -0
- /package/dist/{dispatch-BM5GNCE2.js.map → dispatch-RVJQ4BOL.js.map} +0 -0
- /package/dist/{enclave-KDLGVX5Z.js.map → enclave-AOZTWFZK.js.map} +0 -0
- /package/dist/{executor-LFHRV6JH.js.map → executor-FRUVM36Q.js.map} +0 -0
- /package/dist/{export-accessible-HFBJ4JJY.js.map → export-accessible-HDDHZYPM.js.map} +0 -0
- /package/dist/{extract-partition-7ZRFN6QP.js.map → extract-partition-TRADP234.js.map} +0 -0
- /package/dist/{issue-LCOOEH45.js.map → issue-GZQDW5TQ.js.map} +0 -0
- /package/dist/{ledger-6IHXJHDD.js.map → ledger-KQAJPEMZ.js.map} +0 -0
- /package/dist/{liberate-UEYC4QLJ.js.map → liberate-Z2EXJY2S.js.map} +0 -0
- /package/dist/{link-set-XRVHGYWC.js.map → link-set-XKN5V7VM.js.map} +0 -0
- /package/dist/{managed-secret-IDAOXSSX.js.map → managed-secret-7WIIVMJ5.js.map} +0 -0
- /package/dist/{noydb-M5WII7RP.js.map → noydb-NPW3C2EX.js.map} +0 -0
- /package/dist/{post-register-O3YW6CGS.js.map → post-register-CVS7CCJE.js.map} +0 -0
- /package/dist/{register-XHOOX37G.js.map → register-GJ6PW4KP.js.map} +0 -0
- /package/dist/{registry-CYAFB35H.js.map → registry-6LUJ5IJW.js.map} +0 -0
- /package/dist/{registry-OFMM4WAC.js.map → registry-KI77RVK7.js.map} +0 -0
- /package/dist/{request-withdrawal-GCE2SLNW.js.map → request-withdrawal-LICOUGXG.js.map} +0 -0
- /package/dist/{reveal-UHBP5IH3.js.map → reveal-PWM47FQN.js.map} +0 -0
- /package/dist/{revoke-6KY4VGZY.js.map → revoke-AWZKZLZB.js.map} +0 -0
- /package/dist/{signer-SLOMB6HS.js.map → signer-JE6NEURY.js.map} +0 -0
- /package/dist/{stale-26ZJLNLG.js.map → stale-ZWTKUVZX.js.map} +0 -0
- /package/dist/{storage-N3IMFNGS.js.map → storage-WCZOCA46.js.map} +0 -0
- /package/dist/{walk-B4YFJJ7S.js.map → walk-HSS3NLQ3.js.map} +0 -0
- /package/dist/{withdraw-accessible-OYG7YZUR.js.map → withdraw-accessible-GHBA4DAA.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import "./chunk-PZ5AY32C.js";
|
|
|
5
5
|
|
|
6
6
|
// src/with-shape/satellites/dead-filter.ts
|
|
7
7
|
async function liveBaseIdSetsForBundle(store, vaultName, collectionNames, getDEK) {
|
|
8
|
-
const { loadPersistedSchema } = await import("./storage-
|
|
8
|
+
const { loadPersistedSchema } = await import("./storage-WCZOCA46.js");
|
|
9
9
|
const out = /* @__PURE__ */ new Map();
|
|
10
10
|
for (const name of collectionNames) {
|
|
11
11
|
if (name.startsWith("_")) continue;
|
|
@@ -25,4 +25,4 @@ async function liveBaseIdSetsForBundle(store, vaultName, collectionNames, getDEK
|
|
|
25
25
|
export {
|
|
26
26
|
liveBaseIdSetsForBundle
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=dead-filter-
|
|
28
|
+
//# sourceMappingURL=dead-filter-XP7MPHCJ.js.map
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
dekKey
|
|
3
|
-
} from "./chunk-YVOW35HH.js";
|
|
1
|
+
import "./chunk-DL4GDOWL.js";
|
|
4
2
|
import {
|
|
5
3
|
generateULID
|
|
6
4
|
} from "./chunk-4AOERLTV.js";
|
|
7
5
|
import {
|
|
6
|
+
dekKey
|
|
7
|
+
} from "./chunk-7WD2G6K4.js";
|
|
8
|
+
import {
|
|
9
|
+
buildRecordAad,
|
|
8
10
|
openEnvelopeJson
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import
|
|
11
|
+
} from "./chunk-X3AXSYBL.js";
|
|
12
|
+
import {
|
|
13
|
+
buildRecordEnvelope
|
|
14
|
+
} from "./chunk-ZVAFJQZB.js";
|
|
11
15
|
import "./chunk-FSZPQCDR.js";
|
|
12
16
|
import "./chunk-HVR74IBG.js";
|
|
13
17
|
import "./chunk-RBTZLXZJ.js";
|
|
@@ -17,9 +21,7 @@ import {
|
|
|
17
21
|
unwrapKey,
|
|
18
22
|
wrapKey
|
|
19
23
|
} from "./chunk-QTDAPDDV.js";
|
|
20
|
-
import
|
|
21
|
-
NOYDB_FORMAT_VERSION
|
|
22
|
-
} from "./chunk-SFY6NT7D.js";
|
|
24
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
23
25
|
import {
|
|
24
26
|
DelegationTargetMissingError
|
|
25
27
|
} from "./chunk-I64WQSN3.js";
|
|
@@ -54,15 +56,12 @@ async function issueDelegation(store, vault, grantor, targetKek, delegationsDek,
|
|
|
54
56
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
55
57
|
};
|
|
56
58
|
const plaintext = JSON.stringify(token);
|
|
57
|
-
const {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_data: data,
|
|
64
|
-
_by: grantor.userId
|
|
65
|
-
};
|
|
59
|
+
const identity = { collection: DELEGATIONS_COLLECTION, id: token.id, by: grantor.userId, version: 1 };
|
|
60
|
+
const { iv, data } = await encrypt(plaintext, delegationsDek, buildRecordAad(identity));
|
|
61
|
+
const envelope = buildRecordEnvelope(
|
|
62
|
+
identity,
|
|
63
|
+
{ ts: token.createdAt, iv, data }
|
|
64
|
+
);
|
|
66
65
|
await store.put(vault, DELEGATIONS_COLLECTION, token.id, envelope);
|
|
67
66
|
return token;
|
|
68
67
|
}
|
|
@@ -75,7 +74,7 @@ async function loadActiveDelegations(store, vault, user, delegationsDek, now = /
|
|
|
75
74
|
if (!env) continue;
|
|
76
75
|
let token;
|
|
77
76
|
try {
|
|
78
|
-
const plaintext = await openEnvelopeJson(env, delegationsDek);
|
|
77
|
+
const plaintext = await openEnvelopeJson({ collection: DELEGATIONS_COLLECTION, id }, env, delegationsDek);
|
|
79
78
|
token = JSON.parse(plaintext);
|
|
80
79
|
} catch {
|
|
81
80
|
continue;
|
|
@@ -104,4 +103,4 @@ export {
|
|
|
104
103
|
loadActiveDelegations,
|
|
105
104
|
revokeDelegation
|
|
106
105
|
};
|
|
107
|
-
//# sourceMappingURL=delegation-
|
|
106
|
+
//# sourceMappingURL=delegation-Q3HEAVLA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-party/team/delegation.ts"],"sourcesContent":["/**\n * Time-boxed cross-tier delegation tokens.\n *\n * A higher-tier user can issue a delegation that grants another user\n * temporary access to records at a specified tier. The delegation is\n * persisted as an encrypted envelope in the reserved `_delegations`\n * collection. The target user's runtime scans this collection on every\n * open and, while `until` is still in the future, merges the\n * unwrapped tier DEKs into their in-memory DEK map.\n *\n * ## Token shape\n *\n * ```\n * {\n * id, // ULID, also the _delegations record id\n * toUser, // grantee user id\n * fromUser, // grantor user id (owner/admin/higher-tier principal)\n * tier, // tier being delegated\n * collection, // collection name OR null for \"every collection\"\n * record, // optional specific record id\n * until, // ISO timestamp — token expires at this instant\n * wrappedDek, // base64 AES-KW-wrapped tier DEK, wrapped under target KEK\n * createdAt, // ISO timestamp\n * }\n * ```\n *\n * The ciphertext is stored as a normal noy-db envelope — the\n * `_delegations` collection has its own DEK shared across all vault\n * users, so an operator can enumerate active delegations for audit\n * without being able to *use* them (the `wrappedDek` inside is still\n * keyed to the target user's KEK).\n *\n * ## Revocation\n *\n * Delete the `_delegations/<id>` envelope. The target user's runtime\n * reloads the delegation list at each open and at periodic intervals\n * (tracked by the caller — this module is pure logic).\n *\n * @module\n */\n\nimport type { NoydbStore } from '../../kernel/types.js'\nimport type { UnlockedKeyring } from './keyring.js'\nimport { buildRecordAad, buildRecordEnvelope, encrypt, openEnvelopeJson, wrapKey, unwrapKey, type EnclaveKey } from '../../kernel/enclave/index.js'\nimport { dekKey } from './tiers.js'\nimport { DelegationTargetMissingError } from '../../kernel/errors.js'\nimport { generateULID } from '../../with-pod/ulid.js'\n\nexport const DELEGATIONS_COLLECTION = '_delegations'\n\n/**\n * Durable payload of a delegation token. Encrypted under the vault's\n * `_delegations` DEK; the `wrappedDek` inside is additionally wrapped\n * under the target user's KEK.\n */\nexport interface DelegationToken {\n readonly id: string\n readonly toUser: string\n readonly fromUser: string\n readonly tier: number\n /** Collection name or `null` for all collections. */\n readonly collection: string | null\n /** Optional specific record id scope. */\n readonly record?: string\n readonly until: string\n readonly wrappedDek: string\n readonly createdAt: string\n}\n\nexport interface IssueDelegationOptions {\n readonly toUser: string\n readonly tier: number\n readonly collection?: string\n readonly record?: string\n readonly until: Date | string\n}\n\n/**\n * Build and persist a delegation token. The caller must hold a tier-N\n * DEK and must have already located the target user's keyring file\n * (so the `wrappedDek` can be re-wrapped against their KEK).\n */\nexport async function issueDelegation(\n store: NoydbStore,\n vault: string,\n grantor: UnlockedKeyring,\n targetKek: EnclaveKey | null,\n delegationsDek: EnclaveKey,\n opts: IssueDelegationOptions,\n): Promise<DelegationToken> {\n if (!targetKek) {\n throw new DelegationTargetMissingError(opts.toUser)\n }\n const tier = opts.tier\n const collectionName = opts.collection ?? null\n const dekLookupCollection = collectionName ?? ''\n // Tier DEK to delegate — fetched from the grantor's own keyring.\n const sourceDek = collectionName\n ? grantor.deks.get(dekKey(collectionName, tier))\n : undefined\n if (!sourceDek) {\n throw new DelegationTargetMissingError(\n `grantor cannot find tier ${tier} DEK for ${dekLookupCollection || '(any)'}`,\n )\n }\n const wrappedDek = await wrapKey(sourceDek, targetKek)\n\n const until = typeof opts.until === 'string' ? opts.until : opts.until.toISOString()\n const token: DelegationToken = {\n id: generateULID(),\n toUser: opts.toUser,\n fromUser: grantor.userId,\n tier,\n collection: collectionName,\n ...(opts.record && { record: opts.record }),\n until,\n wrappedDek,\n createdAt: new Date().toISOString(),\n }\n\n const plaintext = JSON.stringify(token)\n const identity = { collection: DELEGATIONS_COLLECTION, id: token.id, by: grantor.userId, version: 1 }\n const { iv, data } = await encrypt(plaintext, delegationsDek, buildRecordAad(identity))\n const envelope = buildRecordEnvelope(\n identity,\n { ts: token.createdAt, iv, data},\n )\n await store.put(vault, DELEGATIONS_COLLECTION, token.id, envelope)\n return token\n}\n\n/**\n * Enumerate every live (non-expired) delegation addressed to `toUser`\n * and merge the unwrapped tier DEKs into their keyring. Returns the\n * list of merged delegations so the caller can register per-access\n * audit context.\n */\nexport async function loadActiveDelegations(\n store: NoydbStore,\n vault: string,\n user: UnlockedKeyring,\n delegationsDek: EnclaveKey,\n now: Date = new Date(),\n): Promise<DelegationToken[]> {\n const ids = await store.list(vault, DELEGATIONS_COLLECTION)\n const merged: DelegationToken[] = []\n const nowIso = now.toISOString()\n for (const id of ids) {\n const env = await store.get(vault, DELEGATIONS_COLLECTION, id)\n if (!env) continue\n let token: DelegationToken\n try {\n const plaintext = await openEnvelopeJson({ collection: DELEGATIONS_COLLECTION, id }, env, delegationsDek)\n token = JSON.parse(plaintext) as DelegationToken\n } catch {\n continue\n }\n if (token.toUser !== user.userId) continue\n if (token.until <= nowIso) continue\n\n // A user without a KEK in memory (tier-3 PIN resume, wrap-DEKs\n // tier-2 unlock, session restore) cannot unwrap delegation tokens\n // — those were wrapped under the user's KEK at issue time. Skip\n // this token; the consumer reaches it again at tier-1 unlock.\n if (!user.kek) continue\n let dek: EnclaveKey\n try {\n dek = await unwrapKey(token.wrappedDek, user.kek)\n } catch {\n continue\n }\n const k = token.collection\n ? dekKey(token.collection, token.tier)\n : `__any#${token.tier}`\n user.deks.set(k, dek)\n merged.push(token)\n }\n return merged\n}\n\n/**\n * Revoke a delegation by id — the caller resolves the envelope and\n * issues a `delete`. Provided as a stable helper so the naming is\n * symmetric to `issueDelegation`.\n */\nexport async function revokeDelegation(\n store: NoydbStore,\n vault: string,\n id: string,\n): Promise<void> {\n await store.delete(vault, DELEGATIONS_COLLECTION, id)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDO,IAAM,yBAAyB;AAkCtC,eAAsB,gBACpB,OACA,OACA,SACA,WACA,gBACA,MAC0B;AAC1B,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,6BAA6B,KAAK,MAAM;AAAA,EACpD;AACA,QAAM,OAAO,KAAK;AAClB,QAAM,iBAAiB,KAAK,cAAc;AAC1C,QAAM,sBAAsB,kBAAkB;AAE9C,QAAM,YAAY,iBACd,QAAQ,KAAK,IAAI,OAAO,gBAAgB,IAAI,CAAC,IAC7C;AACJ,MAAI,CAAC,WAAW;AACd,UAAM,IAAI;AAAA,MACR,4BAA4B,IAAI,YAAY,uBAAuB,OAAO;AAAA,IAC5E;AAAA,EACF;AACA,QAAM,aAAa,MAAM,QAAQ,WAAW,SAAS;AAErD,QAAM,QAAQ,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ,KAAK,MAAM,YAAY;AACnF,QAAM,QAAyB;AAAA,IAC7B,IAAI,aAAa;AAAA,IACjB,QAAQ,KAAK;AAAA,IACb,UAAU,QAAQ;AAAA,IAClB;AAAA,IACA,YAAY;AAAA,IACZ,GAAI,KAAK,UAAU,EAAE,QAAQ,KAAK,OAAO;AAAA,IACzC;AAAA,IACA;AAAA,IACA,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,EACpC;AAEA,QAAM,YAAY,KAAK,UAAU,KAAK;AACtC,QAAM,WAAW,EAAE,YAAY,wBAAwB,IAAI,MAAM,IAAI,IAAI,QAAQ,QAAQ,SAAS,EAAE;AACpG,QAAM,EAAE,IAAI,KAAK,IAAI,MAAM,QAAQ,WAAW,gBAAgB,eAAe,QAAQ,CAAC;AACtF,QAAM,WAAW;AAAA,IACf;AAAA,IACA,EAAE,IAAI,MAAM,WAAW,IAAI,KAAI;AAAA,EACjC;AACA,QAAM,MAAM,IAAI,OAAO,wBAAwB,MAAM,IAAI,QAAQ;AACjE,SAAO;AACT;AAQA,eAAsB,sBACpB,OACA,OACA,MACA,gBACA,MAAY,oBAAI,KAAK,GACO;AAC5B,QAAM,MAAM,MAAM,MAAM,KAAK,OAAO,sBAAsB;AAC1D,QAAM,SAA4B,CAAC;AACnC,QAAM,SAAS,IAAI,YAAY;AAC/B,aAAW,MAAM,KAAK;AACpB,UAAM,MAAM,MAAM,MAAM,IAAI,OAAO,wBAAwB,EAAE;AAC7D,QAAI,CAAC,IAAK;AACV,QAAI;AACJ,QAAI;AACF,YAAM,YAAY,MAAM,iBAAiB,EAAE,YAAY,wBAAwB,GAAG,GAAG,KAAK,cAAc;AACxG,cAAQ,KAAK,MAAM,SAAS;AAAA,IAC9B,QAAQ;AACN;AAAA,IACF;AACA,QAAI,MAAM,WAAW,KAAK,OAAQ;AAClC,QAAI,MAAM,SAAS,OAAQ;AAM3B,QAAI,CAAC,KAAK,IAAK;AACf,QAAI;AACJ,QAAI;AACF,YAAM,MAAM,UAAU,MAAM,YAAY,KAAK,GAAG;AAAA,IAClD,QAAQ;AACN;AAAA,IACF;AACA,UAAM,IAAI,MAAM,aACZ,OAAO,MAAM,YAAY,MAAM,IAAI,IACnC,SAAS,MAAM,IAAI;AACvB,SAAK,KAAK,IAAI,GAAG,GAAG;AACpB,WAAO,KAAK,KAAK;AAAA,EACnB;AACA,SAAO;AACT;AAOA,eAAsB,iBACpB,OACA,OACA,IACe;AACf,QAAM,MAAM,OAAO,OAAO,wBAAwB,EAAE;AACtD;","names":[]}
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
DerivationExecutor
|
|
10
10
|
} from "../chunk-YDJXGYYA.js";
|
|
11
11
|
import "../chunk-YH65A6WM.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-X3AXSYBL.js";
|
|
13
|
+
import "../chunk-ZVAFJQZB.js";
|
|
14
14
|
import "../chunk-FSZPQCDR.js";
|
|
15
15
|
import "../chunk-HVR74IBG.js";
|
|
16
16
|
import "../chunk-RBTZLXZJ.js";
|
|
17
17
|
import "../chunk-LP7BEXCT.js";
|
|
18
18
|
import "../chunk-QTDAPDDV.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-3Y4OFWQJ.js";
|
|
20
20
|
import {
|
|
21
21
|
DerivationCapExceededError,
|
|
22
22
|
DerivationCycleError,
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
isZodSchema
|
|
5
5
|
} from "./chunk-HNOBRU24.js";
|
|
6
6
|
import "./chunk-Y2NBBT6K.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-X3AXSYBL.js";
|
|
8
|
+
import "./chunk-ZVAFJQZB.js";
|
|
9
9
|
import "./chunk-FSZPQCDR.js";
|
|
10
10
|
import "./chunk-HVR74IBG.js";
|
|
11
11
|
import "./chunk-RBTZLXZJ.js";
|
|
12
12
|
import "./chunk-LP7BEXCT.js";
|
|
13
13
|
import "./chunk-QTDAPDDV.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
15
15
|
import "./chunk-I64WQSN3.js";
|
|
16
16
|
import "./chunk-PZ5AY32C.js";
|
|
17
17
|
export {
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
isZod4Schema,
|
|
20
20
|
isZodSchema
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=derive-
|
|
22
|
+
//# sourceMappingURL=derive-SVDY36ER.js.map
|
package/dist/directory/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-GJW4HX2O.js";
|
|
2
2
|
import {
|
|
3
3
|
UserApi
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-6D3CN2JR.js";
|
|
5
5
|
import {
|
|
6
6
|
DIRECTORY_RECORD_ID,
|
|
7
7
|
META_COLLECTION,
|
|
@@ -16,15 +16,15 @@ import {
|
|
|
16
16
|
readUserVisibility,
|
|
17
17
|
saveUserEnvelope,
|
|
18
18
|
visibilityRecordId
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-ITXPKEDP.js";
|
|
20
|
+
import "../chunk-X3AXSYBL.js";
|
|
21
|
+
import "../chunk-ZVAFJQZB.js";
|
|
22
22
|
import "../chunk-FSZPQCDR.js";
|
|
23
23
|
import "../chunk-HVR74IBG.js";
|
|
24
24
|
import "../chunk-RBTZLXZJ.js";
|
|
25
25
|
import "../chunk-LP7BEXCT.js";
|
|
26
26
|
import "../chunk-QTDAPDDV.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-3Y4OFWQJ.js";
|
|
28
28
|
import "../chunk-I64WQSN3.js";
|
|
29
29
|
import "../chunk-PZ5AY32C.js";
|
|
30
30
|
export {
|
|
@@ -15,7 +15,7 @@ async function dispatchMaterializedViews(ctx, id, record, wave) {
|
|
|
15
15
|
if (wave?.seen(`mv\0${reg.spec.name}`)) continue;
|
|
16
16
|
if (executor === null) {
|
|
17
17
|
;
|
|
18
|
-
({ MaterializedViewExecutor: executor } = await import("./executor-
|
|
18
|
+
({ MaterializedViewExecutor: executor } = await import("./executor-FRUVM36Q.js"));
|
|
19
19
|
}
|
|
20
20
|
await executor.refresh(reg, {
|
|
21
21
|
getCollection: (name) => source.getCollection(name),
|
|
@@ -24,7 +24,7 @@ async function dispatchMaterializedViews(ctx, id, record, wave) {
|
|
|
24
24
|
dispatchCtx: dispatchCtx({ collection: collectionName, id })
|
|
25
25
|
});
|
|
26
26
|
} else if (mode === "lazy") {
|
|
27
|
-
if (staleHelpers === null) staleHelpers = await import("./stale-
|
|
27
|
+
if (staleHelpers === null) staleHelpers = await import("./stale-ZWTKUVZX.js");
|
|
28
28
|
staleHelpers.markMVStale(registry, reg.spec.name);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -44,7 +44,7 @@ async function dispatchMaterializedViewsOnDelete(ctx, id) {
|
|
|
44
44
|
if (mode === "eager") {
|
|
45
45
|
if (executor === null) {
|
|
46
46
|
;
|
|
47
|
-
({ MaterializedViewExecutor: executor } = await import("./executor-
|
|
47
|
+
({ MaterializedViewExecutor: executor } = await import("./executor-FRUVM36Q.js"));
|
|
48
48
|
}
|
|
49
49
|
const rr = await executor.refresh(reg, {
|
|
50
50
|
getCollection: (name) => source.getCollection(name),
|
|
@@ -57,7 +57,7 @@ async function dispatchMaterializedViewsOnDelete(ctx, id) {
|
|
|
57
57
|
residueDeclined.push(...rr.residueDeclined);
|
|
58
58
|
continue;
|
|
59
59
|
}
|
|
60
|
-
if (staleHelpers === null) staleHelpers = await import("./stale-
|
|
60
|
+
if (staleHelpers === null) staleHelpers = await import("./stale-ZWTKUVZX.js");
|
|
61
61
|
const inv = await staleHelpers.invalidateMVAtRest(source, reg, mode);
|
|
62
62
|
deleted += inv.deleted;
|
|
63
63
|
residueUndecodable.push(...inv.residueUndecodable.map((rid) => `${reg.outputCollection}:${rid}`));
|
|
@@ -69,4 +69,4 @@ export {
|
|
|
69
69
|
dispatchMaterializedViews,
|
|
70
70
|
dispatchMaterializedViewsOnDelete
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=dispatch-
|
|
72
|
+
//# sourceMappingURL=dispatch-MG5KNMWG.js.map
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
putDerivedOutput,
|
|
6
6
|
selfWriteFieldEqual
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NFPSC2HL.js";
|
|
8
8
|
import "./chunk-5D2ALSM5.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-CFTPERGL.js";
|
|
10
|
+
import "./chunk-LPAGIMXJ.js";
|
|
11
|
+
import "./chunk-SQSZRCYT.js";
|
|
12
|
+
import "./chunk-FY33DKPH.js";
|
|
13
|
+
import "./chunk-X3AXSYBL.js";
|
|
14
|
+
import "./chunk-ZVAFJQZB.js";
|
|
15
15
|
import "./chunk-FSZPQCDR.js";
|
|
16
16
|
import "./chunk-HVR74IBG.js";
|
|
17
17
|
import "./chunk-RBTZLXZJ.js";
|
|
18
18
|
import "./chunk-LP7BEXCT.js";
|
|
19
19
|
import "./chunk-QTDAPDDV.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
21
21
|
import {
|
|
22
22
|
DerivationCapExceededError
|
|
23
23
|
} from "./chunk-I64WQSN3.js";
|
|
@@ -28,7 +28,7 @@ async function dispatchArrayDerivationsOnDelete(ctx, id, eraseRecordShapeToo = f
|
|
|
28
28
|
const { derivationSource, collectionName, adapter, vault, getDEK, storeCiphertext } = ctx;
|
|
29
29
|
const strategies = derivationSource.registry().strategiesForSource(collectionName);
|
|
30
30
|
if (strategies.length === 0) return 0;
|
|
31
|
-
const { loadFanoutSidecar, deleteFanoutSidecar } = await import("./fanout-sidecar-
|
|
31
|
+
const { loadFanoutSidecar, deleteFanoutSidecar } = await import("./fanout-sidecar-NZA6J7QB.js");
|
|
32
32
|
const txCtx = derivationSource.getActiveTxContext();
|
|
33
33
|
let erased = 0;
|
|
34
34
|
for (const { spec } of strategies) {
|
|
@@ -134,7 +134,7 @@ async function dispatchDerivations(ctx, id, record, version, wave) {
|
|
|
134
134
|
const outputCollection = derivationSource.getCollection(outSpec.collection);
|
|
135
135
|
const txCtx = derivationSource.getActiveTxContext();
|
|
136
136
|
if (out.kind === "array") {
|
|
137
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
137
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-NZA6J7QB.js");
|
|
138
138
|
const prior = await loadFanoutSidecar(adapter, vault, spec.source, run.runId, key, getDEK, storeCiphertext);
|
|
139
139
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
140
140
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -191,4 +191,4 @@ export {
|
|
|
191
191
|
dispatchArrayDerivationsOnDelete,
|
|
192
192
|
dispatchDerivations
|
|
193
193
|
};
|
|
194
|
-
//# sourceMappingURL=dispatch-
|
|
194
|
+
//# sourceMappingURL=dispatch-RVJQ4BOL.js.map
|
|
@@ -10,11 +10,15 @@ import {
|
|
|
10
10
|
envelopeBodySize,
|
|
11
11
|
findByDet,
|
|
12
12
|
hasPerRecordKey,
|
|
13
|
+
hasSealedBody,
|
|
13
14
|
isRewrappedUnder,
|
|
14
15
|
issueChallenge,
|
|
15
16
|
makeReservedEnvelopes,
|
|
16
17
|
openEnvelopeJson,
|
|
17
18
|
queryByDet,
|
|
19
|
+
recordAadFor,
|
|
20
|
+
rekeyEnvelopeIfNeeded,
|
|
21
|
+
rekeyEnvelopeToDek,
|
|
18
22
|
resolveStableCek,
|
|
19
23
|
revokeSealedRecord,
|
|
20
24
|
rewrapBodyToDek,
|
|
@@ -22,16 +26,18 @@ import {
|
|
|
22
26
|
rotateRecordCek,
|
|
23
27
|
sealRecordToHost,
|
|
24
28
|
verifyBrokerProof,
|
|
29
|
+
verifyRecordIdentity,
|
|
25
30
|
writeEnvelopeBody
|
|
26
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-X3AXSYBL.js";
|
|
27
32
|
import {
|
|
28
33
|
buildDeleteMarker,
|
|
29
34
|
buildRecordEnvelope,
|
|
35
|
+
buildSealedRecordEnvelope,
|
|
30
36
|
buildTombstone,
|
|
31
37
|
isDeleteMarker,
|
|
32
38
|
isTombstone,
|
|
33
39
|
isTombstoneShape
|
|
34
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-ZVAFJQZB.js";
|
|
35
41
|
import {
|
|
36
42
|
ctEqualTags,
|
|
37
43
|
deriveVdigSlotKey,
|
|
@@ -77,7 +83,7 @@ import {
|
|
|
77
83
|
wrapCek,
|
|
78
84
|
wrapKey
|
|
79
85
|
} from "./chunk-QTDAPDDV.js";
|
|
80
|
-
import "./chunk-
|
|
86
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
81
87
|
import "./chunk-I64WQSN3.js";
|
|
82
88
|
import "./chunk-PZ5AY32C.js";
|
|
83
89
|
export {
|
|
@@ -89,6 +95,7 @@ export {
|
|
|
89
95
|
buildDeleteMarker,
|
|
90
96
|
buildRecordAad,
|
|
91
97
|
buildRecordEnvelope,
|
|
98
|
+
buildSealedRecordEnvelope,
|
|
92
99
|
buildTombstone,
|
|
93
100
|
computeBidxTarget,
|
|
94
101
|
computeBrokerProof,
|
|
@@ -122,6 +129,7 @@ export {
|
|
|
122
129
|
generateIV,
|
|
123
130
|
generateSalt,
|
|
124
131
|
hasPerRecordKey,
|
|
132
|
+
hasSealedBody,
|
|
125
133
|
hmacSha256Hex,
|
|
126
134
|
importCek,
|
|
127
135
|
isDeleteMarker,
|
|
@@ -134,6 +142,9 @@ export {
|
|
|
134
142
|
openEnvelopeJson,
|
|
135
143
|
pbkdf2VerifyDigest,
|
|
136
144
|
queryByDet,
|
|
145
|
+
recordAadFor,
|
|
146
|
+
rekeyEnvelopeIfNeeded,
|
|
147
|
+
rekeyEnvelopeToDek,
|
|
137
148
|
resolveStableCek,
|
|
138
149
|
revokeSealedRecord,
|
|
139
150
|
rewrapBodyToDek,
|
|
@@ -144,8 +155,9 @@ export {
|
|
|
144
155
|
unwrapCek,
|
|
145
156
|
unwrapKey,
|
|
146
157
|
verifyBrokerProof,
|
|
158
|
+
verifyRecordIdentity,
|
|
147
159
|
wrapCek,
|
|
148
160
|
wrapKey,
|
|
149
161
|
writeEnvelopeBody
|
|
150
162
|
};
|
|
151
|
-
//# sourceMappingURL=enclave-
|
|
163
|
+
//# sourceMappingURL=enclave-AOZTWFZK.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MaterializedViewExecutor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OCCNYGKG.js";
|
|
4
4
|
import "./chunk-C66T4W5P.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-OPGKH5RD.js";
|
|
5
|
+
import "./chunk-EWAGI3EM.js";
|
|
6
|
+
import "./chunk-NFPSC2HL.js";
|
|
8
7
|
import "./chunk-QI2KXQOM.js";
|
|
8
|
+
import "./chunk-LU6NPJWN.js";
|
|
9
9
|
import "./chunk-XZHEOSQ2.js";
|
|
10
10
|
import "./chunk-CADUYBQD.js";
|
|
11
11
|
import "./chunk-IGJCYUT5.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-CFTPERGL.js";
|
|
13
|
+
import "./chunk-LPAGIMXJ.js";
|
|
14
|
+
import "./chunk-SQSZRCYT.js";
|
|
15
|
+
import "./chunk-FY33DKPH.js";
|
|
16
|
+
import "./chunk-X3AXSYBL.js";
|
|
17
|
+
import "./chunk-ZVAFJQZB.js";
|
|
18
18
|
import "./chunk-FSZPQCDR.js";
|
|
19
19
|
import "./chunk-HVR74IBG.js";
|
|
20
20
|
import "./chunk-RBTZLXZJ.js";
|
|
21
21
|
import "./chunk-LP7BEXCT.js";
|
|
22
22
|
import "./chunk-QTDAPDDV.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
24
24
|
import "./chunk-I64WQSN3.js";
|
|
25
25
|
import "./chunk-PZ5AY32C.js";
|
|
26
26
|
export {
|
|
27
27
|
MaterializedViewExecutor
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=executor-
|
|
29
|
+
//# sourceMappingURL=executor-FRUVM36Q.js.map
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
buildAccessibleBundle,
|
|
3
3
|
exportAccessibleData,
|
|
4
4
|
resolveAccessibleCollections
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BBU3OD3D.js";
|
|
6
|
+
import "./chunk-TNOQNU3R.js";
|
|
7
|
+
import "./chunk-O4QDBAB6.js";
|
|
8
|
+
import "./chunk-X3AXSYBL.js";
|
|
9
|
+
import "./chunk-ZVAFJQZB.js";
|
|
10
10
|
import "./chunk-FSZPQCDR.js";
|
|
11
11
|
import "./chunk-HVR74IBG.js";
|
|
12
12
|
import "./chunk-RBTZLXZJ.js";
|
|
13
13
|
import "./chunk-LP7BEXCT.js";
|
|
14
14
|
import "./chunk-QTDAPDDV.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
16
16
|
import "./chunk-I64WQSN3.js";
|
|
17
17
|
import "./chunk-PZ5AY32C.js";
|
|
18
18
|
export {
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
exportAccessibleData,
|
|
21
21
|
resolveAccessibleCollections
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=export-accessible-
|
|
23
|
+
//# sourceMappingURL=export-accessible-HDDHZYPM.js.map
|
|
@@ -6,24 +6,24 @@ import {
|
|
|
6
6
|
reKeyLedger,
|
|
7
7
|
reKeySchemas,
|
|
8
8
|
sealDeks
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-AMMYIT7F.js";
|
|
10
|
+
import "./chunk-IN5EZWYQ.js";
|
|
11
|
+
import "./chunk-TNOQNU3R.js";
|
|
12
|
+
import "./chunk-O4QDBAB6.js";
|
|
13
|
+
import "./chunk-RAYGDC4A.js";
|
|
14
|
+
import "./chunk-DL4GDOWL.js";
|
|
15
15
|
import "./chunk-4AOERLTV.js";
|
|
16
16
|
import "./chunk-I7FD46FF.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-FY33DKPH.js";
|
|
18
|
+
import "./chunk-7WD2G6K4.js";
|
|
19
|
+
import "./chunk-X3AXSYBL.js";
|
|
20
|
+
import "./chunk-ZVAFJQZB.js";
|
|
21
21
|
import "./chunk-FSZPQCDR.js";
|
|
22
22
|
import "./chunk-HVR74IBG.js";
|
|
23
23
|
import "./chunk-RBTZLXZJ.js";
|
|
24
24
|
import "./chunk-LP7BEXCT.js";
|
|
25
25
|
import "./chunk-QTDAPDDV.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
27
27
|
import "./chunk-I64WQSN3.js";
|
|
28
28
|
import "./chunk-PZ5AY32C.js";
|
|
29
29
|
export {
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
reKeySchemas,
|
|
36
36
|
sealDeks
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=extract-partition-
|
|
38
|
+
//# sourceMappingURL=extract-partition-TRADP234.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
+
buildRecordAad,
|
|
2
3
|
openEnvelopeJson
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import
|
|
4
|
+
} from "./chunk-X3AXSYBL.js";
|
|
5
|
+
import {
|
|
6
|
+
buildRecordEnvelope
|
|
7
|
+
} from "./chunk-ZVAFJQZB.js";
|
|
5
8
|
import "./chunk-FSZPQCDR.js";
|
|
6
9
|
import "./chunk-HVR74IBG.js";
|
|
7
10
|
import "./chunk-RBTZLXZJ.js";
|
|
@@ -9,9 +12,7 @@ import "./chunk-LP7BEXCT.js";
|
|
|
9
12
|
import {
|
|
10
13
|
encrypt
|
|
11
14
|
} from "./chunk-QTDAPDDV.js";
|
|
12
|
-
import
|
|
13
|
-
NOYDB_FORMAT_VERSION
|
|
14
|
-
} from "./chunk-SFY6NT7D.js";
|
|
15
|
+
import "./chunk-3Y4OFWQJ.js";
|
|
15
16
|
import "./chunk-I64WQSN3.js";
|
|
16
17
|
import "./chunk-PZ5AY32C.js";
|
|
17
18
|
|
|
@@ -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-NZA6J7QB.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":[]}
|
package/dist/forget/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NO_FORGET,
|
|
3
3
|
SUBJECT_INDEX_COLLECTION
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-KLVGF2D4.js";
|
|
5
|
+
import "../chunk-X3AXSYBL.js";
|
|
6
|
+
import "../chunk-ZVAFJQZB.js";
|
|
7
7
|
import "../chunk-FSZPQCDR.js";
|
|
8
8
|
import "../chunk-HVR74IBG.js";
|
|
9
9
|
import "../chunk-RBTZLXZJ.js";
|
|
10
10
|
import "../chunk-LP7BEXCT.js";
|
|
11
11
|
import "../chunk-QTDAPDDV.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-3Y4OFWQJ.js";
|
|
13
13
|
import "../chunk-I64WQSN3.js";
|
|
14
14
|
import "../chunk-PZ5AY32C.js";
|
|
15
15
|
|
package/dist/history/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CollectionInstant,
|
|
3
|
-
VaultInstant
|
|
3
|
+
VaultInstant
|
|
4
|
+
} from "../chunk-CGQUSSW7.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-UIYZ5SOU.js";
|
|
19
20
|
import {
|
|
20
21
|
LedgerStore,
|
|
21
22
|
applyPatch,
|
|
22
23
|
computePatch
|
|
23
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-FDIZHZ3C.js";
|
|
24
25
|
import {
|
|
25
26
|
LEDGER_COLLECTION,
|
|
26
27
|
LEDGER_DELTAS_COLLECTION
|
|
27
28
|
} from "../chunk-I7FD46FF.js";
|
|
28
|
-
import "../chunk-AMKCY454.js";
|
|
29
29
|
import {
|
|
30
30
|
canonicalJson,
|
|
31
31
|
envelopePayloadHash,
|
|
@@ -33,15 +33,16 @@ import {
|
|
|
33
33
|
paddedIndex,
|
|
34
34
|
parseIndex,
|
|
35
35
|
sha256Hex
|
|
36
|
-
} from "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
36
|
+
} from "../chunk-FY33DKPH.js";
|
|
37
|
+
import "../chunk-7WD2G6K4.js";
|
|
38
|
+
import "../chunk-X3AXSYBL.js";
|
|
39
|
+
import "../chunk-ZVAFJQZB.js";
|
|
39
40
|
import "../chunk-FSZPQCDR.js";
|
|
40
41
|
import "../chunk-HVR74IBG.js";
|
|
41
42
|
import "../chunk-RBTZLXZJ.js";
|
|
42
43
|
import "../chunk-LP7BEXCT.js";
|
|
43
44
|
import "../chunk-QTDAPDDV.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-3Y4OFWQJ.js";
|
|
45
46
|
import "../chunk-I64WQSN3.js";
|
|
46
47
|
import "../chunk-PZ5AY32C.js";
|
|
47
48
|
|
|
@@ -49,6 +50,7 @@ import "../chunk-PZ5AY32C.js";
|
|
|
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,
|