@noy-db/hub 0.3.0-pre.4 → 0.3.0-pre.6
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/adapter/index.d.ts +1 -1
- package/dist/adapter/index.js +1 -1
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/aggregate/index.js +4 -4
- package/dist/api-OQ65LUSK.js +20 -0
- package/dist/as/index.d.ts +3 -3
- package/dist/as/index.js +9 -9
- package/dist/at/index.d.ts +1 -1
- package/dist/attestation/index.d.ts +2 -2
- package/dist/attestation/index.js +16 -16
- package/dist/{backup-MOB27UUN.js → backup-Y3RMFGVX.js} +9 -9
- package/dist/blobs/index.d.ts +3 -3
- package/dist/blobs/index.js +8 -8
- package/dist/bundle/index.d.ts +4 -4
- package/dist/bundle/index.js +17 -17
- package/dist/{bundle-Bs13EZtX.d.ts → bundle-BPOSpGZG.d.ts} +1 -1
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.d.ts +3 -3
- package/dist/cargo/index.js +19 -19
- package/dist/{chunk-BMQOH7MM.js → chunk-26FSVNBL.js} +2 -2
- package/dist/{chunk-HLUKZ36Q.js → chunk-3IMGBWP7.js} +5 -5
- package/dist/{chunk-LPRPVCNY.js → chunk-3UUXDQPM.js} +2 -2
- package/dist/{chunk-AF5ZRTZ4.js → chunk-47C4CI7R.js} +2 -2
- package/dist/{chunk-P27Z66EB.js → chunk-4I4UNXHM.js} +4 -4
- package/dist/{chunk-ULIHDPKL.js → chunk-55LSDABW.js} +2 -2
- package/dist/{chunk-P5WXDYMD.js → chunk-5GQE5IDB.js} +4 -4
- package/dist/{chunk-TLJOJBZD.js → chunk-5HZULLHE.js} +2 -2
- package/dist/chunk-5JQMX2EH.js +50 -0
- package/dist/chunk-5JQMX2EH.js.map +1 -0
- package/dist/{chunk-PGFY7IRW.js → chunk-5UOPIPZC.js} +3 -3
- package/dist/{chunk-6HNKCKFZ.js → chunk-65FW3ALF.js} +4 -4
- package/dist/{chunk-ZKF6HH7V.js → chunk-6P5AJ2ZS.js} +2 -2
- package/dist/{chunk-QNTEDPWP.js → chunk-6PALJTC2.js} +3 -3
- package/dist/{chunk-GBTUANXF.js → chunk-6Z435B6N.js} +5 -5
- package/dist/{chunk-Z3FZC5GV.js → chunk-73C4RPMX.js} +3 -3
- package/dist/{chunk-VMJ5URU7.js → chunk-7A7LTSJR.js} +5 -5
- package/dist/{chunk-OVO2RZAE.js → chunk-7AGLCOYE.js} +10 -10
- package/dist/{chunk-XYYW64LB.js → chunk-7CZ6YXMO.js} +2 -2
- package/dist/{chunk-RDHAGBEB.js → chunk-7KTL4RHZ.js} +3 -3
- package/dist/{chunk-4K3MQ5S3.js → chunk-BASCPHNM.js} +2 -2
- package/dist/{chunk-CPXPHQGX.js → chunk-BYS45GOJ.js} +17 -12
- package/dist/chunk-BYS45GOJ.js.map +1 -0
- package/dist/{chunk-P2LDXRGP.js → chunk-C2ZKWL37.js} +2 -2
- package/dist/{chunk-BKGIWGCX.js → chunk-C4NOLA5X.js} +2 -2
- package/dist/{chunk-EWR7HL3K.js → chunk-C57J6AWN.js} +30 -5
- package/dist/{chunk-EWR7HL3K.js.map → chunk-C57J6AWN.js.map} +1 -1
- package/dist/{chunk-TB5RNNJ4.js → chunk-C6A2DPRE.js} +4 -4
- package/dist/{chunk-SW56GSYC.js → chunk-CHK5VVMI.js} +2 -2
- package/dist/{chunk-GOUNIHFA.js → chunk-CYWF3JJE.js} +10 -10
- package/dist/{chunk-ZPHDGUZZ.js → chunk-D6ADQ4QL.js} +581 -82
- package/dist/chunk-D6ADQ4QL.js.map +1 -0
- package/dist/{chunk-H7RYPVMJ.js → chunk-DBBP35OP.js} +2 -2
- package/dist/{chunk-A5DYVMDR.js → chunk-E7MAS736.js} +3 -3
- package/dist/{chunk-3Y4QLJ6K.js → chunk-EU7HDMT3.js} +2 -2
- package/dist/{chunk-T65UZXR6.js → chunk-FCOZ7DEC.js} +3 -3
- package/dist/{chunk-HBKDR7R3.js → chunk-GEK6UGOJ.js} +2 -2
- package/dist/{chunk-7J7JRYXW.js → chunk-GGFT2XFF.js} +4 -4
- package/dist/chunk-GYGLAVCX.js +19 -0
- package/dist/chunk-GYGLAVCX.js.map +1 -0
- package/dist/{chunk-HY6ZGGEC.js → chunk-HJZ3CTZ2.js} +2 -2
- package/dist/{chunk-GXGK22QU.js → chunk-HU55NPHZ.js} +2 -2
- package/dist/{chunk-U24XHXNK.js → chunk-I6JJ6VJS.js} +2 -2
- package/dist/{chunk-3QRQOBS7.js → chunk-I7GTYPWF.js} +2 -2
- package/dist/{chunk-N5YVZHCB.js → chunk-II6DLDZM.js} +2 -2
- package/dist/{chunk-XJR3COJO.js → chunk-IVIGZTFH.js} +4 -4
- package/dist/{chunk-Z7KI4WHR.js → chunk-LFGJG4XZ.js} +2 -2
- package/dist/{chunk-ZKYMKF2S.js → chunk-ML5UP7YN.js} +5 -5
- package/dist/{chunk-ZROMNP7Q.js → chunk-MOQ5M46U.js} +2 -2
- package/dist/{chunk-GQOT6QJR.js → chunk-MT4YWJRW.js} +5 -5
- package/dist/{chunk-P3V7JTB6.js → chunk-NL4HVTNO.js} +3 -3
- package/dist/{chunk-GZZL5R73.js → chunk-OCVO2V63.js} +4 -4
- package/dist/{chunk-U23JUUPX.js → chunk-OJ64XMPJ.js} +10 -2
- package/dist/{chunk-U23JUUPX.js.map → chunk-OJ64XMPJ.js.map} +1 -1
- package/dist/{chunk-VFRNWE5P.js → chunk-OLVIGEHQ.js} +6 -6
- package/dist/{chunk-HMXLN43G.js → chunk-OWGAXPRE.js} +2 -2
- package/dist/{chunk-T2EGAXPM.js → chunk-PAJCRV7O.js} +2 -2
- package/dist/{chunk-5MRE3C4Q.js → chunk-PLQCXH75.js} +2 -2
- package/dist/{chunk-RTS23VIJ.js → chunk-PYIUDUGS.js} +2 -2
- package/dist/{chunk-5CY35H55.js → chunk-QQQE6QUO.js} +8 -8
- package/dist/{chunk-TYGW5TOR.js → chunk-RIZQZKU6.js} +4 -4
- package/dist/{chunk-VPCMJ5Z4.js → chunk-RLP65PI3.js} +5 -5
- package/dist/{chunk-6RXPSMKR.js → chunk-RNYDHIQL.js} +3 -3
- package/dist/{chunk-5W7AOFWA.js → chunk-RXUFMTD5.js} +2 -2
- package/dist/chunk-S2IDC6MO.js +167 -0
- package/dist/chunk-S2IDC6MO.js.map +1 -0
- package/dist/{chunk-Z5PIUYNB.js → chunk-S55MJQUQ.js} +5 -5
- package/dist/{chunk-O2DB4C3M.js → chunk-SXLMLECV.js} +3 -3
- package/dist/{chunk-OPTFANOX.js → chunk-TSAT3E7Y.js} +3 -3
- package/dist/{chunk-M66NAZA4.js → chunk-TWJVOYU2.js} +3 -3
- package/dist/{chunk-43ISXURO.js → chunk-U7LV2DUN.js} +2 -2
- package/dist/{chunk-FH52CDEW.js → chunk-UB3XHGFG.js} +5 -5
- package/dist/{chunk-TCIUO62Z.js → chunk-UWZ7O4NR.js} +2 -2
- package/dist/{chunk-K5P46KB3.js → chunk-UZZFV3O3.js} +7 -7
- package/dist/{chunk-P3NGV5RV.js → chunk-V76PHWLE.js} +2 -2
- package/dist/{chunk-UOEWDCUX.js → chunk-VFQOE76I.js} +2 -2
- package/dist/{chunk-VRPBEOWU.js → chunk-VIWOGJ2O.js} +2 -2
- package/dist/{chunk-5EWYUR5P.js → chunk-VK6OC22R.js} +2 -2
- package/dist/{chunk-VAWY44JW.js → chunk-WAL4MRBK.js} +25 -10
- package/dist/chunk-WAL4MRBK.js.map +1 -0
- package/dist/{chunk-H5XRIJX3.js → chunk-WAW4VFS7.js} +4 -4
- package/dist/{chunk-SEQ2JI3Y.js → chunk-WQAT24C2.js} +6 -6
- package/dist/{chunk-NB47TXGP.js → chunk-XDWNF4BS.js} +8 -8
- package/dist/{chunk-G7RDYYTE.js → chunk-XW5LZYV4.js} +2 -2
- package/dist/{chunk-LIP6JWYK.js → chunk-YTCCC6NG.js} +3 -3
- package/dist/{chunk-OFBFAVLI.js → chunk-YXGIPYH4.js} +52 -6
- package/dist/chunk-YXGIPYH4.js.map +1 -0
- package/dist/{chunk-TVRQ3RYH.js → chunk-ZHK3F5RB.js} +6 -7
- package/dist/chunk-ZHK3F5RB.js.map +1 -0
- package/dist/{chunk-G4MGYGSS.js → chunk-ZRJBLWKQ.js} +5 -5
- package/dist/classified/index.d.ts +3 -3
- package/dist/classified/index.js +3 -3
- package/dist/{collection-facade-MKEBZDWW.js → collection-facade-5V3JS7SD.js} +13 -13
- package/dist/{computed-BMMEFRFJ.js → computed-6FOFXQPE.js} +3 -3
- package/dist/{config-drift-KGM7ZRW4.js → config-drift-SWZNEH5H.js} +3 -3
- package/dist/consent/index.d.ts +2 -2
- package/dist/consent/index.js +7 -7
- package/dist/crdt/index.d.ts +2 -2
- package/dist/dead-filter-MGWMNRO2.js +28 -0
- package/dist/dead-filter-MGWMNRO2.js.map +1 -0
- package/dist/{delegation-BQNIEHZE.js → delegation-AUY42TGU.js} +9 -9
- package/dist/derivations/index.d.ts +3 -3
- package/dist/derivations/index.js +9 -9
- package/dist/derive-FWSEWWI7.js +21 -0
- package/dist/{dev-unlock-Cqd5Xv5J.d.ts → dev-unlock-DxecHstJ.d.ts} +1 -1
- package/dist/{enclave-YN6223OG.js → enclave-UYZGSE2C.js} +8 -8
- package/dist/executor-EUPYHCLU.js +9 -0
- package/dist/executor-KZ4B3PRT.js +9 -0
- package/dist/executor-XWPD5PIM.js +21 -0
- package/dist/export-accessible-M54OI6FO.js +23 -0
- package/dist/{extract-partition-RNVSFHAB.js → extract-partition-MIHAL6PP.js} +13 -13
- package/dist/{fanout-sidecar-WS22Q5WH.js → fanout-sidecar-SSEW7BQB.js} +7 -7
- package/dist/find-OH4BEULF.js +11 -0
- package/dist/forget/index.js +7 -7
- package/dist/guards/index.d.ts +3 -3
- package/dist/guards/index.js +6 -6
- package/dist/{hash-D8Q5MJLA.d.ts → hash-umqwdLhO.d.ts} +1 -1
- package/dist/history/index.d.ts +3 -3
- package/dist/history/index.js +9 -9
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +11 -11
- package/dist/in/index.d.ts +1 -1
- package/dist/{index-D4GQe1Rx.d.ts → index-B-LKCpm6.d.ts} +103 -4
- package/dist/{index-DRxk8q_7.d.ts → index-zdEVWlkZ.d.ts} +2 -2
- package/dist/index.d.ts +21 -14
- package/dist/index.js +115 -113
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.d.ts +2 -2
- package/dist/indexing/index.js +4 -4
- package/dist/issue-PHWTGH2G.js +19 -0
- package/dist/kernel/index.d.ts +2 -2
- package/dist/kernel/index.js +10 -10
- package/dist/lazy/index.d.ts +2 -2
- package/dist/{ledger-KZWBKAG5.js → ledger-IWWY7IIC.js} +9 -9
- package/dist/liberate-QDTNV7SM.js +24 -0
- package/dist/{link-set-UQEIYQAM.js → link-set-HJOC7GB7.js} +9 -9
- package/dist/materialized-views/index.d.ts +3 -3
- package/dist/materialized-views/index.js +13 -13
- package/dist/{mime-magic-DmwT7OzZ.d.ts → mime-magic-C_O9KsAk.d.ts} +1 -1
- package/dist/noydb-Y5L74IDJ.js +62 -0
- package/dist/on/index.d.ts +1 -1
- package/dist/on/index.js +7 -7
- package/dist/overlay-views/index.d.ts +3 -3
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.d.ts +2 -2
- package/dist/periods/index.js +10 -10
- package/dist/pod/index.d.ts +2 -2
- package/dist/pod/index.js +9 -9
- package/dist/{policy-YIKUH4AD.js → policy-3ZKSGSRK.js} +3 -3
- package/dist/portability/index.d.ts +2 -2
- package/dist/portability/index.js +8 -8
- package/dist/post-register-BIXGCZ2M.js +55 -0
- package/dist/post-register-BIXGCZ2M.js.map +1 -0
- package/dist/{public-envelope-MRN5YYZZ.js → public-envelope-6UBQ4IUY.js} +3 -3
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +6 -6
- package/dist/register-OVONZ2MJ.js +23 -0
- package/dist/registry-AIEYUOSG.js +19 -0
- package/dist/registry-D5J7SVJ2.js +17 -0
- package/dist/registry-HSNQ4NBP.js +9 -0
- package/dist/{request-withdrawal-EHALV66Y.js → request-withdrawal-IHF64VIT.js} +12 -12
- package/dist/{reveal-TBLTFWQ2.js → reveal-B77Q2BJW.js} +5 -5
- package/dist/{revoke-MHAUAESM.js → revoke-BPPOUZPE.js} +9 -9
- package/dist/satellites/index.d.ts +5 -0
- package/dist/satellites/index.js +8 -0
- package/dist/sealed-record/index.d.ts +2 -2
- package/dist/sealed-record/index.js +10 -10
- package/dist/session/index.d.ts +3 -3
- package/dist/session/index.js +7 -7
- package/dist/shadow/index.d.ts +2 -2
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-PQ74YXRY.js → signer-MNQEL27B.js} +8 -8
- package/dist/snapshots/index.d.ts +2 -2
- package/dist/snapshots/index.js +8 -8
- package/dist/{stale-7Q62KVI3.js → stale-COBBJORL.js} +2 -2
- package/dist/storage-DVKYH7UU.js +23 -0
- package/dist/storage-DVKYH7UU.js.map +1 -0
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.js +7 -7
- package/dist/team/index.d.ts +29 -4
- package/dist/team/index.js +14 -14
- package/dist/tiers/index.d.ts +1 -1
- package/dist/tiers/index.js +8 -8
- package/dist/to/index.d.ts +1 -1
- package/dist/to/index.js +1 -1
- package/dist/{transition-guard-C4hvR-Ac.d.ts → transition-guard-CzqWwVGP.d.ts} +1 -1
- package/dist/tx/index.d.ts +2 -2
- package/dist/tx/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/{validators-Ctgkj5qd.d.ts → validators-Bdiv0ucK.d.ts} +1 -1
- package/dist/{vault-diff-B1Ir6EGs.d.ts → vault-diff-BbZngJUP.d.ts} +1 -1
- package/dist/{verify-YB5LQHNA.js → verify-CAYGXYNO.js} +5 -5
- package/dist/{walk-5C3GPKT2.js → walk-CVNXFUEF.js} +9 -9
- package/dist/with/index.d.ts +2 -2
- package/dist/with/index.js +9 -9
- package/dist/{with-materialized-view-Bp65kKdQ.d.ts → with-materialized-view-BmKXygt2.d.ts} +1 -1
- package/dist/{with-overlayed-view-BRhdQNrK.d.ts → with-overlayed-view-Bnwe7E75.d.ts} +1 -1
- package/dist/{with-rollup-bQRPc3y1.d.ts → with-rollup-JXTxc9cu.d.ts} +1 -1
- package/dist/{withdraw-accessible-JMX2TCPX.js → withdraw-accessible-5ALN3ZGM.js} +11 -11
- package/dist/withdraw-accessible-5ALN3ZGM.js.map +1 -0
- package/package.json +7 -3
- package/dist/api-JOXUNSKP.js +0 -20
- package/dist/chunk-CPXPHQGX.js.map +0 -1
- package/dist/chunk-KYY7L72M.js +0 -106
- package/dist/chunk-KYY7L72M.js.map +0 -1
- package/dist/chunk-OFBFAVLI.js.map +0 -1
- package/dist/chunk-TVRQ3RYH.js.map +0 -1
- package/dist/chunk-VAWY44JW.js.map +0 -1
- package/dist/chunk-ZPHDGUZZ.js.map +0 -1
- package/dist/executor-CBTNU5VZ.js +0 -9
- package/dist/executor-DJHNSTIR.js +0 -9
- package/dist/executor-FGISLQIN.js +0 -21
- package/dist/export-accessible-P7SLRLK3.js +0 -23
- package/dist/find-RNBG7LBY.js +0 -11
- package/dist/issue-W5QG53B5.js +0 -19
- package/dist/liberate-GMGCHIND.js +0 -24
- package/dist/noydb-KS2O2MRI.js +0 -60
- package/dist/register-K6DDSIXN.js +0 -21
- package/dist/registry-IMNMHWTM.js +0 -17
- package/dist/registry-K6VUQXKV.js +0 -19
- package/dist/registry-ZVO3T4M5.js +0 -9
- package/dist/storage-5E6YB2JY.js +0 -21
- /package/dist/{api-JOXUNSKP.js.map → api-OQ65LUSK.js.map} +0 -0
- /package/dist/{backup-MOB27UUN.js.map → backup-Y3RMFGVX.js.map} +0 -0
- /package/dist/{chunk-BMQOH7MM.js.map → chunk-26FSVNBL.js.map} +0 -0
- /package/dist/{chunk-HLUKZ36Q.js.map → chunk-3IMGBWP7.js.map} +0 -0
- /package/dist/{chunk-LPRPVCNY.js.map → chunk-3UUXDQPM.js.map} +0 -0
- /package/dist/{chunk-AF5ZRTZ4.js.map → chunk-47C4CI7R.js.map} +0 -0
- /package/dist/{chunk-P27Z66EB.js.map → chunk-4I4UNXHM.js.map} +0 -0
- /package/dist/{chunk-ULIHDPKL.js.map → chunk-55LSDABW.js.map} +0 -0
- /package/dist/{chunk-P5WXDYMD.js.map → chunk-5GQE5IDB.js.map} +0 -0
- /package/dist/{chunk-TLJOJBZD.js.map → chunk-5HZULLHE.js.map} +0 -0
- /package/dist/{chunk-PGFY7IRW.js.map → chunk-5UOPIPZC.js.map} +0 -0
- /package/dist/{chunk-6HNKCKFZ.js.map → chunk-65FW3ALF.js.map} +0 -0
- /package/dist/{chunk-ZKF6HH7V.js.map → chunk-6P5AJ2ZS.js.map} +0 -0
- /package/dist/{chunk-QNTEDPWP.js.map → chunk-6PALJTC2.js.map} +0 -0
- /package/dist/{chunk-GBTUANXF.js.map → chunk-6Z435B6N.js.map} +0 -0
- /package/dist/{chunk-Z3FZC5GV.js.map → chunk-73C4RPMX.js.map} +0 -0
- /package/dist/{chunk-VMJ5URU7.js.map → chunk-7A7LTSJR.js.map} +0 -0
- /package/dist/{chunk-OVO2RZAE.js.map → chunk-7AGLCOYE.js.map} +0 -0
- /package/dist/{chunk-XYYW64LB.js.map → chunk-7CZ6YXMO.js.map} +0 -0
- /package/dist/{chunk-RDHAGBEB.js.map → chunk-7KTL4RHZ.js.map} +0 -0
- /package/dist/{chunk-4K3MQ5S3.js.map → chunk-BASCPHNM.js.map} +0 -0
- /package/dist/{chunk-P2LDXRGP.js.map → chunk-C2ZKWL37.js.map} +0 -0
- /package/dist/{chunk-BKGIWGCX.js.map → chunk-C4NOLA5X.js.map} +0 -0
- /package/dist/{chunk-TB5RNNJ4.js.map → chunk-C6A2DPRE.js.map} +0 -0
- /package/dist/{chunk-SW56GSYC.js.map → chunk-CHK5VVMI.js.map} +0 -0
- /package/dist/{chunk-GOUNIHFA.js.map → chunk-CYWF3JJE.js.map} +0 -0
- /package/dist/{chunk-H7RYPVMJ.js.map → chunk-DBBP35OP.js.map} +0 -0
- /package/dist/{chunk-A5DYVMDR.js.map → chunk-E7MAS736.js.map} +0 -0
- /package/dist/{chunk-3Y4QLJ6K.js.map → chunk-EU7HDMT3.js.map} +0 -0
- /package/dist/{chunk-T65UZXR6.js.map → chunk-FCOZ7DEC.js.map} +0 -0
- /package/dist/{chunk-HBKDR7R3.js.map → chunk-GEK6UGOJ.js.map} +0 -0
- /package/dist/{chunk-7J7JRYXW.js.map → chunk-GGFT2XFF.js.map} +0 -0
- /package/dist/{chunk-HY6ZGGEC.js.map → chunk-HJZ3CTZ2.js.map} +0 -0
- /package/dist/{chunk-GXGK22QU.js.map → chunk-HU55NPHZ.js.map} +0 -0
- /package/dist/{chunk-U24XHXNK.js.map → chunk-I6JJ6VJS.js.map} +0 -0
- /package/dist/{chunk-3QRQOBS7.js.map → chunk-I7GTYPWF.js.map} +0 -0
- /package/dist/{chunk-N5YVZHCB.js.map → chunk-II6DLDZM.js.map} +0 -0
- /package/dist/{chunk-XJR3COJO.js.map → chunk-IVIGZTFH.js.map} +0 -0
- /package/dist/{chunk-Z7KI4WHR.js.map → chunk-LFGJG4XZ.js.map} +0 -0
- /package/dist/{chunk-ZKYMKF2S.js.map → chunk-ML5UP7YN.js.map} +0 -0
- /package/dist/{chunk-ZROMNP7Q.js.map → chunk-MOQ5M46U.js.map} +0 -0
- /package/dist/{chunk-GQOT6QJR.js.map → chunk-MT4YWJRW.js.map} +0 -0
- /package/dist/{chunk-P3V7JTB6.js.map → chunk-NL4HVTNO.js.map} +0 -0
- /package/dist/{chunk-GZZL5R73.js.map → chunk-OCVO2V63.js.map} +0 -0
- /package/dist/{chunk-VFRNWE5P.js.map → chunk-OLVIGEHQ.js.map} +0 -0
- /package/dist/{chunk-HMXLN43G.js.map → chunk-OWGAXPRE.js.map} +0 -0
- /package/dist/{chunk-T2EGAXPM.js.map → chunk-PAJCRV7O.js.map} +0 -0
- /package/dist/{chunk-5MRE3C4Q.js.map → chunk-PLQCXH75.js.map} +0 -0
- /package/dist/{chunk-RTS23VIJ.js.map → chunk-PYIUDUGS.js.map} +0 -0
- /package/dist/{chunk-5CY35H55.js.map → chunk-QQQE6QUO.js.map} +0 -0
- /package/dist/{chunk-TYGW5TOR.js.map → chunk-RIZQZKU6.js.map} +0 -0
- /package/dist/{chunk-VPCMJ5Z4.js.map → chunk-RLP65PI3.js.map} +0 -0
- /package/dist/{chunk-6RXPSMKR.js.map → chunk-RNYDHIQL.js.map} +0 -0
- /package/dist/{chunk-5W7AOFWA.js.map → chunk-RXUFMTD5.js.map} +0 -0
- /package/dist/{chunk-Z5PIUYNB.js.map → chunk-S55MJQUQ.js.map} +0 -0
- /package/dist/{chunk-O2DB4C3M.js.map → chunk-SXLMLECV.js.map} +0 -0
- /package/dist/{chunk-OPTFANOX.js.map → chunk-TSAT3E7Y.js.map} +0 -0
- /package/dist/{chunk-M66NAZA4.js.map → chunk-TWJVOYU2.js.map} +0 -0
- /package/dist/{chunk-43ISXURO.js.map → chunk-U7LV2DUN.js.map} +0 -0
- /package/dist/{chunk-FH52CDEW.js.map → chunk-UB3XHGFG.js.map} +0 -0
- /package/dist/{chunk-TCIUO62Z.js.map → chunk-UWZ7O4NR.js.map} +0 -0
- /package/dist/{chunk-K5P46KB3.js.map → chunk-UZZFV3O3.js.map} +0 -0
- /package/dist/{chunk-P3NGV5RV.js.map → chunk-V76PHWLE.js.map} +0 -0
- /package/dist/{chunk-UOEWDCUX.js.map → chunk-VFQOE76I.js.map} +0 -0
- /package/dist/{chunk-VRPBEOWU.js.map → chunk-VIWOGJ2O.js.map} +0 -0
- /package/dist/{chunk-5EWYUR5P.js.map → chunk-VK6OC22R.js.map} +0 -0
- /package/dist/{chunk-H5XRIJX3.js.map → chunk-WAW4VFS7.js.map} +0 -0
- /package/dist/{chunk-SEQ2JI3Y.js.map → chunk-WQAT24C2.js.map} +0 -0
- /package/dist/{chunk-NB47TXGP.js.map → chunk-XDWNF4BS.js.map} +0 -0
- /package/dist/{chunk-G7RDYYTE.js.map → chunk-XW5LZYV4.js.map} +0 -0
- /package/dist/{chunk-LIP6JWYK.js.map → chunk-YTCCC6NG.js.map} +0 -0
- /package/dist/{chunk-G4MGYGSS.js.map → chunk-ZRJBLWKQ.js.map} +0 -0
- /package/dist/{collection-facade-MKEBZDWW.js.map → collection-facade-5V3JS7SD.js.map} +0 -0
- /package/dist/{computed-BMMEFRFJ.js.map → computed-6FOFXQPE.js.map} +0 -0
- /package/dist/{config-drift-KGM7ZRW4.js.map → config-drift-SWZNEH5H.js.map} +0 -0
- /package/dist/{delegation-BQNIEHZE.js.map → delegation-AUY42TGU.js.map} +0 -0
- /package/dist/{enclave-YN6223OG.js.map → derive-FWSEWWI7.js.map} +0 -0
- /package/dist/{executor-CBTNU5VZ.js.map → enclave-UYZGSE2C.js.map} +0 -0
- /package/dist/{executor-DJHNSTIR.js.map → executor-EUPYHCLU.js.map} +0 -0
- /package/dist/{executor-FGISLQIN.js.map → executor-KZ4B3PRT.js.map} +0 -0
- /package/dist/{export-accessible-P7SLRLK3.js.map → executor-XWPD5PIM.js.map} +0 -0
- /package/dist/{extract-partition-RNVSFHAB.js.map → export-accessible-M54OI6FO.js.map} +0 -0
- /package/dist/{find-RNBG7LBY.js.map → extract-partition-MIHAL6PP.js.map} +0 -0
- /package/dist/{fanout-sidecar-WS22Q5WH.js.map → fanout-sidecar-SSEW7BQB.js.map} +0 -0
- /package/dist/{issue-W5QG53B5.js.map → find-OH4BEULF.js.map} +0 -0
- /package/dist/{ledger-KZWBKAG5.js.map → issue-PHWTGH2G.js.map} +0 -0
- /package/dist/{liberate-GMGCHIND.js.map → ledger-IWWY7IIC.js.map} +0 -0
- /package/dist/{link-set-UQEIYQAM.js.map → liberate-QDTNV7SM.js.map} +0 -0
- /package/dist/{noydb-KS2O2MRI.js.map → link-set-HJOC7GB7.js.map} +0 -0
- /package/dist/{policy-YIKUH4AD.js.map → noydb-Y5L74IDJ.js.map} +0 -0
- /package/dist/{public-envelope-MRN5YYZZ.js.map → policy-3ZKSGSRK.js.map} +0 -0
- /package/dist/{register-K6DDSIXN.js.map → public-envelope-6UBQ4IUY.js.map} +0 -0
- /package/dist/{registry-IMNMHWTM.js.map → register-OVONZ2MJ.js.map} +0 -0
- /package/dist/{registry-K6VUQXKV.js.map → registry-AIEYUOSG.js.map} +0 -0
- /package/dist/{registry-ZVO3T4M5.js.map → registry-D5J7SVJ2.js.map} +0 -0
- /package/dist/{request-withdrawal-EHALV66Y.js.map → registry-HSNQ4NBP.js.map} +0 -0
- /package/dist/{revoke-MHAUAESM.js.map → request-withdrawal-IHF64VIT.js.map} +0 -0
- /package/dist/{reveal-TBLTFWQ2.js.map → reveal-B77Q2BJW.js.map} +0 -0
- /package/dist/{signer-PQ74YXRY.js.map → revoke-BPPOUZPE.js.map} +0 -0
- /package/dist/{stale-7Q62KVI3.js.map → satellites/index.js.map} +0 -0
- /package/dist/{storage-5E6YB2JY.js.map → signer-MNQEL27B.js.map} +0 -0
- /package/dist/{withdraw-accessible-JMX2TCPX.js.map → stale-COBBJORL.js.map} +0 -0
- /package/dist/{verify-YB5LQHNA.js.map → verify-CAYGXYNO.js.map} +0 -0
- /package/dist/{walk-5C3GPKT2.js.map → walk-CVNXFUEF.js.map} +0 -0
package/dist/team/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { je as TeamStrategy, cT as NoydbStore, cF as UnlockedKeyring } from '../index-
|
|
2
|
-
export { e1 as BundleRecipient, fz as EnrollAuthenticatorOptions, fA as EnrollAuthenticatorWrappingDEKsOptions, fB as EnrollAuthenticatorWrappingKEKOptions, gy as ListUsersOptions, h3 as NO_TEAM, hl as PaperRecoveryEntry, hx as PresenceHandle, h$ as RecoverPassphraseInput, i0 as RecoverPassphraseResult, i1 as RecoverUserOptions, i4 as RecoveryProof, ih as RotatePassphraseInput, iP as SlotRewrapCeremony, iQ as SlotRewrapContext, iZ as SyncEngine, j5 as SyncTransaction, jd as TeamNotEnabledError, jr as UpdateAuthenticatorOptions, jI as WrappedDeksBlob, jT as buildRecipientKeyringFile, jU as burnPaperRecoveryEntry, l7 as changeSecret, l8 as createOwnerKeyring, j_ as deriveMagicLinkContentKey, k2 as enrollAuthenticator, l9 as ensureCollectionDEK, k6 as evaluateExportCapability, k8 as evaluateImportCapability, kb as findAuthenticator, la as grant, kc as hasExportCapability, kd as hasImportCapability, kg as isMagicLinkGrantExpired, kp as listMagicLinkGrants, kq as listUsers, kr as listUsersWithEnvelopes, lb as loadKeyring, ku as loadPaperRecoveryEntries, kx as magicLinkGrantRecordId, ky as mintPaperRecoveryEntry, kA as mintWrappedDeksBlob, lc as persistKeyring, kF as readMagicLinkGrantRecord, km as recoverPassphrase, kH as recoverUser, kL as removeAuthenticator, ld as revoke, kR as revokeMagicLinkGrant, kn as rotatePassphrase, kT as savePaperRecoveryEntries, kX as unwrapDeksFromBlob, kY as unwrapDeksFromPaperEntry, k_ as unwrapMagicLinkGrant, le as updateAuthenticator, lf as updateKeyringIdentity, l6 as writeMagicLinkGrant } from '../index-
|
|
1
|
+
import { je as TeamStrategy, cT as NoydbStore, cF as UnlockedKeyring } from '../index-B-LKCpm6.js';
|
|
2
|
+
export { e1 as BundleRecipient, fz as EnrollAuthenticatorOptions, fA as EnrollAuthenticatorWrappingDEKsOptions, fB as EnrollAuthenticatorWrappingKEKOptions, gy as ListUsersOptions, h3 as NO_TEAM, hl as PaperRecoveryEntry, hx as PresenceHandle, h$ as RecoverPassphraseInput, i0 as RecoverPassphraseResult, i1 as RecoverUserOptions, i4 as RecoveryProof, ih as RotatePassphraseInput, iP as SlotRewrapCeremony, iQ as SlotRewrapContext, iZ as SyncEngine, j5 as SyncTransaction, jd as TeamNotEnabledError, jr as UpdateAuthenticatorOptions, jI as WrappedDeksBlob, jT as buildRecipientKeyringFile, jU as burnPaperRecoveryEntry, l7 as changeSecret, l8 as createOwnerKeyring, j_ as deriveMagicLinkContentKey, k2 as enrollAuthenticator, l9 as ensureCollectionDEK, k6 as evaluateExportCapability, k8 as evaluateImportCapability, kb as findAuthenticator, la as grant, kc as hasExportCapability, kd as hasImportCapability, kg as isMagicLinkGrantExpired, kp as listMagicLinkGrants, kq as listUsers, kr as listUsersWithEnvelopes, lb as loadKeyring, ku as loadPaperRecoveryEntries, kx as magicLinkGrantRecordId, ky as mintPaperRecoveryEntry, kA as mintWrappedDeksBlob, lc as persistKeyring, kF as readMagicLinkGrantRecord, km as recoverPassphrase, kH as recoverUser, kL as removeAuthenticator, ld as revoke, kR as revokeMagicLinkGrant, kn as rotatePassphrase, kT as savePaperRecoveryEntries, kX as unwrapDeksFromBlob, kY as unwrapDeksFromPaperEntry, k_ as unwrapMagicLinkGrant, le as updateAuthenticator, lf as updateKeyringIdentity, l6 as writeMagicLinkGrant } from '../index-B-LKCpm6.js';
|
|
3
3
|
import '../subject-index-O75wKshW.js';
|
|
4
4
|
import '../describe-C6iHNlqJ.js';
|
|
5
5
|
import '../index-B9QdHytu.js';
|
|
@@ -19,6 +19,33 @@ import '@noy-db/attestation';
|
|
|
19
19
|
|
|
20
20
|
declare function withTeam(): TeamStrategy;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Secret-bearing reserved collections — the `_`-prefixed reserved collections
|
|
24
|
+
* whose record CONTENTS are directly-usable secrets (transport OAuth tokens,
|
|
25
|
+
* connection strings, API keys), as opposed to the *operational* reserved
|
|
26
|
+
* collections (`_ledger`, `_history`, `_sync`, …) whose contents are metadata
|
|
27
|
+
* (collection names, record ids, ciphertext hashes).
|
|
28
|
+
*
|
|
29
|
+
* This distinction matters at two trust-boundary seams:
|
|
30
|
+
*
|
|
31
|
+
* 1. `vault.collection()` — a secret-bearing reserved name must never be
|
|
32
|
+
* reachable through the generic public collection handle. It is served
|
|
33
|
+
* ONLY by its dedicated, role-gated API (e.g. `_sync_credentials` →
|
|
34
|
+
* `getCredential`/`putCredential`, which enforce owner/admin access).
|
|
35
|
+
*
|
|
36
|
+
* 2. `grant()` DEK propagation — a sub-admin grantee (operator, viewer,
|
|
37
|
+
* client, custodian) must NOT receive a secret-bearing collection's DEK.
|
|
38
|
+
* Operational reserved DEKs still propagate to every role (grantees must
|
|
39
|
+
* write ledger/history entries on every mutation), but handing a
|
|
40
|
+
* sub-admin the `_sync_credentials` DEK would let them decrypt the firm's
|
|
41
|
+
* transport secrets — a plaintext leak, not a metadata leak.
|
|
42
|
+
*
|
|
43
|
+
* Kept dependency-free so both the kernel (`vault.ts`) and the team layer
|
|
44
|
+
* (`keyring.ts`) can import it without an import cycle.
|
|
45
|
+
*/
|
|
46
|
+
/** Reserved collection holding per-adapter sync transport secrets. */
|
|
47
|
+
declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
|
|
48
|
+
|
|
22
49
|
/**
|
|
23
50
|
* _sync_credentials reserved collection —
|
|
24
51
|
*
|
|
@@ -58,8 +85,6 @@ declare function withTeam(): TeamStrategy;
|
|
|
58
85
|
* against the caller's keyring role at call time.
|
|
59
86
|
*/
|
|
60
87
|
|
|
61
|
-
/** The reserved collection name. Never collides with user collections. */
|
|
62
|
-
declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
|
|
63
88
|
/**
|
|
64
89
|
* An OAuth/auth token stored in `_sync_credentials`.
|
|
65
90
|
*
|
package/dist/team/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
SYNC_CREDENTIALS_COLLECTION,
|
|
3
2
|
credentialStatus,
|
|
4
3
|
deleteCredential,
|
|
5
4
|
getCredential,
|
|
6
5
|
listCredentials,
|
|
7
6
|
putCredential,
|
|
8
7
|
withTeam
|
|
9
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-ZHK3F5RB.js";
|
|
10
9
|
import {
|
|
11
10
|
NO_TEAM,
|
|
12
11
|
deriveMagicLinkContentKey,
|
|
@@ -24,7 +23,7 @@ import {
|
|
|
24
23
|
unwrapMagicLinkGrant,
|
|
25
24
|
updateAuthenticator,
|
|
26
25
|
writeMagicLinkGrant
|
|
27
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-UZZFV3O3.js";
|
|
28
27
|
import {
|
|
29
28
|
burnPaperRecoveryEntry,
|
|
30
29
|
loadPaperRecoveryEntries,
|
|
@@ -33,15 +32,16 @@ import {
|
|
|
33
32
|
savePaperRecoveryEntries,
|
|
34
33
|
unwrapDeksFromBlob,
|
|
35
34
|
unwrapDeksFromPaperEntry
|
|
36
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-3UUXDQPM.js";
|
|
37
36
|
import {
|
|
38
37
|
PresenceHandle,
|
|
39
38
|
SyncEngine,
|
|
40
39
|
SyncTransaction
|
|
41
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-YXGIPYH4.js";
|
|
42
41
|
import "../chunk-VQNJ7UZL.js";
|
|
43
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-26FSVNBL.js";
|
|
44
43
|
import {
|
|
44
|
+
SYNC_CREDENTIALS_COLLECTION,
|
|
45
45
|
buildRecipientKeyringFile,
|
|
46
46
|
changeSecret,
|
|
47
47
|
createOwnerKeyring,
|
|
@@ -57,19 +57,19 @@ import {
|
|
|
57
57
|
persistKeyring,
|
|
58
58
|
revoke,
|
|
59
59
|
updateKeyringIdentity
|
|
60
|
-
} from "../chunk-
|
|
61
|
-
import "../chunk-
|
|
62
|
-
import "../chunk-
|
|
60
|
+
} from "../chunk-WAL4MRBK.js";
|
|
61
|
+
import "../chunk-C6A2DPRE.js";
|
|
62
|
+
import "../chunk-7AGLCOYE.js";
|
|
63
63
|
import "../chunk-QKVILR7N.js";
|
|
64
|
+
import "../chunk-5UOPIPZC.js";
|
|
65
|
+
import "../chunk-UWZ7O4NR.js";
|
|
64
66
|
import "../chunk-LN22XH4B.js";
|
|
65
|
-
import "../chunk-
|
|
66
|
-
import "../chunk-TCIUO62Z.js";
|
|
67
|
-
import "../chunk-UOEWDCUX.js";
|
|
67
|
+
import "../chunk-VFQOE76I.js";
|
|
68
68
|
import "../chunk-LP7BEXCT.js";
|
|
69
|
-
import "../chunk-
|
|
69
|
+
import "../chunk-5HZULLHE.js";
|
|
70
70
|
import {
|
|
71
71
|
TeamNotEnabledError
|
|
72
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-OJ64XMPJ.js";
|
|
73
73
|
import "../chunk-PZ5AY32C.js";
|
|
74
74
|
export {
|
|
75
75
|
NO_TEAM,
|
package/dist/tiers/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { lm as NO_TIERS, ln as TiersContext, ji as TiersNotEnabledError, lo as TiersStrategy, lp as assertDeclaredTier, lq as assertTiersEnabled, lr as classifySealedShred, ls as demote, lt as elevate, lu as getAtTier, lv as listAtTier, lw as putAtTier, lx as withTiers } from '../index-
|
|
1
|
+
export { lm as NO_TIERS, ln as TiersContext, ji as TiersNotEnabledError, lo as TiersStrategy, lp as assertDeclaredTier, lq as assertTiersEnabled, lr as classifySealedShred, ls as demote, lt as elevate, lu as getAtTier, lv as listAtTier, lw as putAtTier, lx as withTiers } from '../index-B-LKCpm6.js';
|
|
2
2
|
import '../subject-index-O75wKshW.js';
|
|
3
3
|
import '../describe-C6iHNlqJ.js';
|
|
4
4
|
import '../index-B9QdHytu.js';
|
package/dist/tiers/index.js
CHANGED
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
listAtTier,
|
|
10
10
|
putAtTier,
|
|
11
11
|
withTiers
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-7A7LTSJR.js";
|
|
13
|
+
import "../chunk-26FSVNBL.js";
|
|
14
|
+
import "../chunk-7AGLCOYE.js";
|
|
15
15
|
import "../chunk-QKVILR7N.js";
|
|
16
|
+
import "../chunk-5UOPIPZC.js";
|
|
17
|
+
import "../chunk-UWZ7O4NR.js";
|
|
16
18
|
import "../chunk-LN22XH4B.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-TCIUO62Z.js";
|
|
19
|
-
import "../chunk-UOEWDCUX.js";
|
|
19
|
+
import "../chunk-VFQOE76I.js";
|
|
20
20
|
import "../chunk-LP7BEXCT.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-5HZULLHE.js";
|
|
22
22
|
import {
|
|
23
23
|
TiersNotEnabledError
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-OJ64XMPJ.js";
|
|
25
25
|
import "../chunk-PZ5AY32C.js";
|
|
26
26
|
export {
|
|
27
27
|
NO_TIERS,
|
package/dist/to/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { dq as BundleVersionConflictError, f0 as ConflictError, cV as EncryptedEnvelope, gx as ListPageResult, h4 as NetworkError, ha as NoydbBundleStore, bX as NoydbPodStore, cT as NoydbStore, du as PodVersionConflictError, iW as StoreCapabilities, iX as StoreCapabilityError, iY as StoreTime, jm as TxOp, jB as VaultSnapshot } from '../index-
|
|
1
|
+
export { dq as BundleVersionConflictError, f0 as ConflictError, cV as EncryptedEnvelope, gx as ListPageResult, h4 as NetworkError, ha as NoydbBundleStore, bX as NoydbPodStore, cT as NoydbStore, du as PodVersionConflictError, iW as StoreCapabilities, iX as StoreCapabilityError, iY as StoreTime, jm as TxOp, jB as VaultSnapshot } from '../index-B-LKCpm6.js';
|
|
2
2
|
import '../subject-index-O75wKshW.js';
|
|
3
3
|
import '../describe-C6iHNlqJ.js';
|
|
4
4
|
import '../index-B9QdHytu.js';
|
package/dist/to/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bJ as GuardStrategy, bP as GuardStrategyHandle, bK as GuardChange, bL as GuardContext } from './index-
|
|
1
|
+
import { bJ as GuardStrategy, bP as GuardStrategyHandle, bK as GuardChange, bL as GuardContext } from './index-B-LKCpm6.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Register a guard for a collection. Guards run on every `put()` /
|
package/dist/tx/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jj as TransactionInvariant, lh as TxStrategy } from '../index-
|
|
2
|
-
export { li as AmendmentTxOptions, jl as TxCollection, e4 as TxContext, jn as TxVault, kS as runTransaction } from '../index-
|
|
1
|
+
import { jj as TransactionInvariant, lh as TxStrategy } from '../index-B-LKCpm6.js';
|
|
2
|
+
export { li as AmendmentTxOptions, jl as TxCollection, e4 as TxContext, jn as TxVault, kS as runTransaction } from '../index-B-LKCpm6.js';
|
|
3
3
|
import '../subject-index-O75wKshW.js';
|
|
4
4
|
import '../describe-C6iHNlqJ.js';
|
|
5
5
|
import '../index-B9QdHytu.js';
|
package/dist/tx/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
TxContext,
|
|
4
4
|
TxVault,
|
|
5
5
|
runTransaction
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-FCOZ7DEC.js";
|
|
7
7
|
import "../chunk-ZJADGNYF.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-OJ64XMPJ.js";
|
|
9
9
|
import "../chunk-PZ5AY32C.js";
|
|
10
10
|
|
|
11
11
|
// src/with-commit/tx/dry-run.ts
|
|
@@ -44,7 +44,7 @@ async function runDryRun(db, fn) {
|
|
|
44
44
|
const gctx = { existing: before, vault: facade, userId: v.userId, role: v.role };
|
|
45
45
|
try {
|
|
46
46
|
await registry.runChecks(op.collectionName, after, gctx);
|
|
47
|
-
const { GuardExecutor } = await import("../executor-
|
|
47
|
+
const { GuardExecutor } = await import("../executor-KZ4B3PRT.js");
|
|
48
48
|
for (const g of guards) {
|
|
49
49
|
await GuardExecutor.checkFrozenFields(g, op.id, before, after);
|
|
50
50
|
}
|
package/dist/util/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dO as ClassifiedEntry, dL as ClassifiedFieldSpec, dP as ClassifiedGroup } from './index-
|
|
1
|
+
import { dO as ClassifiedEntry, dL as ClassifiedFieldSpec, dP as ClassifiedGroup } from './index-B-LKCpm6.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Configuration/write errors for classified fields. @module
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
blindedEqual,
|
|
3
3
|
evaluateKofN,
|
|
4
4
|
openVdigPayload
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5UOPIPZC.js";
|
|
6
6
|
import {
|
|
7
7
|
dualReadSealedSlot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UWZ7O4NR.js";
|
|
9
9
|
import {
|
|
10
10
|
VDIG_ITERATIONS,
|
|
11
11
|
normalizeForVerify,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
base64ToBuffer,
|
|
16
16
|
generateSalt
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5HZULLHE.js";
|
|
18
18
|
import {
|
|
19
19
|
ClassifiedConfigError,
|
|
20
20
|
ClassifiedVerifyError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OJ64XMPJ.js";
|
|
22
22
|
import "./chunk-PZ5AY32C.js";
|
|
23
23
|
|
|
24
24
|
// src/kernel/enclave/classify/verify.ts
|
|
@@ -136,4 +136,4 @@ export {
|
|
|
136
136
|
verifyDigestField,
|
|
137
137
|
verifyTextField
|
|
138
138
|
};
|
|
139
|
-
//# sourceMappingURL=verify-
|
|
139
|
+
//# sourceMappingURL=verify-CAYGXYNO.js.map
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-TQ3REHVF.js";
|
|
4
4
|
import {
|
|
5
5
|
derivePersistedSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-55LSDABW.js";
|
|
7
7
|
import {
|
|
8
8
|
loadPersistedSchema
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-BYS45GOJ.js";
|
|
10
|
+
import "./chunk-7AGLCOYE.js";
|
|
11
11
|
import "./chunk-QKVILR7N.js";
|
|
12
|
+
import "./chunk-5UOPIPZC.js";
|
|
13
|
+
import "./chunk-UWZ7O4NR.js";
|
|
12
14
|
import "./chunk-LN22XH4B.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-TCIUO62Z.js";
|
|
15
|
-
import "./chunk-UOEWDCUX.js";
|
|
15
|
+
import "./chunk-VFQOE76I.js";
|
|
16
16
|
import "./chunk-LP7BEXCT.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-5HZULLHE.js";
|
|
18
|
+
import "./chunk-OJ64XMPJ.js";
|
|
19
19
|
import "./chunk-PZ5AY32C.js";
|
|
20
20
|
|
|
21
21
|
// src/with-shape/introspection/walk.ts
|
|
@@ -238,4 +238,4 @@ function summariseAggregateOp(value) {
|
|
|
238
238
|
export {
|
|
239
239
|
dumpVaultSchema
|
|
240
240
|
};
|
|
241
|
-
//# sourceMappingURL=walk-
|
|
241
|
+
//# sourceMappingURL=walk-CVNXFUEF.js.map
|
package/dist/with/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { U as Unsubscribe, W as WriteEvent, a as WriteHook, b as WriteHookRegistry } from '../index-B9QdHytu.js';
|
|
2
|
-
import { cF as UnlockedKeyring, cG as ExportFormat } from '../index-
|
|
3
|
-
export { cH as BusHandler, cI as GateDeleteEvent, cJ as GateEventMap, cK as GateHandler, cL as GatePoint, cM as GatePutEvent, cN as LifecycleEventMap, cO as LifecyclePoint, cP as ServiceBus, cQ as SubsystemBus } from '../index-
|
|
2
|
+
import { cF as UnlockedKeyring, cG as ExportFormat } from '../index-B-LKCpm6.js';
|
|
3
|
+
export { cH as BusHandler, cI as GateDeleteEvent, cJ as GateEventMap, cK as GateHandler, cL as GatePoint, cM as GatePutEvent, cN as LifecycleEventMap, cO as LifecyclePoint, cP as ServiceBus, cQ as SubsystemBus } from '../index-B-LKCpm6.js';
|
|
4
4
|
import '../subject-index-O75wKshW.js';
|
|
5
5
|
import '../describe-C6iHNlqJ.js';
|
|
6
6
|
import '@noy-db/attestation';
|
package/dist/with/index.js
CHANGED
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
assertCanImport,
|
|
7
7
|
canExport,
|
|
8
8
|
canImport
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-NL4HVTNO.js";
|
|
10
|
+
import "../chunk-WAL4MRBK.js";
|
|
11
|
+
import "../chunk-C6A2DPRE.js";
|
|
12
|
+
import "../chunk-7AGLCOYE.js";
|
|
13
13
|
import "../chunk-QKVILR7N.js";
|
|
14
|
+
import "../chunk-5UOPIPZC.js";
|
|
15
|
+
import "../chunk-UWZ7O4NR.js";
|
|
14
16
|
import "../chunk-LN22XH4B.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-TCIUO62Z.js";
|
|
17
|
-
import "../chunk-UOEWDCUX.js";
|
|
17
|
+
import "../chunk-VFQOE76I.js";
|
|
18
18
|
import "../chunk-LP7BEXCT.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-5HZULLHE.js";
|
|
20
|
+
import "../chunk-OJ64XMPJ.js";
|
|
21
21
|
import "../chunk-PZ5AY32C.js";
|
|
22
22
|
export {
|
|
23
23
|
ServiceBus,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cf as MaterializedViewStrategy, cg as MaterializedViewStrategyHandle } from './index-
|
|
1
|
+
import { cf as MaterializedViewStrategy, cg as MaterializedViewStrategyHandle } from './index-B-LKCpm6.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Register a materialized view: a declared query whose result is
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ch as OverlayedViewStrategy, cq as OverlayedViewStrategyHandle } from './index-
|
|
1
|
+
import { ch as OverlayedViewStrategy, cq as OverlayedViewStrategyHandle } from './index-B-LKCpm6.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Register a read-shadow overlay: bind an MV-owned base collection to
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c2 as DerivationStrategy, cb as DerivationStrategyHandle } from './index-
|
|
1
|
+
import { c2 as DerivationStrategy, cb as DerivationStrategyHandle } from './index-B-LKCpm6.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Register a deterministic derivation: one source collection → one or
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
freezeSnapshotOnly,
|
|
5
5
|
randomId,
|
|
6
6
|
withdrawAccessibleData
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-RIZQZKU6.js";
|
|
8
|
+
import "./chunk-C2ZKWL37.js";
|
|
9
|
+
import "./chunk-C57J6AWN.js";
|
|
10
|
+
import "./chunk-I7GTYPWF.js";
|
|
11
|
+
import "./chunk-7AGLCOYE.js";
|
|
12
12
|
import "./chunk-QKVILR7N.js";
|
|
13
|
+
import "./chunk-5UOPIPZC.js";
|
|
14
|
+
import "./chunk-UWZ7O4NR.js";
|
|
13
15
|
import "./chunk-LN22XH4B.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-TCIUO62Z.js";
|
|
16
|
-
import "./chunk-UOEWDCUX.js";
|
|
16
|
+
import "./chunk-VFQOE76I.js";
|
|
17
17
|
import "./chunk-LP7BEXCT.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5HZULLHE.js";
|
|
19
|
+
import "./chunk-OJ64XMPJ.js";
|
|
20
20
|
import "./chunk-PZ5AY32C.js";
|
|
21
21
|
export {
|
|
22
22
|
FROZEN_SNAPSHOTS_COLLECTION,
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
randomId,
|
|
26
26
|
withdrawAccessibleData
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=withdraw-accessible-
|
|
28
|
+
//# sourceMappingURL=withdraw-accessible-5ALN3ZGM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noy-db/hub",
|
|
3
|
-
"version": "0.3.0-pre.
|
|
3
|
+
"version": "0.3.0-pre.6",
|
|
4
4
|
"description": "Zero-knowledge, offline-first, encrypted document store — core library with AES-256-GCM, PBKDF2, multi-user keyring, and sync engine",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vLannaAi <vicio@lanna.ai>",
|
|
@@ -124,6 +124,10 @@
|
|
|
124
124
|
"types": "./dist/classified/index.d.ts",
|
|
125
125
|
"default": "./dist/classified/index.js"
|
|
126
126
|
},
|
|
127
|
+
"./satellites": {
|
|
128
|
+
"types": "./dist/satellites/index.d.ts",
|
|
129
|
+
"default": "./dist/satellites/index.js"
|
|
130
|
+
},
|
|
127
131
|
"./tiers": {
|
|
128
132
|
"types": "./dist/tiers/index.d.ts",
|
|
129
133
|
"default": "./dist/tiers/index.js"
|
|
@@ -196,14 +200,14 @@
|
|
|
196
200
|
"node": ">=22.0.0"
|
|
197
201
|
},
|
|
198
202
|
"dependencies": {
|
|
199
|
-
"@noy-db/attestation": "0.3.0-pre.
|
|
203
|
+
"@noy-db/attestation": "0.3.0-pre.6"
|
|
200
204
|
},
|
|
201
205
|
"devDependencies": {
|
|
202
206
|
"@types/node": "^22.0.0",
|
|
203
207
|
"esbuild": "^0.25.0",
|
|
204
208
|
"zod": "^4.0.0",
|
|
205
209
|
"zod-to-json-schema": "^3.25.2",
|
|
206
|
-
"@noy-db/on-shamir": "0.3.0-pre.
|
|
210
|
+
"@noy-db/on-shamir": "0.3.0-pre.6"
|
|
207
211
|
},
|
|
208
212
|
"peerDependencies": {
|
|
209
213
|
"zod-to-json-schema": "^3.25.0"
|
package/dist/api-JOXUNSKP.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
UserApi,
|
|
3
|
-
createUserApi
|
|
4
|
-
} from "./chunk-A5DYVMDR.js";
|
|
5
|
-
import "./chunk-TB5RNNJ4.js";
|
|
6
|
-
import "./chunk-OVO2RZAE.js";
|
|
7
|
-
import "./chunk-QKVILR7N.js";
|
|
8
|
-
import "./chunk-LN22XH4B.js";
|
|
9
|
-
import "./chunk-PGFY7IRW.js";
|
|
10
|
-
import "./chunk-TCIUO62Z.js";
|
|
11
|
-
import "./chunk-UOEWDCUX.js";
|
|
12
|
-
import "./chunk-LP7BEXCT.js";
|
|
13
|
-
import "./chunk-TLJOJBZD.js";
|
|
14
|
-
import "./chunk-U23JUUPX.js";
|
|
15
|
-
import "./chunk-PZ5AY32C.js";
|
|
16
|
-
export {
|
|
17
|
-
UserApi,
|
|
18
|
-
createUserApi
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=api-JOXUNSKP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-shape/persisted-schemas/storage.ts"],"sourcesContent":["/**\n * Read / write the per-collection persisted-schema envelope. Mirrors the\n * standard noy-db record envelope shape and is **AES-GCM encrypted with\n * the collection's DEK** — the schema body (field names, enum values,\n * constraints) is sensitive metadata, so it gets the same encryption\n * envelope as the records it describes.\n *\n * Storage layout:\n *\n * <vault>/_schemas/<collection> → EncryptedEnvelope\n *\n * The DEK passed to {@link savePersistedSchema} / {@link loadPersistedSchema}\n * is the same key the collection uses for its records.\n *\n * @module\n */\n\nimport { encrypt, openEnvelopeJson, type EnclaveKey } from '../../kernel/enclave/index.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport type { PersistedSchemaEnvelope } from './types.js'\n\n/** Reserved collection name where persisted schemas live. */\nexport const SCHEMAS_COLLECTION = '_schemas' as const\n\n/**\n * Read and decrypt the persisted-schema envelope for one collection.\n * Returns `undefined` when no envelope has been written or when decryption\n * fails (e.g. wrong DEK passed). Tolerates corrupted records — JSON parse\n * failures surface as `undefined`, mirroring `_meta/handle`'s contract.\n */\nexport async function loadPersistedSchema(\n store: NoydbStore,\n vault: string,\n collection: string,\n dek: EnclaveKey,\n): Promise<PersistedSchemaEnvelope | undefined> {\n const envelope = await store.get(vault, SCHEMAS_COLLECTION, collection)\n if (!envelope) return undefined\n try {\n const plaintext = await openEnvelopeJson(envelope, dek)\n const parsed = JSON.parse(plaintext) as PersistedSchemaEnvelope\n if (parsed._noydb_schema !== 1) return undefined\n return parsed\n } catch {\n return undefined\n }\n}\n\n/**\n * Encrypt and persist a schema envelope for one collection. Always\n * overwrites any prior write (callers gate on hash equality before calling\n * to avoid no-op writes).\n */\nexport async function savePersistedSchema(\n store: NoydbStore,\n vault: string,\n collection: string,\n dek: EnclaveKey,\n payload: PersistedSchemaEnvelope,\n): Promise<void> {\n const json = JSON.stringify(payload)\n const { iv, data } = await encrypt(json, dek)\n const prior = await store.get(vault, SCHEMAS_COLLECTION, collection)\n const env: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: (prior?._v ?? 0) + 1,\n _ts: new Date().toISOString(),\n _iv: iv,\n _data: data,\n }\n await store.put(vault, SCHEMAS_COLLECTION, collection, env)\n}\n"],"mappings":";;;;;;;;;;;AAuBO,IAAM,qBAAqB;AAQlC,eAAsB,oBACpB,OACA,OACA,YACA,KAC8C;AAC9C,QAAM,WAAW,MAAM,MAAM,IAAI,OAAO,oBAAoB,UAAU;AACtE,MAAI,CAAC,SAAU,QAAO;AACtB,MAAI;AACF,UAAM,YAAY,MAAM,iBAAiB,UAAU,GAAG;AACtD,UAAM,SAAS,KAAK,MAAM,SAAS;AACnC,QAAI,OAAO,kBAAkB,EAAG,QAAO;AACvC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAOA,eAAsB,oBACpB,OACA,OACA,YACA,KACA,SACe;AACf,QAAM,OAAO,KAAK,UAAU,OAAO;AACnC,QAAM,EAAE,IAAI,KAAK,IAAI,MAAM,QAAQ,MAAM,GAAG;AAC5C,QAAM,QAAQ,MAAM,MAAM,IAAI,OAAO,oBAAoB,UAAU;AACnE,QAAM,MAAyB;AAAA,IAC7B,QAAQ;AAAA,IACR,KAAK,OAAO,MAAM,KAAK;AAAA,IACvB,MAAK,oBAAI,KAAK,GAAE,YAAY;AAAA,IAC5B,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AACA,QAAM,MAAM,IAAI,OAAO,oBAAoB,YAAY,GAAG;AAC5D;","names":[]}
|
package/dist/chunk-KYY7L72M.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
canonicalize,
|
|
3
|
-
derivePersistedSchema
|
|
4
|
-
} from "./chunk-ULIHDPKL.js";
|
|
5
|
-
import {
|
|
6
|
-
loadPersistedSchema,
|
|
7
|
-
savePersistedSchema
|
|
8
|
-
} from "./chunk-CPXPHQGX.js";
|
|
9
|
-
|
|
10
|
-
// src/with-shape/schema-update/delta.ts
|
|
11
|
-
function computeSchemaDelta(stored, fresh, collection) {
|
|
12
|
-
const a = stored;
|
|
13
|
-
const b = fresh;
|
|
14
|
-
const aProps = a.properties ?? {};
|
|
15
|
-
const bProps = b.properties ?? {};
|
|
16
|
-
const aReq = new Set(a.required ?? []);
|
|
17
|
-
const bReq = new Set(b.required ?? []);
|
|
18
|
-
const aKeys = Object.keys(aProps);
|
|
19
|
-
const bKeys = Object.keys(bProps);
|
|
20
|
-
const added = bKeys.filter((k) => !(k in aProps));
|
|
21
|
-
const removed = aKeys.filter((k) => !(k in bProps));
|
|
22
|
-
const changed = [];
|
|
23
|
-
for (const k of bKeys) {
|
|
24
|
-
if (!(k in aProps)) continue;
|
|
25
|
-
const shapeChanged = canonicalize(aProps[k]) !== canonicalize(bProps[k]);
|
|
26
|
-
const requiredChanged = aReq.has(k) !== bReq.has(k);
|
|
27
|
-
if (shapeChanged || requiredChanged) {
|
|
28
|
-
changed.push({ field: k, requiredChanged, shapeChanged });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
let kind;
|
|
32
|
-
if (added.length === 0 && removed.length === 0 && changed.length === 0) {
|
|
33
|
-
kind = "none";
|
|
34
|
-
} else if (removed.length === 0 && changed.length === 0 && added.every((k) => !bReq.has(k))) {
|
|
35
|
-
kind = "additive";
|
|
36
|
-
} else {
|
|
37
|
-
kind = "non-additive";
|
|
38
|
-
}
|
|
39
|
-
return { collection, kind, added, removed, changed };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// src/with-shape/schema-update/dispatch.ts
|
|
43
|
-
async function evaluateStrategies(delta, strategies, ctx) {
|
|
44
|
-
for (const strategy of strategies) {
|
|
45
|
-
const decision = await strategy.onSchemaDelta(delta, ctx);
|
|
46
|
-
if (decision.action !== "allow") return decision;
|
|
47
|
-
}
|
|
48
|
-
return { action: "allow" };
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// src/with-shape/persisted-schemas/register.ts
|
|
52
|
-
async function persistSchemaIfNeeded(opts) {
|
|
53
|
-
const fresh = await derivePersistedSchema(opts.validator);
|
|
54
|
-
const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek);
|
|
55
|
-
if (stored && isEquivalent(stored, fresh)) {
|
|
56
|
-
return { written: false, skipped: true, envelope: stored, decision: { action: "allow" } };
|
|
57
|
-
}
|
|
58
|
-
let decision = { action: "allow" };
|
|
59
|
-
const strategies = opts.strategies ?? [];
|
|
60
|
-
if (stored && strategies.length > 0 && stored.kind === fresh.kind && isPlainObject(stored.jsonSchema) && isPlainObject(fresh.jsonSchema)) {
|
|
61
|
-
const delta = computeSchemaDelta(stored.jsonSchema, fresh.jsonSchema, opts.collectionName);
|
|
62
|
-
decision = await evaluateStrategies(delta, strategies, { collection: opts.collectionName });
|
|
63
|
-
}
|
|
64
|
-
if (decision.action !== "allow") {
|
|
65
|
-
return { written: false, skipped: false, envelope: stored ?? fresh, decision };
|
|
66
|
-
}
|
|
67
|
-
const toSave = stored?.classified !== void 0 ? { ...fresh, classified: stored.classified } : fresh;
|
|
68
|
-
await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, toSave);
|
|
69
|
-
return { written: true, skipped: false, envelope: toSave, decision };
|
|
70
|
-
}
|
|
71
|
-
async function persistClassifiedMarker(opts) {
|
|
72
|
-
const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek);
|
|
73
|
-
if (stored?.classified !== void 0 && markersEqual(stored.classified, opts.marker)) return;
|
|
74
|
-
const payload = stored !== void 0 ? { ...stored, classified: opts.marker } : {
|
|
75
|
-
_noydb_schema: 1,
|
|
76
|
-
kind: "Unknown",
|
|
77
|
-
jsonSchema: null,
|
|
78
|
-
hash: null,
|
|
79
|
-
derivedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
80
|
-
classified: opts.marker
|
|
81
|
-
};
|
|
82
|
-
await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, payload);
|
|
83
|
-
}
|
|
84
|
-
function markersEqual(a, b) {
|
|
85
|
-
return sameSet(a.digestOnly, b.digestOnly) && sameSet(a.equatable, b.equatable);
|
|
86
|
-
}
|
|
87
|
-
function sameSet(a, b) {
|
|
88
|
-
if (a.length !== b.length) return false;
|
|
89
|
-
const s = new Set(a);
|
|
90
|
-
return b.every((x) => s.has(x));
|
|
91
|
-
}
|
|
92
|
-
function isPlainObject(v) {
|
|
93
|
-
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
94
|
-
}
|
|
95
|
-
function isEquivalent(a, b) {
|
|
96
|
-
if (a.kind !== b.kind) return false;
|
|
97
|
-
if (a.hash && b.hash) return a.hash === b.hash;
|
|
98
|
-
if (a.hash === null && b.hash === null) return true;
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export {
|
|
103
|
-
persistSchemaIfNeeded,
|
|
104
|
-
persistClassifiedMarker
|
|
105
|
-
};
|
|
106
|
-
//# sourceMappingURL=chunk-KYY7L72M.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-shape/schema-update/delta.ts","../src/with-shape/schema-update/dispatch.ts","../src/with-shape/persisted-schemas/register.ts"],"sourcesContent":["/**\n * Classify the difference between two derived JSON Schemas.\n *\n * v1 ruleset — top-level object properties + required-ness:\n * - additive ⇔ only new OPTIONAL properties (no removals, no changed\n * properties, no new required field, no required-ness flip)\n * - non-additive ⇔ any removal, any shape/type change, any required-ness\n * flip, or a new REQUIRED property\n * Deeper rules (nested objects, union widening, type narrowing) are\n * deferred. Callers only invoke this with two object schemas.\n */\nimport { canonicalize } from '../persisted-schemas/canonicalize.js'\nimport type { SchemaDelta, FieldChange } from './types.js'\n\ninterface ObjectSchema {\n readonly properties?: Record<string, unknown>\n readonly required?: readonly string[]\n}\n\nexport function computeSchemaDelta(\n stored: object,\n fresh: object,\n collection: string,\n): SchemaDelta {\n const a = stored as ObjectSchema\n const b = fresh as ObjectSchema\n const aProps = a.properties ?? {}\n const bProps = b.properties ?? {}\n const aReq = new Set(a.required ?? [])\n const bReq = new Set(b.required ?? [])\n\n const aKeys = Object.keys(aProps)\n const bKeys = Object.keys(bProps)\n\n const added = bKeys.filter(k => !(k in aProps))\n const removed = aKeys.filter(k => !(k in bProps))\n\n const changed: FieldChange[] = []\n for (const k of bKeys) {\n if (!(k in aProps)) continue\n const shapeChanged = canonicalize(aProps[k]) !== canonicalize(bProps[k])\n const requiredChanged = aReq.has(k) !== bReq.has(k)\n if (shapeChanged || requiredChanged) {\n changed.push({ field: k, requiredChanged, shapeChanged })\n }\n }\n\n let kind: SchemaDelta['kind']\n if (added.length === 0 && removed.length === 0 && changed.length === 0) {\n kind = 'none'\n } else if (\n removed.length === 0 &&\n changed.length === 0 &&\n added.every(k => !bReq.has(k))\n ) {\n kind = 'additive'\n } else {\n kind = 'non-additive'\n }\n\n return { collection, kind, added, removed, changed }\n}\n","/** Ordered strategy evaluation: first non-`allow` decision wins. */\nimport type { SchemaDelta, SchemaUpdateStrategy, UpdateContext, UpdateDecision } from './types.js'\n\nexport async function evaluateStrategies(\n delta: SchemaDelta,\n strategies: readonly SchemaUpdateStrategy[],\n ctx: UpdateContext,\n): Promise<UpdateDecision> {\n for (const strategy of strategies) {\n const decision = await strategy.onSchemaDelta(delta, ctx)\n if (decision.action !== 'allow') return decision\n }\n return { action: 'allow' }\n}\n","/**\n * Orchestrate the derive → hash → skip-or-write cycle for a collection's\n * persisted JSON Schema. Called by the Vault at collection-registration\n * time when the developer opts in via `collection({ persistJsonSchema:\n * true })`.\n *\n * Skip semantics:\n *\n * - Zod validators: skip when the new hash equals the stored hash.\n * - Non-Zod (stub envelopes have hash=null): skip when the stored\n * envelope's `kind` matches the freshly-detected kind (since there's\n * no body to compare yet — a kind change is the only signal).\n *\n * @module\n */\n\nimport { derivePersistedSchema } from './derive.js'\nimport { loadPersistedSchema, savePersistedSchema } from './storage.js'\nimport { computeSchemaDelta } from '../schema-update/delta.js'\nimport { evaluateStrategies } from '../schema-update/dispatch.js'\nimport type { SchemaUpdateStrategy, UpdateDecision } from '../schema-update/types.js'\nimport type { NoydbStore, ClassifiedMarker } from '../../kernel/types.js'\nimport type { PersistedSchemaEnvelope } from './types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\n\nexport interface PersistSchemaResult {\n /** True when a fresh envelope was written to storage. */\n readonly written: boolean\n /** True when an existing envelope matched and the write was skipped. */\n readonly skipped: boolean\n /** The envelope that was either written or matched. */\n readonly envelope: PersistedSchemaEnvelope\n /** The update-strategy decision, present when strategies ran. */\n readonly decision?: UpdateDecision\n}\n\nexport async function persistSchemaIfNeeded(opts: {\n readonly store: NoydbStore\n readonly vault: string\n readonly collectionName: string\n readonly validator: unknown\n readonly dek: EnclaveKey\n readonly strategies?: readonly SchemaUpdateStrategy[]\n}): Promise<PersistSchemaResult> {\n const fresh = await derivePersistedSchema(opts.validator)\n const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek)\n\n if (stored && isEquivalent(stored, fresh)) {\n return { written: false, skipped: true, envelope: stored, decision: { action: 'allow' } }\n }\n\n // Changed (or first registration). Run update strategies only when we\n // have a comparable JSON-Schema baseline and strategies were registered.\n let decision: UpdateDecision = { action: 'allow' }\n const strategies = opts.strategies ?? []\n if (\n stored &&\n strategies.length > 0 &&\n stored.kind === fresh.kind &&\n isPlainObject(stored.jsonSchema) &&\n isPlainObject(fresh.jsonSchema)\n ) {\n const delta = computeSchemaDelta(stored.jsonSchema, fresh.jsonSchema, opts.collectionName)\n decision = await evaluateStrategies(delta, strategies, { collection: opts.collectionName })\n }\n\n if (decision.action !== 'allow') {\n // reject (or cutover): do NOT overwrite the baseline — the\n // old schema stays the source of truth until the change is resolved.\n return { written: false, skipped: false, envelope: stored ?? fresh, decision }\n }\n\n // Preserve a previously-persisted classified marker (C-A / R10) — the schema\n // derivation knows nothing about it, so a naive overwrite here would drop the\n // config-drift guard's cross-session signal.\n const toSave: PersistedSchemaEnvelope =\n stored?.classified !== undefined ? { ...fresh, classified: stored.classified } : fresh\n await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, toSave)\n return { written: true, skipped: false, envelope: toSave, decision }\n}\n\n/**\n * Persist (or refresh) the C-A / R10 classified marker into the collection's\n * `_schemas/<collection>` record, preserving any existing derived JSON-Schema\n * body. Idempotent — a no-op when an equivalent marker is already stored.\n * Independent of `persistJsonSchema`: called on the first classified write so a\n * later naive handle can detect the drift cross-session.\n */\nexport async function persistClassifiedMarker(opts: {\n readonly store: NoydbStore\n readonly vault: string\n readonly collectionName: string\n readonly dek: EnclaveKey\n readonly marker: ClassifiedMarker\n}): Promise<void> {\n const stored = await loadPersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek)\n if (stored?.classified !== undefined && markersEqual(stored.classified, opts.marker)) return\n const payload: PersistedSchemaEnvelope =\n stored !== undefined\n ? { ...stored, classified: opts.marker }\n : {\n _noydb_schema: 1,\n kind: 'Unknown',\n jsonSchema: null,\n hash: null,\n derivedAt: new Date().toISOString(),\n classified: opts.marker,\n }\n await savePersistedSchema(opts.store, opts.vault, opts.collectionName, opts.dek, payload)\n}\n\nfunction markersEqual(a: ClassifiedMarker, b: ClassifiedMarker): boolean {\n return sameSet(a.digestOnly, b.digestOnly) && sameSet(a.equatable, b.equatable)\n}\n\nfunction sameSet(a: readonly string[], b: readonly string[]): boolean {\n if (a.length !== b.length) return false\n const s = new Set(a)\n return b.every((x) => s.has(x))\n}\n\nfunction isPlainObject(v: unknown): v is object {\n return typeof v === 'object' && v !== null && !Array.isArray(v)\n}\n\nfunction isEquivalent(a: PersistedSchemaEnvelope, b: PersistedSchemaEnvelope): boolean {\n if (a.kind !== b.kind) return false\n // Zod path: real hashes — compare directly.\n if (a.hash && b.hash) return a.hash === b.hash\n // Stub path: both have hash=null. Kind equality is the only signal we have.\n if (a.hash === null && b.hash === null) return true\n // Mixed (one has a hash, the other doesn't) — treat as changed.\n return false\n}\n"],"mappings":"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","names":[]}
|