@struktoai/mirage-node 0.0.1 → 0.0.2
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 +63 -129
- package/dist/aliyun-TMZRUYCG.js +10 -0
- package/dist/backblaze-OHW57DLK.js +10 -0
- package/dist/box-UXTCAFOZ.js +8 -0
- package/dist/ceph-TNN4I2FT.js +10 -0
- package/dist/chunk-2CC5VW7K.js +52 -0
- package/dist/chunk-2CC5VW7K.js.map +1 -0
- package/dist/chunk-3IJSIVKT.js +57 -0
- package/dist/chunk-3IJSIVKT.js.map +1 -0
- package/dist/chunk-3T3RMDNX.js +57 -0
- package/dist/chunk-3T3RMDNX.js.map +1 -0
- package/dist/chunk-54NTYJEO.js +13 -0
- package/dist/chunk-54NTYJEO.js.map +1 -0
- package/dist/{chunk-DCJQ2PIX.js → chunk-5DLOHQJ2.js} +5 -8
- package/dist/chunk-5DLOHQJ2.js.map +1 -0
- package/dist/chunk-5HCVKTP3.js +2086 -0
- package/dist/chunk-5HCVKTP3.js.map +1 -0
- package/dist/{chunk-5E6BULAK.js → chunk-5YOCVEUB.js} +5 -8
- package/dist/chunk-5YOCVEUB.js.map +1 -0
- package/dist/{chunk-6M2NL363.js → chunk-A4Z6DZ22.js} +6 -8
- package/dist/chunk-A4Z6DZ22.js.map +1 -0
- package/dist/{chunk-NOZZFJEB.js → chunk-A7X4L4JM.js} +5 -8
- package/dist/chunk-A7X4L4JM.js.map +1 -0
- package/dist/{chunk-GCB4JUF7.js → chunk-ABTEGAFB.js} +5 -8
- package/dist/chunk-ABTEGAFB.js.map +1 -0
- package/dist/chunk-AJICZLHT.js +57 -0
- package/dist/chunk-AJICZLHT.js.map +1 -0
- package/dist/{chunk-H74QYTN7.js → chunk-B2ZOKNN4.js} +14 -3
- package/dist/chunk-B2ZOKNN4.js.map +1 -0
- package/dist/{chunk-ICSS5ETT.js → chunk-B6SXRCBO.js} +8 -18
- package/dist/chunk-B6SXRCBO.js.map +1 -0
- package/dist/{chunk-HEQL3LPK.js → chunk-BYTU2YC3.js} +8 -18
- package/dist/chunk-BYTU2YC3.js.map +1 -0
- package/dist/{chunk-V5OLWE7F.js → chunk-C6NHEDHY.js} +5 -8
- package/dist/chunk-C6NHEDHY.js.map +1 -0
- package/dist/chunk-C6NHFMIP.js +57 -0
- package/dist/chunk-C6NHFMIP.js.map +1 -0
- package/dist/chunk-CASCUFK2.js +87 -0
- package/dist/chunk-CASCUFK2.js.map +1 -0
- package/dist/chunk-DNBAMB5J.js +18 -0
- package/dist/chunk-DNBAMB5J.js.map +1 -0
- package/dist/chunk-DP2PP5V2.js +26 -0
- package/dist/chunk-DP2PP5V2.js.map +1 -0
- package/dist/{chunk-OYJXYJTE.js → chunk-DTAY7LPC.js} +303 -866
- package/dist/chunk-DTAY7LPC.js.map +1 -0
- package/dist/chunk-DYXEITK3.js +52 -0
- package/dist/chunk-DYXEITK3.js.map +1 -0
- package/dist/chunk-E2ISWXLB.js +7 -0
- package/dist/chunk-E2ISWXLB.js.map +1 -0
- package/dist/{chunk-XDEEOTVK.js → chunk-E7RW3SBV.js} +5 -8
- package/dist/chunk-E7RW3SBV.js.map +1 -0
- package/dist/chunk-EGB7V74Z.js +76 -0
- package/dist/chunk-EGB7V74Z.js.map +1 -0
- package/dist/{chunk-LBBM3LKK.js → chunk-ERELJ7BS.js} +5 -8
- package/dist/chunk-ERELJ7BS.js.map +1 -0
- package/dist/chunk-FXFDBF3P.js +57 -0
- package/dist/chunk-FXFDBF3P.js.map +1 -0
- package/dist/chunk-G5BZE7UA.js +50 -0
- package/dist/chunk-G5BZE7UA.js.map +1 -0
- package/dist/chunk-H3BST2LI.js +26 -0
- package/dist/chunk-H3BST2LI.js.map +1 -0
- package/dist/chunk-H3I2KZIY.js +25 -0
- package/dist/chunk-H3I2KZIY.js.map +1 -0
- package/dist/{chunk-UWMOTOXA.js → chunk-HEHERHQ5.js} +8 -15
- package/dist/chunk-HEHERHQ5.js.map +1 -0
- package/dist/chunk-HQ4KWN76.js +57 -0
- package/dist/chunk-HQ4KWN76.js.map +1 -0
- package/dist/{chunk-MY3NUJJD.js → chunk-IQVNVTOP.js} +8 -18
- package/dist/chunk-IQVNVTOP.js.map +1 -0
- package/dist/chunk-JALIYI6M.js +55 -0
- package/dist/chunk-JALIYI6M.js.map +1 -0
- package/dist/chunk-JZQHKDSY.js +216 -0
- package/dist/chunk-JZQHKDSY.js.map +1 -0
- package/dist/chunk-JZT4QGIP.js +24 -0
- package/dist/chunk-JZT4QGIP.js.map +1 -0
- package/dist/chunk-KTNDT45N.js +57 -0
- package/dist/chunk-KTNDT45N.js.map +1 -0
- package/dist/chunk-L6JPBJAS.js +57 -0
- package/dist/chunk-L6JPBJAS.js.map +1 -0
- package/dist/{chunk-6VKNSO6U.js → chunk-LAJJPLEV.js} +17 -11
- package/dist/chunk-LAJJPLEV.js.map +1 -0
- package/dist/chunk-LW25LMIH.js +26 -0
- package/dist/chunk-LW25LMIH.js.map +1 -0
- package/dist/{chunk-WSDQ2MRG.js → chunk-LYDMMNL2.js} +5 -8
- package/dist/chunk-LYDMMNL2.js.map +1 -0
- package/dist/{chunk-G7O6DAWU.js → chunk-MHCMHKM6.js} +15 -9
- package/dist/chunk-MHCMHKM6.js.map +1 -0
- package/dist/chunk-N72CAZEH.js +1990 -0
- package/dist/chunk-N72CAZEH.js.map +1 -0
- package/dist/{chunk-XQUQSNCA.js → chunk-NHS7WLEQ.js} +4 -5
- package/dist/chunk-NHS7WLEQ.js.map +1 -0
- package/dist/chunk-NJMGCT63.js +54 -0
- package/dist/chunk-NJMGCT63.js.map +1 -0
- package/dist/chunk-O7ODGJYL.js +57 -0
- package/dist/chunk-O7ODGJYL.js.map +1 -0
- package/dist/chunk-OHROA3FQ.js +54 -0
- package/dist/chunk-OHROA3FQ.js.map +1 -0
- package/dist/chunk-OPYQ5KIO.js +52 -0
- package/dist/chunk-OPYQ5KIO.js.map +1 -0
- package/dist/chunk-OYV2DN66.js +50 -0
- package/dist/chunk-OYV2DN66.js.map +1 -0
- package/dist/chunk-OZAEWZZ3.js +31 -0
- package/dist/chunk-OZAEWZZ3.js.map +1 -0
- package/dist/chunk-PBBG7VFT.js +1896 -0
- package/dist/chunk-PBBG7VFT.js.map +1 -0
- package/dist/{chunk-HXWGG4K7.js → chunk-PJBQKMCD.js} +10 -20
- package/dist/chunk-PJBQKMCD.js.map +1 -0
- package/dist/chunk-Q2IAILVC.js +26 -0
- package/dist/chunk-Q2IAILVC.js.map +1 -0
- package/dist/chunk-Q6CDMOM6.js +57 -0
- package/dist/chunk-Q6CDMOM6.js.map +1 -0
- package/dist/{chunk-ALAMUIGJ.js → chunk-QGRDPSAH.js} +17 -12
- package/dist/chunk-QGRDPSAH.js.map +1 -0
- package/dist/{chunk-7QXJ4KWQ.js → chunk-RLGWMJD3.js} +63 -9
- package/dist/chunk-RLGWMJD3.js.map +1 -0
- package/dist/chunk-RO5IQEDQ.js +30 -0
- package/dist/chunk-RO5IQEDQ.js.map +1 -0
- package/dist/{chunk-ZC4KNEOQ.js → chunk-RQK5UPMP.js} +16 -11
- package/dist/chunk-RQK5UPMP.js.map +1 -0
- package/dist/chunk-RQYEEA2O.js +50 -0
- package/dist/chunk-RQYEEA2O.js.map +1 -0
- package/dist/chunk-SFUCUARB.js +21 -0
- package/dist/chunk-SFUCUARB.js.map +1 -0
- package/dist/{chunk-MVE5VVMQ.js → chunk-TRTUHCS4.js} +5 -8
- package/dist/chunk-TRTUHCS4.js.map +1 -0
- package/dist/chunk-TWGVQLG2.js +24 -0
- package/dist/chunk-TWGVQLG2.js.map +1 -0
- package/dist/chunk-UGK4TAVK.js +32 -0
- package/dist/chunk-UGK4TAVK.js.map +1 -0
- package/dist/{chunk-LPMPTQYP.js → chunk-UT2OPSN4.js} +12 -10
- package/dist/chunk-UT2OPSN4.js.map +1 -0
- package/dist/chunk-VGLHY6BK.js +31 -0
- package/dist/chunk-VGLHY6BK.js.map +1 -0
- package/dist/chunk-W7FLHT65.js +26 -0
- package/dist/chunk-W7FLHT65.js.map +1 -0
- package/dist/chunk-WL7HS7EM.js +50 -0
- package/dist/chunk-WL7HS7EM.js.map +1 -0
- package/dist/chunk-WSGEIVY3.js +1766 -0
- package/dist/chunk-WSGEIVY3.js.map +1 -0
- package/dist/{chunk-H3JR7MN3.js → chunk-XGJ2QERC.js} +17 -10
- package/dist/chunk-XGJ2QERC.js.map +1 -0
- package/dist/chunk-XHCBHYN4.js +54 -0
- package/dist/chunk-XHCBHYN4.js.map +1 -0
- package/dist/chunk-XLQI4IT2.js +54 -0
- package/dist/chunk-XLQI4IT2.js.map +1 -0
- package/dist/{chunk-3PBSL7BS.js → chunk-XRU5WXZX.js} +5 -8
- package/dist/chunk-XRU5WXZX.js.map +1 -0
- package/dist/{chunk-UZZD4MRJ.js → chunk-YAVGCQUP.js} +5 -8
- package/dist/chunk-YAVGCQUP.js.map +1 -0
- package/dist/chunk-YGZMVNN5.js +54 -0
- package/dist/chunk-YGZMVNN5.js.map +1 -0
- package/dist/{chunk-PEZYBKZH.js → chunk-YPT4JBUY.js} +10 -24
- package/dist/chunk-YPT4JBUY.js.map +1 -0
- package/dist/chunk-YUK3X3B4.js +27 -0
- package/dist/chunk-YUK3X3B4.js.map +1 -0
- package/dist/chunk-ZNWVJ6UW.js +54 -0
- package/dist/chunk-ZNWVJ6UW.js.map +1 -0
- package/dist/config-34LHOGLM.js +13 -0
- package/dist/config-3BBWD5AB.js +11 -0
- package/dist/{config-FNR6LJ5H.js → config-3IVQJBNW.js} +4 -2
- package/dist/config-4UDVSUQJ.js +11 -0
- package/dist/config-CMDBAPDH.js +11 -0
- package/dist/config-CVZ2AGCO.js +21 -0
- package/dist/config-D3RLSPNF.js +11 -0
- package/dist/config-DG65OEG3.js +11 -0
- package/dist/{config-HNSDNQZH.js → config-EIHSP5DZ.js} +4 -2
- package/dist/config-EO23EY62.js +15 -0
- package/dist/config-GCQK6NJY.js +11 -0
- package/dist/{config-5ZPGISS6.js → config-GE4W4ZJC.js} +4 -2
- package/dist/config-GHRUKEQ6.js +13 -0
- package/dist/config-GVH27UPE.js +11 -0
- package/dist/config-HKRMKD76.js +15 -0
- package/dist/config-HXVYIXP5.js +11 -0
- package/dist/config-IDZMEW73.js +11 -0
- package/dist/config-IJJXGLBQ.js +11 -0
- package/dist/config-IVY5EQQ2.js +15 -0
- package/dist/config-KJOLGVB2.js +11 -0
- package/dist/{config-S47UDVRZ.js → config-KMVCVBYN.js} +4 -2
- package/dist/{config-UKZ72IDO.js → config-KYTRXAB2.js} +4 -2
- package/dist/{config-MOLWOSRG.js → config-LHFFXVYI.js} +4 -2
- package/dist/config-NV5WXP64.js +11 -0
- package/dist/config-OT2TQQCN.js +11 -0
- package/dist/config-Q45Y46YT.js +15 -0
- package/dist/config-QAA646XB.js +15 -0
- package/dist/config-QNMKWJ4M.js +15 -0
- package/dist/config-QWCY3LBQ.js +11 -0
- package/dist/{config-HIZHA5VD.js → config-VM526IKB.js} +4 -2
- package/dist/config-WDAZFXYD.js +15 -0
- package/dist/config-ZFJYQZCH.js +13 -0
- package/dist/config-ZV6G2ZEC.js +11 -0
- package/dist/databricks_volume-HNQ4DJVJ.js +7 -0
- package/dist/digitalocean-6SPR4S7V.js +10 -0
- package/dist/discord-SAV2RBJV.js +8 -0
- package/dist/{disk-C7TJNU2B.js → disk-POACMF4G.js} +2 -2
- package/dist/dropbox-CQ7MTYX2.js +8 -0
- package/dist/email-KBQ7CXS7.js +8 -0
- package/dist/gcs-SMIE4VMT.js +10 -0
- package/dist/gdocs-X5Y2SIQX.js +8 -0
- package/dist/gdrive-SIQPRIGI.js +8 -0
- package/dist/github-KBHWANKQ.js +8 -0
- package/dist/github-KBHWANKQ.js.map +1 -0
- package/dist/github_ci-HPITNK37.js +8 -0
- package/dist/github_ci-HPITNK37.js.map +1 -0
- package/dist/gmail-DKHAGJNX.js +8 -0
- package/dist/gmail-DKHAGJNX.js.map +1 -0
- package/dist/gsheets-ZSUDIWGK.js +8 -0
- package/dist/gsheets-ZSUDIWGK.js.map +1 -0
- package/dist/gslides-GYXM7IMJ.js +8 -0
- package/dist/gslides-GYXM7IMJ.js.map +1 -0
- package/dist/hf_buckets-RIOMV7WG.js +10 -0
- package/dist/hf_buckets-RIOMV7WG.js.map +1 -0
- package/dist/hf_datasets-QF4BQ3OK.js +10 -0
- package/dist/hf_datasets-QF4BQ3OK.js.map +1 -0
- package/dist/hf_models-62GC2HPZ.js +10 -0
- package/dist/hf_models-62GC2HPZ.js.map +1 -0
- package/dist/hf_spaces-NVSMUNRM.js +10 -0
- package/dist/hf_spaces-NVSMUNRM.js.map +1 -0
- package/dist/index.d.ts +722 -277
- package/dist/index.js +646 -2268
- package/dist/index.js.map +1 -1
- package/dist/langfuse-HUAYVPHF.js +8 -0
- package/dist/langfuse-HUAYVPHF.js.map +1 -0
- package/dist/linear-2MM55KBC.js +8 -0
- package/dist/linear-2MM55KBC.js.map +1 -0
- package/dist/minio-L3XE6PQS.js +10 -0
- package/dist/minio-L3XE6PQS.js.map +1 -0
- package/dist/mongodb-ZOX4FRHJ.js +7 -0
- package/dist/mongodb-ZOX4FRHJ.js.map +1 -0
- package/dist/notion-UK4GTMT4.js +8 -0
- package/dist/notion-UK4GTMT4.js.map +1 -0
- package/dist/oci-NURLWPL2.js +10 -0
- package/dist/oci-NURLWPL2.js.map +1 -0
- package/dist/postgres-JNFMPAO2.js +7 -0
- package/dist/postgres-JNFMPAO2.js.map +1 -0
- package/dist/qingstor-W55D5YFO.js +10 -0
- package/dist/qingstor-W55D5YFO.js.map +1 -0
- package/dist/r2-FSZK7IFI.js +10 -0
- package/dist/r2-FSZK7IFI.js.map +1 -0
- package/dist/redis-S6GIPA4Z.js +8 -0
- package/dist/redis-S6GIPA4Z.js.map +1 -0
- package/dist/s3-GMPUJ65D.js +8 -0
- package/dist/s3-GMPUJ65D.js.map +1 -0
- package/dist/scaleway-5VM55Y6D.js +10 -0
- package/dist/scaleway-5VM55Y6D.js.map +1 -0
- package/dist/seaweedfs-J3EPUEPE.js +10 -0
- package/dist/seaweedfs-J3EPUEPE.js.map +1 -0
- package/dist/slack-FVBXY7KD.js +8 -0
- package/dist/slack-FVBXY7KD.js.map +1 -0
- package/dist/ssh-GCXETJ3Z.js +9 -0
- package/dist/ssh-GCXETJ3Z.js.map +1 -0
- package/dist/supabase-HLWNHBBE.js +10 -0
- package/dist/supabase-HLWNHBBE.js.map +1 -0
- package/dist/tencent-YDO73XBD.js +10 -0
- package/dist/tencent-YDO73XBD.js.map +1 -0
- package/dist/trello-CQ53BQUL.js +8 -0
- package/dist/trello-CQ53BQUL.js.map +1 -0
- package/dist/wasabi-SOZKPMRQ.js +10 -0
- package/dist/wasabi-SOZKPMRQ.js.map +1 -0
- package/package.json +39 -13
- package/dist/box-4P7DCJH7.js +0 -8
- package/dist/chunk-35PVZRWU.js +0 -24
- package/dist/chunk-35PVZRWU.js.map +0 -1
- package/dist/chunk-3PBSL7BS.js.map +0 -1
- package/dist/chunk-3Y625AUP.js +0 -24
- package/dist/chunk-3Y625AUP.js.map +0 -1
- package/dist/chunk-5E6BULAK.js.map +0 -1
- package/dist/chunk-5ITBZN55.js +0 -24
- package/dist/chunk-5ITBZN55.js.map +0 -1
- package/dist/chunk-6M2NL363.js.map +0 -1
- package/dist/chunk-6M3QVVOH.js +0 -32
- package/dist/chunk-6M3QVVOH.js.map +0 -1
- package/dist/chunk-6VKNSO6U.js.map +0 -1
- package/dist/chunk-6Y6GWMFF.js +0 -24
- package/dist/chunk-6Y6GWMFF.js.map +0 -1
- package/dist/chunk-7QXJ4KWQ.js.map +0 -1
- package/dist/chunk-ALAMUIGJ.js.map +0 -1
- package/dist/chunk-DCJQ2PIX.js.map +0 -1
- package/dist/chunk-EKPH4MMD.js +0 -27
- package/dist/chunk-EKPH4MMD.js.map +0 -1
- package/dist/chunk-FZ2GJ4BJ.js +0 -29
- package/dist/chunk-FZ2GJ4BJ.js.map +0 -1
- package/dist/chunk-G7O6DAWU.js.map +0 -1
- package/dist/chunk-GCB4JUF7.js.map +0 -1
- package/dist/chunk-GKQNMLQU.js +0 -7757
- package/dist/chunk-GKQNMLQU.js.map +0 -1
- package/dist/chunk-GO67AOYK.js +0 -24
- package/dist/chunk-GO67AOYK.js.map +0 -1
- package/dist/chunk-GPF66TH2.js +0 -24
- package/dist/chunk-GPF66TH2.js.map +0 -1
- package/dist/chunk-H3JR7MN3.js.map +0 -1
- package/dist/chunk-H74QYTN7.js.map +0 -1
- package/dist/chunk-HEQL3LPK.js.map +0 -1
- package/dist/chunk-HXWGG4K7.js.map +0 -1
- package/dist/chunk-I4RRGZGB.js +0 -24
- package/dist/chunk-I4RRGZGB.js.map +0 -1
- package/dist/chunk-ICSS5ETT.js.map +0 -1
- package/dist/chunk-KINMBZHC.js +0 -18
- package/dist/chunk-KINMBZHC.js.map +0 -1
- package/dist/chunk-LBBM3LKK.js.map +0 -1
- package/dist/chunk-LPMPTQYP.js.map +0 -1
- package/dist/chunk-M42JTWPR.js +0 -2794
- package/dist/chunk-M42JTWPR.js.map +0 -1
- package/dist/chunk-MVE5VVMQ.js.map +0 -1
- package/dist/chunk-MY3NUJJD.js.map +0 -1
- package/dist/chunk-NOZZFJEB.js.map +0 -1
- package/dist/chunk-OYJXYJTE.js.map +0 -1
- package/dist/chunk-PEZYBKZH.js.map +0 -1
- package/dist/chunk-QWWOBAYU.js +0 -26
- package/dist/chunk-QWWOBAYU.js.map +0 -1
- package/dist/chunk-RQYYYBQG.js +0 -24
- package/dist/chunk-RQYYYBQG.js.map +0 -1
- package/dist/chunk-T2WWAEKH.js +0 -7591
- package/dist/chunk-T2WWAEKH.js.map +0 -1
- package/dist/chunk-UWMOTOXA.js.map +0 -1
- package/dist/chunk-UZZD4MRJ.js.map +0 -1
- package/dist/chunk-V5OLWE7F.js.map +0 -1
- package/dist/chunk-VCLMTMSO.js +0 -23
- package/dist/chunk-VCLMTMSO.js.map +0 -1
- package/dist/chunk-WSDQ2MRG.js.map +0 -1
- package/dist/chunk-XDEEOTVK.js.map +0 -1
- package/dist/chunk-XQUQSNCA.js.map +0 -1
- package/dist/chunk-XVYZO2FG.js +0 -14
- package/dist/chunk-XVYZO2FG.js.map +0 -1
- package/dist/chunk-ZC4KNEOQ.js.map +0 -1
- package/dist/config-6HWSKHEU.js +0 -9
- package/dist/config-6TNFPYZF.js +0 -9
- package/dist/config-BHLXQ3OL.js +0 -9
- package/dist/config-E7UOEWEP.js +0 -9
- package/dist/config-IXLFUSMQ.js +0 -9
- package/dist/config-J3TM7NIS.js +0 -9
- package/dist/config-JXLZ4XEW.js +0 -9
- package/dist/config-KQCEMLNZ.js +0 -9
- package/dist/config-R3XJ5OW4.js +0 -9
- package/dist/config-V7XI5UTG.js +0 -9
- package/dist/config-YLIX3ZBT.js +0 -9
- package/dist/config-Z5JGDOKE.js +0 -9
- package/dist/config-ZCZZAH5W.js +0 -9
- package/dist/config-ZZGIWDUC.js +0 -9
- package/dist/discord-2PWP2MGX.js +0 -8
- package/dist/dropbox-L5DPYGKR.js +0 -8
- package/dist/email-HASRFBKC.js +0 -8
- package/dist/gcs-P5QMKTPR.js +0 -10
- package/dist/gdocs-IF2I35HZ.js +0 -8
- package/dist/gdrive-TAETVCKP.js +0 -8
- package/dist/github-5E6GSCNZ.js +0 -8
- package/dist/github_ci-2DSZI3Y7.js +0 -8
- package/dist/gmail-F5VYGKOT.js +0 -8
- package/dist/gsheets-BAO54CQ7.js +0 -8
- package/dist/gslides-A62CEEMR.js +0 -8
- package/dist/langfuse-YKBYRQLU.js +0 -8
- package/dist/linear-WJDQ6JDE.js +0 -8
- package/dist/mongodb-MK4DVSIK.js +0 -7
- package/dist/oci-KZ7XFZ2X.js +0 -10
- package/dist/postgres-M2N2APFZ.js +0 -7
- package/dist/r2-X4DDNSAZ.js +0 -10
- package/dist/redis-NVCXUUIO.js +0 -7
- package/dist/s3-HVAL7ZX3.js +0 -8
- package/dist/slack-GUQMDGLP.js +0 -8
- package/dist/ssh-LY6WYVVD.js +0 -9
- package/dist/supabase-H3ZP4Y3W.js +0 -10
- package/dist/trello-WR6TEDYD.js +0 -8
- /package/dist/{box-4P7DCJH7.js.map → aliyun-TMZRUYCG.js.map} +0 -0
- /package/dist/{config-5ZPGISS6.js.map → backblaze-OHW57DLK.js.map} +0 -0
- /package/dist/{config-6HWSKHEU.js.map → box-UXTCAFOZ.js.map} +0 -0
- /package/dist/{config-6TNFPYZF.js.map → ceph-TNN4I2FT.js.map} +0 -0
- /package/dist/{config-BHLXQ3OL.js.map → config-34LHOGLM.js.map} +0 -0
- /package/dist/{config-E7UOEWEP.js.map → config-3BBWD5AB.js.map} +0 -0
- /package/dist/{config-FNR6LJ5H.js.map → config-3IVQJBNW.js.map} +0 -0
- /package/dist/{config-HIZHA5VD.js.map → config-4UDVSUQJ.js.map} +0 -0
- /package/dist/{config-HNSDNQZH.js.map → config-CMDBAPDH.js.map} +0 -0
- /package/dist/{config-IXLFUSMQ.js.map → config-CVZ2AGCO.js.map} +0 -0
- /package/dist/{config-J3TM7NIS.js.map → config-D3RLSPNF.js.map} +0 -0
- /package/dist/{config-JXLZ4XEW.js.map → config-DG65OEG3.js.map} +0 -0
- /package/dist/{config-KQCEMLNZ.js.map → config-EIHSP5DZ.js.map} +0 -0
- /package/dist/{config-MOLWOSRG.js.map → config-EO23EY62.js.map} +0 -0
- /package/dist/{config-R3XJ5OW4.js.map → config-GCQK6NJY.js.map} +0 -0
- /package/dist/{config-S47UDVRZ.js.map → config-GE4W4ZJC.js.map} +0 -0
- /package/dist/{config-UKZ72IDO.js.map → config-GHRUKEQ6.js.map} +0 -0
- /package/dist/{config-V7XI5UTG.js.map → config-GVH27UPE.js.map} +0 -0
- /package/dist/{config-YLIX3ZBT.js.map → config-HKRMKD76.js.map} +0 -0
- /package/dist/{config-Z5JGDOKE.js.map → config-HXVYIXP5.js.map} +0 -0
- /package/dist/{config-ZCZZAH5W.js.map → config-IDZMEW73.js.map} +0 -0
- /package/dist/{config-ZZGIWDUC.js.map → config-IJJXGLBQ.js.map} +0 -0
- /package/dist/{discord-2PWP2MGX.js.map → config-IVY5EQQ2.js.map} +0 -0
- /package/dist/{disk-C7TJNU2B.js.map → config-KJOLGVB2.js.map} +0 -0
- /package/dist/{dropbox-L5DPYGKR.js.map → config-KMVCVBYN.js.map} +0 -0
- /package/dist/{email-HASRFBKC.js.map → config-KYTRXAB2.js.map} +0 -0
- /package/dist/{gcs-P5QMKTPR.js.map → config-LHFFXVYI.js.map} +0 -0
- /package/dist/{gdocs-IF2I35HZ.js.map → config-NV5WXP64.js.map} +0 -0
- /package/dist/{gdrive-TAETVCKP.js.map → config-OT2TQQCN.js.map} +0 -0
- /package/dist/{github-5E6GSCNZ.js.map → config-Q45Y46YT.js.map} +0 -0
- /package/dist/{github_ci-2DSZI3Y7.js.map → config-QAA646XB.js.map} +0 -0
- /package/dist/{gmail-F5VYGKOT.js.map → config-QNMKWJ4M.js.map} +0 -0
- /package/dist/{gsheets-BAO54CQ7.js.map → config-QWCY3LBQ.js.map} +0 -0
- /package/dist/{gslides-A62CEEMR.js.map → config-VM526IKB.js.map} +0 -0
- /package/dist/{langfuse-YKBYRQLU.js.map → config-WDAZFXYD.js.map} +0 -0
- /package/dist/{linear-WJDQ6JDE.js.map → config-ZFJYQZCH.js.map} +0 -0
- /package/dist/{mongodb-MK4DVSIK.js.map → config-ZV6G2ZEC.js.map} +0 -0
- /package/dist/{oci-KZ7XFZ2X.js.map → databricks_volume-HNQ4DJVJ.js.map} +0 -0
- /package/dist/{postgres-M2N2APFZ.js.map → digitalocean-6SPR4S7V.js.map} +0 -0
- /package/dist/{r2-X4DDNSAZ.js.map → discord-SAV2RBJV.js.map} +0 -0
- /package/dist/{redis-NVCXUUIO.js.map → disk-POACMF4G.js.map} +0 -0
- /package/dist/{s3-HVAL7ZX3.js.map → dropbox-CQ7MTYX2.js.map} +0 -0
- /package/dist/{slack-GUQMDGLP.js.map → email-KBQ7CXS7.js.map} +0 -0
- /package/dist/{ssh-LY6WYVVD.js.map → gcs-SMIE4VMT.js.map} +0 -0
- /package/dist/{supabase-H3ZP4Y3W.js.map → gdocs-X5Y2SIQX.js.map} +0 -0
- /package/dist/{trello-WR6TEDYD.js.map → gdrive-SIQPRIGI.js.map} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/resource/postgres/postgres.ts
|
|
2
2
|
import {
|
|
3
|
+
BaseResource,
|
|
3
4
|
PathSpec,
|
|
4
5
|
POSTGRES_COMMANDS,
|
|
5
6
|
POSTGRES_OPS,
|
|
@@ -8,7 +9,6 @@ import {
|
|
|
8
9
|
postgresRead,
|
|
9
10
|
postgresReaddir,
|
|
10
11
|
postgresStat,
|
|
11
|
-
RAMIndexCacheStore,
|
|
12
12
|
ResourceName,
|
|
13
13
|
resolvePostgresConfig,
|
|
14
14
|
resolvePostgresGlob
|
|
@@ -58,7 +58,7 @@ var PostgresStore = class {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
// src/resource/postgres/postgres.ts
|
|
61
|
-
var PostgresResource = class {
|
|
61
|
+
var PostgresResource = class extends BaseResource {
|
|
62
62
|
kind = ResourceName.POSTGRES;
|
|
63
63
|
isRemote = true;
|
|
64
64
|
indexTtl = 0;
|
|
@@ -66,13 +66,12 @@ var PostgresResource = class {
|
|
|
66
66
|
config;
|
|
67
67
|
store;
|
|
68
68
|
accessor;
|
|
69
|
-
index;
|
|
70
69
|
constructor(options) {
|
|
70
|
+
super();
|
|
71
71
|
const { config, prefix } = "config" in options ? options : { config: options, prefix: void 0 };
|
|
72
72
|
this.config = resolvePostgresConfig(config);
|
|
73
73
|
this.store = new PostgresStore(this.config);
|
|
74
74
|
this.accessor = new PostgresAccessor(this.store, this.config);
|
|
75
|
-
this.index = new RAMIndexCacheStore({ ttl: this.indexTtl });
|
|
76
75
|
this.prompt = POSTGRES_PROMPT.replace("{prefix}", prefix ?? "");
|
|
77
76
|
}
|
|
78
77
|
open() {
|
|
@@ -114,4 +113,4 @@ export {
|
|
|
114
113
|
PostgresStore,
|
|
115
114
|
PostgresResource
|
|
116
115
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
116
|
+
//# sourceMappingURL=chunk-NHS7WLEQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/postgres/postgres.ts","../src/resource/postgres/store.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 type FileStat,\n PathSpec,\n POSTGRES_COMMANDS,\n POSTGRES_OPS,\n POSTGRES_PROMPT,\n PostgresAccessor,\n type PostgresConfig,\n type PostgresConfigResolved,\n postgresRead,\n postgresReaddir,\n postgresStat,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n resolvePostgresConfig,\n resolvePostgresGlob,\n} from '@struktoai/mirage-core'\nimport { PostgresStore } from './store.ts'\n\nexport interface PostgresResourceOptions {\n config: PostgresConfig\n prefix?: string\n}\n\nexport class PostgresResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.POSTGRES\n readonly isRemote: boolean = true\n readonly indexTtl: number = 0\n readonly prompt: string\n readonly config: PostgresConfigResolved\n readonly store: PostgresStore\n readonly accessor: PostgresAccessor\n\n constructor(options: PostgresResourceOptions | PostgresConfig) {\n super()\n const { config, prefix } =\n 'config' in options ? options : { config: options, prefix: undefined }\n this.config = resolvePostgresConfig(config)\n this.store = new PostgresStore(this.config)\n this.accessor = new PostgresAccessor(this.store, this.config)\n this.prompt = POSTGRES_PROMPT.replace('{prefix}', prefix ?? '')\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n async close(): Promise<void> {\n await this.store.close()\n }\n\n ops(): readonly RegisteredOp[] {\n return POSTGRES_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return POSTGRES_COMMANDS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return postgresRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return postgresReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return postgresStat(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 p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolvePostgresGlob(this.accessor, effective, this.index)\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 { loadOptionalPeer, type PgDriver, type PgQueryResult } from '@struktoai/mirage-core'\nimport type { PostgresConfigResolved } from '@struktoai/mirage-core'\n\ninterface PgPoolLike {\n query: (\n sql: string,\n params?: readonly unknown[],\n ) => Promise<{ rows: unknown[]; rowCount: number | null }>\n end: () => Promise<void>\n}\n\ninterface PgModule {\n Pool: new (options: Record<string, unknown>) => PgPoolLike\n}\n\nexport class PostgresStore implements PgDriver {\n readonly config: PostgresConfigResolved\n private poolPromise: Promise<PgPoolLike> | null = null\n\n constructor(config: PostgresConfigResolved) {\n this.config = config\n }\n\n async query<R = Record<string, unknown>>(\n sql: string,\n params?: readonly unknown[],\n ): Promise<PgQueryResult<R>> {\n const pool = await this._pool()\n const result = await pool.query(sql, params)\n return { rows: result.rows as R[], rowCount: result.rowCount ?? 0 }\n }\n\n async databaseName(): Promise<string> {\n const result = await this.query<{ db: string }>('SELECT current_database() AS db')\n return result.rows[0]?.db ?? ''\n }\n\n async close(): Promise<void> {\n if (this.poolPromise === null) return\n const pool = await this.poolPromise\n this.poolPromise = null\n await pool.end()\n }\n\n private async _pool(): Promise<PgPoolLike> {\n this.poolPromise ??= this._connect()\n return this.poolPromise\n }\n\n protected async _connect(): Promise<PgPoolLike> {\n const mod = await loadOptionalPeer(\n () => import('pg') as unknown as Promise<{ default?: PgModule } & Partial<PgModule>>,\n { feature: 'PostgresResource', packageName: 'pg' },\n )\n const Pool = mod.default?.Pool ?? mod.Pool\n if (Pool === undefined) {\n throw new Error('postgres: pg package missing Pool export')\n }\n return new Pool({\n connectionString: this.config.dsn,\n options: '-c default_transaction_read_only=on',\n })\n }\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACnBP,SAAS,wBAA2D;AAe7D,IAAM,gBAAN,MAAwC;AAAA,EACpC;AAAA,EACD,cAA0C;AAAA,EAElD,YAAY,QAAgC;AAC1C,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAM,MACJ,KACA,QAC2B;AAC3B,UAAM,OAAO,MAAM,KAAK,MAAM;AAC9B,UAAM,SAAS,MAAM,KAAK,MAAM,KAAK,MAAM;AAC3C,WAAO,EAAE,MAAM,OAAO,MAAa,UAAU,OAAO,YAAY,EAAE;AAAA,EACpE;AAAA,EAEA,MAAM,eAAgC;AACpC,UAAM,SAAS,MAAM,KAAK,MAAsB,iCAAiC;AACjF,WAAO,OAAO,KAAK,CAAC,GAAG,MAAM;AAAA,EAC/B;AAAA,EAEA,MAAM,QAAuB;AAC3B,QAAI,KAAK,gBAAgB,KAAM;AAC/B,UAAM,OAAO,MAAM,KAAK;AACxB,SAAK,cAAc;AACnB,UAAM,KAAK,IAAI;AAAA,EACjB;AAAA,EAEA,MAAc,QAA6B;AACzC,SAAK,gBAAgB,KAAK,SAAS;AACnC,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAgB,WAAgC;AAC9C,UAAM,MAAM,MAAM;AAAA,MAChB,MAAM,OAAO,IAAI;AAAA,MACjB,EAAE,SAAS,oBAAoB,aAAa,KAAK;AAAA,IACnD;AACA,UAAM,OAAO,IAAI,SAAS,QAAQ,IAAI;AACtC,QAAI,SAAS,QAAW;AACtB,YAAM,IAAI,MAAM,0CAA0C;AAAA,IAC5D;AACA,WAAO,IAAI,KAAK;AAAA,MACd,kBAAkB,KAAK,OAAO;AAAA,MAC9B,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACF;;;ADpCO,IAAM,mBAAN,cAA+B,aAAiC;AAAA,EAC5D,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,SAAmD;AAC7D,UAAM;AACN,UAAM,EAAE,QAAQ,OAAO,IACrB,YAAY,UAAU,UAAU,EAAE,QAAQ,SAAS,QAAQ,OAAU;AACvE,SAAK,SAAS,sBAAsB,MAAM;AAC1C,SAAK,QAAQ,IAAI,cAAc,KAAK,MAAM;AAC1C,SAAK,WAAW,IAAI,iBAAiB,KAAK,OAAO,KAAK,MAAM;AAC5D,SAAK,SAAS,gBAAgB,QAAQ,YAAY,UAAU,EAAE;AAAA,EAChE;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,MAAM,QAAuB;AAC3B,UAAM,KAAK,MAAM,MAAM;AAAA,EACzB;AAAA,EAEA,MAA+B;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,WAAyC;AACvC,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,gBAAgB,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACrD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,oBAAoB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EACjE;AACF;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/resource/aliyun/config.ts
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var AliyunConfigSchema = z.object({
|
|
4
|
+
bucket: z.string(),
|
|
5
|
+
accessKeyId: secretStr(),
|
|
6
|
+
secretAccessKey: secretStr(),
|
|
7
|
+
region: z.string(),
|
|
8
|
+
endpoint: z.string(),
|
|
9
|
+
timeoutMs: z.number().optional()
|
|
10
|
+
});
|
|
11
|
+
function resolvedAliyunEndpoint(config) {
|
|
12
|
+
if (config.endpoint !== void 0 && config.endpoint !== "") return config.endpoint;
|
|
13
|
+
const region = config.region;
|
|
14
|
+
return `https://s3.oss-${region}.aliyuncs.com`;
|
|
15
|
+
}
|
|
16
|
+
function aliyunToS3Config(config) {
|
|
17
|
+
return {
|
|
18
|
+
bucket: config.bucket,
|
|
19
|
+
region: config.region,
|
|
20
|
+
endpoint: resolvedAliyunEndpoint(config),
|
|
21
|
+
accessKeyId: config.accessKeyId,
|
|
22
|
+
secretAccessKey: config.secretAccessKey,
|
|
23
|
+
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function redactAliyunConfig(config) {
|
|
27
|
+
return redactConfigWithSchema(AliyunConfigSchema, {
|
|
28
|
+
...config,
|
|
29
|
+
endpoint: resolvedAliyunEndpoint(config)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function normalizeAliyunConfig(input) {
|
|
33
|
+
return normalizeFields(input, {
|
|
34
|
+
rename: {
|
|
35
|
+
access_key_id: "accessKeyId",
|
|
36
|
+
secret_access_key: "secretAccessKey",
|
|
37
|
+
endpoint_url: "endpoint",
|
|
38
|
+
timeout: "timeoutMs"
|
|
39
|
+
},
|
|
40
|
+
transform: {
|
|
41
|
+
timeout: (v) => typeof v === "number" ? v * 1e3 : v
|
|
42
|
+
},
|
|
43
|
+
drop: ["proxy"]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
AliyunConfigSchema,
|
|
49
|
+
resolvedAliyunEndpoint,
|
|
50
|
+
aliyunToS3Config,
|
|
51
|
+
redactAliyunConfig,
|
|
52
|
+
normalizeAliyunConfig
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-NJMGCT63.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/aliyun/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 AliyunConfig {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint?: string\n timeoutMs?: number\n}\n\nexport interface AliyunConfigRedacted {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint: string\n timeoutMs?: number\n}\n\nexport const AliyunConfigSchema = z.object({\n bucket: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n region: z.string(),\n endpoint: z.string(),\n timeoutMs: z.number().optional(),\n})\n\nexport function resolvedAliyunEndpoint(config: AliyunConfig): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n const region = config.region\n return `https://s3.oss-${region}.aliyuncs.com`\n}\n\nexport function aliyunToS3Config(config: AliyunConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region,\n endpoint: resolvedAliyunEndpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactAliyunConfig(config: AliyunConfig): AliyunConfigRedacted {\n return redactConfigWithSchema(AliyunConfigSchema, {\n ...config,\n endpoint: resolvedAliyunEndpoint(config),\n }) as unknown as AliyunConfigRedacted\n}\n\nexport function normalizeAliyunConfig(input: Record<string, unknown>): AliyunConfig {\n return normalizeFields(input, {\n rename: {\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n endpoint_url: 'endpoint',\n timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as AliyunConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAqB/D,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,QAAQ,EAAE,OAAO;AAAA,EACjB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO;AAAA,EACnB,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAEM,SAAS,uBAAuB,QAA8B;AACnE,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,QAAM,SAAS,OAAO;AACtB,SAAO,kBAAkB,MAAM;AACjC;AAEO,SAAS,iBAAiB,QAAgC;AAC/D,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO;AAAA,IACf,UAAU,uBAAuB,MAAM;AAAA,IACvC,aAAa,OAAO;AAAA,IACpB,iBAAiB,OAAO;AAAA,IACxB,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB;AAAA,IAChD,GAAG;AAAA,IACH,UAAU,uBAAuB,MAAM;AAAA,EACzC,CAAC;AACH;AAEO,SAAS,sBAAsB,OAA8C;AAClF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,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":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
redactWasabiConfig,
|
|
3
|
+
wasabiToS3Config
|
|
4
|
+
} from "./chunk-JALIYI6M.js";
|
|
5
|
+
import {
|
|
6
|
+
S3Resource
|
|
7
|
+
} from "./chunk-MHCMHKM6.js";
|
|
8
|
+
|
|
9
|
+
// src/resource/wasabi/wasabi.ts
|
|
10
|
+
import {
|
|
11
|
+
remapCommandsResource,
|
|
12
|
+
remapOpsResource,
|
|
13
|
+
ResourceName
|
|
14
|
+
} from "@struktoai/mirage-core";
|
|
15
|
+
|
|
16
|
+
// src/resource/wasabi/prompt.ts
|
|
17
|
+
var WASABI_PROMPT = `{prefix}
|
|
18
|
+
Remote Wasabi bucket (S3-compatible).
|
|
19
|
+
IMPORTANT: This is a remote mount. Prefer targeted reads over full scans.
|
|
20
|
+
Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.
|
|
21
|
+
cat on .parquet/.orc/.feather returns a formatted table.`;
|
|
22
|
+
|
|
23
|
+
// src/resource/wasabi/wasabi.ts
|
|
24
|
+
var WasabiResource = class extends S3Resource {
|
|
25
|
+
kind = ResourceName.WASABI;
|
|
26
|
+
prompt = WASABI_PROMPT;
|
|
27
|
+
wasabiConfig;
|
|
28
|
+
wasabiOps;
|
|
29
|
+
wasabiCommands;
|
|
30
|
+
constructor(config) {
|
|
31
|
+
super(wasabiToS3Config(config));
|
|
32
|
+
this.wasabiConfig = config;
|
|
33
|
+
this.wasabiOps = remapOpsResource(super.ops(), ResourceName.WASABI);
|
|
34
|
+
this.wasabiCommands = remapCommandsResource(super.commands(), ResourceName.WASABI);
|
|
35
|
+
}
|
|
36
|
+
ops() {
|
|
37
|
+
return this.wasabiOps;
|
|
38
|
+
}
|
|
39
|
+
commands() {
|
|
40
|
+
return this.wasabiCommands;
|
|
41
|
+
}
|
|
42
|
+
getState() {
|
|
43
|
+
return Promise.resolve({
|
|
44
|
+
type: this.kind,
|
|
45
|
+
config: redactWasabiConfig(this.wasabiConfig)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
loadState(_state) {
|
|
49
|
+
return Promise.resolve();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
WASABI_PROMPT,
|
|
55
|
+
WasabiResource
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=chunk-O7ODGJYL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/wasabi/wasabi.ts","../src/resource/wasabi/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 {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n redactWasabiConfig,\n wasabiToS3Config,\n type WasabiConfig,\n type WasabiConfigRedacted,\n} from './config.ts'\nimport { WASABI_PROMPT } from './prompt.ts'\n\nexport interface WasabiResourceState {\n type: string\n config: WasabiConfigRedacted\n}\n\nexport class WasabiResource extends S3Resource {\n override readonly kind: string = ResourceName.WASABI\n override readonly prompt: string = WASABI_PROMPT\n readonly wasabiConfig: WasabiConfig\n private readonly wasabiOps: readonly RegisteredOp[]\n private readonly wasabiCommands: readonly RegisteredCommand[]\n\n constructor(config: WasabiConfig) {\n super(wasabiToS3Config(config))\n this.wasabiConfig = config\n this.wasabiOps = remapOpsResource(super.ops(), ResourceName.WASABI)\n this.wasabiCommands = remapCommandsResource(super.commands(), ResourceName.WASABI)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.wasabiOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.wasabiCommands\n }\n\n override getState(): Promise<WasabiResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactWasabiConfig(this.wasabiConfig),\n })\n }\n\n override loadState(_state: WasabiResourceState): Promise<void> {\n return Promise.resolve()\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\nexport const WASABI_PROMPT = `\\\n{prefix}\n Remote Wasabi bucket (S3-compatible).\n IMPORTANT: This is a remote mount. Prefer targeted reads over full scans.\n Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.\n cat on .parquet/.orc/.feather returns a formatted table.`\n"],"mappings":";;;;;;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNA,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;;;ADqBtB,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAC3B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAsB;AAChC,UAAM,iBAAiB,MAAM,CAAC;AAC9B,SAAK,eAAe;AACpB,SAAK,YAAY,iBAAiB,MAAM,IAAI,GAAG,aAAa,MAAM;AAClE,SAAK,iBAAiB,sBAAsB,MAAM,SAAS,GAAG,aAAa,MAAM;AAAA,EACnF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,YAAY;AAAA,IAC9C,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA4C;AAC7D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/resource/qingstor/config.ts
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var QingStorConfigSchema = z.object({
|
|
4
|
+
bucket: z.string(),
|
|
5
|
+
accessKeyId: secretStr(),
|
|
6
|
+
secretAccessKey: secretStr(),
|
|
7
|
+
region: z.string(),
|
|
8
|
+
endpoint: z.string(),
|
|
9
|
+
timeoutMs: z.number().optional()
|
|
10
|
+
});
|
|
11
|
+
function resolvedQingStorEndpoint(config) {
|
|
12
|
+
if (config.endpoint !== void 0 && config.endpoint !== "") return config.endpoint;
|
|
13
|
+
const region = config.region;
|
|
14
|
+
return `https://s3.${region}.qingstor.com`;
|
|
15
|
+
}
|
|
16
|
+
function qingStorToS3Config(config) {
|
|
17
|
+
return {
|
|
18
|
+
bucket: config.bucket,
|
|
19
|
+
region: config.region,
|
|
20
|
+
endpoint: resolvedQingStorEndpoint(config),
|
|
21
|
+
accessKeyId: config.accessKeyId,
|
|
22
|
+
secretAccessKey: config.secretAccessKey,
|
|
23
|
+
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function redactQingStorConfig(config) {
|
|
27
|
+
return redactConfigWithSchema(QingStorConfigSchema, {
|
|
28
|
+
...config,
|
|
29
|
+
endpoint: resolvedQingStorEndpoint(config)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function normalizeQingStorConfig(input) {
|
|
33
|
+
return normalizeFields(input, {
|
|
34
|
+
rename: {
|
|
35
|
+
access_key_id: "accessKeyId",
|
|
36
|
+
secret_access_key: "secretAccessKey",
|
|
37
|
+
endpoint_url: "endpoint",
|
|
38
|
+
timeout: "timeoutMs"
|
|
39
|
+
},
|
|
40
|
+
transform: {
|
|
41
|
+
timeout: (v) => typeof v === "number" ? v * 1e3 : v
|
|
42
|
+
},
|
|
43
|
+
drop: ["proxy"]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
QingStorConfigSchema,
|
|
49
|
+
resolvedQingStorEndpoint,
|
|
50
|
+
qingStorToS3Config,
|
|
51
|
+
redactQingStorConfig,
|
|
52
|
+
normalizeQingStorConfig
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-OHROA3FQ.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 timeoutMs?: number\n}\n\nexport interface QingStorConfigRedacted {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n endpoint: string\n timeoutMs?: number\n}\n\nexport const QingStorConfigSchema = z.object({\n bucket: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n region: z.string(),\n endpoint: z.string(),\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.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 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,wBAAwB,WAAW,SAAS;AAqB/D,IAAM,uBAAuB,EAAE,OAAO;AAAA,EAC3C,QAAQ,EAAE,OAAO;AAAA,EACjB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO;AAAA,EACnB,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,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,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":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// src/resource/ceph/config.ts
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var CephConfigSchema = z.object({
|
|
4
|
+
bucket: z.string(),
|
|
5
|
+
endpoint: z.string(),
|
|
6
|
+
accessKeyId: secretStr(),
|
|
7
|
+
secretAccessKey: secretStr(),
|
|
8
|
+
region: z.string(),
|
|
9
|
+
forcePathStyle: z.boolean(),
|
|
10
|
+
timeoutMs: z.number().optional()
|
|
11
|
+
});
|
|
12
|
+
function cephToS3Config(config) {
|
|
13
|
+
return {
|
|
14
|
+
bucket: config.bucket,
|
|
15
|
+
region: config.region ?? "us-east-1",
|
|
16
|
+
endpoint: config.endpoint,
|
|
17
|
+
accessKeyId: config.accessKeyId,
|
|
18
|
+
secretAccessKey: config.secretAccessKey,
|
|
19
|
+
forcePathStyle: config.forcePathStyle ?? true,
|
|
20
|
+
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function redactCephConfig(config) {
|
|
24
|
+
return redactConfigWithSchema(CephConfigSchema, {
|
|
25
|
+
...config,
|
|
26
|
+
region: config.region ?? "us-east-1",
|
|
27
|
+
forcePathStyle: config.forcePathStyle ?? true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function normalizeCephConfig(input) {
|
|
31
|
+
return normalizeFields(input, {
|
|
32
|
+
rename: {
|
|
33
|
+
access_key_id: "accessKeyId",
|
|
34
|
+
secret_access_key: "secretAccessKey",
|
|
35
|
+
endpoint_url: "endpoint",
|
|
36
|
+
path_style: "forcePathStyle",
|
|
37
|
+
timeout: "timeoutMs"
|
|
38
|
+
},
|
|
39
|
+
transform: {
|
|
40
|
+
timeout: (v) => typeof v === "number" ? v * 1e3 : v
|
|
41
|
+
},
|
|
42
|
+
drop: ["proxy"]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
CephConfigSchema,
|
|
48
|
+
cephToS3Config,
|
|
49
|
+
redactCephConfig,
|
|
50
|
+
normalizeCephConfig
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=chunk-OPYQ5KIO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/ceph/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 CephConfig {\n bucket: string\n endpoint: string\n accessKeyId: string\n secretAccessKey: string\n region?: string\n forcePathStyle?: boolean\n timeoutMs?: number\n}\n\nexport interface CephConfigRedacted {\n bucket: string\n endpoint: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n forcePathStyle: boolean\n timeoutMs?: number\n}\n\nexport const CephConfigSchema = z.object({\n bucket: z.string(),\n endpoint: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n region: z.string(),\n forcePathStyle: z.boolean(),\n timeoutMs: z.number().optional(),\n})\n\nexport function cephToS3Config(config: CephConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region ?? 'us-east-1',\n endpoint: config.endpoint,\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n forcePathStyle: config.forcePathStyle ?? true,\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactCephConfig(config: CephConfig): CephConfigRedacted {\n return redactConfigWithSchema(CephConfigSchema, {\n ...config,\n region: config.region ?? 'us-east-1',\n forcePathStyle: config.forcePathStyle ?? true,\n }) as unknown as CephConfigRedacted\n}\n\nexport function normalizeCephConfig(input: Record<string, unknown>): CephConfig {\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 timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as CephConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAuB/D,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO;AAAA,EACnB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,QAAQ,EAAE,OAAO;AAAA,EACjB,gBAAgB,EAAE,QAAQ;AAAA,EAC1B,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAEM,SAAS,eAAe,QAA8B;AAC3D,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO,UAAU;AAAA,IACzB,UAAU,OAAO;AAAA,IACjB,aAAa,OAAO;AAAA,IACpB,iBAAiB,OAAO;AAAA,IACxB,gBAAgB,OAAO,kBAAkB;AAAA,IACzC,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,iBAAiB,QAAwC;AACvE,SAAO,uBAAuB,kBAAkB;AAAA,IAC9C,GAAG;AAAA,IACH,QAAQ,OAAO,UAAU;AAAA,IACzB,gBAAgB,OAAO,kBAAkB;AAAA,EAC3C,CAAC;AACH;AAEO,SAAS,oBAAoB,OAA4C;AAC9E,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,IACA,MAAM,CAAC,OAAO;AAAA,EAChB,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HfResource,
|
|
3
|
+
HfSpacesAccessor
|
|
4
|
+
} from "./chunk-WSGEIVY3.js";
|
|
5
|
+
import {
|
|
6
|
+
assertHfRepoId,
|
|
7
|
+
redactHfRepoConfig
|
|
8
|
+
} from "./chunk-EGB7V74Z.js";
|
|
9
|
+
|
|
10
|
+
// src/resource/hf_spaces/hf_spaces.ts
|
|
11
|
+
import { normalizeKeyPrefix, ResourceName } from "@struktoai/mirage-core";
|
|
12
|
+
|
|
13
|
+
// src/resource/hf_spaces/prompt.ts
|
|
14
|
+
var HF_SPACES_PROMPT = `{prefix}
|
|
15
|
+
Remote Hugging Face Space. Maps the space's repo files (app code, README, requirements) to virtual paths.
|
|
16
|
+
IMPORTANT: This is a remote mount. Prefer targeted reads (grep, head) over full scans.
|
|
17
|
+
Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.`;
|
|
18
|
+
|
|
19
|
+
// src/resource/hf_spaces/hf_spaces.ts
|
|
20
|
+
var HfSpacesResource = class extends HfResource {
|
|
21
|
+
kind = ResourceName.HF_SPACES;
|
|
22
|
+
prompt = HF_SPACES_PROMPT;
|
|
23
|
+
config;
|
|
24
|
+
accessor;
|
|
25
|
+
constructor(config) {
|
|
26
|
+
super();
|
|
27
|
+
assertHfRepoId(config.repoId, "repo_id");
|
|
28
|
+
const normalized = normalizeKeyPrefix(config.keyPrefix);
|
|
29
|
+
const cfg = { ...config };
|
|
30
|
+
if (normalized !== void 0) {
|
|
31
|
+
cfg.keyPrefix = normalized;
|
|
32
|
+
} else {
|
|
33
|
+
delete cfg.keyPrefix;
|
|
34
|
+
}
|
|
35
|
+
this.config = cfg;
|
|
36
|
+
this.accessor = new HfSpacesAccessor(this.config);
|
|
37
|
+
}
|
|
38
|
+
getState() {
|
|
39
|
+
return Promise.resolve({
|
|
40
|
+
type: this.kind,
|
|
41
|
+
config: redactHfRepoConfig(this.config)
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
HF_SPACES_PROMPT,
|
|
48
|
+
HfSpacesResource
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=chunk-OYV2DN66.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/hf_spaces/hf_spaces.ts","../src/resource/hf_spaces/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 { normalizeKeyPrefix, ResourceName } from '@struktoai/mirage-core'\nimport { HfSpacesAccessor } from '../../accessor/hf.ts'\nimport { HfResource } from '../hf_buckets/base.ts'\nimport {\n assertHfRepoId,\n type HfRepoConfig,\n type HfRepoConfigRedacted,\n redactHfRepoConfig,\n} from '../hf_buckets/config.ts'\nimport { HF_SPACES_PROMPT } from './prompt.ts'\n\nexport interface HfSpacesResourceState {\n type: string\n config: HfRepoConfigRedacted\n}\n\nexport class HfSpacesResource extends HfResource {\n readonly kind: string = ResourceName.HF_SPACES\n readonly prompt: string = HF_SPACES_PROMPT\n readonly config: HfRepoConfig\n readonly accessor: HfSpacesAccessor\n\n constructor(config: HfRepoConfig) {\n super()\n assertHfRepoId(config.repoId, 'repo_id')\n const normalized = normalizeKeyPrefix(config.keyPrefix)\n const cfg: HfRepoConfig = { ...config }\n if (normalized !== undefined) {\n cfg.keyPrefix = normalized\n } else {\n delete cfg.keyPrefix\n }\n this.config = cfg\n this.accessor = new HfSpacesAccessor(this.config)\n }\n\n getState(): Promise<HfSpacesResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactHfRepoConfig(this.config),\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\nexport const HF_SPACES_PROMPT = `{prefix}\n Remote Hugging Face Space. Maps the space's repo files (app code, README, requirements) to virtual paths.\n IMPORTANT: This is a remote mount. Prefer targeted reads (grep, head) over full scans.\n Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.`\n"],"mappings":";;;;;;;;;;AAcA,SAAS,oBAAoB,oBAAoB;;;ACA1C,IAAM,mBAAmB;AAAA;AAAA;AAAA;;;ADgBzB,IAAM,mBAAN,cAA+B,WAAW;AAAA,EACtC,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EAET,YAAY,QAAsB;AAChC,UAAM;AACN,mBAAe,OAAO,QAAQ,SAAS;AACvC,UAAM,aAAa,mBAAmB,OAAO,SAAS;AACtD,UAAM,MAAoB,EAAE,GAAG,OAAO;AACtC,QAAI,eAAe,QAAW;AAC5B,UAAI,YAAY;AAAA,IAClB,OAAO;AACL,aAAO,IAAI;AAAA,IACb;AACA,SAAK,SAAS;AACd,SAAK,WAAW,IAAI,iBAAiB,KAAK,MAAM;AAAA,EAClD;AAAA,EAEA,WAA2C;AACzC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,MAAM;AAAA,IACxC,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/resource/box/config.ts
|
|
2
|
+
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
+
var BoxConfigSchema = z.object({
|
|
4
|
+
clientId: z.string().optional(),
|
|
5
|
+
clientSecret: secretStr().optional(),
|
|
6
|
+
refreshToken: secretStr().optional(),
|
|
7
|
+
enterpriseId: z.string().optional(),
|
|
8
|
+
accessToken: secretStr().optional()
|
|
9
|
+
});
|
|
10
|
+
function redactBoxConfig(config) {
|
|
11
|
+
return redactConfigWithSchema(BoxConfigSchema, config);
|
|
12
|
+
}
|
|
13
|
+
function normalizeBoxConfig(input) {
|
|
14
|
+
return normalizeFields(input, {
|
|
15
|
+
rename: {
|
|
16
|
+
client_id: "clientId",
|
|
17
|
+
client_secret: "clientSecret",
|
|
18
|
+
refresh_token: "refreshToken",
|
|
19
|
+
enterprise_id: "enterpriseId",
|
|
20
|
+
access_token: "accessToken",
|
|
21
|
+
developer_token: "accessToken"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
BoxConfigSchema,
|
|
28
|
+
redactBoxConfig,
|
|
29
|
+
normalizeBoxConfig
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-OZAEWZZ3.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 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 clientId?: string\n clientSecret?: '<REDACTED>'\n refreshToken?: '<REDACTED>'\n enterpriseId?: string\n accessToken?: '<REDACTED>'\n}\n\nexport const BoxConfigSchema = z.object({\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 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;AA4B/D,IAAM,kBAAkB,EAAE,OAAO;AAAA,EACtC,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,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,MACf,eAAe;AAAA,MACf,cAAc;AAAA,MACd,iBAAiB;AAAA,IACnB;AAAA,EACF,CAAC;AACH;","names":[]}
|