@struktoai/mirage-node 0.0.4 → 0.0.5
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 +2 -1
- package/dist/aliyun-S62BR3TB.js +11 -0
- package/dist/append.lua +17 -0
- package/dist/backblaze-4EKSW63F.js +11 -0
- package/dist/box-ZPLZAGMK.js +8 -0
- package/dist/ceph-ALKLD3MO.js +11 -0
- package/dist/{chunk-VLRSOWHP.js → chunk-2A4YGVBM.js} +5 -14
- package/dist/chunk-2A4YGVBM.js.map +1 -0
- package/dist/chunk-2HCYLVGY.js +28 -0
- package/dist/chunk-2HCYLVGY.js.map +1 -0
- package/dist/chunk-2VPZAH5Q.js +20 -0
- package/dist/chunk-2VPZAH5Q.js.map +1 -0
- package/dist/{chunk-HCU3B6FW.js → chunk-3JZQ6VSZ.js} +5 -4
- package/dist/chunk-3JZQ6VSZ.js.map +1 -0
- package/dist/chunk-4IF4TGAI.js +11 -0
- package/dist/chunk-4IF4TGAI.js.map +1 -0
- package/dist/{chunk-L7FEZ7LU.js → chunk-5H6KNEPP.js} +4 -5
- package/dist/{chunk-L7FEZ7LU.js.map → chunk-5H6KNEPP.js.map} +1 -1
- package/dist/{chunk-25W4XQJZ.js → chunk-5K2MWDCE.js} +4 -5
- package/dist/{chunk-25W4XQJZ.js.map → chunk-5K2MWDCE.js.map} +1 -1
- package/dist/{chunk-L4GMDSMB.js → chunk-6SVXWRKX.js} +4 -5
- package/dist/{chunk-L4GMDSMB.js.map → chunk-6SVXWRKX.js.map} +1 -1
- package/dist/{chunk-H62XQZUM.js → chunk-6VOIUGAD.js} +22 -10
- package/dist/chunk-6VOIUGAD.js.map +1 -0
- package/dist/{chunk-SI4GMRXD.js → chunk-7JYHFXXC.js} +4 -8
- package/dist/chunk-7JYHFXXC.js.map +1 -0
- package/dist/chunk-7VQQFWV6.js +20 -0
- package/dist/chunk-7VQQFWV6.js.map +1 -0
- package/dist/chunk-7ZP6TPHX.js +87 -0
- package/dist/chunk-7ZP6TPHX.js.map +1 -0
- package/dist/{chunk-HWQPEBID.js → chunk-ADEXNSYU.js} +6 -12
- package/dist/chunk-ADEXNSYU.js.map +1 -0
- package/dist/chunk-AQSYAXL4.js +16 -0
- package/dist/chunk-AQSYAXL4.js.map +1 -0
- package/dist/{chunk-NJ42VNXG.js → chunk-ATLXMNKD.js} +8 -3
- package/dist/chunk-ATLXMNKD.js.map +1 -0
- package/dist/{chunk-CB76WPUS.js → chunk-BYCUGFRF.js} +5 -4
- package/dist/chunk-BYCUGFRF.js.map +1 -0
- package/dist/{chunk-4M73WHIE.js → chunk-BZTVYOES.js} +3 -3
- package/dist/{chunk-CQCTCW4S.js → chunk-CRC4YWXB.js} +28 -9
- package/dist/chunk-CRC4YWXB.js.map +1 -0
- package/dist/{chunk-C7TNKIK5.js → chunk-CTGXJHO5.js} +1 -1
- package/dist/chunk-CTGXJHO5.js.map +1 -0
- package/dist/{chunk-HSD24IP2.js → chunk-DCDBIXVZ.js} +7 -2
- package/dist/chunk-DCDBIXVZ.js.map +1 -0
- package/dist/{chunk-HEDE2377.js → chunk-DDAFNROK.js} +318 -322
- package/dist/chunk-DDAFNROK.js.map +1 -0
- package/dist/chunk-DQIEWEAW.js +85 -0
- package/dist/chunk-DQIEWEAW.js.map +1 -0
- package/dist/{chunk-2ERLWAGG.js → chunk-EBI4IHDC.js} +20 -11
- package/dist/chunk-EBI4IHDC.js.map +1 -0
- package/dist/{chunk-RHUEV4I7.js → chunk-EIUTZ6N7.js} +10 -24
- package/dist/chunk-EIUTZ6N7.js.map +1 -0
- package/dist/{chunk-IUXXZHY3.js → chunk-EJZG5VUF.js} +24 -12
- package/dist/chunk-EJZG5VUF.js.map +1 -0
- package/dist/{chunk-BWWU5T2D.js → chunk-ENW5BVYN.js} +3 -3
- package/dist/{chunk-F5NWRF32.js → chunk-ETIAW4YD.js} +3 -3
- package/dist/chunk-EUPXAYPB.js +20 -0
- package/dist/chunk-EUPXAYPB.js.map +1 -0
- package/dist/{chunk-EGZNOUMH.js → chunk-FA6YNU75.js} +4 -5
- package/dist/{chunk-EGZNOUMH.js.map → chunk-FA6YNU75.js.map} +1 -1
- package/dist/{chunk-XUUSWR4U.js → chunk-FFH6R5VQ.js} +7 -2
- package/dist/{chunk-XUUSWR4U.js.map → chunk-FFH6R5VQ.js.map} +1 -1
- package/dist/{chunk-JEBH5APX.js → chunk-GE6H2COM.js} +5 -13
- package/dist/chunk-GE6H2COM.js.map +1 -0
- package/dist/{chunk-TUNR4VUM.js → chunk-GMMQ3ZK4.js} +3 -3
- package/dist/{chunk-SAOQW6ZJ.js → chunk-GSGE3M5P.js} +5 -13
- package/dist/chunk-GSGE3M5P.js.map +1 -0
- package/dist/{chunk-DXU7NZPH.js → chunk-HCRYAFBI.js} +3 -3
- package/dist/{chunk-OSVZKYXS.js → chunk-HOPUP6LA.js} +192 -156
- package/dist/chunk-HOPUP6LA.js.map +1 -0
- package/dist/chunk-HS24BL6W.js +160 -0
- package/dist/chunk-HS24BL6W.js.map +1 -0
- package/dist/chunk-HVYVG5KQ.js +16 -0
- package/dist/chunk-HVYVG5KQ.js.map +1 -0
- package/dist/{chunk-XEMLYWHK.js → chunk-I7CPLZNW.js} +4 -5
- package/dist/{chunk-XEMLYWHK.js.map → chunk-I7CPLZNW.js.map} +1 -1
- package/dist/{chunk-AULFV3KY.js → chunk-IFUCGI4I.js} +7 -2
- package/dist/chunk-IFUCGI4I.js.map +1 -0
- package/dist/{chunk-HGIPWY5Y.js → chunk-IFYXSSKR.js} +6 -6
- package/dist/chunk-IFYXSSKR.js.map +1 -0
- package/dist/chunk-IXA4DQE4.js +20 -0
- package/dist/chunk-IXA4DQE4.js.map +1 -0
- package/dist/chunk-IZMKMD3O.js +11 -0
- package/dist/chunk-IZMKMD3O.js.map +1 -0
- package/dist/{chunk-4X6CLF4F.js → chunk-JJERW2BI.js} +4 -5
- package/dist/{chunk-4X6CLF4F.js.map → chunk-JJERW2BI.js.map} +1 -1
- package/dist/{chunk-M6E7VK4D.js → chunk-JQR4HVUX.js} +2 -5
- package/dist/chunk-JQR4HVUX.js.map +1 -0
- package/dist/{chunk-BWLUBJQG.js → chunk-JXOMDLFS.js} +6 -15
- package/dist/chunk-JXOMDLFS.js.map +1 -0
- package/dist/{chunk-5ZHNPNDD.js → chunk-KIX6N7NT.js} +198 -141
- package/dist/chunk-KIX6N7NT.js.map +1 -0
- package/dist/{chunk-XFSEADPC.js → chunk-L42UTDFK.js} +7 -2
- package/dist/chunk-L42UTDFK.js.map +1 -0
- package/dist/chunk-M2UF2JHJ.js +11 -0
- package/dist/chunk-M2UF2JHJ.js.map +1 -0
- package/dist/{chunk-LPLZLSMK.js → chunk-MONC734W.js} +7 -2
- package/dist/chunk-MONC734W.js.map +1 -0
- package/dist/{chunk-XADEMW6B.js → chunk-N72RLCMU.js} +4 -5
- package/dist/{chunk-XADEMW6B.js.map → chunk-N72RLCMU.js.map} +1 -1
- package/dist/{chunk-ZPB3SLPK.js → chunk-ND4IWJ4V.js} +7 -2
- package/dist/chunk-ND4IWJ4V.js.map +1 -0
- package/dist/{chunk-ZPZQXHW2.js → chunk-NZ3EKGW4.js} +260 -178
- package/dist/chunk-NZ3EKGW4.js.map +1 -0
- package/dist/{chunk-E3KXVEYI.js → chunk-OAE57MNL.js} +22 -10
- package/dist/chunk-OAE57MNL.js.map +1 -0
- package/dist/{chunk-JBDFYIN2.js → chunk-OHKGIQB4.js} +2 -5
- package/dist/chunk-OHKGIQB4.js.map +1 -0
- package/dist/{chunk-V7JVMG63.js → chunk-OXEQSPND.js} +3 -3
- package/dist/{chunk-YRJICL2Q.js → chunk-PKNE5J2B.js} +5 -13
- package/dist/chunk-PKNE5J2B.js.map +1 -0
- package/dist/chunk-PSXXEGYQ.js +16 -0
- package/dist/chunk-PSXXEGYQ.js.map +1 -0
- package/dist/{chunk-KAWDDS27.js → chunk-QAOVABCR.js} +7 -2
- package/dist/chunk-QAOVABCR.js.map +1 -0
- package/dist/{chunk-SYMNWNC3.js → chunk-QQ7FP4GD.js} +4 -5
- package/dist/{chunk-SYMNWNC3.js.map → chunk-QQ7FP4GD.js.map} +1 -1
- package/dist/{chunk-3JZN3GYO.js → chunk-QYLVMC6B.js} +2 -5
- package/dist/chunk-QYLVMC6B.js.map +1 -0
- package/dist/{chunk-CXQGMFI7.js → chunk-RX3XR65X.js} +4 -5
- package/dist/{chunk-CXQGMFI7.js.map → chunk-RX3XR65X.js.map} +1 -1
- package/dist/{chunk-MRXTUFBZ.js → chunk-RYQJJB4C.js} +1 -1
- package/dist/chunk-RYQJJB4C.js.map +1 -0
- package/dist/{chunk-5I7Q7RHW.js → chunk-TUF7TCN7.js} +4 -5
- package/dist/{chunk-5I7Q7RHW.js.map → chunk-TUF7TCN7.js.map} +1 -1
- package/dist/{chunk-NLXJMXVE.js → chunk-TUX36JY5.js} +4 -5
- package/dist/{chunk-NLXJMXVE.js.map → chunk-TUX36JY5.js.map} +1 -1
- package/dist/{chunk-4GYB7DGC.js → chunk-TWRQCQWU.js} +327 -558
- package/dist/chunk-TWRQCQWU.js.map +1 -0
- package/dist/chunk-U6DFQRG3.js +20 -0
- package/dist/chunk-U6DFQRG3.js.map +1 -0
- package/dist/chunk-VI5YTKNY.js +20 -0
- package/dist/chunk-VI5YTKNY.js.map +1 -0
- package/dist/{chunk-FRGTDZQT.js → chunk-VQDF2UH5.js} +19 -5
- package/dist/chunk-VQDF2UH5.js.map +1 -0
- package/dist/{chunk-W5ZLIQFR.js → chunk-WG5YS6TC.js} +308 -200
- package/dist/chunk-WG5YS6TC.js.map +1 -0
- package/dist/{chunk-ZM44MGC5.js → chunk-WMJJ4WGF.js} +4 -5
- package/dist/{chunk-ZM44MGC5.js.map → chunk-WMJJ4WGF.js.map} +1 -1
- package/dist/{chunk-5YRWF5RP.js → chunk-WY4FNH42.js} +6 -5
- package/dist/chunk-WY4FNH42.js.map +1 -0
- package/dist/{chunk-VBYIDRNU.js → chunk-XIG5BWWH.js} +19 -10
- package/dist/chunk-XIG5BWWH.js.map +1 -0
- package/dist/chunk-XJBC3OYX.js +11 -0
- package/dist/chunk-XJBC3OYX.js.map +1 -0
- package/dist/{chunk-ZMREYTHA.js → chunk-XPRDXWK7.js} +8 -8
- package/dist/chunk-XPRDXWK7.js.map +1 -0
- package/dist/chunk-YKRQSZS7.js +96 -0
- package/dist/chunk-YKRQSZS7.js.map +1 -0
- package/dist/{chunk-IEVLWEBO.js → chunk-YMBL3VJB.js} +9 -8
- package/dist/chunk-YMBL3VJB.js.map +1 -0
- package/dist/{chunk-CGGO5NKD.js → chunk-YUJBXFYK.js} +357 -346
- package/dist/chunk-YUJBXFYK.js.map +1 -0
- package/dist/{chunk-S4KVLPBR.js → chunk-YZ4ZJNOL.js} +22 -10
- package/dist/chunk-YZ4ZJNOL.js.map +1 -0
- package/dist/chunk-ZTHVEXIV.js +11 -0
- package/dist/chunk-ZTHVEXIV.js.map +1 -0
- package/dist/{chunk-VHED2STW.js → chunk-ZVSYUCYS.js} +2 -1
- package/dist/chunk-ZVSYUCYS.js.map +1 -0
- package/dist/{config-T2IUIU5C.js → config-2YBCHU2W.js} +2 -2
- package/dist/{config-M3Z47VYU.js → config-3YRGRW72.js} +3 -2
- package/dist/config-4GSOMUMF.js +9 -0
- package/dist/config-5YBUWFUP.js +9 -0
- package/dist/{config-2LASFFRD.js → config-5ZRKJTKG.js} +3 -2
- package/dist/{config-W7EVPJNK.js → config-A25LTL5W.js} +2 -2
- package/dist/{config-WKQ3FGTZ.js → config-CLU7JABG.js} +2 -2
- package/dist/{config-E22XAGYN.js → config-D2RF7L3N.js} +2 -2
- package/dist/{config-HQXNFQZS.js → config-E55TKM6K.js} +2 -2
- package/dist/config-ELDOFRJW.js +9 -0
- package/dist/{config-EX3ZJTZI.js → config-FPC3RBFD.js} +2 -2
- package/dist/config-FPM3LAW7.js +9 -0
- package/dist/{config-IPNWAJHH.js → config-G3F54CS4.js} +3 -2
- package/dist/{config-BBOLI7VE.js → config-G43HRUI3.js} +2 -2
- package/dist/{config-QO2XUME4.js → config-GG3WO5PB.js} +3 -2
- package/dist/{config-QWQGOXQ5.js → config-JUYBWAZE.js} +2 -2
- package/dist/{config-SPW6NESU.js → config-LJ5T6TVA.js} +2 -2
- package/dist/{config-WVILHDFV.js → config-MDSAE4O3.js} +2 -2
- package/dist/{config-MZM3IPFM.js → config-NRIOKK5T.js} +2 -2
- package/dist/{config-L7SBSH5L.js → config-OYK2BSJK.js} +2 -2
- package/dist/config-PB3KA2CE.js +9 -0
- package/dist/{config-54USUVSE.js → config-QY4IL3PH.js} +3 -2
- package/dist/{config-VKKZGC7V.js → config-R4LAOEDS.js} +2 -2
- package/dist/{config-FRK7ZL37.js → config-RIAAD6RW.js} +3 -2
- package/dist/{config-J2C53GOT.js → config-SYNEQAUB.js} +2 -2
- package/dist/{config-XU6D5C7E.js → config-TJKGYA2B.js} +3 -2
- package/dist/{config-DWSJL3NH.js → config-UURRGA7U.js} +4 -2
- package/dist/{config-BIBFLUIR.js → config-VPLHQXVE.js} +2 -2
- package/dist/config-WRACCRPN.js +9 -0
- package/dist/{config-OJ2BPESH.js → config-WVHKXEVE.js} +3 -2
- package/dist/{config-CPYFOUQO.js → config-XU7R36IE.js} +3 -2
- package/dist/{config-A2GQYJDB.js → config-Y2KOUYSS.js} +2 -2
- package/dist/databricks_volume-CNCPTZHS.js +7 -0
- package/dist/digitalocean-DJZOUB6Q.js +11 -0
- package/dist/discord-ETB2CADR.js +7 -0
- package/dist/disk-WEHSTK3F.js +7 -0
- package/dist/dropbox-XN6PGLNE.js +8 -0
- package/dist/email-OV7XCP3T.js +8 -0
- package/dist/gcal-P56MRCGU.js +8 -0
- package/dist/gcs-HFBIAE2C.js +10 -0
- package/dist/gdocs-LQ3UXP3J.js +8 -0
- package/dist/gdrive-N6UBYLON.js +8 -0
- package/dist/github-BPZREGPI.js +8 -0
- package/dist/github_ci-7A4LUIZ7.js +8 -0
- package/dist/{gmail-2TBT4CVH.js → gmail-YED2MF6H.js} +2 -2
- package/dist/gridfs-CPLQ4G62.js +9 -0
- package/dist/gsheets-4BNIJPQ6.js +8 -0
- package/dist/gslides-GDBYLO5A.js +8 -0
- package/dist/hf_buckets-FTJITQ3P.js +10 -0
- package/dist/hf_datasets-6GXVKQD7.js +10 -0
- package/dist/hf_models-PJPGZAC5.js +10 -0
- package/dist/hf_spaces-LFNFOLBF.js +10 -0
- package/dist/index.d.ts +897 -609
- package/dist/index.js +2371 -781
- package/dist/index.js.map +1 -1
- package/dist/jaeger-GCA6MJ6E.js +8 -0
- package/dist/lancedb-TJ5YSJY5.js +7 -0
- package/dist/langfuse-RUMTUMXS.js +8 -0
- package/dist/linear-BCE4KEAC.js +7 -0
- package/dist/minio-5SO6KBTK.js +11 -0
- package/dist/mongodb-7C5MBESV.js +7 -0
- package/dist/nextcloud-4O2LZVW2.js +9 -0
- package/dist/notion-RVKEAQ2M.js +7 -0
- package/dist/oci-OQXOIC62.js +10 -0
- package/dist/postgres-AV45GNRS.js +7 -0
- package/dist/qingstor-W277YA4K.js +11 -0
- package/dist/r2-FUA4IORE.js +10 -0
- package/dist/{redis-6D55Q2WB.js → redis-LPS357NF.js} +2 -2
- package/dist/s3-FPNWWIVM.js +8 -0
- package/dist/scaleway-BP3732U7.js +11 -0
- package/dist/seaweedfs-MC6HIEP4.js +11 -0
- package/dist/slack-JFGW7VLN.js +7 -0
- package/dist/ssh-UYPG42LM.js +8 -0
- package/dist/supabase-A3KUFMDC.js +10 -0
- package/dist/tencent-5464UQ2X.js +11 -0
- package/dist/trello-O2KB3FUO.js +8 -0
- package/dist/wasabi-2IKBIWNO.js +10 -0
- package/dist/wasabi-2IKBIWNO.js.map +1 -0
- package/package.json +15 -3
- package/dist/aliyun-PGI57A43.js +0 -10
- package/dist/backblaze-TSPL6Y56.js +0 -10
- package/dist/box-7XTZYDSO.js +0 -8
- package/dist/ceph-C265UI5T.js +0 -10
- package/dist/chunk-2ERLWAGG.js.map +0 -1
- package/dist/chunk-2QNPKPZZ.js +0 -59
- package/dist/chunk-2QNPKPZZ.js.map +0 -1
- package/dist/chunk-3ASOQTZB.js +0 -59
- package/dist/chunk-3ASOQTZB.js.map +0 -1
- package/dist/chunk-3JZN3GYO.js.map +0 -1
- package/dist/chunk-4GYB7DGC.js.map +0 -1
- package/dist/chunk-5YRWF5RP.js.map +0 -1
- package/dist/chunk-5ZHNPNDD.js.map +0 -1
- package/dist/chunk-AULFV3KY.js.map +0 -1
- package/dist/chunk-BWLUBJQG.js.map +0 -1
- package/dist/chunk-C7TNKIK5.js.map +0 -1
- package/dist/chunk-CB76WPUS.js.map +0 -1
- package/dist/chunk-CGGO5NKD.js.map +0 -1
- package/dist/chunk-CQCTCW4S.js.map +0 -1
- package/dist/chunk-D3U7VQCG.js +0 -25
- package/dist/chunk-D3U7VQCG.js.map +0 -1
- package/dist/chunk-E3KXVEYI.js.map +0 -1
- package/dist/chunk-EVK6HH6Z.js +0 -17
- package/dist/chunk-EVK6HH6Z.js.map +0 -1
- package/dist/chunk-FRGTDZQT.js.map +0 -1
- package/dist/chunk-GF75O2EN.js +0 -54
- package/dist/chunk-GF75O2EN.js.map +0 -1
- package/dist/chunk-GTAS3QVC.js +0 -25
- package/dist/chunk-GTAS3QVC.js.map +0 -1
- package/dist/chunk-H62XQZUM.js.map +0 -1
- package/dist/chunk-HCU3B6FW.js.map +0 -1
- package/dist/chunk-HEDE2377.js.map +0 -1
- package/dist/chunk-HGIPWY5Y.js.map +0 -1
- package/dist/chunk-HSD24IP2.js.map +0 -1
- package/dist/chunk-HWQPEBID.js.map +0 -1
- package/dist/chunk-IEHPTILN.js +0 -21
- package/dist/chunk-IEHPTILN.js.map +0 -1
- package/dist/chunk-IEVLWEBO.js.map +0 -1
- package/dist/chunk-IKJQOYI4.js +0 -26
- package/dist/chunk-IKJQOYI4.js.map +0 -1
- package/dist/chunk-IUXXZHY3.js.map +0 -1
- package/dist/chunk-JBDFYIN2.js.map +0 -1
- package/dist/chunk-JEBH5APX.js.map +0 -1
- package/dist/chunk-JHI2PHHD.js +0 -25
- package/dist/chunk-JHI2PHHD.js.map +0 -1
- package/dist/chunk-KAWDDS27.js.map +0 -1
- package/dist/chunk-KGC2OGXI.js +0 -27
- package/dist/chunk-KGC2OGXI.js.map +0 -1
- package/dist/chunk-LPLZLSMK.js.map +0 -1
- package/dist/chunk-M6E7VK4D.js.map +0 -1
- package/dist/chunk-MIQ3ECZM.js +0 -54
- package/dist/chunk-MIQ3ECZM.js.map +0 -1
- package/dist/chunk-MRXTUFBZ.js.map +0 -1
- package/dist/chunk-NJ42VNXG.js.map +0 -1
- package/dist/chunk-OSVZKYXS.js.map +0 -1
- package/dist/chunk-RHUEV4I7.js.map +0 -1
- package/dist/chunk-S4KVLPBR.js.map +0 -1
- package/dist/chunk-SAOQW6ZJ.js.map +0 -1
- package/dist/chunk-SI4GMRXD.js.map +0 -1
- package/dist/chunk-UAJYJP5C.js +0 -59
- package/dist/chunk-UAJYJP5C.js.map +0 -1
- package/dist/chunk-UYA3XL3J.js +0 -54
- package/dist/chunk-UYA3XL3J.js.map +0 -1
- package/dist/chunk-VBYIDRNU.js.map +0 -1
- package/dist/chunk-VHED2STW.js.map +0 -1
- package/dist/chunk-VIICUPWQ.js +0 -23
- package/dist/chunk-VIICUPWQ.js.map +0 -1
- package/dist/chunk-VLRSOWHP.js.map +0 -1
- package/dist/chunk-W5ZLIQFR.js.map +0 -1
- package/dist/chunk-WTSSEUOZ.js +0 -59
- package/dist/chunk-WTSSEUOZ.js.map +0 -1
- package/dist/chunk-WWP2STF5.js +0 -59
- package/dist/chunk-WWP2STF5.js.map +0 -1
- package/dist/chunk-XFSEADPC.js.map +0 -1
- package/dist/chunk-YBVMZ7SR.js +0 -59
- package/dist/chunk-YBVMZ7SR.js.map +0 -1
- package/dist/chunk-YRJICL2Q.js.map +0 -1
- package/dist/chunk-ZMREYTHA.js.map +0 -1
- package/dist/chunk-ZPB3SLPK.js.map +0 -1
- package/dist/chunk-ZPZQXHW2.js.map +0 -1
- package/dist/config-3WDIJPTG.js +0 -9
- package/dist/config-4QV4QYI5.js +0 -9
- package/dist/config-5ZXN2T2H.js +0 -9
- package/dist/config-EHE52ZTK.js +0 -9
- package/dist/config-HTXOOAOD.js +0 -9
- package/dist/config-K63RX6EU.js +0 -9
- package/dist/config-LEALEMKA.js +0 -9
- package/dist/config-RI7IEZUF.js +0 -9
- package/dist/databricks_volume-ETRDJVVQ.js +0 -7
- package/dist/digitalocean-QP72DR4J.js +0 -10
- package/dist/discord-BSN5RB3E.js +0 -8
- package/dist/disk-24NWTN2I.js +0 -7
- package/dist/dropbox-OSTZXSIE.js +0 -8
- package/dist/email-4ZFPSWIN.js +0 -8
- package/dist/gcs-PFWR6MIW.js +0 -10
- package/dist/gdocs-GPAZRQG5.js +0 -8
- package/dist/gdrive-XSX6A7B3.js +0 -8
- package/dist/github-EQ4NXUTA.js +0 -8
- package/dist/github_ci-QL5B2Q2N.js +0 -8
- package/dist/gridfs-KZRZ6SIB.js +0 -9
- package/dist/gsheets-N53WEXN2.js +0 -8
- package/dist/gslides-TATSARTH.js +0 -8
- package/dist/hf_buckets-BK7NGJWS.js +0 -10
- package/dist/hf_datasets-UQ5QGM4L.js +0 -10
- package/dist/hf_models-75LFCQCS.js +0 -10
- package/dist/hf_spaces-6T2KB3UC.js +0 -10
- package/dist/langfuse-AMQCQWNE.js +0 -8
- package/dist/linear-V3TXO6CV.js +0 -8
- package/dist/minio-IZRZY4C5.js +0 -10
- package/dist/mongodb-VMKPQCPX.js +0 -7
- package/dist/nextcloud-5RHQCGDO.js +0 -9
- package/dist/notion-6PPNTQFM.js +0 -8
- package/dist/oci-CKYBSFZJ.js +0 -10
- package/dist/postgres-WIQBVL5M.js +0 -7
- package/dist/qingstor-AP4IIPLY.js +0 -10
- package/dist/r2-C4XGEWQY.js +0 -10
- package/dist/s3-XQBI2CXN.js +0 -8
- package/dist/scaleway-SEZJVURB.js +0 -10
- package/dist/seaweedfs-3XYIAFU2.js +0 -10
- package/dist/slack-ZHXDJQY4.js +0 -8
- package/dist/ssh-X2MO7JOV.js +0 -8
- package/dist/supabase-BBM44UTM.js +0 -10
- package/dist/tencent-X72USLJ7.js +0 -10
- package/dist/trello-EER5NG7L.js +0 -8
- package/dist/wasabi-O4MVIUFG.js +0 -10
- /package/dist/{aliyun-PGI57A43.js.map → aliyun-S62BR3TB.js.map} +0 -0
- /package/dist/{backblaze-TSPL6Y56.js.map → backblaze-4EKSW63F.js.map} +0 -0
- /package/dist/{box-7XTZYDSO.js.map → box-ZPLZAGMK.js.map} +0 -0
- /package/dist/{ceph-C265UI5T.js.map → ceph-ALKLD3MO.js.map} +0 -0
- /package/dist/{chunk-4M73WHIE.js.map → chunk-BZTVYOES.js.map} +0 -0
- /package/dist/{chunk-BWWU5T2D.js.map → chunk-ENW5BVYN.js.map} +0 -0
- /package/dist/{chunk-F5NWRF32.js.map → chunk-ETIAW4YD.js.map} +0 -0
- /package/dist/{chunk-TUNR4VUM.js.map → chunk-GMMQ3ZK4.js.map} +0 -0
- /package/dist/{chunk-DXU7NZPH.js.map → chunk-HCRYAFBI.js.map} +0 -0
- /package/dist/{chunk-V7JVMG63.js.map → chunk-OXEQSPND.js.map} +0 -0
- /package/dist/{config-2LASFFRD.js.map → config-2YBCHU2W.js.map} +0 -0
- /package/dist/{config-3WDIJPTG.js.map → config-3YRGRW72.js.map} +0 -0
- /package/dist/{config-4QV4QYI5.js.map → config-4GSOMUMF.js.map} +0 -0
- /package/dist/{config-54USUVSE.js.map → config-5YBUWFUP.js.map} +0 -0
- /package/dist/{config-5ZXN2T2H.js.map → config-5ZRKJTKG.js.map} +0 -0
- /package/dist/{config-A2GQYJDB.js.map → config-A25LTL5W.js.map} +0 -0
- /package/dist/{config-BBOLI7VE.js.map → config-CLU7JABG.js.map} +0 -0
- /package/dist/{config-BIBFLUIR.js.map → config-D2RF7L3N.js.map} +0 -0
- /package/dist/{config-CPYFOUQO.js.map → config-E55TKM6K.js.map} +0 -0
- /package/dist/{config-DWSJL3NH.js.map → config-ELDOFRJW.js.map} +0 -0
- /package/dist/{config-E22XAGYN.js.map → config-FPC3RBFD.js.map} +0 -0
- /package/dist/{config-EHE52ZTK.js.map → config-FPM3LAW7.js.map} +0 -0
- /package/dist/{config-EX3ZJTZI.js.map → config-G3F54CS4.js.map} +0 -0
- /package/dist/{config-FRK7ZL37.js.map → config-G43HRUI3.js.map} +0 -0
- /package/dist/{config-HQXNFQZS.js.map → config-GG3WO5PB.js.map} +0 -0
- /package/dist/{config-HTXOOAOD.js.map → config-JUYBWAZE.js.map} +0 -0
- /package/dist/{config-IPNWAJHH.js.map → config-LJ5T6TVA.js.map} +0 -0
- /package/dist/{config-J2C53GOT.js.map → config-MDSAE4O3.js.map} +0 -0
- /package/dist/{config-K63RX6EU.js.map → config-NRIOKK5T.js.map} +0 -0
- /package/dist/{config-L7SBSH5L.js.map → config-OYK2BSJK.js.map} +0 -0
- /package/dist/{config-LEALEMKA.js.map → config-PB3KA2CE.js.map} +0 -0
- /package/dist/{config-M3Z47VYU.js.map → config-QY4IL3PH.js.map} +0 -0
- /package/dist/{config-MZM3IPFM.js.map → config-R4LAOEDS.js.map} +0 -0
- /package/dist/{config-OJ2BPESH.js.map → config-RIAAD6RW.js.map} +0 -0
- /package/dist/{config-QO2XUME4.js.map → config-SYNEQAUB.js.map} +0 -0
- /package/dist/{config-QWQGOXQ5.js.map → config-TJKGYA2B.js.map} +0 -0
- /package/dist/{config-RI7IEZUF.js.map → config-UURRGA7U.js.map} +0 -0
- /package/dist/{config-SPW6NESU.js.map → config-VPLHQXVE.js.map} +0 -0
- /package/dist/{config-T2IUIU5C.js.map → config-WRACCRPN.js.map} +0 -0
- /package/dist/{config-VKKZGC7V.js.map → config-WVHKXEVE.js.map} +0 -0
- /package/dist/{config-W7EVPJNK.js.map → config-XU7R36IE.js.map} +0 -0
- /package/dist/{config-WKQ3FGTZ.js.map → config-Y2KOUYSS.js.map} +0 -0
- /package/dist/{config-WVILHDFV.js.map → databricks_volume-CNCPTZHS.js.map} +0 -0
- /package/dist/{config-XU6D5C7E.js.map → digitalocean-DJZOUB6Q.js.map} +0 -0
- /package/dist/{databricks_volume-ETRDJVVQ.js.map → discord-ETB2CADR.js.map} +0 -0
- /package/dist/{digitalocean-QP72DR4J.js.map → disk-WEHSTK3F.js.map} +0 -0
- /package/dist/{discord-BSN5RB3E.js.map → dropbox-XN6PGLNE.js.map} +0 -0
- /package/dist/{disk-24NWTN2I.js.map → email-OV7XCP3T.js.map} +0 -0
- /package/dist/{dropbox-OSTZXSIE.js.map → gcal-P56MRCGU.js.map} +0 -0
- /package/dist/{email-4ZFPSWIN.js.map → gcs-HFBIAE2C.js.map} +0 -0
- /package/dist/{gcs-PFWR6MIW.js.map → gdocs-LQ3UXP3J.js.map} +0 -0
- /package/dist/{gdocs-GPAZRQG5.js.map → gdrive-N6UBYLON.js.map} +0 -0
- /package/dist/{gdrive-XSX6A7B3.js.map → github-BPZREGPI.js.map} +0 -0
- /package/dist/{github-EQ4NXUTA.js.map → github_ci-7A4LUIZ7.js.map} +0 -0
- /package/dist/{github_ci-QL5B2Q2N.js.map → gmail-YED2MF6H.js.map} +0 -0
- /package/dist/{gmail-2TBT4CVH.js.map → gridfs-CPLQ4G62.js.map} +0 -0
- /package/dist/{gridfs-KZRZ6SIB.js.map → gsheets-4BNIJPQ6.js.map} +0 -0
- /package/dist/{gsheets-N53WEXN2.js.map → gslides-GDBYLO5A.js.map} +0 -0
- /package/dist/{gslides-TATSARTH.js.map → hf_buckets-FTJITQ3P.js.map} +0 -0
- /package/dist/{hf_buckets-BK7NGJWS.js.map → hf_datasets-6GXVKQD7.js.map} +0 -0
- /package/dist/{hf_datasets-UQ5QGM4L.js.map → hf_models-PJPGZAC5.js.map} +0 -0
- /package/dist/{hf_models-75LFCQCS.js.map → hf_spaces-LFNFOLBF.js.map} +0 -0
- /package/dist/{hf_spaces-6T2KB3UC.js.map → jaeger-GCA6MJ6E.js.map} +0 -0
- /package/dist/{langfuse-AMQCQWNE.js.map → lancedb-TJ5YSJY5.js.map} +0 -0
- /package/dist/{linear-V3TXO6CV.js.map → langfuse-RUMTUMXS.js.map} +0 -0
- /package/dist/{minio-IZRZY4C5.js.map → linear-BCE4KEAC.js.map} +0 -0
- /package/dist/{mongodb-VMKPQCPX.js.map → minio-5SO6KBTK.js.map} +0 -0
- /package/dist/{nextcloud-5RHQCGDO.js.map → mongodb-7C5MBESV.js.map} +0 -0
- /package/dist/{notion-6PPNTQFM.js.map → nextcloud-4O2LZVW2.js.map} +0 -0
- /package/dist/{oci-CKYBSFZJ.js.map → notion-RVKEAQ2M.js.map} +0 -0
- /package/dist/{postgres-WIQBVL5M.js.map → oci-OQXOIC62.js.map} +0 -0
- /package/dist/{qingstor-AP4IIPLY.js.map → postgres-AV45GNRS.js.map} +0 -0
- /package/dist/{r2-C4XGEWQY.js.map → qingstor-W277YA4K.js.map} +0 -0
- /package/dist/{redis-6D55Q2WB.js.map → r2-FUA4IORE.js.map} +0 -0
- /package/dist/{s3-XQBI2CXN.js.map → redis-LPS357NF.js.map} +0 -0
- /package/dist/{scaleway-SEZJVURB.js.map → s3-FPNWWIVM.js.map} +0 -0
- /package/dist/{seaweedfs-3XYIAFU2.js.map → scaleway-BP3732U7.js.map} +0 -0
- /package/dist/{slack-ZHXDJQY4.js.map → seaweedfs-MC6HIEP4.js.map} +0 -0
- /package/dist/{ssh-X2MO7JOV.js.map → slack-JFGW7VLN.js.map} +0 -0
- /package/dist/{supabase-BBM44UTM.js.map → ssh-UYPG42LM.js.map} +0 -0
- /package/dist/{tencent-X72USLJ7.js.map → supabase-A3KUFMDC.js.map} +0 -0
- /package/dist/{trello-EER5NG7L.js.map → tencent-5464UQ2X.js.map} +0 -0
- /package/dist/{wasabi-O4MVIUFG.js.map → trello-O2KB3FUO.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/accessor/hf.ts","../src/commands/builtin/hf/index.ts","../src/commands/builtin/hf/find.ts","../src/core/hf/find.ts","../src/core/hf/util.ts","../src/core/hf/readdir.ts","../src/core/hf/constants.ts","../src/commands/builtin/hf/io.ts","../src/core/hf/write.ts","../src/core/hf/create.ts","../src/core/hf/du/entries.ts","../src/core/hf/du/walk.ts","../src/core/hf/stat.ts","../src/core/hf/du/size.ts","../src/core/hf/mkdir.ts","../src/core/hf/unlink.ts","../src/core/hf/read.ts","../src/core/hf/rm.ts","../src/core/hf/stream.ts","../src/core/hf/exists.ts","../src/ops/hf/index.ts","../src/resource/hf_buckets/base.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { Operator } from 'opendal'\nimport { Accessor, ResourceName } from '@struktoai/mirage-core'\nimport { loadOptionalPeer } from '../optional_peer.ts'\nimport type { HfBucketsConfig, HfRepoConfig } from '../resource/hf_buckets/config.ts'\n\nexport const HF_RESOURCES = [\n ResourceName.HF_BUCKETS,\n ResourceName.HF_DATASETS,\n ResourceName.HF_MODELS,\n ResourceName.HF_SPACES,\n] as const\n\nexport abstract class HfAccessor extends Accessor {\n abstract readonly repoType: string\n abstract readonly resourceName: ResourceName\n private operatorPromise: Promise<Operator> | null = null\n\n constructor(public readonly config: HfBucketsConfig | HfRepoConfig) {\n super()\n }\n\n get repoId(): string {\n const config = this.config as { bucket?: string; repoId?: string }\n return config.repoId ?? config.bucket ?? ''\n }\n\n abstract get bucketUri(): string\n\n operatorOptions(): Record<string, string> {\n const options: Record<string, string> = {\n repo_type: this.repoType,\n repo_id: this.repoId,\n }\n if (this.config.token !== undefined && this.config.token !== '') {\n options.token = this.config.token\n }\n if (this.config.endpoint !== undefined && this.config.endpoint !== '') {\n options.endpoint = this.config.endpoint\n }\n const keyPrefix = this.config.keyPrefix\n if (keyPrefix !== undefined && keyPrefix !== '') {\n options.root = `/${stripSlashes(keyPrefix)}/`\n }\n const revision = (this.config as { revision?: string }).revision\n if (revision !== undefined && revision !== '') {\n options.revision = revision\n }\n return options\n }\n\n operator(): Promise<Operator> {\n this.operatorPromise ??= this.createOperator()\n return this.operatorPromise\n }\n\n private async createOperator(): Promise<Operator> {\n const mod = await loadOptionalPeer(\n () => import('opendal') as Promise<{ Operator: typeof Operator }>,\n { feature: 'HuggingFace resources', packageName: 'opendal' },\n )\n return new mod.Operator('hf', this.operatorOptions())\n }\n}\n\nfunction stripSlashes(value: string): string {\n let start = 0\n let end = value.length\n while (start < end && value[start] === '/') start += 1\n while (end > start && value[end - 1] === '/') end -= 1\n return value.slice(start, end)\n}\n\nexport class HfBucketsAccessor extends HfAccessor {\n readonly repoType: string = 'bucket'\n readonly resourceName: ResourceName = ResourceName.HF_BUCKETS\n\n get bucketUri(): string {\n return `hf://buckets/${this.repoId}`\n }\n}\n\nexport class HfDatasetsAccessor extends HfAccessor {\n readonly repoType: string = 'dataset'\n readonly resourceName: ResourceName = ResourceName.HF_DATASETS\n\n get bucketUri(): string {\n return `hf://datasets/${this.repoId}`\n }\n}\n\nexport class HfModelsAccessor extends HfAccessor {\n readonly repoType: string = 'model'\n readonly resourceName: ResourceName = ResourceName.HF_MODELS\n\n get bucketUri(): string {\n return `hf://models/${this.repoId}`\n }\n}\n\nexport class HfSpacesAccessor extends HfAccessor {\n readonly repoType: string = 'space'\n readonly resourceName: ResourceName = ResourceName.HF_SPACES\n\n get bucketUri(): string {\n return `hf://spaces/${this.repoId}`\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { type RegisteredCommand, makeGenericCommands } from '@struktoai/mirage-core'\nimport { HF_RESOURCES, type HfAccessor } from '../../../accessor/hf.ts'\nimport { HF_FIND } from './find.ts'\nimport { HF_IO } from './io.ts'\n\nconst HF_OVERRIDES = new Set(['cp', 'mv', 'find'])\n\nexport const HF_COMMANDS: readonly RegisteredCommand[] = [\n ...HF_RESOURCES.flatMap((resource) =>\n makeGenericCommands<HfAccessor>(resource, HF_IO, {\n overrides: HF_OVERRIDES,\n }),\n ),\n ...HF_FIND,\n]\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { command, findGeneric, metadataProvision, specOf } from '@struktoai/mirage-core'\nimport { HF_RESOURCES, type HfAccessor } from '../../../accessor/hf.ts'\nimport { find as hfFind } from '../../../core/hf/find.ts'\nimport { readdir as hfReaddir } from '../../../core/hf/readdir.ts'\n\nexport const HF_FIND = command({\n name: 'find',\n resource: [...HF_RESOURCES],\n spec: specOf('find'),\n provision: metadataProvision,\n // The emptiness probe is wired like the generic builder does it, because\n // a bucket start point that holds nothing is exactly what an object store\n // cannot tell from a missing one, and `-empty` has to match it.\n fn: (accessor: HfAccessor, paths, texts, opts) =>\n findGeneric(\n paths,\n texts,\n opts,\n (root, options) => hfFind(accessor, root, options),\n undefined,\n async (spec) => (await hfReaddir(accessor, spec, opts.index ?? undefined)).length === 0,\n ),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n buildTree,\n emitStartPath,\n type FindOptions,\n keep,\n type PathSpec,\n type PredNode,\n rstripSlash,\n startBasename,\n stripSlash,\n compareCodePoints,\n} from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { isNotFound, rawPathOf } from './util.ts'\n\n// -mtime is accepted for signature parity but not applied: buckets carry no\n// per-object mtime, so filtering would drop everything (matches s3/onedrive).\nfunction matchesFilters(\n entryPath: string,\n kind: 'f' | 'd',\n size: number,\n isEmpty: boolean | null,\n baseDepth: number,\n options: FindOptions,\n tree: PredNode,\n): boolean {\n const entryName = entryPath.split('/').pop() ?? ''\n const depth = (entryPath.match(/\\//g) ?? []).length - baseDepth\n if (options.maxDepth !== null && options.maxDepth !== undefined && depth > options.maxDepth) {\n return false\n }\n if (!keep({ key: entryPath, name: entryName, kind, depth, isEmpty }, tree, options.minDepth)) {\n return false\n }\n if (options.minSize != null || options.maxSize != null) {\n // Directories count as size 0 for -size (deliberate GNU divergence).\n const effective = kind === 'f' ? size : 0\n if (options.minSize != null && effective < options.minSize) {\n return false\n }\n if (options.maxSize != null && effective > options.maxSize) {\n return false\n }\n }\n return true\n}\n\nexport async function find(\n accessor: HfAccessor,\n path: PathSpec,\n options: FindOptions = {},\n): Promise<string[]> {\n const target = rawPathOf(path)\n const pfx = stripSlash(target)\n const scanPath = pfx !== '' ? `${pfx}/` : '/'\n const base = pfx !== '' ? `/${pfx}` : '/'\n const baseDepth = base === '/' ? 0 : (base.match(/\\//g) ?? []).length\n const startName = startBasename(path.virtual)\n const empty = options.empty === true\n const op = await accessor.operator()\n const results: string[] = []\n const seenDirs = new Set<string>()\n let sawDescendant = false\n let dirExists = false\n const tree =\n options.tree ??\n buildTree({\n name: options.name,\n iname: options.iname,\n pathPattern: options.pathPattern,\n type: options.type,\n nameExclude: options.nameExclude,\n orNames: options.orNames,\n })\n let entries\n try {\n entries = await op.list(scanPath, { recursive: true })\n } catch (err) {\n if (isNotFound(err)) return []\n throw err\n }\n for (const entry of entries) {\n const rel = entry.path()\n if (rel === '') continue\n const meta = entry.metadata()\n const isDir = rel.endsWith('/') || meta.isDirectory()\n const entryPath = `/${stripSlash(rel)}`\n if (entryPath === base) {\n dirExists = true\n continue\n }\n sawDescendant = true\n const kind: 'f' | 'd' = isDir ? 'd' : 'f'\n const length = meta.contentLength\n const size = length !== null ? Number(length) : 0\n const fileEntries: [string, 'f' | 'd'][] = [[entryPath, kind]]\n if (!isDir) {\n let parent = rstripSlash(entryPath.slice(0, entryPath.lastIndexOf('/'))) || '/'\n while (parent !== '' && parent !== base && parent !== '/') {\n if (!seenDirs.has(parent)) {\n seenDirs.add(parent)\n fileEntries.push([parent, 'd'])\n }\n parent = parent.slice(0, parent.lastIndexOf('/')) || '/'\n }\n }\n for (const [ep, k] of fileEntries) {\n const isEmpty = !empty ? null : k === 'd' ? false : size === 0\n if (matchesFilters(ep, k, size, isEmpty, baseDepth, options, tree)) {\n results.push(ep)\n }\n }\n }\n if (sawDescendant || dirExists) {\n emitStartPath(results, base, startName, {\n kind: 'd',\n isEmpty: !sawDescendant,\n exists: true,\n tree,\n maxDepth: options.maxDepth,\n minDepth: options.minDepth,\n minSize: options.minSize,\n maxSize: options.maxSize,\n })\n }\n return [...new Set(results)].sort(compareCodePoints)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { mountPrefixOf } from '@struktoai/mirage-core'\nimport type { PathSpec } from '@struktoai/mirage-core'\n\nexport function rawPathOf(path: PathSpec): string {\n const prefix = mountPrefixOf(path.virtual, path.resourcePath)\n return prefix !== '' && path.virtual.startsWith(prefix)\n ? path.virtual.slice(prefix.length) || '/'\n : path.virtual\n}\n\nexport function hfKey(rawPath: string): string {\n let start = 0\n while (start < rawPath.length && rawPath[start] === '/') start += 1\n return rawPath.slice(start)\n}\n\nexport function isNotFound(err: unknown): boolean {\n return err instanceof Error && err.message.startsWith('NotFound')\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n IndexEntry,\n ResourceType,\n mountPrefixOf,\n rstripSlash,\n stripSlash,\n type IndexCacheStore,\n type PathSpec,\n compareCodePoints,\n} from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { SCOPE_ERROR } from './constants.ts'\nimport { isNotFound } from './util.ts'\nimport { enoent } from '@struktoai/mirage-core'\n\nexport async function readdir(\n accessor: HfAccessor,\n path: PathSpec,\n index?: IndexCacheStore,\n): Promise<string[]> {\n const prefix = mountPrefixOf(path.virtual, path.resourcePath)\n let target = path.pattern !== null ? path.directory : path.virtual\n if (prefix !== '' && target.startsWith(prefix)) {\n const rest = target.slice(prefix.length)\n if (prefix.endsWith('/') || rest === '' || rest.startsWith('/')) {\n target = rest || '/'\n }\n }\n const virtualKey = rstripSlash(prefix !== '' ? `${prefix}${target}` : target) || '/'\n if (index !== undefined) {\n const listing = await index.listDir(virtualKey)\n if (listing.entries !== undefined && listing.entries !== null) {\n return listing.entries\n }\n }\n const strippedTarget = stripSlash(target)\n const listPath = strippedTarget !== '' ? `${strippedTarget}/` : '/'\n const op = await accessor.operator()\n const names: string[] = []\n const dirKeys = new Set<string>()\n const sizes = new Map<string, number | null>()\n let entries\n try {\n entries = await op.list(listPath)\n } catch (err) {\n if (isNotFound(err)) throw enoent(path)\n throw err\n }\n for (const entry of entries) {\n const relative = entry.path()\n if (relative === '' || relative === listPath) continue\n const isDir = relative.endsWith('/')\n const base = `/${rstripSlash(relative)}`\n names.push(base)\n if (isDir) {\n dirKeys.add(base)\n } else {\n const meta = entry.metadata()\n const length = meta.contentLength\n sizes.set(base, length !== null ? Number(length) : null)\n }\n }\n // The Hub tree API carries a size for every file (for LFS files it is\n // the object size, not the pointer's); when the lister omits the\n // metadata, one stat per affected file fills the gap so the index\n // never caches an unknown size.\n for (const [base, size] of sizes) {\n if (size !== null) continue\n const md = await op.stat(stripSlash(base))\n sizes.set(base, md.contentLength !== null ? Number(md.contentLength) : null)\n }\n names.sort(compareCodePoints)\n if (names.length > SCOPE_ERROR) {\n console.warn(\n `hf readdir: ${virtualKey} returned ${String(names.length)} entries (limit ${String(SCOPE_ERROR)})`,\n )\n }\n const virtualEntries = names\n .map((e) => (prefix !== '' ? `${prefix}${e}` : e))\n .sort(compareCodePoints)\n if (index !== undefined) {\n const indexEntries: [string, IndexEntry][] = names.map((e) => {\n const name = e.split('/').pop() ?? e\n if (dirKeys.has(e)) {\n return [name, new IndexEntry({ id: e, name, resourceType: ResourceType.FOLDER })]\n }\n return [\n name,\n new IndexEntry({\n id: e,\n name,\n resourceType: ResourceType.FILE,\n size: sizes.get(e) ?? null,\n }),\n ]\n })\n await index.setDir(virtualKey, indexEntries)\n }\n return virtualEntries\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const SCOPE_ERROR = 10000\nexport const DEFAULT_CHUNK_SIZE = 8192\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { type CommandIO, rangeOf } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../../accessor/hf.ts'\nimport { SCOPE_ERROR } from '../../../core/hf/constants.ts'\nimport { create as hfCreate } from '../../../core/hf/create.ts'\nimport { size as hfDu, entries as hfDuAll } from '../../../core/hf/du/index.ts'\nimport { mkdir as hfMkdir } from '../../../core/hf/mkdir.ts'\nimport { unlink as hfUnlink } from '../../../core/hf/unlink.ts'\nimport { read as hfRead } from '../../../core/hf/read.ts'\nimport { readdir as hfReaddir } from '../../../core/hf/readdir.ts'\nimport { rmR as hfRmR } from '../../../core/hf/rm.ts'\nimport { stat as hfStat } from '../../../core/hf/stat.ts'\nimport { stream as hfStream } from '../../../core/hf/stream.ts'\nimport { exists as hfExists } from '../../../core/hf/exists.ts'\nimport { write as hfWrite } from '../../../core/hf/write.ts'\n\nexport const HF_IO: CommandIO<HfAccessor> = {\n readdir: hfReaddir,\n readBytes: hfRead,\n readRange: rangeOf(hfRead),\n readStream: hfStream,\n stat: hfStat,\n du: { size: hfDu, entries: hfDuAll },\n isMounted: () => true,\n local: false,\n maxGlobMatches: SCOPE_ERROR,\n write: hfWrite,\n exists: hfExists,\n mkdir: (accessor, path) => hfMkdir(accessor, path),\n unlink: hfUnlink,\n rmR: hfRmR,\n create: hfCreate,\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { invalidateAfterWrite } from '@struktoai/mirage-core'\nimport { invalidateAncestors } from '@struktoai/mirage-core'\nimport { type IndexCacheStore, type PathSpec, record } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { hfKey, isNotFound, rawPathOf } from './util.ts'\nimport { enoent } from '@struktoai/mirage-core'\n\nexport async function write(\n accessor: HfAccessor,\n path: PathSpec,\n data: Uint8Array,\n _index?: IndexCacheStore,\n): Promise<void> {\n const rawPath = rawPathOf(path)\n const key = hfKey(rawPath)\n const op = await accessor.operator()\n const startMs = performance.now()\n try {\n await op.write(key, Buffer.from(data))\n } catch (err) {\n if (isNotFound(err)) throw enoent(path)\n throw err\n }\n record('write', path.virtual, accessor.resourceName, data.byteLength, startMs)\n await invalidateAfterWrite(path)\n await invalidateAncestors(path)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { IndexCacheStore, PathSpec } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { write } from './write.ts'\n\nexport async function create(\n accessor: HfAccessor,\n path: PathSpec,\n index?: IndexCacheStore,\n): Promise<void> {\n await write(accessor, path, new Uint8Array(), index)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { compareCodePoints, FileType, type PathSpec, stripSlash } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../../accessor/hf.ts'\nimport { isNotFound, rawPathOf } from '../util.ts'\nimport { lstrip, statOrNull } from './walk.ts'\n\nexport async function entries(\n accessor: HfAccessor,\n path: PathSpec,\n): Promise<[[string, number][], number]> {\n const info = await statOrNull(accessor, path)\n if (info !== null && info.type !== FileType.DIRECTORY) return [[], info.size ?? 0]\n const target = rawPathOf(path)\n const pfx = stripSlash(target)\n const scanPath = pfx !== '' ? `${pfx}/` : '/'\n const op = await accessor.operator()\n const results: [string, number][] = []\n let total = 0\n try {\n for (const entry of await op.list(scanPath, { recursive: true })) {\n const rel = entry.path()\n if (rel === '' || rel.endsWith('/')) continue\n const length = entry.metadata().contentLength\n const size = length !== null ? Number(length) : 0\n results.push([`/${lstrip(rel)}`, size])\n total += size\n }\n } catch (err) {\n if (!isNotFound(err)) throw err\n }\n results.sort((a, b) => compareCodePoints(a[0], b[0]))\n return [results, total]\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { type FileStat, type PathSpec } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../../accessor/hf.ts'\nimport { stat } from '../stat.ts'\n\nexport async function statOrNull(accessor: HfAccessor, path: PathSpec): Promise<FileStat | null> {\n try {\n return await stat(accessor, path)\n } catch (err) {\n if ((err as { code?: string } | null)?.code === 'ENOENT') return null\n throw err\n }\n}\n\nexport function lstrip(value: string): string {\n let start = 0\n while (start < value.length && value[start] === '/') start += 1\n return value.slice(start)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n FileStat,\n FileType,\n guessType,\n mountPrefixOf,\n stripSlash,\n type IndexCacheStore,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport type { Metadata } from 'opendal'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { isNotFound, rawPathOf } from './util.ts'\nimport { enoent } from '@struktoai/mirage-core'\n\nexport async function stat(\n accessor: HfAccessor,\n path: PathSpec,\n index?: IndexCacheStore,\n): Promise<FileStat> {\n const prefix = mountPrefixOf(path.virtual, path.resourcePath)\n const rawPath = rawPathOf(path)\n const stripped = stripSlash(rawPath)\n if (stripped === '') {\n return new FileStat({ name: '/', type: FileType.DIRECTORY })\n }\n if (index !== undefined) {\n const virtualKey = prefix !== '' ? `${prefix}/${stripped}` : `/${stripped}`\n const lookup = await index.get(virtualKey)\n if (lookup.entry !== undefined && lookup.entry !== null) {\n const entry = lookup.entry\n if (entry.resourceType === 'folder') {\n return new FileStat({ name: entry.name, type: FileType.DIRECTORY })\n }\n return new FileStat({\n name: entry.name,\n size: entry.size ?? null,\n type: guessType(entry.name),\n })\n }\n const parent = virtualKey.slice(0, virtualKey.lastIndexOf('/')) || '/'\n const parentListing = await index.listDir(parent)\n if (parentListing.entries !== undefined && parentListing.entries !== null) {\n throw enoent(path)\n }\n }\n const op = await accessor.operator()\n let md: Metadata | null = null\n try {\n md = await op.stat(stripped)\n } catch (err) {\n if (!isNotFound(err)) throw err\n }\n if (md !== null && !md.isDirectory()) {\n const etag = md.etag\n return new FileStat({\n name: stripped.split('/').pop() ?? stripped,\n size: md.contentLength !== null ? Number(md.contentLength) : null,\n modified: md.lastModified,\n type: guessType(rawPath),\n fingerprint: etag,\n extra: etag !== null && etag !== '' ? { etag } : {},\n })\n }\n // Buckets have no dir objects and opendal's trailing-slash stat\n // short-circuits to DIR client-side, so a directory exists iff\n // something lists under its prefix (object-store semantics).\n try {\n const children = await op.list(`${stripped}/`)\n if (children.length > 0) {\n return new FileStat({\n name: stripped.split('/').pop() ?? '/',\n type: FileType.DIRECTORY,\n })\n }\n } catch (err) {\n if (!isNotFound(err)) throw err\n }\n throw enoent(path)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { FileType, type PathSpec, stripSlash } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../../accessor/hf.ts'\nimport { isNotFound, rawPathOf } from '../util.ts'\nimport { statOrNull } from './walk.ts'\n\nexport async function size(accessor: HfAccessor, path: PathSpec): Promise<number> {\n const info = await statOrNull(accessor, path)\n if (info !== null && info.type !== FileType.DIRECTORY) return info.size ?? 0\n const target = rawPathOf(path)\n const pfx = stripSlash(target)\n const scanPath = pfx !== '' ? `${pfx}/` : '/'\n const op = await accessor.operator()\n let total = 0\n try {\n for (const entry of await op.list(scanPath, { recursive: true })) {\n if (entry.path().endsWith('/')) continue\n const length = entry.metadata().contentLength\n total += length !== null ? Number(length) : 0\n }\n } catch (err) {\n if (isNotFound(err)) return 0\n throw err\n }\n return total\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { IndexCacheStore, PathSpec } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\n\nexport async function mkdir(\n _accessor: HfAccessor,\n _path: PathSpec,\n _index?: IndexCacheStore,\n): Promise<void> {\n // Not \"object stores have no directories\": s3 and gridfs are object\n // stores too and both put a zero-byte `key/` marker, which is what keeps\n // an empty directory visible there. OpenDAL's hf service cannot store one\n // and refuses client-side, before any request is sent: create_dir is\n // unsupported, and a write to a slash-terminated path is IsADirectory. So\n // an hf directory exists only while it holds a key, and `mkdir x` then\n // `rmdir x` is ENOENT here but fine on s3.\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { invalidateAfterUnlink } from '@struktoai/mirage-core'\nimport { FileType, type IndexCacheStore, type PathSpec, record } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { invalidateAncestors } from '@struktoai/mirage-core'\nimport { stat } from './stat.ts'\nimport { hfKey, isNotFound, rawPathOf } from './util.ts'\nimport { enoent } from '@struktoai/mirage-core'\n\nexport async function unlink(\n accessor: HfAccessor,\n path: PathSpec,\n index?: IndexCacheStore,\n): Promise<void> {\n const fileStat = await stat(accessor, path, index)\n const rawPath = rawPathOf(path)\n if (fileStat.type === FileType.DIRECTORY) {\n const e = new Error(`EISDIR: ${rawPath}`) as Error & { code: string }\n e.code = 'EISDIR'\n throw e\n }\n const key = hfKey(rawPath)\n const op = await accessor.operator()\n const startMs = performance.now()\n try {\n await op.delete(key)\n } catch (err) {\n if (isNotFound(err)) throw enoent(path)\n throw err\n }\n record('unlink', path.virtual, accessor.resourceName, 0, startMs)\n await invalidateAfterUnlink(path)\n await invalidateAncestors(path)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { type IndexCacheStore, type PathSpec, record } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { hfKey, isNotFound, rawPathOf } from './util.ts'\nimport { enoent } from '@struktoai/mirage-core'\n\nexport interface HfReadOptions {\n offset?: number\n size?: number\n}\n\nexport async function read(\n accessor: HfAccessor,\n path: PathSpec,\n _index?: IndexCacheStore,\n options: HfReadOptions = {},\n): Promise<Uint8Array> {\n const virtual = path.virtual\n const rawPath = rawPathOf(path)\n const key = hfKey(rawPath)\n const op = await accessor.operator()\n const readOptions: { offset?: bigint; size?: bigint } = {}\n if (options.offset !== undefined && options.offset > 0) {\n readOptions.offset = BigInt(options.offset)\n }\n if (options.size !== undefined) {\n readOptions.offset ??= 0n\n readOptions.size = BigInt(options.size)\n }\n const startMs = performance.now()\n let data: Buffer\n try {\n data =\n readOptions.offset !== undefined || readOptions.size !== undefined\n ? await op.read(key, readOptions)\n : await op.read(key)\n } catch (err) {\n if (isNotFound(err)) throw enoent(path)\n throw err\n }\n const bytes = new Uint8Array(data)\n record('read', virtual, accessor.resourceName, bytes.byteLength, startMs)\n return bytes\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { invalidateAfterUnlink, record, stripSlash, type PathSpec } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { invalidateAncestors } from '@struktoai/mirage-core'\nimport { rawPathOf } from './util.ts'\n\nexport async function rmR(accessor: HfAccessor, path: PathSpec): Promise<void> {\n const stripped = stripSlash(rawPathOf(path))\n const scanPath = stripped !== '' ? `${stripped}/` : '/'\n const op = await accessor.operator()\n const startMs = performance.now()\n const entries = await op.list(scanPath, { recursive: true })\n for (const entry of entries) {\n const key = entry.path()\n if (key.endsWith('/')) continue\n await op.delete(key)\n }\n record('rm_r', path.virtual, accessor.resourceName, 0, startMs)\n await invalidateAfterUnlink(path)\n await invalidateAncestors(path)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { type IndexCacheStore, type PathSpec, recordStream } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { DEFAULT_CHUNK_SIZE } from './constants.ts'\nimport { read } from './read.ts'\nimport { hfKey, isNotFound, rawPathOf } from './util.ts'\nimport { enoent } from '@struktoai/mirage-core'\n\nexport async function rangeRead(\n accessor: HfAccessor,\n path: PathSpec,\n start: number,\n end: number,\n): Promise<Uint8Array> {\n return read(accessor, path, undefined, { offset: start, size: end - start })\n}\n\nexport async function* stream(\n accessor: HfAccessor,\n path: PathSpec,\n _index?: IndexCacheStore,\n chunkSize: number = DEFAULT_CHUNK_SIZE,\n): AsyncIterable<Uint8Array> {\n const virtual = path.virtual\n const rawPath = rawPathOf(path)\n const key = hfKey(rawPath)\n const op = await accessor.operator()\n const rec = recordStream('read', virtual, accessor.resourceName)\n let reader\n try {\n reader = await op.reader(key)\n } catch (err) {\n if (isNotFound(err)) throw enoent(path)\n throw err\n }\n const buf = Buffer.alloc(chunkSize)\n for (;;) {\n const n = Number(await reader.read(buf))\n if (n <= 0) break\n const chunk = new Uint8Array(buf.subarray(0, n))\n if (rec !== null) rec.bytes += chunk.byteLength\n yield chunk\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { stat } from './stat.ts'\n\nexport async function exists(accessor: HfAccessor, path: PathSpec): Promise<boolean> {\n try {\n await stat(accessor, path)\n return true\n } catch (err) {\n if ((err as { code?: string } | null)?.code === 'ENOENT') return false\n throw err\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { RegisteredOp } from '@struktoai/mirage-core'\nimport { makeGenericOps } from '@struktoai/mirage-core'\nimport { HF_RESOURCES } from '../../accessor/hf.ts'\nimport { HF_IO } from '../../commands/builtin/hf/io.ts'\n\nexport const HF_OPS: readonly RegisteredOp[] = makeGenericOps(HF_RESOURCES, HF_IO, {})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n PathSpec,\n makeResolveGlob,\n mountKey,\n mountPrefixOf,\n type FileStat,\n type FindOptions,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n} from '@struktoai/mirage-core'\nimport type { HfAccessor } from '../../accessor/hf.ts'\nimport { HF_COMMANDS } from '../../commands/builtin/hf/index.ts'\nimport { SCOPE_ERROR } from '../../core/hf/constants.ts'\nimport { create as createCore } from '../../core/hf/create.ts'\nimport { size as duSizeCore, entries as duEntriesCore } from '../../core/hf/du/index.ts'\nimport { exists as existsCore } from '../../core/hf/exists.ts'\nimport { find as findCore } from '../../core/hf/find.ts'\nimport { mkdir as mkdirCore } from '../../core/hf/mkdir.ts'\nimport { read as readCore } from '../../core/hf/read.ts'\nimport { readdir as readdirCore } from '../../core/hf/readdir.ts'\nimport { stat as statCore } from '../../core/hf/stat.ts'\nimport { rangeRead as rangeReadCore, stream as streamCore } from '../../core/hf/stream.ts'\nimport { unlink as unlinkCore } from '../../core/hf/unlink.ts'\nimport { write as writeCore } from '../../core/hf/write.ts'\nimport { HF_OPS } from '../../ops/hf/index.ts'\n\nconst globCore = makeResolveGlob(readdirCore, SCOPE_ERROR)\n\nexport abstract class HfResource extends BaseResource implements Resource {\n abstract readonly kind: string\n abstract readonly prompt: string\n abstract readonly accessor: HfAccessor\n readonly cachesReads: boolean = true\n // The Hub tree API reports each file's exact byte size (the LFS\n // object size for LFS files); readdir backfills any lister-omitted\n // size with one stat.\n readonly sizesAlwaysKnown: boolean = true\n readonly supportsSnapshot: boolean = true\n readonly opsMap: Record<string, unknown> = {\n read_bytes: readCore,\n readdir: readdirCore,\n stat: statCore,\n read_stream: streamCore,\n range_read: rangeReadCore,\n du_size: duSizeCore,\n du_entries: duEntriesCore,\n exists: existsCore,\n find_flat: findCore,\n write: writeCore,\n create: createCore,\n unlink: unlinkCore,\n mkdir: mkdirCore,\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return HF_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return HF_OPS\n }\n\n streamPath(p: PathSpec): AsyncIterable<Uint8Array> {\n return streamCore(this.accessor, p)\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return readCore(this.accessor, p, this.index)\n }\n\n writeFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return writeCore(this.accessor, p, data, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return readdirCore(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return statCore(this.accessor, p, this.index)\n }\n\n exists(p: PathSpec): Promise<boolean> {\n return existsCore(this.accessor, p)\n }\n\n mkdir(p: PathSpec): Promise<void> {\n return mkdirCore(this.accessor, p)\n }\n\n unlink(p: PathSpec): Promise<void> {\n return unlinkCore(this.accessor, p, this.index)\n }\n\n du(p: PathSpec): Promise<number> {\n return duSizeCore(this.accessor, p)\n }\n\n find(p: PathSpec, options: FindOptions = {}): Promise<string[]> {\n return findCore(this.accessor, p, options)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective = prefix\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath)\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return globCore(this.accessor, effective, this.index)\n }\n\n loadState(_state: unknown): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAeA,SAAS,UAAU,oBAAoB;AAIhC,IAAM,eAAe;AAAA,EAC1B,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AACf;AAEO,IAAe,aAAf,cAAkC,SAAS;AAAA,EAKhD,YAA4B,QAAwC;AAClE,UAAM;AADoB;AAAA,EAE5B;AAAA,EAF4B;AAAA,EAFpB,kBAA4C;AAAA,EAMpD,IAAI,SAAiB;AACnB,UAAM,SAAS,KAAK;AACpB,WAAO,OAAO,UAAU,OAAO,UAAU;AAAA,EAC3C;AAAA,EAIA,kBAA0C;AACxC,UAAM,UAAkC;AAAA,MACtC,WAAW,KAAK;AAAA,MAChB,SAAS,KAAK;AAAA,IAChB;AACA,QAAI,KAAK,OAAO,UAAU,UAAa,KAAK,OAAO,UAAU,IAAI;AAC/D,cAAQ,QAAQ,KAAK,OAAO;AAAA,IAC9B;AACA,QAAI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A,KAAK,GAAgC;AACnC,WAAO,KAAS,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC9C;AAAA,EAEA,OAAO,GAA+B;AACpC,WAAO,OAAW,KAAK,UAAU,CAAC;AAAA,EACpC;AAAA,EAEA,MAAM,GAA4B;AAChC,WAAO,MAAU,KAAK,UAAU,CAAC;AAAA,EACnC;AAAA,EAEA,OAAO,GAA4B;AACjC,WAAO,OAAW,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAChD;AAAA,EAEA,GAAG,GAA8B;AAC/B,WAAO,KAAW,KAAK,UAAU,CAAC;AAAA,EACpC;AAAA,EAEA,KAAK,GAAa,UAAuB,CAAC,GAAsB;AAC9D,WAAO,KAAS,KAAK,UAAU,GAAG,OAAO;AAAA,EAC3C;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YAAY,SACd,MAAM;AAAA,MAAI,CAAC,MACTC,eAAc,EAAE,SAAS,EAAE,YAAY,IACnC,IACA,IAAI,SAAS;AAAA,QACX,SAAS,EAAE;AAAA,QACX,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,CAAC;AAAA,IACP,IACA;AACJ,WAAO,SAAS,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EACtD;AAAA,EAEA,UAAU,QAAgC;AACxC,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":["size","entries","mountPrefixOf","rstripSlash","stripSlash","compareCodePoints","mountPrefixOf","rstripSlash","stripSlash","entries","size","compareCodePoints","enoent","compareCodePoints","FileType","stripSlash","mountPrefixOf","stripSlash","enoent","mountPrefixOf","stripSlash","FileType","stripSlash","size","compareCodePoints","FileType","stripSlash","FileType","stripSlash","FileType","record","invalidateAncestors","enoent","FileType","record","invalidateAncestors","record","enoent","record","invalidateAfterUnlink","record","stripSlash","invalidateAncestors","stripSlash","entries","record","invalidateAfterUnlink","invalidateAncestors","enoent","mountPrefixOf","mountPrefixOf"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
redactGoogleConfig
|
|
3
|
+
} from "./chunk-ZTHVEXIV.js";
|
|
4
|
+
|
|
5
|
+
// src/resource/gcal/gcal.ts
|
|
6
|
+
import {
|
|
7
|
+
BaseResource,
|
|
8
|
+
GCAL_COMMANDS,
|
|
9
|
+
GCAL_PROMPT,
|
|
10
|
+
GCAL_OPS,
|
|
11
|
+
GCAL_WRITE_PROMPT,
|
|
12
|
+
GCalAccessor,
|
|
13
|
+
PathSpec,
|
|
14
|
+
ResourceName,
|
|
15
|
+
TokenManager,
|
|
16
|
+
gcalRead,
|
|
17
|
+
gcalReaddir,
|
|
18
|
+
makeResolveGlob,
|
|
19
|
+
gcalStat,
|
|
20
|
+
mountKey,
|
|
21
|
+
mountPrefixOf
|
|
22
|
+
} from "@struktoai/mirage-core";
|
|
23
|
+
var gcalResolveGlob = makeResolveGlob(gcalReaddir);
|
|
24
|
+
var GCalResource = class extends BaseResource {
|
|
25
|
+
kind = ResourceName.GCAL;
|
|
26
|
+
cachesReads = true;
|
|
27
|
+
// Shorter than the other Google mounts: a calendar is edited by other
|
|
28
|
+
// people and a day-long index would keep serving a schedule that has
|
|
29
|
+
// already moved.
|
|
30
|
+
indexTtl = 300;
|
|
31
|
+
prompt = GCAL_PROMPT;
|
|
32
|
+
writePrompt = GCAL_WRITE_PROMPT;
|
|
33
|
+
config;
|
|
34
|
+
accessor;
|
|
35
|
+
constructor(config) {
|
|
36
|
+
super();
|
|
37
|
+
this.config = config;
|
|
38
|
+
const tm = new TokenManager(config);
|
|
39
|
+
this.accessor = new GCalAccessor({ tokenManager: tm, config });
|
|
40
|
+
}
|
|
41
|
+
open() {
|
|
42
|
+
return Promise.resolve();
|
|
43
|
+
}
|
|
44
|
+
commands() {
|
|
45
|
+
return GCAL_COMMANDS;
|
|
46
|
+
}
|
|
47
|
+
ops() {
|
|
48
|
+
return GCAL_OPS;
|
|
49
|
+
}
|
|
50
|
+
readFile(p) {
|
|
51
|
+
return gcalRead(this.accessor, p, this.index);
|
|
52
|
+
}
|
|
53
|
+
readdir(p) {
|
|
54
|
+
return gcalReaddir(this.accessor, p, this.index);
|
|
55
|
+
}
|
|
56
|
+
stat(p) {
|
|
57
|
+
return gcalStat(this.accessor, p, this.index);
|
|
58
|
+
}
|
|
59
|
+
glob(paths, prefix = "") {
|
|
60
|
+
const effective = prefix !== "" ? paths.map(
|
|
61
|
+
(p) => mountPrefixOf(p.virtual, p.resourcePath) !== "" ? p : new PathSpec({
|
|
62
|
+
virtual: p.virtual,
|
|
63
|
+
directory: p.directory,
|
|
64
|
+
...p.pattern !== null ? { pattern: p.pattern } : {},
|
|
65
|
+
resolved: p.resolved,
|
|
66
|
+
resourcePath: mountKey(p.virtual, prefix)
|
|
67
|
+
})
|
|
68
|
+
) : paths;
|
|
69
|
+
return gcalResolveGlob(this.accessor, effective, this.index);
|
|
70
|
+
}
|
|
71
|
+
getState() {
|
|
72
|
+
return Promise.resolve({
|
|
73
|
+
type: this.kind,
|
|
74
|
+
config: redactGoogleConfig(this.config)
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
loadState(_state) {
|
|
78
|
+
return Promise.resolve();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
GCalResource
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=chunk-DQIEWEAW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/gcal/gcal.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n GCAL_COMMANDS,\n GCAL_PROMPT,\n GCAL_OPS,\n GCAL_WRITE_PROMPT,\n GCalAccessor,\n PathSpec,\n ResourceName,\n TokenManager,\n gcalRead,\n gcalReaddir,\n makeResolveGlob,\n gcalStat,\n mountKey,\n mountPrefixOf,\n type FileStat,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n} from '@struktoai/mirage-core'\nimport { redactGCalConfig, type GCalConfig, type GCalConfigRedacted } from './config.ts'\n\nconst gcalResolveGlob = makeResolveGlob(gcalReaddir)\n\nexport interface GCalResourceState {\n type: string\n config: GCalConfigRedacted\n}\n\nexport class GCalResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.GCAL\n readonly cachesReads: boolean = true\n // Shorter than the other Google mounts: a calendar is edited by other\n // people and a day-long index would keep serving a schedule that has\n // already moved.\n override readonly indexTtl: number = 300\n readonly prompt: string = GCAL_PROMPT\n readonly writePrompt: string = GCAL_WRITE_PROMPT\n readonly config: GCalConfig\n readonly accessor: GCalAccessor\n\n constructor(config: GCalConfig) {\n super()\n this.config = config\n const tm = new TokenManager(config)\n this.accessor = new GCalAccessor({ tokenManager: tm, config })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GCAL_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GCAL_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gcalRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gcalReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gcalStat(this.accessor, p, this.index)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return gcalResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GCalResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGCalConfig(this.config),\n })\n }\n\n loadState(_state: GCalResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAGP,IAAM,kBAAkB,gBAAgB,WAAW;AAO5C,IAAM,eAAN,cAA2B,aAAiC;AAAA,EACxD,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA;AAAA;AAAA;AAAA,EAId,WAAmB;AAAA,EAC5B,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EAET,YAAY,QAAoB;AAC9B,UAAM;AACN,SAAK,SAAS;AACd,UAAM,KAAK,IAAI,aAAa,MAAM;AAClC,SAAK,WAAW,IAAI,aAAa,EAAE,cAAc,IAAI,OAAO,CAAC;AAAA,EAC/D;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,WAAyC;AACvC,WAAO;AAAA,EACT;AAAA,EAEA,MAA+B;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,SAAS,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC9C;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,YAAY,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACjD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,SAAS,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC9C;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,cAAc,EAAE,SAAS,EAAE,YAAY,MAAM,KACzC,IACA,IAAI,SAAS;AAAA,QACX,SAAS,EAAE;AAAA,QACX,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,CAAC;AAAA,IACP,IACA;AACN,WAAO,gBAAgB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAC7D;AAAA,EAEA,WAAuC;AACrC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAiB,KAAK,MAAM;AAAA,IACtC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA0C;AAClD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
// src/resource/supabase/config.ts
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
normalizeFields,
|
|
4
|
+
redactConfigWithSchema,
|
|
5
|
+
secretStr,
|
|
6
|
+
z
|
|
7
|
+
} from "@struktoai/mirage-core";
|
|
3
8
|
var SupabaseConfigSchema = z.object({
|
|
4
9
|
bucket: z.string(),
|
|
5
10
|
region: z.string(),
|
|
6
11
|
projectRef: z.string().optional(),
|
|
7
12
|
endpoint: z.string(),
|
|
8
|
-
accessKeyId: secretStr(),
|
|
9
|
-
secretAccessKey: secretStr(),
|
|
13
|
+
accessKeyId: secretStr().optional(),
|
|
14
|
+
secretAccessKey: secretStr().optional(),
|
|
10
15
|
sessionToken: secretStr().optional(),
|
|
16
|
+
profile: z.string().optional(),
|
|
11
17
|
keyPrefix: z.string().optional(),
|
|
12
|
-
timeoutMs: z.number().optional()
|
|
18
|
+
timeoutMs: z.number().optional(),
|
|
19
|
+
proxy: secretStr().optional()
|
|
13
20
|
});
|
|
14
21
|
function resolvedSupabaseEndpoint(config) {
|
|
15
22
|
if (config.endpoint !== void 0 && config.endpoint !== "") return config.endpoint;
|
|
@@ -23,12 +30,14 @@ function supabaseToS3Config(config) {
|
|
|
23
30
|
bucket: config.bucket,
|
|
24
31
|
region: config.region,
|
|
25
32
|
endpoint: resolvedSupabaseEndpoint(config),
|
|
26
|
-
accessKeyId: config.accessKeyId,
|
|
27
|
-
secretAccessKey: config.secretAccessKey,
|
|
28
|
-
forcePathStyle: true,
|
|
33
|
+
...config.accessKeyId !== void 0 ? { accessKeyId: config.accessKeyId } : {},
|
|
34
|
+
...config.secretAccessKey !== void 0 ? { secretAccessKey: config.secretAccessKey } : {},
|
|
29
35
|
...config.sessionToken !== void 0 ? { sessionToken: config.sessionToken } : {},
|
|
36
|
+
...config.profile !== void 0 ? { profile: config.profile } : {},
|
|
37
|
+
forcePathStyle: true,
|
|
30
38
|
...config.keyPrefix !== void 0 ? { keyPrefix: config.keyPrefix } : {},
|
|
31
|
-
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
39
|
+
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {},
|
|
40
|
+
...config.proxy !== void 0 ? { proxy: config.proxy } : {}
|
|
32
41
|
};
|
|
33
42
|
}
|
|
34
43
|
function redactSupabaseConfig(config) {
|
|
@@ -44,14 +53,14 @@ function normalizeSupabaseConfig(input) {
|
|
|
44
53
|
access_key_id: "accessKeyId",
|
|
45
54
|
secret_access_key: "secretAccessKey",
|
|
46
55
|
session_token: "sessionToken",
|
|
56
|
+
aws_profile: "profile",
|
|
47
57
|
endpoint_url: "endpoint",
|
|
48
58
|
key_prefix: "keyPrefix",
|
|
49
59
|
timeout: "timeoutMs"
|
|
50
60
|
},
|
|
51
61
|
transform: {
|
|
52
62
|
timeout: (v) => typeof v === "number" ? v * 1e3 : v
|
|
53
|
-
}
|
|
54
|
-
drop: ["proxy"]
|
|
63
|
+
}
|
|
55
64
|
});
|
|
56
65
|
}
|
|
57
66
|
|
|
@@ -61,4 +70,4 @@ export {
|
|
|
61
70
|
redactSupabaseConfig,
|
|
62
71
|
normalizeSupabaseConfig
|
|
63
72
|
};
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-EBI4IHDC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/supabase/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n normalizeFields,\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretStr,\n z,\n} from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface SupabaseConfig {\n bucket: string\n region: string\n accessKeyId?: string\n secretAccessKey?: string\n projectRef?: string\n endpoint?: string\n sessionToken?: string\n profile?: string\n keyPrefix?: string\n timeoutMs?: number\n proxy?: string\n}\n\nconst SupabaseConfigSchema = z.object({\n bucket: z.string(),\n region: z.string(),\n projectRef: z.string().optional(),\n endpoint: z.string(),\n accessKeyId: secretStr().optional(),\n secretAccessKey: secretStr().optional(),\n sessionToken: secretStr().optional(),\n profile: z.string().optional(),\n keyPrefix: z.string().optional(),\n timeoutMs: z.number().optional(),\n proxy: secretStr().optional(),\n})\n\n// Only the redacted twin derives: the schema is the resolved shape, with\n// the region and endpoint the redactor fills in.\nexport type SupabaseConfigRedacted = RedactedConfig<\n ConfigOf<typeof SupabaseConfigSchema>,\n 'accessKeyId' | 'secretAccessKey' | 'sessionToken' | 'proxy'\n>\n\nexport function resolvedSupabaseEndpoint(config: SupabaseConfig): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.projectRef !== undefined && config.projectRef !== '') {\n return `https://${config.projectRef}.storage.supabase.co/storage/v1/s3`\n }\n throw new Error('SupabaseConfig requires projectRef or endpoint')\n}\n\nexport function supabaseToS3Config(config: SupabaseConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region,\n endpoint: resolvedSupabaseEndpoint(config),\n ...(config.accessKeyId !== undefined ? { accessKeyId: config.accessKeyId } : {}),\n ...(config.secretAccessKey !== undefined ? { secretAccessKey: config.secretAccessKey } : {}),\n ...(config.sessionToken !== undefined ? { sessionToken: config.sessionToken } : {}),\n ...(config.profile !== undefined ? { profile: config.profile } : {}),\n forcePathStyle: true,\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n ...(config.proxy !== undefined ? { proxy: config.proxy } : {}),\n }\n}\n\nexport function redactSupabaseConfig(config: SupabaseConfig): SupabaseConfigRedacted {\n return redactConfigWithSchema(SupabaseConfigSchema, {\n ...config,\n endpoint: resolvedSupabaseEndpoint(config),\n }) as unknown as SupabaseConfigRedacted\n}\n\nexport function normalizeSupabaseConfig(input: Record<string, unknown>): SupabaseConfig {\n return normalizeFields(input, {\n rename: {\n project_ref: 'projectRef',\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n session_token: 'sessionToken',\n aws_profile: 'profile',\n endpoint_url: 'endpoint',\n key_prefix: 'keyPrefix',\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EAAE,SAAS,OAAO,QAAQ,IAAI,CAAC;AAAA,IAClE,gBAAgB;AAAA,IAChB,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,IACxE,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,IACxE,GAAI,OAAO,UAAU,SAAY,EAAE,OAAO,OAAO,MAAM,IAAI,CAAC;AAAA,EAC9D;AACF;AAEO,SAAS,qBAAqB,QAAgD;AACnF,SAAO,uBAAuB,sBAAsB;AAAA,IAClD,GAAG;AAAA,IACH,UAAU,yBAAyB,MAAM;AAAA,EAC3C,CAAC;AACH;AAEO,SAAS,wBAAwB,OAAgD;AACtF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,aAAa;AAAA,MACb,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
redactDiscordConfig
|
|
3
|
-
} from "./chunk-EVK6HH6Z.js";
|
|
4
|
-
|
|
5
1
|
// src/resource/discord/discord.ts
|
|
6
2
|
import {
|
|
7
3
|
BaseResource,
|
|
8
|
-
DISCORD_API,
|
|
9
4
|
DISCORD_COMMANDS,
|
|
10
5
|
DISCORD_PROMPT,
|
|
11
6
|
DISCORD_OPS,
|
|
12
7
|
DISCORD_WRITE_PROMPT,
|
|
13
8
|
DiscordAccessor,
|
|
14
|
-
|
|
9
|
+
NodeDiscordTransport,
|
|
15
10
|
PathSpec,
|
|
16
11
|
ResourceName,
|
|
17
12
|
discordRead,
|
|
@@ -21,23 +16,17 @@ import {
|
|
|
21
16
|
mountPrefixOf,
|
|
22
17
|
makeResolveGlob
|
|
23
18
|
} from "@struktoai/mirage-core";
|
|
19
|
+
import {
|
|
20
|
+
redactDiscordConfig
|
|
21
|
+
} from "@struktoai/mirage-core";
|
|
24
22
|
var resolveDiscordGlob = makeResolveGlob(discordReaddir);
|
|
25
|
-
var NodeDiscordTransport = class extends HttpDiscordTransport {
|
|
26
|
-
constructor(token) {
|
|
27
|
-
super();
|
|
28
|
-
this.token = token;
|
|
29
|
-
}
|
|
30
|
-
token;
|
|
31
|
-
baseUrl() {
|
|
32
|
-
return DISCORD_API;
|
|
33
|
-
}
|
|
34
|
-
authHeaders() {
|
|
35
|
-
return { Authorization: `Bot ${this.token}` };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
23
|
var DiscordResource = class extends BaseResource {
|
|
39
24
|
kind = ResourceName.DISCORD;
|
|
40
25
|
cachesReads = true;
|
|
26
|
+
// Every listed file carries an exact size: chat.jsonl and members/*.json
|
|
27
|
+
// are rendered at readdir from payloads the listing already fetched, and
|
|
28
|
+
// attachments carry Discord's CDN byte count.
|
|
29
|
+
sizesAlwaysKnown = true;
|
|
41
30
|
indexTtl = 600;
|
|
42
31
|
prompt = DISCORD_PROMPT;
|
|
43
32
|
writePrompt = DISCORD_WRITE_PROMPT;
|
|
@@ -46,14 +35,11 @@ var DiscordResource = class extends BaseResource {
|
|
|
46
35
|
constructor(config) {
|
|
47
36
|
super();
|
|
48
37
|
this.config = config;
|
|
49
|
-
this.accessor = new DiscordAccessor(new NodeDiscordTransport(config.token));
|
|
38
|
+
this.accessor = new DiscordAccessor(new NodeDiscordTransport(config.token, config.baseUrl));
|
|
50
39
|
}
|
|
51
40
|
open() {
|
|
52
41
|
return Promise.resolve();
|
|
53
42
|
}
|
|
54
|
-
close() {
|
|
55
|
-
return Promise.resolve();
|
|
56
|
-
}
|
|
57
43
|
commands() {
|
|
58
44
|
return DISCORD_COMMANDS;
|
|
59
45
|
}
|
|
@@ -95,4 +81,4 @@ var DiscordResource = class extends BaseResource {
|
|
|
95
81
|
export {
|
|
96
82
|
DiscordResource
|
|
97
83
|
};
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-EIUTZ6N7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/discord/discord.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n DISCORD_COMMANDS,\n DISCORD_PROMPT,\n DISCORD_OPS,\n DISCORD_WRITE_PROMPT,\n DiscordAccessor,\n NodeDiscordTransport,\n PathSpec,\n ResourceName,\n discordRead,\n discordReaddir,\n discordStat,\n mountKey,\n mountPrefixOf,\n makeResolveGlob,\n type FileStat,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n} from '@struktoai/mirage-core'\nimport {\n redactDiscordConfig,\n type DiscordConfig,\n type DiscordConfigRedacted,\n} from '@struktoai/mirage-core'\n\nconst resolveDiscordGlob = makeResolveGlob(discordReaddir)\n\nexport interface DiscordResourceState {\n type: string\n config: DiscordConfigRedacted\n}\n\nexport class DiscordResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.DISCORD\n readonly cachesReads: boolean = true\n // Every listed file carries an exact size: chat.jsonl and members/*.json\n // are rendered at readdir from payloads the listing already fetched, and\n // attachments carry Discord's CDN byte count.\n readonly sizesAlwaysKnown: boolean = true\n override readonly indexTtl: number = 600\n readonly prompt: string = DISCORD_PROMPT\n readonly writePrompt: string = DISCORD_WRITE_PROMPT\n readonly config: DiscordConfig\n readonly accessor: DiscordAccessor\n\n constructor(config: DiscordConfig) {\n super()\n this.config = config\n this.accessor = new DiscordAccessor(new NodeDiscordTransport(config.token, config.baseUrl))\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return DISCORD_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return DISCORD_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return discordRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return discordReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return discordStat(this.accessor, p, this.index)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return resolveDiscordGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<DiscordResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactDiscordConfig(this.config),\n })\n }\n\n loadState(_state: DiscordResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,OAGK;AAEP,IAAM,qBAAqB,gBAAgB,cAAc;AAOlD,IAAM,kBAAN,cAA8B,aAAiC;AAAA,EAC3D,OAAe,aAAa;AAAA,EAC5B,cAAuB;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EACH;AAAA,EAEA,UAAU,QAA6C;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3JZQ6VSZ.js";
|
|
4
4
|
|
|
5
5
|
// src/resource/s3/s3.ts
|
|
6
6
|
import {
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
S3_PROMPT,
|
|
14
14
|
copy as copyCore,
|
|
15
15
|
create as createCore,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
s3DuSize as duSizeCore,
|
|
17
|
+
s3DuEntries as duEntriesCore,
|
|
18
18
|
exists as existsCore,
|
|
19
19
|
find as findCore,
|
|
20
20
|
makeResolveGlob,
|
|
@@ -33,13 +33,21 @@ import {
|
|
|
33
33
|
stream as streamCore,
|
|
34
34
|
truncate as truncateCore,
|
|
35
35
|
unlink as unlinkCore,
|
|
36
|
-
write as writeCore
|
|
36
|
+
write as writeCore,
|
|
37
|
+
s3StorageId
|
|
37
38
|
} from "@struktoai/mirage-core";
|
|
39
|
+
import { HttpProxyAgent } from "http-proxy-agent";
|
|
40
|
+
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
38
41
|
var globCore = makeResolveGlob(readdirCore, S3_SCOPE_ERROR);
|
|
42
|
+
function createProxyAgents(proxy) {
|
|
43
|
+
return { httpAgent: new HttpProxyAgent(proxy), httpsAgent: new HttpsProxyAgent(proxy) };
|
|
44
|
+
}
|
|
39
45
|
var S3Resource = class extends BaseResource {
|
|
40
46
|
kind = ResourceName.S3;
|
|
41
47
|
cachesReads = true;
|
|
42
48
|
supportsSnapshot = true;
|
|
49
|
+
// byte store: stat() sizes every file from metadata
|
|
50
|
+
sizesAlwaysKnown = true;
|
|
43
51
|
indexTtl = 600;
|
|
44
52
|
prompt = S3_PROMPT;
|
|
45
53
|
config;
|
|
@@ -57,8 +65,8 @@ var S3Resource = class extends BaseResource {
|
|
|
57
65
|
read_stream: streamCore,
|
|
58
66
|
range_read: rangeReadCore,
|
|
59
67
|
rm_recursive: rmRCore,
|
|
60
|
-
|
|
61
|
-
|
|
68
|
+
du_size: duSizeCore,
|
|
69
|
+
du_entries: duEntriesCore,
|
|
62
70
|
create: createCore,
|
|
63
71
|
truncate: truncateCore,
|
|
64
72
|
exists: existsCore,
|
|
@@ -74,12 +82,16 @@ var S3Resource = class extends BaseResource {
|
|
|
74
82
|
delete cfg.keyPrefix;
|
|
75
83
|
}
|
|
76
84
|
this.config = cfg;
|
|
77
|
-
|
|
85
|
+
const proxy = cfg.proxy;
|
|
86
|
+
this.accessor = new S3Accessor({
|
|
87
|
+
...cfg,
|
|
88
|
+
...proxy !== void 0 && proxy !== "" ? { httpAgentProvider: () => createProxyAgents(proxy) } : {}
|
|
89
|
+
});
|
|
78
90
|
}
|
|
79
|
-
|
|
80
|
-
return
|
|
91
|
+
storageId() {
|
|
92
|
+
return s3StorageId(this.kind, this.config);
|
|
81
93
|
}
|
|
82
|
-
|
|
94
|
+
open() {
|
|
83
95
|
return Promise.resolve();
|
|
84
96
|
}
|
|
85
97
|
commands() {
|
|
@@ -144,7 +156,7 @@ var S3Resource = class extends BaseResource {
|
|
|
144
156
|
return rmRCore(this.accessor, p);
|
|
145
157
|
}
|
|
146
158
|
du(p) {
|
|
147
|
-
return
|
|
159
|
+
return duSizeCore(this.accessor, p);
|
|
148
160
|
}
|
|
149
161
|
find(p, options = {}) {
|
|
150
162
|
return findCore(this.accessor, p, options);
|
|
@@ -175,4 +187,4 @@ var S3Resource = class extends BaseResource {
|
|
|
175
187
|
export {
|
|
176
188
|
S3Resource
|
|
177
189
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
190
|
+
//# sourceMappingURL=chunk-EJZG5VUF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/s3/s3.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n PathSpec,\n ResourceName,\n S3Accessor,\n S3_COMMANDS,\n S3_OPS,\n S3_PROMPT,\n copy as copyCore,\n create as createCore,\n s3DuSize as duSizeCore,\n s3DuEntries as duEntriesCore,\n exists as existsCore,\n find as findCore,\n makeResolveGlob,\n mkdir as mkdirCore,\n mountKey,\n mountPrefixOf,\n normalizeKeyPrefix,\n rangeRead as rangeReadCore,\n read as readCore,\n readdir as readdirCore,\n rename as renameCore,\n S3_SCOPE_ERROR,\n rmR as rmRCore,\n rmdir as rmdirCore,\n stat as statCore,\n stream as streamCore,\n truncate as truncateCore,\n type FileStat,\n type FindOptions,\n type S3HttpAgents,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n unlink as unlinkCore,\n write as writeCore,\n s3StorageId,\n} from '@struktoai/mirage-core'\nimport { HttpProxyAgent } from 'http-proxy-agent'\nimport { HttpsProxyAgent } from 'https-proxy-agent'\nimport { redactConfig, type S3Config, type S3ConfigRedacted } from './config.ts'\n\nconst globCore = makeResolveGlob(readdirCore, S3_SCOPE_ERROR)\n\nfunction createProxyAgents(proxy: string): S3HttpAgents {\n return { httpAgent: new HttpProxyAgent(proxy), httpsAgent: new HttpsProxyAgent(proxy) }\n}\n\nexport interface S3ResourceState {\n type: string\n config: S3ConfigRedacted\n}\n\nexport class S3Resource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.S3\n readonly cachesReads: boolean = true\n readonly supportsSnapshot: boolean = true\n // byte store: stat() sizes every file from metadata\n readonly sizesAlwaysKnown: boolean = true\n override readonly indexTtl: number = 600\n readonly prompt: string = S3_PROMPT\n readonly config: S3Config\n readonly accessor: S3Accessor\n readonly opsMap: Record<string, unknown> = {\n read_bytes: readCore,\n write: writeCore,\n readdir: readdirCore,\n stat: statCore,\n unlink: unlinkCore,\n rmdir: rmdirCore,\n copy: copyCore,\n rename: renameCore,\n mkdir: mkdirCore,\n read_stream: streamCore,\n range_read: rangeReadCore,\n rm_recursive: rmRCore,\n du_size: duSizeCore,\n du_entries: duEntriesCore,\n create: createCore,\n truncate: truncateCore,\n exists: existsCore,\n find_flat: findCore,\n }\n\n constructor(config: S3Config) {\n super()\n const normalized = normalizeKeyPrefix(config.keyPrefix)\n const cfg: S3Config = { ...config }\n if (normalized !== undefined) {\n cfg.keyPrefix = normalized\n } else {\n delete cfg.keyPrefix\n }\n this.config = cfg\n const proxy = cfg.proxy\n this.accessor = new S3Accessor({\n ...cfg,\n ...(proxy !== undefined && proxy !== ''\n ? { httpAgentProvider: () => createProxyAgents(proxy) }\n : {}),\n })\n }\n\n override storageId(): string {\n return s3StorageId(this.kind, this.config)\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return S3_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return S3_OPS\n }\n\n streamPath(p: PathSpec): AsyncIterable<Uint8Array> {\n return streamCore(this.accessor, p)\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return readCore(this.accessor, p)\n }\n\n writeFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return writeCore(this.accessor, p, data)\n }\n\n async appendFile(p: PathSpec, data: Uint8Array): Promise<void> {\n let existing: Uint8Array\n try {\n existing = await readCore(this.accessor, p)\n } catch (err) {\n if ((err as { code?: string } | null)?.code === 'ENOENT') {\n existing = new Uint8Array()\n } else {\n throw err\n }\n }\n const merged = new Uint8Array(existing.byteLength + data.byteLength)\n merged.set(existing, 0)\n merged.set(data, existing.byteLength)\n await writeCore(this.accessor, p, merged)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return readdirCore(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return statCore(this.accessor, p)\n }\n\n exists(p: PathSpec): Promise<boolean> {\n return existsCore(this.accessor, p)\n }\n\n mkdir(p: PathSpec): Promise<void> {\n return mkdirCore(this.accessor, p)\n }\n\n rmdir(p: PathSpec): Promise<void> {\n return rmdirCore(this.accessor, p)\n }\n\n unlink(p: PathSpec): Promise<void> {\n return unlinkCore(this.accessor, p)\n }\n\n rename(src: PathSpec, dst: PathSpec): Promise<void> {\n return renameCore(this.accessor, src, dst)\n }\n\n truncate(p: PathSpec, length: number): Promise<void> {\n return truncateCore(this.accessor, p, length)\n }\n\n copy(src: PathSpec, dst: PathSpec): Promise<void> {\n return copyCore(this.accessor, src, dst)\n }\n\n rmR(p: PathSpec): Promise<void> {\n return rmRCore(this.accessor, p)\n }\n\n du(p: PathSpec): Promise<number> {\n return duSizeCore(this.accessor, p)\n }\n\n find(p: PathSpec, options: FindOptions = {}): Promise<string[]> {\n return findCore(this.accessor, p, options)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective = prefix\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath)\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return globCore(this.accessor, effective, this.index)\n }\n\n getState(): Promise<S3ResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactConfig(this.config),\n })\n }\n\n loadState(_state: S3ResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,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,WAAO,SAAS,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EACtD;AAAA,EAEA,WAAqC;AACnC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,aAAa,KAAK,MAAM;AAAA,IAClC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAAwC;AAChD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HfResource,
|
|
3
3
|
HfSpacesAccessor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DDAFNROK.js";
|
|
5
5
|
import {
|
|
6
6
|
assertHfRepoId,
|
|
7
7
|
redactHfRepoConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QAOVABCR.js";
|
|
9
9
|
|
|
10
10
|
// src/resource/hf_spaces/hf_spaces.ts
|
|
11
11
|
import { normalizeKeyPrefix, ResourceName } from "@struktoai/mirage-core";
|
|
@@ -47,4 +47,4 @@ export {
|
|
|
47
47
|
HF_SPACES_PROMPT,
|
|
48
48
|
HfSpacesResource
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-ENW5BVYN.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactSupabaseConfig,
|
|
3
3
|
supabaseToS3Config
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EBI4IHDC.js";
|
|
5
5
|
import {
|
|
6
6
|
S3Resource
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EJZG5VUF.js";
|
|
8
8
|
|
|
9
9
|
// src/resource/supabase/supabase.ts
|
|
10
10
|
import {
|
|
@@ -53,4 +53,4 @@ export {
|
|
|
53
53
|
SUPABASE_PROMPT,
|
|
54
54
|
SupabaseResource
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-ETIAW4YD.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
makeRegionAlias
|
|
3
|
+
} from "./chunk-7ZP6TPHX.js";
|
|
4
|
+
|
|
5
|
+
// src/resource/backblaze/config.ts
|
|
6
|
+
var alias = makeRegionAlias(
|
|
7
|
+
(config) => `https://s3.${config.region}.backblazeb2.com`
|
|
8
|
+
);
|
|
9
|
+
var resolvedBackblazeEndpoint = alias.resolvedEndpoint;
|
|
10
|
+
var backblazeToS3Config = alias.toS3Config;
|
|
11
|
+
var redactBackblazeConfig = alias.redact;
|
|
12
|
+
var normalizeBackblazeConfig = alias.normalize;
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
resolvedBackblazeEndpoint,
|
|
16
|
+
backblazeToS3Config,
|
|
17
|
+
redactBackblazeConfig,
|
|
18
|
+
normalizeBackblazeConfig
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chunk-EUPXAYPB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/backblaze/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { makeRegionAlias, type S3AliasConfig, type S3AliasConfigRedacted } from '../s3_alias.ts'\n\nexport interface BackblazeConfig extends S3AliasConfig {\n region: string\n}\n\nexport type BackblazeConfigRedacted = S3AliasConfigRedacted\n\nconst alias = makeRegionAlias<BackblazeConfig, BackblazeConfigRedacted>(\n (config) => `https://s3.${config.region}.backblazeb2.com`,\n)\n\nexport const resolvedBackblazeEndpoint = alias.resolvedEndpoint\nexport const backblazeToS3Config = alias.toS3Config\nexport const redactBackblazeConfig = alias.redact\nexport const normalizeBackblazeConfig = alias.normalize\n"],"mappings":";;;;;AAsBA,IAAM,QAAQ;AAAA,EACZ,CAAC,WAAW,cAAc,OAAO,MAAM;AACzC;AAEO,IAAM,4BAA4B,MAAM;AACxC,IAAM,sBAAsB,MAAM;AAClC,IAAM,wBAAwB,MAAM;AACpC,IAAM,2BAA2B,MAAM;","names":[]}
|