@noy-db/hub 0.2.0-pre.21 → 0.2.0-pre.24
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/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +3 -3
- package/dist/aggregate/index.d.ts +3 -3
- package/dist/aggregate/index.js +5 -5
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +4 -4
- package/dist/attestation/index.d.ts +4 -4
- package/dist/attestation/index.js +6 -6
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +6 -6
- package/dist/blobs/index.d.ts +6 -6
- package/dist/blobs/index.js +6 -6
- package/dist/bundle/index.cjs +21173 -21341
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +15 -6
- package/dist/bundle/index.d.ts +15 -6
- package/dist/bundle/index.js +58 -193
- package/dist/bundle/index.js.map +1 -1
- package/dist/{chunk-CQYEDODS.js → chunk-35U5YNRR.js} +3 -3
- package/dist/{chunk-NV4IHBZS.js → chunk-3XJU3OHE.js} +5 -5
- package/dist/{chunk-OTWT6BAJ.js → chunk-4BB4T3O7.js} +12 -2
- package/dist/chunk-4BB4T3O7.js.map +1 -0
- package/dist/{chunk-IVZWHIEK.js → chunk-4HEGG5NJ.js} +5 -5
- package/dist/{chunk-WE2BUQD2.js → chunk-4TCMCCC3.js} +5 -3
- package/dist/{chunk-5YTXYPES.js → chunk-5A2FVGHT.js} +5 -5
- package/dist/{chunk-NSXNXLYM.js → chunk-5GZC2ZM3.js} +2 -2
- package/dist/{chunk-JYNH4FIM.js → chunk-77WF53XY.js} +4 -4
- package/dist/{chunk-O5XKZCUD.js → chunk-7X4EF35A.js} +5 -5
- package/dist/{chunk-SQKAECUL.js → chunk-7ZCTUI26.js} +2 -2
- package/dist/{chunk-J6RGRZOY.js → chunk-AO3QSMCU.js} +2 -2
- package/dist/{chunk-JDCPRJVS.js → chunk-AONK5GCC.js} +4 -4
- package/dist/{chunk-FRRJIUSI.js → chunk-B5CSNGSE.js} +17 -9
- package/dist/chunk-B5CSNGSE.js.map +1 -0
- package/dist/{chunk-IY24WS2P.js → chunk-BCMHJYVT.js} +4 -4
- package/dist/{chunk-IY24WS2P.js.map → chunk-BCMHJYVT.js.map} +1 -1
- package/dist/{chunk-TYMDCIQM.js → chunk-C472BRJ4.js} +4 -4
- package/dist/{chunk-MBXKRHSS.js → chunk-CCNRFAL3.js} +2 -2
- package/dist/{chunk-BZW5IL43.js → chunk-DCA2BDHA.js} +4 -4
- package/dist/{chunk-JBBWALNI.js → chunk-DCICHSRS.js} +2 -2
- package/dist/{chunk-2XA2ZML4.js → chunk-FG6IQ3ZL.js} +3 -3
- package/dist/{chunk-C2RJVZZL.js → chunk-G4GW5VOS.js} +2 -2
- package/dist/{chunk-U2XSUCDF.js → chunk-GEWIFM4J.js} +2 -2
- package/dist/{chunk-TNH5SLCD.js → chunk-HD4QCT2O.js} +2 -2
- package/dist/{chunk-I3IYTUUI.js → chunk-HHJ5DZCZ.js} +3 -3
- package/dist/{chunk-6QAZ5O6X.js → chunk-IEIADIPM.js} +2 -2
- package/dist/{chunk-YPIOFSN3.js → chunk-IHAISFXP.js} +2 -2
- package/dist/{chunk-GJTKMME7.js → chunk-JKM2AVVH.js} +2 -2
- package/dist/{chunk-EYK72OTL.js → chunk-JRMOSIH4.js} +5 -5
- package/dist/chunk-JRMOSIH4.js.map +1 -0
- package/dist/{chunk-S45MDEEF.js → chunk-LMWVNF6X.js} +2 -2
- package/dist/{chunk-TA6HPKWQ.js → chunk-LR7CODVN.js} +1 -1
- package/dist/chunk-LR7CODVN.js.map +1 -0
- package/dist/{chunk-TAMRU7A2.js → chunk-OKV7S356.js} +4 -4
- package/dist/{chunk-HYJMAV53.js → chunk-OWAMTSAI.js} +93 -93
- package/dist/chunk-OWAMTSAI.js.map +1 -0
- package/dist/{chunk-IW4L4X65.js → chunk-P5A4E53B.js} +2 -2
- package/dist/{chunk-JOK73NDT.js → chunk-P7OL22JP.js} +3 -3
- package/dist/{chunk-7PH4OPBZ.js → chunk-QOXZM3L2.js} +762 -134
- package/dist/chunk-QOXZM3L2.js.map +1 -0
- package/dist/chunk-R43KS34V.js +399 -0
- package/dist/chunk-R43KS34V.js.map +1 -0
- package/dist/{chunk-TGIJTNM3.js → chunk-R5ZECURV.js} +2 -2
- package/dist/{chunk-KOAJ3TZM.js → chunk-RFEXGW3L.js} +2 -2
- package/dist/{chunk-F5ILTHMU.js → chunk-RNQPDV75.js} +5 -5
- package/dist/{chunk-WWVJXBOT.js → chunk-SGM7CK7R.js} +5 -5
- package/dist/{chunk-7MRT7EPB.js → chunk-SOQE5DUV.js} +3 -3
- package/dist/{chunk-F5GWNSE2.js → chunk-TOMSCJRV.js} +3 -3
- package/dist/{chunk-F5GWNSE2.js.map → chunk-TOMSCJRV.js.map} +1 -1
- package/dist/{chunk-ZONKSLF2.js → chunk-TQMQZOMX.js} +2 -2
- package/dist/{chunk-3HNKR65T.js → chunk-U6LTLN7O.js} +3 -3
- package/dist/{chunk-UU6M64HI.js → chunk-UAK2AMO2.js} +4 -4
- package/dist/{chunk-37VGJM3T.js → chunk-WQ3KAGOV.js} +2 -2
- package/dist/{chunk-C6W5KVDV.js → chunk-XC32SZPW.js} +35 -35
- package/dist/chunk-XC32SZPW.js.map +1 -0
- package/dist/{chunk-AI4USDRI.js → chunk-XQO4TAJS.js} +4 -4
- package/dist/{chunk-SQOK5UM6.js → chunk-ZBENTRFS.js} +2 -2
- package/dist/{chunk-6QE4DUYC.js → chunk-ZDITTESU.js} +2 -2
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-456N7UVX.js → crypto-2LU6XUFF.js} +3 -3
- package/dist/{delegation-DP4COTXB.js → delegation-6ABSJGXV.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +6 -6
- package/dist/derivations/index.d.ts +6 -6
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-CpKSkl2c.d.ts → dev-unlock-BlhRHr6p.d.ts} +1 -1
- package/dist/{dev-unlock-CY0HIZA0.d.cts → dev-unlock-DURe4IvF.d.cts} +1 -1
- package/dist/{errors-Dkc_fi-S.d.cts → errors-B2tUcRPg.d.cts} +19 -5
- package/dist/{errors-Dkc_fi-S.d.ts → errors-B2tUcRPg.d.ts} +19 -5
- package/dist/executor-JKMSEB34.js +8 -0
- package/dist/executor-UYXSQB4D.js +12 -0
- package/dist/executor-VJSCTBWY.js +8 -0
- package/dist/{fanout-sidecar-YXNAEZ33.js → fanout-sidecar-ZQT4Y7PF.js} +2 -2
- package/dist/forget/index.js +4 -4
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +6 -6
- package/dist/guards/index.d.ts +6 -6
- package/dist/guards/index.js +6 -6
- package/dist/{hash-BSd0-_L8.d.cts → hash-CqRZfDZH.d.cts} +1 -1
- package/dist/{hash-BnBQx39y.d.ts → hash-cF4iWaBV.d.ts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +6 -6
- package/dist/history/index.d.ts +6 -6
- package/dist/history/index.js +5 -5
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +5 -5
- package/dist/i18n/index.d.ts +5 -5
- package/dist/i18n/index.js +6 -6
- package/dist/index-B8MoIS7B.d.ts +70 -0
- package/dist/{index-Bm9hIY7t.d.ts → index-BLff_E35.d.ts} +2 -2
- package/dist/{index-tZqVB9g5.d.cts → index-BthnP2MA.d.cts} +2 -2
- package/dist/index-da0M3NnR.d.cts +70 -0
- package/dist/index.cjs +25861 -25119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +135 -80
- package/dist/index.d.ts +135 -80
- package/dist/index.js +93 -52
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.js +4 -4
- package/dist/issue-KLRMW5DH.js +12 -0
- package/dist/kernel/index.cjs +657 -0
- package/dist/kernel/index.cjs.map +1 -0
- package/dist/kernel/index.d.cts +11 -0
- package/dist/kernel/index.d.ts +11 -0
- package/dist/kernel/index.js +40 -0
- package/dist/{ledger-I7JUYP4L.js → ledger-VOS2X3WJ.js} +5 -5
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +6 -6
- package/dist/materialized-views/index.d.ts +6 -6
- package/dist/materialized-views/index.js +8 -8
- package/dist/{mime-magic-CjSyakO4.d.ts → mime-magic-BswIvWkR.d.ts} +1 -1
- package/dist/{mime-magic-BnJCGJzB.d.cts → mime-magic-CCrP-iXJ.d.cts} +1 -1
- package/dist/{ulid-B2L_aqVA.d.ts → multi-bundle-6s5nKAZX.d.ts} +114 -58
- package/dist/{ulid-LaxfH2tK.d.cts → multi-bundle-WhYiJEgV.d.cts} +114 -58
- package/dist/noydb-2PI2ZBX6.js +38 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +6 -6
- package/dist/overlay-views/index.d.ts +6 -6
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +5 -5
- package/dist/periods/index.d.ts +5 -5
- package/dist/periods/index.js +5 -5
- package/dist/{public-envelope-5XRTUNKF.js → public-envelope-IJJMWSTJ.js} +4 -4
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +7 -7
- package/dist/registry-GAIFVWXF.js +8 -0
- package/dist/registry-J77ZUQ7G.js +8 -0
- package/dist/{registry-NWHOLD5M.js → registry-JGEVJ6YC.js} +3 -3
- package/dist/{revoke-5IEK22KT.js → revoke-WUY4AYRJ.js} +6 -6
- package/dist/sealed-record/index.cjs.map +1 -1
- package/dist/sealed-record/index.d.cts +1 -1
- package/dist/sealed-record/index.d.ts +1 -1
- package/dist/sealed-record/index.js +2 -2
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +6 -6
- package/dist/session/index.d.ts +6 -6
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +5 -5
- package/dist/shadow/index.d.ts +5 -5
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-I6YARZQA.js → signer-UJF3CFDC.js} +5 -5
- package/dist/snapshots/index.cjs.map +1 -1
- package/dist/snapshots/index.d.cts +5 -5
- package/dist/snapshots/index.d.ts +5 -5
- package/dist/snapshots/index.js +4 -4
- package/dist/{stale-CPESGAPL.js → stale-PW6VBGSP.js} +2 -2
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +5 -5
- package/dist/store/index.d.ts +5 -5
- package/dist/store/index.js +2 -2
- package/dist/{strategy-WtB-jXYv.d.cts → strategy-BWmgRPA2.d.cts} +1 -1
- package/dist/{strategy-54eIwox5.d.ts → strategy-D47TC5X6.d.ts} +1 -1
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +4 -4
- package/dist/sync/index.d.ts +4 -4
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs +10 -3
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +5 -5
- package/dist/team/index.d.ts +5 -5
- package/dist/team/index.js +8 -8
- package/dist/{transition-guard-Dmpqzg-_.d.cts → transition-guard-C3NxfVKk.d.cts} +1 -1
- package/dist/{transition-guard-D4bfIAiW.d.ts → transition-guard-CQH5263l.d.ts} +1 -1
- package/dist/tx/index.cjs +1 -1
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +5 -5
- package/dist/tx/index.d.ts +5 -5
- package/dist/tx/index.js +3 -3
- package/dist/{types-DLfWFr6U.d.ts → types-BGRX6sPT.d.ts} +546 -580
- package/dist/{types-DyOI6XZ_.d.cts → types-COQ6qJZh.d.cts} +546 -580
- package/dist/ulid-DRH25k3y.d.cts +66 -0
- package/dist/ulid-DRH25k3y.d.ts +66 -0
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{with-materialized-view-DNULSxoP.d.ts → with-materialized-view-Cj-6fuav.d.ts} +1 -1
- package/dist/{with-materialized-view-CeZYGJVf.d.cts → with-materialized-view-D4U-KrBH.d.cts} +1 -1
- package/dist/{with-overlayed-view-kdcPGHih.d.cts → with-overlayed-view-BKjdUPRx.d.cts} +1 -1
- package/dist/{with-overlayed-view-C9joG7UZ.d.ts → with-overlayed-view-COp_7EEy.d.ts} +1 -1
- package/dist/{with-rollup-DJDbrxjf.d.ts → with-rollup-B1_ZjG02.d.ts} +1 -1
- package/dist/{with-rollup-s58XAeWO.d.cts → with-rollup-C-Bok_o2.d.cts} +1 -1
- package/package.json +13 -3
- package/dist/chunk-7PH4OPBZ.js.map +0 -1
- package/dist/chunk-C6W5KVDV.js.map +0 -1
- package/dist/chunk-EYK72OTL.js.map +0 -1
- package/dist/chunk-FRRJIUSI.js.map +0 -1
- package/dist/chunk-HYJMAV53.js.map +0 -1
- package/dist/chunk-JTI57WRT.js +0 -164
- package/dist/chunk-JTI57WRT.js.map +0 -1
- package/dist/chunk-OTWT6BAJ.js.map +0 -1
- package/dist/chunk-TA6HPKWQ.js.map +0 -1
- package/dist/chunk-ZC7J6ZYV.js +0 -7
- package/dist/chunk-ZC7J6ZYV.js.map +0 -1
- package/dist/executor-4IEW4KG5.js +0 -8
- package/dist/executor-KYJCJCIN.js +0 -12
- package/dist/executor-W7VIBOBZ.js +0 -8
- package/dist/issue-JXC6T2QR.js +0 -12
- package/dist/noydb-ZZCRF6TE.js +0 -38
- package/dist/registry-ATRHOG5B.js +0 -8
- package/dist/registry-LEHB26TY.js +0 -8
- package/dist/state-vault-JR3CFGNP.js +0 -14
- package/dist/vault-group-BB246VIM.js +0 -804
- package/dist/vault-group-BB246VIM.js.map +0 -1
- /package/dist/{chunk-CQYEDODS.js.map → chunk-35U5YNRR.js.map} +0 -0
- /package/dist/{chunk-NV4IHBZS.js.map → chunk-3XJU3OHE.js.map} +0 -0
- /package/dist/{chunk-IVZWHIEK.js.map → chunk-4HEGG5NJ.js.map} +0 -0
- /package/dist/{chunk-WE2BUQD2.js.map → chunk-4TCMCCC3.js.map} +0 -0
- /package/dist/{chunk-5YTXYPES.js.map → chunk-5A2FVGHT.js.map} +0 -0
- /package/dist/{chunk-NSXNXLYM.js.map → chunk-5GZC2ZM3.js.map} +0 -0
- /package/dist/{chunk-JYNH4FIM.js.map → chunk-77WF53XY.js.map} +0 -0
- /package/dist/{chunk-O5XKZCUD.js.map → chunk-7X4EF35A.js.map} +0 -0
- /package/dist/{chunk-SQKAECUL.js.map → chunk-7ZCTUI26.js.map} +0 -0
- /package/dist/{chunk-J6RGRZOY.js.map → chunk-AO3QSMCU.js.map} +0 -0
- /package/dist/{chunk-JDCPRJVS.js.map → chunk-AONK5GCC.js.map} +0 -0
- /package/dist/{chunk-TYMDCIQM.js.map → chunk-C472BRJ4.js.map} +0 -0
- /package/dist/{chunk-MBXKRHSS.js.map → chunk-CCNRFAL3.js.map} +0 -0
- /package/dist/{chunk-BZW5IL43.js.map → chunk-DCA2BDHA.js.map} +0 -0
- /package/dist/{chunk-JBBWALNI.js.map → chunk-DCICHSRS.js.map} +0 -0
- /package/dist/{chunk-2XA2ZML4.js.map → chunk-FG6IQ3ZL.js.map} +0 -0
- /package/dist/{chunk-C2RJVZZL.js.map → chunk-G4GW5VOS.js.map} +0 -0
- /package/dist/{chunk-U2XSUCDF.js.map → chunk-GEWIFM4J.js.map} +0 -0
- /package/dist/{chunk-TNH5SLCD.js.map → chunk-HD4QCT2O.js.map} +0 -0
- /package/dist/{chunk-I3IYTUUI.js.map → chunk-HHJ5DZCZ.js.map} +0 -0
- /package/dist/{chunk-6QAZ5O6X.js.map → chunk-IEIADIPM.js.map} +0 -0
- /package/dist/{chunk-YPIOFSN3.js.map → chunk-IHAISFXP.js.map} +0 -0
- /package/dist/{chunk-GJTKMME7.js.map → chunk-JKM2AVVH.js.map} +0 -0
- /package/dist/{chunk-S45MDEEF.js.map → chunk-LMWVNF6X.js.map} +0 -0
- /package/dist/{chunk-TAMRU7A2.js.map → chunk-OKV7S356.js.map} +0 -0
- /package/dist/{chunk-IW4L4X65.js.map → chunk-P5A4E53B.js.map} +0 -0
- /package/dist/{chunk-JOK73NDT.js.map → chunk-P7OL22JP.js.map} +0 -0
- /package/dist/{chunk-TGIJTNM3.js.map → chunk-R5ZECURV.js.map} +0 -0
- /package/dist/{chunk-KOAJ3TZM.js.map → chunk-RFEXGW3L.js.map} +0 -0
- /package/dist/{chunk-F5ILTHMU.js.map → chunk-RNQPDV75.js.map} +0 -0
- /package/dist/{chunk-WWVJXBOT.js.map → chunk-SGM7CK7R.js.map} +0 -0
- /package/dist/{chunk-7MRT7EPB.js.map → chunk-SOQE5DUV.js.map} +0 -0
- /package/dist/{chunk-ZONKSLF2.js.map → chunk-TQMQZOMX.js.map} +0 -0
- /package/dist/{chunk-3HNKR65T.js.map → chunk-U6LTLN7O.js.map} +0 -0
- /package/dist/{chunk-UU6M64HI.js.map → chunk-UAK2AMO2.js.map} +0 -0
- /package/dist/{chunk-37VGJM3T.js.map → chunk-WQ3KAGOV.js.map} +0 -0
- /package/dist/{chunk-AI4USDRI.js.map → chunk-XQO4TAJS.js.map} +0 -0
- /package/dist/{chunk-SQOK5UM6.js.map → chunk-ZBENTRFS.js.map} +0 -0
- /package/dist/{chunk-6QE4DUYC.js.map → chunk-ZDITTESU.js.map} +0 -0
- /package/dist/{crypto-456N7UVX.js.map → crypto-2LU6XUFF.js.map} +0 -0
- /package/dist/{delegation-DP4COTXB.js.map → delegation-6ABSJGXV.js.map} +0 -0
- /package/dist/{executor-4IEW4KG5.js.map → executor-JKMSEB34.js.map} +0 -0
- /package/dist/{executor-KYJCJCIN.js.map → executor-UYXSQB4D.js.map} +0 -0
- /package/dist/{executor-W7VIBOBZ.js.map → executor-VJSCTBWY.js.map} +0 -0
- /package/dist/{fanout-sidecar-YXNAEZ33.js.map → fanout-sidecar-ZQT4Y7PF.js.map} +0 -0
- /package/dist/{issue-JXC6T2QR.js.map → issue-KLRMW5DH.js.map} +0 -0
- /package/dist/{ledger-I7JUYP4L.js.map → kernel/index.js.map} +0 -0
- /package/dist/{noydb-ZZCRF6TE.js.map → ledger-VOS2X3WJ.js.map} +0 -0
- /package/dist/{public-envelope-5XRTUNKF.js.map → noydb-2PI2ZBX6.js.map} +0 -0
- /package/dist/{registry-ATRHOG5B.js.map → public-envelope-IJJMWSTJ.js.map} +0 -0
- /package/dist/{registry-LEHB26TY.js.map → registry-GAIFVWXF.js.map} +0 -0
- /package/dist/{registry-NWHOLD5M.js.map → registry-J77ZUQ7G.js.map} +0 -0
- /package/dist/{revoke-5IEK22KT.js.map → registry-JGEVJ6YC.js.map} +0 -0
- /package/dist/{signer-I6YARZQA.js.map → revoke-WUY4AYRJ.js.map} +0 -0
- /package/dist/{stale-CPESGAPL.js.map → signer-UJF3CFDC.js.map} +0 -0
- /package/dist/{state-vault-JR3CFGNP.js.map → stale-PW6VBGSP.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { I as IndexStrategy, d as LazyQuery } from './lazy-builder-eYZzLEL1.cjs';
|
|
2
|
-
import { c as OnMissingPolicy, a as I18nTextDescriptor, L as Layer,
|
|
2
|
+
import { c as OnMissingPolicy, a as I18nTextDescriptor, L as Layer, j as AggregateSpec, N as MoneyDescriptor, A as AggregateStrategy } from './strategy-BWmgRPA2.cjs';
|
|
3
3
|
import { C as CrdtStrategy, a as CrdtMode, b as CrdtState } from './strategy-BSxFXGzb.cjs';
|
|
4
4
|
import { L as LedgerEntry, F as ForgetStrategy, S as SubjectRef, b as ForgetResult } from './index-BMmajblo.cjs';
|
|
5
|
-
import { N as NoydbError } from './errors-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { N as NoydbError } from './errors-B2tUcRPg.cjs';
|
|
6
|
+
import { Q as Query, c as JoinStrategy, j as RefRegistry, R as RefDescriptor, d as JoinableSource, l as RefViolation, S as ScanBuilder } from './index-BthnP2MA.cjs';
|
|
7
|
+
import { F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-BmhBSPCH.cjs';
|
|
8
8
|
import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -3759,269 +3759,6 @@ declare class SyncEngine {
|
|
|
3759
3759
|
private persistMeta;
|
|
3760
3760
|
}
|
|
3761
3761
|
|
|
3762
|
-
/**
|
|
3763
|
-
* @category capability
|
|
3764
|
-
* Multi-vault partition federation (MVF) — public types for VaultGroup
|
|
3765
|
-
* transparent shard routing. See
|
|
3766
|
-
* docs/superpowers/specs/2026-06-07-mvf-vaultgroup-routing-mvp-design.md.
|
|
3767
|
-
*/
|
|
3768
|
-
|
|
3769
|
-
/**
|
|
3770
|
-
* A schema blueprint for a class of shard vaults. `configure` is
|
|
3771
|
-
* re-applied to every shard handle so all shards are configured
|
|
3772
|
-
* identically (collections, indexes, schemas). `version` is recorded
|
|
3773
|
-
* into each shard's registry row and drives the fan-out
|
|
3774
|
-
* `minVersion` guard.
|
|
3775
|
-
*/
|
|
3776
|
-
interface VaultTemplate {
|
|
3777
|
-
readonly version: number;
|
|
3778
|
-
readonly configure: (vault: Vault) => void;
|
|
3779
|
-
}
|
|
3780
|
-
/** One row in the StateManagement `vault-registry` collection. */
|
|
3781
|
-
interface VaultRegistryRow {
|
|
3782
|
-
readonly vaultId: string;
|
|
3783
|
-
readonly partitionKey: string;
|
|
3784
|
-
readonly templateName: string;
|
|
3785
|
-
readonly schemaVersion: number;
|
|
3786
|
-
readonly createdAt: number;
|
|
3787
|
-
/** Which VaultGroup this shard belongs to (registry is shared across groups). */
|
|
3788
|
-
readonly group: string;
|
|
3789
|
-
}
|
|
3790
|
-
/** How a VaultGroup maps records to shards. */
|
|
3791
|
-
interface ShardingConfig<T> {
|
|
3792
|
-
/** Extract the partition key from a record. */
|
|
3793
|
-
readonly keyOf: (record: T) => string;
|
|
3794
|
-
/** Name of the template (registered via `withVaultTemplate`) shards are stamped from. */
|
|
3795
|
-
readonly vaultTemplate: string;
|
|
3796
|
-
/** When a write targets an unknown partition key, stamp a shard inline. Default `true`. */
|
|
3797
|
-
readonly autoCreate?: boolean;
|
|
3798
|
-
/**
|
|
3799
|
-
* Data-residency guard (#271): the geographic region a record's shard must
|
|
3800
|
-
* live in (e.g. `'eu'`). When set, `createShard` resolves the candidate
|
|
3801
|
-
* backend (via `routeStore`'s vault-prefix routing) and throws
|
|
3802
|
-
* `DataResidencyError` if its `capabilities.region` doesn't match — so a
|
|
3803
|
-
* shard never lands on a non-compliant backend. Advisory until a region is
|
|
3804
|
-
* declared on the backing store; pair with `routeStore({ vaultRoutes })`
|
|
3805
|
-
* and a region-encoded partition key (e.g. `eu-acme` → `firm--eu-`).
|
|
3806
|
-
*/
|
|
3807
|
-
readonly regionOf?: (record: T) => string;
|
|
3808
|
-
}
|
|
3809
|
-
/** Options for `Noydb.openVaultGroup`. */
|
|
3810
|
-
interface VaultGroupOptions<T> {
|
|
3811
|
-
/**
|
|
3812
|
-
* The `vault-registry` collection (source of truth for shard discovery).
|
|
3813
|
-
* Optional: when omitted, the reserved StateManagement vault's registry
|
|
3814
|
-
* is auto-opened and used.
|
|
3815
|
-
*/
|
|
3816
|
-
readonly registry?: Collection<VaultRegistryRow>;
|
|
3817
|
-
readonly sharding: ShardingConfig<T>;
|
|
3818
|
-
/**
|
|
3819
|
-
* Lazy migrate-on-open (#271 fleet migration). When `true`, opening a shard
|
|
3820
|
-
* whose registry `schemaVersion` is behind the template's version runs that
|
|
3821
|
-
* shard's cutover inline (via `migrateShard`) before surfacing the handle.
|
|
3822
|
-
* Zero cost for shards never opened. Default `false` (use `migrateFleet`).
|
|
3823
|
-
*/
|
|
3824
|
-
readonly migrateOnOpen?: boolean;
|
|
3825
|
-
}
|
|
3826
|
-
/** Result of `VaultGroup.migrateFleet` (#271 active batch runner). */
|
|
3827
|
-
interface FleetMigrationResult {
|
|
3828
|
-
/** The version migrated toward (the template's current version). */
|
|
3829
|
-
readonly target: number;
|
|
3830
|
-
/** vaultIds successfully migrated (or already current). */
|
|
3831
|
-
readonly migrated: string[];
|
|
3832
|
-
/** vaultIds whose cutover failed, with the error message. */
|
|
3833
|
-
readonly failed: {
|
|
3834
|
-
readonly vaultId: string;
|
|
3835
|
-
readonly error: string;
|
|
3836
|
-
}[];
|
|
3837
|
-
}
|
|
3838
|
-
/** Options for a cross-shard fan-out read. */
|
|
3839
|
-
interface FanoutQueryOptions {
|
|
3840
|
-
/** Skip shards whose registry `schemaVersion` is below this. */
|
|
3841
|
-
readonly minVersion?: number;
|
|
3842
|
-
/** Max shards queried in parallel (passed to queryAcross). Default 1. */
|
|
3843
|
-
readonly concurrency?: number;
|
|
3844
|
-
}
|
|
3845
|
-
/** A shard excluded from a fan-out result, with the reason. */
|
|
3846
|
-
interface SkippedVault {
|
|
3847
|
-
readonly vaultId: string;
|
|
3848
|
-
readonly reason: 'schema-drift' | 'error' | 'no-grant';
|
|
3849
|
-
readonly error?: Error;
|
|
3850
|
-
}
|
|
3851
|
-
/** The result of a cross-shard fan-out read. */
|
|
3852
|
-
interface FanoutResult<R> {
|
|
3853
|
-
readonly results: R[];
|
|
3854
|
-
readonly skippedVaults: SkippedVault[];
|
|
3855
|
-
}
|
|
3856
|
-
/** A single captured where-clause, replayed inside each shard. */
|
|
3857
|
-
interface WhereClause {
|
|
3858
|
-
readonly field: string;
|
|
3859
|
-
readonly op: Operator;
|
|
3860
|
-
readonly value: unknown;
|
|
3861
|
-
}
|
|
3862
|
-
/** Options for the live/aggregate fan-out (extends the one-shot opts). */
|
|
3863
|
-
interface LiveQueryOptions extends FanoutQueryOptions {
|
|
3864
|
-
/** Coalesce window before recompute. Default 0 (microtask). */
|
|
3865
|
-
readonly debounceMs?: number;
|
|
3866
|
-
}
|
|
3867
|
-
/** A grouped aggregate output row: the grouped field + the reduced spec result. */
|
|
3868
|
-
type GroupedRow<F extends string, Spec extends AggregateSpec> = {
|
|
3869
|
-
readonly [K in F]: unknown;
|
|
3870
|
-
} & AggregateResult<Spec>;
|
|
3871
|
-
/** Reactive cross-shard record (or grouped-row) query — array-shaped, mirrors LiveQuery<T>. */
|
|
3872
|
-
interface CrossVaultLiveQuery<T> extends LiveQuery<T> {
|
|
3873
|
-
readonly skippedVaults: readonly SkippedVault[];
|
|
3874
|
-
readonly ready: Promise<void>;
|
|
3875
|
-
}
|
|
3876
|
-
/** Reactive cross-shard scalar aggregate — mirrors LiveAggregation<R>. */
|
|
3877
|
-
interface CrossVaultLiveAggregation<R> extends LiveAggregation<R> {
|
|
3878
|
-
readonly skippedVaults: readonly SkippedVault[];
|
|
3879
|
-
readonly ready: Promise<void>;
|
|
3880
|
-
}
|
|
3881
|
-
/**
|
|
3882
|
-
* Context passed to a cross-vault `derive` callback (#271 Insight Vault).
|
|
3883
|
-
* One call per shard; identifies which shard the records came from.
|
|
3884
|
-
*/
|
|
3885
|
-
interface CrossVaultDerivationContext {
|
|
3886
|
-
/** The shard's vault id (e.g. `firm-clients--acme`). */
|
|
3887
|
-
readonly vaultId: string;
|
|
3888
|
-
/** The shard's partition key (e.g. `acme`). */
|
|
3889
|
-
readonly partitionKey: string;
|
|
3890
|
-
/** The shard's schema/template version, from its registry row. */
|
|
3891
|
-
readonly schemaVersion: number;
|
|
3892
|
-
}
|
|
3893
|
-
/**
|
|
3894
|
-
* A push-model cross-vault derivation (#271, Insight Vault — Layer 4).
|
|
3895
|
-
*
|
|
3896
|
-
* For each eligible shard, `refreshInsights()` reads the shard's `source`
|
|
3897
|
-
* collection, runs `derive` on that shard's records, and writes the returned
|
|
3898
|
-
* summary row into a separate analytics ("Insight") vault — keyed by partition
|
|
3899
|
-
* key, one row per shard. The summary is re-encrypted under the Insight Vault's
|
|
3900
|
-
* own DEK; the shard's ciphertext never leaves its DEK boundary (the push model
|
|
3901
|
-
* that resolves the cross-vault DEK conflict). See the ZK note in the spec —
|
|
3902
|
-
* the Insight Vault backend sees aggregated structure across shards, a weaker
|
|
3903
|
-
* profile than per-shard vaults; opt-in.
|
|
3904
|
-
*/
|
|
3905
|
-
interface CrossVaultDerivationSpec<R = Record<string, unknown>, S = Record<string, unknown>> {
|
|
3906
|
-
/** Collection read from each shard. */
|
|
3907
|
-
readonly source: string;
|
|
3908
|
-
/** Destination Insight Vault + collection for the per-shard summary rows. */
|
|
3909
|
-
readonly target: {
|
|
3910
|
-
readonly vault: string;
|
|
3911
|
-
readonly collection: string;
|
|
3912
|
-
};
|
|
3913
|
-
/** Per-shard reducer: that shard's source records + context → one summary row. */
|
|
3914
|
-
readonly derive: (records: R[], ctx: CrossVaultDerivationContext) => S;
|
|
3915
|
-
}
|
|
3916
|
-
/** The result of `refreshInsights()`. */
|
|
3917
|
-
interface RefreshInsightsResult {
|
|
3918
|
-
/** Number of summary rows written (one per eligible shard × registered derivation). */
|
|
3919
|
-
readonly written: number;
|
|
3920
|
-
/** Shards excluded (schema-drift, unprovisioned, or read error). */
|
|
3921
|
-
readonly skippedVaults: SkippedVault[];
|
|
3922
|
-
}
|
|
3923
|
-
/** A serializable blueprint captured from a VaultTemplate.configure run. */
|
|
3924
|
-
interface CapturedBlueprint {
|
|
3925
|
-
/** Sorted collection names declared by the template. */
|
|
3926
|
-
readonly collections: string[];
|
|
3927
|
-
/** Per-collection index defs (key order canonicalized). */
|
|
3928
|
-
readonly indexes: Record<string, IndexDef[]>;
|
|
3929
|
-
/** Collections that declared `persistJsonSchema: true`. */
|
|
3930
|
-
readonly persistJsonSchema: string[];
|
|
3931
|
-
}
|
|
3932
|
-
/** One row in the StateManagement `schema-manifest` collection, keyed by `${templateName}:${version}`. */
|
|
3933
|
-
interface SchemaManifestRow {
|
|
3934
|
-
readonly templateName: string;
|
|
3935
|
-
readonly version: number;
|
|
3936
|
-
readonly collections: string[];
|
|
3937
|
-
readonly indexes: Record<string, IndexDef[]>;
|
|
3938
|
-
readonly persistJsonSchema: string[];
|
|
3939
|
-
/** sha256 over the canonicalized serializable blueprint. */
|
|
3940
|
-
readonly fingerprint: string;
|
|
3941
|
-
readonly recordedAt: number;
|
|
3942
|
-
}
|
|
3943
|
-
/** One row in the append-only StateManagement `deployment-events` collection. */
|
|
3944
|
-
interface DeploymentEvent {
|
|
3945
|
-
readonly id: string;
|
|
3946
|
-
readonly ts: number;
|
|
3947
|
-
readonly type: 'shard-created' | 'manifest-recorded' | 'group-opened' | 'migration-started' | 'migration-completed' | 'migration-failed';
|
|
3948
|
-
readonly group: string;
|
|
3949
|
-
readonly vaultId?: string;
|
|
3950
|
-
readonly templateName?: string;
|
|
3951
|
-
readonly version?: number;
|
|
3952
|
-
readonly actor?: string;
|
|
3953
|
-
/** Free-form detail (e.g. migration error message). */
|
|
3954
|
-
readonly detail?: string;
|
|
3955
|
-
}
|
|
3956
|
-
/**
|
|
3957
|
-
* One row in the StateManagement `migration-status` collection (#271 fleet
|
|
3958
|
-
* schema-migration runner), keyed by `vaultId`. Tracks each shard's progress
|
|
3959
|
-
* toward the template's current version so the active batch runner is
|
|
3960
|
-
* resumable and the staged rollout can verify a cohort before proceeding.
|
|
3961
|
-
*/
|
|
3962
|
-
interface MigrationStatusRow {
|
|
3963
|
-
readonly vaultId: string;
|
|
3964
|
-
readonly group: string;
|
|
3965
|
-
/** The shard's registry schemaVersion at the time of this status. */
|
|
3966
|
-
readonly currentVersion: number;
|
|
3967
|
-
/** The version the runner is moving this shard to (the template's version). */
|
|
3968
|
-
readonly targetVersion: number;
|
|
3969
|
-
readonly status: 'pending' | 'running' | 'done' | 'failed';
|
|
3970
|
-
readonly startedAt?: number;
|
|
3971
|
-
readonly finishedAt?: number;
|
|
3972
|
-
/** Records migrated by the per-shard cutover (when status `done`). */
|
|
3973
|
-
readonly migrated?: number;
|
|
3974
|
-
readonly error?: string;
|
|
3975
|
-
}
|
|
3976
|
-
|
|
3977
|
-
/**
|
|
3978
|
-
* @category capability
|
|
3979
|
-
* StateManagement Vault — federation control plane (registry +
|
|
3980
|
-
* schema-manifest + append-only deployment-events). See
|
|
3981
|
-
* docs/superpowers/specs/2026-06-08-statemanagement-vault-design.md.
|
|
3982
|
-
*/
|
|
3983
|
-
|
|
3984
|
-
declare class StateManagementVault {
|
|
3985
|
-
#private;
|
|
3986
|
-
readonly registry: Collection<VaultRegistryRow>;
|
|
3987
|
-
readonly schemaManifest: Collection<SchemaManifestRow>;
|
|
3988
|
-
private constructor();
|
|
3989
|
-
/** Idempotently open the reserved state vault and bind the control-plane collections. */
|
|
3990
|
-
static open(db: Noydb): Promise<StateManagementVault>;
|
|
3991
|
-
/** Read one shard's migration status (or null). */
|
|
3992
|
-
getMigrationStatus(vaultId: string): Promise<MigrationStatusRow | null>;
|
|
3993
|
-
/** All migration-status rows (hydrates first). */
|
|
3994
|
-
listMigrationStatus(): Promise<MigrationStatusRow[]>;
|
|
3995
|
-
/** Upsert one shard's migration status (keyed by vaultId). */
|
|
3996
|
-
upsertMigrationStatus(row: MigrationStatusRow): Promise<void>;
|
|
3997
|
-
/** Read-only query over the append-only deployment-events log. */
|
|
3998
|
-
queryEvents(): Query<DeploymentEvent>;
|
|
3999
|
-
/**
|
|
4000
|
-
* Append a deployment event with a fresh unique (ULID) id. This is the
|
|
4001
|
-
* only write path to the events log; no update/delete is exposed.
|
|
4002
|
-
* Callers should treat failures as non-fatal — this method does not
|
|
4003
|
-
* swallow errors, so wrap the call site in try/catch where appropriate.
|
|
4004
|
-
*/
|
|
4005
|
-
appendEvent(event: Omit<DeploymentEvent, 'id' | 'ts'> & {
|
|
4006
|
-
ts?: number;
|
|
4007
|
-
}): Promise<void>;
|
|
4008
|
-
/**
|
|
4009
|
-
* Ensure a manifest row exists for `(templateName, template.version)`.
|
|
4010
|
-
* Safe to call repeatedly: the `fingerprint` is a deterministic hash of
|
|
4011
|
-
* the template's declared shape (stable across calls), though each call
|
|
4012
|
-
* refreshes `recordedAt`.
|
|
4013
|
-
*/
|
|
4014
|
-
recordManifest(templateName: string, template: VaultTemplate): Promise<string>;
|
|
4015
|
-
/**
|
|
4016
|
-
* True when `template`'s current declared shape does not match the recorded
|
|
4017
|
-
* manifest for `(templateName, template.version)`. Because shards carry no
|
|
4018
|
-
* schema state independent of their template, this catches "a template's
|
|
4019
|
-
* shape changed without bumping `version`" — not independent per-shard drift.
|
|
4020
|
-
* A missing manifest is treated as drift (nothing to verify against).
|
|
4021
|
-
*/
|
|
4022
|
-
detectDrift(templateName: string, template: VaultTemplate): Promise<boolean>;
|
|
4023
|
-
}
|
|
4024
|
-
|
|
4025
3762
|
/**
|
|
4026
3763
|
* **Wrap-DEKs primitive** — a single canonical shape for the
|
|
4027
3764
|
* pattern of "serialize a DEK set, encrypt it under a credential-derived
|
|
@@ -5553,7 +5290,46 @@ type BuiltInGateName = 'rotate-passphrase' | 'recover-passphrase' | 'enroll-auth
|
|
|
5553
5290
|
* mirrors `db.grant`'s hierarchy (admin cannot promote to owner)
|
|
5554
5291
|
* regardless of this gate's settings.
|
|
5555
5292
|
*/
|
|
5556
|
-
| 'update-user'
|
|
5293
|
+
| 'update-user'
|
|
5294
|
+
/**
|
|
5295
|
+
* Authorize a non-owner's self-service **destructive** withdrawal —
|
|
5296
|
+
* `vault.user.unilateralWithdrawal` (#199). The actor exports their
|
|
5297
|
+
* own re-keyed copy and then removes (delete-closure) or freezes the
|
|
5298
|
+
* source records. Because it both egresses data AND destroys the
|
|
5299
|
+
* firm's live copy, it MUST fail closed: undefined in a policy = denied.
|
|
5300
|
+
* Hosts opt in explicitly (and typically pin `minTier`/factor proofs).
|
|
5301
|
+
*/
|
|
5302
|
+
| 'client-unilateral-withdraw'
|
|
5303
|
+
/**
|
|
5304
|
+
* Authorize FILING a two-party withdrawal request —
|
|
5305
|
+
* `vault.user.requestWithdrawal` (#199 P3). Non-destructive (writes a
|
|
5306
|
+
* pending request only); enabled by default so a read-only client can ask.
|
|
5307
|
+
*/
|
|
5308
|
+
| 'user-request-withdrawal'
|
|
5309
|
+
/**
|
|
5310
|
+
* Authorize DECIDING a two-party withdrawal request (approve/reject) —
|
|
5311
|
+
* `vault.user.approveWithdrawal` / `rejectWithdrawal` (#199 P3). The approve
|
|
5312
|
+
* path is destructive (extract-and-dispose under firm authority), so it
|
|
5313
|
+
* defaults to a tier-2 floor; owner/admin role is enforced structurally.
|
|
5314
|
+
*/
|
|
5315
|
+
| 'approve-user-withdrawal'
|
|
5316
|
+
/**
|
|
5317
|
+
* Authorize minting a **custodian** — `db.grantCustodian` (FR-6). The
|
|
5318
|
+
* custodian is the de-facto operational authority on a sealed-owner (Deed)
|
|
5319
|
+
* vault, so granting one is an ownership-level act: this gate MUST fail
|
|
5320
|
+
* closed (undefined in a policy = denied) and owner-only role is enforced
|
|
5321
|
+
* structurally. Hosts opt in explicitly, typically pinning factor proofs.
|
|
5322
|
+
*/
|
|
5323
|
+
| 'grant-custodian'
|
|
5324
|
+
/**
|
|
5325
|
+
* Authorize the audited **Liberate** ceremony — `vault.custody.liberate`
|
|
5326
|
+
* (FR-6). The custodian (holding the live DEKs) claims ownership of a
|
|
5327
|
+
* sealed-owner vault under a recorded legal basis, minting a NEW owner
|
|
5328
|
+
* keyring. Destructive-of-the-old-ownership and irreversible, so it MUST
|
|
5329
|
+
* fail closed (undefined = denied); the caller-is-custodian check is
|
|
5330
|
+
* enforced structurally in the ceremony.
|
|
5331
|
+
*/
|
|
5332
|
+
| 'liberate-vault';
|
|
5557
5333
|
/** Either a built-in gate name or an `app:*` custom gate. */
|
|
5558
5334
|
type GateName = BuiltInGateName | `app:${string}`;
|
|
5559
5335
|
/**
|
|
@@ -5596,290 +5372,6 @@ interface FactorProofBundle {
|
|
|
5596
5372
|
/** Active session tier — what the engine compares against `gate.minTier`. */
|
|
5597
5373
|
type ActiveTier = 1 | 2 | 3;
|
|
5598
5374
|
|
|
5599
|
-
/** Public options for `ShardedQuery.crossShardJoin`. */
|
|
5600
|
-
interface CrossShardJoinOptions {
|
|
5601
|
-
/** Alias key under which the joined same-shard record attaches. */
|
|
5602
|
-
readonly as: string;
|
|
5603
|
-
/** Per-shard row ceiling override (default DEFAULT_JOIN_MAX_ROWS). */
|
|
5604
|
-
readonly maxRows?: number;
|
|
5605
|
-
/** Planner strategy override, passed through to intra-vault `.join()`. */
|
|
5606
|
-
readonly strategy?: JoinStrategy;
|
|
5607
|
-
}
|
|
5608
|
-
/**
|
|
5609
|
-
* Minimal structural shape of a broadcast dimension source. A
|
|
5610
|
-
* `Collection` satisfies this natively: `list()` hydrates and returns
|
|
5611
|
-
* the decoded records. Kept as a one-method interface so plain test
|
|
5612
|
-
* sources are trivial to construct.
|
|
5613
|
-
*/
|
|
5614
|
-
interface BroadcastSource {
|
|
5615
|
-
list(): Promise<readonly unknown[]>;
|
|
5616
|
-
}
|
|
5617
|
-
/** Public options for `ShardedQuery.broadcastJoin`. */
|
|
5618
|
-
interface BroadcastJoinOptions {
|
|
5619
|
-
/** Alias key under which the dimension record attaches. */
|
|
5620
|
-
readonly as: string;
|
|
5621
|
-
/** The shared dimension collection (an opened handle in another vault). */
|
|
5622
|
-
readonly from: BroadcastSource;
|
|
5623
|
-
/** Right-side key to match `field` against. Default 'id'. */
|
|
5624
|
-
readonly on?: string;
|
|
5625
|
-
/** Miss behavior. 'warn' (default) attaches null + one-shot warning; 'cascade' is silent. */
|
|
5626
|
-
readonly mode?: 'warn' | 'cascade';
|
|
5627
|
-
}
|
|
5628
|
-
/** Internal co-partitioned leg carried on ShardedQuery. */
|
|
5629
|
-
interface CoPartitionedLeg {
|
|
5630
|
-
readonly field: string;
|
|
5631
|
-
readonly as: string;
|
|
5632
|
-
readonly maxRows: number | undefined;
|
|
5633
|
-
readonly strategy: JoinStrategy | undefined;
|
|
5634
|
-
}
|
|
5635
|
-
/** Internal broadcast leg carried on ShardedQuery. */
|
|
5636
|
-
interface BroadcastLeg {
|
|
5637
|
-
readonly field: string;
|
|
5638
|
-
readonly as: string;
|
|
5639
|
-
readonly from: BroadcastSource;
|
|
5640
|
-
readonly on: string;
|
|
5641
|
-
readonly mode: 'warn' | 'cascade';
|
|
5642
|
-
}
|
|
5643
|
-
|
|
5644
|
-
/** A source that can fan out records across shards. Satisfied by ShardedQuery. */
|
|
5645
|
-
interface FanoutRecordSource<R> {
|
|
5646
|
-
fanoutRecords(options: FanoutQueryOptions): Promise<{
|
|
5647
|
-
records: R[];
|
|
5648
|
-
skippedVaults: SkippedVault[];
|
|
5649
|
-
}>;
|
|
5650
|
-
}
|
|
5651
|
-
/** Live-binding hooks (change subscription + relevance) threaded from ShardedQuery. */
|
|
5652
|
-
interface LiveBinding {
|
|
5653
|
-
subscribeToChanges: (handler: (e: ChangeEvent) => void) => () => void;
|
|
5654
|
-
isRelevant: (e: ChangeEvent) => boolean;
|
|
5655
|
-
}
|
|
5656
|
-
/**
|
|
5657
|
-
* One-shot cross-vault aggregate. Concatenates all shard records and runs a
|
|
5658
|
-
* single central reduce, ensuring correct avg/mean values.
|
|
5659
|
-
*/
|
|
5660
|
-
declare class CrossVaultAggregation<R, Spec extends AggregateSpec> {
|
|
5661
|
-
private readonly src;
|
|
5662
|
-
private readonly spec;
|
|
5663
|
-
private readonly bind?;
|
|
5664
|
-
constructor(src: FanoutRecordSource<R>, spec: Spec, bind?: LiveBinding | undefined);
|
|
5665
|
-
run(options?: FanoutQueryOptions): Promise<{
|
|
5666
|
-
result: AggregateResult<Spec>;
|
|
5667
|
-
skippedVaults: SkippedVault[];
|
|
5668
|
-
}>;
|
|
5669
|
-
live(options?: LiveQueryOptions): CrossVaultLiveAggregation<AggregateResult<Spec>>;
|
|
5670
|
-
}
|
|
5671
|
-
/**
|
|
5672
|
-
* One-shot cross-vault grouped aggregate. Concatenates all shard records and
|
|
5673
|
-
* runs a single central group-and-reduce, emitting one row per bucket.
|
|
5674
|
-
*/
|
|
5675
|
-
declare class CrossVaultGroupedAggregation<R, F extends string, Spec extends AggregateSpec> {
|
|
5676
|
-
private readonly src;
|
|
5677
|
-
private readonly field;
|
|
5678
|
-
private readonly spec;
|
|
5679
|
-
private readonly bind?;
|
|
5680
|
-
constructor(src: FanoutRecordSource<R>, field: F, spec: Spec, bind?: LiveBinding | undefined);
|
|
5681
|
-
run(options?: FanoutQueryOptions): Promise<{
|
|
5682
|
-
results: GroupedRow<F, Spec>[];
|
|
5683
|
-
skippedVaults: SkippedVault[];
|
|
5684
|
-
}>;
|
|
5685
|
-
live(options?: LiveQueryOptions): CrossVaultLiveQuery<GroupedRow<F, Spec>>;
|
|
5686
|
-
}
|
|
5687
|
-
|
|
5688
|
-
/**
|
|
5689
|
-
* @category capability
|
|
5690
|
-
* Multi-vault partition federation — VaultGroup transparent shard
|
|
5691
|
-
* routing. Spec:
|
|
5692
|
-
* docs/superpowers/specs/2026-06-07-mvf-vaultgroup-routing-mvp-design.md.
|
|
5693
|
-
*/
|
|
5694
|
-
|
|
5695
|
-
declare class VaultGroup<T> {
|
|
5696
|
-
/** @internal */ readonly db: Noydb;
|
|
5697
|
-
/** @internal */ readonly name: string;
|
|
5698
|
-
/** @internal */ readonly registry: Collection<VaultRegistryRow>;
|
|
5699
|
-
/** @internal */ readonly sharding: ShardingConfig<T>;
|
|
5700
|
-
/** @internal */ readonly template: VaultTemplate;
|
|
5701
|
-
/** @internal — lazy migrate-on-open (#271). */ readonly migrateOnOpen: boolean;
|
|
5702
|
-
constructor(
|
|
5703
|
-
/** @internal */ db: Noydb,
|
|
5704
|
-
/** @internal */ name: string,
|
|
5705
|
-
/** @internal */ registry: Collection<VaultRegistryRow>,
|
|
5706
|
-
/** @internal */ sharding: ShardingConfig<T>,
|
|
5707
|
-
/** @internal */ template: VaultTemplate,
|
|
5708
|
-
/** @internal — lazy migrate-on-open (#271). */ migrateOnOpen?: boolean);
|
|
5709
|
-
/** @internal — set when the group is managed (no explicit registry). */
|
|
5710
|
-
private stateVault;
|
|
5711
|
-
/** @internal */
|
|
5712
|
-
_attachStateVault(sv: StateManagementVault): void;
|
|
5713
|
-
/** Deterministic vault name for a partition key, namespaced by the group. */
|
|
5714
|
-
shardVaultId(partitionKey: string): string;
|
|
5715
|
-
/**
|
|
5716
|
-
* @internal — group-qualified registry record key (avoids cross-group key
|
|
5717
|
-
* collisions). Identical to the shard vault id by design — the registry row
|
|
5718
|
-
* for a shard is keyed by that shard's vault id — so it delegates to
|
|
5719
|
-
* `shardVaultId`, reusing its partition-key validation.
|
|
5720
|
-
*/
|
|
5721
|
-
registryId(partitionKey: string): string;
|
|
5722
|
-
/**
|
|
5723
|
-
* Registry rows for THIS group (hydrates the registry collection first).
|
|
5724
|
-
* The registry may be shared across groups (the auto-wired StateManagement
|
|
5725
|
-
* vault holds one `vaultRegistry` for the whole instance), so rows are
|
|
5726
|
-
* filtered by `group` — without this, a group's fan-out reads would leak
|
|
5727
|
-
* across into other groups' shards. Mirrors the `${group}--` scoping that
|
|
5728
|
-
* `liveBinding().isRelevant` already applies to the reactive path.
|
|
5729
|
-
*/
|
|
5730
|
-
allRows(): Promise<VaultRegistryRow[]>;
|
|
5731
|
-
/**
|
|
5732
|
-
* Open an existing shard and apply the template. When `migrateOnOpen` is set
|
|
5733
|
-
* (#271) and the shard's registry version is behind the template, its cutover
|
|
5734
|
-
* runs inline first — so a behind shard never surfaces a stale handle.
|
|
5735
|
-
*/
|
|
5736
|
-
openShard(partitionKey: string): Promise<Vault>;
|
|
5737
|
-
/** @internal — open + configure with no migrate-on-open hook (used by the migration path itself to avoid recursion). */
|
|
5738
|
-
private _openShardRaw;
|
|
5739
|
-
/**
|
|
5740
|
-
* Idempotently provision a shard for `partitionKey`. Returns the
|
|
5741
|
-
* configured vault handle.
|
|
5742
|
-
*
|
|
5743
|
-
* - row + vault present → no-op, return handle
|
|
5744
|
-
* - row present, vault gone → ShardProvisioningError
|
|
5745
|
-
* - row absent (vault present or not) → open-or-create, configure, write row
|
|
5746
|
-
*
|
|
5747
|
-
* When `region` is given (the routing `put` passes `sharding.regionOf(record)`),
|
|
5748
|
-
* the candidate backend's `capabilities.region` must match or this throws
|
|
5749
|
-
* `DataResidencyError` BEFORE provisioning (#271 data-residency guard).
|
|
5750
|
-
*/
|
|
5751
|
-
createShard(partitionKey: string, region?: string): Promise<Vault>;
|
|
5752
|
-
/**
|
|
5753
|
-
* Drill down to a single shard's full Collection API. Throws if the shard is unknown.
|
|
5754
|
-
* Also throws ShardProvisioningError if the registry row exists but the vault has been deleted
|
|
5755
|
-
* (registry/store divergence).
|
|
5756
|
-
*/
|
|
5757
|
-
shard(partitionKey: string): Promise<Vault>;
|
|
5758
|
-
/** A sharded view over one logical collection across all shards. */
|
|
5759
|
-
collection<R = T>(collectionName: string): ShardedCollection<T, R>;
|
|
5760
|
-
/** @internal — eligible (openable-candidate) rows + drift/divergence skips. */
|
|
5761
|
-
resolveEligible(options?: {
|
|
5762
|
-
minVersion?: number;
|
|
5763
|
-
}): Promise<{
|
|
5764
|
-
eligible: VaultRegistryRow[];
|
|
5765
|
-
skipped: SkippedVault[];
|
|
5766
|
-
}>;
|
|
5767
|
-
/** @internal — registered push-model cross-vault derivations (#271 Insight Vault). */
|
|
5768
|
-
private readonly crossVaultDerivations;
|
|
5769
|
-
/**
|
|
5770
|
-
* Register a push-model cross-vault derivation — the Insight Vault pattern
|
|
5771
|
-
* (#271, Layer 4). Drive it with {@link refreshInsights}.
|
|
5772
|
-
*
|
|
5773
|
-
* For each shard, `derive(records, ctx)` runs on that shard's `source`
|
|
5774
|
-
* records and its return value is written into the analytics
|
|
5775
|
-
* (`target.vault` / `target.collection`) vault, keyed by partition key —
|
|
5776
|
-
* one summary row per shard. The derivation runs in-process under THIS
|
|
5777
|
-
* group's `Noydb` (which already holds both the shard and Insight Vault
|
|
5778
|
-
* keyrings); the shard's decrypted records are reduced to a summary that is
|
|
5779
|
-
* re-encrypted under the Insight Vault's own DEK, so no shard ciphertext
|
|
5780
|
-
* crosses a DEK boundary.
|
|
5781
|
-
*
|
|
5782
|
-
* **Zero-knowledge note:** the Insight Vault backend sees aggregated
|
|
5783
|
-
* structure (totals, counts, timestamps) drawn from many shards — a weaker
|
|
5784
|
-
* ZK profile than the per-shard vaults. Opt-in; keep summaries to aggregate
|
|
5785
|
-
* scalars (no embeddings / no raw records).
|
|
5786
|
-
*
|
|
5787
|
-
* v1 is explicit-refresh (no write-path push); call `refreshInsights()`
|
|
5788
|
-
* after a batch of writes, or on a schedule.
|
|
5789
|
-
*
|
|
5790
|
-
* The `target.vault` must NOT be the group itself or one of its shards —
|
|
5791
|
-
* a summary writing back into client-shard data would breach the Insight
|
|
5792
|
-
* Vault's separate-DEK-boundary contract. Such a target throws a
|
|
5793
|
-
* `ValidationError` at registration (#271 Insight-write isolation).
|
|
5794
|
-
*/
|
|
5795
|
-
withCrossVaultDerivation<R = Record<string, unknown>, S = Record<string, unknown>>(spec: CrossVaultDerivationSpec<R, S>): void;
|
|
5796
|
-
/**
|
|
5797
|
-
* Run every registered {@link withCrossVaultDerivation}: read each eligible
|
|
5798
|
-
* shard's source records, derive a per-shard summary, and write it into the
|
|
5799
|
-
* Insight Vault keyed by partition key. Shards behind `minVersion`,
|
|
5800
|
-
* unprovisioned, or whose read errors are reported in `skippedVaults` and
|
|
5801
|
-
* are not written (a stale summary is never left behind for a failed shard).
|
|
5802
|
-
*/
|
|
5803
|
-
refreshInsights(options?: {
|
|
5804
|
-
minVersion?: number;
|
|
5805
|
-
concurrency?: number;
|
|
5806
|
-
}): Promise<RefreshInsightsResult>;
|
|
5807
|
-
/** @internal — the control-plane vault for migration status; lazily opened. */
|
|
5808
|
-
private ensureStateVault;
|
|
5809
|
-
/**
|
|
5810
|
-
* Migrate ONE shard to the template's current version (#271 fleet runner,
|
|
5811
|
-
* per-shard step). Opens the shard (applying the template, which arms the
|
|
5812
|
-
* M12 cutover), drains schema-write detection, runs `vault.runSchemaCutover()`
|
|
5813
|
-
* (the per-vault drain-barrier-transform protocol), then advances the
|
|
5814
|
-
* registry row's `schemaVersion` and records `migration-status`. A shard
|
|
5815
|
-
* already at the template version is a no-op (`status: 'done'`, migrated 0).
|
|
5816
|
-
* Never throws on a cutover failure — it records `status: 'failed'` and
|
|
5817
|
-
* returns the row, so a fleet run continues past a bad shard.
|
|
5818
|
-
*/
|
|
5819
|
-
migrateShard(partitionKey: string): Promise<MigrationStatusRow>;
|
|
5820
|
-
/**
|
|
5821
|
-
* Active batch runner (#271): migrate every shard behind the template version
|
|
5822
|
-
* to it, in controlled batches. **Resumable + crash-safe** — shards already at
|
|
5823
|
-
* the target are skipped (the registry version is the source of truth), so a
|
|
5824
|
-
* re-run after a crash only picks up the unfinished + previously-failed shards.
|
|
5825
|
-
*
|
|
5826
|
-
* - `cohort` — restrict to these partition keys (the staged / canary rollout:
|
|
5827
|
-
* migrate a small cohort, verify the Insight Vault, then run the rest).
|
|
5828
|
-
* - `batchSize` — max shards migrated concurrently per batch (back-pressure).
|
|
5829
|
-
* Default 4. Batches run sequentially; shards within a batch run in parallel.
|
|
5830
|
-
*/
|
|
5831
|
-
migrateFleet(options?: {
|
|
5832
|
-
cohort?: readonly string[];
|
|
5833
|
-
batchSize?: number;
|
|
5834
|
-
}): Promise<FleetMigrationResult>;
|
|
5835
|
-
}
|
|
5836
|
-
declare class ShardedCollection<T, R = T> {
|
|
5837
|
-
private readonly group;
|
|
5838
|
-
private readonly collectionName;
|
|
5839
|
-
constructor(group: VaultGroup<T>, collectionName: string);
|
|
5840
|
-
/** Route a write to the shard owning `keyOf(record)`. */
|
|
5841
|
-
put(id: string, record: T): Promise<void>;
|
|
5842
|
-
/** Begin a cross-shard fan-out query. */
|
|
5843
|
-
query(): ShardedQuery<T, R>;
|
|
5844
|
-
}
|
|
5845
|
-
declare class ShardedQuery<T, R = T> {
|
|
5846
|
-
private readonly group;
|
|
5847
|
-
private readonly collectionName;
|
|
5848
|
-
private readonly clauses;
|
|
5849
|
-
private readonly coPartitionedLegs;
|
|
5850
|
-
private readonly broadcastLegs;
|
|
5851
|
-
constructor(group: VaultGroup<T>, collectionName: string, clauses: readonly WhereClause[], coPartitionedLegs?: readonly CoPartitionedLeg[], broadcastLegs?: readonly BroadcastLeg[]);
|
|
5852
|
-
where(field: string, op: WhereClause['op'], value: unknown): ShardedQuery<T, R>;
|
|
5853
|
-
/** Co-partitioned join: each shard joins its own same-vault right collection (resolved via ref()), then union. */
|
|
5854
|
-
crossShardJoin(field: string, opts: CrossShardJoinOptions): ShardedQuery<T, R>;
|
|
5855
|
-
/** Broadcast dimension join: enrich every merged row from a single shared collection. */
|
|
5856
|
-
broadcastJoin(field: string, opts: BroadcastJoinOptions): ShardedQuery<T, R>;
|
|
5857
|
-
/** @internal — fan out the where-filtered records across eligible shards. */
|
|
5858
|
-
fanoutRecords(options?: FanoutQueryOptions): Promise<{
|
|
5859
|
-
records: R[];
|
|
5860
|
-
skippedVaults: SkippedVault[];
|
|
5861
|
-
}>;
|
|
5862
|
-
/** Fan out across eligible shards, merge, then apply any broadcast dimension legs. */
|
|
5863
|
-
toArray(options?: FanoutQueryOptions): Promise<FanoutResult<R>>;
|
|
5864
|
-
/** @internal — build the change-subscription + relevance binding for this query's group+collection. */
|
|
5865
|
-
liveBinding(): LiveBinding;
|
|
5866
|
-
/** @internal — joined queries don't support reactive/aggregate surfaces in v1. */
|
|
5867
|
-
private assertNoJoinLegs;
|
|
5868
|
-
/** Returns a reactive cross-shard live query — a facade over CrossVaultLive. */
|
|
5869
|
-
live(options?: LiveQueryOptions): CrossVaultLiveQuery<R>;
|
|
5870
|
-
/** One-shot distributed aggregate — central reduce over all shard records. */
|
|
5871
|
-
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultAggregation<R, Spec>;
|
|
5872
|
-
/** Begin a grouped cross-shard aggregate. */
|
|
5873
|
-
groupBy<F extends string>(field: F): ShardedGroupedQuery<T, R, F>;
|
|
5874
|
-
}
|
|
5875
|
-
/** Grouped cross-shard query — intermediate after `.groupBy(field)`, terminates with `.aggregate(spec)`. */
|
|
5876
|
-
declare class ShardedGroupedQuery<T, R, F extends string> {
|
|
5877
|
-
private readonly query;
|
|
5878
|
-
private readonly field;
|
|
5879
|
-
constructor(query: ShardedQuery<T, R>, field: F);
|
|
5880
|
-
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultGroupedAggregation<R, F, Spec>;
|
|
5881
|
-
}
|
|
5882
|
-
|
|
5883
5375
|
/** The top-level NOYDB instance. */
|
|
5884
5376
|
declare class Noydb {
|
|
5885
5377
|
#private;
|
|
@@ -5927,7 +5419,6 @@ declare class Noydb {
|
|
|
5927
5419
|
private writeRelay;
|
|
5928
5420
|
/** Per-vault policy enforcers. */
|
|
5929
5421
|
private readonly policyEnforcers;
|
|
5930
|
-
private readonly vaultTemplates;
|
|
5931
5422
|
private readonly txStrategy;
|
|
5932
5423
|
private readonly forgetStrategy;
|
|
5933
5424
|
private readonly sessionStrategy;
|
|
@@ -6009,6 +5500,25 @@ declare class Noydb {
|
|
|
6009
5500
|
* fires on top — both are independent opt-ins.
|
|
6010
5501
|
*/
|
|
6011
5502
|
revoke(vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
|
|
5503
|
+
/**
|
|
5504
|
+
* Grant the FR-6 `custodian` role to a user (owner-only custody API).
|
|
5505
|
+
*
|
|
5506
|
+
* A custodian operates every collection (rw + access) but is provably
|
|
5507
|
+
* unable to grant / revoke / rotate / extract-and-sever. Only the Deed
|
|
5508
|
+
* owner may mint one. Defended in depth: the `grant-custodian` gate
|
|
5509
|
+
* (fail-closed) AND an explicit `keyring.role !== 'owner'` check — the
|
|
5510
|
+
* gate enforces host policy, the role check enforces the cryptographic
|
|
5511
|
+
* owner-only invariant even if a host mis-configures the gate.
|
|
5512
|
+
*/
|
|
5513
|
+
grantCustodian(vault: string, options: Omit<GrantOptions, 'role'>, factors?: FactorProofBundle): Promise<void>;
|
|
5514
|
+
/**
|
|
5515
|
+
* Revoke a custodian (owner-only custody API).
|
|
5516
|
+
*
|
|
5517
|
+
* Mirrors {@link revoke} but pins the caller to the Deed owner: defended
|
|
5518
|
+
* in depth by the `revoke-user` gate AND an explicit `keyring.role !==
|
|
5519
|
+
* 'owner'` check, so an admin cannot unwind a custodianship.
|
|
5520
|
+
*/
|
|
5521
|
+
revokeCustodian(vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
|
|
6012
5522
|
/**
|
|
6013
5523
|
* Mutate post-grant identity fields on an existing keyring — `role`,
|
|
6014
5524
|
* `displayName`, and/or `permissions`. Pure plaintext-header rewrite:
|
|
@@ -6183,22 +5693,17 @@ declare class Noydb {
|
|
|
6183
5693
|
*/
|
|
6184
5694
|
queryAcross<T>(vaultIds: string[], fn: (vault: Vault) => Promise<T>, options?: QueryAcrossOptions): Promise<QueryAcrossResult<T>[]>;
|
|
6185
5695
|
/**
|
|
6186
|
-
*
|
|
6187
|
-
*
|
|
6188
|
-
|
|
6189
|
-
withVaultTemplate(name: string, template: VaultTemplate): void;
|
|
6190
|
-
/**
|
|
6191
|
-
* Open a VaultGroup — transparent routing over per-partition shard
|
|
6192
|
-
* vaults, with shard discovery backed by the supplied `vault-registry`
|
|
6193
|
-
* collection.
|
|
5696
|
+
* @internal True once `close()` has been called. Read by
|
|
5697
|
+
* `@klum-db/lobby`'s Lobby entry points (which can't see the private
|
|
5698
|
+
* `closed` field).
|
|
6194
5699
|
*/
|
|
6195
|
-
|
|
6196
|
-
/**
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
openStateManagementVault(): Promise<
|
|
5700
|
+
get isClosed(): boolean;
|
|
5701
|
+
/** @deprecated Federation moved to @klum-db/lobby. Use `createLobby(db).withVaultTemplate(...)`. */
|
|
5702
|
+
withVaultTemplate(): never;
|
|
5703
|
+
/** @deprecated Federation moved to @klum-db/lobby. Use `createLobby(db).openVaultGroup(...)`. */
|
|
5704
|
+
openVaultGroup(): Promise<never>;
|
|
5705
|
+
/** @deprecated Federation moved to @klum-db/lobby. Use `createLobby(db).openStateManagementVault()`. */
|
|
5706
|
+
openStateManagementVault(): Promise<never>;
|
|
6202
5707
|
/**
|
|
6203
5708
|
* @internal — true when an encrypted shard vault is provisioned
|
|
6204
5709
|
* (its keyring exists in the store).
|
|
@@ -8766,6 +8271,168 @@ interface UserVisibility {
|
|
|
8766
8271
|
readonly hidden: boolean;
|
|
8767
8272
|
}
|
|
8768
8273
|
|
|
8274
|
+
/**
|
|
8275
|
+
* #199 P1 — `exportMyAccessibleData`: a non-owner user exports the scope they
|
|
8276
|
+
* can decrypt as a portable, re-keyed `.noydb` bundle. Non-destructive and
|
|
8277
|
+
* **always allowed** (the "data sovereignty by construction" property of
|
|
8278
|
+
* sealing-at-dimension §11.11 — the firm cannot deny it) but **audited**.
|
|
8279
|
+
*
|
|
8280
|
+
* Reuses the existing bundle machinery: the access boundary is the caller's DEK
|
|
8281
|
+
* set (operator/client → `keyring.permissions`; owner/admin/viewer → all), so a
|
|
8282
|
+
* record outside the caller's keys can never enter the bundle. Re-keying to a
|
|
8283
|
+
* new owner reuses `writeNoydbBundle`'s `exportPassphrase` shorthand.
|
|
8284
|
+
*/
|
|
8285
|
+
|
|
8286
|
+
interface ExportAccessibleOptions {
|
|
8287
|
+
/**
|
|
8288
|
+
* Re-key the bundle so it is independently openable by a new owner with this
|
|
8289
|
+
* passphrase (the receiving firm / the client themselves). Omit to inherit
|
|
8290
|
+
* the source keyring (personal backup).
|
|
8291
|
+
*/
|
|
8292
|
+
readonly reKey?: {
|
|
8293
|
+
readonly passphrase: string;
|
|
8294
|
+
};
|
|
8295
|
+
/** Narrow the export to a subset of the caller's accessible collections. */
|
|
8296
|
+
readonly scope?: {
|
|
8297
|
+
readonly collections?: readonly string[];
|
|
8298
|
+
};
|
|
8299
|
+
readonly compression?: 'auto' | 'brotli' | 'gzip' | 'none';
|
|
8300
|
+
}
|
|
8301
|
+
/**
|
|
8302
|
+
* Produce a re-keyed, access-scoped `.noydb` bundle of the caller's accessible
|
|
8303
|
+
* data. Appends a tamper-evident audit entry (`reason: 'user-export:<userId>'`).
|
|
8304
|
+
*/
|
|
8305
|
+
declare function exportAccessibleData(vault: Vault, opts?: ExportAccessibleOptions): Promise<Uint8Array>;
|
|
8306
|
+
|
|
8307
|
+
/**
|
|
8308
|
+
* #199 P2 — `unilateralWithdrawal`: a non-owner extracts their accessible scope
|
|
8309
|
+
* AND disposes of the source copy. Destructive; gated by the default-off
|
|
8310
|
+
* fail-closed built-in `client-unilateral-withdraw` policy (checked in the
|
|
8311
|
+
* UserApi wrapper).
|
|
8312
|
+
*
|
|
8313
|
+
* Two source dispositions (see the #199 design spec §9/§9b):
|
|
8314
|
+
* - 'delete' — delete-closure: the records leave the source vault entirely.
|
|
8315
|
+
* - 'freeze' — the firm retains a cryptographically-frozen, read-only, write-once
|
|
8316
|
+
* snapshot (hash-pinned in the tamper-evident ledger) while the live
|
|
8317
|
+
* records are removed.
|
|
8318
|
+
*
|
|
8319
|
+
* Ordering guarantees no data loss: the client's re-keyed export bundle (and the
|
|
8320
|
+
* freeze snapshot) are produced BEFORE anything is deleted.
|
|
8321
|
+
*
|
|
8322
|
+
* The `freezeAndDeleteClosure` core is shared with the two-party approval path
|
|
8323
|
+
* (#199 P3, `bundle/request-withdrawal.ts`).
|
|
8324
|
+
*/
|
|
8325
|
+
|
|
8326
|
+
interface FrozenSnapshotRef {
|
|
8327
|
+
readonly withdrawalId: string;
|
|
8328
|
+
readonly sha256: string;
|
|
8329
|
+
readonly recordCount: number;
|
|
8330
|
+
readonly frozenAt: string;
|
|
8331
|
+
}
|
|
8332
|
+
interface WithdrawAccessibleOptions {
|
|
8333
|
+
/** Legal/contractual basis recorded in the audit (e.g. 'gdpr-art-17'). */
|
|
8334
|
+
readonly legalBasis: string;
|
|
8335
|
+
/** Re-key the exported bundle to a new owner passphrase. */
|
|
8336
|
+
readonly reKey?: {
|
|
8337
|
+
readonly passphrase: string;
|
|
8338
|
+
};
|
|
8339
|
+
/** Source disposition. Default 'delete'. */
|
|
8340
|
+
readonly disposition?: 'delete' | 'freeze';
|
|
8341
|
+
readonly scope?: {
|
|
8342
|
+
readonly collections?: readonly string[];
|
|
8343
|
+
};
|
|
8344
|
+
/** Stable id for idempotent resume (default random). */
|
|
8345
|
+
readonly withdrawalId?: string;
|
|
8346
|
+
}
|
|
8347
|
+
interface WithdrawResult {
|
|
8348
|
+
readonly bundle: Uint8Array;
|
|
8349
|
+
readonly snapshot?: FrozenSnapshotRef;
|
|
8350
|
+
}
|
|
8351
|
+
declare function withdrawAccessibleData(vault: Vault, opts: WithdrawAccessibleOptions): Promise<WithdrawResult>;
|
|
8352
|
+
|
|
8353
|
+
/**
|
|
8354
|
+
* #199 P3 — two-party withdrawal ceremony.
|
|
8355
|
+
*
|
|
8356
|
+
* The conservative counterpart to `unilateralWithdrawal` (P2): a non-owner —
|
|
8357
|
+
* including a read-only `client`/`viewer` who cannot self-serve a deletion —
|
|
8358
|
+
* files a durable REQUEST; an owner/admin reviews it and either APPROVES
|
|
8359
|
+
* (extract-and-dispose under firm authority) or REJECTS it. Every step is
|
|
8360
|
+
* audited in the tamper-evident ledger.
|
|
8361
|
+
*
|
|
8362
|
+
* requester: vault.user.requestWithdrawal({ scope, disposition?, legalBasis? })
|
|
8363
|
+
* owner: vault.user.listWithdrawalRequests()
|
|
8364
|
+
* vault.user.approveWithdrawal(requestId, { reKey }) → { bundle, snapshot? }
|
|
8365
|
+
* vault.user.rejectWithdrawal(requestId, { reason })
|
|
8366
|
+
*
|
|
8367
|
+
* Requests live in the reserved `_user_withdrawal_requests` namespace. The
|
|
8368
|
+
* record body is plaintext metadata (collection names + disposition + legal
|
|
8369
|
+
* basis — none secret in this trust model; the owner sees the data anyway) and
|
|
8370
|
+
* carries NO passphrase: the re-key passphrase is supplied by the approver at
|
|
8371
|
+
* approval time and conveyed to the requester out-of-band, so no secret is
|
|
8372
|
+
* stored at rest.
|
|
8373
|
+
*/
|
|
8374
|
+
|
|
8375
|
+
/** Raised when a request is missing, already decided, or expired. */
|
|
8376
|
+
declare class WithdrawalRequestError extends NoydbError {
|
|
8377
|
+
constructor(message: string);
|
|
8378
|
+
}
|
|
8379
|
+
type WithdrawalRequestStatus = 'pending' | 'approved' | 'rejected';
|
|
8380
|
+
interface WithdrawalRequest {
|
|
8381
|
+
readonly requestId: string;
|
|
8382
|
+
readonly requester: string;
|
|
8383
|
+
readonly collections: readonly string[];
|
|
8384
|
+
readonly disposition: 'delete' | 'freeze';
|
|
8385
|
+
readonly legalBasis?: string;
|
|
8386
|
+
readonly status: WithdrawalRequestStatus;
|
|
8387
|
+
readonly requestedAt: string;
|
|
8388
|
+
readonly expiresAt?: string;
|
|
8389
|
+
readonly decidedAt?: string;
|
|
8390
|
+
readonly decidedBy?: string;
|
|
8391
|
+
readonly rejectReason?: string;
|
|
8392
|
+
readonly snapshotSha256?: string;
|
|
8393
|
+
}
|
|
8394
|
+
interface RequestWithdrawalOptions {
|
|
8395
|
+
readonly scope?: {
|
|
8396
|
+
readonly collections?: readonly string[];
|
|
8397
|
+
};
|
|
8398
|
+
readonly disposition?: 'delete' | 'freeze';
|
|
8399
|
+
readonly legalBasis?: string;
|
|
8400
|
+
/** Time-to-live in ms; after this the request can no longer be approved. */
|
|
8401
|
+
readonly expiresInMs?: number;
|
|
8402
|
+
}
|
|
8403
|
+
interface RequestWithdrawalResult {
|
|
8404
|
+
readonly requestId: string;
|
|
8405
|
+
readonly status: WithdrawalRequestStatus;
|
|
8406
|
+
readonly expiresAt?: string;
|
|
8407
|
+
}
|
|
8408
|
+
/**
|
|
8409
|
+
* Requester side. Files a durable request for the caller's accessible scope.
|
|
8410
|
+
* Gated by `user-request-withdrawal` (checked in the UserApi wrapper).
|
|
8411
|
+
*/
|
|
8412
|
+
declare function requestWithdrawal(vault: Vault, opts?: RequestWithdrawalOptions): Promise<RequestWithdrawalResult>;
|
|
8413
|
+
/** Owner side. List filed requests (optionally by status). */
|
|
8414
|
+
declare function listWithdrawalRequests(vault: Vault, opts?: {
|
|
8415
|
+
status?: WithdrawalRequestStatus;
|
|
8416
|
+
}): Promise<WithdrawalRequest[]>;
|
|
8417
|
+
interface ApproveWithdrawalOptions {
|
|
8418
|
+
/** Re-key the handed-back bundle to a passphrase the requester will use. */
|
|
8419
|
+
readonly reKey?: {
|
|
8420
|
+
readonly passphrase: string;
|
|
8421
|
+
};
|
|
8422
|
+
}
|
|
8423
|
+
/**
|
|
8424
|
+
* Owner side. Extract the requester's recorded scope under firm authority,
|
|
8425
|
+
* dispose of the source per the request's disposition, mark the request
|
|
8426
|
+
* approved, and return the re-keyed bundle to hand back. Gated by
|
|
8427
|
+
* `approve-user-withdrawal` (checked in the UserApi wrapper) + owner/admin role.
|
|
8428
|
+
*/
|
|
8429
|
+
declare function approveWithdrawal(vault: Vault, requestId: string, opts?: ApproveWithdrawalOptions): Promise<WithdrawResult>;
|
|
8430
|
+
interface RejectWithdrawalOptions {
|
|
8431
|
+
readonly reason?: string;
|
|
8432
|
+
}
|
|
8433
|
+
/** Owner side. Decline a pending request (no data is touched). */
|
|
8434
|
+
declare function rejectWithdrawal(vault: Vault, requestId: string, opts?: RejectWithdrawalOptions): Promise<WithdrawalRequest>;
|
|
8435
|
+
|
|
8769
8436
|
/**
|
|
8770
8437
|
* Public `vault.user.*` API surface.
|
|
8771
8438
|
*
|
|
@@ -8828,7 +8495,7 @@ interface UserEnvelopePresented {
|
|
|
8828
8495
|
* delegates to `Noydb.checkGate(vault, gate, presented)`. In tests, a
|
|
8829
8496
|
* no-op stub is fine.
|
|
8830
8497
|
*/
|
|
8831
|
-
type UserEnvelopeCheckGate = (gate: 'edit-own-profile' | 'view-team-profiles', presented?: UserEnvelopePresented) => Promise<void>;
|
|
8498
|
+
type UserEnvelopeCheckGate = (gate: 'edit-own-profile' | 'view-team-profiles' | 'client-unilateral-withdraw' | 'user-request-withdrawal' | 'approve-user-withdrawal', presented?: UserEnvelopePresented) => Promise<void>;
|
|
8832
8499
|
/**
|
|
8833
8500
|
* Reactive handle returned by `live()`. `current` is the most recently
|
|
8834
8501
|
* observed value; `subscribe(cb)` fires on subsequent local writes.
|
|
@@ -8858,6 +8525,24 @@ declare class UserApi {
|
|
|
8858
8525
|
* Production paths always wire the Noydb-backed implementation.
|
|
8859
8526
|
*/
|
|
8860
8527
|
private readonly checkGate?;
|
|
8528
|
+
/**
|
|
8529
|
+
* Noydb-backed `exportMyAccessibleData` (#199), injected by the Vault
|
|
8530
|
+
* (which holds the keyring + bundle machinery). Omitted in low-level tests.
|
|
8531
|
+
*/
|
|
8532
|
+
private readonly exportAccessible?;
|
|
8533
|
+
/**
|
|
8534
|
+
* Noydb-backed `unilateralWithdrawal` (#199 P2), injected by the Vault.
|
|
8535
|
+
* Destructive — extract + dispose (delete | freeze). Omitted in low-level tests.
|
|
8536
|
+
*/
|
|
8537
|
+
private readonly unilateralWithdraw?;
|
|
8538
|
+
/**
|
|
8539
|
+
* Noydb-backed two-party withdrawal ceremony (#199 P3), injected by the
|
|
8540
|
+
* Vault. requestWithdraw = requester side; the rest = owner side.
|
|
8541
|
+
*/
|
|
8542
|
+
private readonly requestWithdraw?;
|
|
8543
|
+
private readonly listWithdrawals?;
|
|
8544
|
+
private readonly approveWithdraw?;
|
|
8545
|
+
private readonly rejectWithdraw?;
|
|
8861
8546
|
/** keyringId → set of listeners. Wildcard '*' fires on every change. */
|
|
8862
8547
|
private readonly listeners;
|
|
8863
8548
|
constructor(adapter: NoydbStore, vaultName: string,
|
|
@@ -8868,7 +8553,59 @@ declare class UserApi {
|
|
|
8868
8553
|
* for low-level tests that exercise the storage layer directly.
|
|
8869
8554
|
* Production paths always wire the Noydb-backed implementation.
|
|
8870
8555
|
*/
|
|
8871
|
-
checkGate?: UserEnvelopeCheckGate | undefined
|
|
8556
|
+
checkGate?: UserEnvelopeCheckGate | undefined,
|
|
8557
|
+
/**
|
|
8558
|
+
* Noydb-backed `exportMyAccessibleData` (#199), injected by the Vault
|
|
8559
|
+
* (which holds the keyring + bundle machinery). Omitted in low-level tests.
|
|
8560
|
+
*/
|
|
8561
|
+
exportAccessible?: ((opts: ExportAccessibleOptions) => Promise<Uint8Array>) | undefined,
|
|
8562
|
+
/**
|
|
8563
|
+
* Noydb-backed `unilateralWithdrawal` (#199 P2), injected by the Vault.
|
|
8564
|
+
* Destructive — extract + dispose (delete | freeze). Omitted in low-level tests.
|
|
8565
|
+
*/
|
|
8566
|
+
unilateralWithdraw?: ((opts: WithdrawAccessibleOptions) => Promise<WithdrawResult>) | undefined,
|
|
8567
|
+
/**
|
|
8568
|
+
* Noydb-backed two-party withdrawal ceremony (#199 P3), injected by the
|
|
8569
|
+
* Vault. requestWithdraw = requester side; the rest = owner side.
|
|
8570
|
+
*/
|
|
8571
|
+
requestWithdraw?: ((opts: RequestWithdrawalOptions) => Promise<RequestWithdrawalResult>) | undefined, listWithdrawals?: ((opts: {
|
|
8572
|
+
status?: WithdrawalRequestStatus;
|
|
8573
|
+
}) => Promise<WithdrawalRequest[]>) | undefined, approveWithdraw?: ((requestId: string, opts: ApproveWithdrawalOptions) => Promise<WithdrawResult>) | undefined, rejectWithdraw?: ((requestId: string, opts: RejectWithdrawalOptions) => Promise<WithdrawalRequest>) | undefined);
|
|
8574
|
+
/**
|
|
8575
|
+
* #199 P3 — file a two-party withdrawal request for the caller's accessible
|
|
8576
|
+
* scope. Non-destructive (writes a pending request); an owner later approves
|
|
8577
|
+
* or rejects. This is the path for read-only roles (`client`/`viewer`) that
|
|
8578
|
+
* cannot self-serve a destructive `unilateralWithdrawal`. Gated by
|
|
8579
|
+
* `user-request-withdrawal` (enabled by default).
|
|
8580
|
+
*/
|
|
8581
|
+
requestWithdrawal(opts?: RequestWithdrawalOptions): Promise<RequestWithdrawalResult>;
|
|
8582
|
+
/** #199 P3 — owner side: list filed withdrawal requests (optionally by status). */
|
|
8583
|
+
listWithdrawalRequests(opts?: {
|
|
8584
|
+
status?: WithdrawalRequestStatus;
|
|
8585
|
+
}): Promise<WithdrawalRequest[]>;
|
|
8586
|
+
/**
|
|
8587
|
+
* #199 P3 — owner side: approve a pending request. Extracts the requester's
|
|
8588
|
+
* recorded scope under firm authority, disposes of the source per the
|
|
8589
|
+
* request's disposition, and returns the re-keyed bundle to hand back. Gated
|
|
8590
|
+
* by `approve-user-withdrawal` (tier-2 default) + owner/admin role.
|
|
8591
|
+
*/
|
|
8592
|
+
approveWithdrawal(requestId: string, opts?: ApproveWithdrawalOptions): Promise<WithdrawResult>;
|
|
8593
|
+
/** #199 P3 — owner side: reject a pending request (no data is touched). */
|
|
8594
|
+
rejectWithdrawal(requestId: string, opts?: RejectWithdrawalOptions): Promise<WithdrawalRequest>;
|
|
8595
|
+
/**
|
|
8596
|
+
* #199 P2 — single-party withdrawal: export the caller's accessible scope
|
|
8597
|
+
* (re-keyed) and dispose of the source (`delete` or `freeze`). Gated by the
|
|
8598
|
+
* fail-closed built-in `client-unilateral-withdraw` policy — undefined or
|
|
8599
|
+
* disabled → throws (use `requestWithdrawal`). The firm enables it at vault
|
|
8600
|
+
* creation.
|
|
8601
|
+
*/
|
|
8602
|
+
unilateralWithdrawal(opts: WithdrawAccessibleOptions): Promise<WithdrawResult>;
|
|
8603
|
+
/**
|
|
8604
|
+
* #199 — export the calling user's accessible scope as a portable, re-keyed
|
|
8605
|
+
* `.noydb` bundle. Non-destructive and **always allowed** (data sovereignty
|
|
8606
|
+
* by construction, §11.11) but audited. Scope = the caller's DEK access set.
|
|
8607
|
+
*/
|
|
8608
|
+
exportMyAccessibleData(opts?: ExportAccessibleOptions): Promise<Uint8Array>;
|
|
8872
8609
|
/** Read the writer's own envelope. Returns null if never written. */
|
|
8873
8610
|
me<T = unknown>(): Promise<UserEnvelope<T> | null>;
|
|
8874
8611
|
/**
|
|
@@ -8983,6 +8720,135 @@ declare class UserApi {
|
|
|
8983
8720
|
private fireChange;
|
|
8984
8721
|
}
|
|
8985
8722
|
|
|
8723
|
+
/**
|
|
8724
|
+
* FR-6 Task 5 — `liberateVault`: the audited claim of ownership over a
|
|
8725
|
+
* sealed-owner (Deed) vault. The inverse of #199 withdrawal.
|
|
8726
|
+
*
|
|
8727
|
+
* A **Deed** vault's owner credential is sealed under a non-firm provider, so
|
|
8728
|
+
* the firm-side **custodian** (which holds every collection DEK and operates
|
|
8729
|
+
* the vault fully) can never reach `KEK_owner`. Liberation is the ONLY route
|
|
8730
|
+
* by which a custodian assumes ownership, and it is deliberately a manual,
|
|
8731
|
+
* audited ceremony:
|
|
8732
|
+
*
|
|
8733
|
+
* 1. gate `'liberate-vault'` (fail-closed)
|
|
8734
|
+
* 2. caller MUST be the `custodian` (the de-facto authority holding the DEKs)
|
|
8735
|
+
* 3. freeze a PRE-liberation EVIDENCE snapshot (hash-pinned in the ledger) —
|
|
8736
|
+
* but PRESERVE the live data for the new owner (see the freeze decision
|
|
8737
|
+
* below)
|
|
8738
|
+
* 4. mint a NEW owner keyring re-wrapping the incumbent DEKs under the new
|
|
8739
|
+
* owner's KEK
|
|
8740
|
+
* 5. lifecycle ledger `liberation-claimed:<newOwnerId>:<legalBasis>`
|
|
8741
|
+
* 6. stamp the `_meta/deed` marker with `liberatedAt`
|
|
8742
|
+
*
|
|
8743
|
+
* ## Security: the inalienability floor
|
|
8744
|
+
*
|
|
8745
|
+
* Liberation **mints a new owner from the custodian's DEKs** — it does NOT
|
|
8746
|
+
* unseal the original sealed owner. The old sealed-owner credential is left
|
|
8747
|
+
* untouched and ORPHANED (its `_keyring/<id>` file remains, its KEK is still
|
|
8748
|
+
* sealed under the non-firm provider), never impersonated. The new owner is a
|
|
8749
|
+
* DISTINCT principal under a fresh KEK derived from `newOwnerPassphrase`. This
|
|
8750
|
+
* preserves the inalienability floor: the act of claiming ownership is itself
|
|
8751
|
+
* auditable and produces a different principal, rather than silently assuming
|
|
8752
|
+
* the latent owner's identity.
|
|
8753
|
+
*
|
|
8754
|
+
* ## Freeze decision: snapshot-only, not freeze-and-delete
|
|
8755
|
+
*
|
|
8756
|
+
* `freezeAndDeleteClosure` (withdraw-accessible.ts) writes a hash-pinned
|
|
8757
|
+
* snapshot and THEN delete-closures the live records — correct for a
|
|
8758
|
+
* destructive #199 withdrawal, WRONG for liberation. Liberation transfers
|
|
8759
|
+
* operational continuity; it must leave the live data intact for the new
|
|
8760
|
+
* owner. We therefore call the snapshot-only core `freezeSnapshotOnly`
|
|
8761
|
+
* (factored out of that module; the freeze-AND-delete withdrawal path is
|
|
8762
|
+
* unchanged) to pin the evidence snapshot while preserving the records.
|
|
8763
|
+
*
|
|
8764
|
+
* @module
|
|
8765
|
+
*/
|
|
8766
|
+
|
|
8767
|
+
interface LiberateOptions {
|
|
8768
|
+
/** The id of the new owner principal the custodian mints by claiming ownership. */
|
|
8769
|
+
readonly newOwnerId: string;
|
|
8770
|
+
/** The passphrase that derives the new owner's KEK (the DEKs are re-wrapped under it). */
|
|
8771
|
+
readonly newOwnerPassphrase: string;
|
|
8772
|
+
/** Legal/contractual basis recorded in the audit (e.g. 'contractual-handover'). */
|
|
8773
|
+
readonly legalBasis: string;
|
|
8774
|
+
readonly factors?: FactorProofBundle;
|
|
8775
|
+
}
|
|
8776
|
+
interface LiberateResult {
|
|
8777
|
+
/** The hash-pinned pre-liberation evidence snapshot. */
|
|
8778
|
+
readonly snapshot: FrozenSnapshotRef;
|
|
8779
|
+
}
|
|
8780
|
+
/**
|
|
8781
|
+
* Audited claim of ownership over a sealed-owner vault by its custodian. See
|
|
8782
|
+
* the module doc for the full ceremony + security rationale.
|
|
8783
|
+
*/
|
|
8784
|
+
declare function liberateVault(vault: Vault, opts: LiberateOptions): Promise<LiberateResult>;
|
|
8785
|
+
|
|
8786
|
+
/**
|
|
8787
|
+
* Public `vault.custody.*` API surface (FR-6).
|
|
8788
|
+
*
|
|
8789
|
+
* The custody namespace is the vault-instance face of the FR-6 sovereign-custody
|
|
8790
|
+
* model — it mirrors `vault.user.*` exactly: a thin delegation shell with NO
|
|
8791
|
+
* business logic. The Vault constructs one `CustodyApi` per session, injecting
|
|
8792
|
+
* closures that bind the vault name / keyring into the genuinely-core
|
|
8793
|
+
* implementations (`Noydb.grantCustodian` / `Noydb.revokeCustodian` and the
|
|
8794
|
+
* `liberateVault` ceremony). Each method just forwards to its injected callback.
|
|
8795
|
+
*
|
|
8796
|
+
* Three operations:
|
|
8797
|
+
* - `grantCustodian(opts)` — owner-only: mint a `custodian` who operates the
|
|
8798
|
+
* vault fully but can never grant / rotate / sever / extract.
|
|
8799
|
+
* - `revokeCustodian(opts)` — owner-only: remove a custodian.
|
|
8800
|
+
* - `liberate(opts)` — custodian-only: audited claim of ownership over a
|
|
8801
|
+
* sealed-owner (Deed) vault (mints a DISTINCT new owner; ledger-audited).
|
|
8802
|
+
*
|
|
8803
|
+
* Provisioning a Deed (`createDeedOwner`) is deliberately NOT on this class: it
|
|
8804
|
+
* is a store-level operation that mints the vault's first owner, so there is no
|
|
8805
|
+
* vault instance (and thus no custody namespace) yet — it stays the exported
|
|
8806
|
+
* `team/deed.ts` function.
|
|
8807
|
+
*
|
|
8808
|
+
* @see docs/superpowers/specs/2026-06-17-fr6-deed-custodian-liberate-design.md
|
|
8809
|
+
* @module
|
|
8810
|
+
*/
|
|
8811
|
+
|
|
8812
|
+
/** Options for `vault.custody.grantCustodian` — a grant with the role fixed to `custodian`. */
|
|
8813
|
+
type GrantCustodianOptions = Omit<GrantOptions, 'role'>;
|
|
8814
|
+
/**
|
|
8815
|
+
* Implementation behind `vault.custody`. Constructed once per Vault. Holds the
|
|
8816
|
+
* injected, vault-bound implementations in closure; every method delegates with
|
|
8817
|
+
* no added logic (the owner-only / custodian-only / gate checks all live in the
|
|
8818
|
+
* injected implementations — `Noydb.grantCustodian` etc. and `liberateVault`).
|
|
8819
|
+
*/
|
|
8820
|
+
declare class CustodyApi {
|
|
8821
|
+
/** Bound `Noydb.grantCustodian(this.name, ...)` — owner-only, gated. */
|
|
8822
|
+
private readonly _grantCustodian;
|
|
8823
|
+
/** Bound `Noydb.revokeCustodian(this.name, ...)` — owner-only, gated. */
|
|
8824
|
+
private readonly _revokeCustodian;
|
|
8825
|
+
/** Bound `liberateVault(this, ...)` — custodian-only audited ownership claim. */
|
|
8826
|
+
private readonly _liberate;
|
|
8827
|
+
constructor(
|
|
8828
|
+
/** Bound `Noydb.grantCustodian(this.name, ...)` — owner-only, gated. */
|
|
8829
|
+
_grantCustodian: (options: GrantCustodianOptions, factors?: FactorProofBundle) => Promise<void>,
|
|
8830
|
+
/** Bound `Noydb.revokeCustodian(this.name, ...)` — owner-only, gated. */
|
|
8831
|
+
_revokeCustodian: (options: RevokeOptions, factors?: FactorProofBundle) => Promise<void>,
|
|
8832
|
+
/** Bound `liberateVault(this, ...)` — custodian-only audited ownership claim. */
|
|
8833
|
+
_liberate: (opts: LiberateOptions) => Promise<LiberateResult>);
|
|
8834
|
+
/**
|
|
8835
|
+
* Owner-only: grant the FR-6 `custodian` role. The custodian operates every
|
|
8836
|
+
* collection (rw + access) but is provably unable to grant / revoke / rotate /
|
|
8837
|
+
* extract-and-sever. Defended in depth (gate + owner-only role check) inside
|
|
8838
|
+
* the injected `Noydb.grantCustodian`.
|
|
8839
|
+
*/
|
|
8840
|
+
grantCustodian(options: GrantCustodianOptions, factors?: FactorProofBundle): Promise<void>;
|
|
8841
|
+
/** Owner-only: revoke a custodian. */
|
|
8842
|
+
revokeCustodian(options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
|
|
8843
|
+
/**
|
|
8844
|
+
* Custodian-only: the audited claim of ownership over a sealed-owner (Deed)
|
|
8845
|
+
* vault. Mints a DISTINCT new owner re-wrapping the incumbent DEKs under a
|
|
8846
|
+
* fresh KEK (the latent owner is never impersonated), ledger-audited. See
|
|
8847
|
+
* {@link liberateVault}.
|
|
8848
|
+
*/
|
|
8849
|
+
liberate(opts: LiberateOptions): Promise<LiberateResult>;
|
|
8850
|
+
}
|
|
8851
|
+
|
|
8986
8852
|
/**
|
|
8987
8853
|
* Persisted-schema envelope shape.
|
|
8988
8854
|
*
|
|
@@ -9153,6 +9019,8 @@ interface VaultIntrospectState {
|
|
|
9153
9019
|
readonly collectionCache: Map<string, Collection<unknown>>;
|
|
9154
9020
|
readonly refRegistry: RefRegistry;
|
|
9155
9021
|
readonly getDEK: (collectionName: string) => Promise<CryptoKey>;
|
|
9022
|
+
/** The active unlocked keyring — role/permissions/userId for access-scoped ops. */
|
|
9023
|
+
readonly keyring: UnlockedKeyring;
|
|
9156
9024
|
readonly subsystems: Record<string, boolean>;
|
|
9157
9025
|
readonly mvRegistry: unknown;
|
|
9158
9026
|
readonly overlayRegistry: unknown;
|
|
@@ -9260,6 +9128,18 @@ declare class Vault {
|
|
|
9260
9128
|
* @see docs/superpowers/specs/2026-05-05-user-envelope-design.md
|
|
9261
9129
|
*/
|
|
9262
9130
|
readonly user: UserApi;
|
|
9131
|
+
/**
|
|
9132
|
+
* FR-6 custody API — the sovereign-custody surface, mirroring `vault.user.*`.
|
|
9133
|
+
*
|
|
9134
|
+
* - `grantCustodian(opts)` / `revokeCustodian(opts)` — owner-only: mint /
|
|
9135
|
+
* remove a `custodian` who operates the vault fully but can never grant /
|
|
9136
|
+
* rotate / sever / extract.
|
|
9137
|
+
* - `liberate(opts)` — custodian-only: the audited claim of ownership over a
|
|
9138
|
+
* sealed-owner (Deed) vault (mints a DISTINCT new owner; ledger-audited).
|
|
9139
|
+
*
|
|
9140
|
+
* @see docs/superpowers/specs/2026-06-17-fr6-deed-custodian-liberate-design.md
|
|
9141
|
+
*/
|
|
9142
|
+
readonly custody: CustodyApi;
|
|
9263
9143
|
/**
|
|
9264
9144
|
* Optional callback that re-derives an UnlockedKeyring from the
|
|
9265
9145
|
* adapter using the active user's passphrase. Called by `load()`
|
|
@@ -9532,6 +9412,12 @@ declare class Vault {
|
|
|
9532
9412
|
* default; non-adopting collections take the legacy path unchanged.
|
|
9533
9413
|
*/
|
|
9534
9414
|
perRecordKeys?: boolean;
|
|
9415
|
+
/**
|
|
9416
|
+
* Per-record provenance tracking. When `true`, `put()` calls that
|
|
9417
|
+
* supply a `source` option stamp `_source` / `_sourceTs` onto the
|
|
9418
|
+
* unencrypted envelope metadata. Off by default. (FR-5, #445)
|
|
9419
|
+
*/
|
|
9420
|
+
provenance?: boolean;
|
|
9535
9421
|
/**
|
|
9536
9422
|
* declarative blob retention / TTL policy per slot
|
|
9537
9423
|
* name. Values are `{ retainDays?, evictWhen? }`. Evaluated only
|
|
@@ -11123,6 +11009,13 @@ declare class Collection<T> {
|
|
|
11123
11009
|
* flag) still decrypts CEK records.
|
|
11124
11010
|
*/
|
|
11125
11011
|
private readonly perRecordCek;
|
|
11012
|
+
/**
|
|
11013
|
+
* Per-record provenance opt-in (`provenance: true`). When set, `put()` calls
|
|
11014
|
+
* that supply a `source` option stamp `_source`/`_sourceTs` onto the
|
|
11015
|
+
* unencrypted envelope metadata. Off by default — zero cost for collections
|
|
11016
|
+
* that don't need lineage tracking (FR-5, #445).
|
|
11017
|
+
*/
|
|
11018
|
+
private readonly provenance;
|
|
11126
11019
|
/**
|
|
11127
11020
|
* Session-scoped `(id) → CEK` cache for this collection. Lets updates
|
|
11128
11021
|
* reuse a record's stable CEK and lets repeated reads skip the AES-KW
|
|
@@ -11446,6 +11339,14 @@ declare class Collection<T> {
|
|
|
11446
11339
|
* keyed to the collection DEK regardless.
|
|
11447
11340
|
*/
|
|
11448
11341
|
perRecordKeys?: boolean | undefined;
|
|
11342
|
+
/**
|
|
11343
|
+
* Per-record provenance tracking. When `true`, `put()` calls that
|
|
11344
|
+
* supply a `source` option stamp `_source` (opaque source id) and
|
|
11345
|
+
* `_sourceTs` (ISO-8601 timestamp) onto the unencrypted envelope
|
|
11346
|
+
* metadata. Off by default — zero cost for collections that don't
|
|
11347
|
+
* need lineage tracking. (FR-5, #445)
|
|
11348
|
+
*/
|
|
11349
|
+
provenance?: boolean | undefined;
|
|
11449
11350
|
/**
|
|
11450
11351
|
* declared tiers this collection supports. An
|
|
11451
11352
|
* undefined or empty list disables the hierarchical-tier surface
|
|
@@ -11554,6 +11455,29 @@ declare class Collection<T> {
|
|
|
11554
11455
|
* Throws if the collection is not in CRDT mode.
|
|
11555
11456
|
*/
|
|
11556
11457
|
getRaw(id: string): Promise<CrdtState | null>;
|
|
11458
|
+
/**
|
|
11459
|
+
* Read a record's unencrypted envelope metadata (version, timestamps,
|
|
11460
|
+
* provenance) without decrypting the body.
|
|
11461
|
+
*
|
|
11462
|
+
* Returns `null` when no envelope exists for `id` (record absent or never
|
|
11463
|
+
* written). Only `_source`/`_sourceTs` fields are populated when the
|
|
11464
|
+
* collection was opened with `provenance: true` AND the record was written
|
|
11465
|
+
* with a `source` option — but this method works on any collection because
|
|
11466
|
+
* it reads the raw envelope directly.
|
|
11467
|
+
*
|
|
11468
|
+
* @returns `{ version, timestamp, by?, source?, sourceTs? }` or `null`.
|
|
11469
|
+
*
|
|
11470
|
+
* @example
|
|
11471
|
+
* const meta = await clients.getMetadata('c1')
|
|
11472
|
+
* if (meta) console.log(meta.source, meta.timestamp)
|
|
11473
|
+
*/
|
|
11474
|
+
getMetadata(id: string): Promise<{
|
|
11475
|
+
readonly version: number;
|
|
11476
|
+
readonly timestamp: string;
|
|
11477
|
+
readonly by?: string;
|
|
11478
|
+
readonly source?: string;
|
|
11479
|
+
readonly sourceTs?: string;
|
|
11480
|
+
} | null>;
|
|
11557
11481
|
/**
|
|
11558
11482
|
* Return a presence handle for this collection.
|
|
11559
11483
|
*
|
|
@@ -11581,10 +11505,31 @@ declare class Collection<T> {
|
|
|
11581
11505
|
* `reason` is stamped onto the resulting ledger entry
|
|
11582
11506
|
* so audit consumers can filter via
|
|
11583
11507
|
* `entries.filter(e => e.reason?.startsWith('import:'))`.
|
|
11508
|
+
* `source` is an opaque source id (e.g. `'crm-sync'`, `'firm-A'`)
|
|
11509
|
+
* stamped onto the envelope as `_source`/`_sourceTs` when
|
|
11510
|
+
* the collection has `provenance: true`. Ignored otherwise
|
|
11511
|
+
* (zero cost). (FR-5, #445)
|
|
11512
|
+
* `sourceTs` is an optional ISO-8601 origin timestamp override;
|
|
11513
|
+
* when supplied together with `source` on a provenance collection,
|
|
11514
|
+
* replaces the machine-stamped `now()` so re-merges preserve the
|
|
11515
|
+
* ORIGIN refresh time across vaults. (FR-4)
|
|
11584
11516
|
*/
|
|
11585
11517
|
put(id: string, record: T, options?: {
|
|
11586
11518
|
readonly reason?: string;
|
|
11519
|
+
readonly source?: string;
|
|
11520
|
+
readonly sourceTs?: string;
|
|
11587
11521
|
}): Promise<void>;
|
|
11522
|
+
/**
|
|
11523
|
+
* Validate a record against this collection's schema WITHOUT writing it.
|
|
11524
|
+
* Returns the (possibly coerced) record on success; throws
|
|
11525
|
+
* {@link SchemaValidationError} (direction: `'input'`) on violation.
|
|
11526
|
+
* A no-op pass-through when no schema is declared.
|
|
11527
|
+
*
|
|
11528
|
+
* Used by FR-8 migrate-then-merge to pre-validate all staged records
|
|
11529
|
+
* before `mergeDecryptedRecords` writes anything — so a failed upgrade
|
|
11530
|
+
* never half-writes the receiver.
|
|
11531
|
+
*/
|
|
11532
|
+
validateInput(record: T): Promise<T>;
|
|
11588
11533
|
/** @internal Untracked put body — call {@link put}, not this. */
|
|
11589
11534
|
private putInternal;
|
|
11590
11535
|
/**
|
|
@@ -12343,6 +12288,8 @@ declare class Collection<T> {
|
|
|
12343
12288
|
reason: string;
|
|
12344
12289
|
fromTier: number;
|
|
12345
12290
|
};
|
|
12291
|
+
source?: string;
|
|
12292
|
+
sourceTs?: string;
|
|
12346
12293
|
}): Promise<void>;
|
|
12347
12294
|
/**
|
|
12348
12295
|
* tier-aware get. When the stored record is at a
|
|
@@ -12711,15 +12658,26 @@ declare const NOYDB_SYNC_VERSION: 1;
|
|
|
12711
12658
|
* Roles control both the operations a user can perform and which DEKs
|
|
12712
12659
|
* they receive in their keyring:
|
|
12713
12660
|
*
|
|
12714
|
-
* | Role
|
|
12715
|
-
*
|
|
12716
|
-
* | `owner`
|
|
12717
|
-
* | `admin`
|
|
12718
|
-
* | `
|
|
12719
|
-
* | `
|
|
12720
|
-
* | `
|
|
12721
|
-
|
|
12722
|
-
|
|
12661
|
+
* | Role | Collections | Can grant/revoke | Can export |
|
|
12662
|
+
* |-------------|-----------------|:----------------:|:----------:|
|
|
12663
|
+
* | `owner` | all (rw) | Yes (all roles) | Yes |
|
|
12664
|
+
* | `admin` | all (rw) | Yes (≤ admin) | Yes |
|
|
12665
|
+
* | `custodian` | all (rw) | No (see below) | Yes |
|
|
12666
|
+
* | `operator` | explicit (rw) | No | ACL-scoped |
|
|
12667
|
+
* | `viewer` | all (ro) | No | Yes |
|
|
12668
|
+
* | `client` | explicit (ro) | No | ACL-scoped |
|
|
12669
|
+
*
|
|
12670
|
+
* **`custodian` (FR-6 sovereign custody).** Operationally admin-rank —
|
|
12671
|
+
* rw + access on every collection, receives all collection DEKs on grant
|
|
12672
|
+
* — but is *provably non-owning*: it CANNOT grant, revoke, rotate keys,
|
|
12673
|
+
* destructively withdraw/sever, or extract-and-sever a partition (rotate is
|
|
12674
|
+
* blocked in `rotateKeys`, sever in `withdrawAccessibleData`, and extract in
|
|
12675
|
+
* `extractPartition`). Only the (sealed Deed) **owner** may
|
|
12676
|
+
* mint or remove a custodian; an admin cannot. This is the inalienability
|
|
12677
|
+
* floor — a custodian can run the vault day-to-day yet never escalate to
|
|
12678
|
+
* the owner credential.
|
|
12679
|
+
*/
|
|
12680
|
+
type Role = 'owner' | 'admin' | 'custodian' | 'operator' | 'viewer' | 'client';
|
|
12723
12681
|
/**
|
|
12724
12682
|
* Read-write or read-only access on a collection.
|
|
12725
12683
|
* Stored per-collection in the user's keyring.
|
|
@@ -12739,6 +12697,14 @@ interface EncryptedEnvelope {
|
|
|
12739
12697
|
readonly _data: string;
|
|
12740
12698
|
/** User who created this version (unencrypted metadata). */
|
|
12741
12699
|
readonly _by?: string;
|
|
12700
|
+
/**
|
|
12701
|
+
* Opaque provenance source id — which party/registry wrote this version.
|
|
12702
|
+
* Unencrypted; present only when the collection opts into `provenance: true`
|
|
12703
|
+
* and a `source` is supplied to `put()`. Off by default (zero cost).
|
|
12704
|
+
*/
|
|
12705
|
+
readonly _source?: string;
|
|
12706
|
+
/** ISO-8601 timestamp the provenance source was recorded. Present alongside `_source`. */
|
|
12707
|
+
readonly _sourceTs?: string;
|
|
12742
12708
|
/**
|
|
12743
12709
|
* Hierarchical access tier. Omitted → tier 0.
|
|
12744
12710
|
*
|
|
@@ -14702,4 +14668,4 @@ interface DeleteManyResult {
|
|
|
14702
14668
|
}>;
|
|
14703
14669
|
}
|
|
14704
14670
|
|
|
14705
|
-
export { type VersionRecord as $, type BlobPutOptions as A, type BlobStrategy as B, type BlobResponseOptions as C, DICT_COLLECTION_PREFIX as D, BlobSet as E, type BlobStrategyOpenArgs as F, type CompactRunOptions as G, type CompactionContext as H, type I18nStrategy as I, type CompactionResult as J, DEFAULT_CHUNK_SIZE as K, EXPORT_AUDIT_COLLECTION as L, ExportBlobsAbortedError as M, type ExportBlobsAuditEntry as N, type ExportBlobsHandle as O, PolicyEnforcer as P, type ExportBlobsOptions as Q, type ExportedBlob as R, type ScriptWarning as S, type ObjectListEntry as T, type ObjectMeta as U, type ObjectProjection as V, type ObjectUrlOptions as W, type PutObjectOptions as X, type PutUrlOptions as Y, type SlotInfo as Z, type SlotRecord as _, type DictEntry as a, type ChangeType as a$, createExportBlobsHandle as a0, memoryObjectProjection as a1, runCompaction as a2, type ConsentStrategy as a3, CONSENT_AUDIT_COLLECTION as a4, type ConsentAuditEntry as a5, type ConsentAuditFilter as a6, type ConsentContext as a7, type ConsentOp as a8, loadConsentEntries as a9, type SnapshotMeta as aA, type SnapshotMode as aB, type DerivationStrategy as aC, type DerivationContext as aD, type ArrayOutputSpec as aE, DerivationRegistry as aF, type DerivationStrategyHandle as aG, type DerivedFromMeta as aH, type OutputSpec as aI, type RecordOutputSpec as aJ, type MaterializedViewStrategy as aK, type MaterializedViewStrategyHandle as aL, type OverlayedViewStrategy as aM, Collection as aN, type OverlayFieldMergeMode as aO, type OverlayFieldMergeRule as aP, OverlayedViewRegistry as aQ, type OverlayedViewStrategyHandle as aR, type SyncStrategy as aS, type Role as aT, type UnlockedKeyring as aU, type HistoryStrategy as aV, type NoydbStore as aW, type HistoryOptions as aX, type EncryptedEnvelope as aY, type PruneOptions as aZ, type AppendInput as a_, writeConsentEntry as aa, type PeriodsStrategy as ab, type CarryForwardContext as ac, type ClosePeriodOptions as ad, type OpenPeriodOptions as ae, PERIODS_COLLECTION as af, type PeriodRecord as ag, type ReadOnlyCollection as ah, appendPeriodLedgerEntry as ai, assertTsWritable as aj, chainAnchor as ak, loadPeriods as al, validatePeriodName as am, type GuardStrategy as an, type GuardChange as ao, type GuardContext as ap, GuardRegistry as aq, type GuardStrategyHandle as ar, ReadOnlyVaultFacade as as, type ShadowStrategy as at, CollectionFrame as au, VaultFrame as av, type NoydbBundleStore as aw, type RetentionPolicy as ax, type SnapshotPolicy as ay, type SnapshotStrategy as az, type DictKeyDescriptor as b, CrossVaultAggregation as b$, CollectionInstant as b0, type DiffEntry as b1, type JsonPatch as b2, type JsonPatchOp as b3, LedgerStore as b4, type VaultEngine as b5, VaultInstant as b6, type VerifyResult as b7, applyPatch as b8, computePatch as b9, type PersistedSchemaEnvelope as bA, type UpdateDecision as bB, type DirectoryConfig as bC, type UserVisibility as bD, type AccessibleVault as bE, type AffectedDocument as bF, type ArchivePolicy as bG, type ArchiveResult as bH, type ArchiveRunOptions as bI, type ArchiveStrategy as bJ, BUNDLE_STORE_POLICY as bK, type BuiltInGateName as bL, type CacheOptions as bM, type CacheStats as bN, type CapturedBlueprint as bO, type ChangeEvent as bP, type CollectionChangeEvent as bQ, type CollectionConflictResolver as bR, type CollectionDescriptor as bS, type CollectionStats as bT, ComputedFieldError as bU, type ComputedFields as bV, type ComputedFn as bW, type Conflict as bX, type ConflictPolicy as bY, type ConflictStrategy as bZ, type CrossTierAccessEvent as b_, diff as ba, formatDiff as bb, type PublicEnvelope as bc, type SealingKeyProvider as bd, type BundleRecipient as be, type RecipientSealer as bf, type RecipientHint as bg, Vault as bh, type RecoveryEnrollmentInput as bi, type ShamirRecoveryProvider as bj, TxContext as bk, type MVQueryContext as bl, type RegisteredMV as bm, MaterializedViewRegistry as bn, type MaterializedFromMeta as bo, type MaterializedViewOutput as bp, type UnionArmJoin as bq, type UnionSource as br, type UserEnvelope as bs, type GateName as bt, type GatePolicy as bu, type VaultPolicy as bv, type ActiveTier as bw, type FactorProof as bx, type SchemaUpdateStrategy as by, type TransformFn as bz, DictionaryHandle as c, type ListUsersOptions as c$, type CrossVaultDerivationContext as c0, type CrossVaultDerivationSpec as c1, CrossVaultGroupedAggregation as c2, type GroupedRow as c3, type CrossVaultLiveAggregation as c4, type CrossVaultLiveQuery as c5, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as c6, DELEGATIONS_COLLECTION as c7, type DeepPartial as c8, type DeepPartialOrNull as c9, type FieldDescriptor as cA, type FieldSource as cB, type FleetMigrationResult as cC, type FormattedSequenceHandle as cD, type GhostRecord as cE, type GrantOptions as cF, type GuardViolation as cG, type HistoryConfig as cH, type HistoryEntry as cI, INDEXED_STORE_POLICY as cJ, type ImportCapability as cK, type InferOutput as cL, type InternalCollectionStats as cM, type IssueDelegationOptions as cN, type IssueMagicLinkGrantOptions as cO, type KeyringAuthenticator as cP, type KeyringAuthenticatorWrappingDEKs as cQ, type KeyringAuthenticatorWrappingKEK as cR, type KeyringFile as cS, LinkEndpointError as cT, LinkIntegrityError as cU, type LinkOnDelete as cV, type LinkRow as cW, type LinkSetHandle as cX, type LinkSpec as cY, type ListAccessibleVaultsOptions as cZ, type ListPageResult as c_, type DeferredNumberingConfig as ca, type DelegationToken as cb, type DeleteManyResult as cc, type DeploymentEvent as cd, type DerivationDescriptor as ce, type DirtyEntry as cf, type DryRunResult as cg, type DumpSchemaOptions as ch, ELEVATION_AUDIT_COLLECTION as ci, ElevatedHandle as cj, type EnrollAuthenticatorOptions as ck, type EnrollAuthenticatorWrappingDEKsOptions as cl, type EnrollAuthenticatorWrappingKEKOptions as cm, type EnrollRecoveryResult as cn, type ExportCapability as co, type ExportChunk as cp, type ExportFormat as cq, type ExportStreamOptions as cr, type FactorKind as cs, type FactorProofBundle as ct, type FactorRequirement as cu, type FanoutQueryOptions as cv, type FanoutResult as cw, type FenceDoc as cx, type FenceState as cy, type FieldChange as cz, type DictionaryOptions as d, type RevokeOptions as d$, type LiveQueryOptions as d0, type LiveUserEnvelope as d1, type LocaleReadOptions as d2, Lru as d3, type LruOptions as d4, type LruStats as d5, MAGIC_LINK_CONTENT_INFO_PREFIX as d6, MAGIC_LINK_GRANTS_COLLECTION as d7, MAGIC_LINK_KEK_INFO_PREFIX as d8, type MagicLinkGrantPayload as d9, PresenceHandle as dA, type PresencePeer as dB, type PublicEnvelopeField as dC, type PublicEnvelopeSchema as dD, type PublicEnvelopeText as dE, type PullMode as dF, type PullOptions as dG, type PullPolicy as dH, type PullResult as dI, type PushMode as dJ, type PushOptions as dK, type PushPolicy as dL, type PushResult as dM, type PutManyItemOptions as dN, type PutManyOptions as dO, type PutManyResult as dP, type QueryAcrossOptions as dQ, type QueryAcrossResult as dR, type QuickUnlockState as dS, QuickUnlockStore as dT, type ReAuthOperation as dU, type RecoverPassphraseInput as dV, type RecoverPassphraseResult as dW, type RecoverUserOptions as dX, type RecoveryProof as dY, type RefreshInsightsResult as dZ, type ResolvedPublicEnvelopeSchema as d_, type MagicLinkGrantRecord as da, type MaterializedViewDescriptor as db, MemoryRecipientSealer as dc, MemorySealingKeyProvider as dd, type MigrationStatusRow as de, NOYDB_BACKUP_VERSION as df, NOYDB_FORMAT_VERSION as dg, NOYDB_KEYRING_VERSION as dh, NOYDB_SYNC_VERSION as di, type NextOptions as dj, Noydb as dk, type NoydbEventMap as dl, type NoydbOptions as dm, type Assignment as dn, type OverlayViewDescriptor as dp, PUBLIC_ENVELOPE_FIELDS as dq, type PaperRecoveryDoc as dr, type PaperRecoveryEntry as ds, type PassphrasePolicy as dt, type PassphraseValidationResult as du, type Permission as dv, type Permissions as dw, type PersistedSchemaKind as dx, type PlaintextTranslatorContext as dy, type PlaintextTranslatorFn as dz, type StaticDictDescriptor as e, UserEnvelopeOversizedError as e$, type RotatePassphraseInput as e0, type RotateRecoveryOptions as e1, type RotateRecoveryResult as e2, SEALED_PASSPHRASE_RECORD_ID as e3, type SchemaDelta as e4, type SchemaIntrospection as e5, type SchemaManifestRow as e6, type SealedEnvelope as e7, type SealedPassphrase as e8, type SearchEntry as e9, type SyncPolicy as eA, SyncScheduler as eB, type SyncSchedulerStatus as eC, type SyncStatus as eD, type SyncTarget as eE, type SyncTargetRole as eF, SyncTransaction as eG, type SyncTransactionResult as eH, type TabChannel as eI, type TabCoordinationOptions as eJ, type TabLockManager as eK, type TabPresence as eL, type TabRole as eM, type TierMode as eN, type TransactionInvariant as eO, type TranslatorAuditEntry as eP, TxCollection as eQ, type TxOp as eR, TxVault as eS, USER_ENVELOPE_COLLECTION as eT, USER_ENVELOPE_MAX_BYTES as eU, type Unsubscribe as eV, type UpdateAuthenticatorOptions as eW, type UpdateContext as eX, type UpdateUserOptions as eY, UserApi as eZ, type UserEnvelopeCheckGate as e_, type SearchOptions as ea, type SearchResult as eb, type SequenceHandle as ec, type SequenceOptions as ed, SequenceStore as ee, type SessionPolicy as ef, type SetPublicEnvelopeInput as eg, type ShamirRecoveryDoc as eh, type ShamirRecoveryEntry as ei, ShardedCollection as ej, ShardedGroupedQuery as ek, ShardedQuery as el, type ShardingConfig as em, type SkippedVault as en, type SlotRewrapCeremony as eo, type SlotRewrapContext as ep, type StandardSchemaV1 as eq, type StandardSchemaV1Issue as er, type StandardSchemaV1SyncResult as es, StateManagementVault as et, type StoreAuth as eu, type StoreAuthKind as ev, type StoreCapabilities as ew, type StoreTime as ex, SyncEngine as ey, type SyncMetadata as ez, dictCollectionName as f, savePaperRecoveryEntries as f$, type UserEnvelopePresented as f0, type UserInfo as f1, type VaultBackup as f2, VaultGroup as f3, type VaultGroupOptions as f4, type VaultPolicyOnDisk as f5, type VaultRegistryRow as f6, type VaultSchemaSnapshot as f7, type VaultSnapshot as f8, type VaultTemplate as f9, isLinkCollectionName as fA, isMagicLinkGrantExpired as fB, isPublicEnvelope as fC, issueDelegation as fD, recoverPassphrase as fE, rotatePassphrase as fF, listMagicLinkGrants as fG, listUsers as fH, listUsersWithEnvelopes as fI, loadActiveDelegations as fJ, loadPaperRecoveryEntries as fK, loadSealedPassphrase as fL, loadShamirRecoveryEntries as fM, magicLinkGrantRecordId as fN, mintPaperRecoveryEntry as fO, mintShamirRecoveryEntry as fP, mintWrappedDeksBlob as fQ, parseRsaOaepTlv as fR, parseSealedEnvelope as fS, readMagicLinkGrantRecord as fT, recoverUser as fU, removeAuthenticator as fV, resolveSchema as fW, resolveSequenceKey as fX, revokeDelegation as fY, revokeMagicLinkGrant as fZ, runTransaction as f_, type WarningRules as fa, WeakPassphraseError as fb, type WeakPassphraseReason as fc, type WithArchiveOptions as fd, type WrappedDeksBlob as fe, type WriteConflict as ff, type WriteEvent as fg, type WriteHook as fh, type WriteQueue as fi, aesGcmOpen as fj, assertStrongPassphrase as fk, buildRecipientKeyringFile as fl, burnPaperRecoveryEntry as fm, compileSequenceFormat as fn, createNoydb as fo, createStore as fp, deriveMagicLinkContentKey as fq, enrollAuthenticator as fr, estimateEntropy as fs, evalComputedFields as ft, evaluateExportCapability as fu, evaluateImportCapability as fv, findAuthenticator as fw, hasExportCapability as fx, hasImportCapability as fy, hasRecoveryEnrolled as fz, dictKey as g, saveSealedPassphrase as g0, saveShamirRecoveryEntries as g1, sealRsaOaepTlv as g2, unwrapDeksFromBlob as g3, unwrapDeksFromPaperEntry as g4, unwrapDeksFromShamirEntry as g5, unwrapMagicLinkGrant as g6, validatePassphrase as g7, validatePublicEnvelopeInput as g8, validateSchemaInput as g9, validateSchemaOutput as ga, withArchive as gb, withDeferredNumbering as gc, writeMagicLinkGrant as gd, changeSecret as ge, createOwnerKeyring as gf, ensureCollectionDEK as gg, grant as gh, loadKeyring as gi, persistKeyring as gj, revoke as gk, updateAuthenticator as gl, updateKeyringIdentity as gm, type TxStrategy as gn, type AmendmentTxOptions as go, enforceScript as h, inferScripts as i, isDictCollectionName as j, isDictKeyDescriptor as k, isStaticDictDescriptor as l, type SessionStrategy as m, createEnforcer as n, BLOB_CHUNKS_COLLECTION as o, BLOB_COLLECTION as p, BLOB_EVICTION_AUDIT_COLLECTION as q, BLOB_INDEX_COLLECTION as r, staticDict as s, BLOB_SLOTS_PREFIX as t, BLOB_VERSIONS_PREFIX as u, validateSessionPolicy as v, type BlobEvictionEntry as w, type BlobFieldPolicy as x, type BlobFieldsConfig as y, type BlobObject as z };
|
|
14671
|
+
export { type VersionRecord as $, type BlobPutOptions as A, type BlobStrategy as B, type BlobResponseOptions as C, DICT_COLLECTION_PREFIX as D, BlobSet as E, type BlobStrategyOpenArgs as F, type CompactRunOptions as G, type CompactionContext as H, type I18nStrategy as I, type CompactionResult as J, DEFAULT_CHUNK_SIZE as K, EXPORT_AUDIT_COLLECTION as L, ExportBlobsAbortedError as M, type ExportBlobsAuditEntry as N, type ExportBlobsHandle as O, PolicyEnforcer as P, type ExportBlobsOptions as Q, type ExportedBlob as R, type ScriptWarning as S, type ObjectListEntry as T, type ObjectMeta as U, type ObjectProjection as V, type ObjectUrlOptions as W, type PutObjectOptions as X, type PutUrlOptions as Y, type SlotInfo as Z, type SlotRecord as _, type DictEntry as a, type ChangeType as a$, createExportBlobsHandle as a0, memoryObjectProjection as a1, runCompaction as a2, type ConsentStrategy as a3, CONSENT_AUDIT_COLLECTION as a4, type ConsentAuditEntry as a5, type ConsentAuditFilter as a6, type ConsentContext as a7, type ConsentOp as a8, loadConsentEntries as a9, type SnapshotMeta as aA, type SnapshotMode as aB, type DerivationStrategy as aC, type DerivationContext as aD, type ArrayOutputSpec as aE, DerivationRegistry as aF, type DerivationStrategyHandle as aG, type DerivedFromMeta as aH, type OutputSpec as aI, type RecordOutputSpec as aJ, type MaterializedViewStrategy as aK, type MaterializedViewStrategyHandle as aL, type OverlayedViewStrategy as aM, Collection as aN, type OverlayFieldMergeMode as aO, type OverlayFieldMergeRule as aP, OverlayedViewRegistry as aQ, type OverlayedViewStrategyHandle as aR, type SyncStrategy as aS, type Role as aT, type UnlockedKeyring as aU, type HistoryStrategy as aV, type NoydbStore as aW, type HistoryOptions as aX, type EncryptedEnvelope as aY, type PruneOptions as aZ, type AppendInput as a_, writeConsentEntry as aa, type PeriodsStrategy as ab, type CarryForwardContext as ac, type ClosePeriodOptions as ad, type OpenPeriodOptions as ae, PERIODS_COLLECTION as af, type PeriodRecord as ag, type ReadOnlyCollection as ah, appendPeriodLedgerEntry as ai, assertTsWritable as aj, chainAnchor as ak, loadPeriods as al, validatePeriodName as am, type GuardStrategy as an, type GuardChange as ao, type GuardContext as ap, GuardRegistry as aq, type GuardStrategyHandle as ar, ReadOnlyVaultFacade as as, type ShadowStrategy as at, CollectionFrame as au, VaultFrame as av, type NoydbBundleStore as aw, type RetentionPolicy as ax, type SnapshotPolicy as ay, type SnapshotStrategy as az, type DictKeyDescriptor as b, CustodyApi as b$, CollectionInstant as b0, type DiffEntry as b1, type JsonPatch as b2, type JsonPatchOp as b3, LedgerStore as b4, type VaultEngine as b5, VaultInstant as b6, type VerifyResult as b7, applyPatch as b8, computePatch as b9, type PersistedSchemaEnvelope as bA, type UpdateDecision as bB, type DirectoryConfig as bC, type UserVisibility as bD, type AccessibleVault as bE, type AffectedDocument as bF, type ApproveWithdrawalOptions as bG, type ArchivePolicy as bH, type ArchiveResult as bI, type ArchiveRunOptions as bJ, type ArchiveStrategy as bK, BUNDLE_STORE_POLICY as bL, type BuiltInGateName as bM, type CacheOptions as bN, type CacheStats as bO, type ChangeEvent as bP, type CollectionChangeEvent as bQ, type CollectionConflictResolver as bR, type CollectionDescriptor as bS, type CollectionStats as bT, ComputedFieldError as bU, type ComputedFields as bV, type ComputedFn as bW, type Conflict as bX, type ConflictPolicy as bY, type ConflictStrategy as bZ, type CrossTierAccessEvent as b_, diff as ba, formatDiff as bb, Vault as bc, type SealingKeyProvider as bd, type RecoveryEnrollmentInput as be, type ShamirRecoveryProvider as bf, type PublicEnvelope as bg, type BundleRecipient as bh, type RecipientSealer as bi, type RecipientHint as bj, TxContext as bk, type MVQueryContext as bl, type RegisteredMV as bm, MaterializedViewRegistry as bn, type MaterializedFromMeta as bo, type MaterializedViewOutput as bp, type UnionArmJoin as bq, type UnionSource as br, type UserEnvelope as bs, type GateName as bt, type GatePolicy as bu, type VaultPolicy as bv, type ActiveTier as bw, type FactorProof as bx, type SchemaUpdateStrategy as by, type TransformFn as bz, DictionaryHandle as c, type LruStats as c$, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as c0, DELEGATIONS_COLLECTION as c1, type DeepPartial as c2, type DeepPartialOrNull as c3, type DeferredNumberingConfig as c4, type DelegationToken as c5, type DeleteManyResult as c6, type DerivationDescriptor as c7, type DirtyEntry as c8, type DryRunResult as c9, type HistoryConfig as cA, type HistoryEntry as cB, INDEXED_STORE_POLICY as cC, type ImportCapability as cD, type InferOutput as cE, type InternalCollectionStats as cF, type IssueDelegationOptions as cG, type IssueMagicLinkGrantOptions as cH, type KeyringAuthenticator as cI, type KeyringAuthenticatorWrappingDEKs as cJ, type KeyringAuthenticatorWrappingKEK as cK, type KeyringFile as cL, type LiberateOptions as cM, type LiberateResult as cN, LinkEndpointError as cO, LinkIntegrityError as cP, type LinkOnDelete as cQ, type LinkRow as cR, type LinkSetHandle as cS, type LinkSpec as cT, type ListAccessibleVaultsOptions as cU, type ListPageResult as cV, type ListUsersOptions as cW, type LiveUserEnvelope as cX, type LocaleReadOptions as cY, Lru as cZ, type LruOptions as c_, type DumpSchemaOptions as ca, ELEVATION_AUDIT_COLLECTION as cb, ElevatedHandle as cc, type EnrollAuthenticatorOptions as cd, type EnrollAuthenticatorWrappingDEKsOptions as ce, type EnrollAuthenticatorWrappingKEKOptions as cf, type EnrollRecoveryResult as cg, type ExportAccessibleOptions as ch, type ExportCapability as ci, type ExportChunk as cj, type ExportFormat as ck, type ExportStreamOptions as cl, type FactorKind as cm, type FactorProofBundle as cn, type FactorRequirement as co, type FenceDoc as cp, type FenceState as cq, type FieldChange as cr, type FieldDescriptor as cs, type FieldSource as ct, type FormattedSequenceHandle as cu, type FrozenSnapshotRef as cv, type GhostRecord as cw, type GrantCustodianOptions as cx, type GrantOptions as cy, type GuardViolation as cz, type DictionaryOptions as d, type SchemaDelta as d$, MAGIC_LINK_CONTENT_INFO_PREFIX as d0, MAGIC_LINK_GRANTS_COLLECTION as d1, MAGIC_LINK_KEK_INFO_PREFIX as d2, type MagicLinkGrantPayload as d3, type MagicLinkGrantRecord as d4, type MaterializedViewDescriptor as d5, MemoryRecipientSealer as d6, MemorySealingKeyProvider as d7, NOYDB_BACKUP_VERSION as d8, NOYDB_FORMAT_VERSION as d9, type PullPolicy as dA, type PullResult as dB, type PushMode as dC, type PushOptions as dD, type PushPolicy as dE, type PushResult as dF, type PutManyItemOptions as dG, type PutManyOptions as dH, type PutManyResult as dI, type QueryAcrossOptions as dJ, type QueryAcrossResult as dK, type QuickUnlockState as dL, QuickUnlockStore as dM, type ReAuthOperation as dN, type RecoverPassphraseInput as dO, type RecoverPassphraseResult as dP, type RecoverUserOptions as dQ, type RecoveryProof as dR, type RejectWithdrawalOptions as dS, type RequestWithdrawalOptions as dT, type RequestWithdrawalResult as dU, type ResolvedPublicEnvelopeSchema as dV, type RevokeOptions as dW, type RotatePassphraseInput as dX, type RotateRecoveryOptions as dY, type RotateRecoveryResult as dZ, SEALED_PASSPHRASE_RECORD_ID as d_, NOYDB_KEYRING_VERSION as da, NOYDB_SYNC_VERSION as db, type NextOptions as dc, Noydb as dd, type NoydbEventMap as de, type NoydbOptions as df, type Assignment as dg, type OverlayViewDescriptor as dh, PUBLIC_ENVELOPE_FIELDS as di, type PaperRecoveryDoc as dj, type PaperRecoveryEntry as dk, type PassphrasePolicy as dl, type PassphraseValidationResult as dm, type Permission as dn, type Permissions as dp, type PersistedSchemaKind as dq, type PlaintextTranslatorContext as dr, type PlaintextTranslatorFn as ds, PresenceHandle as dt, type PresencePeer as du, type PublicEnvelopeField as dv, type PublicEnvelopeSchema as dw, type PublicEnvelopeText as dx, type PullMode as dy, type PullOptions as dz, type StaticDictDescriptor as e, type WithdrawResult as e$, type SchemaIntrospection as e0, type SealedEnvelope as e1, type SealedPassphrase as e2, type SearchEntry as e3, type SearchOptions as e4, type SearchResult as e5, type SequenceHandle as e6, type SequenceOptions as e7, SequenceStore as e8, type SessionPolicy as e9, type TabRole as eA, type TierMode as eB, type TransactionInvariant as eC, type TranslatorAuditEntry as eD, TxCollection as eE, type TxOp as eF, TxVault as eG, USER_ENVELOPE_COLLECTION as eH, USER_ENVELOPE_MAX_BYTES as eI, type Unsubscribe as eJ, type UpdateAuthenticatorOptions as eK, type UpdateContext as eL, type UpdateUserOptions as eM, UserApi as eN, type UserEnvelopeCheckGate as eO, UserEnvelopeOversizedError as eP, type UserEnvelopePresented as eQ, type UserInfo as eR, type VaultBackup as eS, type VaultPolicyOnDisk as eT, type VaultSchemaSnapshot as eU, type VaultSnapshot as eV, type WarningRules as eW, WeakPassphraseError as eX, type WeakPassphraseReason as eY, type WithArchiveOptions as eZ, type WithdrawAccessibleOptions as e_, type SetPublicEnvelopeInput as ea, type ShamirRecoveryDoc as eb, type ShamirRecoveryEntry as ec, type SlotRewrapCeremony as ed, type SlotRewrapContext as ee, type StandardSchemaV1 as ef, type StandardSchemaV1Issue as eg, type StandardSchemaV1SyncResult as eh, type StoreAuth as ei, type StoreAuthKind as ej, type StoreCapabilities as ek, type StoreTime as el, SyncEngine as em, type SyncMetadata as en, type SyncPolicy as eo, SyncScheduler as ep, type SyncSchedulerStatus as eq, type SyncStatus as er, type SyncTarget as es, type SyncTargetRole as et, SyncTransaction as eu, type SyncTransactionResult as ev, type TabChannel as ew, type TabCoordinationOptions as ex, type TabLockManager as ey, type TabPresence as ez, dictCollectionName as f, unwrapDeksFromPaperEntry as f$, type WithdrawalRequest as f0, WithdrawalRequestError as f1, type WithdrawalRequestStatus as f2, type WrappedDeksBlob as f3, type WriteConflict as f4, type WriteEvent as f5, type WriteHook as f6, type WriteQueue as f7, aesGcmOpen as f8, approveWithdrawal as f9, listUsersWithEnvelopes as fA, listWithdrawalRequests as fB, loadActiveDelegations as fC, loadPaperRecoveryEntries as fD, loadSealedPassphrase as fE, loadShamirRecoveryEntries as fF, magicLinkGrantRecordId as fG, mintPaperRecoveryEntry as fH, mintShamirRecoveryEntry as fI, mintWrappedDeksBlob as fJ, parseRsaOaepTlv as fK, parseSealedEnvelope as fL, readMagicLinkGrantRecord as fM, recoverUser as fN, rejectWithdrawal as fO, removeAuthenticator as fP, requestWithdrawal as fQ, resolveSchema as fR, resolveSequenceKey as fS, revokeDelegation as fT, revokeMagicLinkGrant as fU, runTransaction as fV, savePaperRecoveryEntries as fW, saveSealedPassphrase as fX, saveShamirRecoveryEntries as fY, sealRsaOaepTlv as fZ, unwrapDeksFromBlob as f_, assertStrongPassphrase as fa, buildRecipientKeyringFile as fb, burnPaperRecoveryEntry as fc, compileSequenceFormat as fd, createNoydb as fe, createStore as ff, deriveMagicLinkContentKey as fg, enrollAuthenticator as fh, estimateEntropy as fi, evalComputedFields as fj, evaluateExportCapability as fk, evaluateImportCapability as fl, exportAccessibleData as fm, findAuthenticator as fn, hasExportCapability as fo, hasImportCapability as fp, hasRecoveryEnrolled as fq, isLinkCollectionName as fr, isMagicLinkGrantExpired as fs, isPublicEnvelope as ft, issueDelegation as fu, recoverPassphrase as fv, rotatePassphrase as fw, liberateVault as fx, listMagicLinkGrants as fy, listUsers as fz, dictKey as g, unwrapDeksFromShamirEntry as g0, unwrapMagicLinkGrant as g1, validatePassphrase as g2, validatePublicEnvelopeInput as g3, validateSchemaInput as g4, validateSchemaOutput as g5, withArchive as g6, withDeferredNumbering as g7, withdrawAccessibleData as g8, writeMagicLinkGrant as g9, changeSecret as ga, createOwnerKeyring as gb, ensureCollectionDEK as gc, grant as gd, loadKeyring as ge, persistKeyring as gf, revoke as gg, updateAuthenticator as gh, updateKeyringIdentity as gi, type TxStrategy as gj, type AmendmentTxOptions as gk, enforceScript as h, inferScripts as i, isDictCollectionName as j, isDictKeyDescriptor as k, isStaticDictDescriptor as l, type SessionStrategy as m, createEnforcer as n, BLOB_CHUNKS_COLLECTION as o, BLOB_COLLECTION as p, BLOB_EVICTION_AUDIT_COLLECTION as q, BLOB_INDEX_COLLECTION as r, staticDict as s, BLOB_SLOTS_PREFIX as t, BLOB_VERSIONS_PREFIX as u, validateSessionPolicy as v, type BlobEvictionEntry as w, type BlobFieldPolicy as x, type BlobFieldsConfig as y, type BlobObject as z };
|