@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
|
@@ -2,7 +2,7 @@ import type { Collection } from '../../kernel/collection.js';
|
|
|
2
2
|
import type { ReadOnlyVaultFacade } from '../../with-audit/guards/types.js';
|
|
3
3
|
import type { TxContext } from '../../with-commit/tx/transaction.js';
|
|
4
4
|
import type { DerivationRegistry } from './registry.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { DerivationSpec } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Accessor shape passed through from the owning Vault. Provides the
|
|
8
8
|
* registry (used to look up strategies and as the WeakMap key) and a
|
|
@@ -29,7 +29,7 @@ export interface DerivationStaleAccessor {
|
|
|
29
29
|
getActiveTxContext(): TxContext | null;
|
|
30
30
|
}
|
|
31
31
|
/** Mark every output of (strategy, sourceId) as stale. */
|
|
32
|
-
export declare function markStale(registry: DerivationRegistry, strategy:
|
|
32
|
+
export declare function markStale(registry: DerivationRegistry, strategy: DerivationSpec<any, any>, sourceId: string): Promise<void>;
|
|
33
33
|
/**
|
|
34
34
|
* Called from `Collection.get` on lazy-mode output collections. If the
|
|
35
35
|
* id has a pending stale flag for any strategy producing this output
|
|
@@ -119,7 +119,7 @@ export type OutputSpec = RecordOutputSpec | ArrayOutputSpec;
|
|
|
119
119
|
* value may be a single record, or — for `shape: 'array'` outputs — an
|
|
120
120
|
* array of records (the fanout sidecar upserts/deletes each row).
|
|
121
121
|
*/
|
|
122
|
-
export interface
|
|
122
|
+
export interface DerivationSpec<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>> {
|
|
123
123
|
/** Source collection name. */
|
|
124
124
|
source: string;
|
|
125
125
|
/**
|
|
@@ -242,7 +242,7 @@ export interface DerivationStrategy<TSource extends Record<string, unknown>, TOu
|
|
|
242
242
|
strict?: boolean;
|
|
243
243
|
}
|
|
244
244
|
/** Returned by `withDerivation()` and consumed by `createNoydb`. */
|
|
245
|
-
export interface
|
|
245
|
+
export interface DerivationStrategy {
|
|
246
246
|
readonly __noydb_strategy: 'derivation';
|
|
247
|
-
readonly spec:
|
|
247
|
+
readonly spec: DerivationSpec<any, any>;
|
|
248
248
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DerivationSpec, DerivationStrategy } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Register a deterministic derivation: one source collection → one or
|
|
4
4
|
* more typed outputs, computed by the user's `derive` function on
|
|
@@ -7,4 +7,4 @@ import type { DerivationStrategy, DerivationStrategyHandle } from './types.js';
|
|
|
7
7
|
*
|
|
8
8
|
* See docs/superpowers/specs/2026-05-01-dim14-derivation-v1-design.md.
|
|
9
9
|
*/
|
|
10
|
-
export declare function withDerivation<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(spec:
|
|
10
|
+
export declare function withDerivation<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(spec: DerivationSpec<TSource, TOutputs>): DerivationStrategy;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DerivationStrategy } from './types.js';
|
|
2
|
+
/** Options for {@link withRollup} (#844b — was an inline literal, so unnameable). */
|
|
3
|
+
export interface WithRollupOptions<TChild extends Record<string, unknown> = Record<string, unknown>, TParent extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
|
+
/** Child collection — the trigger. */
|
|
5
|
+
readonly from: string;
|
|
6
|
+
/** FK field on the child pointing at the parent id. */
|
|
7
|
+
readonly key: keyof TChild & string;
|
|
8
|
+
/** Parent collection carrying the maintained summary. */
|
|
9
|
+
readonly into: string;
|
|
10
|
+
/** Field on the parent to maintain. */
|
|
11
|
+
readonly field: keyof TParent & string;
|
|
12
|
+
/** Reduces the matching children to the value written at `field`. */
|
|
13
|
+
readonly compute: (children: TChild[]) => unknown;
|
|
14
|
+
}
|
|
2
15
|
/**
|
|
3
16
|
* `withRollup` — aggregate many child records onto a single field of their
|
|
4
17
|
* parent. The reverse of a join: instead of reading children
|
|
@@ -25,10 +38,4 @@ import type { DerivationStrategyHandle } from './types.js';
|
|
|
25
38
|
* Desugars to a `withDerivation` strategy carrying a `rollup` marker; dispatch
|
|
26
39
|
* handles it without invoking the executor. Eager-only in this slice.
|
|
27
40
|
*/
|
|
28
|
-
export declare function withRollup<TChild extends Record<string, unknown> = Record<string, unknown>, TParent extends Record<string, unknown> = Record<string, unknown>>(
|
|
29
|
-
from: string;
|
|
30
|
-
key: keyof TChild & string;
|
|
31
|
-
into: string;
|
|
32
|
-
field: keyof TParent & string;
|
|
33
|
-
compute: (children: TChild[]) => unknown;
|
|
34
|
-
}): DerivationStrategyHandle;
|
|
41
|
+
export declare function withRollup<TChild extends Record<string, unknown> = Record<string, unknown>, TParent extends Record<string, unknown> = Record<string, unknown>>(opts: WithRollupOptions<TChild, TParent>): DerivationStrategy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Query } from '../../kernel/query/builder.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MaterializedViewSpec } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Walks a `Query<T>` plan and returns the set of source collection
|
|
5
5
|
* names that any source-write should trigger a refresh on.
|
|
@@ -55,7 +55,7 @@ export declare function summarizeQueryPlan(query: Query<any>): string;
|
|
|
55
55
|
* the MV's `name` (or rely on application-level cache busting) when
|
|
56
56
|
* `map` semantics change non-equivalently.
|
|
57
57
|
*/
|
|
58
|
-
export declare function summarizeUnionPlan<T extends Record<string, unknown>>(spec:
|
|
58
|
+
export declare function summarizeUnionPlan<T extends Record<string, unknown>>(spec: MaterializedViewSpec<T>): string;
|
|
59
59
|
/**
|
|
60
60
|
* Canonical string description of a projection MV's plan (#810), used
|
|
61
61
|
* as input to `computeQueryHash`.
|
|
@@ -70,4 +70,4 @@ export declare function summarizeUnionPlan<T extends Record<string, unknown>>(sp
|
|
|
70
70
|
* the UNION arm `map`); consumers must bump the MV's `name` when
|
|
71
71
|
* `map` semantics change non-equivalently.
|
|
72
72
|
*/
|
|
73
|
-
export declare function summarizeProjectionPlan<T extends Record<string, unknown>>(spec:
|
|
73
|
+
export declare function summarizeProjectionPlan<T extends Record<string, unknown>>(spec: MaterializedViewSpec<T>): string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Materialized-view dispatch, lifted out of the kernel spine (#842 part b).
|
|
3
|
+
*
|
|
4
|
+
* Reached from `Collection` by dynamic `import()` only — `port-layering`
|
|
5
|
+
* forbids a static spine→`with-*` import, and rejects a type-only one too
|
|
6
|
+
* (it scans import statements, not their erasure). See
|
|
7
|
+
* `with-formula/derivations/dispatch.ts` for the same note.
|
|
8
|
+
*
|
|
9
|
+
* The `Collection` reference below is TYPE-ONLY and points inward
|
|
10
|
+
* (service → kernel), so it is both allowed and erased at build.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
import type { TxContext } from '../../with-commit/tx/transaction.js';
|
|
15
|
+
import type { Collection } from '../../kernel/collection.js';
|
|
16
|
+
import type { ledgerAuditHook, WaveContext } from '../../kernel/via/dispatch.js';
|
|
17
|
+
import type { MaterializedViewRegistry } from './registry.js';
|
|
18
|
+
import type { MVQueryContext } from './types.js';
|
|
19
|
+
/** The per-write dispatch context the MV executor threads through. */
|
|
20
|
+
interface DispatchCtx {
|
|
21
|
+
emit: (e: string, p: unknown) => void;
|
|
22
|
+
source: {
|
|
23
|
+
readonly collection: string;
|
|
24
|
+
readonly id: string;
|
|
25
|
+
};
|
|
26
|
+
audit: ReturnType<typeof ledgerAuditHook>;
|
|
27
|
+
}
|
|
28
|
+
/** What the MV dispatchers need from the collection that owns them. */
|
|
29
|
+
export interface MvDispatchCtx {
|
|
30
|
+
readonly materializedViewSource: {
|
|
31
|
+
registry(): MaterializedViewRegistry;
|
|
32
|
+
getCollection(name: string): Collection<any>;
|
|
33
|
+
getActiveTxContext(): TxContext | null;
|
|
34
|
+
getQueryContext(): MVQueryContext;
|
|
35
|
+
};
|
|
36
|
+
/** The collection the delete happened in. */
|
|
37
|
+
readonly collectionName: string;
|
|
38
|
+
/** Builds the per-write dispatch context the executor threads through. */
|
|
39
|
+
readonly dispatchCtx: (source: {
|
|
40
|
+
readonly collection: string;
|
|
41
|
+
readonly id: string;
|
|
42
|
+
}) => DispatchCtx;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Fire every MV whose dependency set includes this collection, on write.
|
|
46
|
+
*
|
|
47
|
+
* Skips entirely when the record being written is itself an MV-emitted row
|
|
48
|
+
* (it carries `_materializedFrom`) — a defensive guard against missed cycle
|
|
49
|
+
* detection.
|
|
50
|
+
*
|
|
51
|
+
* @param wave #638 Task 4 — the sync/cutover/restore dispatch wave. An eager
|
|
52
|
+
* MV already refreshed in this wave is skipped, deduped per target on the
|
|
53
|
+
* spec name.
|
|
54
|
+
*/
|
|
55
|
+
export declare function dispatchMaterializedViews(ctx: MvDispatchCtx, id: string, record: Record<string, unknown>, wave?: WaveContext): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Mirror of {@link dispatchMaterializedViews} for the delete/forget path. There is
|
|
58
|
+
* no `_materializedFrom` skip — the record is gone — and the `internal` gate
|
|
59
|
+
* at `_doDelete` is the recursion guard.
|
|
60
|
+
*
|
|
61
|
+
* @returns rows TOMBSTONED across every MV sourced here (#638 T6). Eager and
|
|
62
|
+
* lazy/manual `invalidateMVAtRest` purges both contribute (#761 item 1,
|
|
63
|
+
* previously eager-only): lazy persists a stale mark for cold-session
|
|
64
|
+
* recompute, manual serves empty until `refreshView()`.
|
|
65
|
+
* `residueUndecodable` / `residueDeclined` (#776/#785) carry
|
|
66
|
+
* `outputCollection:id` entries whose ownership stamp `invalidateMVAtRest`
|
|
67
|
+
* could not decode, respectively decoded and stamp-matched but declined to
|
|
68
|
+
* erase — surfaced, not erased.
|
|
69
|
+
*/
|
|
70
|
+
export declare function dispatchMaterializedViewsOnDelete(ctx: MvDispatchCtx, id: string): Promise<{
|
|
71
|
+
deleted: number;
|
|
72
|
+
residueUndecodable: string[];
|
|
73
|
+
residueDeclined: string[];
|
|
74
|
+
}>;
|
|
75
|
+
export {};
|
|
@@ -5,7 +5,8 @@ export { analyzeDependencies, summarizeQueryPlan } from './dependency-analyzer.j
|
|
|
5
5
|
export { computeQueryHash, canonicalizeQueryPlan } from './query-hash.js';
|
|
6
6
|
export { markMVStale, resolveStaleMVOnRead, isMVStale, clearMVStale } from './stale.js';
|
|
7
7
|
export type { MVStaleAccessor } from './stale.js';
|
|
8
|
-
export type {
|
|
8
|
+
export type { MaterializedViewSpec, MaterializedViewStrategy, MaterializedViewOutput, MaterializedFromMeta, UnionSource, UnionArmJoin, ProjectionSpec, ProjectionJoinLeg, } from './types.js';
|
|
9
9
|
export type { RegisteredMV } from './registry.js';
|
|
10
10
|
export type { MVExecutorAccessor, RefreshResult } from './executor.js';
|
|
11
11
|
export { MaterializedViewCycleError, MaterializedViewConfigError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, } from '../../kernel/errors.js';
|
|
12
|
+
export type { PutDerivedOutputCtx } from '../../kernel/via/dispatch.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ViaGraph, FieldRef, EdgeKind, Grain } from '../../kernel/via/graph.js';
|
|
2
2
|
import type { FieldClause } from '../../kernel/query/predicate.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { MaterializedViewSpec, MVQueryContext } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* One registered MV strategy alongside its derived metadata. Stored
|
|
6
6
|
* type-erased on `TRow` so the registry can hold heterogeneous MVs.
|
|
7
7
|
*/
|
|
8
8
|
export interface RegisteredMV {
|
|
9
|
-
readonly spec:
|
|
9
|
+
readonly spec: MaterializedViewSpec<any>;
|
|
10
10
|
/** Output collection name (`spec.output?.collection ?? spec.name`). */
|
|
11
11
|
readonly outputCollection: string;
|
|
12
12
|
/** Set of source collections; populated at registration via the analyzer. */
|
|
@@ -65,7 +65,7 @@ export declare class MaterializedViewRegistry {
|
|
|
65
65
|
* surfaces a dependency the vault doesn't know about (when a
|
|
66
66
|
* `knownCollections` checker is supplied).
|
|
67
67
|
*/
|
|
68
|
-
register(spec:
|
|
68
|
+
register(spec: MaterializedViewSpec<any>, db: MVQueryContext, options?: {
|
|
69
69
|
knownCollections?: (name: string) => boolean;
|
|
70
70
|
}): Promise<void>;
|
|
71
71
|
/** All MVs that depend on `source`, in registration order. */
|
|
@@ -125,4 +125,4 @@ export declare class MaterializedViewRegistry {
|
|
|
125
125
|
*
|
|
126
126
|
* @internal
|
|
127
127
|
*/
|
|
128
|
-
export declare function wrapDbWithPredicates(db: MVQueryContext, predicates: NonNullable<
|
|
128
|
+
export declare function wrapDbWithPredicates(db: MVQueryContext, predicates: NonNullable<MaterializedViewSpec<Record<string, unknown>>['predicates']>): MVQueryContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Query } from '../../kernel/query/builder.js';
|
|
2
2
|
import type { Collection } from '../../kernel/collection.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { ReduceSpec, Reduction } from '../../with-lookup/reduce/reduction.js';
|
|
4
|
+
import type { GroupedReduction } from '../../with-lookup/reduce/groupby.js';
|
|
5
5
|
import type { JoinStrategy } from '../../kernel/query/join.js';
|
|
6
6
|
import type { MoneyDescriptor } from '../../via/money/descriptor.js';
|
|
7
7
|
import type { I18nTextDescriptor } from '../../via/i18n/core.js';
|
|
@@ -97,7 +97,7 @@ export interface UnionSource<TRow extends Record<string, unknown>> {
|
|
|
97
97
|
* `as` — the same machinery as the query-form `Query.join()`.
|
|
98
98
|
*
|
|
99
99
|
* The right-side collections must be listed in the strategy's
|
|
100
|
-
* {@link
|
|
100
|
+
* {@link MaterializedViewSpec.sources} so writes to them trigger
|
|
101
101
|
* MV refresh — registration throws `MaterializedViewConfigError`
|
|
102
102
|
* otherwise (the union dependency set comes from arm `collection`s
|
|
103
103
|
* alone, which would not include join targets).
|
|
@@ -185,7 +185,7 @@ export type ProjectionJoinLeg = {
|
|
|
185
185
|
*
|
|
186
186
|
* @typeParam TRow - the materialized row type (the query's result row)
|
|
187
187
|
*/
|
|
188
|
-
export interface
|
|
188
|
+
export interface MaterializedViewSpec<TRow extends Record<string, unknown>> {
|
|
189
189
|
/**
|
|
190
190
|
* Stable identity for this view. Used as the output collection name
|
|
191
191
|
* unless `output.collection` overrides. Must be unique within the vault.
|
|
@@ -207,7 +207,7 @@ export interface MaterializedViewStrategy<TRow extends Record<string, unknown>>
|
|
|
207
207
|
* (multi-source UNION). Registration throws
|
|
208
208
|
* `MaterializedViewConfigError` if both are set or neither is set.
|
|
209
209
|
*/
|
|
210
|
-
query?: (db: MVQueryContext) => Query<TRow> |
|
|
210
|
+
query?: (db: MVQueryContext) => Query<TRow> | Reduction<TRow> | GroupedReduction<TRow>;
|
|
211
211
|
/**
|
|
212
212
|
* UNION-form sources: an explicit list of sibling collections
|
|
213
213
|
* that contribute rows to a single MV. Each arm's `map` projects a
|
|
@@ -261,14 +261,14 @@ export interface MaterializedViewStrategy<TRow extends Record<string, unknown>>
|
|
|
261
261
|
*/
|
|
262
262
|
groupBy?: string | ReadonlyArray<string>;
|
|
263
263
|
/**
|
|
264
|
-
*
|
|
264
|
+
* Reduction spec for UNION mode. Applied per-group after
|
|
265
265
|
* {@link groupBy} buckets the concatenated mapped-row stream from
|
|
266
|
-
* {@link unionSources}. Same shape as the `
|
|
266
|
+
* {@link unionSources}. Same shape as the `ReduceSpec` passed to
|
|
267
267
|
* `Query.aggregate()`.
|
|
268
268
|
*
|
|
269
269
|
* UNION-mode only. Ignored if {@link query} is set.
|
|
270
270
|
*/
|
|
271
|
-
aggregate?:
|
|
271
|
+
aggregate?: ReduceSpec;
|
|
272
272
|
/**
|
|
273
273
|
* Money descriptors for the UNION-mode aggregate, keyed by the
|
|
274
274
|
* OUTPUT/intermediate field name as it appears in the mapped row and
|
|
@@ -325,7 +325,7 @@ export interface MaterializedViewStrategy<TRow extends Record<string, unknown>>
|
|
|
325
325
|
rowKey: (row: TRow) => string;
|
|
326
326
|
/**
|
|
327
327
|
* Explicit source collections. Required when `query()` returns
|
|
328
|
-
* an `
|
|
328
|
+
* an `Reduction` or `GroupedReduction` rather than a `Query<T>`
|
|
329
329
|
* — the dependency analyzer can't introspect through `groupBy().aggregate()`
|
|
330
330
|
* back to the source. Optional for plain `Query<T>` results — the
|
|
331
331
|
* analyzer extracts dependencies automatically from the query plan.
|
|
@@ -393,7 +393,7 @@ export interface MaterializedViewStrategy<TRow extends Record<string, unknown>>
|
|
|
393
393
|
maxRows?: number;
|
|
394
394
|
}
|
|
395
395
|
/** Returned by `withMaterializedView()` and consumed by `createNoydb`. */
|
|
396
|
-
export interface
|
|
396
|
+
export interface MaterializedViewStrategy {
|
|
397
397
|
readonly __noydb_strategy: 'materialized-view';
|
|
398
|
-
readonly spec:
|
|
398
|
+
readonly spec: MaterializedViewSpec<any>;
|
|
399
399
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MaterializedViewSpec, MaterializedViewStrategy } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Register a materialized view: a declared query whose result is
|
|
4
4
|
* persisted as a queryable collection and kept fresh as sources
|
|
@@ -25,4 +25,4 @@ import type { MaterializedViewStrategy, MaterializedViewStrategyHandle } from '.
|
|
|
25
25
|
* docs/superpowers/specs/2026-05-21-dim14-mv-multikey-and-union.md (UNION),
|
|
26
26
|
* and docs/superpowers/specs/2026-07-25-join-projection-mv-design.md (projection).
|
|
27
27
|
*/
|
|
28
|
-
export declare function withMaterializedView<TRow extends Record<string, unknown>>(spec:
|
|
28
|
+
export declare function withMaterializedView<TRow extends Record<string, unknown>>(spec: MaterializedViewSpec<TRow>): MaterializedViewStrategy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { withOverlayedView } from './with-overlayed-view.js';
|
|
2
2
|
export { OverlayedViewRegistry } from './registry.js';
|
|
3
3
|
export { OverlayedCollection } from './virtual-collection.js';
|
|
4
|
-
export type {
|
|
4
|
+
export type { OverlayedViewSpec, OverlayedViewStrategy, OverlayFieldMergeRule, OverlayFieldMergeMode, } from './types.js';
|
|
5
5
|
export { OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError, } from '../../kernel/errors.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MaterializedViewRegistry } from '../materialized-views/registry.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { OverlayedViewSpec } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Vault-internal registry of overlay strategies. Resolves the base
|
|
5
5
|
* MV's `rowKey` lazily so virtual-collection writes can derive ids
|
|
@@ -15,12 +15,12 @@ export declare class OverlayedViewRegistry {
|
|
|
15
15
|
* declared without the MV registry context skip cross-registry
|
|
16
16
|
* checks but still validate self-consistency.
|
|
17
17
|
*/
|
|
18
|
-
register(spec:
|
|
18
|
+
register(spec: OverlayedViewSpec, options: {
|
|
19
19
|
isOverlayName?: (name: string) => boolean;
|
|
20
20
|
isMVOutput?: (name: string) => boolean;
|
|
21
21
|
isKnownCollection?: (name: string) => boolean;
|
|
22
22
|
}): void;
|
|
23
|
-
byName(name: string):
|
|
23
|
+
byName(name: string): OverlayedViewSpec | undefined;
|
|
24
24
|
/** All overlay virtual names. */
|
|
25
25
|
names(): ReadonlySet<string>;
|
|
26
26
|
isOverlay(name: string): boolean;
|
|
@@ -31,7 +31,7 @@ export declare class OverlayedViewRegistry {
|
|
|
31
31
|
*
|
|
32
32
|
* Used by `dumpSchema()` to populate the `overlayViews` map.
|
|
33
33
|
*/
|
|
34
|
-
all(): ReadonlyArray<
|
|
34
|
+
all(): ReadonlyArray<OverlayedViewSpec>;
|
|
35
35
|
/**
|
|
36
36
|
* Resolve the `rowKey` function for an overlay's base MV. Returns
|
|
37
37
|
* `undefined` if the base isn't an MV (raw source collection) or
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* v2 ships the read-shadow variant only — arbitrary `mergePolicy`
|
|
7
7
|
* callbacks are deferred to v3.
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface OverlayedViewSpec {
|
|
10
10
|
/**
|
|
11
11
|
* Virtual collection name. `vault.collection(name)` returns a
|
|
12
12
|
* proxy that merges `base` and `overlay` per the shadow rule.
|
|
@@ -91,7 +91,7 @@ export interface OverlayFieldMergeMode {
|
|
|
91
91
|
readonly rules: readonly OverlayFieldMergeRule[];
|
|
92
92
|
}
|
|
93
93
|
/** Returned by `withOverlayedView()` and consumed by `createNoydb`. */
|
|
94
|
-
export interface
|
|
94
|
+
export interface OverlayedViewStrategy {
|
|
95
95
|
readonly __noydb_strategy: 'overlayed-view';
|
|
96
|
-
readonly spec:
|
|
96
|
+
readonly spec: OverlayedViewSpec;
|
|
97
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Collection } from '../../kernel/collection.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { OverlayedViewSpec } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Virtual-collection proxy returned by `vault.collection(overlayName)`
|
|
5
5
|
* when `overlayName` is a registered `withOverlayedView`.
|
|
@@ -23,7 +23,7 @@ export declare class OverlayedCollection<T extends Record<string, unknown> = any
|
|
|
23
23
|
private readonly baseCollection;
|
|
24
24
|
private readonly overlayCollection;
|
|
25
25
|
private readonly baseRowKey;
|
|
26
|
-
constructor(spec:
|
|
26
|
+
constructor(spec: OverlayedViewSpec, baseCollection: Collection<T>, overlayCollection: Collection<T>, baseRowKey: ((row: Record<string, unknown>) => string) | undefined);
|
|
27
27
|
/**
|
|
28
28
|
* Convenience accessors for advanced callers that need to bypass the
|
|
29
29
|
* virtual layer (bulk imports, direct overlay queries). Mirrors the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OverlayedViewSpec, OverlayedViewStrategy } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Register a read-shadow overlay: bind an MV-owned base collection to
|
|
4
4
|
* a user-writable overlay so consumers can express operator-editable
|
|
@@ -6,4 +6,4 @@ import type { OverlayedViewStrategy, OverlayedViewStrategyHandle } from './types
|
|
|
6
6
|
*
|
|
7
7
|
* See docs/superpowers/specs/2026-05-20-dim14-mv-v2-design.md.
|
|
8
8
|
*/
|
|
9
|
-
export declare function withOverlayedView(spec:
|
|
9
|
+
export declare function withOverlayedView(spec: OverlayedViewSpec): OverlayedViewStrategy;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Active indexing strategy factory. Calling `withIndexing()` returns
|
|
3
|
-
* an `
|
|
3
|
+
* an `IndexingStrategy` whose `createState` constructs a real
|
|
4
4
|
* `CollectionIndexes` (eager) or `PersistedCollectionIndex` (lazy)
|
|
5
5
|
* per Collection, depending on the collection's `prefetch` mode and
|
|
6
6
|
* its declared `IndexDef[]`.
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* subpath — a consumer that never imports the subpath ships none of
|
|
10
10
|
* this (ESM tree-shaking + hub's `"sideEffects": false`).
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { IndexingStrategy } from './strategy.js';
|
|
13
13
|
/**
|
|
14
14
|
* Build the default indexing strategy. Pass into
|
|
15
|
-
* `createNoydb({
|
|
15
|
+
* `createNoydb({ indexingStrategy: withIndexing() })` to light up the
|
|
16
16
|
* eager-mode `==/in` fast-path on `.query()` and the full lazy-mode
|
|
17
17
|
* `.lazyQuery()` + rebuild / reconcile / auto-reconcile surface.
|
|
18
18
|
*
|
|
@@ -23,8 +23,8 @@ import type { IndexStrategy } from './strategy.js';
|
|
|
23
23
|
*
|
|
24
24
|
* const db = await createNoydb({
|
|
25
25
|
* store, user, secret,
|
|
26
|
-
*
|
|
26
|
+
* indexingStrategy: withIndexing(),
|
|
27
27
|
* })
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export declare function withIndexing():
|
|
30
|
+
export declare function withIndexing(): IndexingStrategy;
|
|
@@ -18,10 +18,12 @@
|
|
|
18
18
|
* capability boundary is explicit in import statements.
|
|
19
19
|
*/
|
|
20
20
|
export { withIndexing } from './active.js';
|
|
21
|
-
export type {
|
|
21
|
+
export type { IndexingStrategy, IndexState } from './strategy.js';
|
|
22
22
|
export { CollectionIndexes } from './eager-indexes.js';
|
|
23
23
|
export type { IndexDef, HashIndex } from './eager-indexes.js';
|
|
24
24
|
export { PersistedCollectionIndex, IDX_PREFIX, COMPOSITE_DELIMITER, encodeIdxId, decodeIdxId, isIdxId, compositeKey, } from './persisted-indexes.js';
|
|
25
25
|
export type { OrderedEntry, IngestRow, PersistedIndexDef, } from './persisted-indexes.js';
|
|
26
26
|
export { LazyQuery } from './lazy-builder.js';
|
|
27
27
|
export type { LazyQuerySource, LazyOrderBy } from './lazy-builder.js';
|
|
28
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
29
|
+
export { NO_INDEXING } from './strategy.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Strategy seam between core Collection and the optional indexing
|
|
3
|
-
* service. Core imports `
|
|
3
|
+
* service. Core imports `IndexingStrategy` and `IndexState` as
|
|
4
4
|
* TYPE-ONLY symbols and `NO_INDEXING` as a tiny runtime stub.
|
|
5
5
|
*
|
|
6
6
|
* The heavy classes — `CollectionIndexes`, `PersistedCollectionIndex`,
|
|
@@ -39,7 +39,7 @@ export interface IndexState {
|
|
|
39
39
|
*
|
|
40
40
|
* @internal
|
|
41
41
|
*/
|
|
42
|
-
export interface
|
|
42
|
+
export interface IndexingStrategy {
|
|
43
43
|
createState(args: {
|
|
44
44
|
readonly defs: readonly IndexDef[];
|
|
45
45
|
readonly lazy: boolean;
|
|
@@ -53,4 +53,4 @@ export interface IndexStrategy {
|
|
|
53
53
|
*
|
|
54
54
|
* @internal
|
|
55
55
|
*/
|
|
56
|
-
export declare const NO_INDEXING:
|
|
56
|
+
export declare const NO_INDEXING: IndexingStrategy;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Active aggregate strategy factory. Calling `
|
|
3
|
-
* an `
|
|
2
|
+
* Active aggregate strategy factory. Calling `withReduce()` returns
|
|
3
|
+
* an `ReduceStrategy` whose methods construct real `Reduction` /
|
|
4
4
|
* `GroupedQuery` instances and run the streaming reducer protocol.
|
|
5
5
|
*
|
|
6
|
-
* This module is only reachable through the `@noy-db/hub/
|
|
6
|
+
* This module is only reachable through the `@noy-db/hub/reduce`
|
|
7
7
|
* subpath — a consumer that never imports the subpath ships none of
|
|
8
8
|
* this (ESM tree-shaking + hub's `"sideEffects": false`).
|
|
9
9
|
*/
|
|
10
|
-
import type {
|
|
10
|
+
import type { ReduceStrategy } from './strategy.js';
|
|
11
11
|
/**
|
|
12
12
|
* Build the default aggregate strategy. Pass into
|
|
13
|
-
* `createNoydb({
|
|
13
|
+
* `createNoydb({ reduceStrategy: withReduce() })` to light up
|
|
14
14
|
* `.aggregate()` and `.groupBy()` on `Query` and `ScanBuilder`.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
18
18
|
* import { createNoydb } from '@noy-db/hub'
|
|
19
|
-
* import {
|
|
19
|
+
* import { withReduce, sum, count } from '@noy-db/hub/reduce'
|
|
20
20
|
*
|
|
21
21
|
* const db = await createNoydb({
|
|
22
22
|
* store, user, secret,
|
|
23
|
-
*
|
|
23
|
+
* reduceStrategy: withReduce(),
|
|
24
24
|
* })
|
|
25
25
|
*
|
|
26
26
|
* const totals = invoices.query()
|
|
@@ -30,4 +30,4 @@ import type { AggregateStrategy } from './strategy.js';
|
|
|
30
30
|
* .run()
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
export declare function
|
|
33
|
+
export declare function withReduce(): ReduceStrategy;
|