@noy-db/hub 0.4.0-pre.1 → 0.4.0-pre.11
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/README.md +3 -4
- package/dist/api-ZDKTWNBB.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-LU2DTZTI.js → backup-2UX7PRM5.js} +13 -13
- package/dist/blobs/index.js +30 -15
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/broker/index.js.map +1 -1
- package/dist/cargo/index.js +53 -43
- package/dist/{chunk-YTGDPCPW.js → chunk-2J6UEN2V.js} +42 -18
- package/dist/chunk-2J6UEN2V.js.map +1 -0
- package/dist/{chunk-IY23KFNZ.js → chunk-35NMVJ7I.js} +3 -3
- package/dist/{chunk-S3BFKGET.js → chunk-3HUYRN24.js} +4 -4
- package/dist/chunk-3HUYRN24.js.map +1 -0
- package/dist/{walk-XS3PKM6I.js → chunk-3V3XR4S4.js} +4 -13
- package/dist/{walk-XS3PKM6I.js.map → chunk-3V3XR4S4.js.map} +1 -1
- package/dist/{chunk-RTEK4C4I.js → chunk-4JQK3L4V.js} +2 -2
- package/dist/{chunk-3ELCWU56.js → chunk-4ZKNC6A6.js} +2 -2
- package/dist/{chunk-VQNJ7UZL.js → chunk-55LKVALY.js} +106 -10
- package/dist/chunk-55LKVALY.js.map +1 -0
- package/dist/{chunk-VAIS3SOM.js → chunk-55LX6FSX.js} +2 -2
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-6HPG2YNX.js → chunk-5DRROK5W.js} +2 -2
- package/dist/{chunk-S6Q37VGE.js → chunk-5GQEU4DN.js} +2 -2
- package/dist/chunk-5JOFWL4G.js +25 -0
- package/dist/chunk-5JOFWL4G.js.map +1 -0
- package/dist/{chunk-TOPYT5U5.js → chunk-63FE525P.js} +6 -6
- package/dist/chunk-6LJY7X5A.js +18 -0
- package/dist/chunk-6LJY7X5A.js.map +1 -0
- package/dist/{chunk-JVBO4SZL.js → chunk-6UBZ6I5Z.js} +2 -2
- package/dist/{chunk-BOKIKJJB.js → chunk-6ZNSB3H6.js} +5 -17
- package/dist/chunk-6ZNSB3H6.js.map +1 -0
- package/dist/{chunk-BMQWTQZ4.js → chunk-7YVBQJ7K.js} +13 -355
- package/dist/chunk-7YVBQJ7K.js.map +1 -0
- package/dist/{chunk-UFEVO57O.js → chunk-ABS7FMMD.js} +6 -6
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-HOONYZY2.js → chunk-AKKRXT23.js} +7 -7
- package/dist/chunk-AKKRXT23.js.map +1 -0
- package/dist/{chunk-DDHM2TLX.js → chunk-AT2JJEKJ.js} +4 -4
- package/dist/chunk-AT2JJEKJ.js.map +1 -0
- package/dist/{chunk-M75ZZHSR.js → chunk-BLBAQRBM.js} +2 -2
- package/dist/{chunk-3SV2EPMN.js → chunk-BLCWSJLN.js} +88 -81
- package/dist/chunk-BLCWSJLN.js.map +1 -0
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-G6EQYAL6.js → chunk-CI32CAFS.js} +5 -5
- package/dist/{chunk-FH52K7EG.js → chunk-CUZLNGD5.js} +2 -6
- package/dist/{chunk-FH52K7EG.js.map → chunk-CUZLNGD5.js.map} +1 -1
- package/dist/{chunk-2P7EGNKF.js → chunk-CXQW2NWO.js} +145 -3
- package/dist/chunk-CXQW2NWO.js.map +1 -0
- package/dist/{chunk-6B4DYGWO.js → chunk-DABACXEF.js} +3 -3
- package/dist/{chunk-F6T6L2UK.js → chunk-DMH3VZU5.js} +4 -4
- package/dist/chunk-DSDXAKIP.js +50 -0
- package/dist/chunk-DSDXAKIP.js.map +1 -0
- package/dist/{chunk-MQ6WOPSY.js → chunk-DZ2JXHWK.js} +5 -5
- package/dist/chunk-DZFQVICS.js +23 -0
- package/dist/chunk-DZFQVICS.js.map +1 -0
- package/dist/chunk-E23UGFVC.js +63 -0
- package/dist/chunk-E23UGFVC.js.map +1 -0
- package/dist/{chunk-UBNCR3YK.js → chunk-EE7UHLKH.js} +4 -4
- package/dist/chunk-EIPVYUEP.js +654 -0
- package/dist/chunk-EIPVYUEP.js.map +1 -0
- package/dist/{chunk-EGCRBCNA.js → chunk-EKRSCRNM.js} +3 -3
- package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
- package/dist/chunk-FQ5CHJR7.js.map +1 -0
- package/dist/{chunk-LB6OH6K2.js → chunk-FQZ6XTQ7.js} +17 -20
- package/dist/chunk-FQZ6XTQ7.js.map +1 -0
- package/dist/{chunk-IRQY7IR5.js → chunk-FRMPM7WG.js} +4 -4
- package/dist/{chunk-DVUZMT2W.js → chunk-G2JUIDFA.js} +9 -9
- package/dist/{chunk-DVUZMT2W.js.map → chunk-G2JUIDFA.js.map} +1 -1
- package/dist/{chunk-RND5ZPNP.js → chunk-G6WWZNJP.js} +13 -13
- package/dist/chunk-G6WWZNJP.js.map +1 -0
- package/dist/chunk-GJW4HX2O.js +1 -0
- package/dist/{chunk-T6GU5PPZ.js → chunk-GU3IP74F.js} +6 -6
- package/dist/{chunk-5OI6BR4H.js → chunk-GWWOGNBK.js} +308 -18
- package/dist/chunk-GWWOGNBK.js.map +1 -0
- package/dist/{chunk-UNCOC7QH.js → chunk-H2GPHUZD.js} +12 -13
- package/dist/chunk-H2GPHUZD.js.map +1 -0
- package/dist/{chunk-7CI6CP7Z.js → chunk-HMU5P6RL.js} +5 -5
- package/dist/chunk-HMU5P6RL.js.map +1 -0
- package/dist/{chunk-YJV2UZ7H.js → chunk-I5GEJX3R.js} +5 -5
- package/dist/chunk-I5GEJX3R.js.map +1 -0
- package/dist/{chunk-GWKAVKHI.js → chunk-IG6KUWBX.js} +2 -2
- package/dist/chunk-IG6KUWBX.js.map +1 -0
- package/dist/{chunk-MTQPRQHB.js → chunk-IPUG56GJ.js} +15 -5
- package/dist/{chunk-MTQPRQHB.js.map → chunk-IPUG56GJ.js.map} +1 -1
- package/dist/{chunk-SMIRGMS7.js → chunk-IXNCZTWA.js} +2 -2
- package/dist/{chunk-RM2XV574.js → chunk-IXTSNGYY.js} +3 -3
- package/dist/{chunk-KUPKLSX5.js → chunk-IYZISPGD.js} +7 -5
- package/dist/chunk-IYZISPGD.js.map +1 -0
- package/dist/{chunk-SMGEYW6G.js → chunk-JDOMW53O.js} +26 -16
- package/dist/chunk-JDOMW53O.js.map +1 -0
- package/dist/{chunk-PK6QCH2C.js → chunk-JJZGIE4U.js} +6 -5
- package/dist/{chunk-DRWBEDYO.js → chunk-JYJFGD2H.js} +2 -2
- package/dist/{chunk-TAGR72IR.js → chunk-KRCBZYTZ.js} +26 -177
- package/dist/chunk-KRCBZYTZ.js.map +1 -0
- package/dist/{chunk-HPUWOVR7.js → chunk-L2DGWBCT.js} +14 -14
- package/dist/chunk-L2DGWBCT.js.map +1 -0
- package/dist/{chunk-VEALDPHW.js → chunk-L3YYLT4E.js} +15 -2
- package/dist/chunk-L3YYLT4E.js.map +1 -0
- package/dist/{chunk-A7JJLVGH.js → chunk-LNPUSMZL.js} +29 -31
- package/dist/chunk-LNPUSMZL.js.map +1 -0
- package/dist/{chunk-KUIB4B5Q.js → chunk-LNZKOUJR.js} +2 -2
- package/dist/{chunk-IM3QVF53.js → chunk-MBKVNOJS.js} +6 -6
- package/dist/chunk-MCHBCNCE.js +367 -0
- package/dist/chunk-MCHBCNCE.js.map +1 -0
- package/dist/{chunk-VCBHAE4R.js → chunk-MHMLXJ3I.js} +2 -2
- package/dist/chunk-MHMLXJ3I.js.map +1 -0
- package/dist/{chunk-WNGGJWF7.js → chunk-MSMJJB4J.js} +2 -2
- package/dist/chunk-MSMJJB4J.js.map +1 -0
- package/dist/{chunk-T36RFODW.js → chunk-MXUT7FTE.js} +2 -2
- package/dist/chunk-MXUT7FTE.js.map +1 -0
- package/dist/{chunk-BGK233EA.js → chunk-N4BBNYIB.js} +11 -9
- package/dist/chunk-N4BBNYIB.js.map +1 -0
- package/dist/{chunk-3PF6CRDT.js → chunk-NFIBXF4V.js} +1082 -1583
- package/dist/chunk-NFIBXF4V.js.map +1 -0
- package/dist/{chunk-LOF2W3JU.js → chunk-NFNJLRY7.js} +368 -52
- package/dist/chunk-NFNJLRY7.js.map +1 -0
- package/dist/{chunk-N6WF5PKC.js → chunk-NFZGZ4AK.js} +2 -2
- package/dist/{chunk-JRBNCUNT.js → chunk-NGSJZFGL.js} +21 -4
- package/dist/chunk-NGSJZFGL.js.map +1 -0
- package/dist/chunk-NJ4DYYO5.js +81 -0
- package/dist/chunk-NJ4DYYO5.js.map +1 -0
- package/dist/{chunk-2IALOXZS.js → chunk-NM5UYF6Q.js} +2 -2
- package/dist/chunk-NM5UYF6Q.js.map +1 -0
- package/dist/{chunk-JBBSYJHP.js → chunk-NYEFP7DY.js} +4 -4
- package/dist/chunk-NYEFP7DY.js.map +1 -0
- package/dist/{chunk-CCOP5XDW.js → chunk-NZ24MX4J.js} +8 -46
- package/dist/chunk-NZ24MX4J.js.map +1 -0
- package/dist/{chunk-KWVJAOIN.js → chunk-OLEPKFTW.js} +4 -4
- package/dist/chunk-OLEPKFTW.js.map +1 -0
- package/dist/{chunk-OF75ACKS.js → chunk-PEATRIYJ.js} +9 -9
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/{chunk-UC2ETWF3.js → chunk-PTHKZWEH.js} +2 -14
- package/dist/{chunk-UC2ETWF3.js.map → chunk-PTHKZWEH.js.map} +1 -1
- package/dist/chunk-PVEWA2DU.js +23 -0
- package/dist/chunk-PVEWA2DU.js.map +1 -0
- package/dist/{chunk-LSASLXGC.js → chunk-QBAC3GXA.js} +1 -1
- package/dist/chunk-QBAC3GXA.js.map +1 -0
- package/dist/{chunk-RDXW3OBQ.js → chunk-QD46HPZG.js} +2 -2
- package/dist/chunk-QD46HPZG.js.map +1 -0
- package/dist/{chunk-N55W7KUL.js → chunk-QDIH2744.js} +2 -2
- package/dist/{chunk-6HY2X62D.js → chunk-QJNCB5SK.js} +2 -2
- package/dist/{chunk-4BRCIYFG.js → chunk-QX76XVQH.js} +6 -6
- package/dist/chunk-QX76XVQH.js.map +1 -0
- package/dist/{chunk-W2OG6JOL.js → chunk-QZWTRENR.js} +24 -7
- package/dist/chunk-QZWTRENR.js.map +1 -0
- package/dist/{chunk-6NQMXTYC.js → chunk-RO5NM6UI.js} +2 -2
- package/dist/chunk-RO5NM6UI.js.map +1 -0
- package/dist/chunk-SGDPRCC4.js +1075 -0
- package/dist/chunk-SGDPRCC4.js.map +1 -0
- package/dist/{chunk-2PCAVW2I.js → chunk-SHEEBRZ4.js} +2 -2
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-ISMV2QVG.js → chunk-TG634KCO.js} +11 -2
- package/dist/chunk-TG634KCO.js.map +1 -0
- package/dist/{chunk-J6Q7UVQE.js → chunk-TUXQSFHZ.js} +4 -16
- package/dist/{chunk-J6Q7UVQE.js.map → chunk-TUXQSFHZ.js.map} +1 -1
- package/dist/{chunk-GULTLPFB.js → chunk-UADPR6F4.js} +3 -3
- package/dist/{chunk-GULTLPFB.js.map → chunk-UADPR6F4.js.map} +1 -1
- package/dist/{chunk-ZEQWCBCM.js → chunk-UDHBXYGG.js} +27 -5
- package/dist/chunk-UDHBXYGG.js.map +1 -0
- package/dist/{chunk-RA5VTXXG.js → chunk-V6UQZA2H.js} +2 -2
- package/dist/chunk-VG2ZSFYD.js +32 -0
- package/dist/chunk-VG2ZSFYD.js.map +1 -0
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/{chunk-QDPZWTN2.js → chunk-W3G5REIU.js} +2 -2
- package/dist/{chunk-WEYZTLXN.js → chunk-W3L64Y3J.js} +2 -2
- package/dist/{chunk-ONTBCHCP.js → chunk-W66AM5IB.js} +2 -2
- package/dist/chunk-W66AM5IB.js.map +1 -0
- package/dist/{chunk-A5BDDEXK.js → chunk-WBKZUO5V.js} +26 -43
- package/dist/chunk-WBKZUO5V.js.map +1 -0
- package/dist/{chunk-CBSY2N76.js → chunk-WLXMTYGO.js} +2 -2
- package/dist/{chunk-3U3FBR7O.js → chunk-X3F5YJG2.js} +2 -2
- package/dist/{chunk-GQNGCEP5.js → chunk-X45JYIAY.js} +3 -3
- package/dist/chunk-X45JYIAY.js.map +1 -0
- package/dist/{chunk-6XE5TMPR.js → chunk-X4MVWPHV.js} +3 -3
- package/dist/chunk-X4MVWPHV.js.map +1 -0
- package/dist/chunk-XZHEOSQ2.js +16 -0
- package/dist/chunk-XZHEOSQ2.js.map +1 -0
- package/dist/chunk-Y2NBBT6K.js +18 -0
- package/dist/chunk-Y2NBBT6K.js.map +1 -0
- package/dist/{chunk-DDATL6PU.js → chunk-Y2NJBNX3.js} +8 -8
- package/dist/{chunk-DDATL6PU.js.map → chunk-Y2NJBNX3.js.map} +1 -1
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-O7WJ47EF.js → chunk-YWWQM7KP.js} +5 -14
- package/dist/chunk-YWWQM7KP.js.map +1 -0
- package/dist/{chunk-7O3AYBC7.js → chunk-YZJSJOUI.js} +235 -65
- package/dist/chunk-YZJSJOUI.js.map +1 -0
- package/dist/{chunk-5WZXVULX.js → chunk-ZTLOXFPB.js} +2 -2
- package/dist/chunk-ZTLOXFPB.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-WQVIJAW2.js → classified-marker-7PKJBFCG.js} +3 -3
- package/dist/collection-facade-6I5K5IOD.js +45 -0
- package/dist/{computed-DSMPXG2Y.js → computed-AB45PS4V.js} +3 -3
- package/dist/consent/index.js +13 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +37 -0
- package/dist/crdt/index.js +4 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +26 -0
- package/dist/{dead-filter-2A7IAJ3D.js → dead-filter-FL3WIUZS.js} +2 -2
- package/dist/{chunk-GYYCX5K6.js → delegation-QXZ4MPPH.js} +12 -6
- package/dist/{chunk-GYYCX5K6.js.map → delegation-QXZ4MPPH.js.map} +1 -1
- package/dist/derivations/index.js +12 -12
- package/dist/derive-VGS7FKE3.js +22 -0
- package/dist/directory/index.js +46 -0
- package/dist/dispatch-EGGC7UD7.js +72 -0
- package/dist/dispatch-EGGC7UD7.js.map +1 -0
- package/dist/dispatch-GDSTUTVP.js +194 -0
- package/dist/dispatch-GDSTUTVP.js.map +1 -0
- package/dist/{enclave-7MW6ZGXW.js → enclave-SPEEDYZ4.js} +11 -11
- package/dist/executor-IEBLTBCW.js +9 -0
- package/dist/executor-OTF556PL.js +28 -0
- package/dist/executor-RM7XWQDU.js +9 -0
- package/dist/export-accessible-P42BQ4PB.js +23 -0
- package/dist/extract-partition-TCYXRWBN.js +38 -0
- package/dist/{fanout-sidecar-WDYQ77VB.js → fanout-sidecar-SSMRSC2L.js} +9 -9
- package/dist/find-OZMTRIK3.js +11 -0
- package/dist/forget/index.js +11 -11
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +6 -6
- package/dist/history/index.js +16 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +16 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +42 -42
- package/dist/index.js +330 -2106
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -2
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +28 -0
- package/dist/issue-FCKN5O6C.js +19 -0
- package/dist/kernel/best-effort-revert.d.ts +9 -1
- package/dist/kernel/collection-config.d.ts +12 -70
- package/dist/kernel/collection.d.ts +11 -23
- package/dist/kernel/enclave/crypto.d.ts +8 -8
- package/dist/kernel/enclave/index.d.ts +3 -3
- package/dist/kernel/errors.d.ts +41 -22
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +81 -124
- package/dist/kernel/query/builder.d.ts +10 -10
- package/dist/kernel/query/index.d.ts +0 -6
- package/dist/kernel/query/scan-builder.d.ts +4 -4
- package/dist/kernel/sync-policy.d.ts +76 -4
- package/dist/kernel/types.d.ts +146 -86
- package/dist/kernel/validation.d.ts +33 -33
- package/dist/kernel/vault.d.ts +41 -229
- package/dist/kernel/via/dispatch.d.ts +7 -0
- package/dist/{ledger-33BC4TR7.js → ledger-6XBEVWYP.js} +11 -11
- package/dist/liberate-CYUOS4NC.js +24 -0
- package/dist/{link-set-QK22TDEX.js → link-set-NK6L2A5S.js} +11 -11
- package/dist/materialized-views/index.js +22 -19
- package/dist/money/index.js +31 -0
- package/dist/noydb-FZZIMLCI.js +81 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +15 -13
- package/dist/pod/index.js +26 -12
- package/dist/{policy-NAHB2TUT.js → policy/index.js} +6 -6
- package/dist/port/with/archive-strategy.d.ts +31 -0
- package/dist/port/with/blob-strategy.d.ts +15 -5
- package/dist/port/with/collection-options.d.ts +171 -0
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +134 -0
- package/dist/port/with/team-strategy.d.ts +3 -2
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-JVTMJ6OW.js → post-register-VFIYISUK.js} +6 -6
- package/dist/query/index.js +6 -46
- package/dist/{aggregate → reduce}/index.js +24 -17
- package/dist/reduce/index.js.map +1 -0
- package/dist/register-UKU2J6MN.js +25 -0
- package/dist/registry-2VCWVHZS.js +19 -0
- package/dist/registry-7Y5WF7GS.js +9 -0
- package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
- package/dist/registry-DTWRJLSF.js +18 -0
- package/dist/request-withdrawal-JYDZ5XY2.js +31 -0
- package/dist/{reveal-LGBOM2BO.js → reveal-CL2BCW6A.js} +6 -6
- package/dist/revoke-2TSAD2T4.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +26 -0
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +36 -0
- package/dist/{seed-PWK45HDF.js → seed-NUVJEL7T.js} +12 -12
- package/dist/seed-NUVJEL7T.js.map +1 -0
- package/dist/sequence/index.js +30 -0
- package/dist/session/index.js +13 -9
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +6 -2
- package/dist/shadow/index.js.map +1 -1
- package/dist/signer-K7Z2EOMG.js +25 -0
- package/dist/snapshots/index.js +14 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-FJED42DM.js → stale-A4J26OIC.js} +11 -10
- package/dist/storage-YVHZUISN.js +23 -0
- package/dist/store/index.js +22 -0
- package/dist/{store-coordination-provider-APODTV4W.js → store-coordination-provider-EWRZL7XF.js} +3 -3
- package/dist/sync/index.js +15 -12
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +33 -48
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/{tx → transactions}/index.js +7 -3
- package/dist/transactions/index.js.map +1 -0
- package/dist/util/index.js +1 -1
- package/dist/{verify-26Y5GNMK.js → verify-7XWHJWUN.js} +5 -5
- package/dist/via/blob/active.d.ts +23 -7
- package/dist/via/blob/binding.d.ts +1 -1
- package/dist/via/blob/index.d.ts +7 -1
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/i18n/index.d.ts +2 -0
- package/dist/via/money/money-reducer.d.ts +2 -2
- package/dist/walk-P5D6CF4V.js +21 -0
- package/dist/with-audit/consent/index.d.ts +2 -0
- package/dist/with-audit/forget/active.d.ts +3 -3
- package/dist/with-audit/forget/index.d.ts +6 -5
- package/dist/with-audit/forget/strategy.d.ts +3 -3
- package/dist/with-audit/guards/executor.d.ts +4 -4
- package/dist/with-audit/guards/immutable-guard.d.ts +3 -3
- package/dist/with-audit/guards/index.d.ts +1 -1
- package/dist/with-audit/guards/registry.d.ts +3 -3
- package/dist/with-audit/guards/transition-guard.d.ts +3 -3
- package/dist/with-audit/guards/types.d.ts +10 -10
- package/dist/with-audit/guards/with-guard.d.ts +2 -2
- package/dist/with-audit/periods/index.d.ts +2 -0
- package/dist/with-audit/periods/vault-facade.d.ts +6 -0
- package/dist/with-audit/portability/export-accessible.d.ts +4 -4
- package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
- package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
- package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
- package/dist/with-audit/tiers/index.d.ts +1 -0
- package/dist/with-cargo/adopt-partition.d.ts +7 -7
- package/dist/{legacy/kernel.d.ts → with-cargo/floor.d.ts} +4 -4
- package/dist/with-cargo/index.d.ts +9 -2
- package/dist/with-commit/crdt/index.d.ts +2 -0
- package/dist/with-commit/history/index.d.ts +2 -0
- package/dist/with-commit/history/time-machine.d.ts +2 -2
- package/dist/with-commit/numbering/descriptor.d.ts +16 -6
- package/dist/with-commit/tx/active.d.ts +5 -5
- package/dist/with-commit/tx/index.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/strategy.d.ts +3 -3
- package/dist/with-fork/shadow/index.d.ts +2 -0
- package/dist/with-fork/snapshots/active.d.ts +2 -2
- package/dist/with-fork/snapshots/index.d.ts +3 -1
- package/dist/with-fork/snapshots/noydb-facade.d.ts +3 -3
- package/dist/with-fork/snapshots/strategy.d.ts +2 -2
- package/dist/with-formula/derivations/dispatch.d.ts +98 -0
- package/dist/with-formula/derivations/executor.d.ts +2 -2
- package/dist/with-formula/derivations/index.d.ts +4 -1
- package/dist/with-formula/derivations/registry.d.ts +3 -3
- package/dist/with-formula/derivations/stale.d.ts +2 -2
- package/dist/with-formula/derivations/types.d.ts +3 -3
- package/dist/with-formula/derivations/with-derivation.d.ts +2 -2
- package/dist/with-formula/derivations/with-rollup.d.ts +15 -8
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +3 -3
- package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
- package/dist/with-formula/materialized-views/index.d.ts +2 -1
- package/dist/with-formula/materialized-views/registry.d.ts +4 -4
- package/dist/with-formula/materialized-views/types.d.ts +11 -11
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +2 -2
- package/dist/with-formula/overlay-views/index.d.ts +1 -1
- package/dist/with-formula/overlay-views/registry.d.ts +4 -4
- package/dist/with-formula/overlay-views/types.d.ts +3 -3
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +2 -2
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +2 -2
- package/dist/with-lookup/indexing/active.d.ts +5 -5
- package/dist/with-lookup/indexing/index.d.ts +3 -1
- package/dist/with-lookup/indexing/strategy.d.ts +3 -3
- package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
- package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
- package/dist/with-lookup/reduce/index.d.ts +34 -0
- package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +11 -12
- package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
- package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
- package/dist/with-lookup/search/build-docs.d.ts +7 -2
- package/dist/with-lookup/search/index.d.ts +1 -1
- package/dist/with-party/broker/index.d.ts +1 -0
- package/dist/with-party/broker/seed.d.ts +1 -1
- package/dist/with-party/custody/liberate.d.ts +3 -3
- package/dist/with-party/directory/cover/index.d.ts +1 -5
- package/dist/with-party/directory/cover/schema.d.ts +0 -6
- package/dist/with-party/directory/cover/storage.d.ts +0 -8
- package/dist/with-party/directory/cover/types.d.ts +0 -21
- package/dist/with-party/directory/index.d.ts +2 -0
- package/dist/with-party/session/dev-unlock.d.ts +2 -2
- package/dist/with-party/session/index.d.ts +2 -0
- package/dist/with-party/session/session.d.ts +2 -2
- package/dist/with-party/team/deed.d.ts +8 -8
- package/dist/with-party/team/index.d.ts +4 -7
- package/dist/with-party/team/keyring.d.ts +83 -35
- package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
- package/dist/with-party/team/noydb-facade.d.ts +43 -42
- package/dist/with-party/team/peer-recover.d.ts +13 -13
- package/dist/with-party/team/recovery.d.ts +5 -5
- package/dist/with-party/team/rotate-recover.d.ts +30 -30
- package/dist/with-pod/bundle.d.ts +30 -32
- package/dist/with-pod/format.d.ts +2 -2
- package/dist/with-pod/index.d.ts +2 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +43 -3
- package/dist/with-shape/blobs/blob-pinning.d.ts +112 -0
- package/dist/with-shape/blobs/blob-set.d.ts +86 -2
- package/dist/with-shape/introspection/index.d.ts +6 -0
- package/dist/with-shape/schema-update/index.d.ts +1 -0
- package/dist/with-store/index.d.ts +3 -2
- package/dist/with-store/route-store.d.ts +1 -1
- package/dist/{with-party/team/sync-active.d.ts → with-sync/active.d.ts} +1 -1
- package/dist/{with-party/team/sync-credentials.d.ts → with-sync/credentials.d.ts} +3 -3
- package/dist/{with-party/team/sync.d.ts → with-sync/engine.d.ts} +5 -5
- package/dist/{with-party/sync → with-sync}/index.d.ts +4 -2
- package/dist/{with-party/team/sync-period-scope.d.ts → with-sync/period-scope.d.ts} +2 -2
- package/dist/{with-party/team → with-sync}/presence.d.ts +2 -2
- package/dist/{with-party/team/sync-strategy.d.ts → with-sync/strategy.d.ts} +6 -6
- package/dist/{with-party/team/sync-transaction.d.ts → with-sync/transaction.d.ts} +3 -3
- package/dist/withdraw-accessible-A2PWF5MZ.js +28 -0
- package/package.json +45 -36
- package/dist/aggregate/index.js.map +0 -1
- package/dist/api-IQFZJSQO.js +0 -20
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/bundle/index.js +0 -105
- package/dist/by/index.js +0 -11
- package/dist/chunk-2IALOXZS.js.map +0 -1
- package/dist/chunk-2MUZ3LY6.js +0 -205
- package/dist/chunk-2MUZ3LY6.js.map +0 -1
- package/dist/chunk-2P7EGNKF.js.map +0 -1
- package/dist/chunk-3PF6CRDT.js.map +0 -1
- package/dist/chunk-3SV2EPMN.js.map +0 -1
- package/dist/chunk-4BRCIYFG.js.map +0 -1
- package/dist/chunk-5OI6BR4H.js.map +0 -1
- package/dist/chunk-5WZXVULX.js.map +0 -1
- package/dist/chunk-6NQMXTYC.js.map +0 -1
- package/dist/chunk-6XE5TMPR.js.map +0 -1
- package/dist/chunk-7CI6CP7Z.js.map +0 -1
- package/dist/chunk-7O3AYBC7.js.map +0 -1
- package/dist/chunk-A5BDDEXK.js.map +0 -1
- package/dist/chunk-A7JJLVGH.js.map +0 -1
- package/dist/chunk-BGK233EA.js.map +0 -1
- package/dist/chunk-BMQWTQZ4.js.map +0 -1
- package/dist/chunk-BOKIKJJB.js.map +0 -1
- package/dist/chunk-CCOP5XDW.js.map +0 -1
- package/dist/chunk-CHFZDSE4.js +0 -1
- package/dist/chunk-DDHM2TLX.js.map +0 -1
- package/dist/chunk-GQNGCEP5.js.map +0 -1
- package/dist/chunk-GVZQ4NAM.js +0 -14
- package/dist/chunk-GVZQ4NAM.js.map +0 -1
- package/dist/chunk-GWKAVKHI.js.map +0 -1
- package/dist/chunk-HOONYZY2.js.map +0 -1
- package/dist/chunk-HPUWOVR7.js.map +0 -1
- package/dist/chunk-ISMV2QVG.js.map +0 -1
- package/dist/chunk-JBBSYJHP.js.map +0 -1
- package/dist/chunk-JRBNCUNT.js.map +0 -1
- package/dist/chunk-JZWWLLVY.js +0 -99
- package/dist/chunk-JZWWLLVY.js.map +0 -1
- package/dist/chunk-KUPKLSX5.js.map +0 -1
- package/dist/chunk-KWVJAOIN.js.map +0 -1
- package/dist/chunk-LB6OH6K2.js.map +0 -1
- package/dist/chunk-LB7FD65R.js +0 -163
- package/dist/chunk-LB7FD65R.js.map +0 -1
- package/dist/chunk-LOF2W3JU.js.map +0 -1
- package/dist/chunk-LSASLXGC.js.map +0 -1
- package/dist/chunk-O7WJ47EF.js.map +0 -1
- package/dist/chunk-ONTBCHCP.js.map +0 -1
- package/dist/chunk-PT37L5DV.js +0 -255
- package/dist/chunk-PT37L5DV.js.map +0 -1
- package/dist/chunk-RDXW3OBQ.js.map +0 -1
- package/dist/chunk-RND5ZPNP.js.map +0 -1
- package/dist/chunk-S3BFKGET.js.map +0 -1
- package/dist/chunk-SMGEYW6G.js.map +0 -1
- package/dist/chunk-T36RFODW.js.map +0 -1
- package/dist/chunk-TAGR72IR.js.map +0 -1
- package/dist/chunk-UNCOC7QH.js.map +0 -1
- package/dist/chunk-VCBHAE4R.js.map +0 -1
- package/dist/chunk-VEALDPHW.js.map +0 -1
- package/dist/chunk-VQNJ7UZL.js.map +0 -1
- package/dist/chunk-W2OG6JOL.js.map +0 -1
- package/dist/chunk-WNGGJWF7.js.map +0 -1
- package/dist/chunk-YJV2UZ7H.js.map +0 -1
- package/dist/chunk-YMUGBZN2.js.map +0 -1
- package/dist/chunk-YTGDPCPW.js.map +0 -1
- package/dist/chunk-ZEQWCBCM.js.map +0 -1
- package/dist/collection-facade-MJXSC3Q6.js +0 -44
- package/dist/cover-B5SJDHR3.js +0 -52
- package/dist/delegation-A5A75KQO.js +0 -25
- package/dist/derive-HJSMH7RA.js +0 -21
- package/dist/executor-AXE4XMLT.js +0 -26
- package/dist/executor-KGNLJD6M.js +0 -9
- package/dist/executor-XGIS6CR7.js +0 -9
- package/dist/export-accessible-VVBJM3MM.js +0 -23
- package/dist/extract-partition-LGGBTQET.js +0 -38
- package/dist/find-YS6XWB46.js +0 -11
- package/dist/in/index.js +0 -1
- package/dist/issue-LSR5PS6H.js +0 -19
- package/dist/legacy/bundle.d.ts +0 -30
- package/dist/liberate-GBSAYLPJ.js +0 -24
- package/dist/noydb-MTUBMWFE.js +0 -70
- package/dist/on/index.js +0 -17
- package/dist/port/as/index.d.ts +0 -26
- package/dist/port/at/index.d.ts +0 -18
- package/dist/port/in/index.d.ts +0 -21
- package/dist/port/on/index.d.ts +0 -27
- package/dist/port/ui/index.d.ts +0 -21
- package/dist/port/with/index.d.ts +0 -18
- package/dist/register-X462DNDM.js +0 -23
- package/dist/registry-3XMCT7MQ.js +0 -18
- package/dist/registry-KHD2I3M2.js +0 -19
- package/dist/registry-NPOWJHC4.js +0 -9
- package/dist/request-withdrawal-U7K3JTMY.js +0 -31
- package/dist/revoke-OCWDSWRQ.js +0 -24
- package/dist/seed-PWK45HDF.js.map +0 -1
- package/dist/signer-3YFBLZRN.js +0 -25
- package/dist/storage-W3GURVFU.js +0 -23
- package/dist/tx/index.js.map +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/with/index.js +0 -31
- package/dist/with-lookup/aggregate/index.d.ts +0 -23
- package/dist/withdraw-accessible-Y3B2535F.js +0 -28
- /package/dist/{api-IQFZJSQO.js.map → api-ZDKTWNBB.js.map} +0 -0
- /package/dist/{backup-LU2DTZTI.js.map → backup-2UX7PRM5.js.map} +0 -0
- /package/dist/{chunk-IY23KFNZ.js.map → chunk-35NMVJ7I.js.map} +0 -0
- /package/dist/{chunk-RTEK4C4I.js.map → chunk-4JQK3L4V.js.map} +0 -0
- /package/dist/{chunk-3ELCWU56.js.map → chunk-4ZKNC6A6.js.map} +0 -0
- /package/dist/{chunk-VAIS3SOM.js.map → chunk-55LX6FSX.js.map} +0 -0
- /package/dist/{chunk-6HPG2YNX.js.map → chunk-5DRROK5W.js.map} +0 -0
- /package/dist/{chunk-S6Q37VGE.js.map → chunk-5GQEU4DN.js.map} +0 -0
- /package/dist/{chunk-TOPYT5U5.js.map → chunk-63FE525P.js.map} +0 -0
- /package/dist/{chunk-JVBO4SZL.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
- /package/dist/{chunk-UFEVO57O.js.map → chunk-ABS7FMMD.js.map} +0 -0
- /package/dist/{chunk-M75ZZHSR.js.map → chunk-BLBAQRBM.js.map} +0 -0
- /package/dist/{chunk-G6EQYAL6.js.map → chunk-CI32CAFS.js.map} +0 -0
- /package/dist/{chunk-6B4DYGWO.js.map → chunk-DABACXEF.js.map} +0 -0
- /package/dist/{chunk-F6T6L2UK.js.map → chunk-DMH3VZU5.js.map} +0 -0
- /package/dist/{chunk-MQ6WOPSY.js.map → chunk-DZ2JXHWK.js.map} +0 -0
- /package/dist/{chunk-UBNCR3YK.js.map → chunk-EE7UHLKH.js.map} +0 -0
- /package/dist/{chunk-EGCRBCNA.js.map → chunk-EKRSCRNM.js.map} +0 -0
- /package/dist/{chunk-IRQY7IR5.js.map → chunk-FRMPM7WG.js.map} +0 -0
- /package/dist/{as/index.js.map → chunk-GJW4HX2O.js.map} +0 -0
- /package/dist/{chunk-T6GU5PPZ.js.map → chunk-GU3IP74F.js.map} +0 -0
- /package/dist/{chunk-SMIRGMS7.js.map → chunk-IXNCZTWA.js.map} +0 -0
- /package/dist/{chunk-RM2XV574.js.map → chunk-IXTSNGYY.js.map} +0 -0
- /package/dist/{chunk-PK6QCH2C.js.map → chunk-JJZGIE4U.js.map} +0 -0
- /package/dist/{chunk-DRWBEDYO.js.map → chunk-JYJFGD2H.js.map} +0 -0
- /package/dist/{chunk-KUIB4B5Q.js.map → chunk-LNZKOUJR.js.map} +0 -0
- /package/dist/{chunk-IM3QVF53.js.map → chunk-MBKVNOJS.js.map} +0 -0
- /package/dist/{chunk-N6WF5PKC.js.map → chunk-NFZGZ4AK.js.map} +0 -0
- /package/dist/{chunk-OF75ACKS.js.map → chunk-PEATRIYJ.js.map} +0 -0
- /package/dist/{chunk-N55W7KUL.js.map → chunk-QDIH2744.js.map} +0 -0
- /package/dist/{chunk-6HY2X62D.js.map → chunk-QJNCB5SK.js.map} +0 -0
- /package/dist/{chunk-2PCAVW2I.js.map → chunk-SHEEBRZ4.js.map} +0 -0
- /package/dist/{chunk-RA5VTXXG.js.map → chunk-V6UQZA2H.js.map} +0 -0
- /package/dist/{chunk-QDPZWTN2.js.map → chunk-W3G5REIU.js.map} +0 -0
- /package/dist/{chunk-WEYZTLXN.js.map → chunk-W3L64Y3J.js.map} +0 -0
- /package/dist/{chunk-CBSY2N76.js.map → chunk-WLXMTYGO.js.map} +0 -0
- /package/dist/{chunk-3U3FBR7O.js.map → chunk-X3F5YJG2.js.map} +0 -0
- /package/dist/{classified-marker-WQVIJAW2.js.map → classified-marker-7PKJBFCG.js.map} +0 -0
- /package/dist/{at/index.js.map → collection-facade-6I5K5IOD.js.map} +0 -0
- /package/dist/{bundle/index.js.map → computed-AB45PS4V.js.map} +0 -0
- /package/dist/{by → cover}/index.js.map +0 -0
- /package/dist/{in → custody}/index.js.map +0 -0
- /package/dist/{dead-filter-2A7IAJ3D.js.map → dead-filter-FL3WIUZS.js.map} +0 -0
- /package/dist/{chunk-CHFZDSE4.js.map → derive-VGS7FKE3.js.map} +0 -0
- /package/dist/{on → directory}/index.js.map +0 -0
- /package/dist/{collection-facade-MJXSC3Q6.js.map → enclave-SPEEDYZ4.js.map} +0 -0
- /package/dist/{computed-DSMPXG2Y.js.map → executor-IEBLTBCW.js.map} +0 -0
- /package/dist/{cover-B5SJDHR3.js.map → executor-OTF556PL.js.map} +0 -0
- /package/dist/{delegation-A5A75KQO.js.map → executor-RM7XWQDU.js.map} +0 -0
- /package/dist/{derive-HJSMH7RA.js.map → export-accessible-P42BQ4PB.js.map} +0 -0
- /package/dist/{enclave-7MW6ZGXW.js.map → extract-partition-TCYXRWBN.js.map} +0 -0
- /package/dist/{fanout-sidecar-WDYQ77VB.js.map → fanout-sidecar-SSMRSC2L.js.map} +0 -0
- /package/dist/{executor-AXE4XMLT.js.map → find-OZMTRIK3.js.map} +0 -0
- /package/dist/{ui → introspection}/index.js.map +0 -0
- /package/dist/{executor-KGNLJD6M.js.map → issue-FCKN5O6C.js.map} +0 -0
- /package/dist/{executor-XGIS6CR7.js.map → ledger-6XBEVWYP.js.map} +0 -0
- /package/dist/{export-accessible-VVBJM3MM.js.map → liberate-CYUOS4NC.js.map} +0 -0
- /package/dist/{extract-partition-LGGBTQET.js.map → link-set-NK6L2A5S.js.map} +0 -0
- /package/dist/{with → money}/index.js.map +0 -0
- /package/dist/{find-YS6XWB46.js.map → noydb-FZZIMLCI.js.map} +0 -0
- /package/dist/{issue-LSR5PS6H.js.map → policy/index.js.map} +0 -0
- /package/dist/{post-register-JVTMJ6OW.js.map → post-register-VFIYISUK.js.map} +0 -0
- /package/dist/{ledger-33BC4TR7.js.map → register-UKU2J6MN.js.map} +0 -0
- /package/dist/{liberate-GBSAYLPJ.js.map → registry-2VCWVHZS.js.map} +0 -0
- /package/dist/{link-set-QK22TDEX.js.map → registry-7Y5WF7GS.js.map} +0 -0
- /package/dist/{noydb-MTUBMWFE.js.map → registry-BWD2ED52.js.map} +0 -0
- /package/dist/{policy-NAHB2TUT.js.map → registry-DTWRJLSF.js.map} +0 -0
- /package/dist/{register-X462DNDM.js.map → request-withdrawal-JYDZ5XY2.js.map} +0 -0
- /package/dist/{reveal-LGBOM2BO.js.map → reveal-CL2BCW6A.js.map} +0 -0
- /package/dist/{registry-3XMCT7MQ.js.map → revoke-2TSAD2T4.js.map} +0 -0
- /package/dist/{registry-KHD2I3M2.js.map → schema-update/index.js.map} +0 -0
- /package/dist/{registry-NPOWJHC4.js.map → search/index.js.map} +0 -0
- /package/dist/{registry-VW6P6A3J.js.map → sequence/index.js.map} +0 -0
- /package/dist/{request-withdrawal-U7K3JTMY.js.map → signer-K7Z2EOMG.js.map} +0 -0
- /package/dist/{revoke-OCWDSWRQ.js.map → stale-A4J26OIC.js.map} +0 -0
- /package/dist/{signer-3YFBLZRN.js.map → storage-YVHZUISN.js.map} +0 -0
- /package/dist/{stale-FJED42DM.js.map → store/index.js.map} +0 -0
- /package/dist/{store-coordination-provider-APODTV4W.js.map → store-coordination-provider-EWRZL7XF.js.map} +0 -0
- /package/dist/{verify-26Y5GNMK.js.map → verify-7XWHJWUN.js.map} +0 -0
- /package/dist/{storage-W3GURVFU.js.map → walk-P5D6CF4V.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-coordination.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-write-relay.d.ts +0 -0
- /package/dist/{withdraw-accessible-Y3B2535F.js.map → withdraw-accessible-A2PWF5MZ.js.map} +0 -0
|
@@ -36,16 +36,16 @@ export interface GuardChange<T> {
|
|
|
36
36
|
after: T;
|
|
37
37
|
}
|
|
38
38
|
/** @internal — output of {@link withGuard}. */
|
|
39
|
-
export interface
|
|
39
|
+
export interface GuardStrategy<T extends Record<string, unknown>> {
|
|
40
40
|
readonly __noydb_strategy: 'guard';
|
|
41
|
-
readonly spec:
|
|
41
|
+
readonly spec: GuardSpec<T>;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Existential erasure of `
|
|
44
|
+
* Existential erasure of `GuardStrategy<T>` — used as the
|
|
45
45
|
* element type of `ReadonlyArray<>` fields where the per-handle T
|
|
46
46
|
* differs (e.g. `guardStrategies: [invoiceGuard, disbursementGuard]`).
|
|
47
47
|
*
|
|
48
|
-
* Background: `
|
|
48
|
+
* Background: `GuardStrategy<T>` is INVARIANT in T because T
|
|
49
49
|
* appears in callback positions on the spec (`check(incoming: T, ctx)`,
|
|
50
50
|
* `invariant(changes: ReadonlyArray<GuardChange<T>>, ctx)`). So
|
|
51
51
|
* `Handle<Invoice>` is not assignable to `Handle<Record<string, unknown>>`.
|
|
@@ -55,9 +55,9 @@ export interface GuardStrategyHandle<T extends Record<string, unknown>> {
|
|
|
55
55
|
* interface that ERASES T from both the discriminant and the spec.
|
|
56
56
|
*
|
|
57
57
|
* Consumers continue to construct typed handles via `withGuard<T>(...)`
|
|
58
|
-
* which returns `
|
|
59
|
-
* `Handle<Disbursement>` structurally assign to `
|
|
60
|
-
* so an array of them is `
|
|
58
|
+
* which returns `GuardStrategy<T>`. Both `Handle<Invoice>` and
|
|
59
|
+
* `Handle<Disbursement>` structurally assign to `GuardStrategyAny`,
|
|
60
|
+
* so an array of them is `GuardStrategyAny[]`.
|
|
61
61
|
*
|
|
62
62
|
* Internal code that needs T re-narrows via the runtime discriminant
|
|
63
63
|
* (`__noydb_strategy === 'guard'`) plus per-handle type information
|
|
@@ -69,12 +69,12 @@ export interface GuardStrategyHandle<T extends Record<string, unknown>> {
|
|
|
69
69
|
*
|
|
70
70
|
* @internal
|
|
71
71
|
*/
|
|
72
|
-
export interface
|
|
72
|
+
export interface GuardStrategyAny {
|
|
73
73
|
readonly __noydb_strategy: 'guard';
|
|
74
|
-
readonly spec:
|
|
74
|
+
readonly spec: GuardSpec<any>;
|
|
75
75
|
}
|
|
76
76
|
/** Public registration shape. See `withGuard()`. */
|
|
77
|
-
export interface
|
|
77
|
+
export interface GuardSpec<T extends Record<string, unknown>> {
|
|
78
78
|
collection: string;
|
|
79
79
|
/**
|
|
80
80
|
* Fires on `Collection.put` (insert + update). The `incoming` argument
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GuardSpec, GuardStrategy } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Register a guard for a collection. Guards run on every `put()` /
|
|
4
4
|
* `delete()` for the named collection (after permissions, before
|
|
@@ -12,4 +12,4 @@ import type { GuardStrategy, GuardStrategyHandle } from './types.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @see docs/superpowers/specs/2026-05-18-guards-design.md
|
|
14
14
|
*/
|
|
15
|
-
export declare function withGuard<T extends Record<string, unknown>>(strategy:
|
|
15
|
+
export declare function withGuard<T extends Record<string, unknown>>(strategy: GuardSpec<T>): GuardStrategy<T>;
|
|
@@ -16,3 +16,5 @@ export { withPeriods } from './active.js';
|
|
|
16
16
|
export type { PeriodsStrategy } from './strategy.js';
|
|
17
17
|
export { PERIODS_COLLECTION, PERIOD_FREEZES_COLLECTION, PERIOD_ARCHIVES_COLLECTION, PERIOD_TARGET_PURGES_COLLECTION, periodExclusiveUpperBound, loadPeriods, chainAnchor, assertTsWritable, validatePeriodName, appendPeriodLedgerEntry, } from './periods.js';
|
|
18
18
|
export type { PeriodRecord, PeriodFreezeRecord, PeriodArchiveRecord, PeriodTargetPurgeRecord, TargetPurgeCount, ClosePeriodOptions, OpenPeriodOptions, CarryForwardContext, ReadOnlyCollection, } from './periods.js';
|
|
19
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
20
|
+
export { NO_PERIODS } from './strategy.js';
|
|
@@ -28,6 +28,12 @@ export interface VaultPeriodsDeps {
|
|
|
28
28
|
archiveRecords(before: string): Promise<number>;
|
|
29
29
|
/** #615: sweep delete markers off the vault's push-only sync targets. Bound to `vault._purgePeriodTargets`. */
|
|
30
30
|
purgeTargets(before: string): Promise<readonly TargetPurgeCount[]>;
|
|
31
|
+
/**
|
|
32
|
+
* #822: mark a reserved-collection write dirty so the sync engine pushes
|
|
33
|
+
* it. Bound to the vault's `onDirty` when sync is configured, `undefined`
|
|
34
|
+
* otherwise. Only `_periods` uses it — see `writeReserved`.
|
|
35
|
+
*/
|
|
36
|
+
onDirty?: ((collection: string, id: string, action: 'put', version: number) => Promise<void>) | undefined;
|
|
31
37
|
}
|
|
32
38
|
export declare class VaultPeriods {
|
|
33
39
|
private readonly deps;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Reuses the existing bundle machinery: the access boundary is the caller's DEK
|
|
8
8
|
* set (operator/client → `keyring.permissions`; owner/admin/viewer → all), so a
|
|
9
9
|
* record outside the caller's keys can never enter the bundle. Re-keying to a
|
|
10
|
-
* new owner reuses `writePod`'s `
|
|
10
|
+
* new owner reuses `writePod`'s `exportSecret` shorthand.
|
|
11
11
|
*/
|
|
12
12
|
import type { Vault } from '../../kernel/vault.js';
|
|
13
13
|
import type { UnlockedKeyring } from '../../with-party/team/keyring.js';
|
|
@@ -22,16 +22,16 @@ export declare function resolveAccessibleCollections(keyring: UnlockedKeyring, s
|
|
|
22
22
|
} | undefined, writableOnly?: boolean): string[] | undefined;
|
|
23
23
|
/** Produce a (optionally re-keyed, scoped) `.noydb` bundle — no audit. */
|
|
24
24
|
export declare function buildAccessibleBundle(vault: Vault, collections: string[] | undefined, reKey: {
|
|
25
|
-
|
|
25
|
+
secret: string;
|
|
26
26
|
} | undefined, compression?: 'auto' | 'brotli' | 'gzip' | 'none'): Promise<Uint8Array>;
|
|
27
27
|
export interface ExportAccessibleOptions {
|
|
28
28
|
/**
|
|
29
29
|
* Re-key the bundle so it is independently openable by a new owner with this
|
|
30
|
-
*
|
|
30
|
+
* secret (the receiving firm / the client themselves). Omit to inherit
|
|
31
31
|
* the source keyring (personal backup).
|
|
32
32
|
*/
|
|
33
33
|
readonly reKey?: {
|
|
34
|
-
readonly
|
|
34
|
+
readonly secret: string;
|
|
35
35
|
};
|
|
36
36
|
/** Narrow the export to a subset of the caller's accessible collections. */
|
|
37
37
|
readonly scope?: {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Requests live in the reserved `_user_withdrawal_requests` namespace. The
|
|
16
16
|
* record body is plaintext metadata (collection names + disposition + legal
|
|
17
17
|
* basis — none secret in this trust model; the owner sees the data anyway) and
|
|
18
|
-
* carries NO
|
|
18
|
+
* carries NO secret: the re-key secret is supplied by the approver at
|
|
19
19
|
* approval time and conveyed to the requester out-of-band, so no secret is
|
|
20
20
|
* stored at rest.
|
|
21
21
|
*/
|
|
@@ -66,9 +66,9 @@ export declare function listWithdrawalRequests(vault: Vault, opts?: {
|
|
|
66
66
|
status?: WithdrawalRequestStatus;
|
|
67
67
|
}): Promise<WithdrawalRequest[]>;
|
|
68
68
|
export interface ApproveWithdrawalOptions {
|
|
69
|
-
/** Re-key the handed-back bundle to a
|
|
69
|
+
/** Re-key the handed-back bundle to a secret the requester will use. */
|
|
70
70
|
readonly reKey?: {
|
|
71
|
-
readonly
|
|
71
|
+
readonly secret: string;
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
@@ -29,9 +29,9 @@ export interface FrozenSnapshotRef {
|
|
|
29
29
|
export interface WithdrawAccessibleOptions {
|
|
30
30
|
/** Legal/contractual basis recorded in the audit (e.g. 'gdpr-art-17'). */
|
|
31
31
|
readonly legalBasis: string;
|
|
32
|
-
/** Re-key the exported bundle to a new owner
|
|
32
|
+
/** Re-key the exported bundle to a new owner secret. */
|
|
33
33
|
readonly reKey?: {
|
|
34
|
-
readonly
|
|
34
|
+
readonly secret: string;
|
|
35
35
|
};
|
|
36
36
|
/** Source disposition. Default 'delete'. */
|
|
37
37
|
readonly disposition?: 'delete' | 'freeze';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
15
|
import type { SealingContext } from '../../kernel/enclave/index.js';
|
|
16
|
-
import type { RecipientSealer } from '../../with-party/team/managed-
|
|
16
|
+
import type { RecipientSealer } from '../../with-party/team/managed-secret.js';
|
|
17
17
|
export interface SealedRecordStrategy {
|
|
18
18
|
sealRecordToHost(ctx: SealingContext, collection: string, id: string, hostSealer: RecipientSealer, opts: {
|
|
19
19
|
expiresAt: string;
|
|
@@ -392,3 +392,4 @@ export declare function demote<T>(ctx: TiersContext<T>, id: string, toTier: numb
|
|
|
392
392
|
export declare function classifySealedShred<T>(ctx: TiersContext<T>, live: EncryptedEnvelope): Promise<{
|
|
393
393
|
readonly slots: readonly SealedShredSlot[];
|
|
394
394
|
}>;
|
|
395
|
+
export type { SealedShredSlot } from '../../kernel/enclave/index.js';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type EnclaveKey } from '../kernel/enclave/index.js';
|
|
11
11
|
import type { NoydbStore } from '../kernel/types.js';
|
|
12
|
-
import type { SealingKeyProvider } from '../with-party/team/managed-
|
|
12
|
+
import type { SealingKeyProvider } from '../with-party/team/managed-secret.js';
|
|
13
13
|
import type { ShamirRecoveryProvider } from '../with-party/team/shamir-recovery-provider.js';
|
|
14
14
|
import type { RecoveryEnrollmentInput } from '../with-party/team/rotate-recover.js';
|
|
15
15
|
import type { TransferSealPayload } from '../with-pod/bundle.js';
|
|
@@ -35,14 +35,14 @@ export interface CreateOwnerResult {
|
|
|
35
35
|
readonly vaultName: string;
|
|
36
36
|
readonly userId: string;
|
|
37
37
|
}
|
|
38
|
-
/** Standard-mode owner: recipient supplies the
|
|
38
|
+
/** Standard-mode owner: recipient supplies the secret. */
|
|
39
39
|
export interface CreateOwnerStandardOptions {
|
|
40
40
|
readonly userId: string;
|
|
41
|
-
readonly
|
|
41
|
+
readonly secret: string;
|
|
42
42
|
readonly transferKey: Uint8Array;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Managed-mode owner: the
|
|
45
|
+
* Managed-mode owner: the secret is minted + sealed under
|
|
46
46
|
* a `SealingKeyProvider` (e.g. an `at-*` OS keychain) so the partition
|
|
47
47
|
* auto-unlocks on the recipient's device. Managed mode mandates a strong
|
|
48
48
|
* (Shamir) recovery profile at creation, which needs the
|
|
@@ -50,7 +50,7 @@ export interface CreateOwnerStandardOptions {
|
|
|
50
50
|
*/
|
|
51
51
|
export interface CreateOwnerManagedOptions {
|
|
52
52
|
readonly userId: string;
|
|
53
|
-
readonly
|
|
53
|
+
readonly secretMode: 'managed';
|
|
54
54
|
readonly sealingKey: SealingKeyProvider;
|
|
55
55
|
readonly recovery: ReadonlyArray<RecoveryEnrollmentInput>;
|
|
56
56
|
readonly shamirRecovery: ShamirRecoveryProvider;
|
|
@@ -61,8 +61,8 @@ export type CreateOwnerOptions = CreateOwnerStandardOptions | CreateOwnerManaged
|
|
|
61
61
|
* Mint the first owner keyring on an adopted-but-unowned partition,
|
|
62
62
|
* then destroy the transfer seal.
|
|
63
63
|
*
|
|
64
|
-
* Standard mode: the recipient supplies a
|
|
65
|
-
*
|
|
64
|
+
* Standard mode: the recipient supplies a secret. Managed mode: the
|
|
65
|
+
* secret is minted + sealed under a `SealingKeyProvider` and a strong
|
|
66
66
|
* (Shamir) recovery profile is enrolled — orchestrated via the existing
|
|
67
67
|
* `openVaultAndEnrollRecovery` ceremony.
|
|
68
68
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The `@noy-db/hub/kernel` published subpath has been retired (coordinated
|
|
3
3
|
* removal; consumers migrated to `@noy-db/hub/cargo`). This file survives
|
|
4
4
|
* unpublished as `/cargo`'s internal re-export floor — `with-cargo/index.ts`
|
|
5
|
-
* does `export * from '
|
|
5
|
+
* does `export * from './floor.js'` to consolidate this runtime-helper
|
|
6
6
|
* / error-class / type surface into the cargo seam, and
|
|
7
7
|
* `cargo-surface-golden.test.ts` reads this file directly as part of that
|
|
8
8
|
* union. Do not reintroduce it as a tsup entry or package.json export.
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
12
|
export { readPath } from '../kernel/query/predicate.js';
|
|
13
|
-
export { reduceRecords } from '../with-lookup/
|
|
14
|
-
export { groupAndReduce } from '../with-lookup/
|
|
13
|
+
export { reduceRecords } from '../with-lookup/reduce/reduction.js';
|
|
14
|
+
export { groupAndReduce } from '../with-lookup/reduce/groupby.js';
|
|
15
15
|
export { generateULID } from '../with-pod/ulid.js';
|
|
16
16
|
export { sha256Hex } from '../kernel/enclave/index.js';
|
|
17
17
|
export { isQuorum, runDrainBarrier } from '../port/by/index.js';
|
|
@@ -26,7 +26,7 @@ export type { Operator } from '../kernel/query/predicate.js';
|
|
|
26
26
|
export type { Query } from '../kernel/query/builder.js';
|
|
27
27
|
export type { JoinStrategy } from '../kernel/query/join.js';
|
|
28
28
|
export type { LiveQuery } from '../kernel/query/live.js';
|
|
29
|
-
export type {
|
|
29
|
+
export type { ReduceResult, ReduceSpec, LiveReduction, } from '../with-lookup/reduce/reduction.js';
|
|
30
30
|
export type { IndexDef } from '../with-lookup/indexing/eager-indexes.js';
|
|
31
31
|
export type { FuseOptions } from '../with-lookup/search/fuse.js';
|
|
32
32
|
export type { RetrieveHit, RetrieveOptions } from '../with-lookup/search/retrieve-types.js';
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @packageDocumentation
|
|
14
14
|
*/
|
|
15
|
-
export * from '
|
|
15
|
+
export * from './floor.js';
|
|
16
16
|
export { CustodyApi } from '../with-party/custody/index.js';
|
|
17
17
|
export type { GrantCustodianOptions } from '../with-party/custody/index.js';
|
|
18
18
|
export { liberateVault } from '../with-party/custody/liberate.js';
|
|
19
19
|
export type { LiberateOptions, LiberateResult } from '../with-party/custody/liberate.js';
|
|
20
20
|
export { createDeedOwner, loadDeedMarker, isDeedVault } from '../with-party/team/deed.js';
|
|
21
21
|
export type { DeedMarker } from '../with-party/team/deed.js';
|
|
22
|
-
export type { SealingKeyProvider } from '../with-party/team/managed-
|
|
22
|
+
export type { SealingKeyProvider } from '../with-party/team/managed-secret.js';
|
|
23
23
|
export { diffVault } from './vault-diff.js';
|
|
24
24
|
export { STATE_VAULT_NAME } from '../kernel/constants.js';
|
|
25
25
|
export { withCargo } from './active.js';
|
|
@@ -32,8 +32,15 @@ export { describeExtraction } from './describe-extraction.js';
|
|
|
32
32
|
export { decryptExtractedPartition } from './decrypt-partition.js';
|
|
33
33
|
export type { ExtractionPreview } from './describe-extraction.js';
|
|
34
34
|
export type { DecryptedRecord } from './decrypt-partition.js';
|
|
35
|
+
export type { WalkClosureOptions, ClosureResult, DanglingRefNotice } from './walk-closure.js';
|
|
36
|
+
export type { ExtractPartitionResult } from './extract-partition.js';
|
|
37
|
+
export { adoptPartition, unsealDeks, createOwnerOnAdoptedPartition } from './adopt-partition.js';
|
|
38
|
+
export type { AdoptPartitionOptions, AdoptPartitionResult, CreateOwnerResult, CreateOwnerOptions, CreateOwnerStandardOptions, CreateOwnerManagedOptions, } from './adopt-partition.js';
|
|
39
|
+
export { TransferSealError, AdoptionStateError, PartitionExtractionError } from '../kernel/errors.js';
|
|
35
40
|
export type { WriteHook } from '../port/with/write-hooks.js';
|
|
36
41
|
export type { WriteQueue } from '../kernel/write-queue.js';
|
|
37
42
|
export type { WriteConflict } from '../kernel/types.js';
|
|
38
43
|
export type { AccessibleVault } from '../kernel/types.js';
|
|
39
44
|
export type { Unsubscribe } from '../kernel/types.js';
|
|
45
|
+
export type { ExtractPartitionOptions } from './extract-partition.js';
|
|
46
|
+
export type { TransferSealPayload } from '../with-pod/bundle.js';
|
|
@@ -14,3 +14,5 @@ export { withCrdt } from './active.js';
|
|
|
14
14
|
export type { CrdtStrategy } from './strategy.js';
|
|
15
15
|
export { resolveCrdtSnapshot, mergeCrdtStates, buildLwwMapState, buildRgaState, } from './crdt.js';
|
|
16
16
|
export type { CrdtMode, CrdtState, LwwMapState, RgaState, YjsState, } from './crdt.js';
|
|
17
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
18
|
+
export { NO_CRDT } from './strategy.js';
|
|
@@ -28,3 +28,5 @@ export { computePatch, applyPatch } from './ledger/patch.js';
|
|
|
28
28
|
export type { JsonPatch, JsonPatchOp } from './ledger/patch.js';
|
|
29
29
|
export { VaultInstant, CollectionInstant } from './time-machine.js';
|
|
30
30
|
export type { VaultEngine } from './time-machine.js';
|
|
31
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
32
|
+
export { NO_HISTORY } from './strategy.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ## Usage
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
|
-
* const vault = await db.openVault('acme', {
|
|
8
|
+
* const vault = await db.openVault('acme', { secret })
|
|
9
9
|
* const q1End = vault.at('2026-03-31T23:59:59Z')
|
|
10
10
|
* const invoice = await q1End.collection<Invoice>('invoices').get('inv-001')
|
|
11
11
|
* // → the record as it stood at the close of Q1 2026
|
|
@@ -64,7 +64,7 @@ export interface VaultEngine {
|
|
|
64
64
|
/** Vault name (the compartment). */
|
|
65
65
|
readonly name: string;
|
|
66
66
|
/**
|
|
67
|
-
* `true` when the vault was opened with a
|
|
67
|
+
* `true` when the vault was opened with a secret (the normal
|
|
68
68
|
* case). `false` in plaintext-mode vaults (`encrypt: false`) — in
|
|
69
69
|
* that case `envelope._data` is raw JSON and we skip the DEK lookup.
|
|
70
70
|
*/
|
|
@@ -18,10 +18,20 @@ export interface DeferredNumberingConfig {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly settleWindowMs: number;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Options for {@link withDeferredNumbering} (#844b — was an inline literal, so
|
|
23
|
+
* unnameable). Same shape as {@link DeferredNumberingConfig} except
|
|
24
|
+
* `settleWindowMs` is optional; the factory defaults it to 0.
|
|
25
|
+
*/
|
|
26
|
+
export interface WithDeferredNumberingOptions {
|
|
27
|
+
/** Series name — the key passed to `vault.sequence(series)`. */
|
|
28
|
+
readonly series: string;
|
|
29
|
+
/** Collection holding the records to number. */
|
|
30
|
+
readonly collection: string;
|
|
31
|
+
/** Field on each record where the assigned serial is written. */
|
|
32
|
+
readonly field: string;
|
|
33
|
+
/** See {@link DeferredNumberingConfig.settleWindowMs}. Default 0. */
|
|
34
|
+
readonly settleWindowMs?: number;
|
|
35
|
+
}
|
|
21
36
|
/** Declare a deferred-numbering series. Pass the result in `createNoydb({ numbering: [...] })`. */
|
|
22
|
-
export declare function withDeferredNumbering(
|
|
23
|
-
series: string;
|
|
24
|
-
collection: string;
|
|
25
|
-
field: string;
|
|
26
|
-
settleWindowMs?: number;
|
|
27
|
-
}): DeferredNumberingConfig;
|
|
37
|
+
export declare function withDeferredNumbering(opts: WithDeferredNumberingOptions): DeferredNumberingConfig;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Active transactions strategy. Only reachable via `@noy-db/hub/
|
|
2
|
+
* Active transactions strategy. Only reachable via `@noy-db/hub/transactions`.
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { TransactionsStrategy } from './strategy.js';
|
|
5
5
|
import type { TransactionInvariant } from './invariants.js';
|
|
6
6
|
/**
|
|
7
7
|
* Options for {@link withTransactions}. Currently only commit-time
|
|
8
8
|
* changeset `invariants` (see {@link TransactionInvariant}).
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface WithTransactionsOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Commit-time set-level invariants run over the changeset on every
|
|
13
13
|
* commit (ordinary AND amendment). See {@link TransactionInvariant}.
|
|
@@ -16,7 +16,7 @@ export interface TransactionStrategyOptions {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Build the default transactions strategy. Pass into
|
|
19
|
-
* `createNoydb({
|
|
19
|
+
* `createNoydb({ transactionsStrategy: withTransactions() })` to enable
|
|
20
20
|
* `db.transaction(fn)` (and `db.transaction({ dryRun: true }, fn)`).
|
|
21
21
|
*
|
|
22
22
|
* Supply `{ invariants }` to register commit-time changeset invariants —
|
|
@@ -24,4 +24,4 @@ export interface TransactionStrategyOptions {
|
|
|
24
24
|
* transaction on a throw. Unlike `amendment.invariant`, these run for
|
|
25
25
|
* ordinary `db.transaction(fn)` calls (and amendments) with no role gate.
|
|
26
26
|
*/
|
|
27
|
-
export declare function withTransactions(opts?:
|
|
27
|
+
export declare function withTransactions(opts?: WithTransactionsOptions): TransactionsStrategy;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* code.
|
|
7
7
|
*/
|
|
8
8
|
export { withTransactions } from './active.js';
|
|
9
|
-
export type {
|
|
10
|
-
export type {
|
|
9
|
+
export type { WithTransactionsOptions } from './active.js';
|
|
10
|
+
export type { TransactionsStrategy } from './strategy.js';
|
|
11
11
|
export type { TransactionInvariant } from './invariants.js';
|
|
12
12
|
export { TxContext, TxVault, TxCollection, runTransaction } from './transaction.js';
|
|
13
13
|
export type { AmendmentTxOptions } from './transaction.js';
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* `InvariantError` thrown by the check passes through unwrapped).
|
|
31
31
|
*
|
|
32
32
|
* ```ts
|
|
33
|
-
* createNoydb({
|
|
33
|
+
* createNoydb({ transactionsStrategy: withTransactions({
|
|
34
34
|
* invariants: [{
|
|
35
35
|
* scope: 'payments',
|
|
36
36
|
* check(changes) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Strategy seam for the optional multi-record transaction service.
|
|
3
3
|
* `runTransaction` is only reachable through `withTransactions()`
|
|
4
|
-
* exported from `@noy-db/hub/
|
|
4
|
+
* exported from `@noy-db/hub/transactions`. Consumers who don't use
|
|
5
5
|
* `db.transaction(fn)` ship none of the ~288 LOC.
|
|
6
6
|
*
|
|
7
7
|
* @internal
|
|
@@ -13,11 +13,11 @@ import type { TransactionInvariant } from './invariants.js';
|
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export interface
|
|
16
|
+
export interface TransactionsStrategy {
|
|
17
17
|
runTransaction<T>(db: Noydb, fn: (tx: TxContext) => Promise<T> | T, options?: AmendmentTxOptions, txInvariants?: ReadonlyArray<TransactionInvariant>): Promise<T>;
|
|
18
18
|
runDryRun(db: Noydb, fn: (tx: TxContext) => unknown): Promise<DryRunResult>;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const NO_TRANSACTIONS: TransactionsStrategy;
|
|
@@ -12,3 +12,5 @@
|
|
|
12
12
|
export { withShadow } from './active.js';
|
|
13
13
|
export type { ShadowStrategy } from './strategy.js';
|
|
14
14
|
export { VaultFrame, CollectionFrame } from './vault-frame.js';
|
|
15
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
16
|
+
export { NO_SHADOW } from './strategy.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SnapshotsStrategy, RetentionPolicy } from './strategy.js';
|
|
2
2
|
import type { SnapshotPolicy } from './policy.js';
|
|
3
3
|
import type { NoydbPodStore } from '../../kernel/types.js';
|
|
4
4
|
export interface WithSnapshotsOptions {
|
|
@@ -17,4 +17,4 @@ export interface WithSnapshotsOptions {
|
|
|
17
17
|
*/
|
|
18
18
|
snapshotPolicy?: SnapshotPolicy;
|
|
19
19
|
}
|
|
20
|
-
export declare function withSnapshots(opts: WithSnapshotsOptions):
|
|
20
|
+
export declare function withSnapshots(opts: WithSnapshotsOptions): SnapshotsStrategy;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { withSnapshots } from './active.js';
|
|
2
2
|
export type { WithSnapshotsOptions } from './active.js';
|
|
3
|
-
export type {
|
|
3
|
+
export type { SnapshotsStrategy, SnapshotMeta, RetentionPolicy } from './strategy.js';
|
|
4
4
|
export type { SnapshotPolicy, SnapshotMode } from './policy.js';
|
|
5
5
|
export { SnapshotNotFoundError } from '../../kernel/errors.js';
|
|
6
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
7
|
+
export { NO_SNAPSHOTS } from './strategy.js';
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Internal service — reached through `noydb.snapshot(...)` etc.
|
|
11
11
|
*/
|
|
12
|
-
import { NO_SNAPSHOTS, type
|
|
12
|
+
import { NO_SNAPSHOTS, type SnapshotsStrategy, type SnapshotMeta } from './strategy.js';
|
|
13
13
|
import type { Vault } from '../../kernel/vault.js';
|
|
14
14
|
import type { WriteHook, Unsubscribe } from '../../port/with/write-hooks.js';
|
|
15
15
|
/** Everything the moving snapshot methods touched on the Noydb instance's `this.*`. */
|
|
16
16
|
export interface NoydbSnapshotsDeps {
|
|
17
17
|
/** Resolved snapshot strategy (NO_SNAPSHOTS when not configured). */
|
|
18
|
-
readonly strategy:
|
|
18
|
+
readonly strategy: SnapshotsStrategy;
|
|
19
19
|
/** Acting user id, used as the snapshot `by`. */
|
|
20
20
|
readonly user: string;
|
|
21
21
|
/** Whether the owning instance has been closed. */
|
|
@@ -32,7 +32,7 @@ export declare class NoydbSnapshots {
|
|
|
32
32
|
constructor(deps: NoydbSnapshotsDeps);
|
|
33
33
|
/**
|
|
34
34
|
* Take an on-demand checkpoint of the given vault.
|
|
35
|
-
* Requires `
|
|
35
|
+
* Requires `snapshotsStrategy: withSnapshots({ store })` in `createNoydb`.
|
|
36
36
|
* @throws ValidationError when the vault is not open
|
|
37
37
|
*/
|
|
38
38
|
snapshot(vault: string, opts?: {
|
|
@@ -29,7 +29,7 @@ export interface SnapshotIndex {
|
|
|
29
29
|
auto?: SnapshotMeta;
|
|
30
30
|
}
|
|
31
31
|
/** @internal */
|
|
32
|
-
export interface
|
|
32
|
+
export interface SnapshotsStrategy {
|
|
33
33
|
snapshot(vault: unknown, by: string, opts?: {
|
|
34
34
|
label?: string;
|
|
35
35
|
note?: string;
|
|
@@ -45,4 +45,4 @@ export interface SnapshotStrategy {
|
|
|
45
45
|
readonly policy?: SnapshotPolicy;
|
|
46
46
|
}
|
|
47
47
|
/** No-op stub. @internal */
|
|
48
|
-
export declare const NO_SNAPSHOTS:
|
|
48
|
+
export declare const NO_SNAPSHOTS: SnapshotsStrategy;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derivation dispatch, lifted out of the kernel spine (#842 part b).
|
|
3
|
+
*
|
|
4
|
+
* `Collection` carried ~380 lines of dispatch logic that belongs to the
|
|
5
|
+
* derivation service, not to the always-on kernel. These are free functions
|
|
6
|
+
* taking an explicit context so the spine keeps only a thin delegator.
|
|
7
|
+
*
|
|
8
|
+
* ## How the spine reaches this module
|
|
9
|
+
*
|
|
10
|
+
* By dynamic `import()`, never a static one. `check-architecture.mjs`'s
|
|
11
|
+
* `port-layering` check forbids the spine from statically importing a
|
|
12
|
+
* `with-*` service; `collection.ts` is grandfathered for ten
|
|
13
|
+
* `with-formula/*` specifiers, but that list is frozen per file and a new
|
|
14
|
+
* one is a violation. A dynamic import is the sanctioned S4 gate recipe, and
|
|
15
|
+
* it keeps this chunk out of the floor bundle for consumers who never fire a
|
|
16
|
+
* derivation.
|
|
17
|
+
*
|
|
18
|
+
* The `Collection` type reference below points back at the spine. That is
|
|
19
|
+
* inward (service → kernel) and so allowed, and it is TYPE-ONLY — erased at
|
|
20
|
+
* build, so no runtime cycle exists.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
import type { NoydbStore } from '../../kernel/types.js';
|
|
25
|
+
import type { TxContext } from '../../with-commit/tx/transaction.js';
|
|
26
|
+
import type { DerivationRegistry } from './registry.js';
|
|
27
|
+
import type { ReadOnlyVaultFacade } from '../../with-audit/guards/types.js';
|
|
28
|
+
import type { Collection } from '../../kernel/collection.js';
|
|
29
|
+
import type { EnclaveKey } from '../../kernel/enclave/index.js';
|
|
30
|
+
import type { EncryptedEnvelope } from '../../kernel/types.js';
|
|
31
|
+
import type { ledgerAuditHook, WaveContext } from '../../kernel/via/dispatch.js';
|
|
32
|
+
/** The per-write dispatch context threaded into `putDerivedOutput`. */
|
|
33
|
+
interface DispatchCtx {
|
|
34
|
+
emit: (e: string, p: unknown) => void;
|
|
35
|
+
source: {
|
|
36
|
+
readonly collection: string;
|
|
37
|
+
readonly id: string;
|
|
38
|
+
};
|
|
39
|
+
audit: ReturnType<typeof ledgerAuditHook>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* What the dispatchers need from the collection that owns them. Passing this
|
|
43
|
+
* explicitly is what lets the logic live outside the class.
|
|
44
|
+
*/
|
|
45
|
+
export interface DerivationDeleteCtx {
|
|
46
|
+
readonly derivationSource: {
|
|
47
|
+
registry(): DerivationRegistry;
|
|
48
|
+
getCollection(name: string): Collection<Record<string, unknown>>;
|
|
49
|
+
getActiveTxContext(): TxContext | null;
|
|
50
|
+
getReadOnlyFacade(): ReadOnlyVaultFacade;
|
|
51
|
+
};
|
|
52
|
+
/** The collection the delete happened in. */
|
|
53
|
+
readonly collectionName: string;
|
|
54
|
+
readonly adapter: NoydbStore;
|
|
55
|
+
readonly vault: string;
|
|
56
|
+
readonly getDEK: (collectionName: string) => Promise<EnclaveKey>;
|
|
57
|
+
readonly storeCiphertext: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Erase the derived rows a deleted source record fanned out to, and drop the
|
|
61
|
+
* fan-out sidecars that recorded them.
|
|
62
|
+
*
|
|
63
|
+
* @param eraseRecordShapeToo also erase same-id `shape: 'record'` outputs.
|
|
64
|
+
* Restricted to a source-triggered strategy writing into a DIFFERENT
|
|
65
|
+
* collection — the self-denorm case would re-delete the record just
|
|
66
|
+
* tombstoned, and triggerBy/sibling strategies derive under a different id.
|
|
67
|
+
* @returns rows ACTUALLY deleted, not edges visited (#622).
|
|
68
|
+
*/
|
|
69
|
+
export declare function dispatchArrayDerivationsOnDelete(ctx: DerivationDeleteCtx, id: string, eraseRecordShapeToo?: boolean): Promise<number>;
|
|
70
|
+
/** Adds what the on-write derivation dispatch needs beyond the delete path. */
|
|
71
|
+
export interface DerivationDispatchCtx extends DerivationDeleteCtx {
|
|
72
|
+
/** Via pipeline, for decoding the stored form back to canonical money shape. */
|
|
73
|
+
readonly via: {
|
|
74
|
+
canonicalizeStored(r: Record<string, unknown>): Record<string, unknown>;
|
|
75
|
+
} | undefined;
|
|
76
|
+
/** Recompute a rollup aggregate onto a parent. Stays on the spine — it walks collections. */
|
|
77
|
+
readonly recomputeRollup: (spec: any, parentId: string, source: {
|
|
78
|
+
readonly collection: string;
|
|
79
|
+
readonly id: string;
|
|
80
|
+
}, wave?: WaveContext) => Promise<unknown>;
|
|
81
|
+
/** Builds the per-write dispatch context threaded into `putDerivedOutput`. */
|
|
82
|
+
readonly dispatchCtx: (source: {
|
|
83
|
+
readonly collection: string;
|
|
84
|
+
readonly id: string;
|
|
85
|
+
}) => DispatchCtx;
|
|
86
|
+
/** Registers a write on the active transaction for rollback. */
|
|
87
|
+
readonly trackPut: (txCtx: TxContext, collectionName: string, id: string, priorEnvelope: EncryptedEnvelope | null) => void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Fire registered derivation strategies for this source collection.
|
|
91
|
+
*
|
|
92
|
+
* Eager mode runs `derive` inline and writes each output; lazy mode records a
|
|
93
|
+
* stale mark for cold-session recompute. Rollups are handled here rather than
|
|
94
|
+
* by the executor — a write to the child recomputes the parent aggregate, and
|
|
95
|
+
* a write to the parent recomputes its own.
|
|
96
|
+
*/
|
|
97
|
+
export declare function dispatchDerivations(ctx: DerivationDispatchCtx, id: string, record: Record<string, unknown>, version: number, wave?: WaveContext): Promise<void>;
|
|
98
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DerivationContext,
|
|
1
|
+
import type { DerivationContext, DerivationSpec } from './types.js';
|
|
2
2
|
export interface RunResult {
|
|
3
3
|
outputs: Record<string, OutputResult>;
|
|
4
4
|
failed: boolean;
|
|
@@ -55,7 +55,7 @@ export declare const DerivationExecutor: {
|
|
|
55
55
|
* `_derivedFrom` onto every output. Returns per-output success or
|
|
56
56
|
* failure; throws only for shape mismatches (a contract violation).
|
|
57
57
|
*/
|
|
58
|
-
run<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(strategy:
|
|
58
|
+
run<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(strategy: DerivationSpec<TSource, TOutputs>, source: TSource & {
|
|
59
59
|
id: string;
|
|
60
60
|
}, sourceVersion: number, strategyHash: string, ctx: DerivationContext): Promise<RunResult>;
|
|
61
61
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { withDerivation } from './with-derivation.js';
|
|
2
2
|
export { withRollup } from './with-rollup.js';
|
|
3
|
+
export type { WithRollupOptions } from './with-rollup.js';
|
|
3
4
|
export { DerivationRegistry } from './registry.js';
|
|
4
5
|
export { DerivationExecutor } from './executor.js';
|
|
5
|
-
export type {
|
|
6
|
+
export type { DerivationSpec, DerivationStrategy, DerivedFromMeta, OutputSpec, RecordOutputSpec, ArrayOutputSpec, } from './types.js';
|
|
6
7
|
export { DerivationCycleError, DerivationDepthError, DerivationOutputUnknownError, DerivationOutputShapeError, DerivationCapExceededError, } from '../../kernel/errors.js';
|
|
8
|
+
export type { DerivationContext } from './types.js';
|
|
9
|
+
export type { RunResult } from './executor.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ViaGraph, type FieldRef, type EdgeKind, type Grain } from '../../kernel/via/graph.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DerivationSpec } from './types.js';
|
|
3
3
|
interface RegisteredStrategy {
|
|
4
|
-
spec:
|
|
4
|
+
spec: DerivationSpec<any, any>;
|
|
5
5
|
strategyHash: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -13,7 +13,7 @@ interface RegisteredStrategy {
|
|
|
13
13
|
export declare class DerivationRegistry {
|
|
14
14
|
private readonly _bySource;
|
|
15
15
|
private readonly _byOutput;
|
|
16
|
-
register(spec:
|
|
16
|
+
register(spec: DerivationSpec<any, any>): Promise<void>;
|
|
17
17
|
strategiesForSource(source: string): ReadonlyArray<RegisteredStrategy>;
|
|
18
18
|
strategiesProducingOutput(collection: string): ReadonlyArray<RegisteredStrategy>;
|
|
19
19
|
/**
|