@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/kernel/lazy.ts
|
|
2
|
+
function lazy(load) {
|
|
3
|
+
let cached;
|
|
4
|
+
let inflight;
|
|
5
|
+
return async () => {
|
|
6
|
+
if (cached !== void 0) return cached;
|
|
7
|
+
inflight ??= load().then((mod) => {
|
|
8
|
+
cached = mod;
|
|
9
|
+
inflight = void 0;
|
|
10
|
+
return mod;
|
|
11
|
+
});
|
|
12
|
+
return inflight;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
lazy
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chunk-5D2ALSM5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/kernel/lazy.ts"],"sourcesContent":["/**\n * Memoized module loader for the S4 lazy-import seam (#846c).\n *\n * The spine and the services reach optional machinery through a dynamic\n * `import()` — that is what keeps a service out of the floor bundle for\n * consumers who never opt into it, and `check-architecture`'s `port-layering`\n * rule requires it for any spine→service edge. The pattern stays; this only\n * removes the ceremony that grew around it.\n *\n * Call sites had each re-invented the same shape: a `let mod = null` cache\n * declared *inside* the function (so it cached for one invocation and no\n * longer), plus in several places an `as { … }` cast, because destructuring a\n * dynamic import inline gave up the module's type.\n *\n * ```ts\n * const loadExecutor = lazy(() => import('./executor.js'))\n * // …\n * const { DerivationExecutor } = await loadExecutor()\n * ```\n *\n * Note this is about clarity, not speed: the ES module system already caches a\n * resolved module, so the win is one named binding per module instead of a\n * hand-rolled cache and a cast at every call site.\n *\n * Concurrent first calls share a single in-flight promise rather than each\n * starting their own `import()`.\n *\n * @internal\n */\nexport function lazy<T>(load: () => Promise<T>): () => Promise<T> {\n let cached: T | undefined\n let inflight: Promise<T> | undefined\n\n return async (): Promise<T> => {\n if (cached !== undefined) return cached\n inflight ??= load().then((mod) => {\n cached = mod\n inflight = undefined\n return mod\n })\n return inflight\n }\n}\n"],"mappings":";AA6BO,SAAS,KAAQ,MAA0C;AAChE,MAAI;AACJ,MAAI;AAEJ,SAAO,YAAwB;AAC7B,QAAI,WAAW,OAAW,QAAO;AACjC,iBAAa,KAAK,EAAE,KAAK,CAAC,QAAQ;AAChC,eAAS;AACT,iBAAW;AACX,aAAO;AAAA,IACT,CAAC;AACD,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NoydbError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZWTRENR.js";
|
|
4
4
|
|
|
5
5
|
// src/with-formula/computed/index.ts
|
|
6
6
|
var ComputedFieldError = class extends NoydbError {
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
ComputedFieldError,
|
|
36
36
|
evalComputedFields
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-5DRROK5W.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttestationNotEnabledError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZWTRENR.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/attestation/strategy.ts
|
|
6
6
|
var NO_ATTESTATION = {
|
|
@@ -27,4 +27,4 @@ var NO_ATTESTATION = {
|
|
|
27
27
|
export {
|
|
28
28
|
NO_ATTESTATION
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-5GQEU4DN.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
grant,
|
|
3
|
+
revoke,
|
|
4
|
+
rotateKeys
|
|
5
|
+
} from "./chunk-BLCWSJLN.js";
|
|
6
|
+
|
|
7
|
+
// src/with-party/team/active.ts
|
|
8
|
+
function withTeam() {
|
|
9
|
+
return {
|
|
10
|
+
async grant(team, vault, options, factors) {
|
|
11
|
+
return team.runGrant(grant, vault, options, factors);
|
|
12
|
+
},
|
|
13
|
+
async revoke(team, vault, options, factors) {
|
|
14
|
+
return team.runRevoke(revoke, vault, options, factors);
|
|
15
|
+
},
|
|
16
|
+
async rotate(team, vault, collections) {
|
|
17
|
+
return team.runRotate(rotateKeys, vault, collections);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
withTeam
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-5JOFWL4G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-party/team/active.ts"],"sourcesContent":["/**\n * Enable the multi-user team capability (#267 Track A tail).\n *\n * Pass to `createNoydb({ teamStrategy: withTeam() })` to make `db.grant` /\n * `db.revoke` / `db.rotate` live. The keyring grant/revoke/rotate engines\n * are statically imported HERE — this module is reachable only through the\n * `@noy-db/hub/team` subpath (and the root barrel's tree-shakeable\n * re-export), so a single-user floor bundle never carries them. The facade\n * (`TeamFacade.runGrant` / `runRevoke` / `runRotate`) owns the policy-gate +\n * keyring plumbing and receives the engine as an argument.\n */\nimport type { TeamStrategy } from './strategy.js'\nimport { grant as grantEngine, revoke as revokeEngine, rotateKeys as rotateEngine } from './keyring.js'\n\nexport function withTeam(): TeamStrategy {\n return {\n async grant(team, vault, options, factors) {\n return team.runGrant(grantEngine, vault, options, factors)\n },\n async revoke(team, vault, options, factors) {\n return team.runRevoke(revokeEngine, vault, options, factors)\n },\n async rotate(team, vault, collections) {\n return team.runRotate(rotateEngine, vault, collections)\n },\n }\n}\n"],"mappings":";;;;;;;AAcO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL,MAAM,MAAM,MAAM,OAAO,SAAS,SAAS;AACzC,aAAO,KAAK,SAAS,OAAa,OAAO,SAAS,OAAO;AAAA,IAC3D;AAAA,IACA,MAAM,OAAO,MAAM,OAAO,SAAS,SAAS;AAC1C,aAAO,KAAK,UAAU,QAAc,OAAO,SAAS,OAAO;AAAA,IAC7D;AAAA,IACA,MAAM,OAAO,MAAM,OAAO,aAAa;AACrC,aAAO,KAAK,UAAU,YAAc,OAAO,WAAW;AAAA,IACxD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
ATTESTATIONS_COLLECTION,
|
|
3
3
|
REVOKED_RECORD_ID,
|
|
4
4
|
loadOrCreateSigner
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CI32CAFS.js";
|
|
6
6
|
import {
|
|
7
7
|
openEnvelopeJson
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-G2JUIDFA.js";
|
|
9
9
|
import {
|
|
10
10
|
encrypt
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AKKRXT23.js";
|
|
12
12
|
import {
|
|
13
13
|
NOYDB_FORMAT_VERSION
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QBAC3GXA.js";
|
|
15
15
|
import {
|
|
16
16
|
AttestationError,
|
|
17
17
|
ConflictError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QZWTRENR.js";
|
|
19
19
|
|
|
20
20
|
// src/with-audit/attestation/revoke.ts
|
|
21
21
|
import { signRevocationList } from "@noy-db/attestation";
|
|
@@ -82,4 +82,4 @@ export {
|
|
|
82
82
|
getRevokedDocIdsCore,
|
|
83
83
|
publishRevocationListCore
|
|
84
84
|
};
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
85
|
+
//# sourceMappingURL=chunk-63FE525P.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/with-shape/schema-update/gate.ts
|
|
2
|
+
var SchemaUpdateGate = class {
|
|
3
|
+
#decision;
|
|
4
|
+
constructor(decision) {
|
|
5
|
+
this.#decision = decision.catch(() => null);
|
|
6
|
+
}
|
|
7
|
+
async assertWritable() {
|
|
8
|
+
const decision = await this.#decision;
|
|
9
|
+
if (decision && decision.action === "reject") {
|
|
10
|
+
throw decision.error;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
SchemaUpdateGate
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk-6LJY7X5A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/schema-update/gate.ts"],"sourcesContent":["/**\n * Per-collection write gate. Holds the (async) update decision\n * computed at registration; `Collection.put`/`delete` await it before\n * writing and throw the strategy's rejection error.\n *\n * Detection FAILURE (the promise rejecting) is deliberately NOT a write\n * block — schema detection is a fingerprint safety net, not a correctness\n * invariant (matches how persisted-schema write failures are swallowed).\n * Only an explicit `reject` decision blocks writes.\n */\nimport type { UpdateDecision } from './types.js'\n\nexport class SchemaUpdateGate {\n readonly #decision: Promise<UpdateDecision | null>\n\n constructor(decision: Promise<UpdateDecision>) {\n // Swallow detection failures into a non-blocking null.\n this.#decision = decision.catch(() => null)\n }\n\n async assertWritable(): Promise<void> {\n const decision = await this.#decision\n if (decision && decision.action === 'reject') {\n throw decision.error\n }\n // 'cutover' write-gating is handled by coordinatedCutover.\n }\n}\n"],"mappings":";AAYO,IAAM,mBAAN,MAAuB;AAAA,EACnB;AAAA,EAET,YAAY,UAAmC;AAE7C,SAAK,YAAY,SAAS,MAAM,MAAM,IAAI;AAAA,EAC5C;AAAA,EAEA,MAAM,iBAAgC;AACpC,UAAM,WAAW,MAAM,KAAK;AAC5B,QAAI,YAAY,SAAS,WAAW,UAAU;AAC5C,YAAM,SAAS;AAAA,IACjB;AAAA,EAEF;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NoydbError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZWTRENR.js";
|
|
4
4
|
|
|
5
5
|
// src/kernel/via/index.ts
|
|
6
6
|
var binders = /* @__PURE__ */ new Map();
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
isViaInstalled,
|
|
27
27
|
viaBinder
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-6UBZ6I5Z.js.map
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canonicalize
|
|
3
|
+
} from "./chunk-Y2NBBT6K.js";
|
|
1
4
|
import {
|
|
2
5
|
sha256Hex
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
|
|
5
|
-
// src/with-shape/persisted-schemas/canonicalize.ts
|
|
6
|
-
function canonicalize(value) {
|
|
7
|
-
if (value === null || typeof value !== "object") {
|
|
8
|
-
return JSON.stringify(value);
|
|
9
|
-
}
|
|
10
|
-
if (Array.isArray(value)) {
|
|
11
|
-
return "[" + value.map(canonicalize).join(",") + "]";
|
|
12
|
-
}
|
|
13
|
-
const obj = value;
|
|
14
|
-
const keys = Object.keys(obj).sort();
|
|
15
|
-
const parts = keys.map((k) => JSON.stringify(k) + ":" + canonicalize(obj[k]));
|
|
16
|
-
return "{" + parts.join(",") + "}";
|
|
17
|
-
}
|
|
6
|
+
} from "./chunk-AKKRXT23.js";
|
|
18
7
|
|
|
19
8
|
// src/with-shape/persisted-schemas/derive.ts
|
|
20
9
|
function isZodSchema(value) {
|
|
@@ -86,9 +75,8 @@ async function derivePersistedSchema(validator) {
|
|
|
86
75
|
}
|
|
87
76
|
|
|
88
77
|
export {
|
|
89
|
-
canonicalize,
|
|
90
78
|
isZodSchema,
|
|
91
79
|
isZod4Schema,
|
|
92
80
|
derivePersistedSchema
|
|
93
81
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-6ZNSB3H6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/persisted-schemas/derive.ts"],"sourcesContent":["/**\n * Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1\n * validator. Supports zod 3 (via the optional `zod-to-json-schema` peer-dep)\n * and zod 4 (via its native `z.toJSONSchema()`); both are loaded lazily so\n * hub never statically imports zod. Other validator families write a stub\n * envelope flagging the kind.\n *\n * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md\n *\n * @module\n */\n\nimport { canonicalize } from './canonicalize.js'\nimport { sha256Hex } from '../../kernel/enclave/index.js'\nimport type { PersistedSchemaEnvelope, PersistedSchemaKind } from './types.js'\n\n/**\n * Heuristic Zod detection — uses the Standard Schema v1 `~standard.vendor`\n * property (present in Zod v3.23+ and Zod v4+). Falls back to the\n * `_def.typeName` heuristic for older Zod v3 builds that predate Standard\n * Schema support.\n */\nexport function isZodSchema(value: unknown): boolean {\n if (value === null || typeof value !== 'object') return false\n // Standard Schema v1 vendor tag — most reliable across Zod majors\n const std = (value as { '~standard'?: { vendor?: unknown } })['~standard']\n if (std && typeof std === 'object' && (std as { vendor?: unknown }).vendor === 'zod') return true\n // Zod v3 fallback: _def.typeName starts with 'Zod' (e.g. 'ZodObject')\n const def = (value as { _def?: { typeName?: unknown } })._def\n if (!def || typeof def !== 'object') return false\n return typeof (def as { typeName?: unknown }).typeName === 'string'\n && ((def as { typeName: string }).typeName).startsWith('Zod')\n}\n\nfunction detectKind(validator: unknown): PersistedSchemaKind {\n if (isZodSchema(validator)) return 'Zod'\n return 'Unknown'\n}\n\n/**\n * Returns `true` when the validator was created with the Zod v4 native API\n * (i.e. `import { z } from 'zod'` where zod resolves to v4). Zod v4 native\n * schemas carry a `_zod` property whereas Zod v3 schemas (and the v3-compat\n * shim shipped inside zod@4 at `zod/v3`) use `_def.typeName`.\n *\n * Kept duck-typed so hub never statically imports zod.\n */\nexport function isZod4Schema(value: unknown): boolean {\n if (value === null || typeof value !== 'object') return false\n return '_zod' in value\n}\n\n/**\n * Lazy-require `zod-to-json-schema`. Returns the converter, or throws a\n * clear error if the peer-dep isn't installed.\n */\nasync function loadZodToJsonSchemaConverter(): Promise<(s: unknown) => object> {\n try {\n const mod = (await import('zod-to-json-schema')) as { zodToJsonSchema?: (s: unknown) => object }\n if (!mod.zodToJsonSchema) {\n throw new Error('zod-to-json-schema export missing')\n }\n return mod.zodToJsonSchema\n } catch (err) {\n throw new Error(\n 'persistJsonSchema requires the optional peer-dep `zod-to-json-schema`. '\n + 'Install it: `pnpm add zod-to-json-schema` (or npm/yarn equivalent). '\n + `Original error: ${err instanceof Error ? err.message : String(err)}`,\n )\n }\n}\n\n/**\n * Lazy-require Zod v4's built-in `toJSONSchema`. Used when the validator is a\n * Zod v4 native schema and `zod-to-json-schema` is absent or cannot handle it.\n * This is a dynamic import so it does not add a static zod dependency to hub.\n */\nasync function loadZodV4Converter(): Promise<(s: unknown) => object> {\n try {\n const mod = (await import('zod')) as { toJSONSchema?: (s: unknown) => object }\n if (typeof mod.toJSONSchema !== 'function') {\n throw new Error('zod.toJSONSchema not available (zod v4 required)')\n }\n return mod.toJSONSchema\n } catch (err) {\n throw new Error(\n 'persistJsonSchema with a Zod v4 schema requires zod@4 with toJSONSchema. '\n + `Original error: ${err instanceof Error ? err.message : String(err)}`,\n )\n }\n}\n\nexport async function derivePersistedSchema(\n validator: unknown,\n): Promise<PersistedSchemaEnvelope> {\n const kind = detectKind(validator)\n const derivedAt = new Date().toISOString()\n\n if (kind === 'Zod') {\n let jsonSchema: object\n\n if (isZod4Schema(validator)) {\n // Zod v4 native schemas: use zod's built-in toJSONSchema (available in\n // zod@4) because zod-to-json-schema@3.x parses _def.typeName which is\n // absent in native v4 schemas.\n const convert = await loadZodV4Converter()\n jsonSchema = convert(validator)\n } else {\n // Zod v3 schemas (or v3-compat shim): use the optional peer-dep\n // zod-to-json-schema for backward compatibility.\n const convert = await loadZodToJsonSchemaConverter()\n jsonSchema = convert(validator)\n }\n\n const canonical = canonicalize(jsonSchema)\n const hash = await sha256Hex(new TextEncoder().encode(canonical))\n return { _noydb_schema: 1, kind, jsonSchema, hash, derivedAt }\n }\n\n return {\n _noydb_schema: 1,\n kind,\n jsonSchema: null,\n hash: null,\n reason: `derivation not yet supported for kind=${kind} (v0 supports Zod only)`,\n derivedAt,\n }\n}\n"],"mappings":";;;;;;;;AAsBO,SAAS,YAAY,OAAyB;AACnD,MAAI,UAAU,QAAQ,OAAO,UAAU,SAAU,QAAO;AAExD,QAAM,MAAO,MAAiD,WAAW;AACzE,MAAI,OAAO,OAAO,QAAQ,YAAa,IAA6B,WAAW,MAAO,QAAO;AAE7F,QAAM,MAAO,MAA4C;AACzD,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAC5C,SAAO,OAAQ,IAA+B,aAAa,YACpD,IAA6B,SAAU,WAAW,KAAK;AAChE;AAEA,SAAS,WAAW,WAAyC;AAC3D,MAAI,YAAY,SAAS,EAAG,QAAO;AACnC,SAAO;AACT;AAUO,SAAS,aAAa,OAAyB;AACpD,MAAI,UAAU,QAAQ,OAAO,UAAU,SAAU,QAAO;AACxD,SAAO,UAAU;AACnB;AAMA,eAAe,+BAAgE;AAC7E,MAAI;AACF,UAAM,MAAO,MAAM,OAAO,oBAAoB;AAC9C,QAAI,CAAC,IAAI,iBAAiB;AACxB,YAAM,IAAI,MAAM,mCAAmC;AAAA,IACrD;AACA,WAAO,IAAI;AAAA,EACb,SAAS,KAAK;AACZ,UAAM,IAAI;AAAA,MACR,kKAEqB,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,IACvE;AAAA,EACF;AACF;AAOA,eAAe,qBAAsD;AACnE,MAAI;AACF,UAAM,MAAO,MAAM,OAAO,mBAAK;AAC/B,QAAI,OAAO,IAAI,iBAAiB,YAAY;AAC1C,YAAM,IAAI,MAAM,kDAAkD;AAAA,IACpE;AACA,WAAO,IAAI;AAAA,EACb,SAAS,KAAK;AACZ,UAAM,IAAI;AAAA,MACR,4FACqB,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,IACvE;AAAA,EACF;AACF;AAEA,eAAsB,sBACpB,WACkC;AAClC,QAAM,OAAO,WAAW,SAAS;AACjC,QAAM,aAAY,oBAAI,KAAK,GAAE,YAAY;AAEzC,MAAI,SAAS,OAAO;AAClB,QAAI;AAEJ,QAAI,aAAa,SAAS,GAAG;AAI3B,YAAM,UAAU,MAAM,mBAAmB;AACzC,mBAAa,QAAQ,SAAS;AAAA,IAChC,OAAO;AAGL,YAAM,UAAU,MAAM,6BAA6B;AACnD,mBAAa,QAAQ,SAAS;AAAA,IAChC;AAEA,UAAM,YAAY,aAAa,UAAU;AACzC,UAAM,OAAO,MAAM,UAAU,IAAI,YAAY,EAAE,OAAO,SAAS,CAAC;AAChE,WAAO,EAAE,eAAe,GAAG,MAAM,YAAY,MAAM,UAAU;AAAA,EAC/D;AAEA,SAAO;AAAA,IACL,eAAe;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,QAAQ,yCAAyC,IAAI;AAAA,IACrD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildBlobFieldEntries,
|
|
3
|
+
buildDictKeyFieldEntries,
|
|
4
|
+
buildI18nFieldEntries,
|
|
5
|
+
buildStringFieldEntries,
|
|
6
|
+
extractSnippet,
|
|
7
|
+
searchScan
|
|
8
|
+
} from "./chunk-MCHBCNCE.js";
|
|
1
9
|
import {
|
|
2
10
|
fuseRetrieval
|
|
3
11
|
} from "./chunk-AURFOK3D.js";
|
|
@@ -5,15 +13,14 @@ import {
|
|
|
5
13
|
getAtPath,
|
|
6
14
|
isStaticDictDescriptor,
|
|
7
15
|
stripI18nFilled
|
|
8
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UADPR6F4.js";
|
|
9
17
|
import {
|
|
10
18
|
liveRecordIsElevated
|
|
11
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JYJFGD2H.js";
|
|
12
20
|
import {
|
|
13
21
|
EmbeddingDimMismatchError,
|
|
14
|
-
EmbeddingModelMismatchError
|
|
15
|
-
|
|
16
|
-
} from "./chunk-W2OG6JOL.js";
|
|
22
|
+
EmbeddingModelMismatchError
|
|
23
|
+
} from "./chunk-QZWTRENR.js";
|
|
17
24
|
|
|
18
25
|
// src/with-lookup/embeddings/cosine.ts
|
|
19
26
|
function cosine(a, b) {
|
|
@@ -87,350 +94,6 @@ function isVecIdFor(collection, vecId) {
|
|
|
87
94
|
return vecId.startsWith(`${collection}/`);
|
|
88
95
|
}
|
|
89
96
|
|
|
90
|
-
// src/with-lookup/search/tokenize.ts
|
|
91
|
-
var WORD = /[\p{L}\p{N}]+/gu;
|
|
92
|
-
var tokenize = (text) => {
|
|
93
|
-
if (!text) return [];
|
|
94
|
-
return text.normalize("NFKC").toLowerCase().match(WORD) ?? [];
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
// src/with-lookup/search/scan.ts
|
|
98
|
-
var K1 = 1.2;
|
|
99
|
-
var B = 0.75;
|
|
100
|
-
function fieldText(record, field) {
|
|
101
|
-
const v = record[field];
|
|
102
|
-
if (typeof v === "string") return v;
|
|
103
|
-
if (v === null || v === void 0) return "";
|
|
104
|
-
if (typeof v === "number" || typeof v === "boolean") return String(v);
|
|
105
|
-
return "";
|
|
106
|
-
}
|
|
107
|
-
function searchScan(entries, field, query, opts = {}, tokenizer = tokenize) {
|
|
108
|
-
const queryTerms = tokenizer(query);
|
|
109
|
-
if (queryTerms.length === 0) return [];
|
|
110
|
-
const match = opts.match ?? "any";
|
|
111
|
-
const usePrefix = opts.prefix ?? false;
|
|
112
|
-
const exactTerms = usePrefix ? queryTerms.slice(0, -1) : queryTerms;
|
|
113
|
-
const prefixTerm = usePrefix ? queryTerms[queryTerms.length - 1] : void 0;
|
|
114
|
-
const docs = entries.map((e) => ({ id: e.id, record: e.record, terms: tokenizer(fieldText(e.record, field)) }));
|
|
115
|
-
const N = docs.length || 1;
|
|
116
|
-
const df = /* @__PURE__ */ new Map();
|
|
117
|
-
let totalLen = 0;
|
|
118
|
-
for (const d of docs) {
|
|
119
|
-
totalLen += d.terms.length;
|
|
120
|
-
for (const t of new Set(d.terms)) df.set(t, (df.get(t) ?? 0) + 1);
|
|
121
|
-
}
|
|
122
|
-
const avgdl = totalLen / N || 1;
|
|
123
|
-
let prefixDf = 0;
|
|
124
|
-
if (prefixTerm !== void 0) {
|
|
125
|
-
for (const d of docs) {
|
|
126
|
-
if (d.terms.some((t) => t.startsWith(prefixTerm))) prefixDf++;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const requiredCount = exactTerms.length + (prefixTerm !== void 0 ? 1 : 0);
|
|
130
|
-
const results = [];
|
|
131
|
-
for (const d of docs) {
|
|
132
|
-
const tf = /* @__PURE__ */ new Map();
|
|
133
|
-
for (const t of d.terms) tf.set(t, (tf.get(t) ?? 0) + 1);
|
|
134
|
-
const matched = [];
|
|
135
|
-
for (const qt of exactTerms) {
|
|
136
|
-
const c = tf.get(qt) ?? 0;
|
|
137
|
-
if (c > 0) matched.push({ tf: c, df: df.get(qt) ?? 0 });
|
|
138
|
-
}
|
|
139
|
-
if (prefixTerm !== void 0) {
|
|
140
|
-
let ptf = 0;
|
|
141
|
-
for (const [t, c] of tf) if (t.startsWith(prefixTerm)) ptf += c;
|
|
142
|
-
if (ptf > 0) matched.push({ tf: ptf, df: prefixDf });
|
|
143
|
-
}
|
|
144
|
-
if (matched.length === 0) continue;
|
|
145
|
-
if (match === "all" && matched.length < requiredCount) continue;
|
|
146
|
-
let score = 0;
|
|
147
|
-
for (const m of matched) {
|
|
148
|
-
const idf = Math.log(1 + (N - m.df + 0.5) / (m.df + 0.5));
|
|
149
|
-
const denom = m.tf + K1 * (1 - B + B * (d.terms.length / avgdl));
|
|
150
|
-
score += idf * (m.tf * (K1 + 1) / (denom || 1));
|
|
151
|
-
}
|
|
152
|
-
results.push({ id: d.id, score, record: d.record });
|
|
153
|
-
}
|
|
154
|
-
results.sort((a, b) => b.score - a.score);
|
|
155
|
-
return opts.limit !== void 0 ? results.slice(0, opts.limit) : results;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// src/with-lookup/search/segment.ts
|
|
159
|
-
var SEGMENTER = new Intl.Segmenter(void 0, { granularity: "word" });
|
|
160
|
-
var segmentTokens = (text) => {
|
|
161
|
-
const out = [];
|
|
162
|
-
if (!text) return out;
|
|
163
|
-
for (const s of SEGMENTER.segment(text)) {
|
|
164
|
-
if (s.isWordLike) out.push({ term: s.segment.normalize("NFKC").toLowerCase(), offset: s.index });
|
|
165
|
-
}
|
|
166
|
-
return out;
|
|
167
|
-
};
|
|
168
|
-
var segmentTokenizer = (text) => segmentTokens(text).map((t) => t.term);
|
|
169
|
-
|
|
170
|
-
// src/with-lookup/search/inverted-index.ts
|
|
171
|
-
var K12 = 1.2;
|
|
172
|
-
var B2 = 0.75;
|
|
173
|
-
var InvertedIndex = class _InvertedIndex {
|
|
174
|
-
// per field: df (term -> #docs), N (#docs), totalLen
|
|
175
|
-
fieldStats = /* @__PURE__ */ new Map();
|
|
176
|
-
docs = [];
|
|
177
|
-
static build(docs) {
|
|
178
|
-
const idx = new _InvertedIndex();
|
|
179
|
-
for (const d of docs) {
|
|
180
|
-
for (const f of d.fields) {
|
|
181
|
-
const tokens = segmentTokens(f.text);
|
|
182
|
-
const tf = /* @__PURE__ */ new Map();
|
|
183
|
-
const firstOffset = /* @__PURE__ */ new Map();
|
|
184
|
-
for (const t of tokens) {
|
|
185
|
-
tf.set(t.term, (tf.get(t.term) ?? 0) + 1);
|
|
186
|
-
if (!firstOffset.has(t.term)) firstOffset.set(t.term, t.offset);
|
|
187
|
-
}
|
|
188
|
-
const doc = { id: d.id, field: f.field, ...f.locale !== void 0 ? { locale: f.locale } : {}, text: f.text, len: tokens.length, tf, firstOffset };
|
|
189
|
-
idx.docs.push(doc);
|
|
190
|
-
let s = idx.fieldStats.get(f.field);
|
|
191
|
-
if (!s) {
|
|
192
|
-
s = { df: /* @__PURE__ */ new Map(), n: 0, totalLen: 0 };
|
|
193
|
-
idx.fieldStats.set(f.field, s);
|
|
194
|
-
}
|
|
195
|
-
s.n += 1;
|
|
196
|
-
s.totalLen += doc.len;
|
|
197
|
-
for (const term of tf.keys()) s.df.set(term, (s.df.get(term) ?? 0) + 1);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return idx;
|
|
201
|
-
}
|
|
202
|
-
query(query, opts = {}) {
|
|
203
|
-
const terms = segmentTokenizer(query);
|
|
204
|
-
if (terms.length === 0) return [];
|
|
205
|
-
const usePrefix = opts.prefix ?? false;
|
|
206
|
-
const exact = usePrefix ? terms.slice(0, -1) : terms;
|
|
207
|
-
const prefix = usePrefix ? terms[terms.length - 1] : void 0;
|
|
208
|
-
const match = opts.match ?? "any";
|
|
209
|
-
const required = exact.length + (prefix !== void 0 ? 1 : 0);
|
|
210
|
-
const best = /* @__PURE__ */ new Map();
|
|
211
|
-
for (const doc of this.docs) {
|
|
212
|
-
if (opts.fields !== void 0 && !opts.fields.includes(doc.field)) continue;
|
|
213
|
-
const stats = this.fieldStats.get(doc.field);
|
|
214
|
-
const avgdl = stats.totalLen / stats.n || 1;
|
|
215
|
-
let score = 0;
|
|
216
|
-
let matchedCount = 0;
|
|
217
|
-
let snippetOffset = -1;
|
|
218
|
-
const scoreTerm = (tf, df, offset) => {
|
|
219
|
-
if (tf <= 0) return;
|
|
220
|
-
matchedCount += 1;
|
|
221
|
-
if (snippetOffset < 0 && offset >= 0) snippetOffset = offset;
|
|
222
|
-
const idf = Math.log(1 + (stats.n - df + 0.5) / (df + 0.5));
|
|
223
|
-
const denom = tf + K12 * (1 - B2 + B2 * (doc.len / avgdl));
|
|
224
|
-
score += idf * (tf * (K12 + 1) / (denom || 1));
|
|
225
|
-
};
|
|
226
|
-
for (const qt of exact) scoreTerm(doc.tf.get(qt) ?? 0, stats.df.get(qt) ?? 0, doc.firstOffset.get(qt) ?? -1);
|
|
227
|
-
if (prefix !== void 0) {
|
|
228
|
-
const exactSet = new Set(exact);
|
|
229
|
-
let ptf = 0;
|
|
230
|
-
let poff = -1;
|
|
231
|
-
for (const [term, c] of doc.tf) {
|
|
232
|
-
if (term.startsWith(prefix) && !exactSet.has(term)) {
|
|
233
|
-
ptf += c;
|
|
234
|
-
if (poff < 0) poff = doc.firstOffset.get(term) ?? -1;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
if (ptf > 0) {
|
|
238
|
-
let pdf = 0;
|
|
239
|
-
for (const d of this.docs) {
|
|
240
|
-
if (d.field === doc.field && [...d.tf.keys()].some((t) => t.startsWith(prefix))) pdf++;
|
|
241
|
-
}
|
|
242
|
-
scoreTerm(ptf, pdf || 1, poff);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
if (matchedCount === 0) continue;
|
|
246
|
-
if (match === "all" && matchedCount < required) continue;
|
|
247
|
-
const hit = {
|
|
248
|
-
id: doc.id,
|
|
249
|
-
score,
|
|
250
|
-
field: doc.field,
|
|
251
|
-
text: doc.text,
|
|
252
|
-
offset: snippetOffset < 0 ? 0 : snippetOffset,
|
|
253
|
-
...doc.locale !== void 0 ? { locale: doc.locale } : {}
|
|
254
|
-
};
|
|
255
|
-
const prev = best.get(doc.id);
|
|
256
|
-
if (!prev || hit.score > prev.score) best.set(doc.id, hit);
|
|
257
|
-
}
|
|
258
|
-
const results = [...best.values()].sort((a, b) => b.score - a.score);
|
|
259
|
-
return opts.limit !== void 0 ? results.slice(0, opts.limit) : results;
|
|
260
|
-
}
|
|
261
|
-
toSnapshot() {
|
|
262
|
-
return {
|
|
263
|
-
v: 1,
|
|
264
|
-
fieldStats: [...this.fieldStats].map(([f, s]) => [f, { df: [...s.df], n: s.n, totalLen: s.totalLen }]),
|
|
265
|
-
docs: this.docs.map((d) => ({
|
|
266
|
-
id: d.id,
|
|
267
|
-
field: d.field,
|
|
268
|
-
text: d.text,
|
|
269
|
-
len: d.len,
|
|
270
|
-
tf: [...d.tf],
|
|
271
|
-
firstOffset: [...d.firstOffset],
|
|
272
|
-
...d.locale !== void 0 ? { locale: d.locale } : {}
|
|
273
|
-
}))
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
static fromSnapshot(s) {
|
|
277
|
-
const idx = new _InvertedIndex();
|
|
278
|
-
for (const [f, st] of s.fieldStats) idx.fieldStats.set(f, { df: new Map(st.df), n: st.n, totalLen: st.totalLen });
|
|
279
|
-
for (const d of s.docs) {
|
|
280
|
-
idx.docs.push({
|
|
281
|
-
id: d.id,
|
|
282
|
-
field: d.field,
|
|
283
|
-
text: d.text,
|
|
284
|
-
len: d.len,
|
|
285
|
-
tf: new Map(d.tf),
|
|
286
|
-
firstOffset: new Map(d.firstOffset),
|
|
287
|
-
...d.locale !== void 0 ? { locale: d.locale } : {}
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
return idx;
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
// src/with-lookup/search/snippet.ts
|
|
295
|
-
function extractSnippet(text, offset, window = 80) {
|
|
296
|
-
const chars = Array.from(text);
|
|
297
|
-
if (chars.length <= window) return text;
|
|
298
|
-
const cpOffset = Array.from(text.slice(0, Math.max(0, offset))).length;
|
|
299
|
-
const half = Math.floor(window / 2);
|
|
300
|
-
let start = Math.max(0, cpOffset - half);
|
|
301
|
-
const end = Math.min(chars.length, start + window);
|
|
302
|
-
start = Math.max(0, end - window);
|
|
303
|
-
const body = chars.slice(start, end).join("");
|
|
304
|
-
return `${start > 0 ? "\u2026" : ""}${body}${end < chars.length ? "\u2026" : ""}`;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// src/with-lookup/search/index-store.ts
|
|
308
|
-
var MemoryIndexStore = class {
|
|
309
|
-
index;
|
|
310
|
-
get built() {
|
|
311
|
-
return this.index !== void 0;
|
|
312
|
-
}
|
|
313
|
-
async ensureBuilt(build) {
|
|
314
|
-
if (this.index === void 0) this.index = InvertedIndex.build(build());
|
|
315
|
-
return this.index;
|
|
316
|
-
}
|
|
317
|
-
markDirty() {
|
|
318
|
-
this.index = void 0;
|
|
319
|
-
}
|
|
320
|
-
async flush() {
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
// src/with-lookup/search/build-docs.ts
|
|
325
|
-
function buildStringFieldEntries(record, textIndexes, only) {
|
|
326
|
-
const fields = only ? textIndexes.filter((f) => only.includes(f)) : textIndexes;
|
|
327
|
-
const out = [];
|
|
328
|
-
for (const field of fields) {
|
|
329
|
-
for (const leaf of getAtPath(record, field)) {
|
|
330
|
-
if (typeof leaf === "string" && leaf !== "") out.push({ field, text: leaf });
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
return out;
|
|
334
|
-
}
|
|
335
|
-
function buildI18nFieldEntries(record, i18nFields, textIndexes, only) {
|
|
336
|
-
const fields = (only ? textIndexes.filter((f) => only.includes(f)) : textIndexes).filter((f) => f in i18nFields);
|
|
337
|
-
const out = [];
|
|
338
|
-
for (const field of fields) {
|
|
339
|
-
for (const leaf of getAtPath(record, field)) {
|
|
340
|
-
if (!leaf || typeof leaf !== "object" || Array.isArray(leaf)) continue;
|
|
341
|
-
for (const [locale, val] of Object.entries(leaf)) {
|
|
342
|
-
if (typeof val === "string" && val !== "") out.push({ field, locale, text: val });
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return out;
|
|
347
|
-
}
|
|
348
|
-
function buildDictKeyFieldEntries(record, dictKeyFields, labelMaps, textIndexes, only) {
|
|
349
|
-
const fields = (only ? textIndexes.filter((f) => only.includes(f)) : textIndexes).filter((f) => f in dictKeyFields);
|
|
350
|
-
const out = [];
|
|
351
|
-
for (const field of fields) {
|
|
352
|
-
const map = labelMaps.get(field);
|
|
353
|
-
if (!map) continue;
|
|
354
|
-
for (const leaf of getAtPath(record, field)) {
|
|
355
|
-
const keys = typeof leaf === "string" ? [leaf] : Array.isArray(leaf) ? leaf.filter((k) => typeof k === "string") : [];
|
|
356
|
-
for (const key of keys) {
|
|
357
|
-
const labels = map.get(key);
|
|
358
|
-
if (!labels) continue;
|
|
359
|
-
for (const [locale, label] of Object.entries(labels)) {
|
|
360
|
-
if (label !== "") out.push({ field, locale, text: label });
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return out;
|
|
366
|
-
}
|
|
367
|
-
function buildBlobFieldEntries(filenamesByField) {
|
|
368
|
-
const out = [];
|
|
369
|
-
for (const [field, names] of filenamesByField) {
|
|
370
|
-
for (const name of names) if (name !== "") out.push({ field, text: name });
|
|
371
|
-
}
|
|
372
|
-
return out;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
// src/with-lookup/search/active.ts
|
|
376
|
-
function withSearch() {
|
|
377
|
-
return {
|
|
378
|
-
async search(ctx, field, query, opts) {
|
|
379
|
-
const { search: search2 } = await import("./collection-facade-MJXSC3Q6.js");
|
|
380
|
-
return search2(ctx, field, query, opts);
|
|
381
|
-
},
|
|
382
|
-
async retrieve(ctx, query, opts) {
|
|
383
|
-
const { retrieve: retrieve2 } = await import("./collection-facade-MJXSC3Q6.js");
|
|
384
|
-
return retrieve2(ctx, query, opts);
|
|
385
|
-
},
|
|
386
|
-
async similarTo(ctx, vector, opts) {
|
|
387
|
-
const { similarTo: similarTo2 } = await import("./collection-facade-MJXSC3Q6.js");
|
|
388
|
-
return similarTo2(ctx, vector, opts);
|
|
389
|
-
},
|
|
390
|
-
async warmIndex(ctx) {
|
|
391
|
-
const { warmIndex: warmIndex2 } = await import("./collection-facade-MJXSC3Q6.js");
|
|
392
|
-
return warmIndex2(ctx);
|
|
393
|
-
},
|
|
394
|
-
async flushIndex(ctx) {
|
|
395
|
-
const { flushIndex: flushIndex2 } = await import("./collection-facade-MJXSC3Q6.js");
|
|
396
|
-
return flushIndex2(ctx);
|
|
397
|
-
},
|
|
398
|
-
async embedOnWrite(ctx, id, record, version) {
|
|
399
|
-
const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-MJXSC3Q6.js");
|
|
400
|
-
return embedOnWrite2(ctx, id, record, version);
|
|
401
|
-
},
|
|
402
|
-
async rebuildEmbeddings(ctx) {
|
|
403
|
-
const { rebuildEmbeddings: rebuildEmbeddings2 } = await import("./collection-facade-MJXSC3Q6.js");
|
|
404
|
-
return rebuildEmbeddings2(ctx);
|
|
405
|
-
}
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// src/with-lookup/search/strategy.ts
|
|
410
|
-
var NO_SEARCH = {
|
|
411
|
-
async search() {
|
|
412
|
-
throw new SearchNotEnabledError();
|
|
413
|
-
},
|
|
414
|
-
async retrieve() {
|
|
415
|
-
throw new SearchNotEnabledError();
|
|
416
|
-
},
|
|
417
|
-
async similarTo() {
|
|
418
|
-
throw new SearchNotEnabledError();
|
|
419
|
-
},
|
|
420
|
-
async warmIndex() {
|
|
421
|
-
throw new SearchNotEnabledError();
|
|
422
|
-
},
|
|
423
|
-
async flushIndex() {
|
|
424
|
-
throw new SearchNotEnabledError();
|
|
425
|
-
},
|
|
426
|
-
async embedOnWrite() {
|
|
427
|
-
throw new SearchNotEnabledError();
|
|
428
|
-
},
|
|
429
|
-
async rebuildEmbeddings() {
|
|
430
|
-
throw new SearchNotEnabledError();
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
|
|
434
97
|
// src/with-lookup/search/collection-facade.ts
|
|
435
98
|
async function search(ctx, field, query, opts = {}) {
|
|
436
99
|
if (ctx.lazy) {
|
|
@@ -719,11 +382,6 @@ async function syncTierSearch(ctx, id, record, version) {
|
|
|
719
382
|
export {
|
|
720
383
|
VectorSet,
|
|
721
384
|
encodeVecId,
|
|
722
|
-
tokenize,
|
|
723
|
-
InvertedIndex,
|
|
724
|
-
MemoryIndexStore,
|
|
725
|
-
withSearch,
|
|
726
|
-
NO_SEARCH,
|
|
727
385
|
search,
|
|
728
386
|
buildRetrievalDocs,
|
|
729
387
|
hasIndexedBlobFields,
|
|
@@ -736,4 +394,4 @@ export {
|
|
|
736
394
|
rebuildEmbeddings,
|
|
737
395
|
syncTierSearch
|
|
738
396
|
};
|
|
739
|
-
//# sourceMappingURL=chunk-
|
|
397
|
+
//# sourceMappingURL=chunk-7YVBQJ7K.js.map
|