@struktoai/mirage-node 0.0.3-alpha.0 → 0.0.4
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 +1 -1
- package/dist/aliyun-PGI57A43.js +10 -0
- package/dist/backblaze-TSPL6Y56.js +10 -0
- package/dist/box-7XTZYDSO.js +8 -0
- package/dist/cas.lua +15 -0
- package/dist/ceph-C265UI5T.js +10 -0
- package/dist/{chunk-IQVNVTOP.js → chunk-25W4XQJZ.js} +5 -5
- package/dist/{chunk-QGRDPSAH.js → chunk-2ERLWAGG.js} +4 -2
- package/dist/chunk-2ERLWAGG.js.map +1 -0
- package/dist/{chunk-NJMGCT63.js → chunk-2QNPKPZZ.js} +7 -2
- package/dist/chunk-2QNPKPZZ.js.map +1 -0
- package/dist/{chunk-ZNWVJ6UW.js → chunk-3ASOQTZB.js} +7 -2
- package/dist/chunk-3ASOQTZB.js.map +1 -0
- package/dist/{chunk-ERELJ7BS.js → chunk-3JZN3GYO.js} +14 -13
- package/dist/chunk-3JZN3GYO.js.map +1 -0
- package/dist/{chunk-DTAY7LPC.js → chunk-4GYB7DGC.js} +295 -706
- package/dist/chunk-4GYB7DGC.js.map +1 -0
- package/dist/{chunk-G5BZE7UA.js → chunk-4M73WHIE.js} +3 -3
- package/dist/{chunk-Q6CDMOM6.js → chunk-4X6CLF4F.js} +3 -3
- package/dist/{chunk-3IJSIVKT.js → chunk-5I7Q7RHW.js} +3 -3
- package/dist/{chunk-YPT4JBUY.js → chunk-5YRWF5RP.js} +18 -16
- package/dist/chunk-5YRWF5RP.js.map +1 -0
- package/dist/chunk-5ZHNPNDD.js +944 -0
- package/dist/chunk-5ZHNPNDD.js.map +1 -0
- package/dist/{chunk-VGLHY6BK.js → chunk-AULFV3KY.js} +1 -2
- package/dist/chunk-AULFV3KY.js.map +1 -0
- package/dist/{chunk-A4Z6DZ22.js → chunk-BWLUBJQG.js} +20 -16
- package/dist/chunk-BWLUBJQG.js.map +1 -0
- package/dist/{chunk-OYV2DN66.js → chunk-BWWU5T2D.js} +3 -3
- package/dist/chunk-C7TNKIK5.js +39 -0
- package/dist/chunk-C7TNKIK5.js.map +1 -0
- package/dist/{chunk-HEHERHQ5.js → chunk-CB76WPUS.js} +13 -14
- package/dist/chunk-CB76WPUS.js.map +1 -0
- package/dist/chunk-CGGO5NKD.js +1194 -0
- package/dist/chunk-CGGO5NKD.js.map +1 -0
- package/dist/{chunk-B2ZOKNN4.js → chunk-CQCTCW4S.js} +1 -2
- package/dist/chunk-CQCTCW4S.js.map +1 -0
- package/dist/{chunk-AJICZLHT.js → chunk-CXQGMFI7.js} +3 -3
- package/dist/{chunk-LW25LMIH.js → chunk-D3U7VQCG.js} +1 -2
- package/dist/{chunk-LW25LMIH.js.map → chunk-D3U7VQCG.js.map} +1 -1
- package/dist/{chunk-RQYEEA2O.js → chunk-DXU7NZPH.js} +3 -3
- package/dist/{chunk-XGJ2QERC.js → chunk-E3KXVEYI.js} +8 -4
- package/dist/chunk-E3KXVEYI.js.map +1 -0
- package/dist/{chunk-L6JPBJAS.js → chunk-EGZNOUMH.js} +3 -3
- package/dist/{chunk-DNBAMB5J.js → chunk-EVK6HH6Z.js} +1 -2
- package/dist/{chunk-DNBAMB5J.js.map → chunk-EVK6HH6Z.js.map} +1 -1
- package/dist/{chunk-BYTU2YC3.js → chunk-F5NWRF32.js} +3 -3
- package/dist/{chunk-RLGWMJD3.js → chunk-FRGTDZQT.js} +146 -11
- package/dist/chunk-FRGTDZQT.js.map +1 -0
- package/dist/{chunk-DYXEITK3.js → chunk-GF75O2EN.js} +4 -2
- package/dist/chunk-GF75O2EN.js.map +1 -0
- package/dist/{chunk-W7FLHT65.js → chunk-GTAS3QVC.js} +1 -2
- package/dist/{chunk-W7FLHT65.js.map → chunk-GTAS3QVC.js.map} +1 -1
- package/dist/{chunk-RQK5UPMP.js → chunk-H62XQZUM.js} +4 -3
- package/dist/chunk-H62XQZUM.js.map +1 -0
- package/dist/{chunk-UT2OPSN4.js → chunk-HCU3B6FW.js} +1 -2
- package/dist/chunk-HCU3B6FW.js.map +1 -0
- package/dist/chunk-HEDE2377.js +754 -0
- package/dist/chunk-HEDE2377.js.map +1 -0
- package/dist/{chunk-JZQHKDSY.js → chunk-HGIPWY5Y.js} +22 -11
- package/dist/chunk-HGIPWY5Y.js.map +1 -0
- package/dist/{chunk-Q2IAILVC.js → chunk-HSD24IP2.js} +8 -4
- package/dist/chunk-HSD24IP2.js.map +1 -0
- package/dist/{chunk-5YOCVEUB.js → chunk-HWQPEBID.js} +19 -15
- package/dist/chunk-HWQPEBID.js.map +1 -0
- package/dist/{chunk-SFUCUARB.js → chunk-IEHPTILN.js} +4 -4
- package/dist/chunk-IEHPTILN.js.map +1 -0
- package/dist/{chunk-C6NHEDHY.js → chunk-IEVLWEBO.js} +15 -14
- package/dist/chunk-IEVLWEBO.js.map +1 -0
- package/dist/{chunk-YUK3X3B4.js → chunk-IKJQOYI4.js} +1 -2
- package/dist/{chunk-YUK3X3B4.js.map → chunk-IKJQOYI4.js.map} +1 -1
- package/dist/{chunk-MHCMHKM6.js → chunk-IUXXZHY3.js} +17 -23
- package/dist/chunk-IUXXZHY3.js.map +1 -0
- package/dist/{chunk-ABTEGAFB.js → chunk-JBDFYIN2.js} +13 -14
- package/dist/chunk-JBDFYIN2.js.map +1 -0
- package/dist/{chunk-A7X4L4JM.js → chunk-JEBH5APX.js} +15 -15
- package/dist/chunk-JEBH5APX.js.map +1 -0
- package/dist/{chunk-H3BST2LI.js → chunk-JHI2PHHD.js} +1 -2
- package/dist/{chunk-H3BST2LI.js.map → chunk-JHI2PHHD.js.map} +1 -1
- package/dist/{chunk-EGB7V74Z.js → chunk-KAWDDS27.js} +1 -3
- package/dist/chunk-KAWDDS27.js.map +1 -0
- package/dist/{chunk-DP2PP5V2.js → chunk-KGC2OGXI.js} +5 -4
- package/dist/chunk-KGC2OGXI.js.map +1 -0
- package/dist/{chunk-FXFDBF3P.js → chunk-L4GMDSMB.js} +3 -3
- package/dist/{chunk-O7ODGJYL.js → chunk-L7FEZ7LU.js} +3 -3
- package/dist/{chunk-54NTYJEO.js → chunk-LPDLPRPS.js} +1 -3
- package/dist/{chunk-54NTYJEO.js.map → chunk-LPDLPRPS.js.map} +1 -1
- package/dist/{chunk-UGK4TAVK.js → chunk-LPLZLSMK.js} +1 -2
- package/dist/chunk-LPLZLSMK.js.map +1 -0
- package/dist/{chunk-5DLOHQJ2.js → chunk-M6E7VK4D.js} +14 -14
- package/dist/chunk-M6E7VK4D.js.map +1 -0
- package/dist/{chunk-2CC5VW7K.js → chunk-MIQ3ECZM.js} +4 -2
- package/dist/chunk-MIQ3ECZM.js.map +1 -0
- package/dist/chunk-MRXTUFBZ.js +30 -0
- package/dist/chunk-MRXTUFBZ.js.map +1 -0
- package/dist/{chunk-RO5IQEDQ.js → chunk-NJ42VNXG.js} +1 -2
- package/dist/chunk-NJ42VNXG.js.map +1 -0
- package/dist/{chunk-3T3RMDNX.js → chunk-NLXJMXVE.js} +3 -3
- package/dist/{chunk-E2ISWXLB.js → chunk-OQKNDS66.js} +1 -1
- package/dist/{chunk-E2ISWXLB.js.map → chunk-OQKNDS66.js.map} +1 -1
- package/dist/chunk-OSVZKYXS.js +946 -0
- package/dist/chunk-OSVZKYXS.js.map +1 -0
- package/dist/{chunk-LYDMMNL2.js → chunk-RHUEV4I7.js} +12 -13
- package/dist/chunk-RHUEV4I7.js.map +1 -0
- package/dist/{chunk-JALIYI6M.js → chunk-S4KVLPBR.js} +7 -2
- package/dist/chunk-S4KVLPBR.js.map +1 -0
- package/dist/{chunk-XRU5WXZX.js → chunk-SAOQW6ZJ.js} +15 -15
- package/dist/chunk-SAOQW6ZJ.js.map +1 -0
- package/dist/{chunk-CASCUFK2.js → chunk-SI4GMRXD.js} +14 -15
- package/dist/chunk-SI4GMRXD.js.map +1 -0
- package/dist/{chunk-HQ4KWN76.js → chunk-SYMNWNC3.js} +3 -3
- package/dist/{chunk-PJBQKMCD.js → chunk-TUNR4VUM.js} +3 -3
- package/dist/{chunk-XHCBHYN4.js → chunk-UAJYJP5C.js} +7 -2
- package/dist/chunk-UAJYJP5C.js.map +1 -0
- package/dist/{chunk-OPYQ5KIO.js → chunk-UYA3XL3J.js} +4 -2
- package/dist/chunk-UYA3XL3J.js.map +1 -0
- package/dist/{chunk-WL7HS7EM.js → chunk-V7JVMG63.js} +3 -3
- package/dist/{chunk-LAJJPLEV.js → chunk-VBYIDRNU.js} +7 -3
- package/dist/chunk-VBYIDRNU.js.map +1 -0
- package/dist/{chunk-NHS7WLEQ.js → chunk-VHED2STW.js} +11 -8
- package/dist/chunk-VHED2STW.js.map +1 -0
- package/dist/{chunk-JZT4QGIP.js → chunk-VIICUPWQ.js} +1 -2
- package/dist/{chunk-JZT4QGIP.js.map → chunk-VIICUPWQ.js.map} +1 -1
- package/dist/{chunk-TRTUHCS4.js → chunk-VLRSOWHP.js} +17 -15
- package/dist/chunk-VLRSOWHP.js.map +1 -0
- package/dist/chunk-W5ZLIQFR.js +764 -0
- package/dist/chunk-W5ZLIQFR.js.map +1 -0
- package/dist/{chunk-YGZMVNN5.js → chunk-WTSSEUOZ.js} +7 -2
- package/dist/chunk-WTSSEUOZ.js.map +1 -0
- package/dist/{chunk-OHROA3FQ.js → chunk-WWP2STF5.js} +7 -2
- package/dist/chunk-WWP2STF5.js.map +1 -0
- package/dist/{chunk-C6NHFMIP.js → chunk-XADEMW6B.js} +3 -3
- package/dist/{chunk-KTNDT45N.js → chunk-XEMLYWHK.js} +3 -3
- package/dist/{chunk-OZAEWZZ3.js → chunk-XFSEADPC.js} +6 -2
- package/dist/chunk-XFSEADPC.js.map +1 -0
- package/dist/{chunk-TWGVQLG2.js → chunk-XUUSWR4U.js} +1 -2
- package/dist/{chunk-TWGVQLG2.js.map → chunk-XUUSWR4U.js.map} +1 -1
- package/dist/{chunk-XLQI4IT2.js → chunk-YBVMZ7SR.js} +7 -2
- package/dist/chunk-YBVMZ7SR.js.map +1 -0
- package/dist/{chunk-E7RW3SBV.js → chunk-YRJICL2Q.js} +15 -15
- package/dist/chunk-YRJICL2Q.js.map +1 -0
- package/dist/{chunk-B6SXRCBO.js → chunk-ZM44MGC5.js} +3 -3
- package/dist/{chunk-YAVGCQUP.js → chunk-ZMREYTHA.js} +16 -15
- package/dist/chunk-ZMREYTHA.js.map +1 -0
- package/dist/{chunk-H3I2KZIY.js → chunk-ZPB3SLPK.js} +1 -2
- package/dist/{chunk-H3I2KZIY.js.map → chunk-ZPB3SLPK.js.map} +1 -1
- package/dist/chunk-ZPZQXHW2.js +1230 -0
- package/dist/chunk-ZPZQXHW2.js.map +1 -0
- package/dist/{config-34LHOGLM.js → config-2LASFFRD.js} +2 -4
- package/dist/config-3WDIJPTG.js +9 -0
- package/dist/config-4QV4QYI5.js +9 -0
- package/dist/{config-ZFJYQZCH.js → config-54USUVSE.js} +2 -4
- package/dist/config-5ZXN2T2H.js +9 -0
- package/dist/config-A2GQYJDB.js +9 -0
- package/dist/config-BBOLI7VE.js +9 -0
- package/dist/{config-VM526IKB.js → config-BIBFLUIR.js} +2 -4
- package/dist/{config-EO23EY62.js → config-CPYFOUQO.js} +2 -4
- package/dist/{config-3IVQJBNW.js → config-DWSJL3NH.js} +2 -4
- package/dist/config-E22XAGYN.js +9 -0
- package/dist/config-EHE52ZTK.js +9 -0
- package/dist/{config-GE4W4ZJC.js → config-EX3ZJTZI.js} +2 -4
- package/dist/{config-QNMKWJ4M.js → config-FRK7ZL37.js} +2 -4
- package/dist/{config-LHFFXVYI.js → config-HQXNFQZS.js} +2 -4
- package/dist/config-HTXOOAOD.js +9 -0
- package/dist/{config-HKRMKD76.js → config-IPNWAJHH.js} +2 -4
- package/dist/config-J2C53GOT.js +9 -0
- package/dist/config-K63RX6EU.js +9 -0
- package/dist/config-L7SBSH5L.js +9 -0
- package/dist/config-LEALEMKA.js +9 -0
- package/dist/{config-IVY5EQQ2.js → config-M3Z47VYU.js} +2 -4
- package/dist/{config-EIHSP5DZ.js → config-MZM3IPFM.js} +2 -4
- package/dist/{config-GHRUKEQ6.js → config-OJ2BPESH.js} +2 -4
- package/dist/{config-WDAZFXYD.js → config-QO2XUME4.js} +2 -4
- package/dist/config-QWQGOXQ5.js +9 -0
- package/dist/config-RI7IEZUF.js +9 -0
- package/dist/{config-CVZ2AGCO.js → config-SPW6NESU.js} +2 -6
- package/dist/{config-QAA646XB.js → config-T2IUIU5C.js} +2 -4
- package/dist/{config-NV5WXP64.js → config-UU27ALAA.js} +2 -4
- package/dist/config-VKKZGC7V.js +9 -0
- package/dist/config-W7EVPJNK.js +11 -0
- package/dist/config-WKQ3FGTZ.js +9 -0
- package/dist/config-WVILHDFV.js +11 -0
- package/dist/{config-Q45Y46YT.js → config-XU6D5C7E.js} +2 -4
- package/dist/databricks_volume-ETRDJVVQ.js +7 -0
- package/dist/digitalocean-QP72DR4J.js +10 -0
- package/dist/discord-BSN5RB3E.js +8 -0
- package/dist/disk-24NWTN2I.js +7 -0
- package/dist/dropbox-OSTZXSIE.js +8 -0
- package/dist/email-4ZFPSWIN.js +8 -0
- package/dist/gcs-PFWR6MIW.js +10 -0
- package/dist/gdocs-GPAZRQG5.js +8 -0
- package/dist/gdrive-XSX6A7B3.js +8 -0
- package/dist/github-EQ4NXUTA.js +8 -0
- package/dist/github_ci-QL5B2Q2N.js +8 -0
- package/dist/gmail-2TBT4CVH.js +8 -0
- package/dist/gridfs-KZRZ6SIB.js +9 -0
- package/dist/gsheets-N53WEXN2.js +8 -0
- package/dist/gslides-TATSARTH.js +8 -0
- package/dist/hf_buckets-BK7NGJWS.js +10 -0
- package/dist/hf_datasets-UQ5QGM4L.js +10 -0
- package/dist/hf_models-75LFCQCS.js +10 -0
- package/dist/hf_spaces-6T2KB3UC.js +10 -0
- package/dist/index.d.ts +599 -79
- package/dist/index.js +1515 -422
- package/dist/index.js.map +1 -1
- package/dist/langfuse-AMQCQWNE.js +8 -0
- package/dist/linear-V3TXO6CV.js +8 -0
- package/dist/minio-IZRZY4C5.js +10 -0
- package/dist/mongodb-VMKPQCPX.js +7 -0
- package/dist/nextcloud-5RHQCGDO.js +9 -0
- package/dist/notion-6PPNTQFM.js +8 -0
- package/dist/oci-CKYBSFZJ.js +10 -0
- package/dist/postgres-WIQBVL5M.js +7 -0
- package/dist/qingstor-AP4IIPLY.js +10 -0
- package/dist/r2-C4XGEWQY.js +10 -0
- package/dist/redis-6D55Q2WB.js +8 -0
- package/dist/s3-XQBI2CXN.js +8 -0
- package/dist/scaleway-SEZJVURB.js +10 -0
- package/dist/seaweedfs-3XYIAFU2.js +10 -0
- package/dist/slack-ZHXDJQY4.js +8 -0
- package/dist/ssh-X2MO7JOV.js +8 -0
- package/dist/supabase-BBM44UTM.js +10 -0
- package/dist/supabase-BBM44UTM.js.map +1 -0
- package/dist/tencent-X72USLJ7.js +10 -0
- package/dist/tencent-X72USLJ7.js.map +1 -0
- package/dist/trello-EER5NG7L.js +8 -0
- package/dist/trello-EER5NG7L.js.map +1 -0
- package/dist/wasabi-O4MVIUFG.js +10 -0
- package/dist/wasabi-O4MVIUFG.js.map +1 -0
- package/package.json +9 -5
- package/dist/aliyun-TMZRUYCG.js +0 -10
- package/dist/backblaze-OHW57DLK.js +0 -10
- package/dist/box-UXTCAFOZ.js +0 -8
- package/dist/ceph-TNN4I2FT.js +0 -10
- package/dist/chunk-2CC5VW7K.js.map +0 -1
- package/dist/chunk-5DLOHQJ2.js.map +0 -1
- package/dist/chunk-5HCVKTP3.js +0 -2086
- package/dist/chunk-5HCVKTP3.js.map +0 -1
- package/dist/chunk-5YOCVEUB.js.map +0 -1
- package/dist/chunk-A4Z6DZ22.js.map +0 -1
- package/dist/chunk-A7X4L4JM.js.map +0 -1
- package/dist/chunk-ABTEGAFB.js.map +0 -1
- package/dist/chunk-B2ZOKNN4.js.map +0 -1
- package/dist/chunk-C6NHEDHY.js.map +0 -1
- package/dist/chunk-CASCUFK2.js.map +0 -1
- package/dist/chunk-DP2PP5V2.js.map +0 -1
- package/dist/chunk-DTAY7LPC.js.map +0 -1
- package/dist/chunk-DYXEITK3.js.map +0 -1
- package/dist/chunk-E7RW3SBV.js.map +0 -1
- package/dist/chunk-EGB7V74Z.js.map +0 -1
- package/dist/chunk-ERELJ7BS.js.map +0 -1
- package/dist/chunk-HEHERHQ5.js.map +0 -1
- package/dist/chunk-JALIYI6M.js.map +0 -1
- package/dist/chunk-JZQHKDSY.js.map +0 -1
- package/dist/chunk-LAJJPLEV.js.map +0 -1
- package/dist/chunk-LYDMMNL2.js.map +0 -1
- package/dist/chunk-MHCMHKM6.js.map +0 -1
- package/dist/chunk-N72CAZEH.js +0 -1990
- package/dist/chunk-N72CAZEH.js.map +0 -1
- package/dist/chunk-NHS7WLEQ.js.map +0 -1
- package/dist/chunk-NJMGCT63.js.map +0 -1
- package/dist/chunk-OHROA3FQ.js.map +0 -1
- package/dist/chunk-OPYQ5KIO.js.map +0 -1
- package/dist/chunk-OZAEWZZ3.js.map +0 -1
- package/dist/chunk-PBBG7VFT.js +0 -1896
- package/dist/chunk-PBBG7VFT.js.map +0 -1
- package/dist/chunk-Q2IAILVC.js.map +0 -1
- package/dist/chunk-QGRDPSAH.js.map +0 -1
- package/dist/chunk-RLGWMJD3.js.map +0 -1
- package/dist/chunk-RO5IQEDQ.js.map +0 -1
- package/dist/chunk-RQK5UPMP.js.map +0 -1
- package/dist/chunk-SFUCUARB.js.map +0 -1
- package/dist/chunk-TRTUHCS4.js.map +0 -1
- package/dist/chunk-U6QSXTUS.js +0 -7
- package/dist/chunk-U6QSXTUS.js.map +0 -1
- package/dist/chunk-UGK4TAVK.js.map +0 -1
- package/dist/chunk-UT2OPSN4.js.map +0 -1
- package/dist/chunk-VGLHY6BK.js.map +0 -1
- package/dist/chunk-WSGEIVY3.js +0 -1766
- package/dist/chunk-WSGEIVY3.js.map +0 -1
- package/dist/chunk-XGJ2QERC.js.map +0 -1
- package/dist/chunk-XHCBHYN4.js.map +0 -1
- package/dist/chunk-XLQI4IT2.js.map +0 -1
- package/dist/chunk-XRU5WXZX.js.map +0 -1
- package/dist/chunk-YAVGCQUP.js.map +0 -1
- package/dist/chunk-YGZMVNN5.js.map +0 -1
- package/dist/chunk-YPT4JBUY.js.map +0 -1
- package/dist/chunk-ZNWVJ6UW.js.map +0 -1
- package/dist/config-3BBWD5AB.js +0 -11
- package/dist/config-4UDVSUQJ.js +0 -11
- package/dist/config-CMDBAPDH.js +0 -11
- package/dist/config-D3RLSPNF.js +0 -11
- package/dist/config-DG65OEG3.js +0 -11
- package/dist/config-GCQK6NJY.js +0 -11
- package/dist/config-GVH27UPE.js +0 -11
- package/dist/config-HXVYIXP5.js +0 -11
- package/dist/config-IDZMEW73.js +0 -11
- package/dist/config-IJJXGLBQ.js +0 -11
- package/dist/config-KJOLGVB2.js +0 -11
- package/dist/config-KMVCVBYN.js +0 -15
- package/dist/config-KYTRXAB2.js +0 -15
- package/dist/config-OT2TQQCN.js +0 -11
- package/dist/config-QWCY3LBQ.js +0 -11
- package/dist/config-ZV6G2ZEC.js +0 -11
- package/dist/databricks_volume-HNQ4DJVJ.js +0 -7
- package/dist/digitalocean-6SPR4S7V.js +0 -10
- package/dist/discord-SAV2RBJV.js +0 -8
- package/dist/disk-POACMF4G.js +0 -8
- package/dist/dropbox-CQ7MTYX2.js +0 -8
- package/dist/email-KBQ7CXS7.js +0 -8
- package/dist/gcs-SMIE4VMT.js +0 -10
- package/dist/gdocs-X5Y2SIQX.js +0 -8
- package/dist/gdrive-SIQPRIGI.js +0 -8
- package/dist/github-KBHWANKQ.js +0 -8
- package/dist/github_ci-HPITNK37.js +0 -8
- package/dist/gmail-DKHAGJNX.js +0 -8
- package/dist/gsheets-ZSUDIWGK.js +0 -8
- package/dist/gslides-GYXM7IMJ.js +0 -8
- package/dist/hf_buckets-RIOMV7WG.js +0 -10
- package/dist/hf_datasets-QF4BQ3OK.js +0 -10
- package/dist/hf_models-62GC2HPZ.js +0 -10
- package/dist/hf_spaces-NVSMUNRM.js +0 -10
- package/dist/langfuse-HUAYVPHF.js +0 -8
- package/dist/linear-2MM55KBC.js +0 -8
- package/dist/minio-L3XE6PQS.js +0 -10
- package/dist/mongodb-ZOX4FRHJ.js +0 -7
- package/dist/notion-UK4GTMT4.js +0 -8
- package/dist/oci-NURLWPL2.js +0 -10
- package/dist/postgres-JNFMPAO2.js +0 -7
- package/dist/qingstor-W55D5YFO.js +0 -10
- package/dist/r2-FSZK7IFI.js +0 -10
- package/dist/redis-S6GIPA4Z.js +0 -8
- package/dist/s3-GMPUJ65D.js +0 -8
- package/dist/scaleway-5VM55Y6D.js +0 -10
- package/dist/seaweedfs-J3EPUEPE.js +0 -10
- package/dist/slack-FVBXY7KD.js +0 -8
- package/dist/ssh-GCXETJ3Z.js +0 -9
- package/dist/supabase-HLWNHBBE.js +0 -10
- package/dist/tencent-YDO73XBD.js +0 -10
- package/dist/trello-CQ53BQUL.js +0 -8
- package/dist/wasabi-SOZKPMRQ.js +0 -10
- /package/dist/{aliyun-TMZRUYCG.js.map → aliyun-PGI57A43.js.map} +0 -0
- /package/dist/{backblaze-OHW57DLK.js.map → backblaze-TSPL6Y56.js.map} +0 -0
- /package/dist/{box-UXTCAFOZ.js.map → box-7XTZYDSO.js.map} +0 -0
- /package/dist/{ceph-TNN4I2FT.js.map → ceph-C265UI5T.js.map} +0 -0
- /package/dist/{chunk-IQVNVTOP.js.map → chunk-25W4XQJZ.js.map} +0 -0
- /package/dist/{chunk-G5BZE7UA.js.map → chunk-4M73WHIE.js.map} +0 -0
- /package/dist/{chunk-Q6CDMOM6.js.map → chunk-4X6CLF4F.js.map} +0 -0
- /package/dist/{chunk-3IJSIVKT.js.map → chunk-5I7Q7RHW.js.map} +0 -0
- /package/dist/{chunk-OYV2DN66.js.map → chunk-BWWU5T2D.js.map} +0 -0
- /package/dist/{chunk-AJICZLHT.js.map → chunk-CXQGMFI7.js.map} +0 -0
- /package/dist/{chunk-RQYEEA2O.js.map → chunk-DXU7NZPH.js.map} +0 -0
- /package/dist/{chunk-L6JPBJAS.js.map → chunk-EGZNOUMH.js.map} +0 -0
- /package/dist/{chunk-BYTU2YC3.js.map → chunk-F5NWRF32.js.map} +0 -0
- /package/dist/{chunk-FXFDBF3P.js.map → chunk-L4GMDSMB.js.map} +0 -0
- /package/dist/{chunk-O7ODGJYL.js.map → chunk-L7FEZ7LU.js.map} +0 -0
- /package/dist/{chunk-3T3RMDNX.js.map → chunk-NLXJMXVE.js.map} +0 -0
- /package/dist/{chunk-HQ4KWN76.js.map → chunk-SYMNWNC3.js.map} +0 -0
- /package/dist/{chunk-PJBQKMCD.js.map → chunk-TUNR4VUM.js.map} +0 -0
- /package/dist/{chunk-WL7HS7EM.js.map → chunk-V7JVMG63.js.map} +0 -0
- /package/dist/{chunk-C6NHFMIP.js.map → chunk-XADEMW6B.js.map} +0 -0
- /package/dist/{chunk-KTNDT45N.js.map → chunk-XEMLYWHK.js.map} +0 -0
- /package/dist/{chunk-B6SXRCBO.js.map → chunk-ZM44MGC5.js.map} +0 -0
- /package/dist/{config-34LHOGLM.js.map → config-2LASFFRD.js.map} +0 -0
- /package/dist/{config-3BBWD5AB.js.map → config-3WDIJPTG.js.map} +0 -0
- /package/dist/{config-3IVQJBNW.js.map → config-4QV4QYI5.js.map} +0 -0
- /package/dist/{config-4UDVSUQJ.js.map → config-54USUVSE.js.map} +0 -0
- /package/dist/{config-CMDBAPDH.js.map → config-5ZXN2T2H.js.map} +0 -0
- /package/dist/{config-CVZ2AGCO.js.map → config-A2GQYJDB.js.map} +0 -0
- /package/dist/{config-D3RLSPNF.js.map → config-BBOLI7VE.js.map} +0 -0
- /package/dist/{config-DG65OEG3.js.map → config-BIBFLUIR.js.map} +0 -0
- /package/dist/{config-EIHSP5DZ.js.map → config-CPYFOUQO.js.map} +0 -0
- /package/dist/{config-EO23EY62.js.map → config-DWSJL3NH.js.map} +0 -0
- /package/dist/{config-GCQK6NJY.js.map → config-E22XAGYN.js.map} +0 -0
- /package/dist/{config-GE4W4ZJC.js.map → config-EHE52ZTK.js.map} +0 -0
- /package/dist/{config-GHRUKEQ6.js.map → config-EX3ZJTZI.js.map} +0 -0
- /package/dist/{config-GVH27UPE.js.map → config-FRK7ZL37.js.map} +0 -0
- /package/dist/{config-HKRMKD76.js.map → config-HQXNFQZS.js.map} +0 -0
- /package/dist/{config-HXVYIXP5.js.map → config-HTXOOAOD.js.map} +0 -0
- /package/dist/{config-IDZMEW73.js.map → config-IPNWAJHH.js.map} +0 -0
- /package/dist/{config-IJJXGLBQ.js.map → config-J2C53GOT.js.map} +0 -0
- /package/dist/{config-IVY5EQQ2.js.map → config-K63RX6EU.js.map} +0 -0
- /package/dist/{config-KJOLGVB2.js.map → config-L7SBSH5L.js.map} +0 -0
- /package/dist/{config-KMVCVBYN.js.map → config-LEALEMKA.js.map} +0 -0
- /package/dist/{config-KYTRXAB2.js.map → config-M3Z47VYU.js.map} +0 -0
- /package/dist/{config-LHFFXVYI.js.map → config-MZM3IPFM.js.map} +0 -0
- /package/dist/{config-NV5WXP64.js.map → config-OJ2BPESH.js.map} +0 -0
- /package/dist/{config-OT2TQQCN.js.map → config-QO2XUME4.js.map} +0 -0
- /package/dist/{config-Q45Y46YT.js.map → config-QWQGOXQ5.js.map} +0 -0
- /package/dist/{config-QAA646XB.js.map → config-RI7IEZUF.js.map} +0 -0
- /package/dist/{config-QNMKWJ4M.js.map → config-SPW6NESU.js.map} +0 -0
- /package/dist/{config-QWCY3LBQ.js.map → config-T2IUIU5C.js.map} +0 -0
- /package/dist/{config-VM526IKB.js.map → config-UU27ALAA.js.map} +0 -0
- /package/dist/{config-WDAZFXYD.js.map → config-VKKZGC7V.js.map} +0 -0
- /package/dist/{config-ZFJYQZCH.js.map → config-W7EVPJNK.js.map} +0 -0
- /package/dist/{config-ZV6G2ZEC.js.map → config-WKQ3FGTZ.js.map} +0 -0
- /package/dist/{databricks_volume-HNQ4DJVJ.js.map → config-WVILHDFV.js.map} +0 -0
- /package/dist/{digitalocean-6SPR4S7V.js.map → config-XU6D5C7E.js.map} +0 -0
- /package/dist/{discord-SAV2RBJV.js.map → databricks_volume-ETRDJVVQ.js.map} +0 -0
- /package/dist/{disk-POACMF4G.js.map → digitalocean-QP72DR4J.js.map} +0 -0
- /package/dist/{dropbox-CQ7MTYX2.js.map → discord-BSN5RB3E.js.map} +0 -0
- /package/dist/{email-KBQ7CXS7.js.map → disk-24NWTN2I.js.map} +0 -0
- /package/dist/{gcs-SMIE4VMT.js.map → dropbox-OSTZXSIE.js.map} +0 -0
- /package/dist/{gdocs-X5Y2SIQX.js.map → email-4ZFPSWIN.js.map} +0 -0
- /package/dist/{gdrive-SIQPRIGI.js.map → gcs-PFWR6MIW.js.map} +0 -0
- /package/dist/{github-KBHWANKQ.js.map → gdocs-GPAZRQG5.js.map} +0 -0
- /package/dist/{github_ci-HPITNK37.js.map → gdrive-XSX6A7B3.js.map} +0 -0
- /package/dist/{gmail-DKHAGJNX.js.map → github-EQ4NXUTA.js.map} +0 -0
- /package/dist/{gsheets-ZSUDIWGK.js.map → github_ci-QL5B2Q2N.js.map} +0 -0
- /package/dist/{gslides-GYXM7IMJ.js.map → gmail-2TBT4CVH.js.map} +0 -0
- /package/dist/{hf_buckets-RIOMV7WG.js.map → gridfs-KZRZ6SIB.js.map} +0 -0
- /package/dist/{hf_datasets-QF4BQ3OK.js.map → gsheets-N53WEXN2.js.map} +0 -0
- /package/dist/{hf_models-62GC2HPZ.js.map → gslides-TATSARTH.js.map} +0 -0
- /package/dist/{hf_spaces-NVSMUNRM.js.map → hf_buckets-BK7NGJWS.js.map} +0 -0
- /package/dist/{langfuse-HUAYVPHF.js.map → hf_datasets-UQ5QGM4L.js.map} +0 -0
- /package/dist/{linear-2MM55KBC.js.map → hf_models-75LFCQCS.js.map} +0 -0
- /package/dist/{minio-L3XE6PQS.js.map → hf_spaces-6T2KB3UC.js.map} +0 -0
- /package/dist/{mongodb-ZOX4FRHJ.js.map → langfuse-AMQCQWNE.js.map} +0 -0
- /package/dist/{notion-UK4GTMT4.js.map → linear-V3TXO6CV.js.map} +0 -0
- /package/dist/{oci-NURLWPL2.js.map → minio-IZRZY4C5.js.map} +0 -0
- /package/dist/{postgres-JNFMPAO2.js.map → mongodb-VMKPQCPX.js.map} +0 -0
- /package/dist/{qingstor-W55D5YFO.js.map → nextcloud-5RHQCGDO.js.map} +0 -0
- /package/dist/{r2-FSZK7IFI.js.map → notion-6PPNTQFM.js.map} +0 -0
- /package/dist/{redis-S6GIPA4Z.js.map → oci-CKYBSFZJ.js.map} +0 -0
- /package/dist/{s3-GMPUJ65D.js.map → postgres-WIQBVL5M.js.map} +0 -0
- /package/dist/{scaleway-5VM55Y6D.js.map → qingstor-AP4IIPLY.js.map} +0 -0
- /package/dist/{seaweedfs-J3EPUEPE.js.map → r2-C4XGEWQY.js.map} +0 -0
- /package/dist/{slack-FVBXY7KD.js.map → redis-6D55Q2WB.js.map} +0 -0
- /package/dist/{ssh-GCXETJ3Z.js.map → s3-XQBI2CXN.js.map} +0 -0
- /package/dist/{supabase-HLWNHBBE.js.map → scaleway-SEZJVURB.js.map} +0 -0
- /package/dist/{tencent-YDO73XBD.js.map → seaweedfs-3XYIAFU2.js.map} +0 -0
- /package/dist/{trello-CQ53BQUL.js.map → slack-ZHXDJQY4.js.map} +0 -0
- /package/dist/{wasabi-SOZKPMRQ.js.map → ssh-X2MO7JOV.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/disk/disk.ts","../src/commands/builtin/disk/index.ts","../src/core/disk/read.ts","../src/core/disk/utils.ts","../src/core/disk/stat.ts","../src/core/disk/append.ts","../src/core/disk/constants.ts","../src/core/disk/copy.ts","../src/core/disk/write.ts","../src/core/disk/create.ts","../src/core/disk/du.ts","../src/core/disk/exists.ts","../src/core/disk/find.ts","../src/core/disk/mkdir.ts","../src/core/disk/readdir.ts","../src/core/disk/rename.ts","../src/core/disk/rm.ts","../src/core/disk/rmdir.ts","../src/core/disk/set_attrs.ts","../src/core/disk/stream.ts","../src/core/disk/truncate.ts","../src/core/disk/unlink.ts","../src/commands/builtin/disk/io.ts","../src/accessor/disk.ts","../src/ops/disk/index.ts","../src/resource/disk/prompt.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 { chmod, mkdir, readdir, readFile, stat as fsStat, writeFile } from 'node:fs/promises'\nimport path from 'node:path'\nimport {\n BaseResource,\n PathSpec,\n ResourceName,\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 { DISK_COMMANDS } from '../../commands/builtin/disk/index.ts'\nimport { appendBytes as appendCore } from '../../core/disk/append.ts'\nimport { SCOPE_ERROR } from '../../core/disk/constants.ts'\nimport { copy as copyCore } from '../../core/disk/copy.ts'\nimport { create as createCore } from '../../core/disk/create.ts'\nimport { du as duCore, duAll as duAllCore } from '../../core/disk/du.ts'\nimport { exists as existsCore } from '../../core/disk/exists.ts'\nimport { find as findCore, type FindOptions as DiskFindOptions } from '../../core/disk/find.ts'\nimport { mkdir as mkdirCore } from '../../core/disk/mkdir.ts'\nimport { read as readCoreFn } from '../../core/disk/read.ts'\nimport { readdir as readdirCore } from '../../core/disk/readdir.ts'\nimport { rename as renameCore } from '../../core/disk/rename.ts'\nimport { rmR as rmRCore } from '../../core/disk/rm.ts'\nimport { rmdir as rmdirCore } from '../../core/disk/rmdir.ts'\nimport { stat as statCore } from '../../core/disk/stat.ts'\nimport { stream as streamCore } from '../../core/disk/stream.ts'\nimport { truncate as truncateCore } from '../../core/disk/truncate.ts'\nimport { unlink as unlinkCore } from '../../core/disk/unlink.ts'\nimport { writeBytes as writeCore } from '../../core/disk/write.ts'\nimport { DiskAccessor } from '../../accessor/disk.ts'\nimport { DISK_OPS } from '../../ops/disk/index.ts'\nimport { DISK_PROMPT } from './prompt.ts'\n\nconst globCore = makeResolveGlob(readdirCore, SCOPE_ERROR)\n\nexport interface DiskResourceOptions {\n root: string\n}\n\nexport interface DiskResourceState {\n type: string\n files: Record<string, Uint8Array>\n modes?: Record<string, number>\n}\n\nasync function walkFiles(root: string, current: string, out: string[]): Promise<void> {\n const entries = await readdir(current, { withFileTypes: true })\n for (const e of entries) {\n const child = path.join(current, e.name)\n if (e.isDirectory()) {\n await walkFiles(root, child, out)\n } else if (e.isFile()) {\n out.push(child)\n }\n }\n}\n\nexport class DiskResource extends BaseResource implements Resource {\n readonly kind = ResourceName.DISK\n readonly cachesReads: boolean = false\n override readonly indexTtl: number = 60\n readonly prompt = DISK_PROMPT\n readonly root: string\n readonly accessor: DiskAccessor\n readonly opsMap: Record<string, unknown> = {\n read_bytes: readCoreFn,\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 rm_recursive: rmRCore,\n du_total: duCore,\n du_all: duAllCore,\n create: createCore,\n truncate: truncateCore,\n exists: existsCore,\n find_flat: findCore,\n append: appendCore,\n }\n\n constructor(options: DiskResourceOptions) {\n super()\n this.root = path.resolve(options.root)\n this.accessor = new DiskAccessor(this.root)\n }\n\n async open(): Promise<void> {\n await mkdir(this.root, { recursive: true })\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n ops(): readonly RegisteredOp[] {\n return DISK_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return DISK_COMMANDS\n }\n\n streamPath(p: PathSpec): AsyncIterable<Uint8Array> {\n return streamCore(this.accessor, p)\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return readCoreFn(this.accessor, p)\n }\n\n writeFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return writeCore(this.accessor, p, data)\n }\n\n appendFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return appendCore(this.accessor, p, data)\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, options?: { recursive?: boolean }): Promise<void> {\n return mkdirCore(this.accessor, p, options?.recursive === true)\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 duCore(this.accessor, p)\n }\n\n find(p: PathSpec, options: FindOptions = {}): Promise<string[]> {\n return findCore(this.accessor, p, options as DiskFindOptions)\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 async getState(): Promise<DiskResourceState> {\n await mkdir(this.root, { recursive: true })\n const files: Record<string, Uint8Array> = {}\n const modes: Record<string, number> = {}\n const fileList: string[] = []\n await walkFiles(this.root, this.root, fileList)\n for (const full of fileList) {\n const rel = path.relative(this.root, full).split(path.sep).join('/')\n const data = await readFile(full)\n files[rel] = new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n // Capture the real inode mode: it is the base truth for disk\n // permissions (the sidecar is gone), so restore must reapply it or\n // a chmod would reset to the host umask.\n modes[rel] = (await fsStat(full)).mode & 0o7777\n }\n return {\n type: this.kind,\n files,\n modes,\n }\n }\n\n async loadState(state: DiskResourceState): Promise<void> {\n await mkdir(this.root, { recursive: true })\n for (const [rel, data] of Object.entries(state.files)) {\n const full = path.join(this.root, rel)\n await mkdir(path.dirname(full), { recursive: true })\n await writeFile(full, data)\n const mode = state.modes?.[rel]\n if (mode !== undefined) await chmod(full, mode)\n }\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 type RegisteredCommand,\n ResourceName,\n makeFiletypeCommands,\n makeGenericCommands,\n} from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { read as diskRead } from '../../../core/disk/read.ts'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport { DISK_IO } from './io.ts'\n\nexport const DISK_COMMANDS: readonly RegisteredCommand[] = [\n ...makeFiletypeCommands<DiskAccessor>({\n resource: ResourceName.DISK,\n readBytes: diskRead,\n statEntry: diskStat,\n }),\n ...makeGenericCommands<DiskAccessor>(ResourceName.DISK, DISK_IO),\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { readFile } from 'node:fs/promises'\nimport { enoent, type PathSpec, record, ResourceName } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function read(accessor: DiskAccessor, path: PathSpec): Promise<Uint8Array> {\n const start = performance.now()\n const virtual = path.mountPath\n const full = resolveSafe(accessor.root, virtual)\n let data: Buffer\n try {\n data = await readFile(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(path)\n }\n throw err\n }\n record('read', virtual, ResourceName.DISK, data.byteLength, start)\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\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 path from 'node:path'\nimport { lstripSlash } from '@struktoai/mirage-core'\n\nexport { norm, parent, gnuBasename as basename } from '@struktoai/mirage-core'\n\nexport function resolveSafe(root: string, virtual: string): string {\n const relative = lstripSlash(virtual)\n const resolved = path.resolve(root, relative)\n const rootResolved = path.resolve(root)\n if (resolved !== rootResolved && !resolved.startsWith(rootResolved + path.sep)) {\n throw new Error(`path escapes root: ${virtual}`)\n }\n return resolved\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { stat as fsStat } from 'node:fs/promises'\nimport path from 'node:path'\nimport { enoent, FileStat, FileType, guessType, type PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function stat(accessor: DiskAccessor, p: PathSpec): Promise<FileStat> {\n const virtual = p.mountPath\n const full = resolveSafe(accessor.root, virtual)\n let st\n try {\n st = await fsStat(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(p)\n }\n throw err\n }\n const modified = st.mtime.toISOString()\n const name = path.basename(full)\n // Fields setattr applies natively (mode, times) read from the real\n // inode, so external chmod/utime stays visible. Ownership can never be\n // applied natively (chown needs privileges), so it lives wholly in the\n // namespace overlay, merged at the stat-merge layer; host uid/gid\n // numbers would also be machine-dependent noise.\n if (st.isDirectory()) {\n return new FileStat({\n name,\n size: null,\n modified,\n type: FileType.DIRECTORY,\n mode: st.mode & 0o7777,\n atime: st.atime.toISOString(),\n })\n }\n return new FileStat({\n name,\n size: st.size,\n modified,\n fingerprint: modified,\n type: guessType(name),\n mode: st.mode & 0o7777,\n atime: st.atime.toISOString(),\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { appendFile, mkdir } from 'node:fs/promises'\nimport path from 'node:path'\nimport { ResourceName, invalidateAfterWrite, record, type PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function appendBytes(\n accessor: DiskAccessor,\n p: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const start = performance.now()\n const virtual = p.mountPath\n const full = resolveSafe(accessor.root, virtual)\n await mkdir(path.dirname(full), { recursive: true })\n await appendFile(full, data)\n record('append', virtual, ResourceName.DISK, data.byteLength, start)\n await invalidateAfterWrite(p)\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_WARN = 5000\nexport const SCOPE_ERROR = 50000\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { copyFile, mkdir } from 'node:fs/promises'\nimport path from 'node:path'\nimport { enoent, invalidateAfterWrite, type PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function copy(accessor: DiskAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const s = resolveSafe(accessor.root, src.mountPath)\n const d = resolveSafe(accessor.root, dst.mountPath)\n await mkdir(path.dirname(d), { recursive: true })\n try {\n await copyFile(s, d)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(src)\n }\n throw err\n }\n await invalidateAfterWrite(dst)\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { mkdir, writeFile } from 'node:fs/promises'\nimport path from 'node:path'\nimport { ResourceName, invalidateAfterWrite, record, type PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function writeBytes(\n accessor: DiskAccessor,\n p: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const start = performance.now()\n const virtual = p.mountPath\n const full = resolveSafe(accessor.root, virtual)\n await mkdir(path.dirname(full), { recursive: true })\n await writeFile(full, data)\n record('write', virtual, ResourceName.DISK, data.byteLength, start)\n await invalidateAfterWrite(p)\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { writeBytes } from './write.ts'\n\nexport function create(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n return writeBytes(accessor, path, new Uint8Array())\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { readdir, stat } from 'node:fs/promises'\nimport path from 'node:path'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { norm, resolveSafe } from './utils.ts'\n\nasync function walkSizes(full: string): Promise<number> {\n let total = 0\n let st\n try {\n st = await stat(full)\n } catch {\n return 0\n }\n if (st.isFile()) return st.size\n if (!st.isDirectory()) return 0\n const entries = await readdir(full, { withFileTypes: true })\n for (const e of entries) {\n const child = path.join(full, e.name)\n if (e.isDirectory()) total += await walkSizes(child)\n else if (e.isFile()) {\n try {\n const cst = await stat(child)\n total += cst.size\n } catch {\n // ignore\n }\n }\n }\n return total\n}\n\nasync function walkAll(\n accessor: DiskAccessor,\n full: string,\n entries: [string, number][],\n): Promise<number> {\n let total = 0\n let st\n try {\n st = await stat(full)\n } catch {\n return 0\n }\n if (st.isFile()) {\n const rel = '/' + path.relative(accessor.root, full).split(path.sep).join('/')\n entries.push([rel, st.size])\n return st.size\n }\n if (!st.isDirectory()) return 0\n const children = await readdir(full, { withFileTypes: true })\n for (const e of children) {\n const child = path.join(full, e.name)\n if (e.isDirectory()) {\n total += await walkAll(accessor, child, entries)\n } else if (e.isFile()) {\n try {\n const cst = await stat(child)\n const rel = '/' + path.relative(accessor.root, child).split(path.sep).join('/')\n entries.push([rel, cst.size])\n total += cst.size\n } catch {\n // ignore\n }\n }\n }\n return total\n}\n\nexport async function du(accessor: DiskAccessor, p: PathSpec): Promise<number> {\n const virtual = p.mountPath\n const full = resolveSafe(accessor.root, virtual)\n return walkSizes(full)\n}\n\nexport async function duAll(\n accessor: DiskAccessor,\n p: PathSpec,\n): Promise<[entries: [string, number][], total: number]> {\n const virtual = norm(p.mountPath)\n const full = resolveSafe(accessor.root, virtual)\n const entries: [string, number][] = []\n const total = await walkAll(accessor, full, entries)\n entries.sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0))\n return [entries, 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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { access } from 'node:fs/promises'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function exists(accessor: DiskAccessor, path: PathSpec): Promise<boolean> {\n const full = resolveSafe(accessor.root, path.mountPath)\n try {\n await access(full)\n return true\n } catch {\n return false\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { readdir, stat } from 'node:fs/promises'\nimport path from 'node:path'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { norm, resolveSafe } from './utils.ts'\nimport {\n buildTree,\n emitStartPath,\n keep,\n type PredNode,\n startBasename,\n} from '@struktoai/mirage-core'\n\nexport interface FindOptions {\n name?: string | null\n type?: 'f' | 'd' | null\n minSize?: number | null\n maxSize?: number | null\n maxDepth?: number | null\n minDepth?: number | null\n nameExclude?: string | null\n orNames?: string[] | null\n iname?: string | null\n pathPattern?: string | null\n empty?: boolean | null\n tree?: PredNode | null\n mtimeMin?: number | null\n mtimeMax?: number | null\n}\n\ninterface WalkCtx {\n accessor: DiskAccessor\n base: string\n baseDepth: number\n options: FindOptions\n tree: PredNode\n results: string[]\n}\n\nasync function walk(ctx: WalkCtx, full: string, current: string, depth: number): Promise<void> {\n const opts = ctx.options\n if (opts.maxDepth !== null && opts.maxDepth !== undefined && depth > opts.maxDepth) return\n let entries\n try {\n entries = await readdir(full, { withFileTypes: true })\n } catch {\n return\n }\n for (const e of entries) {\n const kind: 'f' | 'd' = e.isDirectory() ? 'd' : 'f'\n const entryPath = current === '/' ? `/${e.name}` : `${current}/${e.name}`\n const entryName = e.name\n const entrySlashCount = (entryPath.match(/\\//g) ?? []).length\n const entryDepth = entrySlashCount - ctx.baseDepth\n\n let accept = true\n if (opts.maxDepth !== null && opts.maxDepth !== undefined && entryDepth > opts.maxDepth) {\n accept = false\n }\n let isEmpty: boolean | null = null\n if (accept && opts.empty === true) {\n try {\n isEmpty =\n kind === 'f'\n ? (await stat(path.join(full, e.name))).size === 0\n : (await readdir(path.join(full, e.name))).length === 0\n } catch {\n isEmpty = null\n }\n }\n if (\n accept &&\n !keep(\n { key: entryPath, name: entryName, kind, depth: entryDepth, isEmpty },\n ctx.tree,\n opts.minDepth,\n )\n ) {\n accept = false\n }\n\n // Directories count as size 0 for -size (deliberate GNU divergence).\n if (accept && kind !== 'f' && (opts.minSize != null || opts.maxSize != null)) {\n // Directories contribute size 0 to -size (#318).\n if (opts.minSize != null && opts.minSize > 0) accept = false\n if (opts.maxSize != null && opts.maxSize < 0) accept = false\n }\n if (\n accept &&\n kind === 'f' &&\n (opts.minSize !== null ||\n opts.maxSize !== null ||\n opts.mtimeMin !== null ||\n opts.mtimeMax !== null)\n ) {\n try {\n const st = await stat(path.join(full, e.name))\n if (opts.minSize !== null && opts.minSize !== undefined && st.size < opts.minSize)\n accept = false\n if (opts.maxSize !== null && opts.maxSize !== undefined && st.size > opts.maxSize)\n accept = false\n if (accept && (opts.mtimeMin !== undefined || opts.mtimeMax !== undefined)) {\n const mtime = st.mtime.getTime() / 1000\n if (opts.mtimeMin !== null && opts.mtimeMin !== undefined && mtime < opts.mtimeMin)\n accept = false\n if (opts.mtimeMax !== null && opts.mtimeMax !== undefined && mtime > opts.mtimeMax)\n accept = false\n }\n } catch {\n accept = false\n }\n }\n\n if (accept) ctx.results.push(entryPath)\n\n if (kind === 'd') {\n await walk(ctx, path.join(full, e.name), entryPath, depth + 1)\n }\n }\n}\n\nexport async function find(\n accessor: DiskAccessor,\n p: PathSpec,\n options: FindOptions = {},\n): Promise<string[]> {\n const virtual = norm(p.mountPath)\n const startName = startBasename(p.virtual)\n const full = resolveSafe(accessor.root, virtual)\n const baseDepth = virtual === '/' ? 0 : (virtual.match(/\\//g) ?? []).length\n const results: string[] = []\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 empty: options.empty,\n })\n if (options.maxDepth == null || options.maxDepth >= 0) {\n let isDir = false\n try {\n isDir = (await stat(full)).isDirectory()\n } catch {\n isDir = false\n }\n let rootEmpty: boolean | null = null\n if (isDir && options.empty === true) {\n try {\n rootEmpty = (await readdir(full)).length === 0\n } catch {\n rootEmpty = null\n }\n }\n emitStartPath(results, virtual, startName, {\n kind: 'd',\n isEmpty: rootEmpty,\n exists: isDir,\n tree,\n maxDepth: options.maxDepth,\n minDepth: options.minDepth,\n minSize: options.minSize,\n maxSize: options.maxSize,\n })\n }\n await walk({ accessor, base: virtual, baseDepth, options, tree, results }, full, virtual, 0)\n results.sort()\n return results\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { mkdir as fsMkdir } from 'node:fs/promises'\nimport { type PathSpec, invalidateAfterWrite, invalidateAncestors } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function mkdir(\n accessor: DiskAccessor,\n path: PathSpec,\n parents = false,\n): Promise<void> {\n const full = resolveSafe(accessor.root, path.mountPath)\n if (parents) {\n await fsMkdir(full, { recursive: true })\n await invalidateAfterWrite(path)\n await invalidateAncestors(path)\n return\n }\n try {\n await fsMkdir(full)\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code\n if (code === 'ENOENT') {\n throw new Error(`parent directory does not exist: ${path.mountPath}`)\n }\n if (code !== 'EEXIST') throw err\n }\n await invalidateAfterWrite(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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { readdir as fsReaddir } from 'node:fs/promises'\nimport {\n IndexEntry,\n ResourceType,\n enotdir,\n mountPrefixOf,\n rstripSlash,\n type IndexCacheStore,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { norm, resolveSafe } from './utils.ts'\n\nexport async function readdir(\n accessor: DiskAccessor,\n path: PathSpec,\n index?: IndexCacheStore,\n): Promise<string[]> {\n const virtual = path.pattern !== null ? path.directory : path.mountPath\n const mountPrefix = mountPrefixOf(path.virtual, path.resourcePath)\n // Canonical key: no trailing slash (except root), or the same dir\n // indexes under two keys and cache hits return doubled-slash entries.\n const virtualKey = rstripSlash(mountPrefix + virtual) || '/'\n if (index !== undefined) {\n const cached = await index.listDir(virtualKey)\n if (cached.entries !== undefined && cached.entries !== null) {\n return cached.entries\n }\n }\n const full = resolveSafe(accessor.root, virtual)\n let entries: string[]\n try {\n entries = await fsReaddir(full)\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code\n if (code === 'ENOTDIR') throw enotdir(path)\n if (code === 'ENOENT') throw enotdir(path)\n throw err\n }\n const base = norm(virtual)\n const dirPrefix = base === '/' ? '/' : `${base}/`\n const sorted = [...entries].sort()\n const virtualEntries = sorted.map((e) => `${mountPrefix}${dirPrefix}${e}`)\n if (index !== undefined) {\n const indexEntries: [string, IndexEntry][] = sorted.map((name) => [\n name,\n new IndexEntry({\n id: `${dirPrefix}${name}`,\n name,\n resourceType: ResourceType.FILE,\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\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { rename as fsRename } from 'node:fs/promises'\nimport {\n enoent,\n invalidateAfterUnlink,\n invalidateAfterWrite,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function rename(accessor: DiskAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const s = resolveSafe(accessor.root, src.mountPath)\n const d = resolveSafe(accessor.root, dst.mountPath)\n try {\n await fsRename(s, d)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(src)\n }\n throw err\n }\n await invalidateAfterUnlink(src)\n await invalidateAfterWrite(dst)\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { rm } from 'node:fs/promises'\nimport { type PathSpec, invalidateAfterUnlink } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function rmR(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n const full = resolveSafe(accessor.root, path.mountPath)\n await rm(full, { recursive: true, force: true })\n await invalidateAfterUnlink(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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { rmdir as fsRmdir } from 'node:fs/promises'\nimport { type PathSpec, invalidateAfterUnlink } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function rmdir(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n const full = resolveSafe(accessor.root, path.mountPath)\n try {\n await fsRmdir(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') return\n throw err\n }\n await invalidateAfterUnlink(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 { chmod, stat as fsStat, utimes } from 'node:fs/promises'\nimport { enoent, type PathSpec } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { resolveSafe } from './utils.ts'\n\nexport interface SetAttrsFields {\n mode?: number\n uid?: number | string\n gid?: number | string\n atime?: string\n mtime?: string\n}\n\n// Write metadata fields (the write side of stat). Applies natively what the\n// real inode can take and returns the residual: fields the caller must\n// overlay elsewhere. Times always apply. `mode` is applied with owner access\n// kept (`chmod 000` must not lock mirage itself out of reads, cp, or\n// snapshot capture; mount mode does real access control), so clamped bits\n// come back as residual. Ownership never applies (chown to arbitrary ids\n// needs privileges the process does not have) and is always residual.\nexport async function setAttrs(\n accessor: DiskAccessor,\n path: PathSpec,\n fields: SetAttrsFields,\n): Promise<Record<string, number | string>> {\n const full = resolveSafe(accessor.root, path.mountPath)\n let st\n try {\n st = await fsStat(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') throw enoent(path)\n throw err\n }\n const residual: Record<string, number | string> = {}\n if (fields.mode !== undefined) {\n const keep = st.isDirectory() ? 0o700 : 0o600\n await chmod(full, fields.mode | keep)\n if ((fields.mode | keep) !== fields.mode) residual.mode = fields.mode\n }\n if (fields.uid !== undefined) residual.uid = fields.uid\n if (fields.gid !== undefined) residual.gid = fields.gid\n if (fields.atime !== undefined || fields.mtime !== undefined) {\n const newAtime = fields.atime !== undefined ? new Date(fields.atime) : st.atime\n const newMtime = fields.mtime !== undefined ? new Date(fields.mtime) : st.mtime\n await utimes(full, newAtime, newMtime)\n }\n return residual\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { createReadStream } from 'node:fs'\nimport { enoent, type PathSpec, recordStream, ResourceName } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function* stream(accessor: DiskAccessor, path: PathSpec): AsyncIterable<Uint8Array> {\n const virtual = path.mountPath\n const full = resolveSafe(accessor.root, virtual)\n const rec = recordStream('read', virtual, ResourceName.DISK)\n const rs = createReadStream(full, { highWaterMark: 65536 })\n try {\n for await (const chunk of rs) {\n const buf = chunk as Buffer\n const u8 = new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength)\n if (rec !== null) rec.bytes += u8.byteLength\n yield u8\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(path)\n }\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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { readFile, writeFile } from 'node:fs/promises'\nimport { type PathSpec, invalidateAfterWrite } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function truncate(\n accessor: DiskAccessor,\n path: PathSpec,\n length: number,\n): Promise<void> {\n const full = resolveSafe(accessor.root, path.mountPath)\n let data: Buffer\n try {\n data = await readFile(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n data = Buffer.alloc(0)\n } else {\n throw err\n }\n }\n const out = new Uint8Array(length)\n out.set(data.subarray(0, Math.min(data.byteLength, length)))\n await writeFile(full, out)\n await invalidateAfterWrite(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 { DiskAccessor } from '../../accessor/disk.ts'\nimport { unlink as fsUnlink } from 'node:fs/promises'\nimport { type PathSpec, invalidateAfterUnlink } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function unlink(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n const full = resolveSafe(accessor.root, path.mountPath)\n try {\n await fsUnlink(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') return\n throw err\n }\n await invalidateAfterUnlink(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 { CommandIO } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { appendBytes as diskAppend } from '../../../core/disk/append.ts'\nimport { SCOPE_ERROR } from '../../../core/disk/constants.ts'\nimport { copy as diskCopy } from '../../../core/disk/copy.ts'\nimport { create as diskCreate } from '../../../core/disk/create.ts'\nimport { du as diskDu, duAll as diskDuAll } from '../../../core/disk/du.ts'\nimport { exists as diskExists } from '../../../core/disk/exists.ts'\nimport { find as diskFind } from '../../../core/disk/find.ts'\nimport { mkdir as diskMkdir } from '../../../core/disk/mkdir.ts'\nimport { read as diskRead } from '../../../core/disk/read.ts'\nimport { readdir as diskReaddir } from '../../../core/disk/readdir.ts'\nimport { rename as diskRename } from '../../../core/disk/rename.ts'\nimport { rmR as diskRmR } from '../../../core/disk/rm.ts'\nimport { rmdir as diskRmdir } from '../../../core/disk/rmdir.ts'\nimport { setAttrs as diskSetAttrs } from '../../../core/disk/set_attrs.ts'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { truncate as diskTruncate } from '../../../core/disk/truncate.ts'\nimport { unlink as diskUnlink } from '../../../core/disk/unlink.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_IO: CommandIO<DiskAccessor> = {\n readdir: diskReaddir,\n readBytes: diskRead,\n readStream: diskStream,\n stat: diskStat,\n isMounted: (a) => a.root !== '',\n local: true,\n maxGlobMatches: SCOPE_ERROR,\n write: diskWrite,\n exists: diskExists,\n mkdir: diskMkdir,\n unlink: diskUnlink,\n rmdir: diskRmdir,\n rmR: diskRmR,\n rename: diskRename,\n copy: diskCopy,\n create: diskCreate,\n truncate: diskTruncate,\n append: diskAppend,\n setAttrs: diskSetAttrs,\n find: diskFind,\n duTotal: diskDu,\n duAll: diskDuAll,\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 { Accessor } from '@struktoai/mirage-core'\n\nexport class DiskAccessor extends Accessor {\n readonly root: string\n\n constructor(root: string) {\n super()\n this.root = root\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 { ResourceName, makeGenericOps } from '@struktoai/mirage-core'\nimport { DISK_IO } from '../../commands/builtin/disk/io.ts'\n\nexport const DISK_OPS: readonly RegisteredOp[] = makeGenericOps(ResourceName.DISK, DISK_IO, {\n filetypeRead: ['.feather', '.hdf5', '.parquet'],\n mkdirParents: true,\n forwardIndex: false,\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 DISK_PROMPT = `{prefix}\n Local disk filesystem. Mirrors the configured root directory.\n Standard commands: ls, cat, head, tail, grep, wc, find, tree, mkdir, touch, cp, mv, rm, tee.`\n"],"mappings":";AAcA,SAAS,SAAAA,QAAO,SAAAC,QAAO,WAAAC,UAAS,YAAAC,WAAU,QAAQC,SAAQ,aAAAC,kBAAiB;AAC3E,OAAOC,WAAU;AACjB;AAAA,EACE;AAAA,EACA;AAAA,EACA,gBAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAAC;AAAA,OAMK;;;ACdP;AAAA,EAEE,gBAAAC;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,gBAAgB;AACzB,SAAS,QAAuB,QAAQ,oBAAoB;;;ACF5D,OAAO,UAAU;AACjB,SAAS,mBAAmB;AAE5B,SAAS,MAAM,QAAuB,mBAAgB;AAE/C,SAAS,YAAY,MAAc,SAAyB;AACjE,QAAM,WAAW,YAAY,OAAO;AACpC,QAAM,WAAW,KAAK,QAAQ,MAAM,QAAQ;AAC5C,QAAM,eAAe,KAAK,QAAQ,IAAI;AACtC,MAAI,aAAa,gBAAgB,CAAC,SAAS,WAAW,eAAe,KAAK,GAAG,GAAG;AAC9E,UAAM,IAAI,MAAM,sBAAsB,OAAO,EAAE;AAAA,EACjD;AACA,SAAO;AACT;;;ADRA,eAAsB,KAAK,UAAwBC,OAAqC;AACtF,QAAM,QAAQ,YAAY,IAAI;AAC9B,QAAM,UAAUA,MAAK;AACrB,QAAM,OAAO,YAAY,SAAS,MAAM,OAAO;AAC/C,MAAI;AACJ,MAAI;AACF,WAAO,MAAM,SAAS,IAAI;AAAA,EAC5B,SAAS,KAAK;AACZ,QAAK,IAA8B,SAAS,UA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,EAAE,MAAMA,MAAK,GAAG,EAAE,KAAK,GAAG;AACnE,YAAM,OAAO,MAAMI,UAAS,IAAI;AAChC,YAAM,GAAG,IAAI,IAAI,WAAW,KAAK,QAAQ,KAAK,YAAY,KAAK,UAAU;AAIzE,YAAM,GAAG,KAAK,MAAMC,QAAO,IAAI,GAAG,OAAO;AAAA,IAC3C;AACA,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,UAAU,OAAyC;AACvD,UAAMH,OAAM,KAAK,MAAM,EAAE,WAAW,KAAK,CAAC;AAC1C,eAAW,CAAC,KAAK,IAAI,KAAK,OAAO,QAAQ,MAAM,KAAK,GAAG;AACrD,YAAM,OAAOF,MAAK,KAAK,KAAK,MAAM,GAAG;AACrC,YAAME,OAAMF,MAAK,QAAQ,IAAI,GAAG,EAAE,WAAW,KAAK,CAAC;AACnD,YAAMM,WAAU,MAAM,IAAI;AAC1B,YAAM,OAAO,MAAM,QAAQ,GAAG;AAC9B,UAAI,SAAS,OAAW,OAAMC,OAAM,MAAM,IAAI;AAAA,IAChD;AAAA,EACF;AACF;","names":["chmod","mkdir","readdir","readFile","fsStat","writeFile","path","ResourceName","mountPrefixOf","ResourceName","path","path","enoent","enoent","path","path","ResourceName","record","path","record","ResourceName","mkdir","path","enoent","invalidateAfterWrite","mkdir","path","enoent","invalidateAfterWrite","mkdir","path","ResourceName","invalidateAfterWrite","record","mkdir","path","record","ResourceName","invalidateAfterWrite","path","stat","path","stat","path","path","readdir","stat","path","readdir","stat","path","invalidateAfterWrite","mkdir","path","invalidateAfterWrite","readdir","path","enoent","invalidateAfterWrite","enoent","invalidateAfterWrite","invalidateAfterUnlink","path","invalidateAfterUnlink","invalidateAfterUnlink","path","invalidateAfterUnlink","fsStat","enoent","path","fsStat","enoent","keep","enoent","ResourceName","path","ResourceName","enoent","readFile","writeFile","invalidateAfterWrite","path","readFile","writeFile","invalidateAfterWrite","invalidateAfterUnlink","path","invalidateAfterUnlink","readdir","mkdir","ResourceName","ResourceName","ResourceName","readdir","path","ResourceName","mkdir","mountPrefixOf","readFile","fsStat","writeFile","chmod"]}
|
|
@@ -6,6 +6,8 @@ var TencentConfigSchema = z.object({
|
|
|
6
6
|
secretAccessKey: secretStr(),
|
|
7
7
|
region: z.string(),
|
|
8
8
|
endpoint: z.string(),
|
|
9
|
+
forcePathStyle: z.boolean().optional(),
|
|
10
|
+
keyPrefix: z.string().optional(),
|
|
9
11
|
timeoutMs: z.number().optional()
|
|
10
12
|
});
|
|
11
13
|
function resolvedTencentEndpoint(config) {
|
|
@@ -20,6 +22,8 @@ function tencentToS3Config(config) {
|
|
|
20
22
|
endpoint: resolvedTencentEndpoint(config),
|
|
21
23
|
accessKeyId: config.accessKeyId,
|
|
22
24
|
secretAccessKey: config.secretAccessKey,
|
|
25
|
+
...config.forcePathStyle !== void 0 ? { forcePathStyle: config.forcePathStyle } : {},
|
|
26
|
+
...config.keyPrefix !== void 0 ? { keyPrefix: config.keyPrefix } : {},
|
|
23
27
|
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
24
28
|
};
|
|
25
29
|
}
|
|
@@ -35,6 +39,8 @@ function normalizeTencentConfig(input) {
|
|
|
35
39
|
access_key_id: "accessKeyId",
|
|
36
40
|
secret_access_key: "secretAccessKey",
|
|
37
41
|
endpoint_url: "endpoint",
|
|
42
|
+
path_style: "forcePathStyle",
|
|
43
|
+
key_prefix: "keyPrefix",
|
|
38
44
|
timeout: "timeoutMs"
|
|
39
45
|
},
|
|
40
46
|
transform: {
|
|
@@ -45,10 +51,9 @@ function normalizeTencentConfig(input) {
|
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
export {
|
|
48
|
-
TencentConfigSchema,
|
|
49
54
|
resolvedTencentEndpoint,
|
|
50
55
|
tencentToS3Config,
|
|
51
56
|
redactTencentConfig,
|
|
52
57
|
normalizeTencentConfig
|
|
53
58
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-WTSSEUOZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/tencent/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 { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface TencentConfig {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint?: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nexport interface TencentConfigRedacted {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nconst TencentConfigSchema = z.object({\n bucket: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n region: z.string(),\n endpoint: z.string(),\n forcePathStyle: z.boolean().optional(),\n keyPrefix: z.string().optional(),\n timeoutMs: z.number().optional(),\n})\n\nexport function resolvedTencentEndpoint(config: TencentConfig): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n const region = config.region\n return `https://cos.${region}.myqcloud.com`\n}\n\nexport function tencentToS3Config(config: TencentConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region,\n endpoint: resolvedTencentEndpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n ...(config.forcePathStyle !== undefined ? { forcePathStyle: config.forcePathStyle } : {}),\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactTencentConfig(config: TencentConfig): TencentConfigRedacted {\n return redactConfigWithSchema(TencentConfigSchema, {\n ...config,\n endpoint: resolvedTencentEndpoint(config),\n }) as unknown as TencentConfigRedacted\n}\n\nexport function normalizeTencentConfig(input: Record<string, unknown>): TencentConfig {\n return normalizeFields(input, {\n rename: {\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n endpoint_url: 'endpoint',\n path_style: 'forcePathStyle',\n key_prefix: 'keyPrefix',\n timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as TencentConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAyBtE,IAAM,sBAAsB,EAAE,OAAO;AAAA,EACnC,QAAQ,EAAE,OAAO;AAAA,EACjB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO;AAAA,EACnB,gBAAgB,EAAE,QAAQ,EAAE,SAAS;AAAA,EACrC,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAEM,SAAS,wBAAwB,QAA+B;AACrE,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,QAAM,SAAS,OAAO;AACtB,SAAO,eAAe,MAAM;AAC9B;AAEO,SAAS,kBAAkB,QAAiC;AACjE,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO;AAAA,IACf,UAAU,wBAAwB,MAAM;AAAA,IACxC,aAAa,OAAO;AAAA,IACpB,iBAAiB,OAAO;AAAA,IACxB,GAAI,OAAO,mBAAmB,SAAY,EAAE,gBAAgB,OAAO,eAAe,IAAI,CAAC;AAAA,IACvF,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,IACxE,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,oBAAoB,QAA8C;AAChF,SAAO,uBAAuB,qBAAqB;AAAA,IACjD,GAAG;AAAA,IACH,UAAU,wBAAwB,MAAM;AAAA,EAC1C,CAAC;AACH;AAEO,SAAS,uBAAuB,OAA+C;AACpF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,IACA,MAAM,CAAC,OAAO;AAAA,EAChB,CAAC;AACH;","names":[]}
|
|
@@ -6,6 +6,8 @@ var QingStorConfigSchema = z.object({
|
|
|
6
6
|
secretAccessKey: secretStr(),
|
|
7
7
|
region: z.string(),
|
|
8
8
|
endpoint: z.string(),
|
|
9
|
+
forcePathStyle: z.boolean().optional(),
|
|
10
|
+
keyPrefix: z.string().optional(),
|
|
9
11
|
timeoutMs: z.number().optional()
|
|
10
12
|
});
|
|
11
13
|
function resolvedQingStorEndpoint(config) {
|
|
@@ -20,6 +22,8 @@ function qingStorToS3Config(config) {
|
|
|
20
22
|
endpoint: resolvedQingStorEndpoint(config),
|
|
21
23
|
accessKeyId: config.accessKeyId,
|
|
22
24
|
secretAccessKey: config.secretAccessKey,
|
|
25
|
+
...config.forcePathStyle !== void 0 ? { forcePathStyle: config.forcePathStyle } : {},
|
|
26
|
+
...config.keyPrefix !== void 0 ? { keyPrefix: config.keyPrefix } : {},
|
|
23
27
|
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
24
28
|
};
|
|
25
29
|
}
|
|
@@ -35,6 +39,8 @@ function normalizeQingStorConfig(input) {
|
|
|
35
39
|
access_key_id: "accessKeyId",
|
|
36
40
|
secret_access_key: "secretAccessKey",
|
|
37
41
|
endpoint_url: "endpoint",
|
|
42
|
+
path_style: "forcePathStyle",
|
|
43
|
+
key_prefix: "keyPrefix",
|
|
38
44
|
timeout: "timeoutMs"
|
|
39
45
|
},
|
|
40
46
|
transform: {
|
|
@@ -45,10 +51,9 @@ function normalizeQingStorConfig(input) {
|
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
export {
|
|
48
|
-
QingStorConfigSchema,
|
|
49
54
|
resolvedQingStorEndpoint,
|
|
50
55
|
qingStorToS3Config,
|
|
51
56
|
redactQingStorConfig,
|
|
52
57
|
normalizeQingStorConfig
|
|
53
58
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-WWP2STF5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/qingstor/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 { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface QingStorConfig {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint?: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nexport interface QingStorConfigRedacted {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nconst QingStorConfigSchema = z.object({\n bucket: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n region: z.string(),\n endpoint: z.string(),\n forcePathStyle: z.boolean().optional(),\n keyPrefix: z.string().optional(),\n timeoutMs: z.number().optional(),\n})\n\nexport function resolvedQingStorEndpoint(config: QingStorConfig): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n const region = config.region\n return `https://s3.${region}.qingstor.com`\n}\n\nexport function qingStorToS3Config(config: QingStorConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region,\n endpoint: resolvedQingStorEndpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n ...(config.forcePathStyle !== undefined ? { forcePathStyle: config.forcePathStyle } : {}),\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactQingStorConfig(config: QingStorConfig): QingStorConfigRedacted {\n return redactConfigWithSchema(QingStorConfigSchema, {\n ...config,\n endpoint: resolvedQingStorEndpoint(config),\n }) as unknown as QingStorConfigRedacted\n}\n\nexport function normalizeQingStorConfig(input: Record<string, unknown>): QingStorConfig {\n return normalizeFields(input, {\n rename: {\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n endpoint_url: 'endpoint',\n path_style: 'forcePathStyle',\n key_prefix: 'keyPrefix',\n timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as QingStorConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB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AAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,IACA,MAAM,CAAC,OAAO;AAAA,EAChB,CAAC;AACH;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cephToS3Config,
|
|
3
3
|
redactCephConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UYA3XL3J.js";
|
|
5
5
|
import {
|
|
6
6
|
S3Resource
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IUXXZHY3.js";
|
|
8
8
|
|
|
9
9
|
// src/resource/ceph/ceph.ts
|
|
10
10
|
import {
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
CEPH_PROMPT,
|
|
55
55
|
CephResource
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-XADEMW6B.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
aliyunToS3Config,
|
|
3
3
|
redactAliyunConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2QNPKPZZ.js";
|
|
5
5
|
import {
|
|
6
6
|
S3Resource
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IUXXZHY3.js";
|
|
8
8
|
|
|
9
9
|
// src/resource/aliyun/aliyun.ts
|
|
10
10
|
import {
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
ALIYUN_PROMPT,
|
|
55
55
|
AliyunResource
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-XEMLYWHK.js.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// src/resource/box/config.ts
|
|
2
2
|
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
3
|
var BoxConfigSchema = z.object({
|
|
4
|
+
endpoint: z.string().optional(),
|
|
5
|
+
rootFolderId: z.string().optional(),
|
|
6
|
+
contentSearch: z.boolean().optional(),
|
|
4
7
|
clientId: z.string().optional(),
|
|
5
8
|
clientSecret: secretStr().optional(),
|
|
6
9
|
refreshToken: secretStr().optional(),
|
|
@@ -13,6 +16,8 @@ function redactBoxConfig(config) {
|
|
|
13
16
|
function normalizeBoxConfig(input) {
|
|
14
17
|
return normalizeFields(input, {
|
|
15
18
|
rename: {
|
|
19
|
+
root_folder_id: "rootFolderId",
|
|
20
|
+
content_search: "contentSearch",
|
|
16
21
|
client_id: "clientId",
|
|
17
22
|
client_secret: "clientSecret",
|
|
18
23
|
refresh_token: "refreshToken",
|
|
@@ -24,8 +29,7 @@ function normalizeBoxConfig(input) {
|
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
export {
|
|
27
|
-
BoxConfigSchema,
|
|
28
32
|
redactBoxConfig,
|
|
29
33
|
normalizeBoxConfig
|
|
30
34
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-XFSEADPC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/box/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 { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface BoxConfig {\n // API origin override (e.g. an integ fake). Defaults to api.box.com.\n endpoint?: string\n // Box folder id to mount as the workspace root instead of the account\n // root (\"0\"). Folder ids are stable across renames/moves and visible in\n // the Box web URL (box.com/folder/<id>), so a subfolder mount survives\n // reorganization that a path prefix would not.\n rootFolderId?: string\n // Opt in to grep/rg content-search push-down: route recursive literal\n // scans through Box search to narrow the file set before scanning locally.\n // Off by default because Box's search index lags recent writes.\n contentSearch?: boolean\n clientId?: string\n clientSecret?: string\n refreshToken?: string\n // Box enterprise ID for the client-credentials grant. With clientId +\n // clientSecret + enterpriseId set, the resource authenticates as the app's\n // service account; no refresh token needed.\n enterpriseId?: string\n // Box developer token from https://app.box.com/developers/console (60-min\n // lifetime). When set, the resource skips the OAuth refresh flow and uses\n // this token directly. Useful for first-run / quick exploration.\n accessToken?: string\n refreshFn?: (\n refreshToken: string,\n ) => Promise<{ accessToken: string; refreshToken: string; expiresIn: number }>\n onRefreshTokenRotated?: (newRefreshToken: string) => void | Promise<void>\n}\n\nexport interface BoxConfigRedacted {\n endpoint?: string\n rootFolderId?: string\n clientId?: string\n clientSecret?: '<REDACTED>'\n refreshToken?: '<REDACTED>'\n enterpriseId?: string\n accessToken?: '<REDACTED>'\n}\n\nconst BoxConfigSchema = z.object({\n endpoint: z.string().optional(),\n rootFolderId: z.string().optional(),\n contentSearch: z.boolean().optional(),\n clientId: z.string().optional(),\n clientSecret: secretStr().optional(),\n refreshToken: secretStr().optional(),\n enterpriseId: z.string().optional(),\n accessToken: secretStr().optional(),\n})\n\nexport function redactBoxConfig(config: BoxConfig): BoxConfigRedacted {\n return redactConfigWithSchema(BoxConfigSchema, config) as unknown as BoxConfigRedacted\n}\n\nexport function normalizeBoxConfig(input: Record<string, unknown>): BoxConfig {\n return normalizeFields(input, {\n rename: {\n root_folder_id: 'rootFolderId',\n content_search: 'contentSearch',\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n enterprise_id: 'enterpriseId',\n access_token: 'accessToken',\n developer_token: 'accessToken',\n },\n }) as unknown as BoxConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAyCtE,IAAM,kBAAkB,EAAE,OAAO;AAAA,EAC/B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,cAAc,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,eAAe,EAAE,QAAQ,EAAE,SAAS;AAAA,EACpC,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,cAAc,UAAU,EAAE,SAAS;AAAA,EACnC,cAAc,UAAU,EAAE,SAAS;AAAA,EACnC,cAAc,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,aAAa,UAAU,EAAE,SAAS;AACpC,CAAC;AAEM,SAAS,gBAAgB,QAAsC;AACpE,SAAO,uBAAuB,iBAAiB,MAAM;AACvD;AAEO,SAAS,mBAAmB,OAA2C;AAC5E,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,MACf,eAAe;AAAA,MACf,cAAc;AAAA,MACd,iBAAiB;AAAA,IACnB;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/github/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 { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface GitHubConfig {\n token: string\n owner: string\n repo: string\n ref?: string\n baseUrl?: string\n}\n\nexport interface GitHubConfigRedacted {\n token: '<REDACTED>'\n owner: string\n repo: string\n ref?: string\n baseUrl?: string\n}\n\
|
|
1
|
+
{"version":3,"sources":["../src/resource/github/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 { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface GitHubConfig {\n token: string\n owner: string\n repo: string\n ref?: string\n baseUrl?: string\n}\n\nexport interface GitHubConfigRedacted {\n token: '<REDACTED>'\n owner: string\n repo: string\n ref?: string\n baseUrl?: string\n}\n\nconst GitHubConfigSchema = z.object({\n token: secretStr(),\n owner: z.string(),\n repo: z.string(),\n ref: z.string().optional(),\n baseUrl: z.string().optional(),\n})\n\nexport function redactGitHubConfig(config: GitHubConfig): GitHubConfigRedacted {\n return redactConfigWithSchema(GitHubConfigSchema, config) as unknown as GitHubConfigRedacted\n}\n\nexport function normalizeGitHubConfig(input: Record<string, unknown>): GitHubConfig {\n return normalizeFields(input, {\n rename: { base_url: 'baseUrl' },\n }) as unknown as GitHubConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAkBtE,IAAM,qBAAqB,EAAE,OAAO;AAAA,EAClC,OAAO,UAAU;AAAA,EACjB,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,EACzB,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAEM,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;AAEO,SAAS,sBAAsB,OAA8C;AAClF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ,EAAE,UAAU,UAAU;AAAA,EAChC,CAAC;AACH;","names":[]}
|
|
@@ -6,6 +6,8 @@ var ScalewayConfigSchema = z.object({
|
|
|
6
6
|
secretAccessKey: secretStr(),
|
|
7
7
|
region: z.string(),
|
|
8
8
|
endpoint: z.string(),
|
|
9
|
+
forcePathStyle: z.boolean().optional(),
|
|
10
|
+
keyPrefix: z.string().optional(),
|
|
9
11
|
timeoutMs: z.number().optional()
|
|
10
12
|
});
|
|
11
13
|
function resolvedScalewayEndpoint(config) {
|
|
@@ -20,6 +22,8 @@ function scalewayToS3Config(config) {
|
|
|
20
22
|
endpoint: resolvedScalewayEndpoint(config),
|
|
21
23
|
accessKeyId: config.accessKeyId,
|
|
22
24
|
secretAccessKey: config.secretAccessKey,
|
|
25
|
+
...config.forcePathStyle !== void 0 ? { forcePathStyle: config.forcePathStyle } : {},
|
|
26
|
+
...config.keyPrefix !== void 0 ? { keyPrefix: config.keyPrefix } : {},
|
|
23
27
|
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
24
28
|
};
|
|
25
29
|
}
|
|
@@ -35,6 +39,8 @@ function normalizeScalewayConfig(input) {
|
|
|
35
39
|
access_key_id: "accessKeyId",
|
|
36
40
|
secret_access_key: "secretAccessKey",
|
|
37
41
|
endpoint_url: "endpoint",
|
|
42
|
+
path_style: "forcePathStyle",
|
|
43
|
+
key_prefix: "keyPrefix",
|
|
38
44
|
timeout: "timeoutMs"
|
|
39
45
|
},
|
|
40
46
|
transform: {
|
|
@@ -45,10 +51,9 @@ function normalizeScalewayConfig(input) {
|
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
export {
|
|
48
|
-
ScalewayConfigSchema,
|
|
49
54
|
resolvedScalewayEndpoint,
|
|
50
55
|
scalewayToS3Config,
|
|
51
56
|
redactScalewayConfig,
|
|
52
57
|
normalizeScalewayConfig
|
|
53
58
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-YBVMZ7SR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/scaleway/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 { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface ScalewayConfig {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint?: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nexport interface ScalewayConfigRedacted {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nconst ScalewayConfigSchema = z.object({\n bucket: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n region: z.string(),\n endpoint: z.string(),\n forcePathStyle: z.boolean().optional(),\n keyPrefix: z.string().optional(),\n timeoutMs: z.number().optional(),\n})\n\nexport function resolvedScalewayEndpoint(config: ScalewayConfig): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n const region = config.region\n return `https://s3.${region}.scw.cloud`\n}\n\nexport function scalewayToS3Config(config: ScalewayConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region,\n endpoint: resolvedScalewayEndpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n ...(config.forcePathStyle !== undefined ? { forcePathStyle: config.forcePathStyle } : {}),\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactScalewayConfig(config: ScalewayConfig): ScalewayConfigRedacted {\n return redactConfigWithSchema(ScalewayConfigSchema, {\n ...config,\n endpoint: resolvedScalewayEndpoint(config),\n }) as unknown as ScalewayConfigRedacted\n}\n\nexport function normalizeScalewayConfig(input: Record<string, unknown>): ScalewayConfig {\n return normalizeFields(input, {\n rename: {\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n endpoint_url: 'endpoint',\n path_style: 'forcePathStyle',\n key_prefix: 'keyPrefix',\n timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as ScalewayConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAyBtE,IAAM,uBAAuB,EAAE,OAAO;AAAA,EACpC,QAAQ,EAAE,OAAO;AAAA,EACjB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO;AAAA,EACnB,gBAAgB,EAAE,QAAQ,EAAE,SAAS;AAAA,EACrC,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAEM,SAAS,yBAAyB,QAAgC;AACvE,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,QAAM,SAAS,OAAO;AACtB,SAAO,cAAc,MAAM;AAC7B;AAEO,SAAS,mBAAmB,QAAkC;AACnE,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO;AAAA,IACf,UAAU,yBAAyB,MAAM;AAAA,IACzC,aAAa,OAAO;AAAA,IACpB,iBAAiB,OAAO;AAAA,IACxB,GAAI,OAAO,mBAAmB,SAAY,EAAE,gBAAgB,OAAO,eAAe,IAAI,CAAC;AAAA,IACvF,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,IACxE,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;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,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,IACA,MAAM,CAAC,OAAO;AAAA,EAChB,CAAC;AACH;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactGSlidesConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GTAS3QVC.js";
|
|
4
4
|
|
|
5
5
|
// src/resource/gslides/gslides.ts
|
|
6
6
|
import {
|
|
7
7
|
BaseResource,
|
|
8
8
|
GSLIDES_COMMANDS,
|
|
9
9
|
GSLIDES_PROMPT,
|
|
10
|
-
|
|
10
|
+
GSLIDES_OPS,
|
|
11
11
|
GSLIDES_WRITE_PROMPT,
|
|
12
12
|
GSlidesAccessor,
|
|
13
13
|
PathSpec,
|
|
@@ -15,12 +15,15 @@ import {
|
|
|
15
15
|
TokenManager,
|
|
16
16
|
gslidesRead,
|
|
17
17
|
gslidesReaddir,
|
|
18
|
-
|
|
19
|
-
gslidesStat
|
|
18
|
+
makeResolveGlob,
|
|
19
|
+
gslidesStat,
|
|
20
|
+
mountKey,
|
|
21
|
+
mountPrefixOf
|
|
20
22
|
} from "@struktoai/mirage-core";
|
|
23
|
+
var gslidesResolveGlob = makeResolveGlob(gslidesReaddir);
|
|
21
24
|
var GSlidesResource = class extends BaseResource {
|
|
22
25
|
kind = ResourceName.GSLIDES;
|
|
23
|
-
|
|
26
|
+
cachesReads = true;
|
|
24
27
|
indexTtl = 86400;
|
|
25
28
|
prompt = GSLIDES_PROMPT;
|
|
26
29
|
writePrompt = GSLIDES_WRITE_PROMPT;
|
|
@@ -32,7 +35,8 @@ var GSlidesResource = class extends BaseResource {
|
|
|
32
35
|
const tm = new TokenManager({
|
|
33
36
|
clientId: config.clientId,
|
|
34
37
|
clientSecret: config.clientSecret,
|
|
35
|
-
refreshToken: config.refreshToken
|
|
38
|
+
refreshToken: config.refreshToken,
|
|
39
|
+
...config.refreshFn !== void 0 ? { refreshFn: config.refreshFn } : {}
|
|
36
40
|
});
|
|
37
41
|
this.accessor = new GSlidesAccessor({ tokenManager: tm });
|
|
38
42
|
}
|
|
@@ -46,7 +50,7 @@ var GSlidesResource = class extends BaseResource {
|
|
|
46
50
|
return GSLIDES_COMMANDS;
|
|
47
51
|
}
|
|
48
52
|
ops() {
|
|
49
|
-
return
|
|
53
|
+
return GSLIDES_OPS;
|
|
50
54
|
}
|
|
51
55
|
readFile(p) {
|
|
52
56
|
return gslidesRead(this.accessor, p, this.index);
|
|
@@ -57,18 +61,14 @@ var GSlidesResource = class extends BaseResource {
|
|
|
57
61
|
stat(p) {
|
|
58
62
|
return gslidesStat(this.accessor, p, this.index);
|
|
59
63
|
}
|
|
60
|
-
async fingerprint(p) {
|
|
61
|
-
const lookup = await this.index.get(p.original);
|
|
62
|
-
return lookup.entry?.remoteTime ?? null;
|
|
63
|
-
}
|
|
64
64
|
glob(paths, prefix = "") {
|
|
65
65
|
const effective = prefix !== "" ? paths.map(
|
|
66
|
-
(p) => p.
|
|
67
|
-
|
|
66
|
+
(p) => mountPrefixOf(p.virtual, p.resourcePath) !== "" ? p : new PathSpec({
|
|
67
|
+
virtual: p.virtual,
|
|
68
68
|
directory: p.directory,
|
|
69
69
|
...p.pattern !== null ? { pattern: p.pattern } : {},
|
|
70
70
|
resolved: p.resolved,
|
|
71
|
-
prefix
|
|
71
|
+
resourcePath: mountKey(p.virtual, prefix)
|
|
72
72
|
})
|
|
73
73
|
) : paths;
|
|
74
74
|
return gslidesResolveGlob(this.accessor, effective, this.index);
|
|
@@ -87,4 +87,4 @@ var GSlidesResource = class extends BaseResource {
|
|
|
87
87
|
export {
|
|
88
88
|
GSlidesResource
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-YRJICL2Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/gslides/gslides.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 GSLIDES_COMMANDS,\n GSLIDES_PROMPT,\n GSLIDES_OPS,\n GSLIDES_WRITE_PROMPT,\n GSlidesAccessor,\n PathSpec,\n ResourceName,\n TokenManager,\n gslidesRead,\n gslidesReaddir,\n makeResolveGlob,\n gslidesStat,\n mountKey,\n mountPrefixOf,\n type FileStat,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n} from '@struktoai/mirage-core'\nimport { redactGSlidesConfig, type GSlidesConfig, type GSlidesConfigRedacted } from './config.ts'\n\nconst gslidesResolveGlob = makeResolveGlob(gslidesReaddir)\n\nexport interface GSlidesResourceState {\n type: string\n config: GSlidesConfigRedacted\n}\n\nexport class GSlidesResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.GSLIDES\n readonly cachesReads: boolean = true\n override readonly indexTtl: number = 86_400\n readonly prompt: string = GSLIDES_PROMPT\n readonly writePrompt: string = GSLIDES_WRITE_PROMPT\n readonly config: GSlidesConfig\n readonly accessor: GSlidesAccessor\n\n constructor(config: GSlidesConfig) {\n super()\n this.config = config\n const tm = new TokenManager({\n clientId: config.clientId,\n clientSecret: config.clientSecret,\n refreshToken: config.refreshToken,\n ...(config.refreshFn !== undefined ? { refreshFn: config.refreshFn } : {}),\n })\n this.accessor = new GSlidesAccessor({ tokenManager: tm })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GSLIDES_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GSLIDES_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gslidesRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gslidesReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gslidesStat(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 gslidesResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GSlidesResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGSlidesConfig(this.config),\n })\n }\n\n loadState(_state: GSlidesResourceState): 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,qBAAqB,gBAAgB,cAAc;AAOlD,IAAM,kBAAN,cAA8B,aAAiC;AAAA,EAC3D,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA,EACd,WAAmB;AAAA,EAC5B,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EAET,YAAY,QAAuB;AACjC,UAAM;AACN,SAAK,SAAS;AACd,UAAM,KAAK,IAAI,aAAa;AAAA,MAC1B,UAAU,OAAO;AAAA,MACjB,cAAc,OAAO;AAAA,MACrB,cAAc,OAAO;AAAA,MACrB,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,IAC1E,CAAC;AACD,SAAK,WAAW,IAAI,gBAAgB,EAAE,cAAc,GAAG,CAAC;AAAA,EAC1D;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,QAAuB;AACrB,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,YAAY,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACjD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,eAAe,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACpD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,YAAY,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACjD;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,mBAAmB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAChE;AAAA,EAEA,WAA0C;AACxC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,oBAAoB,KAAK,MAAM;AAAA,IACzC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA6C;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
r2ToS3Config,
|
|
3
3
|
redactR2Config
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VBYIDRNU.js";
|
|
5
5
|
import {
|
|
6
6
|
S3Resource
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IUXXZHY3.js";
|
|
8
8
|
|
|
9
9
|
// src/resource/r2/r2.ts
|
|
10
10
|
import {
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
R2_PROMPT,
|
|
55
55
|
R2Resource
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-ZM44MGC5.js.map
|